Better HN
topnewbestaskshowjobs
Log inSign up

ElegantBeef

46 karma · joined Feb 12, 2023 (3y ago) · 20 submissions

Submissions

comment 1y ago · link · parent

If you're cheap like me a used Pixel3a is a grand device.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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...

comment 2y ago · link · parent

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

comment 2y ago · link · parent

It does not formally have variadics, but since it has tuples you can have pretend variadic generics.

comment 3y ago · link · parent

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"

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

They likely read "overloadable enums" and went "Oh Rust calls their tagged unions enums" so assumed all languages did.

comment 3y ago · link · parent

> It lacks proper sum types

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

comment 3y ago · link · parent

I do not use Rust, so sadly I have not.

comment 3y ago · link · parent

> 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.

comment 3y ago · link · parent

For Rust at least one can use https://github.com/arnetheduck/nbindgen

comment 3y ago · link · parent

Ah, yes the French, people historically known for good protests. If only that somehow related to the conversation at hand.

comment 3y ago · link · parent

As a contributor it is still an awful non sequitur that does not answer the question, and brings up a fantastical world.

comment 3y ago · link · parent

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).

comment 3y ago · link · parent

Hunt, Dayz(as does Arma3 and Reforger), and The Cycle all work on Linux.

comment 3y ago · link · parent

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".

comment 3y ago · link · parent

Indent size is up to the programmer.

comment 3y ago · link · parent

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.