asterite changed the topic of #crystal-lang to: #crystal-lang The Crystal programming language | http://crystal-lang.org | Crystal 0.6.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
c355E3B has quit [Quit: Leaving]
bcardiff has quit [Quit: Leaving.]
ponga has quit [Remote host closed the connection]
donmelton has left #crystal-lang [#crystal-lang]
donmelton has joined #crystal-lang
donmelton has left #crystal-lang ["Textual IRC Client: www.textualapp.com"]
ponga has joined #crystal-lang
donmelton has joined #crystal-lang
donmelton has left #crystal-lang ["Textual IRC Client: www.textualapp.com"]
donmelton has joined #crystal-lang
markhend has joined #crystal-lang
markhend has quit [Client Quit]
donmelton has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
donmelton has joined #crystal-lang
ponga has quit [Remote host closed the connection]
ponga has joined #crystal-lang
donmelton has left #crystal-lang ["Textual IRC Client: www.textualapp.com"]
colorisco has quit [Ping timeout: 248 seconds]
colorisco has joined #crystal-lang
panga has joined #crystal-lang
ponga has quit []
panga is now known as ponga
orliesau- has joined #crystal-lang
colorisco has quit [*.net *.split]
orliesaurus has quit [*.net *.split]
colorisco has joined #crystal-lang
colorisco has quit [Ping timeout: 256 seconds]
colorisco has joined #crystal-lang
ponga has quit [Quit: Leaving...]
ponga has joined #crystal-lang
JBat has joined #crystal-lang
JBat has quit [Quit: Computer has gone to sleep.]
DeBot has quit [Remote host closed the connection]
jhass has quit [Read error: Connection reset by peer]
jhass has joined #crystal-lang
jua_ has joined #crystal-lang
JBat has joined #crystal-lang
DeBot has joined #crystal-lang
ponga has quit [Quit: Leaving...]
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
ponga has joined #crystal-lang
ponga has quit [Client Quit]
waterlink has joined #crystal-lang
<waterlink> Just got this, when running on Ubuntu 14.04:
<waterlink> Using compiled compiler at .build/crystal
<waterlink> .crystal/spec/main.o: In function `__crystal_main':
<waterlink> main_module:(.text+0x623): undefined reference to `GC_get_push_other_roots'
<waterlink> main_module:(.text+0x689): undefined reference to `GC_set_push_other_roots'
<waterlink> main_module:(.text+0x68e): undefined reference to `co_thread_init'
<waterlink> .crystal/spec/Fiber.o: In function `*Fiber#initialize<Fiber>:Fiber':
<waterlink> Fiber:(.text+0x163): undefined reference to `co_set_data'
<waterlink> .crystal/spec/Fiber.o: In function `*Fiber#initialize<Fiber, &( -> Void)>:Fiber':
<waterlink> Fiber:(.text+0x331): undefined reference to `co_set_data'
<waterlink> .crystal/spec/Fiber.o: In function `*Fiber::current:Fiber':
<waterlink> Fiber:(.text+0x6cd): undefined reference to `co_get_data'
<waterlink> collect2: error: ld returned 1 exit status
<waterlink> Any clue how to fix it?
<waterlink> I see I have libgc 7.2, need to find a way to upgrade it
<jhass> waterlink: yeah sounds like missing/too old libgc and libpcl
waterlink has quit [Ping timeout: 248 seconds]
ponga has joined #crystal-lang
havenwood has quit [Remote host closed the connection]
panga has joined #crystal-lang
ponga has quit [Ping timeout: 265 seconds]
canhtak has joined #crystal-lang
JBat has quit [Quit: Computer has gone to sleep.]
<panga> https://news.ycombinator.com/item?id=8620129 sombody mentioning crystal , i thought the same actually
<panga> >> arr = []; arr.index
<DeBot> panga: Syntax error in eval:3: for empty arrays use '[] of ElementType'
<panga> >> arr = Array.new; arr.index
<DeBot> panga: Error in line 3: undefined constant T
<panga> T?
* panga goes off a google journey of finding T
<panga> jhass: do you have a minute to spare
<jhass> panga: you need to specify the type for an empty array literal
<jhass> >> a = [] of String
<DeBot> jhass: []
<panga> oh ok
<jhass> >> a = Array(Sting).new
<DeBot> jhass: Error in line 3: undefined constant Sting (did you mean 'String'?)
<panga> T = Type
<jhass> >> a = Array(String).new
<DeBot> jhass: []
<panga> i leanrt something today
<panga> >> a = Array(String).new; a.index
<DeBot> panga: Error in line 3: 'Array(String)#index' is expected to be invoked with a block, but no block was given
<panga> hm
<panga> >> a = Array(String).new; a.index(succ)
<DeBot> panga: Error in line 3: undefined local variable or method 'succ'
<panga> >> a = Array(String).new; a.index(&:succ)
<DeBot> panga: Error in line 3: expected a function type, not Symbol
<panga> >> a = Array(String).new; a.index(:succ)
<DeBot> panga: nil
<panga> ok nil!
<panga> gotcha
<panga> jhass: somehow Array(String).new looks more natural than [] of String to me
<panga> i wonder why
leafybasil has quit [Remote host closed the connection]
canhtak has quit [Quit: canhtak]
JBat has joined #crystal-lang
ismaelga has joined #crystal-lang
waterlink has joined #crystal-lang
<waterlink> heh, now I get this:
<waterlink> .crystal//home/wimdu/playground/github/waterlink/crystal/crystal/src/ecr/process.cr/main.o: In function `main':
<waterlink> main_module:(.text+0xe66): undefined reference to `co_thread_init'
<waterlink> main_module:(.text+0xf18): undefined reference to `co_set_data'
<waterlink> main_module:(.text+0x1069): undefined reference to `co_set_data'
<waterlink> main_module:(.text+0x1e63): undefined reference to `co_get_data'
<waterlink> what is this library now ?
<jhass> waterlink: libpcl
<waterlink> which version and where to get it ?
<jhass> not sure, I a have 1.12 here, http://xmailserver.org/libpcl.html
<waterlink> Ok, I got the source of my problems, sorry to bother you
<jhass> not at all, yw
<waterlink> I used wrong terminal (where all environment variables are messed up)
<jhass> we don't make that obvious enough yet
<jhass> ah, so you weren't compiling master, just using the package?
<waterlink> No, master
<jhass> I was thinking whether we can find a way to check if all dependencies are available
<jhass> any ideas?
havenwood has joined #crystal-lang
<jhass> maybe something like a configure script? mh
<waterlink> Looks like, some wrapper script is required, that will make sure that all stuff is downloaded and all environment variables are set correctly and then just delegates to .build/crystal or bin/crystal
<jhass> I'd keep it at a checker, trying to be smart and setup everything fails IME
<jhass> *as a
<waterlink> or something along the lines of python's virtualenvs, where you just call bin/activate and it sets up the whole environment and marks your shell with the name of environment
<waterlink> For me the problem was not about dependencies, but just about having right LIBRARY_PATH
<waterlink> And actually standard configure script probably is not a bad idea. Since it checks for all dependencies and tell user exactly what is lacking and which versions are required
<jhass> well, the packages do that essentially, but I don't think reusing what the packages ship for compiling head by default is a good idea
<jhass> yeah, that's my thinking
<jhass> or maybe we can plug into automake or something, mh
<jhass> otoh having it build in the compiler wouldn't be to bad too, have it print nice error messages instead of running into linker errors
<jhass> would give it for free to all projects
c355E3B has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
JBat has quit [Ping timeout: 240 seconds]
<waterlink> Does crystal have `block_given?` alternative?
<jhass> in crystal you would define an overload that doesn't take one
<waterlink> Ok
<ytti> block_given? may be one of those things ruby shouldn't have either
<ytti> seems like additional complexity for no particular benefit
<ytti> or is there salient benefit to if &block?
<jhass> ytti: return to_enum(__method__) unless block_given?
<jhass> one popular and sane usecase
<ytti> unless &block
<ytti> would that be different?
<jhass> I think it's academically slower
<jhass> I don't find it more readable too personally
<ytti> being slower seems like missed optimization opportunity
<ytti> not justification for littering syntax
<ytti> imho
<jhass> I capture a block to say that I don't want to call it here, that I want to pass it on or store it
<jhass> if I want to call it here I use yield
<jhass> and capturing the block and then use yield seems silly too
nsf has joined #crystal-lang
<crystal-gh> [crystal] waterlink opened pull request #530: [spec/expectations] add be_including (master...add_be_including_expectation) http://git.io/vvt8T
nsf has left #crystal-lang ["WeeChat 1.1.1"]
leafybasil has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
c355E3B has quit [Quit: Leaving]
<a5i> >> Pointer(Int32).new(0x108213fc0)
<DeBot> a5i: Error in line 3: no overload matches 'Pointer(Int32):Class#new' with types Int64
<a5i> why
<a5i> outdated or part of HEAD ?
<jhass> a5i: your number is bigger than 32 bit
<jhass> what do you want to do?
<jhass> or maybe it's because it's 0.6.1, *shrug*
<a5i> hmm
jua_ has quit [Ping timeout: 264 seconds]
<a5i> how can I edit pages here ?
jua_ has joined #crystal-lang
<jhass> where?
<a5i> whoops, forgot to post the link
<a5i> thanks
<crystal-gh> [crystal] Ap0ph1s opened pull request #531: Update generics.md (gh-pages...patch-1) http://git.io/vvtxY
<a5i> :3
leafybasil has quit [Remote host closed the connection]
DerisiveLogic has joined #crystal-lang
<DerisiveLogic> a5i: Oh look.
<DerisiveLogic> Noob spotted.
<a5i> :(
<jhass> a5i: I think one should ask before submitting someones work elsewhere tbh
<a5i> jhass: ehh, it was posted on reddit publicly so I don't see any wrong in it, also if he does indeed not want it, then it won't be merged
<jhass> that's not how copyright/ownership/attribution works :/
<a5i> then it just won't be merged I guess, if he objects
<crystal-gh> [crystal] jhass opened pull request #532: Add docs heading to Contributing.md (master...patch-1) http://git.io/vvqUi
leafybasil has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vvqTA
<crystal-gh> crystal/master eae0acf Jonne Haß: Add docs heading to Contributing.md...
<crystal-gh> crystal/master 5f02f46 Ary Borenszweig: Merge pull request #532 from jhass/patch-1...
<travis-ci> manastech/crystal#2219 (master - 5f02f46 : Ary Borenszweig): The build passed.
JBat has joined #crystal-lang
panga has quit [Quit: Leaving...]
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
<a5i> >> l = lambda { "Do or do not" }; puts l.call
<DeBot> a5i: Error in line 3: undefined local variable or method 'lambda'
<a5i> Crystal doesnt have lambdas ? :O
<jhass> >> x = -> { "sure it does" }; puts x.call
<DeBot> jhass: sure it does
<a5i> oh
<a5i> well then
jua_ has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<a5i> >> def te(a,b=12); a+b;end; te(3)
<DeBot> a5i: 15
<a5i> >> def te(x,y,z); z+y+x;end; te(...[1,2,3])
<DeBot> a5i: Syntax error in eval:3: unterminated call
<jhass> >> def te(x,y,z); z+y+x;end; te(*[1,2,3])
<DeBot> jhass: Syntax error in eval:3: unterminated call
<jhass> >> def te(x,y,z); z+y+x;end; te(*{1,2,3})
<DeBot> jhass: Syntax error in eval:3: unterminated call
<jhass> heh
<jhass> >> def te(x,y,z); z+y+x; end; te(*{1,2,3})
<DeBot> jhass: Syntax error in eval:3: unterminated call
<jhass> >> def te(x,y,z); z+y+x; end; params = {1,2,3}; te(*params)
<DeBot> jhass: 6
<a5i> ahh
<JBat> >> def te(x,y,z); z+y+x; end; te(*(params = {1,2,3}))
<DeBot> JBat: Syntax error in eval:3: unterminated call
JBat has quit [Quit: Computer has gone to sleep.]
havenwood has quit []
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vvmTJ
<crystal-gh> crystal/master 70c4d78 Ary Borenszweig: Fixed a couple of splat parsing errors
<crystal-gh> crystal/master 493328d Ary Borenszweig: Added `String#gsub(Regex, Hash(String, _))` and `String#gsub(Hash(Char, _))`
<a5i> >> ptr = Pointer(Int32).malloc(1); ptr[0-ptr.address]
<DeBot> a5i: Program terminated abnormally with error code: 139
<a5i> does Crystal have postgreSQL support
<travis-ci> manastech/crystal#2221 (master - 70c4d78 : Ary Borenszweig): The build passed.
<jhass> a5i: I still don't follow what you're asking at all
<a5i> jhass: on the issue ?
<jhass> yeah
<a5i> the line right after 10.times will be part of the loop until the end keyword correct ? you said it might be part o Crystal like Ruby
<jhass> no
<jhass> you don't understand me at all
<a5i> :(
<jhass> >> 10.times
<DeBot> jhass: Error in line 3: 'Int32#times' is expected to be invoked with a block, but no block was given
<jhass> now do this in Ruby
<jhass> I'm saying it's likely that we'll get the same behavior ruby shows there
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vvmqK
<crystal-gh> crystal/master a4995c0 Alex Fedorov: [spec/expectations] add contain
<crystal-gh> crystal/master 5da8a0e Alex Fedorov: [spec/expectations: contain] Add docs, add support for not only String
<crystal-gh> crystal/master 160a447 Ary Borenszweig: Merge pull request #530 from waterlink/add_be_including_expectation...
<a5i> o
colorisco has quit [Ping timeout: 252 seconds]
<crystal-gh> [crystal] waterlink opened pull request #534: [crystal] add init command (master...crystal_init) http://git.io/vvm3E
havenwood has joined #crystal-lang