jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.4 | Fund Crystals development: http://to.ly/TtGw | 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
havenwood has quit [Read error: Connection reset by peer]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 244 seconds]
jtarchie has quit [Quit: Connection closed for inactivity]
Locke23rus has joined #crystal-lang
<Locke23rus> how can i fix the problem? https://gist.github.com/Locke23rus/482528c5d2e570bcb2fb
<Locke23rus> it works on http://play.crystal-lang.org/
willl has quit [Quit: Connection closed for inactivity]
_Mercurial has joined #crystal-lang
<_Mercurial> Hi, is there an sftp library in crystal?
<adam12> There are libssh2 bindings I believe. They might work?
<_Mercurial> thank you, I'll check them out
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
<travis-ci> manastech/crystal#61a3e3e (master - Merge pull request #1055 from daviswahl/nested_multiline_ternary): The build was broken. https://travis-ci.org/manastech/crystal/builds/73309192
<18WAACTWI> [crystal] asterite closed pull request #1053: String#succ (master...String#succ) http://git.io/vY96E
<6JTABPGAH> [crystal] asterite pushed 2 new commits to master: http://git.io/vYpsY
<6JTABPGAH> crystal/master 3ddfa84 Sergio Gil Pérez de la Manga: String#succ
<6JTABPGAH> crystal/master b25efb8 Ary Borenszweig: Merge pull request #1053 from porras/String#succ...
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vYps7
<crystal-gh> crystal/master e4ab640 yui-knk: [ci skip] Fix returned type of `Def#body`
<crystal-gh> crystal/master c06c35c Ary Borenszweig: Merge pull request #1050 from yui-knk/doc/fix_body...
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vYpsd
<crystal-gh> crystal/master 11a92be yui-knk: [ci skip] Add docs for class_name macro method
<crystal-gh> crystal/master ddf4d59 Ary Borenszweig: Merge pull request #1044 from yui-knk/docs/class_name...
<_Mercurial> hi, how do I use command line tools using crystal?
flaviu has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] asterite closed pull request #1039: [ci skip] Add macro id examples (master...doc/macro_id) http://git.io/vYwJp
<crystal-gh> [crystal] asterite closed pull request #1038: [ci skip] Fix mardown format and code example (master...doc/fix_md) http://git.io/vYwJ9
<crystal-gh> [crystal] asterite closed pull request #1037: [ci skip] Fix Docs of `superclass` (master...fix/docs) http://git.io/vYVue
<travis-ci> manastech/crystal#61a3e3e (master - Merge pull request #1055 from daviswahl/nested_multiline_ternary): The build passed. https://travis-ci.org/manastech/crystal/builds/73309192
<crystal-gh> [crystal] asterite closed pull request #1032: Small String doc correction (gh-pages...patch-1) http://git.io/vY0VO
flaviu has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vYpnt
<crystal-gh> crystal/master 7d82efe Julien Portalier: Expose Def#visibility to macros
<crystal-gh> crystal/master e1b25f7 Ary Borenszweig: Merge pull request #957 from ysbaddaden/compiler-macro-methods...
<crystal-gh> crystal/master 5a7fd64 Julien Portalier: Add ArrayLiteral#push, #<< and #unshift mutation methods
<crystal-gh> [crystal] asterite closed pull request #1027: Expose Def#visibility to macros (master...macro-def-visibility) http://git.io/vYLRl
<travis-ci> manastech/crystal#b25efb8 (master - Merge pull request #1053 from porras/String#succ): The build passed. https://travis-ci.org/manastech/crystal/builds/73310185
<crystal-gh> [crystal] asterite pushed 5 new commits to master: http://git.io/vYpnB
<crystal-gh> crystal/master cafe088 Will Leinweber: add Char#===(:Int)
<crystal-gh> crystal/master cafe835 Will Leinweber: Add Int#===(:Char)
<crystal-gh> crystal/master cafec0f Will Leinweber: Remove other when…Char.ord cases
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vYpnz
<crystal-gh> crystal/master 7781848 Ary Borenszweig: Extract a couple of constant arrays in the parser
<crystal-gh> crystal/master 06419ef Ary Borenszweig: Check bytesize instead of length in String#succ (a bit faster)
<travis-ci> manastech/crystal#0b8326c (master - Merge pull request #1041 from porras/array-multiplication): The build passed. https://travis-ci.org/manastech/crystal/builds/73310568
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vYpnX
<crystal-gh> crystal/master 4b41e14 TSUYUSATO Kitsune: Fix generating the document of VirtualType
<crystal-gh> crystal/master 4920944 Ary Borenszweig: Merge pull request #1021 from MakeNowJust/fix-gen-doc-bug...
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vYpnH
<crystal-gh> crystal/master edc0903 yui-knk: Fix/test desc...
<crystal-gh> crystal/master 51e3e48 Ary Borenszweig: Merge pull request #888 from yui-knk/fix/test_desc2...
<crystal-gh> [crystal] asterite closed pull request #670: Added String#succ (master...master) http://git.io/vTC8x
<travis-ci> manastech/crystal#e1b25f7 (master - Merge pull request #957 from ysbaddaden/compiler-macro-methods): The build passed. https://travis-ci.org/manastech/crystal/builds/73311222
<travis-ci> manastech/crystal#5bf5ba7 (master - Merge pull request #1023 from will/uint8char): The build passed. https://travis-ci.org/manastech/crystal/builds/73311312
_Mercurial has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Locke23rus has quit [Remote host closed the connection]
<travis-ci> manastech/crystal#06419ef (master - Check bytesize instead of length in String#succ (a bit faster)): The build passed. https://travis-ci.org/manastech/crystal/builds/73311322
_Mercurial has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vYplW
<crystal-gh> crystal/master 5e98de3 Ary Borenszweig: Simplified some code by removing some `Char#ord` calls
<travis-ci> manastech/crystal#2776 (master - edc0903 : yui-knk): The build passed.
waj has joined #crystal-lang
<travis-ci> manastech/crystal#4920944 (master - Merge pull request #1021 from MakeNowJust/fix-gen-doc-bug): The build passed. https://travis-ci.org/manastech/crystal/builds/73311374
waj has quit [Ping timeout: 264 seconds]
strcmp1 has quit [Quit: Leaving]
<travis-ci> manastech/crystal#5e98de3 (master - Simplified some code by removing some `Char#ord` calls): The build passed. https://travis-ci.org/manastech/crystal/builds/73312914
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 240 seconds]
havenwood has joined #crystal-lang
_Mercurial has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
unshadow has joined #crystal-lang
<unshadow> So, I want to create an array who will accept hashes, I do as follow:
<unshadow> a = [] of Hash(String => Int32)
<unshadow> >> a = [] of Hash(String => Int32)
<DeBot> unshadow: Syntax error in eval:4: expecting token ')', not '=>' - http://carc.in/#/r/905
<unshadow> and I'm getting this error
rappo has quit [Quit: ZNC - http://znc.in]
rappo has joined #crystal-lang
Ven has joined #crystal-lang
dbackeus has joined #crystal-lang
nahtnam has quit [Quit: Connection closed for inactivity]
BlaXpirit has joined #crystal-lang
elia has joined #crystal-lang
<thor77> >> [] of Hash(String, Int32)
<DeBot> thor77: # => [] - http://carc.in/#/r/90b
<thor77> unshadow: ^
<thor77> >> a = [] of Hash(String, Int32)
<DeBot> thor77: # => [] - http://carc.in/#/r/90c
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<unshadow> Oh... Thansk thor77
<jhass> >> [] of String => Int32
<DeBot> jhass: Syntax error in eval:4: unexpected token: => - http://carc.in/#/r/90d
<jhass> mmh
<jhass> >> [] of (String => Int32)
<DeBot> jhass: Syntax error in eval:4: expecting token ')', not '=>' - http://carc.in/#/r/90e
willl has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elia has quit [Quit: (IRC Client: textualapp.com)]
elia has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Remote host closed the connection]
Ven has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
Locke23rus has joined #crystal-lang
dbackeus has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
<jhass> >> "ÄÖ".downcase
<DeBot> jhass: # => "ÄÖ" - http://carc.in/#/r/90f
<jhass> :(
<BlaXpirit> wow that really really sucks
<BlaXpirit> >> "А".downcase
<DeBot> BlaXpirit: # => "А" - http://carc.in/#/r/90g
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vYjWT
<crystal-gh> crystal/master 99cb436 Ary Borenszweig: Make macro method `visibility` return :public instead of nil. Related to #1027 and #957
dbackeus has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<Kilo`byte> how do i use the websocket stuff?
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vYj2p
<crystal-gh> crystal/master 0e2e119 Ary Borenszweig: Fixed #1010: allow assigning to underscore (_), give compile-time error when trying to read from it
<Kilo`byte> like, i want a server that serves normal http, except on lets say /websocket
Locke23rus has quit [Ping timeout: 240 seconds]
<thor77> Kilo`byte: theres HTTPServer
<thor77> >> "a.".upper
<DeBot> thor77: Error in line 4: undefined method 'upper' for String - http://carc.in/#/r/90i
<Kilo`byte> thor77: yeah, but how'd i use it with websockets
<thor77> >> "a.".uppercase
<DeBot> thor77: Error in line 4: undefined method 'uppercase' for String - http://carc.in/#/r/90j
<jhass> Kilo`byte: you'll have to write a handler that delegates to the other handlers depending on path
<Kilo`byte> ic
<thor77> >> "a".upcase
<DeBot> thor77: # => "A" - http://carc.in/#/r/90k
<thor77> >> "a".upcase.downcase
<DeBot> thor77: # => "a" - http://carc.in/#/r/90l
<jhass> Kilo`byte: http://carc.in/#/r/8er
<thor77> >> "A".downcase
<DeBot> thor77: # => "a" - http://carc.in/#/r/90m
<thor77> wut
<jhass> >> "AА".codepoints
<DeBot> jhass: Error in line 4: undefined method 'codepoints' for String - http://carc.in/#/r/90n
<jhass> :/
<thor77> why did that not work at 13:18 o.O
<jhass> >> "AА".bytes
<DeBot> jhass: # => [65, 208, 144] - http://carc.in/#/r/90o
<jhass> >> "AА".chars.map &.ord
<DeBot> jhass: # => [65, 1040] - http://carc.in/#/r/90p
<thor77> what does the "&" do?
<BlaXpirit> create a function that takes one argument and calls .ord on it
<BlaXpirit> thor77,
<thor77> and a functions is accepted as &block?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> not quite, &. is actually syntax
<jhass> so &.expr is short for {|var| var.expr }
<BlaXpirit> so it creates a block
<jhass> >> "AА".chars.map {|char| char.ord }
<DeBot> jhass: # => [65, 1040] - http://carc.in/#/r/90q
<jhass> yes, but blocks are a syntax construct, not equal to functions
<jhass> (or Proc's for the matter)
<thor77> uh, didn't know that. thanks for the explanation :)
<travis-ci> manastech/crystal#0e2e119 (master - Fixed #1010: allow assigning to underscore (_), give compile-time error when trying to read from it): The build passed. https://travis-ci.org/manastech/crystal/builds/73362920
Locke23rus has joined #crystal-lang
Ven has joined #crystal-lang
<thor77> https://gist.github.com/Thor77/e95928efcf72bf5d59ca uhm, anything i can do about this?
<thor77> should i create the IRCChannelManager as local-var and assign it after init to an instance-var?
Ven has quit [Read error: No route to host]
<thor77> or is there any other (better) way to do it?
Ven has joined #crystal-lang
elia has quit [Read error: Connection reset by peer]
elia has joined #crystal-lang
strcmp1 has joined #crystal-lang
<thor77> >> "#abc".starts_with? '#'
<DeBot> thor77: # => true - http://carc.in/#/r/910
<thor77> >> "#abc".starts_with? "#"
<DeBot> thor77: # => true - http://carc.in/#/r/911
dwahl has joined #crystal-lang
<crystal-gh> [crystal] jhass opened pull request #1059: Add convenience methods for accessing a strings codepoints (master...codpoints) http://git.io/vYjd7
<jhass> thor77: local var won't escape it, there's no real way around it, which usually hints that it's a sign for some potential design improvement ;)
<jhass> handing out self in a constructor is often asking for trouble, especially in multi threaded environments
<thor77> ah, okey
<thor77> seems like i found a way to improve my design :)
sdogruyol has joined #crystal-lang
elia has quit [Quit: (IRC Client: textualapp.com)]
<sdogruyol> hey all
elia has joined #crystal-lang
<dwahl> hello
sdogruyol has quit [Remote host closed the connection]
mgarciaisaia has joined #crystal-lang
Ven has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
Ven has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 5 new commits to master: http://git.io/vOe4r
strcmp1 has quit [Ping timeout: 272 seconds]
<crystal-gh> crystal/master 3ae391c Jonne Haß: Add codepoints convenience methods to String...
<crystal-gh> crystal/master 81bc0a1 Jonne Haß: Document String#each_char, String#each_char_with_index and String#chars
<crystal-gh> crystal/master be1e6d7 Jonne Haß: Document String#each_byte and move String#bytes near it
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOeRv
<crystal-gh> crystal/master 16a6ccc Ary Borenszweig: Document `Def#visibility`
<crystal-gh> crystal/master cd3c500 Ary Borenszweig: Simpler implementation for `String#each_codepoint` iterator
dbackeus has quit []
<asterite> I think today I'll release 0.7.5. There are some breaking changes mainly to renames and dropping the 0 prefix for octals, but I don't think incresing the minor is worth it (it's mostly a bug-fix release, again)
blue_deref has joined #crystal-lang
<jhass> asterite: disallowing to reopen Module might be a quick thing to include :P http://carc.in/#/r/91f
<jhass> oh, nvm
<jhass> I broke carc.in :/
<jhass> going back and forth doesn't always update the code view anymore :(
<travis-ci> manastech/crystal#2eed5f0 (master - Merge pull request #1059 from jhass/codpoints): The build passed. https://travis-ci.org/manastech/crystal/builds/73385031
sdogruyol has quit [Remote host closed the connection]
<travis-ci> manastech/crystal#cd3c500 (master - Simpler implementation for `String#each_codepoint` iterator): The build passed. https://travis-ci.org/manastech/crystal/builds/73385672
dbackeus has joined #crystal-lang
<asterite> jhass: what do you mean?
<jhass> nothing, ignore me
<asterite> :-o
dwahl has quit [Ping timeout: 265 seconds]
<asterite> Wrong example?
Mercurial_ has joined #crystal-lang
<Mercurial_> Are there any examples of command line tools for Crystal?
<jhass> yeah, I broke carc.in as that it not always updates the code when I go back and forth so I get wrong error message to the code :/
<jhass> Mercurial_: how about crystal? scnr :P
<jhass> I wrote something rather custom for https://github.com/jhass/carc.in/blob/master/src/sandbox.cr
<jhass> and probably a couple more, seek through http://crystalshards.herokuapp.com/ if you want more examples
<Mercurial_> thank you so much, I'm thinking of making my own command line app
<jhass> nice, what's it for?
<Mercurial_> an app that gives you the biggest headlines, and sports scores
<jhass> ah, so ncurses based?
<Mercurial_> sorry if I sound like a noob, but what's ncurses?
<crystal-gh> [crystal] dbackeus opened pull request #1060: Fix nanosecond lie in HTTP::LogHandler (master...fix/nano-second-lie) http://git.io/vOe9i
<jhass> nvm then :P
<jhass> it's the stuff that allows you to do TUIs, like aptitude and such
<jhass> with windows, menus etc
<Mercurial_> ah ok
<Mercurial_> I'm just making a very simple command line program
dwahl has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOedv
<crystal-gh> crystal/master f8baef3 David Backeus: Fix nanosecond lie in HTTP::LogHandler...
<crystal-gh> crystal/master 8b33418 Ary Borenszweig: Merge pull request #1060 from dbackeus/fix/nano-second-lie...
<Mercurial_> thank you asterite!
NeverDie has joined #crystal-lang
Ven is now known as Guest11249
Guest11249 is now known as Ven_
aemadrid has quit [Remote host closed the connection]
willl has quit [Remote host closed the connection]
<BlaXpirit> nice example
<travis-ci> manastech/crystal#8b33418 (master - Merge pull request #1060 from dbackeus/fix/nano-second-lie): The build passed. https://travis-ci.org/manastech/crystal/builds/73396793
willl has joined #crystal-lang
havenwood has joined #crystal-lang
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
aemadrid has joined #crystal-lang
blue_deref has quit [Quit: bbn]
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
blue_deref has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 246 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 260 seconds]
Mercurial_ has joined #crystal-lang
shama has joined #crystal-lang
<dbackeus> how can I require recursively all directories + files under current directory?
<dbackeus> require "./**" doesn't seem to take me that far
lucasb has joined #crystal-lang
<dbackeus> never mind I had the wrong file extension
<lucasb> asterite: I read in the log about a possible 0.7.5 release today. May I ask if it would be too much trouble to also make available a official 32bit binary for linux as well? But anyway, thank you and the other developers for the work!
<asterite> lucasb: yes, I'd like that too but we are still missing some bits that would take us more than one day to finish that
<lucasb> oh, that's ok. thanks, asterite
elia has quit [Quit: Computer has gone to sleep.]
mgarciaisaia has joined #crystal-lang
beepbeep has joined #crystal-lang
beepbeep has left #crystal-lang [#crystal-lang]
kumpelblase2 has joined #crystal-lang
unshadow has quit [Ping timeout: 265 seconds]
unshadow has joined #crystal-lang
strcmp1 has joined #crystal-lang
lucasb has left #crystal-lang [#crystal-lang]
<crystal-gh> [crystal] waj closed pull request #892: Fix HTTP::Request#keep_alive? method (master...master) http://git.io/vt0gQ
<adam12> :)
mgarciaisaia1 has joined #crystal-lang
fkchang has joined #crystal-lang
<travis-ci> manastech/crystal#4197043 (master - Don't try to keep-alive upgraded HTTP connections, like websockets (fixes #892)): The build passed. https://travis-ci.org/manastech/crystal/builds/73415904
mgarciaisaia has quit [Ping timeout: 264 seconds]
elia has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vOvFB
<crystal-gh> crystal/master 2a33a87 Ary Borenszweig: Updated Changelog
sdogruyol has joined #crystal-lang
blue_deref has quit [Quit: bbn]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
<fkchang> how often is the homebrew tap updated, w/every point release?
<travis-ci> manastech/crystal#2a33a87 (master - Updated Changelog): The build passed. https://travis-ci.org/manastech/crystal/builds/73418863
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
<sdogruyol> asterite: what's the time goal for 1.0.0?
<jhass> fkchang: yeah
<fkchang> jhass: so it's probably better to run off of master if I want quick updates (i.e. the last PR merged)
<strcmp1> 'fkchang: yeah' i can be forgiven for reading that as 'fuck yeah!'
<sdogruyol> lol
<asterite> What we need to do (and we'll start doing after this release) is to have a clear roadmap so everyone (including us!) know where we are going
<fkchang> strcmp1: I can accept being synonomous with 'fuck yeah'
<strcmp1> lol
mgarciaisaia has joined #crystal-lang
<sdogruyol> asterite: do you have a feature set on your mind for 1.0.0?
dbackeus has quit [Remote host closed the connection]
<asterite> They come and go, that's why we need to write them down :-)
mgarciaisaia1 has quit [Ping timeout: 244 seconds]
<asterite> Also, would be nice to have a list of all the things we want to do for 1.0, for example "File and FileUtils methods", so anyone can tackle that without wondering "do they really want to include this in the std?"
<strcmp1> im sure world domination and adoption of crystal by Windows as their replacement for .NET/C# family of languages is on the list.
<jhass> could live without that
<asterite> At curry on we spoke with Jeff (one of the main developers) and apparently a contributor ported Julia to Windows. Our (me and waj) main problem with windows is that it's been ages since we last used it... and we don't have nice memories about it
<jhass> arm support would be nice though
<jhass> is writing ruby extensions still on the list?
<dwahl> I think windows support isn't necessary for a 1.0 release because adding windows support wont mean adding breaking changes, so there's no reason to have it in for 1.0
<BlaXpirit> another problem with Windows is wrong assumptions about types https://github.com/manastech/crystal/issues/823 this was kinda forgotten about
<BlaXpirit> not only would one need to implement actual windows support, but also fix all kinds of bugs on the way
elia has quit [Quit: Computer has gone to sleep.]
<BlaXpirit> also the horror of bootstrapping
elia has joined #crystal-lang
grios has joined #crystal-lang
<asterite> BlaXpirit: definitely not forgotten, waj bumped into this issue some days ago and we definitely will fix it
elia has quit [Client Quit]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<sdogruyol> asterite: definitely having clear goals will encourage more people to help
<sdogruyol> asterite: rust is a great example
<asterite> Yes, rust is pretty well organized
<dwahl> when you reopen a class in crystal, how are those changes scoped? one of the horrors of ruby is that class changes are globally applied in the order that files are evaluated, but that wouldn't work in crystal due to static compilation (and shouldn't, really, because ugh)
<asterite> jhass: we were thinking about releases, doing a blog post for each release... we don't know, maybe we should just announce it on the google groups, tweet and that's it?
<kumpelblase2> quick question for specs: is there a nice way of checking if a bit is set? apart from (x & z).should eq(z) ?
<jhass> >> 0b10010.bit(2)
<DeBot> jhass: # => 0 - http://carc.in/#/r/93l
<jhass> ah, right 0-indexed
<jhass> asterite: if you think so, those are harder to link to though
<kumpelblase2> thank you
<asterite> Well, there's always the release tag on github that comes with the changelog
<asterite> On second thought, maybe a blog post for a release that contains something new or major is worth it, but bug-fix releases are not worth it
<jhass> backlinks to crystal-lang.org wouldn't hurt though, Google still likes them ;)
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> and as said, don't feel bad about doing a template
<jhass> "Hey, we just released $version, you can find the changelog and downloads at foo/$version, all repositories have been updated." with some more blabla around it
<sdogruyol> asterite: blog post for each major release is pretty ok.
<asterite> That's true. Well, for now I'll do a small blog post. What we'll need to improve is the long list at the bottom of the homepage, or maybe separate categories (releases vs. other suff)
<asterite> but... later :-)
<sdogruyol> Actually i think that: Great documentation > Everyhing
<jhass> yeah, maybe separate news/blog posts
<sdogruyol> mozilla got steve klabnik just to do documentation lol
<sdogruyol> and hell he's like the best documentation guy in the planet :D
elia has joined #crystal-lang
jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.5 | Fund Crystals development: http://to.ly/TtGw | 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
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
<sdogruyol> does the homebrew tap get automatic update?
<jhass> it should
elia has quit [Quit: Computer has gone to sleep.]
leafybasil has quit [Ping timeout: 256 seconds]
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
elia has joined #crystal-lang
Mercurial_ has joined #crystal-lang
<asterite> sdogruyol: I think you need to do `brew update`
<asterite> The release is up, you can try it :-)
<sdogruyol> asterite: thanks
blue_deref has joined #crystal-lang
<adam12> Worked :)
elia has quit [Quit: Computer has gone to sleep.]
_whitelogger____ has joined #crystal-lang
dwahl has joined #crystal-lang
fkchang has quit [Ping timeout: 272 seconds]
DeBot has joined #crystal-lang
grios has quit [Ping timeout: 272 seconds]
mgarciaisaia1 has joined #crystal-lang
Ven has joined #crystal-lang
sdogruyol has quit [Ping timeout: 255 seconds]
sdogruyol has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 264 seconds]
sdogruyol has quit [Client Quit]
Ven has quit [Read error: Connection reset by peer]
dbackeus has joined #crystal-lang
hangyas has joined #crystal-lang
<dbackeus> hey! crystal -v works in 7.5 :)
<Mercurial_> Hi, I'm a bit confused about macros? The documentation makes it a bit confusing, is there anywhere else I could read them from?
<BlaXpirit> Mercurial_, have u worked with a templating language, like for html or whatever?
<crystal-gh> [crystal] davydovanton opened pull request #1063: Add documentation for some Iterator methods (master...doc-iterator) http://git.io/vOfdt
<BlaXpirit> macros can be compared to that
<Mercurial_> only a bit
<Mercurial_> I'm a bit confused on why they're needed though
<BlaXpirit> Mercurial_, it's for compile-time code transformation
<Mercurial_> what's a situation in which I would need that?
<Mercurial_> sorry, I'm a noob
<BlaXpirit> Mercurial_, macros are most often just for convenience
<BlaXpirit> i can't think of anything that can't be achieved without them
<BlaXpirit> just look at some examples in standard library
<asterite> Mercurial_: do you know Ruby's attr_reader?
<Mercurial_> yeah
<jhass> BlaXpirit: well, macro method_missing and macro inherited/included would be hard to do otherwise ;)
<BlaXpirit> oh yeah.
<BlaXpirit> compiletime hooks as well
<asterite> In fact I agree with BlaXpirit here, macros aren't needed. Java does fine without macros. Same in Go. They can just help to reduce amount of typing in many cases
dbackeus has quit [Remote host closed the connection]
<asterite> Mercurial_: how would you implement attr_reader in Ruby?
<Mercurial_> attr_reader :variable
<Mercurial_> for your instance variables
<jhass> Mercurial_: do you know define_method?
<dwahl> IMO most use cases for the runtime dynamism that ruby allows are mostly used to implement DSLs, which only run when the application launches. therefore, macros replace them really well.
<asterite> dwahl: Exactly! Also you usually reopen classes before the "main" code, for example with extensions. Reopening classes at runtime is pretty rare (imagine reopening a class in some http requests)
<Mercurial_> jhass: yeah, another way to define methods for a class
elia has joined #crystal-lang
<dwahl> asterite, so yeah, to that end, macros are necessary if you want cute ruby DSLs (which are a draw), but they arent strictly necessary
<dwahl> also they're a hell of a lot of fun for the developer
<dwahl> probably dangerously fun
elia has quit [Client Quit]
<BlaXpirit> meh
<asterite> dwahl: yes, so fun they usually distract the programmer from solving the problem at hand (which can always be solved without macros)
<jhass> Mercurial_: do you know about usecases for it and similar constructs?
<Mercurial_> jhass: I'm sorry, I don't :(
<asterite> Mercurial_: what compiled languages you know?
<asterite> Or, mmm... non-interpreted languages, better
elia has joined #crystal-lang
<jhass> Mercurial_: mmh, that makes it a bit hard to relate on anything
<jhass> do you understand that in Ruby, attr_reader uses define_method to define a method?
<Mercurial_> yes, I understand
<Mercurial_> asterite: I don't know any compiled languages, sorry :(
<jhass> so in crystal we have the getter macro that defines the method
<asterite> Mercurial_: what languages you know?
<Mercurial_> asterite: ruby and python
mgarciaisaia1 has quit [Quit: Leaving.]
grios has joined #crystal-lang
<dwahl> Mercurial_, it's basically code that generates code and pastes that code directly into your code. so if you can define a macro that defines some methods for you, and then reuse that macro within another classs to automagically define those same methods without writing any code
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
<Mercurial_> how and why would I implement that into my code
<Mercurial_> besides saving time
<dwahl> only for saving time
<dwahl> the real use case if you're doing something like writing an API
<dwahl> that other programmers will use
<dwahl> API/library
<dwahl> and you want other programmers to be able to easily modify their classes to make use of your library
<dwahl> you can provide macros so that all they need to do is call your macro within their classes, and now code exists for them to easily consume your library
<kumpelblase2> same thing goes for things like 'getter' and 'accessor' in ruby too. You might as well write the two methods directly, but using, in this case, macros makes the code easier to read and makes you write less code in general
dbackeus has joined #crystal-lang
elia has quit [Client Quit]
<Mercurial_> ok that makes sense
<Mercurial_> thanks
<Mercurial_> is there a really good example of this in use?
<dwahl> getter and setter in crystal are the best examples
<asterite> Another good example is the to_s method
<dwahl> they automatically define def {{attribute}} and def {{attribute}}=, so that the user doesn't need to.
elia has joined #crystal-lang
<dwahl> so you can just call getter :foo, and now def foo is defined. you, the programmer, can create this same functionality, it's not some special language keyword
<dwahl> that's the macro definition for getter
<dwahl> so when you call getter :foo
<dwahl> it literally just pastes def foo; @foo; end into your code
Ven has joined #crystal-lang
elia has quit [Client Quit]
Ven has quit [Client Quit]
hangyas has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
elia has joined #crystal-lang
<Mercurial_> ok, thank you!
<dwahl> np. make sense?
elia has quit [Client Quit]
<Mercurial_> yeah I get it, it's essentially an easy way to make your code reusable
<Mercurial_> and it reduces the amount you type
<dwahl> well, classes/modules are the easy way to make your code reusable :)
<dwahl> but it lets you do things that you cant do with classes/modules
ylluminate has joined #crystal-lang
<dwahl> (basically it lets you do things that that static type system would not allow with classes/modules, but do allow in ruby)
elia has joined #crystal-lang
elia has quit [Client Quit]
<jhass> >> `crystal -v`
<jhass> >> `crystal -v`
<DeBot> jhass: # => "Crystal 0.7.5 (Thu Jul 30 19:01:41 UTC 2015)\n" - http://carc.in/#/r/93s
<jhass> well, looks like it broke artanis :/
elia has joined #crystal-lang
nahtnam has joined #crystal-lang
dbackeus has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
NeverDie has joined #crystal-lang
<jhass> >> "/languages".match /\A\/languages\\Z/
<DeBot> jhass: # => nil - http://carc.in/#/r/93t
<jhass> >> "/languages".match /\A\/languages\z/
<DeBot> jhass: # => #<MatchData "/languages"> - http://carc.in/#/r/93u
elia has joined #crystal-lang
<asterite> >> "foo".codepoints
<DeBot> asterite: # => [102, 111, 111] - http://carc.in/#/r/93v
<asterite> :-D
<jhass> asterite: https://github.com/ysbaddaden/artanis/blob/master/src/dsl.cr#L57 any idea why he did that?
<jhass> and why it ever worked? :D
dwahl has quit [Ping timeout: 246 seconds]
<jhass> welp, there are other test failures so I'll just open an issue
<asterite> :-)
<asterite> Too many macros for my taste
tliff has quit [Ping timeout: 250 seconds]
eam has quit [Ping timeout: 250 seconds]
<jhass> but it does result in a quite nice API https://github.com/jhass/carc.in/blob/master/src/web.cr
eam has joined #crystal-lang
tliff has joined #crystal-lang
<asterite> WOW! You are using it!
grios has quit [Ping timeout: 246 seconds]
<asterite> It does look clean, yes
<asterite> I hope we can improve macro readability with small but good deltas
<jhass> asterite: btw required keyword args is probably the last syntax level feature (well, together with the macro method idea the other day) that I really miss
leafybasil has joined #crystal-lang
<asterite> So you like his idea?
<jhass> not sure, I think the current model could work out
<jhass> I'd rather like to see any argument to be passable as keyword arg
<jhass> def foo(a, b=0); end; foo(b: 1, a: 2) basically
<asterite> Maybe me too, though that'll make all names be part of the API
<jhass> as I wrote, since they're also automagically part of the docs, that's not necessarily a bad thing
ylluminate has quit [Quit: Leaving.]
<asterite> Maybe we could have `def foo(a=, b=0); end;` and that'll mean you have to pass "a" as a keyword argument
<asterite> so you make that choice explicit (although when you use default args you don't really have a choice)
ylluminate has joined #crystal-lang
<asterite> so in a way I like his proposal, but adding more syntax is what worries me
<jhass> meh, I think that would be the least favorable variant, being just inconsistent
<jhass> so while I see that argument, I actually don't think it's particularly strong
<jhass> I did run across ruby gems with sparse docs and bad argument names in the past
ylluminate has quit [Client Quit]
<jhass> having a cult in the community about being considerate in choosing your argument names is something I'd welcome
ylluminate has joined #crystal-lang
ylluminate has quit [Client Quit]
<asterite> So you'd leave things as they are right now, but you'd also allow using keyword arguments for any argument?
ylluminate has joined #crystal-lang
<jhass> yes, I'd try that at least for until close to 1.0
<jhass> I don't think it's working out particular badly so far
<jhass> and I actually like that there's a single unified concept for passing arguments
<jhass> ruby couldn't do something like that since it'd break like all ruby code in existence
<jhass> which is maybe a general observation where we should be careful in following it btw, all syntax introduced for 2.0 is with compatibility in mind, not the best possible syntax
<jhass> *for 2.0 and later
<jhass> well, 1.9 and later actually
<asterite> Yes, not keeping backwards compatibility after you have a lot of code in the wild is the worse decision
<asterite> And I think I'd like that too, always being able to use keyword args on the call site. For example to create an OAuth2::Client, https://github.com/manastech/crystal/blob/master/src/oauth2/client.cr#L4 , I always forget the order and the argument names are pretty rememberable
<jhass> they might break that rule with 3.0 though, hope it'll not result in something like the python 2/3 split :/
elia has quit [Quit: Computer has gone to sleep.]
<jhass> wconrad will hate us for doing that though :P
<asterite> I hope they don't do that for Ruby 3.0
<asterite> They should watch this: https://www.youtube.com/watch?v=2y5Pv4yN0b0
<BlaXpirit> i'm strongly for allowing calls with keyword arguments for every argument
<jhass> yes, I think it's consistent, fits the existing model and reduces the concepts you need to learn
<asterite> For example I don't know if people are using refinements or keyword arguments in their projects
<asterite> It's true, because you don't have to say "you can use keyword arguments, but *only in this case*"
<jhass> Rails 5 will switch to them exclusively
<jhass> keyword args that is
<jhass> forgot about refinements
<jhass> so yeah, kwargs get slowly adopted, with 1.9 being EOL
<kumpelblase2> it generally removes complexity when you can use keyword arguments, because words are more describing than order
BlaXpirit has quit [Quit: Konversation]
ylluminate has quit [Quit: Leaving.]
<jhass> refinements, well, they have maybe one too many limitation to really hook people to use them
<jhass> there's nice things like http://rubyzucker.info/ though
ylluminate has joined #crystal-lang
BlaXpirit has joined #crystal-lang
sfcgeorge has joined #crystal-lang
<BlaXpirit> btw i think python 3 has like the best possible handling of function arguments
<sfcgeorge> Ah I was wondering about Crystal getting more advanced args. I'm familiar with all of Ruby 2.1's various args.
BlaXpirit has quit [Client Quit]
<asterite> I think BlaXpirit might have abandoned us in favor of python 3 :-(
<sfcgeorge> Hah!
<asterite> I wanted to ask him about python 3. I thought it was similar to ruby, with those *args and **args
<sfcgeorge> Well I like in Python that any arg can be a named arg, that's kinda nice. But I also like Ruby's splats and doublesplat (that seems less well known)
dbackeus has joined #crystal-lang
<sfcgeorge> I confuse Py 2 and 3, but you can do
<sfcgeorge> def my_thing(foo, bar)
<sfcgeorge> my_thing(1, 2)
<sfcgeorge> my_thing(bar=2, foo=1)
<jhass> that's still only locals :P
<jhass> my_thing(bar: 2, foo: 1), but yeah
<sfcgeorge> Parameters / arguments, not locals
<jhass> well, assigning locals
<jhass> >> def my_thing(foo, bar); p {foo, bar}; end; my_thing(bar=2, foo=1)
<DeBot> jhass: Syntax error in eval:4: unexpected token: } - http://carc.in/#/r/93z
<jhass> derp
<jhass> >> def my_thing(foo, bar); p({foo, bar}); end; my_thing(bar=2, foo=1)
<DeBot> jhass: {2, 1} - more at http://carc.in/#/r/940
<kumpelblase2> he was talking about python, not crystal I think
<sfcgeorge> no not assigning locals, calling the method in python :)
<jhass> oh, okay, ignore me
<sfcgeorge> The point is that a method doesn't have to be defined as having named parameters as in Crystby. Every positional parameter can be used as a named one, or not.
dbackeus has quit [Ping timeout: 252 seconds]
<sfcgeorge> I'm not sure what the benefits of each way are. Ruby is certainly complicated with: positional args, default positional args, splats, named args, default named args, double splats. And which order and combination you're allowed is only knowable by trial and error. So Python is certainly simpler there.
<jhass> yeah totally
<jhass> I didn't realize python already allows that
<jhass> that might make a good case for refuting #1064 :P
elia has joined #crystal-lang
<sfcgeorge> Yep. foo(1, 2) is same as foo(baz=2, bar=1) which in Rubal could look foo(1, 2) foo(baz: 2, bar: 1)
kumpelblase2 has quit [Quit: Leaving...]
<sfcgeorge> I was wondering about basically this issue. Crystal has diverged from Ruby here, I guess more like Python. Nice to hear the reason against : is that's already used for type restriction.
<asterite> It's funny that on the profile of wconrad (the one that fired the discussion) its website is yagni.com
<asterite> which... doesn't work
<sfcgeorge> You aren't gonna need it. Get it ;) Maybe it's not supposed to work :D
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOJhg
<crystal-gh> crystal/master 055ec8b Ary Borenszweig: Enabled a pending spec
<crystal-gh> crystal/master bcc2831 Ary Borenszweig: Fixed #1062: "read before definition" when argument used as default also has a default
<asterite> sfcgeorge: exactly my thoughts! :)
<sfcgeorge> btw asterite thank you for working on Crystal, it's beautiful. Just what I've dreamed of, a faster Rubyish language. Donated as soon as I saw the campaign :)
<jhass> well, whois for yagni.com has it actually regged to him ;)
<trapped_> when crosscompiling to win32: crystal build --target "MINGW32_NT-6.1 i686" --target "x86_64-unknown-win32-unknown" src/app.cr
<trapped_> e/giorgio/cellviewer/.crystal/home/giorgio/cellviewer/src/app.cr/FileDescriptorIO.o
<trapped_> e/giorgio/cellviewer/.crystal/home/giorgio/cellviewer/src/app.cr/FileDescriptorIO.o
<trapped_> hmm
<trapped_> something with pasting is not working
<trapped_> sec
<travis-ci> manastech/crystal#bcc2831 (master - Fixed #1062: "read before definition" when argument used as default also has a default): The build passed. https://travis-ci.org/manastech/crystal/builds/73463569
sfcgeorg_ has joined #crystal-lang
sfcgeorge has quit [Ping timeout: 244 seconds]
elia has quit [Quit: Computer has gone to sleep.]
<jhass> but you'll need to specify --cross-compile so crystal doesn't try to invoke the linker
flaviu has quit [Remote host closed the connection]
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 244 seconds]
<asterite> sfcgeorg_: thanks for your support!
<ylluminate> asterite: so how large of a donation would it take to make effectively 99% of ruby code run out of the box for crystal?
<jhass> faster than jruby 9.0.0? around $2-3M I guess
<ylluminate> interesting, good to know.
<ylluminate> any more accurate figures would be also appreciated (since that was a guess)
<jhass> I mean it's just not what crystal is, it's not yet another ruby interpreter
<ylluminate> i understand what it is, but i think there's a market for it nonetheless
<ylluminate> from what we've been talking about in opal and some things i think there's a real opportunity to expand the vision a bit
<asterite> ylluminate: so, first problem is that in ruby you can do []. And I can't see a way of having that work in crystal
<ylluminate> crystal may really be just what the ruby community has needed for some time now
<asterite> how fast is jruby 9.0.0?
<jhass> oh wait, I thought there were actual ones in thre
<jhass> *there
grios has joined #crystal-lang
<asterite> ylluminate: another issue is that hashes are used a lot as a quick replacement of proper types. They are also used for keyword arguments. Porting that to crystal won't happen, or at least I see it very hard to do
<asterite> On the other hand, Ruby can be made much faster. If v8 is fast, I don't see why ruby couldn't do it
<sfcgeorg_> The experimental jruby-9000-dev-truffle-graal looks insanely faster on that benchmark.
sfcgeorg_ is now known as sfcgeorge
<sfcgeorge> I was initially disappointed that Crystal isn't a fast Ruby. But Ruby has a lot of weirdness that I love sometimes, but it's nice to have an alternative for certain projects where speed and simplicity are more important. Plus Crystal adds wonderful macros. I feel they both have a place anyway.
<jhass> exactly, crystal it's its own language and you won't ever have a "compiled" ruby without embedding a runtime into the binary you generate
<jhass> *is
<jhass> I recall there's actually a project that does so, but can't find it
<trapped_> what is the omit_null option for JSON mappings supposed to do
<asterite> trapped_: if you say `nilable: true` in a json mapping, when you convert that object to json and the property is nil, "null" isn't emited for that property
havenwood has quit [Ping timeout: 246 seconds]
<asterite> but if you say `emit_null: true`, then "null" will be emited
<asterite> I need to document that JSON module...
blue_deref has quit [Quit: bbn]
<trapped_> would the whole line for that property get omitted
<jhass> yes
<jhass> >> require "json"; record Foo, foo do json_mapping({foo: {type: String, nilable: true}}); end; Foo.new(nil).to_json
<DeBot> jhass: # => "{}" - http://carc.in/#/r/942
<jhass> >> require "json"; record Foo, foo do json_mapping({foo: {type: String, nilable: true, emit_null: true}}); end; Foo.new(nil).to_json
<DeBot> jhass: # => "{\"foo\":null}" - http://carc.in/#/r/943
<trapped_> alright thanks
<jhass> asterite: I was wondering if json_mapping should also generate an initializer taking all the attributes. Would also play really nice with the required keyword args idea then
<asterite> It's true. Nilable properties could be left at the end with a default nil value
<sfcgeorge> Do we have `blank?` method on nil, Sring etc? Like in ActiveSupport.
<jhass> nope
<jhass> and I never needed it outside webapps in Ruby
<sfcgeorge> Is it something that might get added, or are there reasons against?
<jhass> I don't like it too much, it has such a loose contract
<jhass> what's a blank value feels quite application dependent actually
<sfcgeorge> Hmm. It's useful for when nil or empty string can both be treated the same. But I guess with a strictly typed language you won't get that case much, unless it's a union.
<jhass> yeah, if you code in crystal for a while, you'll learn to avoid passing nil around too much anyway
<jhass> which is a good takeaway to ruby too btw
<sfcgeorge> Yes I know best practice is usually to avoid that. I still like the andand gem on occasion, even though it's frowned uppon.
<jhass> ugh
<jhass> :P
<jhass> they should make it a refinement and yank all other versions :P
<sfcgeorge> ;) I have a CS degree so I should know better, but still sometimes I like to think I know best and beat the system into doing what I want.
<jhass> just drop class NilClass; def !; [true, false, 42].sample; end; end; into your projects then
<sfcgeorge> Ahaha, yes why not. It could be a drinking game along side a bash script to kill random PIDs
havenwood has joined #crystal-lang