ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Blacksmoke16> It flushs at the end, so I'd say by design
<FromGitter> <Blacksmoke16> I think there's a way to make it always flush
<FromGitter> <Blacksmoke16> .sync = true maybe
notzmv has joined #crystal-lang
lucf117 has joined #crystal-lang
<FromGitter> <didactic-drunk> It I set `sync = false` performance takes a nose dive with binary files writing 1-4 bytes at a time.
<FromGitter> <Blacksmoke16> makes sense
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
lucf117 has quit [Remote host closed the connection]
m4xm4n has joined #crystal-lang
notzmv has quit [Ping timeout: 252 seconds]
lanodan has quit [Ping timeout: 272 seconds]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #crystal-lang
notzmv has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <didactic-drunk> Is crystal master backwards compatible with 1.0.0? If yes I have this ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Jennifer Issue (https://github.com/imdrasil/jennifer.cr/issues/373) [https://gitter.im/crystal-lang/crystal?at=60dd539024f0ae2a2438d41f]
lanodan has joined #crystal-lang
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
notzmv has quit [Ping timeout: 240 seconds]
frojnd1 is now known as frojnd
deavmi_ has joined #crystal-lang
deavmi has quit [Ping timeout: 256 seconds]
notzmv has joined #crystal-lang
<FromGitter> <rishavs> has anyone integrated their crystal project with Sign in with Google/Apple oauths? I can use some reference here
<FromGitter> <Blacksmoke16> are they any diff than normal OAuth? Is a module in the stdlib you can use
<FromGitter> <rishavs> Basic principle is the same, but the clientside sdk are supposed to take care of all the refreshing and the hygiene stuff.
<FromGitter> <Blacksmoke16> if they're spec compliant you could leverage https://crystal-lang.org/api/master/OAuth2.html
elf_fortrez has joined #crystal-lang
<mps> would someone on gitter type one message, I'm trying to rewrite irssi triggers to rewrite gitter messages
<FromGitter> <straight-shoota> one message
<mps> thanks
elf_fortrez has quit [Quit: Client closed]
<FromGitter> <rishavs> two message
<mps> also thanks
<FromGitter> <lebogan> Hi. After a lot of head scratching and mild cussing, I finally managed to compile crystal 1.0.0 on a Raspberry Pi 4 running Raspbian Buster 10. Why? Cuz Crystal is cool. `crystal -v` shows the version minus the compile date. Ok. When I try to build an application I get this error: `Error: can't find file 'prelude'` 'prelude' is located in /usr/share/crystal/src. How do I tell crystal that? Thanks
<FromGitter> <RespiteSage> What's the output of `crystal env`?
<FromGitter> <lebogan> CRYSTAL_CACHE_DIR=/home/pi/.cache/crystal ⏎ CRYSTAL_PATH=/usr/share/crystal/src/ ⏎ CRYSTAL_VERSION=1.0.0 ⏎ CRYSTAL_LIBRARY_PATH=/usr/bin/../lib/crystal/lib ⏎ CRYSTAL_OPTS='' [https://gitter.im/crystal-lang/crystal?at=60de1202effd491d8c961a35]
<FromGitter> <RespiteSage> Huh. I'd expect that to work, then.
<FromGitter> <RespiteSage> Maybe try deleting everything in that cache directory?
<FromGitter> <Blacksmoke16> `ls /usr/share/crystal/src/` prints what?
<FromGitter> <lebogan> ls prints a lot .cr files including prelude
<FromGitter> <RespiteSage> What's the command you're using to compile? And does this happen with an empty source file?
<FromGitter> <RespiteSage> Also, you only have the one crystal binary that you're using, right?
<FromGitter> <lebogan> Just a test hello.cr with puts "Hello". I have only one binary.
<FromGitter> <lebogan> I built the binary using llvm-7. Is this a problem?
<FromGitter> <RespiteSage> I'm really not sure. I know the most recent LLVM release that Crystal is definitely compatible with is LLVM 11. I'm not sure what the earliest is.
<FromGitter> <RespiteSage> And I have no idea how it would affect the prelude.
<FromGitter> <RespiteSage> Or whether it would.
<FromGitter> <RespiteSage> I'm sorry, I have to go now, else I'd try to help you more to figure out what's wrong. Good luck.
notzmv has quit [Ping timeout: 256 seconds]
<straight-shoota> The error is definitely that the compiler can't find the stdlib source code
<straight-shoota> Maybe try `CRYSTAL_PATH=/usr/share/crystal/src/ crystal build` (even though it already reports this path)
<FromGitter> <Blacksmoke16> is it possible its a symlink and something doesnt follow those?
<straight-shoota> Yeah, some file system trouble could be a reason for this not working
<FromGitter> <lebogan> I removed the cache.
<FromGitter> <lebogan> I ran `CRYSTAL_PATH=/usr/share/crystal/src/ crystal run ./hello.cr ` ⏎ Now I'm getting a different error like: Invalid memory access (signal 11) at address 0x0 ⏎ [0xb1cea8] ??? ⏎ [0xa4c2bc] __crystal_sigfault_handler +148 ⏎ Invalid memory access (signal 11) at address 0x0 Error: execution of command failed with code: 1: `cc "${@}" -o /home/pi/.cache/crystal/crystal-run-hello.tmp -rdynamic
<FromGitter> ... -L/usr/bin/../lib/crystal/lib -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl` ... [https://gitter.im/crystal-lang/crystal?at=60de280b8c12474d8ce2c4f4]
<straight-shoota> Well it seems that at least found you your stdlib sources
<straight-shoota> It seems weird tho that there's supposedly an invalid memory access in Crystal code while executing cc
<FromGitter> <lebogan> I'm going to redo all this using llvm-9 instead of 7. Shot in the dark.
notzmv has joined #crystal-lang
ur5us has joined #crystal-lang
mps has quit [Ping timeout: 265 seconds]
mps has joined #crystal-lang
<FromGitter> <lebogan> Ok. So I can cross-compile apps and the Portalier version 0.33.0 works. Thanks @Blacksmoke16 , @RespiteSage , straight-shoota for all your help. 1.0.0 would be nice though.
<FromGitter> <Blacksmoke16> wait
<FromGitter> <Blacksmoke16> what happens if you remove the `/usr/share/crystal/src/ext/libcrystal.a`
<FromGitter> <Blacksmoke16> pretty sure in 1.0.0 that is no longer used so maybe it's causing issues?
<FromGitter> <Daniel-Worrall> 1) 0 still uses it, 1.1 has it removed
<FromGitter> <Blacksmoke16> ah, ok