snsei has quit [Remote host closed the connection]
snsei_ has joined #crystal-lang
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
lvmbdv has quit [Quit: Leaving.]
<FromGitter>
<sam0x17> I've noticed that when running crystal spec, Array.sample is using the same random seed with each spec.. is there a way to reseed this in `before_each`?
<FromGitter>
<Grabli66> But. I think, crystal require more aggressive marketing, to attract more language developers. Without it we will wait new features for years. 😄
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<FromGitter>
<Grabli66> Yes, you are right. It's sad 😟
<FromGitter>
<Manu-sh> i should write a things like that: ⏎ `char _f[20-2*sizeof(long)-sizeof(int)];` ⏎ i had try with: ⏎ ` _f : StaticArray(LibC::Char, 20-2*sizeif(LibC::Long) - sizeof(LibC::Int)) ` ⏎ but it dosn't work (i think that the reason is that this expr. is evaluated at runtime) ... [https://gitter.im/crystal-lang/crystal?at=5b335abe960fcd4eb9273f5e]
<FromGitter>
<asterite> @hugoabonizio it's an optimization because it was using callbacks, and the callbacks referred to local variables, so they were closured and thus allocated on the heap. Using a struct with the needed arguments is faster because nothing is allocated on the heap.
<FromGitter>
<hugoabonizio> I understand, thanks for the explanation!
<FromGitter>
<bararchy> Hmmmmm
<FromGitter>
<bararchy> Any idea on an optimization we could use @asterite ;)
prutheus has joined #crystal-lang
<prutheus>
Hello. I have a question about amber framework...
<prutheus>
I have the problem that when i wanna join both channels I just join the data channel, doesnt matter if my websocket client has the topic 'calculation
<prutheus>
I only get my client connected to the channel which comes first in my socket, but the topic is 'calculation', in my data channel i receive at the joined function a message with the topic 'calculation' should this not be not possible?
<prutheus>
anyone an idea?
<FromGitter>
<asterite> @bararchy hehe, I don't know. You'll have to benchmark it and see where the bottlenecks are
<FromGitter>
<bararchy> @asterite not everyone got a Mac with `profile` installed :)
snsei has quit [Quit: WeeChat 1.6]
<FromGitter>
<asterite> Right, yeah. There's no solution for that yet
<FromGitter>
<bararchy> Yeha I know, that's why I ping @bcardiff bi-weekly for status report hahahhahaahaha
<FromGitter>
<bararchy> In the end its just another core doing x + y or x * y
<FromGitter>
<jspillers> HI everyone... just installed crystal on a mac via homebrew to start playing around with the language and im getting compiler errors when i try to run a simple `crystal hello_world.cr` ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ as far as i can tell, libgc is installed... [https://gitter.im/crystal-lang/crystal?at=5b33d81072b31d3691f8ec99]
<FromGitter>
<asterite> do you have homebrew installed with the default paths?
<FromGitter>
<jspillers> yes
<FromGitter>
<asterite> then I don't know, it should work. Maybe try `brew install bdw-gc` or `brew link bdw-gc`
<FromGitter>
<jspillers> ok... will give that output in one moment... i am attempting a brew reinstall after making sure all dependent libs were installed
<oprypin>
jspillers, im talking about instructions for homebrew itself.
<FromGitter>
<asterite> for me it's `/usr/local`
<FromGitter>
<asterite> I don't have `/usr/local/homebrew`
<FromGitter>
<jspillers> i see - that could be my problem
<FromGitter>
<asterite> if that's the case, you are out of luck. Crystal for homebrew doesn't work if you don't have a default homebrew installation
<FromGitter>
<jspillers> so basically... everything is hard coded to specific paths and if you dont have exactly those paths then prepare for hours of pain just getting hello_world.cr to compile
<FromGitter>
<jspillers> awesome
<FromGitter>
<fridgerator> 🍠
<RX14>
it's not hard-coded
<RX14>
it just expects the correct environment variables to be set
<RX14>
and homebrew doesn't do that
<RX14>
it's a bug in the homebrew package, an issue should be opened on the homebrew repo
<FromGitter>
<jspillers> `crystal hello_world.cr --link-flags -L$(brew --prefix)/lib` works
<FromGitter>
<jspillers> but quite annoying to have to append everytime i run the compiler
<RX14>
and setting LIBRARY_PATH=$(brew --prefix)/lib:$LIBRARY_PATH should work too
<FromGitter>
<jspillers> im assuming in my .zshrc ^?
<RX14>
test it in your shell
<RX14>
then if it works, yeah
<RX14>
then make an issue on homebrew for them to do the same, if you're feeling helpful
<FromGitter>
<straight-shoota> @RX14 Did you solve the linker error `error LNK2019: unresolved external symbol __imp_strncmp referenced in function check_posix_name` on windows?
<RX14>
yeah
<RX14>
dont remember now
<RX14>
i think it was compiling one of the dependencies wrong