jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.4 | Fund Crystals development: http://to.ly/TtGw | 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
shama has quit [Remote host closed the connection]
kulelu88 has quit [Quit: Leaving]
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 244 seconds]
luislavena has quit []
ismaelga has joined #crystal-lang
shadeslayer has quit [Remote host closed the connection]
shadeslayer has joined #crystal-lang
elia has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
lokulin has joined #crystal-lang
lokulin has quit [Changing host]
leafybasil has quit [Read error: Connection reset by peer]
strcmp3 has joined #crystal-lang
strcmp2 has quit [Ping timeout: 244 seconds]
lokulin has quit [Quit: bye!]
ismaelga has quit []
lokulin has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
flaviu has quit [Ping timeout: 264 seconds]
flaviu has joined #crystal-lang
fkchang has quit [Ping timeout: 260 seconds]
mgarciaisaia has quit [Ping timeout: 252 seconds]
willl has quit [Quit: Connection closed for inactivity]
Ox0dea has left #crystal-lang ["WeeChat 1.2"]
<crystal-gh> [crystal] daviswahl opened pull request #1055: Allow Nested and Multiline Ternary Expr (master...nested_multiline_ternary) http://git.io/vYQDp
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 264 seconds]
blue_deref has joined #crystal-lang
leafybasil has joined #crystal-lang
havenwood has joined #crystal-lang
blue_deref has quit [Quit: bbn]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 272 seconds]
dbackeus has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
dbackeus has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 250 seconds]
strcmp3 has quit [Ping timeout: 255 seconds]
Ven has joined #crystal-lang
dbackeus has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
BlaXpirit has joined #crystal-lang
elia has joined #crystal-lang
havenwood has quit [Ping timeout: 240 seconds]
willl has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 264 seconds]
hosiawak has joined #crystal-lang
tliff has quit [Ping timeout: 250 seconds]
miah has quit [Ping timeout: 250 seconds]
tliff has joined #crystal-lang
miah has joined #crystal-lang
leafybasil has joined #crystal-lang
<unshadow_> >> a = [1,2,3]; puts a[3]
<DeBot> unshadow_: IndexOutOfBounds: Index out of bounds - more at http://carc.in/#/r/8s4
<unshadow_> >> a = [1,2,3]; a << 1; puts a[3]
<DeBot> unshadow_: 1 - more at http://carc.in/#/r/8s5
<unshadow_> >> a = [1,2,3]; puts a[3] if a.size >= 4
<DeBot> unshadow_: # => nil - http://carc.in/#/r/8s6
<dbackeus> is there any way of determining private vs public methods inside macro methods?
Kilo`byte has quit [Quit: kilobyte22.de]
Kilo`byte has joined #crystal-lang
<dbackeus> cool
_whitelogger____ has joined #crystal-lang
unshadow has joined #crystal-lang
willl has quit [Ping timeout: 240 seconds]
DeBot has quit [Ping timeout: 240 seconds]
_whitelogger___ has quit [Ping timeout: 240 seconds]
dbackeus has quit [Ping timeout: 240 seconds]
trapped_ has quit [Ping timeout: 240 seconds]
unshadow_ has quit [Ping timeout: 240 seconds]
willl_ is now known as willl
eam has joined #crystal-lang
DeBot has joined #crystal-lang
dbackeus_ has quit [Remote host closed the connection]
unshadow has quit [Ping timeout: 246 seconds]
dscrd has joined #crystal-lang
<dscrd> hey
<dscrd> I'd be interested in following up on https://github.com/manastech/crystal/issues/686
<dscrd> i.e. building Crystal on musl (to get it to run on Alpine etc.)
<dscrd> but have no idea how to go about bootstrapping crystal
<dscrd> any pointers?
unshadow has joined #crystal-lang
dbackeus has joined #crystal-lang
<dbackeus> how come method arguments swallow -> Object but hashes don't? http://play.crystal-lang.org/#/r/8sv
dscrd has quit [Ping timeout: 246 seconds]
_whitelogger____ has joined #crystal-lang
dscrd has joined #crystal-lang
<jhass> dscrd: bin/crystal build --cross-compile "linux i686" src/compiler/crystal.cr --target i686-pc-linux-gnu --release -o crystal32 is how I bootstrapped for a 32bit build
<jhass> that gives you a .o and the command to link it
dscrd has quit [Ping timeout: 240 seconds]
unshadow has quit [Quit: leaving]
dscrd has joined #crystal-lang
hosiawak has quit [Ping timeout: 255 seconds]
<dbackeus> any good ways of seeing how expanded code looks like after macros have been applied?
<jhass> dbackeus: mmh, maybe crystal browser works again
<jhass> you can add {{debug()}} inside a macro to dump it
<dbackeus> where do I find crystal browser?
<dbackeus> debug was helpful!
<jhass> dbackeus: just crystal browser some_code.cr
<jhass> and yeah, that appears to be after macro expansion
<jhass> though doesn't show class level code apparently :/
<dscrd> nothing about bootstrapping, eh? :)
<dscrd> I suppose somebody using freebsd might be interested in this question also
<dscrd> I would guess somebody porting to that platform would have identical troubles
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 264 seconds]
<dscrd> seems like there are quite a lot of old open issues in the tracker
<dscrd> I hope nobody gets insulted if I would go through them a bit
<dscrd> (a bit later when I'm on my own computer)
<jhass> dscrd: seen my reply?
<dscrd> jhass: sorry, missed it due to network cutoffs
<jhass> dscrd: bin/crystal build --cross-compile "linux i686" src/compiler/crystal.cr --target i686-pc-linux-gnu --release -o crystal32 is how I bootstrapped for a 32bit build
<dscrd> ok, so that might work from a system that has both musl and glibc
<dscrd> I'll explore that later today, thank you :)
<dscrd> but then again, I wonder how I can target another libc via that
<dscrd> probably would need a bit more magic
<dscrd> but I'll see if I can figure it out
<dscrd> gotta go now
dscrd has quit [Quit: leaving]
dwahl has quit [Quit: Leaving]
dwahl has joined #crystal-lang
havenwood has joined #crystal-lang
Ven has joined #crystal-lang
luislavena has joined #crystal-lang
vifino has quit [Ping timeout: 246 seconds]
vifino has joined #crystal-lang
endou_ has quit [Read error: Connection reset by peer]
endou has joined #crystal-lang
eam has quit [Ping timeout: 252 seconds]
eam has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
<jhass> asterite: so watcha think, would http://carc.in/#/r/8ue be a fun macro for stdlib?
<BlaXpirit> :o
<BlaXpirit> looks cool
<dwahl> fun or functional?
<BlaXpirit> why not both
<jhass> shouldn't the aim be at both? :P
<jhass> I'd love it as a macro def on Object, but given Crystal doesn't interfere the return type of those :/
<jhass> well or rather I'd like to see something like a mix of macro def and the method_missing macro, dynamically create uniquely (or anonymous) methods for each invocation (or each invocation with a different parameter)
<jhass> would also allow to do instance_variable_get and the like
strcmp1 has joined #crystal-lang
strcmp1 has quit [Remote host closed the connection]
guilleiguaran__ has quit [Remote host closed the connection]
emmanueloga has quit [Remote host closed the connection]
iamstef has quit [Remote host closed the connection]
AckZ has quit [Remote host closed the connection]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
shama has joined #crystal-lang
guilleiguaran__ has joined #crystal-lang
NeverDie has joined #crystal-lang
blue_deref has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
<vifino> Does Crystal have some kind of Timeout library, like Ruby?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
<vifino> jhass: blerch, fair enough.
mgarciaisaia has joined #crystal-lang
iamstef has joined #crystal-lang
AckZ has joined #crystal-lang
jtarchie has quit [Remote host closed the connection]
n1ftyn8_ has quit [Read error: Connection reset by peer]
endou___________ has quit [Remote host closed the connection]
emmanueloga has joined #crystal-lang
<asterite> jhass: clever macro. But I'm not sure long chains are common enough for adding that to the std (plus maybe compile errors will be worse)
<jhass> any thought on the latter comment/idea?
n1ftyn8_ has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
endou___________ has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
<jhass> any twitter user wants to suggest @github to include Crystal into https://github.com/showcases/programming-languages ? :P
<adam12> Any idea what would be involved in that?
<jhass> write a tweet?
jtarchie has joined #crystal-lang
elia has joined #crystal-lang
<wmoxam> the language has to be at least as popular as IO
<adam12> Ooops - I glazed over most of what you said.
<wmoxam> ;)
<wmoxam> O_o
<BlaXpirit> yeah this is needed
<jhass> <3 thanks
blue_deref has quit [Quit: bbn]
blue_deref has joined #crystal-lang
strcmp1 has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
luislavena has quit []
mgarciaisaia has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
Ven has quit [Ping timeout: 246 seconds]
Guest80519 has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
sdogruyol has joined #crystal-lang
<sdogruyol> hey guys
<sdogruyol> is there a way to utilize more than 1 thread for Channels?
<jhass> that's planned as an automatic language level feature (=managed for you), but for now it's single threaded
<jhass> see /topic for what you need to do to make it happen faster :P
<sdogruyol> jhass: hey thanks for the answere which topic ?
<jhass> /topic
<jhass> try to say that ;)
<sdogruyol> ah lol
<sdogruyol> i've already supported crystal :)
<jhass> ah, great and thank you <3
<sdogruyol> jhass: you can see me there :D
<jhass> yeah
<sdogruyol> jhass: i try to spread the word on everywhere twitter, local user groups, by mouth e.g
<sdogruyol> jhass: most of the people dont even know that something cool as crystal exists and they got a wow effect lol
<jhass> hehe yeah
<sdogruyol> jhass: guess we need more pr stuff :|
<jhass> yeah, a bit more couldn't hurt
<sdogruyol> jhass: we need to get to more rubyists :P
<sdogruyol> jhass: by comparing amethyst to rails like they did in elixir at first via phoenix
<jhass> well, if you got a blogpost like that posting it to rubyflow.com would be good
<sdogruyol> jhass: i'm thinking about writing one soon
<jhass> that's cool
<sdogruyol> jhass: currently i'm trying to write a http benchmark tool like wrk
<jhass> ah, that's going to be tricky with the current version :/
<sdogruyol> jhass: i'm using channels but with 1 thread it cant max out the http server like wrk do :(
<jhass> maybe try with forks?
<sdogruyol> jhass: here's the repo https://github.com/Sdogruyol/cryload
<sdogruyol> jhass: how can i accomplish that with forks?
<jhass> well, you'd basically spawn the tool n times concurrently
<jhass> >> pid = fork do puts "Hello from a subprocess"; end; puts pid
<DeBot> jhass: 69 - more at http://carc.in/#/r/8vn
<jhass> >> pid = fork do puts "Hello from a subprocess"; end; puts pid; Process.waitpid pid
<DeBot> jhass: 69 - more at http://carc.in/#/r/8vo
<sdogruyol> jhass: hmm that makes sense
<jhass> note it copies the process, so you'd need IO.pipe or similar to communicate
elia has joined #crystal-lang
<sdogruyol> jhass: now that makes it more complex :)
<jhass> yes :/
<sdogruyol> jhass: why is it single-threaded anyway do we have some mutex on channels?
<jhass> no, the scheduler simply doesn't spawn any threads to run the fibers in parallel yet
<sdogruyol> jhass: this?
<jhass> yeah
<sdogruyol> is this multithreaded event loop?
<jhass> no it's not, which is what I'm getting at
<jhass> if you'd want to use threads on your own and IO in them, you'd have to go back to Crystal 0.6.1, which is prior the evented IO stuff
<sdogruyol> jhass: no i dont wanna use threads i just wanna have channels which utilizes all the cpu juice :D
<sdogruyol> jhass: like go's
<jhass> yes, as said that's the plan forward, just not there yet
<sdogruyol> jhass: hope so. But is that possible with a single threaded event loop?
<jhass> I haven't looked at libevent2, but wouldn't be surprised if it has interfaces to make it possible
<sdogruyol> jhass: wonder how go achieves that :|
<sdogruyol> jhass: guess their scheduler is pretty neat
<asterite> I think it doesn't matter if there's a single thread
<asterite> when IO blocks, the runtime schedules that fiber for later, so you can have IO concurrency with one thread
<asterite> and if this is a benchmarking tool that will do multiple requests "in parallel", it'll work fine (I think): when a request blocks, another will start, then it'll block, another will finish and the code will resume, etc.
<sdogruyol> asterite: hey thanks for the answer. I'm trying to write a http benchmark tool with channels and theoritically you are right about waiting
<asterite> But in practice it's slow?
<sdogruyol> asterite: yeah
<sdogruyol> asterite: or i maybe doing something utterly wrong :)
<sdogruyol> asterite: to compare i use wrk. For example the one i wrote in crystal does like 7k rps. wrk performs more than 10x at around 70-80k rps
<sdogruyol> asterite: meanwhile the server is a simple hello world server written crystal :)
<asterite> Yes, I'm currently seeing same results on my machine
<sdogruyol> asterite: what are you using for crystal
<asterite> sdogruyol: text editor?
<sdogruyol> asterite: ah i meant how did you compare the results on your machine
<asterite> Oh, hello world server in crystal, but using ab instead of wrk
<sdogruyol> asterite: ah i see :)
<asterite> If I create an HTTP::Client and then use that same client for the requests, I get about 20_000 req/s
<asterite> instead of 2_000 req/s
<asterite> So, HTTP::Client.get will open a socket and close it, each time
<asterite> not sure what ab/wrk do
<asterite> I have it checked out in my machine :-)
<sdogruyol> asterite: oh that's great and you get 20k rps :O
<asterite> Obviously you have to dehardcode that, probably using URI.parse and then using host/port and full_path... let me try
<sdogruyol> asterite: wow single http client great :)
<sdogruyol> asterite: thanks a lot
<asterite> Like this it seems to work: https://gist.github.com/asterite/d4b53b1c6c3f1e7ad06c :-)
<asterite> Now I get similar results to ab. Mmm... a bit faster using the new-fibers branch (does context switch with inline asm). Probably there are other things to optimize
<sdogruyol> asterite: it works like a charm <3 You rock :)
<sdogruyol> asterite: now i'm getting nearly 30k rps
<asterite> Awesome! I wonder what will happen once we have multiple threads running those fibers
<sdogruyol> asterite: i cant even imagine that :P
<sdogruyol> asterite: btw ary what shall i do if i dont want to pass anything between channels like i do now
<asterite> One option is to use Channel(Nil) and send.nil. Another option would be to write a wrapper around channel, probably a struct so it's lightweight. I can imagine something like that in the std
<sdogruyol> asterite: is there any performance difference between Channel(Int32) and Channel(Nil)
<asterite> I don't know, I'll have to benchmark it
<sdogruyol> asterite: okay
<sdogruyol> asterite: thanks a lot :)
<asterite> sdogruyol: thanks for your support and the nice cryload project :)
<sdogruyol> asterite: you're welcome :) Wish i could do more
<BlaXpirit> so
<BlaXpirit> are there any new tutorials for crystal?
<jhass> a talk or two
<jhass> check the subreddit :P
<BlaXpirit> I feel helpless and see no way to extensively learn Crystal
<jhass> mmh, well I always need a project to do
<BlaXpirit> the talks are just very basics and showcases
<BlaXpirit> 0 documentation for majority of functions sucks :/
<jhass> heh, that's not true anymore
<jhass> but if that's your issue: how about contributing documentation?
<BlaXpirit> it sure is true
<jhass> makes you read through stdlib and figure out what they do
<BlaXpirit> jhass, haha if i have trouble understanding then how can i document it
<jhass> try it
<jhass> ask your questions here
<BlaXpirit> also: writing documentation is one of my most hated things
<jhass> right, still a low hanging fruit
havenwood has quit [Read error: Connection reset by peer]
<BlaXpirit> nono, writing documentation for a stdlib that was inspired by ruby is much better done by a rubyist
<jhass> well, if you read ruby's stdlib docs you'd maybe think otherwise :P
<sdogruyol> BlaXpirit: most of the time i read the rubydocs lol
<jhass> I mean it's still only documented to 75%
<BlaXpirit> i took a bit of time to remember ruby
<BlaXpirit> but i have 0 interest in using it
<sdogruyol> BlaXpirit: what's your language of choice then
<BlaXpirit> Crystal :p
<BlaXpirit> well it's the language i'm betting on
<sdogruyol> BlaXpirit: that's a good one
<BlaXpirit> normally I use Python
<sdogruyol> BlaXpirit: but arent you using anything other than crystal
<sdogruyol> BlaXpirit: now that's rare to hear :P
<sdogruyol> BlaXpirit: a python dev who doesnt like to write docs
<jhass> haha
<jhass> yeah, I always have a feeling of missing the point in the wall of text that are python docs :P
<sdogruyol> jhass: hahah wall of text nice one :D
<sdogruyol> btw guys
<sdogruyol> what do you do for cross compiling crystal e.g from mac to linux
<jhass> BlaXpirit: my advice stands, pick a project, before implementing something that could be a method in stdlib look if you find something and/or just ask here
<jhass> dscrd: bin/crystal build --cross-compile "linux i686" src/compiler/crystal.cr --target i686-pc-linux-gnu --release -o crystal32 is how I bootstrapped for a 32bit build
<jhass> er, disregard the dscrd:, still had it in my history :P
<sdogruyol> jhass: oh let me try it for 64 bit
<jhass> there's an official 64bit linux tarball
<jhass> and repos for debian/ubuntu and I think rpm too
<sdogruyol> jhass: btw my question was flawed
<sdogruyol> jhass: i meant i want to cross compile my crystal project from mac to linux
<jhass> uh
<jhass> well above will work too
<jhass> though just getting a VM and a native crystal compiler in there is probably easier
<sdogruyol> jhass: why?
<jhass> you'll have to install all the dependencies anyway, so it's git clone your_project; crystal build ...; vs crystal build --cross-compile ...; scp ...; copy linker invocation; ssh ...; paste linker invocation
<jhass> btw there's no other channel traffic, no need to highlight with every message ;)
<sdogruyol> jhass: ah that's a habit of mine :| I use slack, hipchat a lot lol
nahtnam has joined #crystal-lang
<sdogruyol> jhass: why do i have to install all the dependencies and what do you mean by all?
<jhass> so you can link against them
<sdogruyol> jhass: oh
<jhass> the linking is still done at the target, since your system doesn't have the libraries to link against
<sdogruyol> jhass: dont we statically link them into one single binary :O
<jhass> nope
<sdogruyol> jhass: now i learnt it :P
<jhass> and even if we did that would change nothing about it
<dbackeus> on the subject of single threaded... any tips for a simple / extremely fast load balancer to hit multiple crystal http server processes?
<sdogruyol> jhass: how golang does that then :S
<jhass> the other path is to download all the libraries for the target system to your host... which is an even greater hassle
<sdogruyol> jhass: oh
<jhass> I never used Go, let alone crosscompiled with it
<jhass> doubt they do it any differently
<sdogruyol> jhass: that's what i do for crosscompiling go stuff
<sdogruyol> jhass: :D
<sdogruyol> jhass: dl all the target builds and then cross compile
<jhass> dbackeus: the usual stuff should be fine, nginx, ha-proxy
<sdogruyol> dbackeus: haproxy
<sdogruyol> jhass: btw go sucks as a language i dont like it
<jhass> yeah, I suspect Crystal is the language the Rubyists migrating to Go actually wanted :P
<sdogruyol> jhass: hahahah that's right :D
<sdogruyol> jhass: i'm gonna quote this on twitter :P
<sdogruyol> jhass: what's your twitter handle
<thor77> http://pastie.org/private/w8kesrcumt8tk6madhtq hey, i have this project-structure, i want to create a new class "Bot" and inherit from CrystalIRC::Connection
<jhass> not important, I don't actively use it
<sdogruyol> jhass: :(
<thor77> "class Bot < CrystalIRC::Connection" => undefined constant Connection
<jhass> thor77: try a require "./crystal_irc/*" in crystal_irc.cr
<jhass> and then require that one
<thor77> this line is already present in crystal_irc.cr
<jhass> thor77: oh, I didn't notice you put it inside the project
<jhass> make sure to force load order then, add require "./connection" to bot.cr
<thor77> it works \o/
<asterite> BlaXpirit: there are new small tutorial almost every couple of days http://qiita.com/search?utf8=%E2%9C%93&q=crystal&sort=created
<jhass> lol
<BlaXpirit> asterite, uhhhhh
<sdogruyol> japanese
<sdogruyol> asterite: do you know japanese maybe?
<BlaXpirit> wat
<jhass> sdogruyol: well, every good rubyist should, after all the official docs are still japanese only :P
<asterite> Oh, I'm just surprised that we have more blog posts about Crystal in Japanese than in English
<sdogruyol> jhass: yeah you are right
<asterite> We (me and waj) definitely need to write more docs, it's hard to document something you don't know how it work
<asterite> s
<sdogruyol> i know japanese and those are mostly like questions :P
<sdogruyol> asterite: ruby is from japan and the ruby ecosystem is really strong there so
<sdogruyol> oh my god someone posted about my repo lol http://qiita.com/akishin/items/ed2353981f30b868756b
<asterite> Haha, nice!
<sdogruyol> asterite: i'll try to find some good tutorial if there's any :P
<sdogruyol> if anything interesting happens i'll try to post to this site in japanese
<asterite> sdogruyol: are you fluent in japanese?
<sdogruyol> asterite: yes
<asterite> how?
<sdogruyol> asterite: like i can talk to japanese people without even any accent :P
<sdogruyol> asterite: and they mistook me for a japanese
<sdogruyol> :D
<asterite> :-O
<asterite> Did you took classes?
<asterite> I definitely didn't take English classes, given that last question :-(
<sdogruyol> asterite: well i just took introductory classes for half a year and then self studied
<sdogruyol> asterite: lol your english is really OK
<asterite> How did you self studied? I'm asking because I also took japanese classes, but they weren't good and I don't know how to self study it... or what's the best way to do it
<sdogruyol> asterite: well let me see
<dbackeus> haproxy loadbalanced over 4 server instances: 14 000 req/sec
<dbackeus> vs
<dbackeus> 1 server instance = 40 000 req/sec
<sdogruyol> asterite: i always demanded additional resources from my teacher and started learning kanji from kindergarden books
<sdogruyol> asterite: and then i studied kanji each day
<dbackeus> guess haproxy is the bottleneck :/
<sdogruyol> dbackeus: you need to configure it properly :P
<sdogruyol> asterite: i also had lots of japanese friends online and talked with them a lot
<dbackeus> sdogruyol: here's the config I used: https://gist.github.com/dbackeus/7a3ca93acd4071df2651
<dbackeus> pretty much copy pasted from https://serversforhackers.com/load-balancing-with-haproxy
<sdogruyol> dbackeus: i'm not sure if roundrobin is best for your case
<dbackeus> you mean there are other ways which are faster for haproxy?
<dbackeus> roundrobin seems like a pretty straight forward algorithm :P
<sdogruyol> dbackeus: yeah there are :P
<sdogruyol> dbackeus: you have to read :P
<sdogruyol> dbackeus: if not you can try nginx
<sdogruyol> dbackeus: it's much more easier
<dbackeus> I'm really just looking to see how many rps I could get of crystal could utilise all of the cores, easiest possible one liner load balancer would do ;)
<dbackeus> thanks, I'll give it a shot tomorrow
<sdogruyol> dbackeus: the thing is that if your load balancer is on the same maching as your servers then it's pointless :D
<dbackeus> not necessarily, take the difference between Express and Express Cluster here for example: https://github.com/mroth/phoenix-showdown/blob/master/RESULTS_v2.md
<dbackeus> javascript also gets bottlenecked by being single threaded
<dbackeus> so by balancing out over multiple processes they get 3 times the throughput (on a single node)
<sdogruyol> dbackeus: that's not what i meant
<sdogruyol> dbackeus: what's your benchmark setup? That is what i am talking about
<dbackeus> I'm using wrk with the same settings as in those benchmarks: wrk -t4 -c100 -d30S --timeout 2000
<sdogruyol> dbackeus: that's okay but you run wrk on the same server as your load balancer and crystal servers
<sdogruyol> dbackeus: that's the problem :D
<sdogruyol> dbackeus: and you give 4 threads to wrk :P
<dbackeus> agreed, not ideal :P
<sdogruyol> dbackeus: :)
sdogruyol has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
<thor77> uhm. where can i find doc about sock.gets? can it automatically replace utf-8-errors?
<jhass> probably not
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
<jhass> it's IO#gets, no docs for it yet apparently
<thor77> :(
<thor77> so i should just rescue the exception
<NeverDie> Ooo crystal is growing.
dwahl has quit [Ping timeout: 252 seconds]
elia has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 240 seconds]
waj has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
mgarciaisaia has quit [Quit: Leaving.]
waj has quit [Quit: waj]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 272 seconds]
blue_deref has quit [Quit: bbn]
elia has quit [Quit: Computer has gone to sleep.]
PotatoCrisps has joined #crystal-lang
elia has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
PotatoCrisps has quit [Remote host closed the connection]
trapped_ has joined #crystal-lang
trapped has quit [Ping timeout: 244 seconds]
trapped_ has quit [Ping timeout: 250 seconds]
trapped_ has joined #crystal-lang
havenwood has joined #crystal-lang