00:55
waj has quit [Remote host closed the connection]
00:56
sleeper is now known as sleeper_
00:58
kulelu88 has left #crystal-lang ["Leaving"]
01:17
waj has joined #crystal-lang
01:35
kyrylo has quit [Quit: Konversation terminated!]
01:35
kyrylo has joined #crystal-lang
01:42
waj_ has joined #crystal-lang
01:43
waj has quit [Ping timeout: 244 seconds]
01:44
kyrylo has quit [Ping timeout: 264 seconds]
01:48
blue_deref has joined #crystal-lang
02:18
sardaukar has quit [Ping timeout: 256 seconds]
02:19
sardaukar has joined #crystal-lang
02:29
waj has joined #crystal-lang
02:30
waj__ has joined #crystal-lang
02:33
waj_ has quit [Ping timeout: 265 seconds]
02:34
waj has quit [Ping timeout: 260 seconds]
02:37
waj__ has quit [Remote host closed the connection]
02:53
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
03:12
blue_deref has quit [Quit: bbn]
05:06
sailorswift has joined #crystal-lang
05:33
BlaXpirit has joined #crystal-lang
05:43
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
05:54
BlaXpirit has quit [Read error: Connection reset by peer]
05:54
BlaXpirit has joined #crystal-lang
06:03
BlaXpirit has quit [Quit: Konversation]
06:04
BlaXpirit has joined #crystal-lang
06:11
BloodyHistory has joined #crystal-lang
06:27
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
06:45
<
BloodyHistory >
BlaXpirit, thanks!
06:50
Ven has joined #crystal-lang
07:33
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:42
strcmp1 has quit [Quit: Leaving]
08:04
yopp has quit [Ping timeout: 264 seconds]
08:27
zamith has joined #crystal-lang
08:34
sleeper_ is now known as sleeper
08:40
yopp has joined #crystal-lang
08:44
dbackeus has joined #crystal-lang
08:46
kyrylo has joined #crystal-lang
08:59
zamith has quit [Quit: Be back later ...]
09:08
zamith has joined #crystal-lang
09:15
zamith has quit [Quit: Be back later ...]
09:59
havenwood has quit [Ping timeout: 244 seconds]
10:03
dbackeus has quit [Remote host closed the connection]
10:34
<
crystal-gh >
[crystal] kostya opened pull request #1220: add tcp examples, fixed #1198 (master...tcp_examples)
http://git.io/vsJgW
10:52
BloodyHistory has joined #crystal-lang
10:52
Ven has joined #crystal-lang
10:52
blue_deref has joined #crystal-lang
10:53
blue_deref has quit [Client Quit]
10:54
BloodyHistory has quit [Client Quit]
11:03
dbackeus has joined #crystal-lang
11:08
dbackeus has quit [Ping timeout: 246 seconds]
11:16
dbackeus has joined #crystal-lang
11:27
dbackeus has quit [Remote host closed the connection]
11:30
<
Netfeed >
is there plans of making it possible to use Number i unions?
11:40
dbackeus has joined #crystal-lang
11:40
strcmp1 has joined #crystal-lang
11:48
ssvb has quit [Ping timeout: 260 seconds]
11:50
shadeslayer_ is now known as shadeslayer
11:53
strcmp1 has quit [Quit: Leaving]
11:56
sailorswift has joined #crystal-lang
12:05
leafybasil has quit [Remote host closed the connection]
12:12
leafybasil has joined #crystal-lang
12:16
leafybasil has quit [Ping timeout: 240 seconds]
12:18
waj has joined #crystal-lang
12:19
blue_deref has joined #crystal-lang
12:20
waj has quit [Remote host closed the connection]
12:26
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:38
<
trapped >
is there any way to obtain the client's address from an HTTP::Request?
12:39
<
BlaXpirit >
trapped, you mean your own address?
12:39
<
BlaXpirit >
and local/global?
12:42
<
jhass >
Netfeed: just make an alias for now, alias SomeNumber = Int8|Int32|Int64|UInt8|UInt32|UInt64|Float32|Float64
12:42
<
trapped >
BlaXpirit: no, the client's address
12:42
<
jhass >
trapped: with or without reverse proxy in front?
12:43
<
trapped >
considering nginx set X-Forwarded-For afaik
12:45
<
jhass >
the socket's peer address doesn't seem to be exposed atm
12:49
<
Netfeed >
jhass: oh, nice, thanks
12:53
NeverDie has joined #crystal-lang
12:59
sleeper is now known as sleeper_
13:01
ssvb has joined #crystal-lang
13:17
leafybasil has joined #crystal-lang
13:18
waj has joined #crystal-lang
13:19
Raimondii has joined #crystal-lang
13:22
Raimondi has quit [Ping timeout: 246 seconds]
13:32
Raimondii is now known as Raimondi
13:34
<
Netfeed >
can you have abstract class methods?
13:36
<
Netfeed >
oh, neat, you can
13:42
waj has joined #crystal-lang
13:51
dbackeus_ has joined #crystal-lang
13:51
dbackeus has quit [Read error: Connection reset by peer]
14:05
havenwood has joined #crystal-lang
14:07
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
14:25
kostya has joined #crystal-lang
14:28
BlaXpirit has quit [Read error: Connection reset by peer]
14:28
BlaXpirit has joined #crystal-lang
14:38
BlaXpirit has quit [Quit: Konversation]
14:49
dbackeus_ has quit [Remote host closed the connection]
14:50
BlaXpirit has joined #crystal-lang
14:59
justinmcp has quit [*.net *.split]
14:59
wonderbreadz has quit [*.net *.split]
15:01
justinmcp has joined #crystal-lang
15:07
wonderbreadz has joined #crystal-lang
15:34
waj has quit [Remote host closed the connection]
16:10
waj has joined #crystal-lang
16:11
leafybasil has quit [Remote host closed the connection]
16:17
shama has joined #crystal-lang
16:17
strcmp1 has joined #crystal-lang
16:23
leafybasil has joined #crystal-lang
16:25
leafybasil has quit [Read error: Connection reset by peer]
16:26
leafybasil has joined #crystal-lang
16:31
leafybasil has quit [Ping timeout: 260 seconds]
16:31
leafybas_ has joined #crystal-lang
16:56
kyrylo has quit [Remote host closed the connection]
16:57
<
BlaXpirit >
hmm... is the C-style formatting mini-language beneficial for Crystal
16:57
<
BlaXpirit >
i mean, %d and %s have exactly the same effect as far as i see
16:58
<
BlaXpirit >
>> "%3d" % "5"
16:59
<
jhass >
it probably should raise if passed a string, yeah
17:00
kyrylo has joined #crystal-lang
17:00
<
BlaXpirit >
are there some formatting options that can be combined with #{} interpolation?
17:00
<
jhass >
I'm not sure I get your question but I think the answer is no
17:01
<
BlaXpirit >
well, i can just wish it used Python's way
17:02
<
jhass >
(you might want to clarify you question)
17:02
<
BlaXpirit >
Python has this string formatting
17:02
<
BlaXpirit >
"{:3d} {named:3d}".format(x, named=y)
17:03
<
BlaXpirit >
which is equivalent to "%3s %3s" % (x, y)
17:03
<
BlaXpirit >
i find it quite good
17:03
<
BlaXpirit >
sorry, i meant "{:3} {named:3}".format(x, named=y)
17:03
<
jhass >
>> "%3d %{foo}" % 5, {"foo": "bar"}
17:04
<
jhass >
>> "%3d %{foo}" % {5, {"foo": "bar"}}
17:04
<
jhass >
we got these recently
17:04
<
BlaXpirit >
these "d" suffixes are kinda irrelevant
17:04
<
jhass >
don't think you can combine them with formatters yet I guess
17:04
<
jhass >
>> "%3d %{foo}10s" % {5, {"foo": "bar"}}
17:04
<
BlaXpirit >
and what's nicest is each type can define its own formatting options
17:05
<
jhass >
>> "%3d %10{foo}s" % {5, {"foo": "bar"}}
17:05
<
jhass >
>> "%3d %<foo>10s" % {5, {"foo": "bar"}}
17:07
<
jhass >
>> "%5d" % "foo"
17:07
<
jhass >
there's your diff
17:07
<
jhass >
it does call .to_i on the arg for you
17:19
zamith has joined #crystal-lang
17:22
ssvb has quit [Ping timeout: 244 seconds]
17:26
wonderbreadz has quit [Ping timeout: 256 seconds]
17:28
leafybas_ has quit [Remote host closed the connection]
17:30
zamith has quit [Quit: Be back later ...]
17:30
wonderbreadz has joined #crystal-lang
17:53
dbackeus has joined #crystal-lang
17:54
ssvb has joined #crystal-lang
17:55
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:55
kostya has quit [Remote host closed the connection]
18:01
BloodyHistory has joined #crystal-lang
18:01
BloodyHistory has quit [Client Quit]
18:10
leafybasil has joined #crystal-lang
18:31
trapped has quit [Read error: Connection reset by peer]
18:31
trapped has joined #crystal-lang
18:57
strcmp1 has quit [Ping timeout: 250 seconds]
18:59
<
crystal-gh >
crystal/master 141172d Tobias Pfeiffer: Order methods in enumerable alphabetically
18:59
<
crystal-gh >
crystal/master 6c1a184 Tobias Pfeiffer: Alphabetically sort enumerable_spec
18:59
<
crystal-gh >
crystal/master 3354ae6 Tobias Pfeiffer: Add a couple of missing method specs to enumerable
19:20
kulelu88 has joined #crystal-lang
19:20
<
crystal-gh >
[crystal] bjmllr opened pull request #1221: typeof: add type flattening example (gh-pages...doc-typeof)
http://git.io/vsItM
19:39
<
BlaXpirit >
so I made a Deque class that has a subset of Array's API but, of course, with optimal access to both ends, not just the right one
19:39
<
BlaXpirit >
and to very quicky test it without writing a lot of boilerplate,
19:39
<
BlaXpirit >
i want to execute the same things on a Deque and Array and check for equality after every step
19:40
<
BlaXpirit >
but it's kinda ugly and i don't know how to do it without globals / inside `describe`
19:41
<
BlaXpirit >
the reason i'm doing this is there are very many things that can go wrong with the implementation details
19:41
<
BlaXpirit >
i even considered fuzzing, but instead i just wanna write a sequence of actions that trips up all the potential problematic tests
19:41
<
BlaXpirit >
problematic places*
19:42
<
BlaXpirit >
and in addition to that i'll just write normal simple tests of methods
19:45
<
jhass >
make a class?
19:45
<
BlaXpirit >
jhass, u mean this pattern is ok but i just wrap it in a class?
19:46
<
jhass >
pretty much, stdlib spec doesn't allow for much more
19:49
<
crystal-gh >
[crystal] asterite closed pull request #1207: add MatchData#pre_match and #post_match and document MatchData (master...prematch)
http://git.io/v3A4N
19:50
<
crystal-gh >
crystal/master 0b964d3 Ary Borenszweig: Simpler and faster `MatchData#pre_match` and `MatchData#post_match`. Related to #1207
19:57
dbackeus has quit []
20:37
endou___________ has left #crystal-lang [#crystal-lang]
20:40
ror has joined #crystal-lang
20:41
ror has quit [Client Quit]
20:41
infrashortfoo has joined #crystal-lang
20:44
<
ddfreyne_ >
Ah man, I love Crystal's stack-allocated structs. Been replacing some classes with structs and arrays with tuples, and performance went way up.
20:47
<
ddfreyne_ >
+ lldb and set a breakpoint at __crystal_malloc and you can eliminate all heap allocations.
21:08
blue_deref has quit [Quit: bbn]
21:15
BlaXpirit has quit [Quit: Konversation]
21:28
<
dzv >
crystal: Instructions.cpp:1085: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
21:29
<
dzv >
these errors show up periodically when i add LibC.printf in various places (currently FileDescriptorIO), but not always
22:29
havenwood has joined #crystal-lang
23:03
waj has quit [Remote host closed the connection]
23:16
NeverDie has joined #crystal-lang
23:25
<
crystal-gh >
crystal/master c2255c0 Ary Borenszweig: Make Time.epoch always return UTC times. Fixes #1210
23:55
zamith has joined #crystal-lang