00:00
emancu has joined #crystal-lang
00:13
Raimondi has quit [Quit: The road to wisdom?—Well, it's plain and simple to express: Err and err and err again, but less and less and less. — Piet Hein]
00:27
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
00:38
sp4rrow has joined #crystal-lang
00:43
sp4rrow has quit [Quit: Textual]
00:50
fowlduck has quit [Remote host closed the connection]
01:00
fowlduck has joined #crystal-lang
01:03
krtv` has quit [Ping timeout: 244 seconds]
01:08
Philpax has joined #crystal-lang
01:11
elia has quit [Quit: Computer has gone to sleep.]
01:17
krtv` has joined #crystal-lang
01:59
Philpax has quit [Ping timeout: 248 seconds]
02:03
Philpax has joined #crystal-lang
02:07
plukevdh has joined #crystal-lang
02:07
plukevdh has quit [Client Quit]
02:11
plukevdh has joined #crystal-lang
02:15
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
02:21
zeno_ has joined #crystal-lang
02:33
plukevdh has quit [Ping timeout: 264 seconds]
02:53
Philpax has quit [Ping timeout: 260 seconds]
03:12
A124 has quit [Quit: '']
03:14
A124 has joined #crystal-lang
03:20
vonKingsley has joined #crystal-lang
03:46
pawnbox has quit [Remote host closed the connection]
03:47
pawnbox has joined #crystal-lang
03:58
pawnbox has quit [Remote host closed the connection]
03:58
pawnbox has joined #crystal-lang
04:00
fowlduck has quit [Remote host closed the connection]
04:17
zeno_ has quit [Quit: 离开]
04:22
pawnbox has quit [Ping timeout: 244 seconds]
04:25
pawnbox has joined #crystal-lang
04:25
pawnbox has quit [Remote host closed the connection]
04:32
Philpax has joined #crystal-lang
04:42
pawnbox has joined #crystal-lang
04:54
_whitelogger_ has joined #crystal-lang
04:55
_whitelogger has quit [Remote host closed the connection]
05:02
Philpax has quit [Ping timeout: 260 seconds]
05:08
Philpax has joined #crystal-lang
05:19
Philpax has quit [Ping timeout: 276 seconds]
05:21
<
crystal-gh >
[crystal] marcosdsanchez opened pull request #2286: Fix BitArray#toggle documentation (master...marcosdsanchez-patch-1)
https://git.io/vaT2U
06:56
trapped has joined #crystal-lang
07:04
Philpax has joined #crystal-lang
07:08
vonKingsley has quit [Ping timeout: 252 seconds]
07:37
fka_ has joined #crystal-lang
07:38
bjmllr has quit [Ping timeout: 264 seconds]
07:40
Philpax has quit [Read error: No route to host]
07:51
bjmllr has joined #crystal-lang
08:10
Philpax has joined #crystal-lang
08:22
mondok has joined #crystal-lang
08:28
pawnbox has quit [Remote host closed the connection]
08:29
pawnbox has joined #crystal-lang
08:37
<
crystal-gh >
[crystal] jhass closed pull request #2286: Fix BitArray#toggle documentation (master...marcosdsanchez-patch-1)
https://git.io/vaT2U
08:41
trapped has quit [Read error: Connection reset by peer]
08:54
alsm has joined #crystal-lang
08:57
elia has joined #crystal-lang
09:13
umurgdk has joined #crystal-lang
09:28
mondok has quit [Ping timeout: 240 seconds]
09:34
pawnbox has quit [Remote host closed the connection]
09:34
pawnbox has joined #crystal-lang
09:53
umurgdk has quit [Remote host closed the connection]
09:54
pawnbox has quit [Remote host closed the connection]
09:55
pawnbox has joined #crystal-lang
09:58
mondok has joined #crystal-lang
10:13
umurgdk has joined #crystal-lang
10:15
umurgdk has quit [Remote host closed the connection]
10:15
umurgdk has joined #crystal-lang
10:21
pawnbox has quit [Remote host closed the connection]
10:21
pawnbox has joined #crystal-lang
10:32
pawnbox has quit [Remote host closed the connection]
10:33
pawnbox has joined #crystal-lang
10:36
pawnbox has quit [Remote host closed the connection]
10:37
pawnbox has joined #crystal-lang
10:38
pawnbox has quit [Remote host closed the connection]
10:39
pawnbox has joined #crystal-lang
10:40
pawnbox has quit [Remote host closed the connection]
10:40
pawnbox has joined #crystal-lang
10:42
pawnbox has quit [Remote host closed the connection]
10:43
pawnbox has joined #crystal-lang
10:48
pawnbox has quit [Remote host closed the connection]
10:48
pawnbox has joined #crystal-lang
10:59
mondok has quit [Ping timeout: 268 seconds]
11:11
pawnbox has quit [Remote host closed the connection]
11:12
pawnbox has joined #crystal-lang
11:30
pawnbox has quit [Remote host closed the connection]
11:33
pawnbox has joined #crystal-lang
11:45
pawnbox has quit [Remote host closed the connection]
11:47
umurgdk has quit [Remote host closed the connection]
11:55
mondok has joined #crystal-lang
12:00
pawnbox has joined #crystal-lang
12:20
umurgdk has joined #crystal-lang
12:21
pawnbox has quit [Remote host closed the connection]
12:22
mondok has quit [Quit: Leaving]
12:25
A124 has quit [Disconnected by services]
12:25
A124 has joined #crystal-lang
12:25
daemonwrangler_ has joined #crystal-lang
12:27
umurgdk has quit [Ping timeout: 240 seconds]
12:27
daemonwrangler has quit [Ping timeout: 240 seconds]
12:27
jokke has quit [Ping timeout: 240 seconds]
12:27
maxpowa has quit [Ping timeout: 240 seconds]
12:27
daemonwrangler_ is now known as daemonwrangler
12:27
trapped has joined #crystal-lang
12:32
maxpowa has joined #crystal-lang
12:39
krtv` has quit [Ping timeout: 244 seconds]
12:41
jokke has joined #crystal-lang
12:51
pawnbox has joined #crystal-lang
12:52
krtv` has joined #crystal-lang
13:03
umurgdk has joined #crystal-lang
13:03
pawnbox has quit [Remote host closed the connection]
13:04
umurgdk has quit [Remote host closed the connection]
13:04
umurgdk has joined #crystal-lang
13:23
pawnbox has joined #crystal-lang
13:41
Philpax has quit [Ping timeout: 250 seconds]
14:04
umurgdk has quit [Remote host closed the connection]
14:13
fka_ has quit [Remote host closed the connection]
14:13
fka_ has joined #crystal-lang
14:38
<
crystal-gh >
[crystal] ysbaddaden closed pull request #2267: Add FileUtils#cp (master...fileutils_cp)
https://git.io/v2daY
15:00
umurgdk has joined #crystal-lang
15:01
umurgdk has quit [Remote host closed the connection]
15:01
luislavena has joined #crystal-lang
15:03
umurgdk has joined #crystal-lang
15:08
umurgdk has quit [Ping timeout: 260 seconds]
15:20
umurgdk has joined #crystal-lang
15:25
pawnbox has quit [Remote host closed the connection]
15:26
pawnbox has joined #crystal-lang
15:30
pawnbox has quit [Remote host closed the connection]
15:30
pawnbox has joined #crystal-lang
15:30
umurgdk has quit [Remote host closed the connection]
15:37
umurgdk has joined #crystal-lang
15:41
umurgdk has quit [Ping timeout: 240 seconds]
15:44
umurgdk has joined #crystal-lang
15:45
sooli has joined #crystal-lang
15:47
umurgdk has quit [Remote host closed the connection]
15:47
umurgdk has joined #crystal-lang
16:23
tomchapin has joined #crystal-lang
16:34
shama has joined #crystal-lang
16:46
umurgdk has quit []
17:01
sooli has quit [Ping timeout: 248 seconds]
17:06
<
crystal-gh >
crystal/master fddb151 Ary Borenszweig: Added some type annotations on instance vars
17:06
<
crystal-gh >
crystal/master 89be6d5 Ary Borenszweig: Compiler: fixed a couple of issues with non generic module types
17:08
krtv` has quit [Ping timeout: 246 seconds]
17:12
pawnbox has quit [Remote host closed the connection]
17:12
alsm has quit [Ping timeout: 244 seconds]
17:13
pawnbox has joined #crystal-lang
17:20
krtv` has joined #crystal-lang
17:21
elia has quit [Quit: Computer has gone to sleep.]
17:35
fka_ has quit [Remote host closed the connection]
18:00
<
crystal-gh >
crystal/master e6529a7 Potapov Sergey: Implement Array#first(n : Int) and Array#last(n : Int)
18:00
<
crystal-gh >
crystal/master bb65c05 Potapov Sergey: Update doc for Array#first(n) and #last(n)
18:00
<
crystal-gh >
crystal/master 6f87300 Ary Borenszweig: Merge pull request #2281 from greyblake/array-first-n...
18:08
fka_ has joined #crystal-lang
18:14
shadeslayer has quit [Ping timeout: 252 seconds]
18:15
shadeslayer has joined #crystal-lang
18:17
<
crystal-gh >
crystal/master ac46f8c Ary Borenszweig: Rename `take` to `first`. Related to #2281
18:30
umurgdk has joined #crystal-lang
18:34
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:34
umurgdk_ has joined #crystal-lang
18:35
umurgdk has quit [Ping timeout: 264 seconds]
19:52
kfpratt has quit [Remote host closed the connection]
20:18
pawnbox has quit [Remote host closed the connection]
20:50
luislavena has quit [Quit: Leaving]
20:59
fka_ has quit [Remote host closed the connection]
21:01
tomchapin has joined #crystal-lang
21:13
shadowbram has joined #crystal-lang
21:23
A124 has quit [Quit: '']
21:25
A124 has joined #crystal-lang
21:27
Philpax has joined #crystal-lang
21:28
kfpratt has joined #crystal-lang
21:41
shadowbram has quit [Remote host closed the connection]
21:45
Philpax has quit [Ping timeout: 248 seconds]
22:08
perks has joined #crystal-lang
22:08
fka_ has joined #crystal-lang
22:11
<
perks >
anyone know how to poll a websocket for incomming messages? looking at the specs I can't really seem to figure out how I would do that
22:18
pawnbox has joined #crystal-lang
22:22
pawnbox has quit [Ping timeout: 240 seconds]
22:32
<
BlaXpirit >
perks, Crystal does not have websocket in its standard library.
22:33
<
ldlework >
for a minute I was super impressed
22:34
<
BlaXpirit >
ldlework, nothing to be impressed about. the contrary even, because websockets should not be in standard library
22:34
<
BlaXpirit >
perks, wow I'm mistake
22:35
<
BlaXpirit >
perks, instead of polling you use on_message
22:37
<
perks >
yeah I tried passing a proc literal that just printed out the string return
22:37
<
BlaXpirit >
perks, uh actually looks like you're meant to subclass it
22:38
<
BlaXpirit >
did you try that?
22:38
<
perks >
Sorry, comming from a non ruby background so some of the conventions I guess (especially with the syntax) escape me sometimes
22:39
<
BlaXpirit >
perks, hah I'm mistaken yet again
22:39
<
perks >
It looks like maybe I call the run() function after setting up on_message
22:39
<
BlaXpirit >
this is so confusing... the empty body of on_message makes me think that you need to subclass it
22:40
<
BlaXpirit >
but actually the function is not no-op
22:40
<
BlaXpirit >
calling on_message with a proc sets an instance variable
22:41
<
perks >
when you instantiate the class it creates a buffer
22:42
<
perks >
and i guess when it recieves incomming msg it call on_message on the buffer that parsed the incomming response
22:44
<
BlaXpirit >
perks, anyway, the syntax is ws.on_message do |s| puts s end
22:44
<
perks >
now just gotta figure out how to do threads(fibers?)
22:45
<
perks >
thanks BlaXpirit
22:45
<
BlaXpirit >
but I can't check it cuz i have no idea what these websockets are
22:45
<
perks >
yeah it worked!
22:46
<
BlaXpirit >
perks, and do you want to run this websocket so that it doesnt block the rest of your program?
22:46
<
perks >
yeah that was the next step
22:46
<
BlaXpirit >
spawn &ws.run
22:46
<
perks >
with a spawn do block?
22:47
<
BlaXpirit >
perks, well this &thing replaces a block
22:47
<
BlaXpirit >
spawn do ws.run end
22:47
<
BlaXpirit >
or spawn &ws.run
22:47
<
BlaXpirit >
is the same
22:47
<
perks >
that causes the program to exist
22:47
<
BlaXpirit >
perks, well yeah it's like in the background but the main "thread" ends so it exits
22:48
<
perks >
is there anyway to do I guess like Thread joining and closing?
22:48
<
BlaXpirit >
perks, I wish I could remember
22:48
<
perks >
I know my terminology is off, but maybe there are some docs on general concurrency, parallleism
22:48
<
BlaXpirit >
perks, note that everything runs in 1 thread currently
22:48
<
perks >
Ahh so more of async/event loopish type deal
22:49
<
BlaXpirit >
perks, the concurrency model is planned to be similar to Go
22:50
<
BlaXpirit >
async/await is explicit context switching, but in crystal it can happen in any function that allows context to switch
22:51
<
perks >
I guess Channels are then similar to queues in other languages
22:51
<
BlaXpirit >
perks, quite similar
22:51
<
perks >
mostly just picking up from snippets on the issues tracker haha
22:51
<
perks >
okay, thanks ill start playing around with this!
22:53
<
BlaXpirit >
and it still doesnt explain a way to wait for a fiber, and i can't find it
22:54
<
perks >
oh thats an awesome doc
22:54
<
perks >
wait is this not on the main wiki haha
22:54
<
BlaXpirit >
it's okay, just something someone write hastily
22:55
<
perks >
thanks again!
22:57
trapped_ has joined #crystal-lang
22:58
pawnbox has joined #crystal-lang
22:59
A124 has quit [Ping timeout: 250 seconds]
22:59
A124 has joined #crystal-lang
23:00
Dreamer__ has quit [Ping timeout: 250 seconds]
23:00
ytti has quit [Ping timeout: 240 seconds]
23:00
Dreamer3 has joined #crystal-lang
23:00
trapped has quit [Ping timeout: 240 seconds]
23:02
krtv` has quit [Ping timeout: 240 seconds]
23:02
Dreamer3_ has quit [Ping timeout: 250 seconds]
23:03
pawnbox has quit [Ping timeout: 264 seconds]
23:03
<
BlaXpirit >
perks, well for waiting I suppose you can use a channel
23:03
Dreamer3_ has joined #crystal-lang
23:04
<
BlaXpirit >
just send something to it at the end of a fiber and wait for something at the other end
23:04
<
BlaXpirit >
but in this case you don't need it, the default is just fine for you. do something else in your program and the websocket will run while it runs
23:07
<
perks >
awesome, and yeah even the doc u linked me used ```loop { sleep 9001 } # Ensure the program does not exit``` to keep the thread from exiting while the fibers block
23:11
krtv` has joined #crystal-lang
23:18
perks has quit [Quit: perks]
23:28
pawnbox has joined #crystal-lang
23:33
pawnbox has quit [Ping timeout: 260 seconds]
23:41
ytti has joined #crystal-lang
23:42
fka_ has quit [Remote host closed the connection]
23:47
ytti has quit [Ping timeout: 240 seconds]
23:49
Philpax has joined #crystal-lang
23:54
jhass has quit [Ping timeout: 246 seconds]
23:59
tliff has quit [Ping timeout: 252 seconds]
23:59
pawnbox has joined #crystal-lang
23:59
tliff has joined #crystal-lang
23:59
asterite has quit [Ping timeout: 244 seconds]