HNHacker News
TopNewBestAskShowJobs

ElegantBeef

46 karma · joined February 12, 2023

submissionscomments
ElegantBeef··on Keep Android Open
If you're cheap like me a used Pixel3a is a grand device.
ElegantBeef··on Ask HN: What are you working on (August 2024)?
Working on a hot code reloading library for Nim. It's a general solution, but specifically for my game framework.

An example of it in action: https://streamable.com/2mxktc

Source code: https://github.com/beef331/potato

ElegantBeef··on Tachyonfx: A library for creating shader-like effects in terminal UIs
There's not much more to share presently. The game presently is very far from having gameplay. The "terminot" part is MIT licensed inside the game repo. The game itself is presently GPL3 licensed.

Small hacking game: https://streamable.com/q840oc

Source: https://github.com/beef331/keyboardwarrior/blob/master/scree...

ElegantBeef··on Tachyonfx: A library for creating shader-like effects in terminal UIs
As someone working a TUI game I wanted stuff like this myself so just wrote what I now refer to as a "terminot". Actual shaders and non grid align rendering. Nice to see people attempt to emulate it in a proper terminal emulator.

If anyone is interested in what a terminot does: https://streamable.com/t5kz2y

ElegantBeef··on Arraymancer – Deep learning Nim library
It does not formally have variadics, but since it has tuples you can have pretend variadic generics.
ElegantBeef··on Can you use a class in C?
Again that's this language constraining you to that. With procedure overloading it's not required that you have to have that ugly API. For instance the following is valid Nim:

  type
    Cat = object # these are just 'struct' in a different skin
    Dog = object

  proc greet(c: Cat): string = "Meow"
  proc greet(d: Dog): string = "Bark"

  assert Dog().greet() == "Bark"
  assert Cat().greet() == "Meow"
ElegantBeef··on Nim 2.0
I use pixie for my game framework. It's used to load textures, layout fonts, and render font atlases. It can be used for generative art but https://github.com/EriKWDev/nanim or sdl2 using renderer's makes more sense as they are gpu accelerated.
ElegantBeef··on Nim 2.0
They likely read "overloadable enums" and went "Oh Rust calls their tagged unions enums" so assumed all languages did.
ElegantBeef··on Nim 2.0
> It lacks proper sum types

We've talked about this before! You know it has sum types, just not the variation you want.

ElegantBeef··on Nim 2.0
I do not use Rust, so sadly I have not.
ElegantBeef··on Nim 2.0
> default behaviour is pass by value

Is not exactly true, smaller than 24 bytes is passed by value, the compiler optimizes larger calls and passes by reference implicitly.

ElegantBeef··on Nim 2.0
For Rust at least one can use https://github.com/arnetheduck/nbindgen
ElegantBeef··on Nim Succession Plan
Ah, yes the French, people historically known for good protests. If only that somehow related to the conversation at hand.
ElegantBeef··on Nim Succession Plan
As a contributor it is still an awful non sequitur that does not answer the question, and brings up a fantastical world.
ElegantBeef··on Valve Releases Proton 8.0-1c
If you care DayZ was BE enabled back in like October if my memory serves me correctly. The Cycle always supported it through Proton. Hunt recently enabled it like a month ago(finally, HMMMMing on linux is good).
ElegantBeef··on Valve Releases Proton 8.0-1c
Hunt, Dayz(as does Arma3 and Reforger), and The Cycle all work on Linux.
ElegantBeef··on This Month with Nim: March 2023
Well there is a practical reason that in a whitespace significant language you do not want to mix indentation types. I personally prefer tabs for the user customization, but the actual reasoning that generally speaking it was(is?) hard to get tabs to render as you want in a multitude of environments whereas spaces always render as is.

Quick someone reset the inane "Days since mentioning style insensitivity".

ElegantBeef··on This Month with Nim: March 2023
Indent size is up to the programmer.
ElegantBeef··on I learned seven programming languages
To explain 'why' it behaves this way is quite simple the stdlib does not have slicing operators for all of your expected cases, Nim does not have postfix operators(aside from [], {}, *) so 3.. is just impossible to define. If one really wanted to https://play.nim-lang.org/#ix=4nSQ solves most of the issues.