asterite changed the topic of #crystal-lang to: #crystal-lang The Crystal programming language | http://crystal-lang.org | Crystal 0.6.1 | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal - Docs: http://crystal-lang.org/docs/ - API: http://crystal-lang.org/api/ - Logs: http://irclog.whitequark.org/crystal-lang
ponga has quit [Quit: Leaving...]
<wanderer> only when invoking crystal with eval rather than build, though
<wanderer> well, that's weird.. with eval it's crashing, with build it's not, however, when invoking it within gdb it's crashing for both
ponga has joined #crystal-lang
havenwood has quit [Ping timeout: 252 seconds]
havenwood has joined #crystal-lang
havenwood has quit [Ping timeout: 256 seconds]
<wanderer> jhass: malloc is part of the intrinsics, isn't it?
<jhass> pretty sure it is
<wanderer> it seems that hash.cr is expecting it to zero out the requested memory
<wanderer> which apparently works on linux and darwin
<wanderer> however, not on windows
<wanderer> real malloc() doesn't zero the memory as you probably know, LibC.malloc is defined as well besides this intrinsics-malloc
<wanderer> Hash#clear should be called in Hash#initialize
<wanderer> realloc in Hash#rehash also probably won't zero the new memory
<wanderer> malloc and realloc should either always zero out the memory or it shouldn't be assumed that it does so
<jhass> looking forward to your patch!
<wanderer> do you even care about windows? :P
<jhass> personally? no
<wanderer> yeah, that's what I thought
<jhass> that doesn't mean I would oppose it
<jhass> just that I'm not very interested ;)
<wanderer> ah, ok, forgot crystal is using boehm gc, so malloc probably gets redirected to gc.malloc which apparently always zeros the memory, calling your function malloc and relying on it to zero memory isn't exactly safe, though, as the original malloc doesn't work like that
havenwood has joined #crystal-lang
<jhass> I think it's cheap enough and safer in the hash case to just initialize everything
<wanderer> jhass: yes, however, there might be other malloc-calls depending on zeroed memory besides the ones in hash.cr. btw. how does eval actually work? when I invoke crystal with `eval puts "bla"` it says `undefined local variable or method 'bla'`
<jhass> that's probably due to your shell quoting
<jhass> It just passed the passed as argument to the compiler I think
<jhass> or maybe it even writes a tempfile? I never checked
<jhass> anyway, the bot here uses it
<jhass> >> puts "bla"
<DeBot> jhass: bla
<jhass> so just a shell quoting issue
<wanderer> yep, escaping it like `eval puts \"bla\"` works
<jhass> single quotes should work too
<jhass> crystal eval 'puts "bla"'
<wanderer> you're right
shama has quit [Remote host closed the connection]
wanderer has quit [Quit: Page closed]
shama has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
<ponga> >> p "bla"
<DeBot> ponga: "bla"
shama_ has joined #crystal-lang
shama_ has quit [Client Quit]
shama has quit [Ping timeout: 265 seconds]
<ponga> btw, malloc sounds like a name for fish
<ponga> for example, "grilled malloc with mushroom sauce"
<ponga> just saying
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 272 seconds]
havenwood has joined #crystal-lang
havenn has quit [Ping timeout: 244 seconds]
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 255 seconds]
havenn has quit []
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
bcardiff has joined #crystal-lang
Ven has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
ismaelga has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ddv has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canhtak has quit [Quit: canhtak]
bcardiff has joined #crystal-lang
havenwood has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 244 seconds]
shama has joined #crystal-lang
bcardiff has joined #crystal-lang
eli-se has joined #crystal-lang
<eli-se> hi there
havenn is now known as havenwood
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
Excureo has quit [Ping timeout: 264 seconds]
Excureo has joined #crystal-lang
wanderer has joined #crystal-lang
weskinner_work has joined #crystal-lang
havenwood has quit [Ping timeout: 264 seconds]
havenwood has joined #crystal-lang
havenwood has quit [Ping timeout: 246 seconds]
havenwood has joined #crystal-lang
eli-se has quit [Quit: Leaving...]
leex has quit [*.net *.split]
dom96 has quit [*.net *.split]
leex has joined #crystal-lang
dom96 has joined #crystal-lang
weskinner_work has quit [Ping timeout: 252 seconds]
orliesaurus has quit [Excess Flood]
orliesaurus has joined #crystal-lang
eli-se has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
havenwood has quit [Ping timeout: 244 seconds]
canhtak has joined #crystal-lang
havenwood has joined #crystal-lang
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 244 seconds]
canhtak has quit [Quit: canhtak]
waj has joined #crystal-lang
waj1 has joined #crystal-lang
waj has quit [Read error: Connection reset by peer]
waj has joined #crystal-lang
waj1 has quit [Ping timeout: 252 seconds]
ismaelga has quit [Remote host closed the connection]
waj has quit [Quit: Leaving.]