00:04
pawnbox has quit [Ping timeout: 260 seconds]
00:10
pawnbox has joined #crystal-lang
00:16
pawnbox has quit [Ping timeout: 250 seconds]
00:21
pawnbox has joined #crystal-lang
00:28
pawnbox has quit [Ping timeout: 244 seconds]
00:33
pawnbox has joined #crystal-lang
00:37
onethirtyfive has joined #crystal-lang
00:40
pawnbox has quit [Ping timeout: 260 seconds]
00:45
pawnbox has joined #crystal-lang
00:52
pawnbox has quit [Ping timeout: 244 seconds]
01:00
pawnbox has joined #crystal-lang
01:05
pawnbox has quit [Ping timeout: 244 seconds]
01:10
pawnbox has joined #crystal-lang
01:17
pawnbox has quit [Ping timeout: 260 seconds]
01:22
pawnbox has joined #crystal-lang
01:28
onethirtyfive has quit [Remote host closed the connection]
01:28
pawnbox has quit [Ping timeout: 260 seconds]
01:29
eizua has joined #crystal-lang
01:30
onethirtyfive has joined #crystal-lang
01:30
onethirtyfive has quit [Remote host closed the connection]
01:32
Philpax has joined #crystal-lang
01:36
pawnbox has joined #crystal-lang
01:40
Philpax has quit [Ping timeout: 260 seconds]
01:41
pawnbox has quit [Ping timeout: 250 seconds]
01:49
pawnbox has joined #crystal-lang
01:53
pawnbox has quit [Ping timeout: 260 seconds]
01:59
pawnbox has joined #crystal-lang
02:01
mrslowly has joined #crystal-lang
02:01
<
mrslowly >
is there a way to instantiate a 2D array in Crystal?
02:05
pawnbox has quit [Ping timeout: 244 seconds]
02:13
pawnbox has joined #crystal-lang
02:18
pawnbox has quit [Ping timeout: 268 seconds]
02:23
pawnbox has joined #crystal-lang
02:30
pawnbox has quit [Ping timeout: 260 seconds]
02:30
onethirtyfive has joined #crystal-lang
02:35
onethirtyfive has quit [Ping timeout: 248 seconds]
02:35
pawnbox has joined #crystal-lang
02:42
pawnbox has quit [Ping timeout: 260 seconds]
02:50
pawnbox has joined #crystal-lang
02:53
pawnbox_ has joined #crystal-lang
02:54
pawnbox has quit [Ping timeout: 244 seconds]
02:59
<
willl >
> Array(Array(Int32)).new
02:59
<
willl >
oops I forgot how to do debot
02:59
pawnbox_ has quit [Ping timeout: 260 seconds]
03:11
pawnbox has joined #crystal-lang
03:16
kulelu88 has quit [Quit: Leaving]
03:33
onethirtyfive has joined #crystal-lang
03:37
onethirtyfive has quit [Ping timeout: 260 seconds]
03:48
bjz has quit [Ping timeout: 268 seconds]
04:28
pawnbox has quit [Remote host closed the connection]
04:28
pawnbox has joined #crystal-lang
04:38
pawnbox has quit [Remote host closed the connection]
04:38
pawnbox has joined #crystal-lang
05:15
bjz has joined #crystal-lang
05:50
<
FromGitter >
<raydf> Typo* now should be know the "columns" :)
06:35
onethirtyfive has joined #crystal-lang
06:40
onethirtyfive has quit [Ping timeout: 260 seconds]
06:44
pawnbox has quit [Remote host closed the connection]
06:45
pawnbox has joined #crystal-lang
06:49
pawnbox has quit [Ping timeout: 260 seconds]
06:58
bjz has quit [Ping timeout: 248 seconds]
06:59
bjz has joined #crystal-lang
07:20
eizua has quit [Read error: Connection reset by peer]
07:25
pawnbox has joined #crystal-lang
07:34
soveran has joined #crystal-lang
07:40
soveran has quit [Ping timeout: 240 seconds]
08:07
soveran has joined #crystal-lang
08:21
pawnbox has quit [Remote host closed the connection]
08:27
pawnbox has joined #crystal-lang
08:37
onethirtyfive has joined #crystal-lang
08:41
<
crystal-gh >
[crystal] ysbaddaden opened pull request #3397: Fix: allow i486 and i586 for target machine ABI (master...fix-i486-i586-targets)
https://git.io/vPBsm
08:41
onethirtyfive has quit [Ping timeout: 240 seconds]
08:46
<
BlaXpirit >
1000000 times I increment one of the indices in an array
08:46
<
FromGitter >
<benoist> overflow?
08:46
<
BlaXpirit >
and then the sum of the array is 1007381
08:48
<
BlaXpirit >
well I don't think it is overflow
08:49
<
FromGitter >
<benoist> oh right I see what you mean ;)
08:51
<
BlaXpirit >
but do you see what's wrong? :o
08:51
<
FromGitter >
<benoist> I’m trying to figure it out :)
08:54
<
BlaXpirit >
i got it. it calls yield twice per go
08:55
<
FromGitter >
<benoist> yep :)
08:56
<
BlaXpirit >
>> def f; p rand(); end; [0][0] = 0
08:56
<
BlaXpirit >
uh wait what
08:56
<
BlaXpirit >
>> def f; p 0; end; [0][f] = 7
08:56
<
BlaXpirit >
this one prints once, ok
08:59
<
FromGitter >
<benoist> this works
08:59
<
BlaXpirit >
doesnt need yield, it's all about +=
08:59
<
FromGitter >
<benoist> which is logical
08:59
<
BlaXpirit >
benoist, yes, thanks. i just moved on to full-on reproduce mode :)
09:00
soveran has quit [Remote host closed the connection]
09:00
<
FromGitter >
<benoist> bucket[yield] = bucket[yield] + 1
09:00
<
BlaXpirit >
yes but i think this should not happen. you type += after all
09:00
<
FromGitter >
<benoist> thats just syntactic sugar
09:00
<
FromGitter >
<benoist> same in ruby i believe
09:01
<
BlaXpirit >
it should be t = yield; bucket[t] = bucket[t] + 1
09:01
<
BlaXpirit >
and ruby executes the subexpression once like that and gives correct result
09:04
<
FromGitter >
<benoist> Ah yes correct
09:14
soveran has joined #crystal-lang
09:14
soveran has joined #crystal-lang
09:14
soveran has quit [Changing host]
09:16
eizua has joined #crystal-lang
09:37
pawnbox has quit [Remote host closed the connection]
09:47
pawnbox has joined #crystal-lang
09:51
pawnbox has quit [Ping timeout: 240 seconds]
09:54
pawnbox has joined #crystal-lang
10:09
Ven_ has joined #crystal-lang
10:19
willl has quit [Quit: Connection closed for inactivity]
10:29
soveran has quit [Remote host closed the connection]
10:29
soveran has joined #crystal-lang
10:39
onethirtyfive has joined #crystal-lang
10:44
onethirtyfive has quit [Ping timeout: 260 seconds]
10:53
bjz_ has joined #crystal-lang
10:53
bjz has quit [Ping timeout: 240 seconds]
10:55
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:04
<
RX14 >
what's the code?
11:04
<
RX14 >
do you pass the request?
11:05
<
RX14 >
because the version that takes the request obviously uses the old body object wich is a string
11:06
<
FromGitter >
<sdogruyol> well i've just updated the syntax to work
11:06
<
FromGitter >
<sdogruyol> nothing else
11:16
<
FromGitter >
<sdogruyol> @RX14 so the multipart parser needs to be updated for consuming the IO
11:16
<
RX14 >
well you just need to do it manually
11:17
<
RX14 >
this is what you used, right?
11:17
<
FromGitter >
<sdogruyol> yep
11:17
<
FromGitter >
<sdogruyol> i've updated this to be HTTP::Server::Request
11:17
<
RX14 >
you just need to do that but use body_io
11:17
<
RX14 >
because request.body buffers the whole thing into memory
11:18
<
FromGitter >
<sdogruyol> yeah
11:18
<
FromGitter >
<sdogruyol> let me see
11:20
<
FromGitter >
<sdogruyol> Wow, the memory stay at 1.1 MB or so
11:21
soveran has quit [Remote host closed the connection]
11:21
<
FromGitter >
<sdogruyol> Unfortunately the response time got 4x slower
11:21
<
FromGitter >
<sdogruyol> 6s to 24s
11:23
<
FromGitter >
<sdogruyol> i've commented on the issue
11:43
pawnbox has quit [Remote host closed the connection]
11:53
pawnbox has joined #crystal-lang
11:59
pawnbox has quit [Ping timeout: 260 seconds]
12:08
pawnbox has joined #crystal-lang
12:21
soveran has joined #crystal-lang
12:24
Philpax has joined #crystal-lang
12:26
soveran has quit [Ping timeout: 260 seconds]
12:41
onethirtyfive has joined #crystal-lang
12:45
onethirtyfive has quit [Ping timeout: 260 seconds]
12:50
pawnbox has quit [Remote host closed the connection]
13:03
pawnbox has joined #crystal-lang
13:04
<
FromGitter >
<alex-lairan> Hi guy's ! I have a string like this: "qwerty" and I want to cut this in 3 parts: ["qw", "er", "ty"], how can I do that with a sexy method? :3
13:06
<
FromGitter >
<alex-lairan> I've try to extracts each with length/2 and get the 1,2, then the 3, 4, then the 5, 6, but it take a long amount of lines for nothings
13:06
<
FromGitter >
<alex-lairan> (and it's a bit ugly ^^=
13:09
<
Yxhvd >
>> "qwerty".split(/../)
13:15
<
go|dfish >
you'd want .scan() not .split()
13:16
<
FromGitter >
<alex-lairan> woaw ! thank you !
13:16
<
FromGitter >
<alex-lairan> :)
13:17
<
RX14 >
>> "qwerty".chars.each_slice(2).join
13:17
<
RX14 >
>> "qwerty".chars.each_slice(2).sum("")
13:17
<
RX14 >
>> "qwerty".chars.each_slice(2).each(&.sum)
13:17
<
RX14 >
>> "qwerty".chars.each_slice(2).each(&.join)
13:18
<
RX14 >
>> "qwerty".chars.each_slice(2).map(&.join)
13:18
<
DeBot >
RX14: # => Iterator::Map(Iterator::Slice(Indexable::ItemIterator(Array(Char), Char), Char, Int32), Array(Char), String)(@iterator=Iterator::Slice(Indexable::ItemIterator(Array(Char), Char), Char, Int32)(@iterator=#<Indexable::ItemIterator(Array(Char), Char):0x89aafe0 @array=['q', 'w', 'e', 'r', 't', 'y'], @index=0>, @n=2), @func=#<Proc(Array(Char), Strin ... -
https://carc.in/#/r/1bme
13:18
<
RX14 >
>> "qwerty".chars.each_slice(2).map(&.join).to_a
13:18
<
RX14 >
there you go
13:18
<
FromGitter >
<alex-lairan> ^^
13:18
<
FromGitter >
<alex-lairan> thank you too ! :)
13:19
<
RX14 >
regex is quite slow
13:19
<
RX14 >
so try not to use that
13:22
<
FromGitter >
<alex-lairan> Okay ! :)
13:22
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
13:23
soveran has joined #crystal-lang
13:25
bjz has joined #crystal-lang
13:25
Ven_ has joined #crystal-lang
13:26
<
RX14 >
honestly with that I would just have used r = [1..2].to_i(16) etc
13:26
<
RX14 >
if you've got a known amount
13:27
<
FromGitter >
<alex-lairan> Oh ok ;)
13:27
<
RX14 >
>> "#fe00ff"[1, 2].to_i(16)
13:27
<
RX14 >
>> "#fe00ff"[3, 2].to_i(16)
13:27
<
RX14 >
>> "#fe00ff"[5, 2].to_i(16)
13:27
<
FromGitter >
<alex-lairan> It's like my first idea
13:27
soveran has quit [Ping timeout: 260 seconds]
13:27
<
RX14 >
it'll also perform better because there's no intermediates or iterators
13:28
<
FromGitter >
<alex-lairan> Okay, I understand
13:29
Philpax has quit [Ping timeout: 240 seconds]
13:32
<
FromGitter >
<sdogruyol> @alex-lairan that's pretty
13:33
<
RX14 >
why UInt8.new?
13:34
<
RX14 >
"ff".to_i8(16)
13:34
<
RX14 >
>> "ff".to_i8(16)
13:34
<
RX14 >
>> "ff".to_u8(16)
13:34
<
crystal-gh >
crystal/master 6c5fb5a Ary Borenszweig: Optimizaion: define read_byte for IO::Sized and HTTP::Content
13:34
<
FromGitter >
<alex-lairan> :+1:
13:34
<
RX14 >
as a UInt8, and does proper overflow checking
13:34
<
RX14 >
as you can see when I accidentallly used a Signed int
13:34
<
FromGitter >
<alex-lairan> Thank you guy's for the help !
13:46
<
RX14 >
@sdogruyol added an updated IO.copy with a UInt8[8192] for you to try and test the speed
13:47
<
FromGitter >
<sdogruyol> @RX14 actually i aint doing any IO.copy
13:48
<
RX14 >
how are you doing it then?
13:48
<
FromGitter >
<sdogruyol> i mean i'm just checking the parse time
13:48
<
FromGitter >
<sdogruyol> this test doesnt include writing to a file
13:48
<
RX14 >
oh so it's using the internal copy
13:48
<
RX14 >
well, discord
13:49
<
FromGitter >
<sdogruyol> :)
13:49
<
FromGitter >
<sdogruyol> well now it's pretty much good enough
13:50
<
RX14 >
which is uses 1024 byte buffer
13:50
<
RX14 >
lets change that and see what happens
13:50
<
FromGitter >
<sdogruyol> yeah, i'm curious about a 4K one
13:51
<
RX14 >
L1 cache on the i486 itself was 8k
13:51
<
RX14 >
so 8 or 16k should be perfectly fine buffer sizes
13:52
<
FromGitter >
<sdogruyol> agree
13:54
<
FromGitter >
<sdogruyol> it's great that there's nearly no memory leak with this
13:55
<
RX14 >
I think i'll make a PR to rename MemoryIO to IO::memory
13:55
<
RX14 >
because it doesn't make sense with IO::Delimited and the likes
13:56
<
FromGitter >
<sdogruyol> Hmm
13:56
<
FromGitter >
<sdogruyol> it really makes sense
13:57
<
RX14 >
maybe I should rename FormData::PullParser to FormData::Parser too, or rename Multipart::Parser to Multipart::PullParser
13:57
<
FromGitter >
<sdogruyol> meanwhile i'm really curious how come is 5x times at this multipart stuff
13:58
<
FromGitter >
<sdogruyol> how come Go*
13:58
<
FromGitter >
<sdogruyol> need to check their buffer size
14:00
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
14:01
<
RX14 >
i don't really know
14:01
<
RX14 >
I think they might be more efficient than IO::Delimited by reading chunks and checking them all at once
14:02
<
FromGitter >
<sdogruyol> well i think your multipart and Ary's this patch is pretty good enough to get us to 1.0
14:02
<
RX14 >
or they might use booyer-moore string search
14:02
<
FromGitter >
<sdogruyol> after 1.0 we can make it faster for sure
14:04
<
RX14 >
@sdogruyol try multipart.cr master
14:04
<
FromGitter >
<sdogruyol> ok
14:06
Ven__ has joined #crystal-lang
14:06
Ven_ has quit [Read error: Connection reset by peer]
14:10
<
FromGitter >
<sdogruyol> well it's just around %1 -2 faster or not
14:21
pawnbox has quit [Remote host closed the connection]
14:21
Ven__ has quit [Ping timeout: 244 seconds]
14:21
pawnbox has joined #crystal-lang
14:23
soveran has joined #crystal-lang
14:24
Ven_ has joined #crystal-lang
14:29
soveran has quit [Ping timeout: 250 seconds]
14:32
<
RX14 >
I've fixed one bug since I've gotten rid of PointerIO
14:32
<
RX14 >
which is a good sign it shouldn't exist
14:32
<
FromGitter >
<sdogruyol> bug?
14:32
<
RX14 >
possible buffer overflow in the stdlib
14:34
<
FromGitter >
<sdogruyol> hmm
14:34
<
RX14 >
pointers are evil
14:35
<
FromGitter >
<sdogruyol> hehe
14:41
circ-user-Ak9Lm has joined #crystal-lang
14:43
onethirtyfive has joined #crystal-lang
14:48
onethirtyfive has quit [Ping timeout: 260 seconds]
14:50
<
FromGitter >
<sdogruyol> you mean in STD?
14:56
<
RX14 >
string formatting
15:02
<
crystal-gh >
[crystal] RX14 opened pull request #3400: Delete PointerIO (master...delete-pointerio)
https://git.io/vPBzA
15:09
circ-user-Ak9Lm has left #crystal-lang [#crystal-lang]
15:10
<
FromGitter >
<sdogruyol> Didn't know about PointerIO, havent needed havent used
15:15
<
crystal-gh >
[crystal] RX14 opened pull request #3401: Rename MemoryIO to IO::Memory (master...rename-memoryio)
https://git.io/vPBgc
15:22
<
crystal-gh >
[crystal] BlaXpirit opened pull request #3402: Rework the Random module (master...limitless-random)
https://git.io/vPBg7
15:23
<
BlaXpirit >
there we go
15:23
<
RX14 >
yay we're all PRing today
15:26
soveran has joined #crystal-lang
15:30
soveran has quit [Ping timeout: 244 seconds]
15:37
Ven_ has quit [Ping timeout: 268 seconds]
15:39
Ven_ has joined #crystal-lang
15:42
<
RX14 >
there's no easy way to have one IO write to multiple places is there?
15:42
<
RX14 >
If I wrote a class that could do that, what should it be called?
15:42
<
RX14 >
IO::MultiWritier?
15:43
<
RX14 >
it would be useful in logger to write to STDOUT and a file
15:44
onethirtyfive has joined #crystal-lang
15:45
snsei has joined #crystal-lang
15:46
<
RX14 >
tee isn't really a descriptive name though is it
15:48
<
Yxhvd >
neither is Array#grep
15:49
onethirtyfive has quit [Ping timeout: 268 seconds]
15:51
snsei has quit [Ping timeout: 248 seconds]
15:57
pawnbox has quit [Remote host closed the connection]
15:58
pawnbox has joined #crystal-lang
16:03
<
crystal-gh >
[crystal] kostya opened pull request #3403: Base64#urlsafe_encode now works as in ruby, fixed #3394 (master...base64_fix)
https://git.io/vPBaw
16:12
matp has quit [Max SendQ exceeded]
16:12
matp has joined #crystal-lang
16:34
x0f has joined #crystal-lang
16:42
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:58
<
crystal-gh >
[crystal] RX14 opened pull request #3404: Add IO::MultiWriter (master...feature/IO-MultiWriter)
https://git.io/vPBre
16:59
onionhammer1 has quit [Ping timeout: 268 seconds]
17:27
soveran has joined #crystal-lang
17:32
soveran has quit [Ping timeout: 250 seconds]
17:45
soveran has joined #crystal-lang
17:46
onethirtyfive has joined #crystal-lang
17:50
onethirtyfive has quit [Ping timeout: 248 seconds]
18:01
onionhammer1 has joined #crystal-lang
18:16
Ven_ has joined #crystal-lang
18:21
<
FromGitter >
<sdogruyol> LOL
18:21
<
FromGitter >
<sdogruyol> guess today's the Crystal PR day :P
18:21
Ven_ has quit [Read error: Connection reset by peer]
18:21
Ven_ has joined #crystal-lang
18:35
Ven_ has quit [Read error: Connection reset by peer]
18:36
Ven_ has joined #crystal-lang
18:42
soveran has quit [Remote host closed the connection]
18:53
Ven_ has quit [Read error: Connection reset by peer]
18:58
Ven_ has joined #crystal-lang
19:22
pawnbox has quit [Remote host closed the connection]
19:32
pawnbox has joined #crystal-lang
19:34
<
crystal-gh >
[crystal] asterite closed pull request #3400: Delete PointerIO (master...delete-pointerio)
https://git.io/vPBzA
19:36
<
crystal-gh >
crystal/master 007c791 Julien Portalier: Fix: allow i486 and i586 for target machine ABI
19:37
pawnbox has quit [Ping timeout: 250 seconds]
19:42
soveran has joined #crystal-lang
19:44
<
crystal-gh >
crystal/master 0c93b1b Konstantin Makarchev: add GC.stats
19:45
eizua has quit [Quit: Leaving]
19:46
A124 has quit [Quit: '']
19:47
soveran has quit [Ping timeout: 244 seconds]
19:48
onethirtyfive has joined #crystal-lang
19:50
A124 has joined #crystal-lang
19:52
onethirtyfive has quit [Ping timeout: 260 seconds]
19:53
kulelu88 has joined #crystal-lang
19:59
soveran has joined #crystal-lang
19:59
soveran has quit [Changing host]
19:59
soveran has joined #crystal-lang
20:14
<
crystal-gh >
[crystal] asterite opened pull request #3406: [WIP] Support http server request streaming (single HTTP::Request) (master...feature/http_server_request_stream_2)
https://git.io/vPBMU
20:18
soveran has quit [Remote host closed the connection]
20:20
soveran has joined #crystal-lang
20:21
soveran has quit [Remote host closed the connection]
20:23
A124 has quit [Quit: '']
20:25
bjz has joined #crystal-lang
20:27
A124 has joined #crystal-lang
20:29
<
crystal-gh >
crystal/master 2da5008 O_o: Base64#urlsafe_encode now works as in ruby, fixed #3394 (#3403)
20:52
Ven_ has quit [Ping timeout: 244 seconds]
20:55
<
Papierkorb >
Huh, there's no IO#eof? ?
20:57
Ven_ has joined #crystal-lang
21:08
Ven_ has quit [Ping timeout: 250 seconds]
21:11
Ven_ has joined #crystal-lang
21:14
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
21:25
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:54
bjz has joined #crystal-lang
22:01
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
22:02
bjz has joined #crystal-lang
22:22
bjz has quit [Read error: Connection reset by peer]
22:28
Philpax has joined #crystal-lang
22:33
pawnbox has joined #crystal-lang
22:38
pawnbox has quit [Ping timeout: 244 seconds]
22:50
g3funk is now known as braidn
22:51
onethirtyfive has joined #crystal-lang
22:55
onethirtyfive has quit [Ping timeout: 248 seconds]
23:01
_whitelogger has joined #crystal-lang
23:41
mrslowly has joined #crystal-lang
23:41
<
mrslowly >
How can I require a github repo branch as a dependency? When I do reponame#branch it errors
23:53
<
mrslowly >
oh ok, didn't realize it was its own repo. thanks!