<FromGitter>
<j8r> This is because the floats aren't, and can't exactly be represented as base 10 in hardwares
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 246 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Raimondi has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
GoldenBear has quit [Quit: ZNC 1.6.6+deb1 - http://znc.in]
Renich has joined #crystal-lang
<FromGitter>
<DanilaFe> @yxhuvud I've gotten quite a bit of shift / reduce conflicts while using LALR. Supposedly GLR is better, but performs worse for the cases that LALR doesn't handle at all. I think yacc uses GLR?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
_whitelogger has joined #crystal-lang
spacemanspam has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Renich has quit [Quit: Renich]
_whitelogger has joined #crystal-lang
<FromGitter>
<DanilaFe> parser combinators might do the trick
Raimondi has quit [Ping timeout: 240 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Client Quit]
laaron has joined #crystal-lang
spacemanspam has quit [Read error: Connection reset by peer]
_whitelogger has joined #crystal-lang
<FromGitter>
<DanilaFe> To chime in a little late: code that's never used isn't even compiled in debug mode. Sometimes, if you stop using a function, then change it, you can have completely invalid code that compiles fine as part of your codebase. Specs are a great way of preventing thst
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ashirase has quit [Ping timeout: 258 seconds]
ashirase has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Read error: Connection reset by peer]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<Yxhuvud>
oprypin: someone should tell the people behind lark that there is an optimization available that makes earley parsers linear on input size for right-recursions.
spacemanspam has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
return0e has quit [Ping timeout: 246 seconds]
return0e has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
sagax has quit [Ping timeout: 246 seconds]
Groogy has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Groogy has quit [Quit: WeeChat 2.3]
Groogy has joined #crystal-lang
sagax has joined #crystal-lang
<FromGitter>
<Blacksmoke16> ` pp "foo".colorize(Colorize::ColorRGB.new(195, 232, 141))` does this work for you guys? Seems the RGB color isnt coloring anything
<FromGitter>
<Blacksmoke16> ah, just seems its my terminal
return0e has quit []
laaron has quit [Remote host closed the connection]
<FromGitter>
<r00ster91> `crystal eval 'at_exit { File.write("test", "hello") }; sleep'` ⏎ I ran this in the terminal and closed the terminal with the `X` in the top right but there was no "test" file with "hello" on my Desktop after that. Does somebody know why?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
<oprypin>
well damn
<FromGitter>
<girng> aw nvm
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<r00ster91> also tried other signals like STOP, TSTP, QUIT, KILL
laaron has quit [Remote host closed the connection]
<oprypin>
r00ster91, `HUP` is the right one
<oprypin>
tbh i'd do the whole suite of `HUP`, `TERM`, `INT`
laaron has joined #crystal-lang
<oprypin>
they are 1) for exiting the session 2) for `kill` 3) for Ctrl+C
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<r00ster91> they don't work either. Could be a WSL bug. Do any of these work for you?
laaron has quit [Remote host closed the connection]
<oprypin>
yeah this one works `crystal eval 'Signal::HUP.trap { File.write("test", "hello") }; sleep'`
<oprypin>
and then i close the terminal
laaron has joined #crystal-lang
<oprypin>
of course WSL can be different, it could even be doing the uncatchable `KILL`
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
<FromGitter>
<r00ster91> probably a wsl bug then
laaron has joined #crystal-lang
<oprypin>
well it's not necessarily a bug, i don't there's any standard that says "when someone closes the terminal, the signal must be `HUP`"
<oprypin>
don't think*
<oprypin>
r00ster91, can you SSH into WSL?
<FromGitter>
<r00ster91> I think so. the `ssh` command is there
<oprypin>
like `ssh localhost` or something and run this command with `HUP` but with `&` in the end to send it in the background, and then press Ctrl+D to gracefully exit the session
<oprypin>
in THAT case, at least, it should work
<oprypin>
`crystal eval 'Signal::HUP.trap { File.write("test", "hello") }; sleep' &` <- like this, it's not a mistake that there is `&` at the end
<oprypin>
i'm not sure why i'm telling you to do this though, because it won't get you closer to your goal. just to restore some sanity, I suppose
<FromGitter>
<r00ster91> hmm no somehow I can't use ssh: "Permission denied, please try again.". Could also be an WSL issue
spacemanspam has joined #crystal-lang
<oprypin>
oh well
<oprypin>
r00ster91, time to switch to linux
<FromGitter>
<r00ster91> Yes I already considered that but I'm still not sure. Mainly because of program support. In many cases windows got more support from something than linux (e.g. some games)
<FromGitter>
<r00ster91> probably someday
<oprypin>
the argument about games kinda fell apart in 2018, but if you're missing very specialized programs, sure
laaron has quit [Remote host closed the connection]
<oprypin>
stupid Latin class, even 4 years later this is all i can think of https://translate.google.com/#view=home&op=translate&sl=la&tl=en&text=legit
spacemanspam has quit [Read error: Connection reset by peer]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
spacemanspam has joined #crystal-lang
spacemanspam has quit [Read error: Connection reset by peer]
<FromGitter>
<girng> stackoiverflow is such an unfair and terrible site
<FromGitter>
<girng> these people helped with my question and now, my question got marked as duplicate. i can't reward them with points. or hell, i can't even upvote them lol
<oprypin>
yes, it is unfair to answerers specifically
<FromGitter>
<DanilaFe> @oprypin LALR is good, but it is prone to conflicts. I haven't looked at lark, but some parser generators switch algorithms as necessary
<oprypin>
DanilaFe, this one resolves conflicts by allowing to manually set priorities on different kinds of tokens
<FromGitter>
<DanilaFe> Oh, interesting. In Pegasus, tokens are assigned priority based on the order on which they're declared. But tokenizing is rarely the issue
<FromGitter>
<DanilaFe> I had a problem when I was writing a Bash grammar when I tried to add optional white space, and it caused shift / reduce conflicts all over the place. It's not that the tokens are ambiguous, it's that the parser isn't sure what production to use
<FromGitter>
<DanilaFe> Now I have an option to just skip certain tokens (I use it for whitespacr)
spacemanspam has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<oprypin>
DanilaFe, i mean, the priorities are probably not to resolve tokenization but whatever comes after it. i.e. the production is based on the priority of the 1st token in it
<oprypin>
if i had to guess
<oprypin>
dont actually know how it works, i basically messed with priorities until it worked
<FromGitter>
<girng> actually surprised this moderator is listening to me
<FromGitter>
<girng> maybe they'll change something, i doubt it though lolz
<oprypin>
nah, closing questions is basically all moderators can do
<FromGitter>
<girng> do they have any say to the "higher ups"?
<FromGitter>
<DanilaFe> @oprypin oh! That makes more sense. I'm going to be borrowing that idea :D
<FromGitter>
<DanilaFe> Thanks :)
shmibs has quit [Quit: leaving =o]
<FromGitter>
<j8r> @r00ster91 unless you use very recent progams, all runs in Linux with Wine (PoL or Proton)
<FromGitter>
<j8r> And you can still use a VM if you really needs to...
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
spacemanspam has quit [Read error: Connection reset by peer]
shmibs has joined #crystal-lang
<FromGitter>
<girng> need some more CRYSTAL BABY
<FromGitter>
<girng> code warrior time
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<girng> i heard WSL is detrimental towards the crystal compilation process... i really want to try it on a true native linux environment! need to buy that dumb sata SSD. still can't believe i accidentally purchased an M2 one 😆
<FromGitter>
<Blacksmoke16> got a big flashdrive? :P
<FromGitter>
<girng> 16gb one i think. prob be enough eh?
<FromGitter>
<Blacksmoke16> prob
<FromGitter>
<girng> what distro you recommend? Linux Mint?
<FromGitter>
<Blacksmoke16> ubuntu would be easiest prob. I'm on Debian, Arch is also good but is hard for newcomers to linux
<FromGitter>
<girng> i use debian for my vps a lot, server version never tried it with a gui though
<FromGitter>
<girng> if i don't have to write sudo every god damn time i type in the shell, i'll be happy on any distro
<FromGitter>
<girng> LOL
<FromGitter>
<girng> most annoying thing i've ever dealt with. WSL makes me type sudo as well, want to rip my hair out
<FromGitter>
<Blacksmoke16> just `su` if you have to do a log of root stuff
<FromGitter>
<girng> i am the root
<FromGitter>
<girng> i'm the owner of the OS, why they make us type redundant stuff is insane
<FromGitter>
<Blacksmoke16> but are you logged in as the root?
<FromGitter>
<girng> i better be, yeah
<FromGitter>
<Blacksmoke16> should be able to `su` then type root password
<FromGitter>
<Blacksmoke16> if it says `root@your_host` then you're root, otherwise you're not
<FromGitter>
<girng> but do i have to type su every time i do a cmd afterwards?
<FromGitter>
<girng> apt-get install, etc
<FromGitter>
<Blacksmoke16> no, su would log you into root
<FromGitter>
<Blacksmoke16> then everything you type would be like typing sudo before
<FromGitter>
<Blacksmoke16> as its all executed in context of the root user
<FromGitter>
<Blacksmoke16> which is what sudo does, elevates the permissions to that of root
<FromGitter>
<girng> yeah but is that for each command?
<FromGitter>
<Blacksmoke16> ```no, su would log you into root's account```
<FromGitter>
<girng> what OS does this work on, all of them?
<FromGitter>
<girng> i was installing a linux distro last year or so, and i remember they forced me to CREATE A user account in the install process. then, every time i tried to run a cmd in the console, i had to type sudo. i guess i sshould have used the `su` thing like you said.
<FromGitter>
<Willyboar> @girng i installed elementary OS a few days before
<FromGitter>
<Willyboar> it is based on ubuntu
<FromGitter>
<Blacksmoke16> yea, sudo is something that elevates your command to run as root
<FromGitter>
<Blacksmoke16> su would log you into root's account so all commands you type are already root, so no need for sudo
<mps>
girng: Alpine linux doesn't force you to add non-root user
<FromGitter>
<girng> @Willyboar oh i saw youtube videos of that, the UI looked very polished
<FromGitter>
<Blacksmoke16> is mostly a security thing
<mps>
Arch Linux too, IIRC
<FromGitter>
<Willyboar> @girng yeap is a macos-like ui
<FromGitter>
<girng> oh gosh now i remember what happened on linux mint. my wireless adapter wasn't compatible. it made me rage cause i kept going on my mom's computer to find out what to do, putting stuff on a usb, xfering it to my main pc, etc. trying all this crap and nothing worked
<FromGitter>
<girng> this is why i want to buy a 100 foot cat 6 cable and pipe it into my bedroom.