jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.18.2 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
kulelu88 has left #crystal-lang ["Leaving"]
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
Oliphaunte has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
trapped has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
franzejr has joined #crystal-lang
<tilpner> franzejr - Based s/in/on/?
<franzejr> thanks! typo!
<franzejr> What did you think about the site, tilpner?
<tilpner> Looks nice, but I didn't feel like making an account.
<franzejr> It's similar what Hacker News does
<tilpner> I have HN and Reddit for news already. It's similar, but much smaller and more narrow in scope.
<tilpner> The smaller part is of course not your fault, but I don't know how to get something like that going. :/
<franzejr> Do you know RubyFlow? The idea was similar to Rubyflow. I also don't know it's just a try :)
<franzejr> Something just centered in Crystal
<tilpner> No, I don't really use Ruby.
<franzejr> Yeah. So, Ruby community use a lot RubyFlow...
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
franzejr has quit [Quit: Page closed]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pilne has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
pilne has left #crystal-lang ["Leaving!"]
Raimondii has joined #crystal-lang
pawnbox has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
Philpax has joined #crystal-lang
ome has joined #crystal-lang
Raimondii is now known as Raimondi
trapped has quit [Read error: Connection reset by peer]
cyjimmy264 has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
Oliphaunte has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
wim_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
<wim_> HI, I'm following the 'Getting Started' page for Sidekiq at https://github.com/mperham/sidekiq.cr/wiki/Getting-Started. On compilation, if get the error: "Error opening file '/home/wim/projects/try/crystal/try/sample/libs/sidekiq/sidekiq/../../web/views/dashboard.ecr' with mode 'r': No such file or directory (Errno)". I believe I'm missing a shard, could anyone help me add it?
<wim_> For anyone taking a looking at the page, I'm trying to run the web.cr demo program.
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
<BlaXpirit> wim_, hmm i think it needs to be ran differently, maybe from a different folder
<BlaXpirit> e.g. cd folder; crystal prog.cr instead of crystal folder/prog.cr
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Oliphaunte has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
Oliphaunte has quit [Remote host closed the connection]
<wim_> BlaXpirit, I compile from the top folder, but the error comes from a source file lower down. Also, the file 'web/views/dashboard.ecr' is missing.
<BlaXpirit> wim_, k but for real try what I said
cyjimmy264 has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
mgarciaisaia1 has joined #crystal-lang
mgarciaisaia has quit [Read error: Connection reset by peer]
<wim_> BlaXpirit, did that, no change. How can I find out which shard '../../web/views/dashboard.ecr' is supposed to be?
<BlaXpirit> works here. examples$ crystal build web.cr
pawnbox has joined #crystal-lang
mgarciaisaia1 has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 250 seconds]
<wim_> BlaXpirit, the web subdir of sidekiq hasn't been loaded with the shard. Should I download this separately?
<BlaXpirit> wim_, I think you should git clone instead
<wim_> Hm. I've been following the 'Getting Started' literally. No mention of this. Perhaps I should report an issue to mperham about this.
<wim_> OK, will try that.
<BlaXpirit> wim_, hm weird. well here's what I did: git clone https://github.com/mperham/sidekiq.cr && cd sidekiq.cr && crystal dep && mv libs examples && cd examples && crystal build web.cr
<wim_> ok thanks.
ome has quit [Quit: Connection closed for inactivity]
snsei has quit [Remote host closed the connection]
<Davy_CC> I got a error when I'm using Regex#match with a block "'Regex#match' is not expected to be invoked with a block, but a block was given"
<Davy_CC> it's described in the API: http://crystal-lang.org/api/Regex.html
<BlaXpirit> Davy_CC, what are you looking to achieve?
<Davy_CC> if the regex is matched, then do some thing
<Davy_CC> I know that I can do `md = /bla/.match "blablabla"; unless md.nil?; dosomething; end`
<BlaXpirit> >> if "...abc..." =~ /a(\w)c/; p $~[1]; end
<DeBot> BlaXpirit: "b" - more at https://carc.in/#/r/120b
<Davy_CC> but the doc wrote the example for block, so I just try it
<BlaXpirit> Davy_CC, sure enough, the examples on top don't all work
<Davy_CC> so the block supporting is removed or not implement yet?
<BlaXpirit> Davy_CC, possibly removed because it is not needed
<BlaXpirit> in fact the `match` method is extremely misleading, i'd remove it as well
<Davy_CC> I think that's useful when I only want to do something if it's matched, but `$~` or the return of `#match` can be Nil | MatchData
<BlaXpirit> >> if m = (/a(\w)c/.match("...abc...")); p m[1]; end
<DeBot> BlaXpirit: "b" - more at https://carc.in/#/r/120c
<BlaXpirit> DeBot, also it seems like the example above demonstrates that $~ can't be nil
<BlaXpirit> oh good, it has a not nil assertion
<Davy_CC> yes...
<Davy_CC> anyway, I'll open a issue for the api doc
Philpax_ has joined #crystal-lang
<Davy_CC> so it raised
Philpax has quit [Ping timeout: 260 seconds]
<BlaXpirit> Davy_CC, well no, $` raises now but it was nilable before
soveran has joined #crystal-lang
<BlaXpirit> this commit shows how it went from $~ : MatchData + having to check for MatchData::EMPTY to $~ : MatchData | Nil but now it seems to be $~ : MatchData again but if you use it it can raise
<BlaXpirit> and when I wrote $` I meant $~
<Davy_CC> oops you're right
soveran has quit [Remote host closed the connection]
<Davy_CC> And it seems that block never supported in the history (I watched the git history of /src/regex.cr)
soveran has joined #crystal-lang
<BlaXpirit> honestly it almost seems worth implementing an automatic checker of validity of examples in docs
<Davy_CC> lol
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
wim_ has quit [Quit: Leaving]
pawnbox has joined #crystal-lang
onionhammer has quit [Read error: Connection reset by peer]
soveran has quit [Remote host closed the connection]
<Davy_CC> I found some problem that Float64 doesn't have `to_json` method
<Davy_CC> >> 1.0.to_json
<DeBot> Davy_CC: undefined method 'to_json' for Float64 - https://carc.in/#/r/120e
<BlaXpirit> Davy_CC, require "json" ?
<Davy_CC> oops, but why I can type `1.to_json` and works fine in playground but not `1.0.to_json`
<BlaXpirit> Davy_CC, maybe playground uses json for something, or includes it for convenience
<BlaXpirit> but everything is consistent, either both work or both don't
<Davy_CC> but if `Int#to_json` is included, why `Float#to_json` is not included at the moment? loads the file of the definition is the same one
<Davy_CC> s/loads//
<BlaXpirit> Davy_CC, see my last message
<Davy_CC> oh i see
<Davy_CC> thanks
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
trapped has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
franzejr_ has joined #crystal-lang
franzejr_ has quit [Client Quit]
franzejr_ has joined #crystal-lang
franzejr_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Philpax_ has quit [Ping timeout: 272 seconds]
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
<BlaXpirit> if I define a method_missing, I want to react upon it in some cases but leave others unimplemented. what's the best way to do that?
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<BlaXpirit> lol just dumping the error message as if it was code is one way
<BlaXpirit> {% raise "blah" %} is the way
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
Oliphaunte has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
snsei_ has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pawnbox has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
q0tw4 has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
snsei_ has joined #crystal-lang
<q0tw4> How to pass block recursively without capturing it into proc? I need to implement something like this: https://repl.it/C3wL/1
snsei has quit [Ping timeout: 246 seconds]
<jhass> q0tw4: {|*args| yield *args }
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<q0tw4> actually I need for Array.each_product([2.times.to_a] * @count) {|x| ...} :)
soveran has joined #crystal-lang
grindhold_ has joined #crystal-lang
RX14- has joined #crystal-lang
jhass|off has joined #crystal-lang
q0tw4 has quit [*.net *.split]
FromGitter has quit [*.net *.split]
jhass has quit [*.net *.split]
mose has quit [*.net *.split]
bjmllr has quit [*.net *.split]
RX14 has quit [*.net *.split]
grindhold has quit [*.net *.split]
jhass|off is now known as jhass
FromGitter has joined #crystal-lang
bjmllr has joined #crystal-lang
mose has joined #crystal-lang
q0tw4 has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaun_ has joined #crystal-lang
Oliphaunte has quit [Read error: Connection reset by peer]
Oliphaun_ has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
q0tw4 has quit [Quit: Leaving.]
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
soveran has joined #crystal-lang
Oliphaunte has joined #crystal-lang
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
steenuil has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
soveran has quit [Remote host closed the connection]
Oliphaunte has quit [Remote host closed the connection]
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
greengriminal has joined #crystal-lang
franzejr_ has joined #crystal-lang
qard has joined #crystal-lang
Oliphaunte has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
snsei has joined #crystal-lang
snsei_ has quit [Ping timeout: 240 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philpax has joined #crystal-lang
tomchapin has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
pawnbox has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
Philpax has quit [Ping timeout: 272 seconds]
soveran has joined #crystal-lang
tomchapi_ has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomchapin has quit [Ping timeout: 244 seconds]
soveran has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]