jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.6 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
waj has quit [Remote host closed the connection]
sleeper is now known as sleeper_
kulelu88 has left #crystal-lang ["Leaving"]
waj has joined #crystal-lang
kyrylo has quit [Quit: Konversation terminated!]
kyrylo has joined #crystal-lang
waj_ has joined #crystal-lang
waj has quit [Ping timeout: 244 seconds]
kyrylo has quit [Ping timeout: 264 seconds]
blue_deref has joined #crystal-lang
sardaukar has quit [Ping timeout: 256 seconds]
sardaukar has joined #crystal-lang
waj has joined #crystal-lang
waj__ has joined #crystal-lang
waj_ has quit [Ping timeout: 265 seconds]
waj has quit [Ping timeout: 260 seconds]
waj__ has quit [Remote host closed the connection]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
blue_deref has quit [Quit: bbn]
sailorswift has joined #crystal-lang
BlaXpirit has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
BlaXpirit has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
BlaXpirit has joined #crystal-lang
BloodyHistory has joined #crystal-lang
<BloodyHistory> Hi there! Anybody know where sources of this book located? http://crystal-lang.org/docs/
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BloodyHistory> BlaXpirit, thanks!
Ven has joined #crystal-lang
BloodyHistory has quit [Quit: Textual IRC Client: www.textualapp.com]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
strcmp1 has quit [Quit: Leaving]
yopp has quit [Ping timeout: 264 seconds]
zamith has joined #crystal-lang
sleeper_ is now known as sleeper
yopp has joined #crystal-lang
dbackeus has joined #crystal-lang
kyrylo has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
zamith has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
havenwood has quit [Ping timeout: 244 seconds]
dbackeus has quit [Remote host closed the connection]
<crystal-gh> [crystal] kostya opened pull request #1220: add tcp examples, fixed #1198 (master...tcp_examples) http://git.io/vsJgW
BloodyHistory has joined #crystal-lang
Ven has joined #crystal-lang
blue_deref has joined #crystal-lang
blue_deref has quit [Client Quit]
BloodyHistory has quit [Client Quit]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 246 seconds]
dbackeus has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
<Netfeed> is there plans of making it possible to use Number i unions?
dbackeus has joined #crystal-lang
strcmp1 has joined #crystal-lang
ssvb has quit [Ping timeout: 260 seconds]
shadeslayer_ is now known as shadeslayer
strcmp1 has quit [Quit: Leaving]
sailorswift has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 240 seconds]
waj has joined #crystal-lang
blue_deref has joined #crystal-lang
waj has quit [Remote host closed the connection]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<trapped> is there any way to obtain the client's address from an HTTP::Request?
<BlaXpirit> trapped, you mean your own address?
<BlaXpirit> and local/global?
<jhass> Netfeed: just make an alias for now, alias SomeNumber = Int8|Int32|Int64|UInt8|UInt32|UInt64|Float32|Float64
<trapped> BlaXpirit: no, the client's address
<jhass> trapped: with or without reverse proxy in front?
<trapped> either
<trapped> considering nginx set X-Forwarded-For afaik
<trapped> thanks
<jhass> the socket's peer address doesn't seem to be exposed atm
<Netfeed> jhass: oh, nice, thanks
NeverDie has joined #crystal-lang
sleeper is now known as sleeper_
ssvb has joined #crystal-lang
leafybasil has joined #crystal-lang
waj has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 246 seconds]
Raimondii is now known as Raimondi
waj has quit []
<Netfeed> can you have abstract class methods?
<Netfeed> oh, neat, you can
waj has joined #crystal-lang
dbackeus_ has joined #crystal-lang
dbackeus has quit [Read error: Connection reset by peer]
havenwood has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
kostya has joined #crystal-lang
BlaXpirit has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
dbackeus_ has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
justinmcp has quit [*.net *.split]
wonderbreadz has quit [*.net *.split]
justinmcp has joined #crystal-lang
wonderbreadz has joined #crystal-lang
waj has quit [Remote host closed the connection]
waj has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
shama has joined #crystal-lang
strcmp1 has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 260 seconds]
leafybas_ has joined #crystal-lang
kyrylo has quit [Remote host closed the connection]
<BlaXpirit> hmm... is the C-style formatting mini-language beneficial for Crystal
<BlaXpirit> i mean, %d and %s have exactly the same effect as far as i see
<BlaXpirit> >> "%3d" % "5"
<DeBot> BlaXpirit: # => " 5" - http://carc.in/#/r/bu2
<jhass> it probably should raise if passed a string, yeah
kyrylo has joined #crystal-lang
<BlaXpirit> are there some formatting options that can be combined with #{} interpolation?
<jhass> I'm not sure I get your question but I think the answer is no
<BlaXpirit> well, i can just wish it used Python's way
<jhass> (you might want to clarify you question)
<BlaXpirit> Python has this string formatting
<BlaXpirit> "{:3d} {named:3d}".format(x, named=y)
<BlaXpirit> which is equivalent to "%3s %3s" % (x, y)
<BlaXpirit> i find it quite good
<BlaXpirit> sorry, i meant "{:3} {named:3}".format(x, named=y)
<jhass> >> "%3d %{foo}" % 5, {"foo": "bar"}
<DeBot> jhass: Syntax error in eval:4: unexpected token: NEWLINE - http://carc.in/#/r/bu3
<jhass> meh
<jhass> >> "%3d %{foo}" % {5, {"foo": "bar"}}
<DeBot> jhass: # => " 5 bar" - http://carc.in/#/r/bu4
<jhass> we got these recently
<BlaXpirit> these "d" suffixes are kinda irrelevant
<jhass> don't think you can combine them with formatters yet I guess
<jhass> >> "%3d %{foo}10s" % {5, {"foo": "bar"}}
<DeBot> jhass: # => " 5 bar10s" - http://carc.in/#/r/bu5
<BlaXpirit> and what's nicest is each type can define its own formatting options
<jhass> >> "%3d %10{foo}s" % {5, {"foo": "bar"}}
<DeBot> jhass: ArgumentError: malformed format string - %'{' - more at http://carc.in/#/r/bu6
<jhass> >> "%3d %<foo>10s" % {5, {"foo": "bar"}}
<DeBot> jhass: # => " 5 bar" - http://carc.in/#/r/bu7
<jhass> >> "%5d" % "foo"
<DeBot> jhass: ArgumentError: invalid Int32: foo - more at http://carc.in/#/r/bu8
<jhass> there's your diff
<jhass> it does call .to_i on the arg for you
<BlaXpirit> ooh
zamith has joined #crystal-lang
ssvb has quit [Ping timeout: 244 seconds]
wonderbreadz has quit [Ping timeout: 256 seconds]
leafybas_ has quit [Remote host closed the connection]
zamith has quit [Quit: Be back later ...]
wonderbreadz has joined #crystal-lang
dbackeus has joined #crystal-lang
ssvb has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kostya has quit [Remote host closed the connection]
BloodyHistory has joined #crystal-lang
BloodyHistory has quit [Client Quit]
leafybasil has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
strcmp1 has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] asterite pushed 5 new commits to master: http://git.io/vskjw
<crystal-gh> crystal/master 141172d Tobias Pfeiffer: Order methods in enumerable alphabetically
<crystal-gh> crystal/master 6c1a184 Tobias Pfeiffer: Alphabetically sort enumerable_spec
<crystal-gh> crystal/master 3354ae6 Tobias Pfeiffer: Add a couple of missing method specs to enumerable
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
kulelu88 has joined #crystal-lang
<crystal-gh> [crystal] bjmllr opened pull request #1221: typeof: add type flattening example (gh-pages...doc-typeof) http://git.io/vsItM
<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
<BlaXpirit> and to very quicky test it without writing a lot of boilerplate,
<BlaXpirit> i want to execute the same things on a Deque and Array and check for equality after every step
<BlaXpirit> so uh something like this works https://bpaste.net/show/67ad8bd36937
<BlaXpirit> but it's kinda ugly and i don't know how to do it without globals / inside `describe`
<BlaXpirit> the reason i'm doing this is there are very many things that can go wrong with the implementation details
<BlaXpirit> i even considered fuzzing, but instead i just wanna write a sequence of actions that trips up all the potential problematic tests
<BlaXpirit> problematic places*
<BlaXpirit> and in addition to that i'll just write normal simple tests of methods
<jhass> make a class?
<BlaXpirit> jhass, u mean this pattern is ok but i just wrap it in a class?
<jhass> pretty much, stdlib spec doesn't allow for much more
<crystal-gh> [crystal] asterite closed pull request #1207: add MatchData#pre_match and #post_match and document MatchData (master...prematch) http://git.io/v3A4N
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vsI4a
<crystal-gh> crystal/master 0b964d3 Ary Borenszweig: Simpler and faster `MatchData#pre_match` and `MatchData#post_match`. Related to #1207
<BlaXpirit> looking pretty good https://bpaste.net/show/df900e8ad5ae
dbackeus has quit []
<travis-ci> manastech/crystal#bafee05 (master - Merge pull request #1212 from PragTob/sort-enumerable-methods): The build was fixed. https://travis-ci.org/manastech/crystal/builds/76162172
<travis-ci> manastech/crystal#06b3897 (master - Merge pull request #1207 from bjmllr/prematch): The build was fixed. https://travis-ci.org/manastech/crystal/builds/76170455
endou___________ has left #crystal-lang [#crystal-lang]
ror has joined #crystal-lang
ror has quit [Client Quit]
infrashortfoo has joined #crystal-lang
<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.
<BlaXpirit> :>
<ddfreyne_> + lldb and set a breakpoint at __crystal_malloc and you can eliminate all heap allocations.
blue_deref has quit [Quit: bbn]
BlaXpirit has quit [Quit: Konversation]
<travis-ci> manastech/crystal#0b964d3 (master - Simpler and faster `MatchData#pre_match` and `MatchData#post_match`. Related to #1207): The build has errored. https://travis-ci.org/manastech/crystal/builds/76170761
<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.
<dzv> these errors show up periodically when i add LibC.printf in various places (currently FileDescriptorIO), but not always
havenwood has joined #crystal-lang
waj has quit [Remote host closed the connection]
NeverDie has joined #crystal-lang
<travis-ci> manastech/crystal#0b964d3 (master - Simpler and faster `MatchData#pre_match` and `MatchData#post_match`. Related to #1207): The build was fixed. https://travis-ci.org/manastech/crystal/builds/76170761
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vsL1O
<crystal-gh> crystal/master c2255c0 Ary Borenszweig: Make Time.epoch always return UTC times. Fixes #1210
zamith has joined #crystal-lang