00:04
pawnbox has quit [Ping timeout: 272 seconds]
00:09
joshcarter has joined #crystal-lang
00:09
iamstef has quit [Read error: Connection reset by peer]
00:10
iamstef has joined #crystal-lang
00:11
krtv` has quit [Ping timeout: 240 seconds]
00:12
guilleiguaran__ has joined #crystal-lang
00:13
danzilio has joined #crystal-lang
00:25
krtv` has joined #crystal-lang
00:39
Virviil_ has joined #crystal-lang
00:42
Virviil has quit [Ping timeout: 260 seconds]
00:46
elbow-jason has left #crystal-lang [#crystal-lang]
01:35
am__ has quit [Ping timeout: 240 seconds]
02:03
Virviil_ has quit [Ping timeout: 260 seconds]
02:05
pawnbox has joined #crystal-lang
02:09
pawnbox has quit [Ping timeout: 240 seconds]
02:31
g3funk has joined #crystal-lang
02:32
pawnbox has joined #crystal-lang
02:33
g3funk is now known as braidn
02:37
pawnbox has quit [Ping timeout: 250 seconds]
03:00
A124 has quit [Read error: Connection reset by peer]
03:05
A124 has joined #crystal-lang
04:10
pawnbox has joined #crystal-lang
05:23
Philpax has quit [Quit: Leaving]
05:26
Philpax has joined #crystal-lang
05:41
thor77_ has joined #crystal-lang
05:48
omninonsense has joined #crystal-lang
05:49
xAndy| has joined #crystal-lang
05:49
thor77 has quit [*.net *.split]
05:49
thor77_ is now known as thor77
05:56
Veejay has joined #crystal-lang
05:58
onionhammer has joined #crystal-lang
05:59
_junghans_ has joined #crystal-lang
06:07
_junghans_ is now known as _jungh4ns
06:42
Philpax has quit [Ping timeout: 264 seconds]
07:41
trapped has joined #crystal-lang
07:44
pawnbox has quit [Remote host closed the connection]
07:44
pawnbox has joined #crystal-lang
08:06
Philpax has joined #crystal-lang
08:32
pawnbox has quit [Remote host closed the connection]
08:33
pawnbox has joined #crystal-lang
09:56
vifino has joined #crystal-lang
10:10
sooli has joined #crystal-lang
10:11
<
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? )
10:30
<
jhass >
sooli: depends on your preferences really, I like to use systemd there, daemontools before that
10:30
<
jhass >
but any supervisor will do really
10:30
<
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.
10:35
<
jhass >
looks good in principle to me, minor stuff for example I believe StaticArray would be closer to Java's new boolean[5000]
10:36
<
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
10:37
<
BlaXpirit >
oh, searched for the word "release" and that found what i was looking for
10:37
<
BlaXpirit >
good then
10:40
<
smarr >
BlaXpirit: and yes, the binary is built with —release
12:04
trapped has joined #crystal-lang
12:38
pawnbox has quit [Remote host closed the connection]
12:44
pawnbox has joined #crystal-lang
12:45
pawnbox has quit [Remote host closed the connection]
12:46
<
ytti >
i feel like json/yaml mapper should be ability to populate missing keys optionally
12:46
<
ytti >
like if you say key is string, make it "" if it's missing
12:46
<
ytti >
if you say it's aray, make it []
12:47
sdogruyol has joined #crystal-lang
12:47
<
ytti >
why is json and yaml mapper completely different
12:47
<
ytti >
seems like majority of the code could be agnostic
12:48
<
sdogruyol >
how do i pack a in Hex base like this in Ruby -> [data].pack "H*"
12:48
<
jhass >
yaml parsing uses libyaml, the json parser is crystal entirely
12:48
<
sdogruyol >
String*
12:48
<
jhass >
sdogruyol: don't use a String for non-UTF8 data in Crystal
12:49
<
ytti >
jhass, that'll explain it
12:49
<
jhass >
use a Slice or StaticArray most of the time
12:49
<
jhass >
or MemoryIO
12:49
<
sdogruyol >
jhass: what if the input is dynamic and type of String
12:49
<
jhass >
why is it a String?
12:50
<
sdogruyol >
i have to reimplement a weird piece of so called encryption algorithm
12:50
<
sdogruyol >
and most of the time it's concatting a String to another String
12:50
<
jhass >
I bet you could uses MemoryIO or Slice's still
12:50
<
sdogruyol >
and then packing it to Hex
12:51
<
sdogruyol >
let me see
12:51
<
jhass >
Ruby uses String's for binary data, don't copy that pattern over
12:51
<
sdogruyol >
that's why i am asking what to do here :)
12:51
<
jhass >
we almost dropped the bcrypt implementation out of stdlib because it was so broken because it initially did that
12:52
<
jhass >
I don't have enough context still to be more specific than that
12:57
<
jhass >
>> "3470051503201602011544591290506570776903123800000000000000000000".chars.each_slice(2).map {|byte| byte.join.to_i(16) }.to_a # there's probably a much better way by now
12:57
<
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
12:59
<
sdogruyol >
thanks a lot. May i ask why the output is different in Ruby?
12:59
pawnbox has joined #crystal-lang
13:00
<
jhass >
because you're vague about your usecase
13:00
<
jhass >
(the other reasons I explained above)
13:02
<
sdogruyol >
let be me more specific :)
13:02
<
sdogruyol >
hold on a sec
13:05
<
jhass >
why's the input hex?
13:07
<
sdogruyol >
the requirement spec deemed that to be hex
13:13
<
sdogruyol >
more or less i want to port this :P
13:25
<
jhass >
the openssl binding should be fine with taking anything that responds to #bytesize and #[]
13:26
sooli has quit [Quit: sooli]
13:27
sdogruyol has quit [Remote host closed the connection]
13:27
sooli has joined #crystal-lang
13:40
sooli has quit [Quit: sooli]
13:41
sooli has joined #crystal-lang
14:11
sdogruyol has joined #crystal-lang
14:12
renews has joined #crystal-lang
14:12
<
sdogruyol >
yeah that seems fine
14:17
<
crystal-gh >
[crystal] jhass opened pull request #2093: Add Iterator#step to only take every nth element (master...iterator_step)
https://git.io/vgfU1
14:32
<
sdogruyol >
jhass: seems like Slice#hexstring is pretty useful
14:36
<
crystal-gh >
[crystal] maiha opened pull request #2094: Fix typo in Enum.from_value doc (master...fix-typo-enum-doc)
https://git.io/vgfLY
14:44
Philpax has quit [Ping timeout: 240 seconds]
14:47
<
crystal-gh >
[crystal] jhass closed pull request #2094: Fix typo in Enum.from_value doc (master...fix-typo-enum-doc)
https://git.io/vgfLY
14:57
sooli has quit [Quit: sooli]
14:59
sooli has joined #crystal-lang
15:05
sdogruyol has quit [Remote host closed the connection]
15:05
Dreamer3 has joined #crystal-lang
15:10
sdogruyol has joined #crystal-lang
15:14
Acconut has joined #crystal-lang
15:14
<
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.
15:15
<
Acconut >
If no, I would like to submit a patch for that.
15:18
sooli has quit [Quit: sooli]
15:19
sooli has joined #crystal-lang
15:24
<
jhass >
mh, they don't?
15:25
<
crystal-gh >
crystal/master e1ee037 Jonne Haß: Add Iterator#step to only take every nth element
15:25
<
crystal-gh >
crystal/master 3ff9217 Ary Borenszweig: Merge pull request #2093 from jhass/iterator_step...
15:26
<
jhass >
Acconut: I'd say there's some prospect of getting that in
15:26
<
Acconut >
jhass: No, the body argument is String?
15:26
<
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
15:27
<
Acconut >
Great, I have patched it locally but would like to see that in the official repo :)
15:27
<
BlaXpirit >
Acconut, good, i think such changes are important and often overlooked
15:29
<
Acconut >
BlaXpirit: Nice
15:30
<
BlaXpirit >
Acconut, i'm not related to the project though, just my comment :D
15:32
<
Acconut >
BlaXpirit: Haha, but I still agree with your opinion
15:48
sdogruyol has quit [Remote host closed the connection]
15:50
Acconut has quit [Quit: Page closed]
16:01
sdogruyol has joined #crystal-lang
16:01
sdogruyol has quit [Client Quit]
16:13
tomchapin has joined #crystal-lang
16:23
jokke has quit [Quit: WeeChat 1.3]
16:24
jokke has joined #crystal-lang
16:25
<
crystal-gh >
crystal/master 66a6dcb arktisklada: Tuples have reverse_each
16:25
<
crystal-gh >
crystal/master 04845df arktisklada: Arrays can unshift multiple values
16:25
<
crystal-gh >
crystal/master 0a7c84e Ary Borenszweig: Merge pull request #2015 from arktisklada/arrays-can-unshift-multiple-values...
16:26
<
crystal-gh >
crystal/master ac41a05 Ary Borenszweig: Merge pull request #2076 from kostya/master...
16:26
<
crystal-gh >
crystal/master 8a717c6 Konstantin Makarchev: Add :default option to JSON.mapping
16:27
tomchap__ has joined #crystal-lang
16:28
slash_quit is now known as slash_join
16:29
Excureo has joined #crystal-lang
16:30
tomchapin has quit [Ping timeout: 256 seconds]
16:31
<
jokke >
had a long break writing anything serious in crystal. felt good coming back again :)
16:53
tomchapin has joined #crystal-lang
16:56
tomchap__ has quit [Ping timeout: 248 seconds]
16:57
A124 has quit [Quit: '']
17:04
<
crystal-gh >
crystal/master 009792d Ary Borenszweig: Fixed zlib inflate error handling
17:04
A124 has joined #crystal-lang
17:05
<
sooli >
Does bcrypt is still slow within crystal ?
17:05
<
sooli >
it looks slower than Ruby implementation
17:07
<
ytti >
isn't mri bcrypt just C
17:08
<
sooli >
ok it took about 2s to create a new key :/
17:09
<
sooli >
password = Crypto::Bcrypt::Password.create("super secret", cost: 10)
17:14
<
sooli >
reducing cost to 4 looks ok … not sure about security
17:19
<
jhass >
you want a cost that is still reasonably slow on the fastest implementation you can find
17:19
<
jhass >
that's what you steer, how fast it can be brute forced
17:21
<
sooli >
but the Ruby version is faster with the same cost !
17:26
<
jhass >
yes we could use some optimizations
17:26
<
jhass >
btw you do check in release mode, right?
17:34
shama has joined #crystal-lang
17:53
<
rkeene >
Is there any way to do a reasonable cross-platform bootstrap of Crystal ?
18:02
arian0n- is now known as arian0n
18:03
arian0n has quit [Quit: get trikt m8]
18:04
arian0n has joined #crystal-lang
18:13
akaiiro has joined #crystal-lang
18:14
Sadin has joined #crystal-lang
18:17
sooli has quit [Quit: sooli]
18:28
waj_ has joined #crystal-lang
18:29
waj_ has left #crystal-lang [#crystal-lang]
18:30
arian0n has quit [Quit: get trikt m8]
18:36
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:36
tomchapin has joined #crystal-lang
18:39
tomchapin has quit [Client Quit]
18:39
Sadin has quit [Ping timeout: 250 seconds]
18:41
arianon has joined #crystal-lang
18:42
arianon is now known as arian0n
18:46
vluft has joined #crystal-lang
18:56
<
pleiosaur >
does crystal allow you to put explicit types on function parameters? I've only ever seen function signatures that leave the types off
18:57
<
pleiosaur >
asterite: thanks :)
19:00
akaiiro has quit [Ping timeout: 240 seconds]
19:05
sooli has joined #crystal-lang
19:10
<
BlaXpirit >
cuz why read the docs
19:21
pawnbox has quit [Remote host closed the connection]
19:28
sooli has quit [Ping timeout: 252 seconds]
19:32
pawnbox has joined #crystal-lang
19:36
pawnbox has quit [Ping timeout: 246 seconds]
19:37
<
crystal-gh >
[crystal] Acconut opened pull request #2096: Accept IO objects as HTTP request bodies (master...feat/http_body_io)
https://git.io/vgJn0
19:55
thor77 has quit [Quit: Huh, that shouldn't happen]
20:01
thor77 has joined #crystal-lang
20:01
tomchapin has joined #crystal-lang
20:02
Renich has joined #crystal-lang
20:03
tomchapin has quit [Client Quit]
20:06
tomchapin has joined #crystal-lang
20:41
tomchapin has quit [Read error: Connection reset by peer]
20:42
tomchapin has joined #crystal-lang
20:46
fowlduck has joined #crystal-lang
20:48
arian0n has quit [Quit: WeeChat 1.1.1]
20:48
arianon has joined #crystal-lang
20:59
arianon is now known as arian0n
20:59
arian0n has quit [Quit: WeeChat 1.1.1]
21:18
Philpax has joined #crystal-lang
21:32
Philpax has quit [Ping timeout: 250 seconds]
21:44
Renich has quit [Ping timeout: 276 seconds]
21:44
Renich has joined #crystal-lang
22:01
Renich has quit [Read error: Connection reset by peer]
22:21
pawnbox has joined #crystal-lang
22:25
pawnbox has quit [Ping timeout: 264 seconds]
22:36
<
crystal-gh >
[crystal] asterite closed pull request #2078: IO encoding supprort (master...encoding)
https://git.io/vzNtd
22:43
am_ has joined #crystal-lang
22:51
am_ has quit [Quit: Leaving]
22:51
am_ has joined #crystal-lang
23:04
smarr has left #crystal-lang [#crystal-lang]
23:10
pawnbox has joined #crystal-lang
23:12
Philpax has joined #crystal-lang
23:15
pawnbox has quit [Ping timeout: 250 seconds]
23:30
trapped has quit [Read error: Connection reset by peer]
23:40
pawnbox has joined #crystal-lang
23:45
pawnbox has quit [Ping timeout: 248 seconds]
23:46
am__ has joined #crystal-lang
23:49
am_ has quit [Ping timeout: 250 seconds]
23:59
buggs has joined #crystal-lang