00:22
pawnbox has joined #crystal-lang
00:27
pawnbox has quit [Ping timeout: 240 seconds]
00:52
pawnbox has joined #crystal-lang
00:57
pawnbox has quit [Ping timeout: 250 seconds]
00:59
nulpunkt has quit [Ping timeout: 264 seconds]
01:02
nulpunkt has joined #crystal-lang
01:05
fowlduck has quit [Remote host closed the connection]
01:12
dylanmei has quit [Quit: ZZZzzz…]
01:22
pawnbox has joined #crystal-lang
01:26
krtv` has quit [Ping timeout: 250 seconds]
01:27
pawnbox has quit [Ping timeout: 250 seconds]
01:27
krtv` has joined #crystal-lang
02:10
krtv` has quit [Ping timeout: 240 seconds]
02:12
krtv` has joined #crystal-lang
02:27
dylanmei has joined #crystal-lang
02:43
dylanmei has quit [Ping timeout: 240 seconds]
02:55
<
asterite >
BlaXpirit: ylluminate: I don't know why you say the concurrency model is bad. It's the same as in Go, and it's really good and performant (that's why everyone is using Go for apps that need concurrency)
02:55
<
asterite >
Julia has fibers, Crystal has fibers, it's the same
03:02
pawnbox has joined #crystal-lang
03:17
dylanmei has joined #crystal-lang
03:19
A124 has quit [Quit: '']
03:23
A124 has joined #crystal-lang
03:29
shama has quit [Remote host closed the connection]
03:29
A124 has quit [Quit: '']
03:30
shama has joined #crystal-lang
03:32
A124 has joined #crystal-lang
03:43
fowlduck has joined #crystal-lang
03:44
dylanmei has quit [Ping timeout: 250 seconds]
03:47
shama has quit [Remote host closed the connection]
03:52
shama has joined #crystal-lang
03:59
pawnbox has quit [Remote host closed the connection]
04:11
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
04:23
Renich has joined #crystal-lang
04:25
pawnbox has joined #crystal-lang
04:43
dylanmei has joined #crystal-lang
04:53
Renich has quit [Quit: leaving]
05:19
dylanmei has quit [Ping timeout: 264 seconds]
05:23
pawnbox_ has joined #crystal-lang
05:24
pawnbox has quit [Ping timeout: 240 seconds]
05:28
pawnbox_ has quit [Ping timeout: 250 seconds]
05:30
pawnbox has joined #crystal-lang
05:48
<
BlaXpirit >
no, people use Go because it has a ton of money behind it
05:50
fowlduck has quit [Remote host closed the connection]
06:24
dylanmei has joined #crystal-lang
06:33
ponga has joined #crystal-lang
06:54
dylanmei has quit [Ping timeout: 250 seconds]
07:48
dylanmei has joined #crystal-lang
08:09
pawnbox has quit [Remote host closed the connection]
08:10
trapped has joined #crystal-lang
08:11
Ven has joined #crystal-lang
08:21
Philpax has joined #crystal-lang
08:23
dylanmei has quit [Ping timeout: 250 seconds]
08:25
pawnbox has joined #crystal-lang
09:26
dylanmei has joined #crystal-lang
09:34
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
09:54
dylanmei has quit [Ping timeout: 250 seconds]
09:56
pawnbox has quit [Remote host closed the connection]
10:02
pawnbox has joined #crystal-lang
10:21
ssvb has quit [Remote host closed the connection]
10:40
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:45
<
ytti >
07:48 < BlaXpirit> no, people use Go because it has a ton of money behind it
10:45
<
ytti >
i agree, but i would formulate it more kindly
10:45
<
ytti >
i would formulate it 'it has great ecosystem'
10:45
<
ytti >
(which is build by google money...)
10:45
<
BlaXpirit >
no, that's the other way around
10:46
<
ytti >
it's very mature for its age
10:46
<
ytti >
great libraries
10:46
<
ytti >
supports lot of OS
10:46
<
ytti >
as a language go is very conservative
10:46
<
ytti >
and somewhat boring really
10:47
<
ytti >
but it's familiar, easy to pick up
10:47
<
ytti >
but gosh the error checking really rubs me the wrong way
10:48
<
ytti >
it seems that lot of the practical code just returns the error up in the call stack
10:48
<
ytti >
until it's handled in fewer places
10:48
<
ytti >
so not sure how it's exactly better than exceptions, but i'm biased
10:54
dylanmei has joined #crystal-lang
11:29
dylanmei has quit [Ping timeout: 250 seconds]
11:37
Ven has joined #crystal-lang
11:56
ssvb has joined #crystal-lang
12:15
trapped has joined #crystal-lang
12:32
pawnbox has quit [Remote host closed the connection]
12:34
dylanmei has joined #crystal-lang
12:42
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:43
pawnbox has joined #crystal-lang
13:03
dylanmei has quit [Ping timeout: 250 seconds]
13:06
trapped has joined #crystal-lang
13:07
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:28
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:29
trapped has joined #crystal-lang
13:41
Ven has joined #crystal-lang
13:56
dylanmei has joined #crystal-lang
13:56
<
onionhammer >
not aware of a system that treats \r alone as a new line :|
13:57
<
onionhammer >
carriage return = move the cursor to the start of line
13:57
<
BlaXpirit >
oh hi, is that you, onionhammer?
13:59
<
BlaXpirit >
ok this is probably pointless to support it but python still does
14:03
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:11
hangyas has joined #crystal-lang
14:15
<
hangyas >
hi, can i access the arrgs of a def with macro?
14:28
dylanmei has quit [Ping timeout: 250 seconds]
14:30
x0f has quit [Ping timeout: 256 seconds]
14:31
trapped has joined #crystal-lang
14:58
hangyas has quit [Remote host closed the connection]
15:00
dylanmei has joined #crystal-lang
15:29
dylanmei has quit [Ping timeout: 250 seconds]
15:32
waj_ has joined #crystal-lang
15:41
<
jeromegn >
Given I have 32 bits, how do I convert that BitArray of 32 to a Int32?
15:41
<
jeromegn >
and the opposite
15:42
<
jeromegn >
oh… pointers eh?
15:49
Sadin has joined #crystal-lang
15:49
<
smarr >
for benchmarking Crystal code, anything else that should be considered for compilation beside using `crystal build --release`?
15:53
<
asterite >
smarr: I don't think so
15:54
<
asterite >
jeromegn: there's no way, maybe we could provide access to the internal buffer
15:56
<
jeromegn >
well, I created a BitArray like:
15:56
<
jeromegn >
> require “bit_array”; ba = BitArray.new(32); ba.toggle(2); puts (pointerof(ba) as Int32*).value
15:56
<
jeromegn >
hmm, can’t remember the bot syntax
15:57
<
jeromegn >
but I have no idea if that’s correct
15:57
<
jeromegn >
for some reason I was expecting 4!
15:58
<
jeromegn >
(I’m comparing with the MongoDB Ruby Driver to see how they send a BitArray through the socket for the MongoDB Wire Protocol)
15:58
<
smarr >
asterite: ok, thanks
15:58
<
jeromegn >
there’s a flag that’s sort of like an enum but must be sent as a Int32 representing a BitVector (BitArray).
16:00
waj_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:05
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:06
trapped has joined #crystal-lang
16:07
bam0 has joined #crystal-lang
16:11
<
BlaXpirit >
jeromegn, hm are you sure flags-enum is not suitable?
16:11
<
jeromegn >
I have an enum
16:11
<
jeromegn >
but I’m not sure how to convert it to an Int32 if there is more than one flag
16:12
<
BlaXpirit >
jeromegn, yeah dang. don't blindly copy ruby code -_-
16:12
<
jeromegn >
for some reason I had stopped reading after 1,2 and thought the next was going to be 3,4,5...
16:13
<
jeromegn >
don’t be so rude ;)
16:17
<
asterite >
Yes, there's no need to be rude :-)
16:18
tomchapin has joined #crystal-lang
16:21
dylanmei has joined #crystal-lang
16:34
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:37
waj_ has joined #crystal-lang
16:38
waj_ has quit [Client Quit]
16:42
Renich has joined #crystal-lang
16:52
bam0 has quit [Ping timeout: 240 seconds]
17:04
shama has joined #crystal-lang
17:29
x0f has joined #crystal-lang
17:41
DeBot has joined #crystal-lang
17:44
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
17:49
onionhammer has quit [Read error: Connection reset by peer]
17:49
onionhammer has joined #crystal-lang
18:09
Ven has joined #crystal-lang
18:10
trapped has joined #crystal-lang
18:16
pawnbox has quit [Remote host closed the connection]
18:21
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:26
pawnbox has joined #crystal-lang
18:28
trapped has joined #crystal-lang
18:31
pawnbox has quit [Ping timeout: 260 seconds]
18:36
Sadin has quit [Quit: Leaving]
18:37
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:40
fowlduck has joined #crystal-lang
18:55
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:39
<
onionhammer >
BlaXpirit: who else would it be? :P
19:39
<
onionhammer >
ooh true we do want to support Commodore 8-bit machines :)
19:45
<
BlaXpirit >
onionhammer, it's more about mac but whatever
19:45
<
BlaXpirit >
link says it was until 1999
19:47
<
onionhammer >
just giving u a hard time
19:55
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:57
pawnbox has joined #crystal-lang
20:02
pawnbox has quit [Ping timeout: 276 seconds]
20:27
<
jeromegn >
so I just found one can do this with an enum: (IOMode::Read | IOMode::Write).to_i
20:27
<
jeromegn >
which is what I’m looking for
20:32
tomchapin has joined #crystal-lang
20:46
pawnbox has joined #crystal-lang
20:47
trapped has joined #crystal-lang
20:50
pawnbox has quit [Ping timeout: 240 seconds]
21:00
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:01
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:16
pawnbox has joined #crystal-lang
21:21
pawnbox has quit [Ping timeout: 240 seconds]
21:30
Philpax has quit [Ping timeout: 260 seconds]
21:33
<
jfontan >
one of the things I'm used in ruby is trying to get a hash or an array item and if it does not exist get nil
21:33
<
jfontan >
I know you can set a default value when creating hashes
21:33
<
BlaXpirit >
jfontan, ok
21:34
<
jfontan >
but reading json I don't see a way to do it
21:34
<
jfontan >
should I start checking the key explicitly?
21:34
<
jhass >
jfontan: append a ?, foo["bar"]?
21:34
<
BlaXpirit >
that took so long to parse
21:34
<
BlaXpirit >
basically foo["bar"]? is the code to do it
21:35
<
BlaXpirit >
instead of foo["bar"]
21:35
<
jhass >
like foo["bar"] calls the method named [], it calls the method called []?
21:35
<
jfontan >
so it's better to check
21:37
pawnbox has joined #crystal-lang
21:42
pawnbox has quit [Ping timeout: 260 seconds]
21:44
trapped has joined #crystal-lang
21:47
Ven has joined #crystal-lang
21:54
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:26
matp has joined #crystal-lang
22:27
pawnbox has joined #crystal-lang
22:31
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:32
pawnbox has quit [Ping timeout: 260 seconds]
22:36
CompanionCube has joined #crystal-lang
22:36
CompanionCube has joined #crystal-lang
22:48
Renich has quit [Quit: leaving]
22:48
trapped has joined #crystal-lang
22:49
Philpax has joined #crystal-lang
22:57
pawnbox has joined #crystal-lang
23:02
pawnbox has quit [Ping timeout: 260 seconds]
23:18
triangles has joined #crystal-lang
23:27
pawnbox has joined #crystal-lang
23:31
pawnbox has quit [Ping timeout: 240 seconds]