jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.1 | 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
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 265 seconds]
broz has quit [Remote host closed the connection]
zz_Cidan has quit [Ping timeout: 256 seconds]
Cidan has joined #crystal-lang
waterlink1 has joined #crystal-lang
waterlink has quit [Ping timeout: 252 seconds]
strcmp2 has quit [Quit: sleep like a boss]
havenn is now known as havenwood
vikaton has joined #crystal-lang
vikaton has quit []
vikaton has joined #crystal-lang
vikaton has quit [Client Quit]
JBat has joined #crystal-lang
unshadow has quit [Ping timeout: 264 seconds]
havenwood has quit [Ping timeout: 272 seconds]
Cidan is now known as zz_Cidan
unshadow has joined #crystal-lang
BlaXpirit has joined #crystal-lang
<unshadow> why does puts 10 * "a" isn't valid, but puts "a" * 10 is ?
sandelius has joined #crystal-lang
<jhass> unshadow: because String#*(Int) exists but Int#*(String) doesn't
Ven has joined #crystal-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DerisiveLogic has quit [Ping timeout: 276 seconds]
waterlink1 has quit [Ping timeout: 244 seconds]
<unshadow> btw, why line_each is missing ? it feels exxsesive to do "bar = bar.lines", "bar.each do" instead of bar.each_line do
<jhass> because nobody got around to add it
<unshadow> Oh, so it's not some kind of a decision not to have
<unshadow> cool, I'll work on adding that
sandelius has joined #crystal-lang
strcmp1 has joined #crystal-lang
<unshadow> jhass, is there an example of how to use String::Builder ?
<jhass> http://crystal-lang.org/api/String.html#build%28capacity%20%3D%2064%2C%20%26block%29-class-method
<jhass> eh, String.build
<unshadow> (‾⌣‾)♉
<unshadow> was a stupid question ...
HakanD has joined #crystal-lang
HakanD_ has joined #crystal-lang
strcmp1 has quit [Quit: Leaving]
strcmp1 has joined #crystal-lang
HakanD has quit [Ping timeout: 240 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JBat has quit [Ping timeout: 258 seconds]
<unshadow> jhass, bug --> http://carc.in/#/r/f5 ?
<jhass> mh, I think one could argue so
<unshadow> Ok, I'll open an issue
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has joined #crystal-lang
BlaXpirit has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
HakanD_ has quit [Quit: Be back later ...]
HakanD_ has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit is now known as Guest71244
Guest71244 has quit [Killed (card.freenode.net (Nickname regained by services))]
BlaXpirit_ is now known as BlaXpirit
HakanD_ has quit [Ping timeout: 276 seconds]
DerisiveLogic has joined #crystal-lang
DerisiveLogic has quit [Ping timeout: 244 seconds]
r0ast has joined #crystal-lang
HakanD_ has joined #crystal-lang
ponga has joined #crystal-lang
<jhass> unshadow: http://carc.in/#/r/f9 yours? :)
<unshadow> yeha
<unshadow> :)
HakanD__ has joined #crystal-lang
<unshadow> I have multiple lines, I want to get the zise of the longest one
<jhass> yup
r0ast has quit [Client Quit]
<unshadow> :( thats better then mine
<jhass> >> "bar\nnewlinemooore\nfoo\nnewline".lines.max_of &.size
<DeBot> jhass: # => 13 - http://carc.in/#/r/ff
<unshadow> very nicly done :)
<unshadow> thanks
<jhass> max_of is one of the things I miss in Ruby, so I pull requested it to Crystal :P
<unshadow> max_size = data.lines.max_of &.size (integrated , thanks :)
<unshadow> what does the & stands for ?
HakanD_ has quit [Ping timeout: 265 seconds]
<unshadow> It seems like using symbols fixes the colorize issue http://carc.in/#/r/fe
<unshadow> oops .... http://carc.in/#/r/fk
<unshadow> shouldnt that return "a,b" ?
<strcmp1> jhass, but in ruby it is max?
<strcmp1> was the _of something you decided on?
<jhass> we can still rename it if you have a better name
<jhass> and you have only one match group
<jhass> $0 whole match, $1 first group
<jhass> $2 second group
<jhass> you have no second group -> exception
<jhass> and re "with symbols it works", you no longer reassign line which could mess up the the type interference
<unshadow> thanks my mistake, I forgat n + 1
<jhass> I doubt it's related to the symbols
<unshadow> The issue is still there, I get what you say regarding line.colorize.red is actually line = colorize(line).red or somehing, so it's more prone to compiler error
<unshadow> jhass: haaa I just saw that he actually took puts to the begining and isn't doing line = blabla.colorize... , I guess this is what you talked about
waterlink has joined #crystal-lang
havenwood has quit [Ping timeout: 264 seconds]
vikaton has joined #crystal-lang
<vikaton> is there a way to see the LLVM IR output ?
<vikaton> when compiling crystal files
<vaedd> pass -ll to crystal build
<vaedd> or --emit llvm-ir
<vikaton> we should add an option to see the LLVM IR in carc.in
<jhass> why?
<vikaton> I think it would be interesting
<jhass> I don't think so
<vikaton> :(
<vaedd> i agree, that is nice debugging tool
<vikaton> ^
<jhass> carc.in is intended for demo & "let's see what this looks like"
<jhass> in all the crystal code I wrote, I never debugged anything by looking at the IR
<vikaton> well many LLVM enthusiasts would like to see the LLVM IR output of Crystal and seen "how it looks like"
<vikaton> just a suggestion
<jhass> you got that request from somebody?
<vikaton> No, it's when I was learning Rust that lots of people liked the option to see the LLVM IR output in play.rust-lang.org
<jhass> well, open a pull request and I might consider it
<vikaton> mk
<jhass> I don't see it important enough to invest time
BlaXpirit has quit [Quit: Quit Konversation]
BlaXpirit has joined #crystal-lang
sandelius has joined #crystal-lang
<strcmp1> jhass, max_of is cool but max is equally as cool to me :) i guess the advantage of max is that it would be familiar to ruby programmers already.
<jhass> they're different
<jhass> we got max too
<jhass> and max_by
<strcmp1> whats different about max_of/max?
<jhass> max_of returns the biggest value the block returns, max_by returns the value for which the block returned the biggest value, max returns the value for which the block returned a positive value when compared to all other values
<jhass> max's block takes two parameters, like sort's
<jhass> max_of solves the issues in .max_by(&.x).x and .map(&.x).max
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #crystal-lang
<strcmp1> jhass, thanks, i will research this
datanoise has joined #crystal-lang
<vikaton> >> [1,2,2,2,3,4].max
<DeBot> vikaton: # => 4 - http://carc.in/#/r/fv
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has quit [Client Quit]
DerisiveLogic has joined #crystal-lang
sandelius has joined #crystal-lang
sandelius has quit [Client Quit]
sandelius has joined #crystal-lang
c355E3B has joined #crystal-lang
ponga has quit [Quit: Leaving...]
HakanD__ has quit [Ping timeout: 265 seconds]
Ven has joined #crystal-lang
vikaton has quit []
BlaXpirit has quit [Quit: Quit Konversation]
c355E3B has quit [Quit: Leaving]
BlaXpirit has joined #crystal-lang
havenwood has joined #crystal-lang
bcardiff has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vTb6c
<crystal-gh> crystal/master e6ada44 Ary Borenszweig: Ignore Signal::PIPE by default
<crystal-gh> crystal/master c2acd59 Ary Borenszweig: Fixed #694: incorrect type inference for block variable if reassigned
<crystal-gh> crystal/master 2434d2b Ary Borenszweig: Updated Changelog
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vTby2
<crystal-gh> crystal/master cd9f8f6 Ary Borenszweig: Fixed `String#lines` and added `String#each_line`
<crystal-gh> crystal/master fa109e4 Ary Borenszweig: Added `String#each_line` iterator
<crystal-gh> crystal/master 7a14a71 Ary Borenszweig: Small optimization to String#lines
<travis-ci> manastech/crystal#2370 (master - fa109e4 : Ary Borenszweig): The build is still failing.
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vTb5s
<crystal-gh> crystal/master 2a56b7b Ary Borenszweig: Fixed markdown and StringLiteral#lines in macros. Also fixed incorrect behaviour of String#each_line for the last line.
bcardiff has quit [Quit: Leaving.]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
willl has quit [Quit: Connection closed for inactivity]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
shadeslayer has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BlaXpirit has quit [Quit: Quit Konversation]