werebutt has joined #crystal-lang
werebutt has left #crystal-lang [#crystal-lang]
somu has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff has joined #crystal-lang
CraigBuchek has joined #crystal-lang
asterite has joined #crystal-lang
waj has joined #crystal-lang
waj has joined #crystal-lang
somu has joined #crystal-lang
travis-ci has joined #crystal-lang
travis-ci has left #crystal-lang [#crystal-lang]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/manastech/crystal/builds/17702795
<travis-ci> [travis-ci] manastech/crystal#859 (master - dfdd7d4 : Ary Borenszweig): The build passed.
somu has joined #crystal-lang
somu has joined #crystal-lang
somu has joined #crystal-lang
<CraigBuchek> Hey, is anyone planning on doing any presentations on Crystal at RubyConf? Or any other Ruby conferences this year?
somu has joined #crystal-lang
somu has joined #crystal-lang
<asterite> @CraigBuchek we wanted to talk about it in the past RubyConf Argentina but we didn't make it in :(
<CraigBuchek> I guess what 'm really asking is if it's OK for me to submit a Crystal talk to RubyConf (or other US-based) conferences. I don't want to do it if any of the core developers are planning on it.
somu has joined #crystal-lang
<asterite> Yes, it's OK, go ahead :)
bcardiff has joined #crystal-lang
somu has joined #crystal-lang
somu has joined #crystal-lang
somu_ has joined #crystal-lang
somu__ has joined #crystal-lang
waj has joined #crystal-lang
asterite has joined #crystal-lang
bcardiff1 has joined #crystal-lang
bcardiff has joined #crystal-lang
<somu__> hello!
<asterite> Hi!
<somu> what about renaming CharReader class to Char::Reader, StringBuilder to String::Builder, StringScanner to String::Scanner and so on?
<asterite> the other alternative is to rename String::Buffer to StringBuffer (or just have one class for building strings)
<asterite> I think it's easier to type without ::
<somu> i think it’s more logical to namespace it, since String and StringBuffer are semantically related
<somu> and you don’t need to type String:: at all inside String class methods
<somu> but String::Buffer → StringBuffer is good too, since there will be a common pattern at naming classes.
<asterite> it's one of those decisions that are hard to make because it's hard to tell which one is more convenient
<asterite> so for now, my answer is… I don't know :(
<somu> okay! it is not critical. i'll post it to Google Groups, and we could discuss it a little bit more before making the final decision
<somu> and the question about backticks: in my message earlier I mentioned that I could implement `...`. I meant this behaviour (the first example): http://blog.bigbinary.com/2012/10/18/backtick-system-exec-in-ruby.html
<asterite> Ah! Backticks
<asterite> Yes, it would be nice to have them in the language as a synonym for something else
<somu> in ruby they are not aliasing any other method, so they’ve got a unique behaviour
<asterite> right now we have system and system2: the first one returns the status code, the second an array of lines… of course "system2" has just a stub name, we need to implement this correctly
<somu> backticks could be aliased to #system2, but there should be a better naming
<asterite> yes… i can't find an equivalent method in ruby except the backtick itself
somu has left #crystal-lang [#crystal-lang]
somu has joined #crystal-lang
<somu> that’s the problem. maybe we should borrow the naming from another language?
<somu> python equivalent of backticks: os.popen("ls").read()
<somu> it could be called #sh, for example. sh "echo 'hi'" # => "hi\n"
<asterite> could be, or shell
<somu> sure
<somu> what about making Array objects comparable?
<somu> i mean, in ruby they are: [1,2,3] > [1,2] # => true
<somu> i’ve got a branch which refactors array.cr, makes Arrays comparable and ports Ruby array methods into Crystal (like #rotate, #uniq)
<asterite> In Ruby, comparing arrays gives me undefined method
<asterite> but Array has #<=> ...
<somu> i think it’s irb behaviour
<somu> hm, no.
<asterite> maybe Array#<=> is ok, I personally never used it and I don't know how could I use it… do you have a use case?
<somu> for sorting an array of arrays for example
<asterite> sounds useful
<asterite> I think Array#sort now uses <=, it should use <=> and Array should only implement <=> (I wonder why Array doesn't have <, >, etc. in Ruby)
waj has joined #crystal-lang
Liothen has joined #crystal-lang
somu has joined #crystal-lang
somu has joined #crystal-lang
somu has joined #crystal-lang
Liothen has joined #crystal-lang
bcardiff has joined #crystal-lang
somu has joined #crystal-lang
somu has joined #crystal-lang
waj has joined #crystal-lang
somu has joined #crystal-lang