<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…]
<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]