jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.6 | Fund Crystals development: http://is.gd/X7PRtI | 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
<vifino> is there a way to capture the stderr yet with process.run?
kyrylo has quit [Quit: Konversation terminated!]
kyrylo has joined #crystal-lang
<crystal-gh> [crystal] kostya opened pull request #1190: Add other combinations methods (master...combinations) http://git.io/v35gL
sfcgeorg_ has quit [Quit: Textual IRC Client: www.textualapp.com]
kyrylo has quit [Ping timeout: 252 seconds]
ponga has joined #crystal-lang
<waj> vifino: sure, passing an IO to Process.run is one way
<waj> for example: buffer = StringIO.new; Process.run(..., error: buffer)
ponga has quit [Quit: Leaving...]
<waj> vifino: however, not in 0.7.6. Only in HEAD
eam has quit [Ping timeout: 244 seconds]
eam has joined #crystal-lang
waj_ has joined #crystal-lang
waj has quit [Ping timeout: 260 seconds]
sardaukar has quit [Ping timeout: 256 seconds]
sardaukar has joined #crystal-lang
havenwood has joined #crystal-lang
NeverDie has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 4 new commits to master: http://git.io/v35Sj
<crystal-gh> crystal/master 3376e83 Tobias Pfeiffer: Add Iterator#in_groups_of
<crystal-gh> crystal/master 5b7ee14 Tobias Pfeiffer: Fix type annotation for Iterator#in_groups_of...
<crystal-gh> crystal/master 7172a3b Tobias Pfeiffer: Implement Iterator#in_groups_of with the block argument...
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/v359I
<crystal-gh> crystal/master 0a9a226 Ary Borenszweig: Removed `Iterator#in_groups_of` with block: composing it with `map` has the same effect. Related to #1173
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v359t
<crystal-gh> crystal/master 2031f18 Sergey Kucher: Added optional offset for hash each_with_index
<crystal-gh> crystal/master ecc6525 Ary Borenszweig: Merge pull request #1187 from sergey-kucher/master...
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v359q
<crystal-gh> crystal/master 46e6868 Tobias Pfeiffer: Basic spec for Array#push/<< from #1181
<crystal-gh> crystal/master a5f06ba Ary Borenszweig: Merge pull request #1184 from PragTob/spec-array-push...
NeverDie has quit [Ping timeout: 245 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v359s
<crystal-gh> crystal/master df0b784 Tobias Pfeiffer: Treat negative arguments in Iterator...
<crystal-gh> crystal/master 6adb8cb Ary Borenszweig: Merge pull request #1186 from PragTob/iterator-negative-arguments...
NeverDie has joined #crystal-lang
<travis-ci> manastech/crystal#813b1cb (master - Merge pull request #1173 from PragTob/implement-iterator-in-groups-of): The build passed. https://travis-ci.org/manastech/crystal/builds/75782638
<crystal-gh> [crystal] asterite closed pull request #1189: Basic documentation for OptionParser (master...doc/option-parser) http://git.io/v37Rp
waj has joined #crystal-lang
havenwood has quit [Ping timeout: 240 seconds]
<travis-ci> manastech/crystal#0a9a226 (master - Removed `Iterator#in_groups_of` with block: composing it with `map` has the same effect. Related to #1173): The build passed. https://travis-ci.org/manastech/crystal/builds/75782689
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/v35Hb
<crystal-gh> crystal/master e672e03 Ary Borenszweig: Small doc changes to OptionParser. Related to #1189
waj_ has quit [Ping timeout: 256 seconds]
<travis-ci> manastech/crystal#ecc6525 (master - Merge pull request #1187 from sergey-kucher/master): The build passed. https://travis-ci.org/manastech/crystal/builds/75782694
<travis-ci> manastech/crystal#a5f06ba (master - Merge pull request #1184 from PragTob/spec-array-push): The build passed. https://travis-ci.org/manastech/crystal/builds/75782707
<travis-ci> manastech/crystal#6adb8cb (master - Merge pull request #1186 from PragTob/iterator-negative-arguments): The build passed. https://travis-ci.org/manastech/crystal/builds/75782742
<crystal-gh> [crystal] asterite pushed 6 new commits to master: http://git.io/v357u
<crystal-gh> crystal/master 50bcffb Konstantin Makarchev: fix permutation
<crystal-gh> crystal/master ff2975f Konstantin Makarchev: add combinations
<crystal-gh> crystal/master 3614aaa Konstantin Makarchev: add repeated_combinations
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/v357o
<crystal-gh> crystal/master 10cd596 Ary Borenszweig: Replaced `Array#*` with `Array#new` in some cases. Related to #1190
<travis-ci> manastech/crystal#333051e (master - Merge pull request #1189 from porras/doc/option-parser): The build passed. https://travis-ci.org/manastech/crystal/builds/75783156
waj_ has joined #crystal-lang
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/v355I
<crystal-gh> crystal/master 38d9988 Juan Wajnerman: Process.run now waits for the process to complete
<travis-ci> manastech/crystal#e672e03 (master - Small doc changes to OptionParser. Related to #1189): The build passed. https://travis-ci.org/manastech/crystal/builds/75783270
waj has quit [Ping timeout: 250 seconds]
<travis-ci> manastech/crystal#7d7e544 (master - Merge pull request #1190 from kostya/combinations): The build passed. https://travis-ci.org/manastech/crystal/builds/75784045
<travis-ci> manastech/crystal#10cd596 (master - Replaced `Array#*` with `Array#new` in some cases. Related to #1190): The build passed. https://travis-ci.org/manastech/crystal/builds/75784087
kulelu88 has left #crystal-lang ["Leaving"]
<travis-ci> manastech/crystal#38d9988 (master - Process.run now waits for the process to complete): The build passed. https://travis-ci.org/manastech/crystal/builds/75784242
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/v35FJ
<crystal-gh> crystal/master 8861776 Ary Borenszweig: Updated Process docs
havenwood has joined #crystal-lang
<travis-ci> manastech/crystal#8861776 (master - Updated Process docs): The build passed. https://travis-ci.org/manastech/crystal/builds/75785045
<crystal-gh> [crystal] waj pushed 2 new commits to master: http://git.io/v35b1
<crystal-gh> crystal/master 01f5ad8 Juan Wajnerman: Set back stdio to blocking mode when executing a process
<crystal-gh> crystal/master 5ebb3b7 Juan Wajnerman: Set close_on_exec on pipes before executing a process
waj_ has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 246 seconds]
ssvb has quit [Ping timeout: 265 seconds]
ssvb has joined #crystal-lang
<travis-ci> manastech/crystal#5ebb3b7 (master - Set close_on_exec on pipes before executing a process): The build passed. https://travis-ci.org/manastech/crystal/builds/75785935
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v35pC
<crystal-gh> crystal/master d9b4195 Ary Borenszweig: Removed some redundant `not_nil!` calls
<crystal-gh> crystal/master c180d63 Ary Borenszweig: Fix a few parse cases where `/` was being parsed as a regex but can only mean division
<travis-ci> manastech/crystal#c180d63 (master - Fix a few parse cases where `/` was being parsed as a regex but can only mean division): The build passed. https://travis-ci.org/manastech/crystal/builds/75786921
waj has joined #crystal-lang
waj has quit [Ping timeout: 272 seconds]
BloodyHistory has joined #crystal-lang
blue_deref has quit [Quit: bbn]
havenwood has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Ping timeout: 240 seconds]
ryanf_ has joined #crystal-lang
shadeslayer_ has joined #crystal-lang
jbye has quit [Ping timeout: 255 seconds]
ddfreyne has quit [Ping timeout: 255 seconds]
jbye has joined #crystal-lang
ryanf has quit [Ping timeout: 255 seconds]
shadeslayer has quit [Ping timeout: 255 seconds]
ddfreyne_ has joined #crystal-lang
BlaXpirit has joined #crystal-lang
BloodyHistory has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit [Ping timeout: 250 seconds]
elia has joined #crystal-lang
elia has quit [Client Quit]
oal has joined #crystal-lang
waj has joined #crystal-lang
eam has quit [Ping timeout: 245 seconds]
eam has joined #crystal-lang
elia has joined #crystal-lang
waj has quit [Ping timeout: 250 seconds]
<dzv> i don't follow. keep what out of the channel?
<dzv> oops
kyrylo has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
eam has quit [Ping timeout: 244 seconds]
eam has joined #crystal-lang
<crystal-gh> [crystal] PragTob opened pull request #1191: Correct transform node : MultiAssign example (master...correct-normalizer-multiassign) http://git.io/v3d83
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
elia has joined #crystal-lang
<crystal-gh> [crystal] technorama opened pull request #1192: Open all file descriptors with CLOEXEC set to avoid fd leaks. (master...f/close_on_exec) http://git.io/v3d0O
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elia has quit [Quit: Computer has gone to sleep.]
sardaukar has quit [Ping timeout: 256 seconds]
kyrylo has quit [Ping timeout: 244 seconds]
ssvb has quit [Ping timeout: 244 seconds]
sardaukar has joined #crystal-lang
sleeper_ is now known as sleeper
waj has joined #crystal-lang
<Netfeed> can i access groups in a regex?
<jhass> not 100% what you mean, but yes
<jhass> >> match = "foo".match(/f(o)o/); match[1] if match
<DeBot> jhass: # => "o" - http://carc.in/#/r/bh1
<jhass> or simply
kyrylo has joined #crystal-lang
<jhass> >> "foo"[/f(o)o/, 1]
<DeBot> jhass: # => "o" - http://carc.in/#/r/bh2
<Netfeed> yeah, that was what i meant, great, thanks
<jhass> note .match might return nil if there's no match, hence the if to guard against that
waj has quit [Ping timeout: 260 seconds]
<Netfeed> yeap, is there a reason why []= isn't in the documentation?
<jhass> it's a method call, so depends on which class you're talking about
<Netfeed> oh, yeah, i'm dumb, i've been just looking at Regex. i guess i need to checkout MatchData too
<jhass> mmh, MatchData has []= ?
<Netfeed> yeah, never thought of that
<Netfeed> i just looked at Regex
<Netfeed> i've just been playing with crystal a few hours now and i really like it so far
<jhass> :)
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
waj has joined #crystal-lang
waj has quit [Remote host closed the connection]
elia has joined #crystal-lang
<travis-ci> dhruvrajvanshi/crystal#734114a (master - ArrayLiteral#[] can now take a RangeLiteral): The build failed. https://travis-ci.org/dhruvrajvanshi/crystal/builds/75809446
<jhass> meh
justinmcp has joined #crystal-lang
<justinmcp> hi, I'm getting a "keys.gnupg.net: Host not found" error when trying to add the public key, under the installing for Debian+Ubuntu instructions, anyone know how to fix this?
<jhass> huh, get better DNS? :P
<jhass> yeah, resolves fine ehre
<jhass> *here
leafybasil has quit [Read error: Connection reset by peer]
<jhass> justinmcp: anyway, keyservers sync, just try another one
<jhass> like pgp.mit.edu
<justinmcp> I dont think its a dns problem, it resolves fine with other tools, I will try the mit one now though
<justinmcp> googling, looks like it might be a gpg issue, using another keyserver should work
<justinmcp> (and it does)
elia has quit [Quit: Computer has gone to sleep.]
waj has joined #crystal-lang
waj has quit [Ping timeout: 246 seconds]
sleeper is now known as sleeper_
BloodyHistory has joined #crystal-lang
BloodyHistory has quit [Client Quit]
ingsoc has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/v3FeU
<crystal-gh> crystal/master 1e8b860 Tobias Pfeiffer: Correct transform node : MultiAssign example...
<crystal-gh> crystal/master 7b4cf64 Ary Borenszweig: Merge pull request #1191 from PragTob/correct-normalizer-multiassign...
ingsoc has quit [Remote host closed the connection]
ingsoc has joined #crystal-lang
<travis-ci> manastech/crystal#7b4cf64 (master - Merge pull request #1191 from PragTob/correct-normalizer-multiassign): The build passed. https://travis-ci.org/manastech/crystal/builds/75815194
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/v3FU9
<crystal-gh> crystal/master 270db52 Ary Borenszweig: system and backtick: write directly to the process' input instead of creating a StringIO
strcmp1 has quit [Quit: Leaving]
<travis-ci> manastech/crystal#270db52 (master - system and backtick: write directly to the process' input instead of creating a StringIO): The build passed. https://travis-ci.org/manastech/crystal/builds/75816722
<ingsoc> anyone using this in production
waj has joined #crystal-lang
waj has quit [Ping timeout: 246 seconds]
waj has joined #crystal-lang
waj has quit [Remote host closed the connection]
waj has joined #crystal-lang
<ingsoc> jhass: i'm not a ruby programmer but it seems to have reasonable syntax and less noise than a lot of other high performance languages. Liking the goroutine inspired stuff for concurrency but atm it seems it is singlethreaded/single core
<ingsoc> (judging from a video talk I recently watched)
<jhass> yes, it is for now
<jhass> but it's on the roadmap to change that
<ingsoc> just seems more palatable (to me anyway) than something like go but obviously as said in the discussion you linked it is pretty early days and probably not gonna be as stable possibly
<ingsoc> the other language i was looking at is nim-lang.org
<ingsoc> which is also pretty new
<crystal-gh> [crystal] waj pushed 2 new commits to master: http://git.io/v3FWp
<crystal-gh> crystal/master cdbab3e Technorama Ltd: Open all file descriptors with CLOEXEC set to avoid fd leaks....
<crystal-gh> crystal/master 6f50349 Juan Wajnerman: Merge pull request #1192 from technorama/f/close_on_exec...
waj has quit [Remote host closed the connection]
<travis-ci> manastech/crystal#6f50349 (master - Merge pull request #1192 from technorama/f/close_on_exec): The build passed. https://travis-ci.org/manastech/crystal/builds/75822006
elia has joined #crystal-lang
sleeper_ is now known as sleeper
elia has quit [Client Quit]
elia has joined #crystal-lang
elia has quit [Client Quit]
ingsoc has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
trapped_ has joined #crystal-lang
trapped has quit [Ping timeout: 260 seconds]
sleeper is now known as sleeper_
waj has joined #crystal-lang
waj has quit [Ping timeout: 246 seconds]
eam has quit [Ping timeout: 265 seconds]
zamith has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
zamith has joined #crystal-lang
zamith has quit [Client Quit]
<crystal-gh> [crystal] zamith opened pull request #1194: Adds the bit reference method to Ints (master...binary-at-index) http://git.io/v3Fx7
trapped_ has quit [Read error: Connection reset by peer]
blue_deref has joined #crystal-lang
trapped has joined #crystal-lang
zamith has joined #crystal-lang
zipR4ND has joined #crystal-lang
waj has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
waj has quit [Ping timeout: 244 seconds]
zipR4ND has quit [Ping timeout: 265 seconds]
kulelu88 has joined #crystal-lang
NeverDie has joined #crystal-lang
sailorswift has joined #crystal-lang
flou has joined #crystal-lang
<flou> currently is there any way to deal with an integer value that is greater than 18446744073709551615 (UInt64.MAX) ?
<jhass> >> BigInt
<DeBot> jhass: Error in line 4: undefined constant BigInt - http://carc.in/#/r/bk7
<jhass> >> require "big_int"; BigInt.new("18446744073709551616")
<DeBot> jhass: # => 18446744073709551616 - http://carc.in/#/r/bk8
<flou> oh right sorry, forgot to check the API docs :)
<flou> thanks
<jhass> no worries
<flou> I've just started working on a "learn X in Y minutes" for crystal based on the ruby one, don't know if someone is already on it
<jhass> might be nice to highlight some of the differences https://github.com/manastech/crystal/wiki/Crystal-for-Rubyists
<BlaXpirit> flou, you think you can do better than http://crystal-lang.org/docs/ ?
<BlaXpirit> or is it like more focused on examples?
<jhass> writing something like http://www.zenspider.com/Languages/Ruby/QuickRef.html could be nice too
<flou> well I took some examples from the docs actually, and the documentation is very good
<flou> but I started it for people who look for an introduction like learnxiny and who may be afraid of scanning through pages of official docs
<BlaXpirit> makes no sense to me
<flou> wow didn't know about that zenspider quickref
flou has quit [Read error: Connection reset by peer]
flou has joined #crystal-lang
<flou> yes maybe it doesn't make sense but it's also a way for me to really get into the language :)
<jhass> the more resources we have the better, even if redundant
<jhass> = more ways people can discover ;)
<flou> exactly
flou has quit [Quit: Textual IRC Client: www.textualapp.com]
<Netfeed> how can i "forward" a splat? def fun(*splat); new_fun(splat); end ?
<jhass> new_fun(*splat)
<jhass> in a call it passes the elements of a tuple as parameters
<Netfeed> how does that work with default values? def func(foo=1, *bar) ? func(2,3,4) would be foo=2 and bar = {2,3} ?
<Netfeed> 3,4*
<BlaXpirit> yes
<Netfeed> ok, thanks
<sardaukar> is there a special way of doing ` cat #{file}` ? is it at all possible?
<BlaXpirit> sardaukar, what do u mean a special way, doesn't this work?
<sardaukar> no :/
<jhass> File.read(file)
<BlaXpirit> uh just read the file and write it out
<sardaukar> i'd like to do this on a spec routines_on_dump = `cat #{file} | grep -E "Routine|routine" | grep -Ev "Action|Pre-action"`.split('\n')
<BlaXpirit> perhaps it's the | part that breaks it
<BlaXpirit> eh i have no idea
<sardaukar> I guess I'll have to pre-process the files beforehand
<sardaukar> meh
<jhass> File.readlines(file).select(&.match(/routine/i)).reject(&.match(/Action|Pre-action/)
<BlaXpirit> hax :)
<jhass> )
<sardaukar> that's better :D
<sardaukar> thanks!
<BlaXpirit> gonna take ages to learn stuff like this
<sardaukar> jhass: read_lines, not readlines :P
<jhass> derp
<sardaukar> I still think readlines is better
<jhass> I wouldn't mind File.each_line(path) actually
<sardaukar> hmm is there a way to force ASCII reading?
<sardaukar> I get Invalid Byte Sequence in UTF8
<jhass> then it's not valid ASCII either
<BlaXpirit> sardaukar, if it's invalid utf8, then it's defini
<BlaXpirit> bah, no use, jhas wrote it first
<jhass> but no, no encoding support yet
<jhass> convert to UTF-8 externally
<sardaukar> is there a cli tool to find the offending chars?
<sardaukar> I don't get it, grep has no issues
<jhass> run enca on it, sometimes file can detect it too
<sardaukar> storyfiles/v3/zork1.z3.dump: ASCII Pascal program text
<sardaukar> lol
<sardaukar> enca says it's 7bit ASCII
<jhass> huh
<sardaukar> it's the output of a fairly old program
<jhass> can ruby read it? ruby -e "File.read('...')"
<sardaukar> yes
<jhass> mmh
<jhass> might be a bug, can you upload it somewhere?
<sardaukar> sure
<sardaukar> preference?
<jhass> not really
<sardaukar> ok, that was *not* the file I was reading :|
<sardaukar> file path typo
<jhass> yeah, that one seems to work fine
<sardaukar> sorry!
<jhass> no worries
waj has joined #crystal-lang
waj has quit [Ping timeout: 240 seconds]
<sardaukar> is there a way to do string diffs in specs?
<sardaukar> I mean, to compare and get the diff in the message when it fails?
<jhass> don't think anybody wrote something for that yet
<sardaukar> any info on custom matchers?
<sardaukar> cool! thanks
<BlaXpirit> maan, the possibilities for introspection are endless
havenwood has quit [Remote host closed the connection]
elia has joined #crystal-lang
sfcgeorge has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
BlaXpirit has quit [Quit: Konversation]
zamith has joined #crystal-lang
<dzv> is it possible to include Enumerable for class methods?
<jhass> mmh, you can try if it works with extend
elia has quit [Quit: Computer has gone to sleep.]
<dzv> that may work. thanks
elia has joined #crystal-lang
elia has quit [Client Quit]
elia has joined #crystal-lang
<dzv> does anyone get an "Index out of bounds" exception when running this on HEAD. ENV.each { |k, v| p k }
<jhass> nope
<dzv> found the bug. a blank value. http://carc.in/#/r/bkt
<dzv> i'll send a PR
<crystal-gh> [crystal] zamith closed pull request #1194: Adds the bit reference method to Ints (master...binary-at-index) http://git.io/v3Fx7
trapped has quit [Read error: Connection reset by peer]
elia has quit [Quit: Computer has gone to sleep.]
<dzv> what type is T of include Enumerable(T)? it doesn't appear effect what i send to yield in 'def each'
<sfcgeorge> It's a type placeholder, that will be filled in when you use it. So if it's full of strings T will be String. I believe
<sfcgeorge> It looks like it's expecting a union type, rather than 2 types
<dzv> but i'm passing a tuple...
havenwood has joined #crystal-lang
<sfcgeorge> True
<sfcgeorge> It works without the map
havenwood has quit [Ping timeout: 264 seconds]
<sfcgeorge> Array uses Enumerable but Hash doesn't. It kinda looks like Enumerable isn't suitable for multiple yields. Hash uses EntryIterator, KeyIterator and ValueIterator but those are subclasses so can't be used. Copy paste I guess.
waj has joined #crystal-lang