betaveros / noulith

*slaps roof of [programming language]* this bad boy can fit so much [syntax sugar] into it
1.13k stars 20 forks source link

Flushing is annoying #23

Open SuperCuber opened 9 months ago

SuperCuber commented 9 months ago
noulith> debug 5; # same with echo and write
noulith> flush;
noulith> print;
noulith> # ???
noulith> print "";
5
noulith> 

This is in neovim terminal on macos iterm2 if that matters at all

Edit: i played around more and i now understand that i should've done flush() and print() instead, but now i see that flush deletes the unprinted stuff instead of just printing it? thats weird... also maybe debug should add a newline

SuperCuber commented 9 months ago

Completely unrelated, but I really like the ahem features of the language and would like to try using it as a personal "calculator language" for quick n dirty stuff.

I had this idea for a while of having a save statement in a REPL that will write the value of a function or variable to something like a global ~/.noulithrc to provide a minimal friction way to stash new helper functions or common values. Does this sound like something you will accept a PR for? Do you feel like it would even be useful?

betaveros commented 8 months ago

That sounds vaguely useful, I could imagine accepting a PR.

I don't know what's up with flush deleting things. That sounds like a bug. But I don't have a mac to test this on right now.