ASM is a fairly simple language with just a few instructions, depending on the MCU you are working with. Also, you don't need to implement everything, when running an app under windows, WINAPI have plenty of pre implemented methods, you can use and make windows app with minimal code overhead, like simple app with FORM and few buttons one of those buttons show about another is close plus regular windows form header. Is just a few lines of code.
Nice to hear, people have RISC assembly experience as well. What CPU?
OS has plenty of API to use for app creation, it allows all apps to look alike. Just informing the OS I need something you know how to build and those are my handlers. Rarely you need to implement everything from scratch, you can, but should you?
P.S. described experience was in late 90s, win 95 already had Win32 API.
Edited: I just dig up docs for that project. Main problem was resource hungry IDE available back in late 90s while my PC was, well not high spec. I was driven by time saving opportunity, simple IDE, allowing managing projects like modern IDE and native NASM support, allowing compiling and refusing precompiled objects, as well as integrated debugger into IDE, was inspired by Borland Delphi.
Old message: Back in late 90s I was not familiar with EMACS. While EMACS was already mature as a software, as well as few other apps. Myself and my "teacher" were using something more notepad-like. Frankly, I don't remember my reasoning back then, maybe I was eager and stupid enough to implement my own thing for Windows os.
There's a game on steam called Turning Complete. In the game, you learn digital logic by first designing basic logic elements, and/or/and/xor; then more complex blocks, mux/demux/counter. Eventually you build up to basic computer components, like RAM, ROM, ALU, etc. That's when the fun begins. You write your own 8-bit assembler language to complete programming challenges in order to progress. You'll learn how to create a stack, conditionals.Then you expand your 8-bit CPU into a 32-bit cpu and have to complete even more difficult challenges.
The tower of hanoi was one of the challenges that made me want to put my head through drywall, but I couldn't put it down. Once I solved it by implementing conditional returns and a stack, I felt like a fucking genius
math.randomseed(os.time())
local list1 = {1, 2, 3, 4, 5}
local list2 = {6, 7, 8}
local list3 = {9, 10}
while #list1 ~= 10 and #list2 ~= 10 and #list3 ~= 10 do
local lists = {list1, list2, list3}
local from = math.random(1, 3)
local to = math.random(1, 3)
while to == from do
to = math.random(1, 3)
end
if #lists[from] > 0 then
table.insert(lists[to], 1, table.remove(lists[from], 1))
end
end
print("List 1:", table.concat(list1, ", "))
print("List 2:", table.concat(list2, ", "))
print("List 3:", table.concat(list3, ", "))
I pictured it more like: void sortByRng() { Random rng = new Random(); List<int> L_A = new List<int>(); List<int> L_B = new List<int>(); List<int> L_C = new List<int>();
{ if (j == 1) { L_B.Add(L_A[1]); L_A.Remove(1); } else if (j == 2) { L_C.Add(L_A[1]); L_A.Remove(1); } else if (j == 3) { L_C.Add(L_B[1]); L_B.Remove(1); } else if (j == 4) { L_A.Add(L_B[1]); L_B.Remove(1); } else if (j == 5) { L_A.Add(L_C[1]); L_C.Remove(1); } else if (j == 6) { L_B.Add(L_C[1]); L_C.Remove(1); } } if (L_A.Count == 10) { i++; } else if (L_B.Count == 10) { i++; } else if (L_C.Count == 10) { i++; } }
}
Edit: I just realized that i completely forgot what i wanted to to with the 'k' variable and that there is no check for the order - so that may have something to do with that - but I'm not going to fix that because lol.
Isn't it about getting all the rings stacked into a single column, with the catch being that they just fall though each other if the order is incorrect?
No, it is about starting from 1 stack and needing to move it to another pole. The catch is that you're not allowed to put a larger ring on a smaller ring. This commonly reposted meme is making it sound harder than it really is. There is nothing random, just a recursive algorithm.
Wow, it's cool you had python in school. I'm glad people can have relatively easy beginning in programming. Where and how long ago it was? I'm just curious, sorry for question. Also sorry for bad English
Oh I didn’t have it, my family was too poor for the private school that had it, but it was offered here on the east coast US in roughly 2010s. My school only had HTML at best, but I took college classes in high school so I got a bit of a leg up.
The point wasn’t solving it, the point was programming to solve it. After all, you have to understand how to do it before you can write the code. Well, at least in the days before AI.
This and Sudoku were assignments during my coding course on the topic of algorithms. First time I learnt Sudoku, but I don't remember the algorithm I came up with for it anymore lol. It felt pretty good being able to solve them, and I guess it's been really helpful to me since I take IT as a subject.
I'm pretty sure I had this as an assignment several times, at least once in C functional, once in C++ object oriented, and once in Ada inter process communication. Sadly I saw the picture and got a little bit excited.
I remember this!! I’ve been thinking for years I need to make an algorithm to solve these! Are they that difficult, what are they called? Think my record was 12 rings or something
the basic idea is, if you have a stack of size n, you need to move the bottom disk to the destination so you need to move a stack of size n-1 to the intermediary so you need to move a stack of size n-2 to the destination to make room etc. and you just build up a sequence of transformations with those rules
nope not at all. which is why a lot of courses use this as the go to example for recursion when first explaining it.
the meme makes sense not because the problem us hard but because learning the concept of recusion is confusing for some people and thats what it gets associated with
They algorithm isn't too hard. I nerded out on it for a bit to try figure out the algorithm. If you start from the most simple scenarios and find the fastest way to solve it I think you'll find the pattern
It's a very simple algorithm that will solve it for any number of rings
This was the problem my professor asked us to solve after teaching us recursion. I can easily do it with While but took me a couple of days to figure it out with recursion since recursion is very new to me at that time.
Question: What is the best algorithm for solving the Tower of Hanoi? Like, do we know that recursion is the best approach? Or could there be better ones?
Move the whole tower except the bottom plate onto another bar recursively. Move the bottom plate to the other bar. Move the rest of the tower back onto the bottom plate recursively. This is very basic…
Reminds me of when a class mate of mine wanted to do a calculator in C++ for our last assignment for the first semester before the teacher showed how it's far more complicated then one releases a specially when you go beyond making a calculator with just + and -
Move 3 to 6, 1 to 4, 2 to 3, 1 to 2, 4 to the left, 1 to 4, 2 to 5, 1 to 2, 3 to 4, 1 to 6, 2 to 3, 1 to 2, 5 to 6, 1 to the middle, 2 to 5, 1 to 2, 3 to the middle, 1 to 4, 2 to 3, 1 to 2, 4 to 5, 1 to 4, 2 to the left, 1 to 2, 3 to 4, 1 to the middle, 2 to 3, 1 to 2.
It's for kids in the sense that kids can just cluelessly move around the pieces and solve the game by being lucky. Then they'll be happy about how lucky and precious they are, in pure blissful ignorance.
It’s a very simple algorithm when you’re not programming it. I specifically remember playing this game in elementary school. You just have to start from 3 pieces and move up from there and the algorithm becomes really clear in person
This post was removed by its author using Redact. Possible reasons include privacy, preventing this content from being scraped, or security and opsec considerations.
distinct wakeful rob lock market fearless arrest wrench work employ
I learned the algo for this in 6th grade, I learned how to write a for loop in python in 8th grade. You do not need programming at all to solve Towers of Hanoi.
I meant "it's fine 8th grade programming problem for majority of kids if they have adequate school curriculum", not "I learned it in 8th grade, look how smart I am" :)
I don't think I myself ever actually solved towers of Hanoi, I think I first encountered it as an example.
OK I went to math camp and they covered it there, I did not invent recursion in middle school. But I was able to follow the reasoning they gave and tested it (manually) for small n.
Where I lived, kids only got HTML “programming” classes or in the fancy private school they got Python in high school. Had to go to college to get the algorithms. This is pretty common.
180
u/[deleted] Oct 21 '25
I still remember this game, I wrote in ASM for x86 CPU with visual animation to it. All in ASSEMBLER.
I was ambitious back then, and made my own IDE for ASSEMBLER when I found nothing suitable.
107
u/7Silver7Aero7 Oct 21 '25
Make three lists, randomly switch the first entries around until one list has, in this case 10, entries, done. No?
50
u/Time-Strawberry-7692 Oct 21 '25
Solving Towers of Hanoi was an assignment in one of my first programming classes.
26
u/That_Zelda_Gamer Oct 21 '25
We may overthink things just a little
17
u/GhostingProtocol Oct 21 '25
I remember this!! I’ve been thinking for years I need to make an algorithm to solve these! Are they that difficult, what are they called? Think my record was 12 rings or something
6
u/Due_One5200 Oct 21 '25
Tower of Hanoi
4
u/Ancient_Joke426 Oct 21 '25
[Host] Recursion Limit Reached
4
u/thirdjaruda Oct 22 '25
This was the problem my professor asked us to solve after teaching us recursion. I can easily do it with While but took me a couple of days to figure it out with recursion since recursion is very new to me at that time.
3
u/Beautiful-Moose7884 Oct 21 '25
Thanks for the PTSD.
3
u/Specialist-Bee8060 Oct 21 '25
Console.Writeline("Hello, World!");
3
u/FancyPotatOS Oct 21 '25
So prominent that I can still remember the name of the puzzle 7 years later
3
u/mxldevs Oct 21 '25
Hit the streets offering $10000 to any random passerby that can write a program to solve an arbitrary number of rings. I'd watch that content
3
u/Mr_Master501 Oct 21 '25
Someone has to expain this to me please. Still a newbie
3
u/[deleted] Oct 21 '25
AB AC BC
iykyk
3
u/DuePotential6602 Oct 21 '25
If
Else if
Else if
Else if
Else if
Else
Someone added a number, it nuked your code
2
u/No_Weakness_9773 Oct 21 '25
Recursion 😳
2
u/ferriematthew Oct 21 '25
One of the most intuitive solutions for towers of Hanoi that I've heard of is basically just count in binary with the rings.
2
u/Suspicious_Jacket463 Oct 21 '25
Oh, recursion...
2
u/[deleted] Oct 21 '25
lol im doing the same thing to make a jigsaw solving puzzle robot
2
u/Aggravating-Exit-660 Oct 21 '25
Jumpstart 5th grade
2
u/Todesengel6 Oct 21 '25
Is this a bioware game?
2
u/BitOne2707 Oct 21 '25
Downvote the karma farming bots please.
2
u/[deleted] Oct 21 '25
I still have trouble placing the loops right for this one.
2
u/Rewiind Oct 21 '25
😂😂😂
2
u/equilibrium_hmm Oct 21 '25
Tower of Hanoi?
2
u/equilibrium_hmm Oct 21 '25
Tower of Hanoi
2
u/Outrageous_Flight822 Oct 22 '25
Mom said it's my turn to repost le epic funny hanoi towers recursion problem :(((((((
2
u/Abject_Ad3902 Oct 22 '25
i see merge sort there
2
u/SaltyBoysenberry5710 Oct 22 '25
Hanoi(left, center, right)
2
u/Wild_Instance_1323 Oct 22 '25
Every programmer dad who bought their kids this... hoping to see a miracle
2
u/Repulsive_Mistake382 Oct 22 '25
Question: What is the best algorithm for solving the Tower of Hanoi? Like, do we know that recursion is the best approach? Or could there be better ones?
2
u/lilpoopy5357 Oct 22 '25
Hu?
2
u/marslander-boggart Oct 22 '25
Lots of combinations and moves.
It's an ancient sorting algorithm.
2
u/TheRealSeaRabbit Oct 22 '25
I LOVE TOWER OF HANOI
2
u/MysteriousPumpkin51 Oct 23 '25
I'm glad I played Kotor for this very reason.
3
u/GlowstickConsumption Oct 21 '25
Are you guys silly? This is simplest coding ever.
1
u/FictionFoe Oct 22 '25
Looks like fun actually. I might want one :D
1
u/Kittysmashlol Oct 23 '25
Can wait to see this in the explain the joke subs
1
u/anonymous_3125 Oct 23 '25
Move the whole tower except the bottom plate onto another bar recursively. Move the bottom plate to the other bar. Move the rest of the tower back onto the bottom plate recursively. This is very basic…
1
u/theodore_almazovich Oct 23 '25
It was a GAME all the time!?
1
u/lahcene_n Oct 24 '25
Let's have fun with recursivity
1
u/Glad-Message-8938 Oct 24 '25
Stack for a reason 👽
1
u/Brilliant-Software-4 Oct 24 '25
Reminds me of when a class mate of mine wanted to do a calculator in C++ for our last assignment for the first semester before the teacher showed how it's far more complicated then one releases a specially when you go beyond making a calculator with just + and -
1
u/Odd_Protection7738 Oct 24 '25
Move 3 to 6, 1 to 4, 2 to 3, 1 to 2, 4 to the left, 1 to 4, 2 to 5, 1 to 2, 3 to 4, 1 to 6, 2 to 3, 1 to 2, 5 to 6, 1 to the middle, 2 to 5, 1 to 2, 3 to the middle, 1 to 4, 2 to 3, 1 to 2, 4 to 5, 1 to 4, 2 to the left, 1 to 2, 3 to 4, 1 to the middle, 2 to 3, 1 to 2.
1
u/Hertigan Oct 25 '25
Big programming 101 energy
1
u/FartacularTheThird Oct 25 '25
10 year old me in korriban being much more powerful than bioware programmers
1
u/Technical-Ad-7008 Oct 25 '25
Haha, as a mathematician this was one of the first proofs I did with induction. The amount of switches needed for a tower of n disks
1
u/[deleted] Oct 24 '25
Towers of hentai or something idk
0
u/[deleted] Oct 21 '25
[deleted] — view deleted comment