Skip to main content



Stackabrix, a simple terminal game


cross-posted from: lemmy.world/post/23017061

gitlab.com/christosangel/stackโ€ฆ

stackabrix is a simple terminal game, written in Bash, where the user, against the clock and with the least moves possible, must sort the blocks according to their color, and stack them in the respective stack.

During the game, the user can move left and right, pick blocks and drop them in other stacks.

The aim is to sort the blocks, and stack them in the respectively named stacks, fast as possible, and with the least moves possible.

The play's score is the sum of the time achieved in seconds and of the moves made.

If the score is among the 10 best scores achived, it makes it in the Top Ten Highscores.

win_game

Any feedback is welcome.

in reply to christos

Now I can replay towers of Hanoi trauma in my favourite color scheme ๐Ÿ˜‹

(Actually dig this BTW)

in reply to QuazarOmega

๐Ÿ˜‚ Say the word, Towers are just around the corner! ๐Ÿ˜‚

in reply to rastro

I keep an empty sql DB just for importing and working with spreadsheets to minimize how much I have to fuck with excel.
in reply to alcoholicorn

Mind elaborating? I'm interested in anything keeping me away from excel
in reply to Hnery

You can also use BULK INSERT for csvs or just INSERT INTO and some text editing depending on the specifics.

This is more for one-off stuff like analyzing some 10,000 row spreadsheet you've been handed that you could probably do with formulas in excel, but it's easier to use sql, but not worth building a proper process for.

This entry was edited (1 year ago)
in reply to alcoholicorn

Might want to give notebooks like Jupyter a try - they make for a pretty good time when it comes to working with data.
in reply to rastro

Honestly spreadsheets are kind of great for some things. I'm sure most of their bad rep comes from being applied to the wrong problems - see businesses using it for basically everything.


in reply to ickplant

I think i have too much genes from whatever ones we share with gorillas personally.
in reply to 1985MustangCobra

It's useful to not be too long for your partner, and there are positions that work around length/depth mismatches
in reply to psud

yes im just playing around. my size is i guess average, but when i was growing up watching porn, it of course made me feel unsecure that my penis was not long enough. When i have had sex, they never have had a orgasam from my dick, and that made me feel even more unsecure when they would break up with me for "other reasons"
in reply to ickplant

One day we'll find out that Danny DeVito passed away, and none of us will be ready for that. Fucking legend.

in reply to geneva_convenience

This is dumb in a lot of ways but ill pick the most glaring two. Firstly no marxist would consider a CEO working class. Secondly Luigi clearly read a ton of books.
in reply to geneva_convenience

Thank you Luigi for freeing me from the chains of capitalism

Oh wait, his CEO killing changed nothing. Okay back to work I guess.




Netanyahuโ€™s trial: corruption, war crimes, and an Israel in crisis




A new Proton Experimental change makes modding easier!


On new Proton Experimental, most mods can now just be extracted/copied next to the game .exe, without requiring any extra steps like setting WINEDLLOVERRIDES. This change will also be in future stable Proton releases.


- Pierre-Loup Griffais, a developer at Valve

This entry was edited (1 year ago)
in reply to priapus

And how is it handled with native, builtin? Default to 'Native then Builtin', config optional?

in reply to โ˜† Yฯƒษ ฦšิ‹ฯƒส‚ โ˜†

Lemme tell you something, DO NOT learn BASIC as your first language. As a hobbyist, I avoided C/C++ for 25 years because I just didn't get pointers and memory manipulation, and messed around with other languages like JS and PHP instead (also BASIC's GOTO and GOSUB kinda ruined me as a programmer for a few years). But once it finally clicked a couple years ago, I now want to write EVERYTHING in C/C++.

I think plain C at least should be everybody's first language. It literally reprograms your brain to think exactly like how a computer internally functions. I never got that with other languages, because they were so far removed from the actual machine.

Edit: also, after learning some of it, it's pretty neat when you do stuff like look at parts of the Linux kernel source code and think "wow, I know what's actually happening here now!".

in reply to TimeSquirrel

I actually think that everybody should learn a functional language like Scheme first because it teaches you to think about state explicitly. It's very easy for somebody who learned a functional language to pick up an imperative one, but it's very hard for people to go the other way around.






Making Better Networks for Humans, with Erin Kissane and Darius Kazemi



in reply to โ˜† Yฯƒษ ฦšิ‹ฯƒส‚ โ˜†

This is why I'm kinda excited about WASM. With a WASM backend for GHC, you can now write almost the entire frontend logic in Haskell, with only some minor bindings on the JS side. I really wish that this happens at some point to eliminate the need for JS almost entirely, but I'm not that hopeful anymore.
in reply to balsoft

Yeah, WASM definitely looks promising. It's also worth noting that you can treat Js as a compile target using something like Elm or ClojureScript. These languages have decent semantics that insulate you from a lot of the underlying insanity. For example, stuff like equality works the way you'd expect it to. I've worked on a few large frontend apps with ClojureScript and it was pretty nice as long as you didn't need to interop with the Js ecosystem.



in reply to Garibaldee

Is there a path to adopt Palestinian children who need homes?
in reply to Sauerkraut

I think the article is referring to children that need medical treatment that can not be offered in Gaza do to lack of supplies, specialists and facilities, not children that need families, although most families there need new homes in general since they have been destroyed
in reply to Garibaldee

This is about one per day by the way. Even when approved for release, the exit can still be denied last-second for "undisclosed security reasons".

Death AmeriKKKa, Death to piSSrael


in reply to Garibaldee

It's almost as if, stay with me, they understand a nuclear armed state known as the unsinkable aircraft carrier in the middle east that the US uses to both project power and carry out totally illegal blackmail shit via Epstein, illegal surveillance shit, assassinations, etc, needs to be shielded from any accountability


Proton 9.0-4 released


in reply to petsoi

PoE2 came out in early access on Friday and with a bit of tinkering (had to switch to Proton 7, for others it runs with DX12 not Vulkan) I can play on Linux woth no problems. What a time to be alive! ๐Ÿคญ
in reply to petsoi

I keep hoping that one day Firaxis's 2002 SimGolf will be supported. I tried Golftopia but it doesn't quite scratch the itch.
This entry was edited (1 year ago)
โ‡ง