jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.9.1 | Fund Crystals development: http://is.gd/X7PRtI | 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
Bofu2U has quit [Max SendQ exceeded]
Bofu2U has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
ponga has joined #crystal-lang
Philpax__ is now known as Philpax
wmoxam has quit [Remote host closed the connection]
waterlin1 has joined #crystal-lang
waterlink has quit [Ping timeout: 272 seconds]
waterlin1 has quit [Ping timeout: 256 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
Arctaire has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
dmonster has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
sorbo_ has joined #crystal-lang
<sorbo_> I'm having a bit of trouble with Spec.before_each()
<sorbo_> regardless of what I do in the block (class var, global var), that var isn't available to my specs
<sorbo_> if I've got Spec.before_each do @@foo = "bar" end, shouldn't @@foo be set to "bar" for each spec?
<sorbo_> instead I get "Nil (compile-time type Baz?)
<sorbo_> "
<jhass> sorbo_: those really are intended for integrating other things, like mocking frameworks for now, they're not meant like you're used to them in rspec for example
<sorbo_> jhass: got it. was just reading that in some IRC logs I dug up
<sorbo_> is there anything I could/should be using? or just repeat myself for the time being?
<jhass> top level methods are file private in crystal, you could use them
<jhass> or you look into alternatives like minitest.cr
<jhass> it achieves those features but the trade off is that it runs and compiles slower since it has a larger overhead of creating the support structures to make it work
<sorbo_> jhass: the top-level method solution works like a charm--I'll do that for now. thanks!
sorbo_ has quit []
aemadrid has quit [Read error: Connection reset by peer]
aemadrid has joined #crystal-lang
jokke has quit [Ping timeout: 250 seconds]
jokke has joined #crystal-lang
A124 has joined #crystal-lang
juancate has quit [Quit: leaving]
Philpax has quit [Ping timeout: 256 seconds]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox_ has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
pawnbox has joined #crystal-lang
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 256 seconds]
Philpax has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 256 seconds]
Philpax has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
ponga has quit []
ponga has joined #crystal-lang
HakanD_____ has joined #crystal-lang
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
buggs has joined #crystal-lang
matp has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
jokke has quit [Quit: WeeChat 1.3]
A124 has quit [Ping timeout: 272 seconds]
jokke has joined #crystal-lang
jokke has quit [Client Quit]
jokke has joined #crystal-lang
Ven has quit [Disconnected by services]
Ven_ has joined #crystal-lang
sdogruyol has joined #crystal-lang
Philpax_ has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
Philpax has quit [Ping timeout: 256 seconds]
sdogruyol has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
jokke has quit [Quit: WeeChat 1.3]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
jokke has joined #crystal-lang
sdogruyol has quit [Client Quit]
Philpax_ has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] MakeNowJust opened pull request #1949: Please respect user's CRYSTAL_PATH (master...fix/respect-env) http://git.io/v08pN
trapped has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
HakanD_____ has quit [Quit: Be back later ...]
HakanD_____ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #1950: Add a new compiler option `--path PATH` (master...feature/path-option) http://git.io/v04OK
sdogruyol has joined #crystal-lang
<sdogruyol> i really wonder why this is not working as the same as ruby https://carc.in/#/r/o6c
<BlaXpirit> sdogruyol, it's too large probs
<sdogruyol> yeah it is
<sdogruyol> probably related to BigNum implementation but ruby handles it
<BlaXpirit> sdogruyol, there is no bignum by default
<sdogruyol> BıgInt actually
<sdogruyol> so i have to explicitly cast a to BigInt
<BlaXpirit> yes ,sd
<BlaXpirit> yes, sdogruyol
trapped has joined #crystal-lang
<sdogruyol> also the same result https://carc.in/#/r/o6x
<BlaXpirit> sdogruyol, srsly...
<BlaXpirit> sdogruyol, https://carc.in/#/r/o6y
<sdogruyol> ow
<sdogruyol> thanks
sdogruyol has quit [Remote host closed the connection]
HakanD_____ has quit [Quit: Be back later ...]
HakanD_____ has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Client Quit]
HakanD_____ has quit [Ping timeout: 272 seconds]
Ven_ has quit [Ping timeout: 272 seconds]
Ven has joined #crystal-lang
Ven has quit [Client Quit]
Ven has joined #crystal-lang
Ven has quit [Client Quit]
rvchangue has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
rvchangue has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mhib has joined #crystal-lang
bmcginty has quit [Ping timeout: 260 seconds]
bmcginty has joined #crystal-lang
bmcginty has quit [Ping timeout: 256 seconds]
bmcginty has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wmoxam has joined #crystal-lang
dylanmei has joined #crystal-lang
shama has joined #crystal-lang
trapped has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdogruyol has joined #crystal-lang
sdogruyo_ has joined #crystal-lang
sdogruyol has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
shama has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
sdogruyo_ has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
shama has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #crystal-lang
greengriminal has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Read error: Connection reset by peer]
fowlduck_ has joined #crystal-lang
ponga has quit [Quit: Connection closed for inactivity]
Philpax_ has joined #crystal-lang
sdogruyol has quit []
waterlink has joined #crystal-lang
FLOOR_9_ has joined #crystal-lang
<FLOOR_9_> guten abend jhass
<jhass> guten morgen
<FLOOR_9_> :\
<FLOOR_9_> you are not in germany?
<jhass> I live in UGT
<FLOOR_9_> what is that
<jhass> ?ugt
<DeBot> jhass: Nothing known about ugt.
<jhass> noo!
<FLOOR_9_> you mean utc?
<DeBot> jhass: Set ugt.
<FLOOR_9_> ah yeah nice
<FLOOR_9_> time is relative anyway
<FLOOR_9_> so good morning
<FLOOR_9_> i ran into an issue running crystal apps
<FLOOR_9_> both kemal and moonshine won't run, but a simple helloworld.cr does
<FLOOR_9_> ubunut 14 trusty, latest crystal from apt-get
<FLOOR_9_> when i git clone either kemal or moonshine, and run crystal src/moonshine.cr
<FLOOR_9_> it give me this error:
<FLOOR_9_> Error: execution of command failed with code: 1: `cc -o "/home/ubuntu/Documents/kemal/.crystal/crystal-run-kemal.tmp" "${@}" -rdynamic -lz -lssl -lcrypto -lyaml -levent -lrt -lpcl -lpcre -lm -lgc -lpthread -ldl`
<FLOOR_9_> Error: execution of command failed with code: 1: `cc -o "/home/ubuntu/Documents/kemal/.crystal/crystal-run-kemal.tmp" "${@}" -rdynamic -lz -lssl -lcrypto -lyaml -levent -lrt -lpcl -lpcre -lm -lgc -lpthread -ldl`
<FLOOR_9_> Error: execution of command failed with code: 1: `cc -o "/home/ubuntu/Documents/kemal/.crystal/crystal-run-kemal.tmp" "${@}" -rdynamic -lz -lssl -lcrypto -lyaml -levent -lrt -lpcl -lpcre -lm -lgc -lpthread -ldl`
<FLOOR_9_> Error: execution of command failed with code: 1: `cc -o "/home/ubuntu/Documents/kemal/.crystal/crystal-run-kemal.tmp" "${@}" -rdynamic -lz -lssl -lcrypto -lyaml -levent -lrt -lpcl -lpcre -lm -lgc -lpthread -ldl`
<jhass> I don't think that's the full output
<FLOOR_9_> you are right
<jhass> you're missing openssl-dev ?
<bougyman> libhssl-dev, on ubuntu
<FLOOR_9_> yes
<FLOOR_9_> so each crystal app needs it own dependencies?
<jhass> potentially
davydov_anton has joined #crystal-lang
<FLOOR_9_> its on a live cd btw
<FLOOR_9_> that's why i am missing libhssl-dev
<FLOOR_9_> but it would be handy to know which deps i need to install, is there an easy way?
<jhass> learning to read linking errors will be a useful skill
<jhass> /usr/bin/ld: cannot find -lcrypto is a pretty big hint
<FLOOR_9_> ow yeah i know fixing those often requires linking additional linking
<FLOOR_9_> but what i mean, is that for example, on the kemal github, it does not say i deed these library's
<FLOOR_9_> so for people new to crystal, and tried to run it, they get the same error
davydov__ has joined #crystal-lang
<FLOOR_9_> a list of dependency for example, rather than sorting out the errors one by one, and finding each dependency
<FLOOR_9_> is there such a system in place for crystal? or am i going the wrong way
<jhass> that's something to discuss with the maintainer of a particular project
davydov_anton has quit [Ping timeout: 240 seconds]
<FLOOR_9_> yeah , like ruby lists gem requirements, so would be handy if those were also listed with a crystal app
davydov_anton has joined #crystal-lang
<FLOOR_9_> wouldn't you agree?
davydov__ has quit [Ping timeout: 250 seconds]
davydov__ has joined #crystal-lang
<FLOOR_9_> just trying to help for the newcomers, that's all
davydov_anton has quit [Read error: Connection reset by peer]
davydov__ has quit [Client Quit]
<jhass> FLOOR_9_: rubygems neither lists dependencies on other C libraries
<jhass> shards like rubygems already lists dependencies on other crystal libraries
<FLOOR_9_> so the best way is for the crystal app maintainer to link to the shard dependencies?
<jhass> I don't see how you jump to that conclusion
<FLOOR_9_> well right now, i just installed libssl-dev and libyaml-dev
<FLOOR_9_> and kemal runs, so what i suggest is that for newbies on linux systems, to simple list those 2 dependencies
<FLOOR_9_> and that way, the person has no problems
<jhass> suggest it to kemal then
<FLOOR_9_> ok
<FLOOR_9_> no problem
<FLOOR_9_> i was under the assumption the whole time you were a crystal maintainer
<FLOOR_9_> is that correct?
<jhass> I do have commit rights, I do not make language design decisions
<FLOOR_9_> ah ok
HakanD_____ has joined #crystal-lang
pawnbox has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
<FLOOR_9_> only getting 8000 req/s on kemal :(
<FLOOR_9_> going to try a simple http server next
mhib has quit [Remote host closed the connection]
<BlaXpirit> 'only'
<FLOOR_9_> kemal benchmarks show 70k req/s on a single core
<FLOOR_9_> thats what i am reffering to
Dreamer3 has joined #crystal-lang
<FLOOR_9_> alright
<FLOOR_9_> the sample http server show 60.000 req/s
<FLOOR_9_> average latency per response is : 168.76us
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<FLOOR_9_> wihout the --release command, it show about 31.000 with a avg latency of 3ms
<FLOOR_9_> not bad
trapped has joined #crystal-lang
<FLOOR_9_> default http server supports http pipelinging to i see
<FLOOR_9_> http pipelining benchmark coming up
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<FLOOR_9_> found a bug in the http server
<FLOOR_9_> when sending a http pipelined request, the server response with the appropriate response but keep the connection open when sending a connection close header
<FLOOR_9_> cancel that, there was a sleep command in the example script
trapped has joined #crystal-lang
<FLOOR_9_> benchmark default http server on crystal, shows 750 req/s with a http pipelined benchmark
<FLOOR_9_> http pipeline benchmark 2, with 1000 connections , shows 57.000 req/s and a
<FLOOR_9_> Unhandled exception:
<FLOOR_9_> Error writing file: Broken pipe (Errno)
<FLOOR_9_> Unhandled exception:
<FLOOR_9_> Error writing file: Broken pipe (Errno)
<FLOOR_9_> Unhandled exception:
<FLOOR_9_> Error writing file: Broken pipe (Errno)
<FLOOR_9_> Unhandled exception:
<FLOOR_9_> Error writing file: Broken pipe (Errno)
<FLOOR_9_> Error writing file: Broken pipe (Errno)
<FLOOR_9_> Error writing file: Broken pipe (Errno) error
<FLOOR_9_> oops
<FLOOR_9_> (the chatclient i am using , doesn't show multiline pastes) instead it just shows nothing, sorry for the flood
<aemadrid> so, has anybody built a multi-threaded web server in Crystal?
<aemadrid> something like Puma in ruby?
<FLOOR_9_> crystal is of now single threaded
<FLOOR_9_> they are working on it, but it depends on how much time the maintainers have, to work on that feature
<aemadrid> you can use channels so I guess I’m asking: has anybody built a concurrent webserver in Crystal?
<FLOOR_9_> kemal
<FLOOR_9_> have you tried it?
<havenwood> FLOOR_9_: I'm curious if you're running in dev or prod mode?: -e production
<havenwood> FLOOR_9_: What wrk flags?
<aemadrid> looked at Kemal but I believe it is not thread-safe
<aemadrid> and that is what I’m after
<FLOOR_9_> wrk -t1 -s pipeline.lua -c 1000 http://localhost:8080 -- 10
<aemadrid> one, so if some threads/requests take longer they do not make other requests wait
<aemadrid> and two, so one environment does not interfere with the other
<FLOOR_9_> havenwood:if you mean production mode in crystal, as in --release yes
<jhass> aemadrid: HTTP::Server in stdlib is concurrent, it spawns a coroutine for each request
<havenwood> FLOOR_9_: I meant kemal's environment. It's `-e development` by default.
<havenwood> FLOOR_9_: It prints logs to STDOUT and such.
<havenwood> FLOOR_9_: ./kemal_sample -e production
<aemadrid> @jhass from that kemal issue: "Global variable has been deliberately used to indicate a resource whose data might get corrupt due to non thread-safety."
<aemadrid> I have not tried it myself to corroborate but it seems there are issues there
<FLOOR_9_> no i am not running kemal with the -e production option
<havenwood> FLOOR_9_: I suppose not logging at all would be even faster. ;)
<havenwood> Doing nothing is fast!
<FLOOR_9_> haha yes the same applies in nodejs
<jhass> aemadrid: well, atm only one coroutine is active at one point, so in theory thread safety issues on that level shouldn't occur
<FLOOR_9_> havenwood: kemal in production with the -e production flag, produces 30.000 req/s now
<FLOOR_9_> 750 with pipelining on, so there is def something with http pipelining
<FLOOR_9_> anyway without pipelining right now, it's crazy fast, that's on a i5 2.8 ghz HT single core
<FLOOR_9_> and http pipelining is disabled by default on most modern browsers
<FLOOR_9_> btw upping the file descriptor limit in linux, shows almost no effect with default http server
<FLOOR_9_> and if i lower the ulimit , crystal outputs : Error running at_exit handler: Error accepting socket: Too many open files
dylanmei has quit [Read error: Connection reset by peer]
<FLOOR_9_> so we can now conclude, the kernel outputs the message: too many open files
<FLOOR_9_> when reaching the max file descriptor limit
<FLOOR_9_> in linux
<FLOOR_9_> and that the bottleneck is elsewhere and not the max number of open file descriptors in the kernel
<FLOOR_9_> woohoo! :D
<FLOOR_9_> finally making some progress here hah jhass ;-)
Philpax_ has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
<crystal-gh> [crystal] andrewsuzuki opened pull request #1952: Docs - Troubleshooting OSX 10.11 (El Capitan) (gh-pages...patch-1) http://git.io/v0ufT
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
<FLOOR_9_> too bad i have to celebrate this moment of triumpf on my own
<FLOOR_9_> heh heh
wmoxam has quit [Quit: Lost terminal]
pawnbox has quit [Ping timeout: 240 seconds]
<FLOOR_9_> joking of course
<FLOOR_9_> funny thing: the creator of nodejs said in a public viewing that he wasn't good with javascript
<FLOOR_9_> lol!
HakanD_____ has quit [Quit: Be back later ...]
dylanmei has joined #crystal-lang
greengriminal has quit [Quit: Leaving]