ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.4 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vXfu4
<crystal-gh> crystal/master 542cf0c Ary Borenszweig: Compiler: fixed parser bug
<crystal-gh> crystal/master 9aa2ed8 Ary Borenszweig: JSON: fixed error message for too deep nesting
matp_ has quit [Quit: ZZzzzZz...]
matp has joined #crystal-lang
<crystal-gh> [crystal] bcardiff closed pull request #3475: Moves permalink hashtag into gutter in docs (master...feat/doc-permalink-gutter) https://git.io/vXvOh
<travis-ci> crystal-lang/crystal#542cf0c (master - Compiler: fixed parser bug): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/170954314
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 260 seconds]
<travis-ci> crystal-lang/crystal#680c099 (master - moves permalink hashtag into gutter for better visual distinguishability of header (#3475)): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/170957165
<DeBot> https://github.com/crystal-lang/crystal/pull/3475 (Moves permalink hashtag into gutter in docs)
danzilio has quit [Remote host closed the connection]
pduncan has joined #crystal-lang
danzilio has joined #crystal-lang
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 250 seconds]
idev0urer has joined #crystal-lang
Philpax has joined #crystal-lang
pduncan has quit [Ping timeout: 260 seconds]
Philpax has quit [Ping timeout: 260 seconds]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 245 seconds]
pawnbox has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 252 seconds]
HakanD_ has joined #crystal-lang
pawnbox has joined #crystal-lang
HakanD_ has quit [Quit: Be back later ...]
HakanD_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
HakanD_ has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
idev0urer has quit [Ping timeout: 250 seconds]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 276 seconds]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mark_66 has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
Philpax has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
ishahnaz has joined #crystal-lang
gloscombe has joined #crystal-lang
ishahnaz has quit []
ishahnaz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
ponga has joined #crystal-lang
<FromGitter> <sdogruyol> so i'd like to pass HTTP::Server::Context through multiple middlewares and modifying the response body each time
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
ishahnaz has quit []
jeromegn__ has joined #crystal-lang
jeromegn_ has quit [Ping timeout: 256 seconds]
jeromegn__ is now known as jeromegn_
bjz has joined #crystal-lang
pduncan has joined #crystal-lang
hmans has quit [Quit: ZNC 1.6.3+deb1+xenial0 - http://znc.in]
hmans has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pduncan has quit [Ping timeout: 265 seconds]
soveran has quit [Remote host closed the connection]
bjz has joined #crystal-lang
<FromGitter> <raydf> Hi @sdogruyol, why can't you?
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Raimondi has quit [Ping timeout: 244 seconds]
Raimondi has joined #crystal-lang
sai_ has joined #crystal-lang
sai_ has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bjz has quit [Ping timeout: 250 seconds]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
<FromGitter> <sdogruyol> i've done it
<FromGitter> <sdogruyol> it's just the test suite acting weird
<FromGitter> <sdogruyol> :P
pduncan has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
jeromegn_ has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> i've a weird situation
<FromGitter> <sdogruyol> the blocks always get evaluated before the add_handler CustomTestHandler.new call (even it's before the block declarations)
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <sdogruyol> it's funny that crystal spec fails yet requiring the files one by one does not
<FromGitter> <sdogruyol> i don't get it
HakanD_ has joined #crystal-lang
jeromegn_ has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
Raimondii has joined #crystal-lang
Raimondi has quit [Remote host closed the connection]
Raimondii is now known as Raimondi
HakanD_ is now known as HakanD
soveran has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vXJjY
<crystal-gh> crystal/master 36b2fc4 Ary Borenszweig: JSON: add more robust specs for deep nesting check, and fix error message
pduncan has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
pawnbox has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#36b2fc4 (master - JSON: add more robust specs for deep nesting check, and fix error message): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/171127560
soveran has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
Cyrus has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
pawnbox_ has joined #crystal-lang
Raimondi has quit [Write error: Broken pipe]
Raimondi has joined #crystal-lang
pawnbox has quit [Ping timeout: 271 seconds]
pawnbox has joined #crystal-lang
pawnbox_ has quit [Read error: Connection reset by peer]
bazaar has quit [Ping timeout: 256 seconds]
mhib has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
mhib has quit [Quit: Leaving]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<jokke> how would you guys feel about Tempfile having a finalize where it unlinks?
<jokke> i think that'd be kinda neat
<FromGitter> <sdogruyol> are we in for implicit stuff like that?
<FromGitter> <johnjansen> doesnt the block form do that?
<jokke> nope
<jokke> block form closes
<FromGitter> <johnjansen> oh so you mean forcibly sweep
<jokke> sweep?
<jokke> i mean delete the file
<FromGitter> <johnjansen> yeah ignore me
<FromGitter> <johnjansen> have you looked at best practises over here http://ruby-doc.org/stdlib-1.9.3/libdoc/tempfile/rdoc/Tempfile.html
<FromGitter> <johnjansen> note this comment `When a Tempfile object is garbage collected, or when the Ruby interpreter exits, its associated temporary file is automatically deleted. `
<FromGitter> <johnjansen> although they go on to say you should unlink … which is understandable but a little sideways
<FromGitter> <johnjansen> i assume the ruby behaviour is tried and true and has merit
Ven has joined #crystal-lang
bazaar has joined #crystal-lang
<FromGitter> <johnjansen> anyone got a good example of a macro which can wrap block content
<BlaXpirit> johnjansen, could you be more precise?
<BlaXpirit> >> macro test; {{yield}}; {{yield}}; end; test { p 5 }
<DeBot> BlaXpirit: 5 - more at https://carc.in/#/r/1cur
<FromGitter> <johnjansen> something like ⏎ ⏎ ``` lazy address do ⏎ @address ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=58126a448ed1c0ff5c3688c4]
<FromGitter> <johnjansen> yield … that is the magic
<FromGitter> <johnjansen> so obvious
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bazaar has quit [Ping timeout: 260 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has quit [Remote host closed the connection]
<FromGitter> <jwoertink> How do I make an array of specific classes?
<FromGitter> <jwoertink> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=581276578ed1c0ff5c36c3c6]
<FromGitter> <johnjansen> the class itself???
<FromGitter> <jwoertink> This throws an index out of bounds error
<FromGitter> <jwoertink> Yes, I want `[String, Nil]`
<FromGitter> <johnjansen> thats an array which can hold a String.class or Nil.class
<FromGitter> <johnjansen> `[String, Nil]`
<FromGitter> <johnjansen> ?
<FromGitter> <jwoertink> Yes, that's the end result I want. How do I make that?
<FromGitter> <johnjansen> hmmm `a = [String, Nil]`
<FromGitter> <jwoertink> lol
<FromGitter> <johnjansen> am i missing something?
<FromGitter> <jwoertink> I don't know the length, or order of the array
<FromGitter> <jwoertink> and it could have more than just those 2 classes
<FromGitter> <johnjansen> or ⏎ ```a = [] of String.class | Nil.class ⏎ a << String.class ⏎ a << Nil.class ⏎ a[1]``` [https://gitter.im/crystal-lang/crystal?at=581276f77b15d16e55b70745]
<FromGitter> <johnjansen> wait that didnt work
<FromGitter> <jwoertink> ah, just using the shovel works
<FromGitter> <johnjansen> shovel?
<FromGitter> <jwoertink> `<<`
<FromGitter> <jwoertink> shovel operator
<FromGitter> <johnjansen> oh haha
<FromGitter> <johnjansen> havent heard that before
<FromGitter> <jwoertink> That's weird that `a[0] = String` doesn't work but `a << String` does
<FromGitter> <jwoertink> maybe because the array needs to know the length for the first one?
<FromGitter> <johnjansen> until there is a 0 there isnt anything to assign to
<FromGitter> <johnjansen> or it would be a sparse array and you could do a[326473643] = blah
<FromGitter> <jwoertink> cool, thanks
<FromGitter> <johnjansen> i dont know how you would do `.size` if the array was assignable like that
<FromGitter> <jwoertink> you would iterate over each element regardless of it's position, and increment a counter
<FromGitter> <johnjansen> ok rephrase, i dont know how you would do it fast
<FromGitter> <jwoertink> lol
<FromGitter> <jwoertink> me either. That's above my paygrade
<FromGitter> <johnjansen> and you couldn’t iterate to size
<FromGitter> <johnjansen> that would be equivalent to a table scan
<FromGitter> <johnjansen> although you could implement it with a different underlying structure, which would probably make the correct option for that kind of access a hash
<FromGitter> <johnjansen> :-)
Raimondi has quit [Write error: Broken pipe]
Raimondi has joined #crystal-lang
matp has quit [Excess Flood]
Raimondii has joined #crystal-lang
Raimondi has quit [Remote host closed the connection]
Raimondii is now known as Raimondi
HakanD has quit [Ping timeout: 256 seconds]
<FromGitter> <jwoertink> Apparently you can't use a Tuple for a class variable? https://play.crystal-lang.org/#/r/1cvi
<FromGitter> <johnjansen> you need to tell it what the tuple contains
<FromGitter> <johnjansen> and a tuple is immutable, so an empty one is useless
<FromGitter> <johnjansen> it would be `x = [] of Tuple(String, String, Int32)`
<FromGitter> <johnjansen> https://play.crystal-lang.org/#/r/1cvk
<FromGitter> <jwoertink> ah, ok.
matp has joined #crystal-lang