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]
<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
<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]