jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.11.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
pawnbox has quit [Ping timeout: 272 seconds]
joshcarter has joined #crystal-lang
iamstef has quit [Read error: Connection reset by peer]
iamstef has joined #crystal-lang
krtv` has quit [Ping timeout: 240 seconds]
guilleiguaran__ has joined #crystal-lang
danzilio has joined #crystal-lang
krtv` has joined #crystal-lang
Virviil_ has joined #crystal-lang
Virviil has quit [Ping timeout: 260 seconds]
elbow-jason has left #crystal-lang [#crystal-lang]
am__ has quit [Ping timeout: 240 seconds]
Virviil_ has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
g3funk has joined #crystal-lang
pawnbox has joined #crystal-lang
g3funk is now known as braidn
pawnbox has quit [Ping timeout: 250 seconds]
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Quit: Leaving]
Philpax has joined #crystal-lang
thor77_ has joined #crystal-lang
omninonsense has joined #crystal-lang
xAndy| has joined #crystal-lang
thor77 has quit [*.net *.split]
thor77_ is now known as thor77
Veejay has joined #crystal-lang
onionhammer has joined #crystal-lang
_junghans_ has joined #crystal-lang
_junghans_ is now known as _jungh4ns
Philpax has quit [Ping timeout: 264 seconds]
trapped has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
Philpax has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
vifino has joined #crystal-lang
sooli has joined #crystal-lang
<sooli> Hi there, just a question about crystal + kemal, what is the best way to run it on server (how to monitor processes if any failure? )
<jhass> sooli: depends on your preferences really, I like to use systemd there, daemontools before that
<jhass> but any supervisor will do really
<smarr> Hi, I ported a number of benchmarks that are implemented as literal identical as possible on a range of dynamic languages to Crystal, the put the results online here: http://stefan-marr.de/downloads/crystal.html Would be interested in comments, on whether that is helpful in any way. Or whether you have concerns with respect to the meaningfulness of these results. The main goal is to evaluate the effectiveness of the compiler.
<jhass> looks good in principle to me, minor stuff for example I believe StaticArray would be closer to Java's new boolean[5000]
<BlaXpirit> smarr, this is the most obscure benchmark i've seen. been browsing through the files and still have no clue what's actually being run
<BlaXpirit> oh, searched for the word "release" and that found what i was looking for
<BlaXpirit> good then
<smarr> BlaXpirit: obscure? There is a harness, that takes command-line parameters: https://github.com/smarr/are-we-fast-yet/blob/master/benchmarks/Crystal/harness.cr#L33
<smarr> BlaXpirit: and yes, the binary is built with —release
trapped 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]
<ytti> i feel like json/yaml mapper should be ability to populate missing keys optionally
<ytti> like if you say key is string, make it "" if it's missing
<ytti> if you say it's aray, make it []
sdogruyol has joined #crystal-lang
<jhass> #2076
<DeBot> https://github.com/manastech/crystal/pull/2076 (Add :default option to JSON.mapping)
<ytti> why is json and yaml mapper completely different
<ytti> seems like majority of the code could be agnostic
<sdogruyol> how do i pack a in Hex base like this in Ruby -> [data].pack "H*"
<jhass> yaml parsing uses libyaml, the json parser is crystal entirely
<sdogruyol> String*
<jhass> sdogruyol: don't use a String for non-UTF8 data in Crystal
<ytti> jhass, that'll explain it
<jhass> use a Slice or StaticArray most of the time
<jhass> or MemoryIO
<sdogruyol> jhass: what if the input is dynamic and type of String
<jhass> why is it a String?
<sdogruyol> i have to reimplement a weird piece of so called encryption algorithm
<sdogruyol> and most of the time it's concatting a String to another String
<jhass> I bet you could uses MemoryIO or Slice's still
<sdogruyol> and then packing it to Hex
<sdogruyol> let me see
<jhass> Ruby uses String's for binary data, don't copy that pattern over
<sdogruyol> that's why i am asking what to do here :)
<jhass> we almost dropped the bcrypt implementation out of stdlib because it was so broken because it initially did that
<jhass> I don't have enough context still to be more specific than that
<jhass> >> "3470051503201602011544591290506570776903123800000000000000000000".chars.each_slice(2).map {|byte| byte.join.to_i(16) }.to_a # there's probably a much better way by now
<DeBot> jhass: # => [52, 112, 5, 21, 3, 32, 22, 2, 1, 21, 68, 89, 18, 144, 80, 101, 112, 119, 105, 3, 18, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - https://carc.in/#/r/r2b
<sdogruyol> thanks a lot. May i ask why the output is different in Ruby?
pawnbox has joined #crystal-lang
<jhass> because you're vague about your usecase
<jhass> (the other reasons I explained above)
<sdogruyol> let be me more specific :)
<sdogruyol> hold on a sec
<jhass> why's the input hex?
<sdogruyol> the requirement spec deemed that to be hex
<sdogruyol> more or less i want to port this :P
<jhass> the openssl binding should be fine with taking anything that responds to #bytesize and #[]
sooli has quit [Quit: sooli]
sdogruyol has quit [Remote host closed the connection]
sooli has joined #crystal-lang
sooli has quit [Quit: sooli]
sooli has joined #crystal-lang
sdogruyol has joined #crystal-lang
renews has joined #crystal-lang
<sdogruyol> yeah that seems fine
<crystal-gh> [crystal] jhass opened pull request #2093: Add Iterator#step to only take every nth element (master...iterator_step) https://git.io/vgfU1
<jhass> https://carc.in/#/r/r2y played a bit
renews has quit []
<sdogruyol> jhass: seems like Slice#hexstring is pretty useful
<crystal-gh> [crystal] maiha opened pull request #2094: Fix typo in Enum.from_value doc (master...fix-typo-enum-doc) https://git.io/vgfLY
Philpax has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] jhass closed pull request #2094: Fix typo in Enum.from_value doc (master...fix-typo-enum-doc) https://git.io/vgfLY
<travis-ci> manastech/crystal#5839f3b (master - Merge pull request #2094 from maiha/fix-typo-enum-doc): The build passed. https://travis-ci.org/manastech/crystal/builds/106228358
<DeBot> https://github.com/manastech/crystal/pull/2094 (Fix typo in Enum.from_value doc)
sooli has quit [Quit: sooli]
sooli has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
Dreamer3 has joined #crystal-lang
sdogruyol has joined #crystal-lang
Acconut has joined #crystal-lang
<Acconut> Hi there, I am wondering if there is a reason why the HTTP::Client.exec methods do not accept IO object but only String as a body.
<Acconut> If no, I would like to submit a patch for that.
sooli has quit [Quit: sooli]
sooli has joined #crystal-lang
<jhass> mh, they don't?
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vgfnB
<crystal-gh> crystal/master e1ee037 Jonne Haß: Add Iterator#step to only take every nth element
<crystal-gh> crystal/master 3ff9217 Ary Borenszweig: Merge pull request #2093 from jhass/iterator_step...
<jhass> Acconut: I'd say there's some prospect of getting that in
<Acconut> jhass: No, the body argument is String?
<Acconut> http://crystal-lang.org/api/HTTP/Client.html#exec%28method%2Curl%3AString|URI%2Cheaders%3D%3Cspanclass%3D%22n%22%3Enil%3C%2Fspan%3E%3AHTTP%3A%3AHeaders|Nil%2Cbody%3D%3Cspanclass%3D%22n%22%3Enil%3C%2Fspan%3E%3AString|Nil%29%3AHTTP%3A%3AClient%3A%3AResponse-class-method
<Acconut> Great, I have patched it locally but would like to see that in the official repo :)
<BlaXpirit> Acconut, good, i think such changes are important and often overlooked
<Acconut> BlaXpirit: Nice
<BlaXpirit> Acconut, i'm not related to the project though, just my comment :D
<Acconut> BlaXpirit: Haha, but I still agree with your opinion
<travis-ci> manastech/crystal#3ff9217 (master - Merge pull request #2093 from jhass/iterator_step): The build passed. https://travis-ci.org/manastech/crystal/builds/106238251
<DeBot> https://github.com/manastech/crystal/pull/2093 (Add Iterator#step to only take every nth element)
sdogruyol has quit [Remote host closed the connection]
Acconut has quit [Quit: Page closed]
sdogruyol has joined #crystal-lang
sdogruyol has quit [Client Quit]
tomchapin has joined #crystal-lang
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: https://git.io/vgfaT
<crystal-gh> crystal/master 66a6dcb arktisklada: Tuples have reverse_each
<crystal-gh> crystal/master 04845df arktisklada: Arrays can unshift multiple values
<crystal-gh> crystal/master 0a7c84e Ary Borenszweig: Merge pull request #2015 from arktisklada/arrays-can-unshift-multiple-values...
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vgfas
<crystal-gh> crystal/master ac41a05 Ary Borenszweig: Merge pull request #2076 from kostya/master...
<crystal-gh> crystal/master 8a717c6 Konstantin Makarchev: Add :default option to JSON.mapping
tomchap__ has joined #crystal-lang
slash_quit is now known as slash_join
Excureo has joined #crystal-lang
tomchapin has quit [Ping timeout: 256 seconds]
<jokke> jhass: check it out: https://github.com/jreinert/ketchup
<jokke> had a long break writing anything serious in crystal. felt good coming back again :)
<travis-ci> manastech/crystal#0a7c84e (master - Merge pull request #2015 from arktisklada/arrays-can-unshift-multiple-values): The build was broken. https://travis-ci.org/manastech/crystal/builds/106254952
<DeBot> https://github.com/manastech/crystal/pull/2015 (Arrays can unshift multiple values)
<travis-ci> manastech/crystal#ac41a05 (master - Merge pull request #2076 from kostya/master): The build passed. https://travis-ci.org/manastech/crystal/builds/106255097
<DeBot> https://github.com/manastech/crystal/pull/2076 (Add :default option to JSON.mapping)
tomchapin has joined #crystal-lang
tomchap__ has quit [Ping timeout: 248 seconds]
A124 has quit [Quit: '']
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vgfMR
<crystal-gh> crystal/master 009792d Ary Borenszweig: Fixed zlib inflate error handling
A124 has joined #crystal-lang
<sooli> Does bcrypt is still slow within crystal ?
<sooli> it looks slower than Ruby implementation
<ytti> isn't mri bcrypt just C
<sooli> ok it took about 2s to create a new key :/
<sooli> password = Crypto::Bcrypt::Password.create("super secret", cost: 10)
<sooli> reducing cost to 4 looks ok … not sure about security
<travis-ci> manastech/crystal#009792d (master - Fixed zlib inflate error handling): The build passed. https://travis-ci.org/manastech/crystal/builds/106265340
<jhass> you want a cost that is still reasonably slow on the fastest implementation you can find
<jhass> that's what you steer, how fast it can be brute forced
<sooli> but the Ruby version is faster with the same cost !
<jhass> yes we could use some optimizations
<jhass> btw you do check in release mode, right?
<sooli> yes
shama has joined #crystal-lang
<rkeene> Is there any way to do a reasonable cross-platform bootstrap of Crystal ?
arian0n- is now known as arian0n
arian0n has quit [Quit: get trikt m8]
arian0n has joined #crystal-lang
akaiiro has joined #crystal-lang
Sadin has joined #crystal-lang
sooli has quit [Quit: sooli]
waj_ has joined #crystal-lang
waj_ has left #crystal-lang [#crystal-lang]
arian0n has quit [Quit: get trikt m8]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #crystal-lang
tomchapin has quit [Client Quit]
Sadin has quit [Ping timeout: 250 seconds]
arianon has joined #crystal-lang
arianon is now known as arian0n
vluft has joined #crystal-lang
<pleiosaur> does crystal allow you to put explicit types on function parameters? I've only ever seen function signatures that leave the types off
<asterite> rkeene: there's this: http://crystal-lang.org/docs/syntax_and_semantics/cross-compilation.html , but bootstrapping crystal is more than just compiling in another platform
<pleiosaur> asterite: thanks :)
akaiiro has quit [Ping timeout: 240 seconds]
sooli has joined #crystal-lang
<BlaXpirit> cuz why read the docs
pawnbox has quit [Remote host closed the connection]
sooli has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
vluft has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has quit [Ping timeout: 246 seconds]
<crystal-gh> [crystal] Acconut opened pull request #2096: Accept IO objects as HTTP request bodies (master...feat/http_body_io) https://git.io/vgJn0
thor77 has quit [Quit: Huh, that shouldn't happen]
thor77 has joined #crystal-lang
tomchapin has joined #crystal-lang
Renich has joined #crystal-lang
tomchapin has quit [Client Quit]
tomchapin has joined #crystal-lang
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #crystal-lang
fowlduck has joined #crystal-lang
arian0n has quit [Quit: WeeChat 1.1.1]
arianon has joined #crystal-lang
arianon is now known as arian0n
arian0n has quit [Quit: WeeChat 1.1.1]
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 250 seconds]
Renich has quit [Ping timeout: 276 seconds]
Renich has joined #crystal-lang
Renich has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
<crystal-gh> [crystal] asterite closed pull request #2078: IO encoding supprort (master...encoding) https://git.io/vzNtd
am_ has joined #crystal-lang
<travis-ci> manastech/crystal#5f36cdf (master - Merge pull request #2078 from manastech/encoding): The build passed. https://travis-ci.org/manastech/crystal/builds/106342327
<DeBot> https://github.com/manastech/crystal/pull/2078 (IO encoding supprort)
am_ has quit [Quit: Leaving]
am_ has joined #crystal-lang
smarr has left #crystal-lang [#crystal-lang]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
trapped has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 248 seconds]
am__ has joined #crystal-lang
am_ has quit [Ping timeout: 250 seconds]
buggs has joined #crystal-lang