jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.4 | 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
jtarchie has quit [Quit: Connection closed for inactivity]
NeverDie has quit [Read error: Connection reset by peer]
NeverDie has joined #crystal-lang
fowlduck has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
wuehlmaus has quit [Quit: Lost terminal]
<crystal-gh> [crystal] will opened pull request #871: Update Projectfile and .travis.yml templates (master...templates) http://git.io/vt4u3
ozra_ has quit [Ping timeout: 246 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
fowlduck has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
fowlduck has joined #crystal-lang
datanoise has quit [Ping timeout: 252 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
havenwood has quit [Ping timeout: 250 seconds]
bcardiff has joined #crystal-lang
havenwood has joined #crystal-lang
waj has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
waj has quit [Client Quit]
waj has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 276 seconds]
fowlduck has joined #crystal-lang
waj has quit [Quit: waj]
<crystal-gh> [crystal] hugoabonizio opened pull request #872: Remove useless message (master...hugoabonizio-remove-message) http://git.io/vt4b8
fowlduck has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 264 seconds]
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
fowlduck has joined #crystal-lang
BlaXpirit has joined #crystal-lang
fowlduck has quit [Ping timeout: 264 seconds]
wuehlmaus has joined #crystal-lang
unshadow_ has joined #crystal-lang
<unshadow_> jhass: you know what would be a cool addition to the bot ? an annaouncment here for every new question asked in SO with the crystal-lang tag
<jhass> uh
<jhass> does SO have an API or would we need an RSS reader?
ashleyis has joined #crystal-lang
fowlduck has joined #crystal-lang
<jhass> don't see an API endpoint for it
<jhass> nah, would need to make an account
<unshadow_> maybe easier is RSS TBH
<jhass> both need state :/
<jhass> I'd want something that I can ask "all new since 10 minutes ago"
fowlduck has quit [Ping timeout: 248 seconds]
<jhass> /search is actually close but only accepts dates :/
<unshadow_> >> Time.now + TimeSpan(0,10,0)
<DeBot> unshadow_: Error in line 4: TimeSpan is not a generic class, it's a struct - http://carc.in/#/r/5mi
<unshadow_> >> Time.now + TimeSpan.new(0,10,0)
<DeBot> unshadow_: # => 2015-06-27 08:34:00 +0000 - http://carc.in/#/r/5mj
<unshadow_> :)
<jhass> http://api.stackexchange.com/2.2/questions?page=1&pagesize=5&order=desc&min=2015-06-27%2008:20:00&sort=creation&tagged=crystal-lang&site=stackoverflow well that could work I guess
<jhass> anyway, won't have time to hack on it this weekend
<jhass> as always though, contributions welcome
vegai has joined #crystal-lang
unshadow_ has quit [Quit: leaving]
<crystal-gh> [crystal] yui-knk opened pull request #874: Add Hash#merge test case (master...fix/test_hash_merge) http://git.io/vtBwm
fowlduck has joined #crystal-lang
<crystal-gh> [crystal] yui-knk opened pull request #875: Declear type of arg hash (Hash#merge!) (master...fix/hash_merge_type) http://git.io/vtBK0
fowlduck has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] yui-knk opened pull request #876: Implement Hash#merge! with block (master...feature/hash_merge_block) http://git.io/vtBMj
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 244 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 256 seconds]
unshadow_ has joined #crystal-lang
<unshadow_> How can I create a Hash of hashes ? Something like this http://carc.in/#/r/5oc
ozra_ has joined #crystal-lang
<unshadow_> >> a = {} of Hash(Symbol => String)
<DeBot> unshadow_: Syntax error in eval:4: expecting token ')', not '=>' - http://carc.in/#/r/5od
<unshadow_> >> a = {} of Hash
<DeBot> unshadow_: Syntax error in eval:4: expecting token '=>', not 'NEWLINE' - http://carc.in/#/r/5oe
<unshadow_> >> a = {} of String => Hash
<DeBot> unshadow_: # => {} - http://carc.in/#/r/5of
NeverDie has joined #crystal-lang
wanderer_ has joined #crystal-lang
<jhass> >> a = {} of String => Hash(Symbol, String)
<DeBot> jhass: # => {} - http://carc.in/#/r/5p1
<jhass> unshadow_: ^
<unshadow_> jhass: thanks :)
<unshadow_> apperently this also works a = {} of String => Hash
<jhass> huh
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"
<DeBot> jhass: # => "a" - http://carc.in/#/r/5p2
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"; a.class
<DeBot> jhass: # => Hash(String, Hash(K, V)) - http://carc.in/#/r/5p3
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"; a["a"][:a]?.class
<DeBot> jhass: # => String - http://carc.in/#/r/5p4
<jhass> mmh
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"; typeof(a["a"][:a]?=
<DeBot> jhass: Syntax error in eval:4: unexpected token: = - http://carc.in/#/r/5p6
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"; typeof(a["a"][:a]?)
<DeBot> jhass: # => String? - http://carc.in/#/r/5p7
<jhass> interesting
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"; a[:b] = {} of Int32 => Bool
<DeBot> jhass: Error in line 4: no overload matches 'Hash(String, Hash(K, V))#[]=' with types Symbol, Hash(Int32, Bool) - http://carc.in/#/r/5p9
<jhass> >> a = {} of String => Hash; a["a"] = {} of Symbol => String; a["a"][:a] = "a"; a["b"] = {} of Int32 => Bool
<DeBot> jhass: in line 4: no overload matches 'Hash(Int32, Bool)#[]=' with types Symbol, String - http://carc.in/#/r/5pa
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
<unshadow_> LOL
ashleyis has quit [Ping timeout: 250 seconds]
<unshadow_> jhass: what do you think: https://github.com/manastech/crystal/issues/879 is this becuase of base64,secure_random ?
<unshadow_> #879
<unshadow_> :( I remmbered the bot knew how to say issues
<unshadow_> !#879
<jhass> !enable GithubIssues
<DeBot> jhass: Enabled GithubIssues.
<unshadow_> Oh..
<unshadow_> #879
<unshadow_> heheh
<unshadow_> !disable GithubIssues
<unshadow_> access control ha ?
<jhass> of course
ashleyis has joined #crystal-lang
flaviu has quit [Ping timeout: 256 seconds]
<unshadow_> jhass: running this code: http://carc.in/#/r/5pe , why does it returns "in line 16: undefined local variable or method 'sid'" ?
<jhass> unshadow_: it's called "closures", not "inject stuff into my parent scope"
ashleyis has quit [Ping timeout: 252 seconds]
flaviu has joined #crystal-lang
<unshadow_> hm....I see,
<crystal-gh> [crystal] asterite closed pull request #878: Remove unnecessary space (master...fix/spase) http://git.io/vtBQM
<DeBot> https://github.com/manastech/crystal/pull/878 (Remove unnecessary space)
<unshadow_> thanks
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtR4b
<crystal-gh> crystal/master 3880f22 Hugo Abonizio: Remove useless message...
<crystal-gh> crystal/master 1c11bc9 Ary Borenszweig: Merge pull request #872 from hugoabonizio/hugoabonizio-remove-message...
<DeBot> https://github.com/manastech/crystal/pull/872 (Remove useless message)
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtRBi
<crystal-gh> crystal/master c08aea3 yui-knk: Add Hash#merge test case...
<crystal-gh> crystal/master 0ec7b54 Ary Borenszweig: Merge pull request #874 from yui-knk/fix/test_hash_merge...
<DeBot> https://github.com/manastech/crystal/pull/874 (Add Hash#merge test case)
bcardiff has joined #crystal-lang
ashleyis has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtR0V
<crystal-gh> crystal/master e43c1c1 yui-knk: Implement Hash#merge! with block
<crystal-gh> crystal/master 5d2572a Ary Borenszweig: Merge pull request #876 from yui-knk/feature/hash_merge_block...
<DeBot> https://github.com/manastech/crystal/pull/876 (Implement Hash#merge! with block)
ashleyis has quit [Ping timeout: 265 seconds]
<travis-ci> manastech/crystal#2574 (master - 0ec7b54 : Ary Borenszweig): The build passed.
<travis-ci> manastech/crystal#2573 (master - 1c11bc9 : Ary Borenszweig): The build passed.
<unshadow_> !disable travis-ci
<unshadow_> ;)
<jhass> mmh, I guess we're close to having #crystal-dev or something makes sense
<travis-ci> manastech/crystal#2575 (master - 762a346 : Ary Borenszweig): The build passed.
<unshadow_> yeha :)
<unshadow_> btw, in latest HEAD ary changed IndexOutOfBounds to something else, can't find the exception
<jhass> IndexError to IndexOutOfBounds
<jhass> or vice versa?
<unshadow_> vice versa
<travis-ci> manastech/crystal#2576 (master - 5d2572a : Ary Borenszweig): The build passed.
ashleyis has joined #crystal-lang
ponga has joined #crystal-lang
<ozra_> Anyone know if I can make some block (method, block, whatever) that pass to a macro with undefined references intact (the macro would create a bunch of "de facto" variables the block/func relies on, first then they are available to resolve)
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vtR2L
<crystal-gh> crystal/master 32e8b0a Ary Borenszweig: benchmark/ips: use `max_of` instead of `map { ... }.max`
<crystal-gh> crystal/master bec1a3e Ary Borenszweig: Use has_key? in Hash#merge! with block
<crystal-gh> crystal/master e863ed2 Ary Borenszweig: Use `be` expectation instead of comparing `object_id`
bcardiff has quit [Quit: Leaving.]
fowlduck has joined #crystal-lang
<crystal-gh> [crystal] yui-knk opened pull request #881: Add Bool#xor (master...feature/xor) http://git.io/vtRaS
<travis-ci> manastech/crystal#2577 (master - e863ed2 : Ary Borenszweig): The build passed.
fowlduck has quit [Ping timeout: 248 seconds]
ashleyis has quit [Ping timeout: 255 seconds]
datanoise has joined #crystal-lang
<crystal-gh> [crystal] yui-knk opened pull request #883: Fix to run test case with using `assert` (master...fix/test) http://git.io/vtRwj
<DeBot> https://github.com/manastech/crystal/pull/883 (Fix to run test case with using `assert`)
<crystal-gh> [crystal] yui-knk opened pull request #884: Add type to an arg of Hash#merge! (master...fix/hash_merge) http://git.io/vtRrx
<DeBot> https://github.com/manastech/crystal/pull/884 (Add type to an arg of Hash#merge!)
flaviu has quit [Ping timeout: 256 seconds]
ashleyis has joined #crystal-lang
<vifino> Hey guys, I'm playing with the idea of binding gstreamer to crystal; How would I go ahead and do that, with all the custom gstreamer-specific types?
<epitron> Do people still use gstreamer? :)
<epitron> I guess gnome's bare bones video player does
bcardiff has joined #crystal-lang
<willl> vifino: if you just hold onto the types to pass them to other c functions, then you can just make them an alias type for a Void*
<willl> if you need to go in and get things, then you have to do more work
<vifino> willl: I'll try, thanks :)
<willl> for example, the type that represents a postgres result, i never touch in crystal, just pass around https://github.com/will/crystal-pg/blob/master/src/pg/libpq.cr#L31
flaviu has joined #crystal-lang
<vifino> epitron: Shush you, it is a good backend for an audio player. Not having to worry about what sound driver to use is a wonderful thing. I am using JACK audio, and since that is a quite exotic sound server compared to your usual pulse, I am happy that gstreamer has a backend for it.
<epitron> Hey, if you have a use for it, that's great!
<crystal-gh> [crystal] yui-knk opened pull request #885: Add Bool#to_s tests (master...test/add_to_s) http://git.io/vtRPX
<epitron> I always liked gstreamer in concept, and it's quite performant and featureful
<epitron> But for some reason, nobody uses it
<epitron> Maybe it's because debian puts all the good codecs in that nonfree repo
<epitron> So nobody can play their videos without adding special packages
<epitron> mpv and ffmpeg and mplayer all get around that somehow
<epitron> So, you're making a crystal music player, vifino?
<vifino> epitron: Yeah, as an mpd user which converted to mopidy, I want something not python :)
<vifino> Everything-but would be okay :P
<epitron> I can't stand anything else after using Foobar2000
<epitron> I use audacious because it's the least attempting to be a music library, which most things suck at
<epitron> I should give mpd another try
<vifino> I really recommend mopidy :)
<vifino> It's python, but it has maaaany features, like playing from youtube or spotify and not only local library
ponga has quit []
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vtRMX
<crystal-gh> crystal/master 37deeb3 Ary Borenszweig: Fixed String#strip when the result is the empty string. Fixes #873
<DeBot> https://github.com/manastech/crystal/issues/873 ("\n".strip => negative index exception)
Ven has joined #crystal-lang
dtscodefish has joined #crystal-lang
dtscodefish is now known as dtscode
bcardiff has quit [Quit: Leaving.]
strcmp1 has joined #crystal-lang
<vifino> willl: Just a quick noob question: What would the crystal type be for `char **argv[]` for example?
<jhass> vifino: isn't gstreamer gobject based and has introspection?
<vifino> jhass: Think so, yeah.
<jhass> so you have a reason to continue work on https://github.com/jhass/crystal-gobject :P
<vifino> I have no idea what it does, but alright x.x
<vifino> ... Even less how to use it >_<
<jhass> it's a bit messy, granted ^.^
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> manastech/crystal#2584 (master - 37deeb3 : Ary Borenszweig): The build passed.
<vifino> jhass: You lost me at "entry" x.x
<jhass> heh
<jhass> it's not thaaat bad
<vifino> But I'm thaaat bad >_<
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<jhass> jeez, they managed to split gstreamer into like 20 typelibs?
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtRHO
<crystal-gh> crystal/master 4a71b16 yui-knk: Add Bool#xor
<crystal-gh> crystal/master 5aa9fd4 Ary Borenszweig: Merge pull request #881 from yui-knk/feature/xor...
<vifino> jhass: Yeah ._.
<jhass> gobject stuff is complex, binding it even more so, I'm afraid if you can't dig through what I've done you won't have a fun time in binding it manually either...
<crystal-gh> [crystal] asterite closed pull request #877: Implement Hash#invert (master...feature/hash_invert) http://git.io/vtBQz
<DeBot> https://github.com/manastech/crystal/pull/877 (Implement Hash#invert)
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtRHy
<crystal-gh> crystal/master ed19c92 yui-knk: [ci skip] Fix typo
<crystal-gh> crystal/master df6a17e Ary Borenszweig: Merge pull request #882 from yui-knk/fix/typo2...
<unshadow_> I got some error with macro: https://gist.github.com/bararchy/28f0943559247868d085 where does the when goes ?
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtRHA
<crystal-gh> crystal/master e5bb90d yui-knk: Fix to run test case with using `assert`
<crystal-gh> crystal/master ce47f72 Ary Borenszweig: Merge pull request #883 from yui-knk/fix/test...
<DeBot> https://github.com/manastech/crystal/pull/883 (Fix to run test case with using `assert`)
<jhass> unshadow_: well I guess methods is empty when you call it
<crystal-gh> [crystal] asterite closed pull request #884: Add type to an arg of Hash#merge! (master...fix/hash_merge) http://git.io/vtRrx
<DeBot> https://github.com/manastech/crystal/pull/884 (Add type to an arg of Hash#merge!)
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vtRQq
<crystal-gh> crystal/master 8be11de yui-knk: Add Bool#to_s tests
<crystal-gh> crystal/master e0062b6 Ary Borenszweig: Merge pull request #885 from yui-knk/test/add_to_s...
<crystal-gh> [crystal] asterite closed pull request #886: Add tests for Bool#! (master...test/bool_ban) http://git.io/vtRP1
<DeBot> https://github.com/manastech/crystal/pull/886 (Add tests for Bool#!)
<vifino> That's that then, I'mma just do it in C ._.
<jhass> vifino: or try ruby-gir or python-gobject
<jhass> er, python-gobject-introspection it is called iirc
asterite has joined #crystal-lang
<asterite> willl: a small improvement over aliasing Void is aliasing Void*
<asterite> We use that in the LLVM bindings for example
<crystal-gh> [crystal] yui-knk opened pull request #887: [ci skip] Add docs for Comparable (referenced Ruby doc) (master...doc/add_comparable) http://git.io/vtRQP
<DeBot> https://github.com/manastech/crystal/pull/887 ([ci skip] Add docs for Comparable (referenced Ruby doc))
<asterite> less overall typing
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
<willl> good call
<asterite> willl: fast :-)
<travis-ci> manastech/crystal#2585 (master - 5aa9fd4 : Ary Borenszweig): The build passed.
<asterite> I wonder if we should just keep `alias` and remove `type`. `type` is more type safe, but still...
<travis-ci> manastech/crystal#2587 (master - ce47f72 : Ary Borenszweig): The build passed.
<travis-ci> manastech/crystal#2586 (master - 0814394 : Ary Borenszweig): The build passed.
<jhass> asterite: what's the difference even, I still didn't look it up
<asterite> well, if you have type Foo = Void* and then a C binding returns Foo, the type will be Foo
<asterite> then if you want to pass it to an arg that expects Void*, it won't compile. Neither to a "type Bar = Void*"
<asterite> so basically it's a different name for a same type, but they are not implicitly interchangable
<jhass> mmh, gotcha
<asterite> So maybe if you have lots of `type ... = Void*` it might be worth it, because you might accidentally mix all those void pointers
<jhass> I'm probably missing something, but how about allowing only type inside lib and only alias outside?
<asterite> But you'd still want alias, for example for SizeT
<asterite> the "trouble" is that there's currently no way to create a "type" other than getting it from a C binding
<jhass> mmh, just brainstorming, but what if type's get an autogenerated .cast that accepts their target?
<jhass> make the conversion explicit, not implicit like alias
<jhass> or even just allow some_void_pointer as SomeTypeThatPointsToVoidPointer
<jhass> that is allow casting to them but you have to do it
<asterite> Or maybe we can use `as`
<asterite> so it's just a name change
<jhass> yeah, that's what I meant in the latter case
<asterite> We have to think about it :)
<asterite> oh, sorry, I misread
asterite has left #crystal-lang [#crystal-lang]
bcardiff has joined #crystal-lang
<travis-ci> manastech/crystal#2589 (master - e0062b6 : Ary Borenszweig): The build passed.
<travis-ci> manastech/crystal#2590 (master - 2fa417f : Ary Borenszweig): The build passed.
NeverDie has joined #crystal-lang
fowlduck has joined #crystal-lang
datanoise has quit [Ping timeout: 272 seconds]
fowlduck has quit [Ping timeout: 248 seconds]
fowlduck has joined #crystal-lang
<unshadow_> asterite or jhass do you remmber where was the commit (or discussion) about changing IndexOutOfBounds => IndexError ?
daneb has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 255 seconds]
<ozra_> How do you closure a var in the context you're in, in some kind of "function" (callable)
<ashleyis> does anyone know what im doing wrong? http://carc.in/#/r/5q4 :(
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
<ozra_> Hmm, I got it with proc, but, do you have to use 'call' on it? Any other way of creating a closured lambda, sorts of?
<epitron> This Travis bot is so spammy
<epitron> 3 ugly messages per commit
<jhass> ashleyis: http://carc.in/#/r/5qu
<jhass> ashleyis: but you might want to open a bug report about the error message being not shown for the included macro
<jhass> epitron: yeah, I like the idea but wish they would do single line notices
<jhass> ozra_: blocks & procs are the only things that closure
<ashleyis> Ahhh, thank you jhass didn't realise it wasn't a String
waj has joined #crystal-lang
<epitron> jhass: totally... Plus shortened links
<epitron> The bot's behaviour should be configurable per channel
<epitron> (like, it would be easy to implement had feature)
<epitron> *that
daneb has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
daneb has joined #crystal-lang
<willl> Also if you fork crystal and have travis on, your fork's builds end up in the channel :/
fowlduck has quit [Ping timeout: 256 seconds]
<ozra_> jhass: Can you get something callable that's invoced just like a method/func? Without .call()...
<ozra_> +1 on the bot output epitron, jhass :-)
<jhass> willl: fun fact: I opened an issue about that like 4 years ago
<jhass> ozra_: there's nothing
<epitron> It's probably like +53628 if you include all the channels that bot is in
<epitron> Haha
<ozra_> jhass: Ok, thanks
<epitron> I don't understand how Travis pays for all their servers
<epitron> Building stuff is pretty CPU intensive
<jhass> there's Travis pro and I think the VM hosts are sponsored, only the container stuff is EC2
<epitron> So free Travis builds are supported by a generous donation from the <your name here> foundation?
<crystal-gh> [crystal] will opened pull request #890: Use only 1 line on travis irc messages (master...single-line-travis) http://git.io/vt0cg
<DeBot> https://github.com/manastech/crystal/pull/890 (Use only 1 line on travis irc messages)
<jhass> epitron: it least for a while they were
<jhass> willl: ooh, there's an option for that? <3
<willl> just found it
<jhass> epitron: by bluebox iirc
<epitron> willl: nice!
<epitron> Now they just need to make their default template not stuck
<epitron> And do url shortening
<jhass> willl: totally will snap that for somehwere else :D
<wanderer_> jhass: yo, any idea why git doesn't merge this automatically?: <<<<<<< HEAD fun read_cycle_counter = "llvm.readcyclecounter" : UInt64 ======= fun read_cycle_counter = "llvm.readcyclecounter"() : UInt64 fun bswap32 = "llvm.bswap.i32"(id : UInt32) : UInt32 >>>>>>> 2fa417f6a4b19e71ec5f044951e1b7ff45cbeb85
<wanderer_> I should get a little more familiar with its diff algo
<jhass> wanderer_: there probably is a merge algo that does xD
<jhass> but no idea from pasting that in one line to IRC
<wanderer_> the only difference between the first lines are the parenthesis, indentation is the same
<jhass> ah well, it works linewise
<wanderer_> I would have guessed git would merge it without problems
<jhass> basically both lines were changed from both sides and there it gives up
<ozra_> jhass: Macros to the rescue worked out fine! :-)
<jhass> er, "the line"
<wanderer_> what do you mean with "from both sides"?
<jhass> wanderer_: anyway, these are easy for the human, I just git mergetool for them
<jhass> well, you have the base, which was the last merge
<jhass> then you have the stuff you added from that base
<jhass> and the stuff the other side added from that base
<jhass> the line was changed in both of these "stuffs2
<jhass> but I mean just let git mergetool run vimdiff for you, press dd a couple of times and :xa
<wanderer_> afaik I didn't change anything after the last commit, I just pulled the new changes and got this as a merge conflict
<jhass> takes 20 seconds or so
<jhass> mmh
<jhass> merge, not rebase, right?
<wanderer_> so I wondered
<wanderer_> hehe, whut :D
<wanderer_> I clicked the Pull-Button in SourceTree
<jhass> uh, hope that defaults to a merge then
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vt08h
<crystal-gh> crystal/master 12a9526 Ary Borenszweig: Merge pull request #890 from will/single-line-travis...
<crystal-gh> crystal/master cafe071 Will Leinweber: Use only 1 line on travis irc messages
<DeBot> https://github.com/manastech/crystal/pull/890 (Use only 1 line on travis irc messages)
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<wanderer_> jhass: why is FileDescriptorIO#unbuffered_close private and who can call it this way?
<jhass> FileDescriptorIO can
<jhass> src/io/buffered_io_mixin.cr:216: unbuffered_close
<jhass> I guess mixins can too
<wanderer_> shouldn't something like `a = FileDescriptorIO.new(x); a.close` be possible, too?
<jhass> it isn't?
<Kilo`byte> how to get the peer ip from an http request
<wanderer_> jhass: I'm not sure, I'm atm pulling the new commits and afaik close was replaced by private unbuffered_close, so I'd say there is no public close anymore
<jhass> verify that
<jhass> I bet there is
<strcmp1> jhass, what is "verify that" in german?
<jhass> uh
unshadow_ has quit [Quit: leaving]
<jhass> verifiziere das or überprüfe das
<wanderer_> you could instead also say "lass uns wo einwandern"
<jhass> though casual use would be teste das I guess
<strcmp1> thanks :)
<Kilo`byte> wanderer_: that has a completely different meaning
<travis-ci> manastech/crystal#12a9526 (master - Merge pull request #890 from will/single-line-travis
<DeBot> https://github.com/manastech/crystal/pull/890 (Use only 1 line on travis irc messages)
<jhass> vifino: https://github.com/jhass/crystal-gobject/commit/a65ed62e8e45798b6b23e36044173abb689a01d2 there I made Gst generate, but probably not yet usable. Just so you can get a feeling for why I say that you'd want to generate it ;) https://github.com/jhass/crystal-gobject/blob/master/src/generated/lib_gst.cr
<vifino> jhass: Thanks :) Sadly, I can't run the generator myself :(
<jhass> vifino: yeah I lied, it's stage3.cr that you want to run
<jhass> crystal src/generator/stage3.cr
daneb has quit [Remote host closed the connection]
<vifino> jhass: Alright >_<
<Kilo`byte> apparently nobody in here has a clue
<jhass> Kilo`byte: I only know for when you're behind a proxy :/
<Kilo`byte> like, from looking at the source it doesn't seem like there is a way
<wanderer_> jhass: do you think it's harmful to replace mmap/munmap with malloc/free in /fiber/fiber.cr?
<Kilo`byte> jhass: it does not seem to record that anywhere
<jhass> wanderer_: I have no idea, you should ask waj
<Kilo`byte> if socket does support it i can probably implement it myself
daneb has joined #crystal-lang
<jhass> Kilo`byte: https://github.com/jhass/carc.in/blob/master/src/web.cr#L34 here's for when you're behind a proxy
<waj> wanderer_: why do you want to use malloc/free ?
<wanderer_> waj: there is no mmap on windows
<waj> in that case I’d use “ifdef windows” to define a different behaviour
<Kilo`byte> ah socket has peeraddr
<Kilo`byte> idk what type that is though
<jhass> Kilo`byte: would probably be nice to have a version of that plus socket peer ip in stdlib
<Kilo`byte> seems to be a c struct type
<Kilo`byte> from brief look at the code
<Kilo`byte> (IPSocket.cr)
<jhass> that is check for the headers and if none is found return socket peer ip
<Kilo`byte> yeah
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vt0ze
<crystal-gh> crystal/master 986aca3 Ary Borenszweig: Fixed #889: Error message not being shown for included macro
<crystal-gh> crystal/master 0db9e45 Ary Borenszweig: Added `StringLiteral#camelcase` and `StringLiteral#underscore` in macros. Related to #889
<DeBot> https://github.com/manastech/crystal/issues/889 (Error message not being shown for included macro )
<DeBot> https://github.com/manastech/crystal/issues/889 (Error message not being shown for included macro )
<jhass> well, until I added ignore
<jhass> !disable GithubIssues
<DeBot> jhass: Disabled GithubIssues.
<ashleyis> yay @ 0db9e45 :D i had just finished getting the compiler compiled locally to attempt to add it
<jhass> ashleyis: yeah, asterite's too fast :D
<Kilo`byte> jhass: i just assume DeBot is also written in crystal
<jhass> yup
<Kilo`byte> open source?
<jhass> yup
<Kilo`byte> good boy :P
<Kilo`byte> irc bots shall be open source :P
<jhass> but stuck on 0.6.1
<ozra_> wanderer_: Without knowing, but just hearing mmap/munmap and fiber together indicates to me that it's used of rcommunication (_shared_ memory)
daneb has quit [Remote host closed the connection]
<wanderer_> waj: I already did. but there is no harm in using malloc instead of mmap?
<waj> I found it to be much faster with mmap in linux and osx
<ozra_> aha
<waj> no, is no shared memory, all is allocated with MAP_PRIVATE
<ozra_> waj: Is there an official crystal stdlib lib for mmap, or do I just use c wrappers myself?
<ozra_> (not related to the fibers.. personal use case )
<ozra_> thanks
ozra_ has quit [Quit: Page closed]
<waj> it’s in the std. No need to define anything
ozra_ has joined #crystal-lang
<crystal-gh> [crystal] hugoabonizio opened pull request #892: Fix HTTP::Request#keep_alive? method (master...master) http://git.io/vt0gQ
<wanderer_> btw to be more specific it's in the posix std, not the c std
bcardiff has quit [Quit: Leaving.]
<wanderer_> any idea what is meant with "loc pragma"?
<waj> “loc pragma” is used by macros while expanded, so errors can be pointed to the original source code
asterite has joined #crystal-lang
<travis-ci> manastech/crystal#986aca3 (master - Fixed #889: Error message not being shown for included macro): The build passed. https://travis-ci.org/manastech/crystal/builds/68627205
daneb has joined #crystal-lang
<asterite> loc pragma isn't documented, it probably should
bcardiff has joined #crystal-lang
<asterite> so it basically allows setting a file/line/column with a comment. We use it in ECR so we can make errors in the .ecr files be reported as if the "real" code is there
<wanderer_> I was able to compile 0.7.3 with my 0.7.2, and now 0.7.4 with that 0.7.3, but when trying to compile 0.7.4 with 0.7.4 I get "unexpected end of file in loc pragma"
<asterite> wanderer_: just tried it on mac and linux vm and it compiles fine. Sure it's 0.7.4? The error is also very strange
<wanderer_> sorry, not exactly 0.7.3 and 0.7.4
<asterite> wanderer_: what are you trying to do? :)
<wanderer_> my srces were from 0.7.2 and I pulled everything two weeks ago, merged them and commited, and then pulled everything again just now
<asterite> Maybe bootstrapping in another system?
<wanderer_> I just want to merge the master-commits with the win32-branch
fowlduck has joined #crystal-lang
<asterite> so you are getting that error in the win32 branch after the merge?
havenwood has joined #crystal-lang
<wanderer_> since my last push to win32 one month ago I pulled everything some weeks ago and the rest just now, I could compile the newest version with the previous one, but I can't compile it again with the compiled one
fowlduck has quit [Ping timeout: 264 seconds]
asterite has quit [Quit: Page closed]
asterite has joined #crystal-lang
<wanderer_> the cache folder .crystal is the one I used with the last 0.7.2/.3 compiler
<asterite> I think the cache folder shouldn't matter
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 255 seconds]
<wanderer_> asterite: I still don't have any exceptions, do you know how I can get more information on this "unexpected end of file in loc pragma"?
<asterite> in which file you get it?
<wanderer_> that's the problem, I don't know :)
<wanderer_> exceptions are still simply a printf + exit
<wanderer_> so I only get "unexpected end of file in loc pragma", that's why I want to know how to get more information about the error at https://github.com/manastech/crystal/blob/master/src/compiler/crystal/syntax/lexer.cr#L2125
<asterite> Oh, I see. You could try printing @filename before that line
<wanderer_> hm, says "unexpected end of file in loc pragma C:\\Users\\User\\Desktop\\crystal\\src\\compiler"
<wanderer_> asterite: `raise "unexpected end of file in loc pragma #{@filename}"`
<asterite> that's when you try to compile the compiler? Maybe you can try compiling just some files of the compiler
<asterite> I don't know why @filename ends up being that, but maybe that's the mistake
<wanderer_> hm
<wanderer_> asterite: do you know how to implement exception handling with setjmp/longjmp in LLVM?
<asterite> No idea. waj made the exception handling, I only have a vague idea. But no idea at all about setjmp/longjmp
<wanderer_> because afaik this would be cross-platform
<waj> wanderer_: for which platform you wish to use setjmp/longjmp?
<waj> arm?
<wanderer_> exception handling on windows 64bit is possible with LLVM, ponylang has it, I'm not experienced enough for this, though
<wanderer_> exception handling on windows 32bit is not possible with LLVM yet, as far as I know
<wanderer_> setjmp/longjmp should work with both win32 and win64, shouldn't it?
<waj> Maybe but I’d try to avoid it if possible
<waj> using unwind exceptions, doesn’t have any overhead until an exception is raised
<wanderer_> yes, but's it's more portable
<wanderer_> and it could be an addition
<waj> sure
<wanderer_> I'm not able to implement exception handling and when trying to mess with the compiler on windows I always get useless exceptions because there is no unwinding
<wanderer_> and 32bit windows seh is not working with LLVM yet, afaik, so setjmp/longjmp could be a temporary solution
bcardiff has quit [Quit: Leaving.]
Ven has joined #crystal-lang
fowlduck has joined #crystal-lang
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
fowlduck has quit [Ping timeout: 248 seconds]
<waj> wanderer_: do you have clang running on windows?
<wanderer_> waj: no atm not
<waj> because if you did, you could try to see what llvm is using for exception handling
<waj> compiling an example like this: https://gist.github.com/waj/fbe5c0aa15e124a51e29
<waj> with: clang++ -S -emit-llvm exceptions.cc -o exceptions.ll
datanoise has joined #crystal-lang
<wanderer_> I'll try
datanoise has quit [Ping timeout: 250 seconds]
vikaton has joined #crystal-lang
leafybasil has joined #crystal-lang
unshadow has quit [Ping timeout: 264 seconds]
unshadow has joined #crystal-lang
unshadow has quit [Ping timeout: 255 seconds]
dtscode is now known as charmander
datanoise has joined #crystal-lang
waj has quit [Quit: waj]
fowlduck has joined #crystal-lang
datanoise has quit [Ping timeout: 246 seconds]
fowlduck has quit [Ping timeout: 248 seconds]
Ven has quit [Ping timeout: 252 seconds]
Ven has joined #crystal-lang
<vifino> jhass: So instead of just making bindings by hand and stuff, I'll just make a header parser or something for non-gobject stuffs.
<vifino> Not sure if it's that good of an idea, but oh well.
<jhass> vifino: there's a bunch already in fact
<vifino> jhass: Hmm?
<vifino> What do you mean?
<vifino> ._. python. Arrrrgh!
<vifino> That seems more reasonable and not-python-y.
<BlaXpirit> jhass, that last one is a stub
<jhass> whatever
<BlaXpirit> fazibear's seems the 2nd best choice
<BlaXpirit> haven't seen farleyknight's
<jhass> I tried none of them, so *shrug*
<BlaXpirit> is that an actual C parser in Crystal
<BlaXpirit> well that's a lot of work
<BlaXpirit> vifino, can you figure out how to use https://github.com/farleyknight/crystal-c-api-generator ?
<vifino> Alright.
<BlaXpirit> welp, it doesn't work at all
<BlaXpirit> seems to be for old version of crystal and abandoned
<vifino> BlaXpirit: Yeah, it's a library, I think, not even a tool is included.
<vifino> All the pythons ._.
<vifino> welp, my portable ssd detached, long live the diskless computer
<vifino> brb ._.
BlaXpirit has quit [Quit: Quit Konversation]
daneb has quit [Remote host closed the connection]
<vifino> There, an attached /home feels much better.
leafybasil has quit []
<vifino> jhass: I'mma grab all the generated stuff and put it in a github repo so it is manageable with crystal deps and requireable, crediting you completely of course.
havenwood has quit [Ping timeout: 272 seconds]
<vifino> jhass: Oh god, I'm going to have to rip it apart badly ._.
<vifino> jhass: Actually, I'll just make some cheap wrappers like src/gtk/gtk.cr and pr my changes in.
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 252 seconds]
waj has joined #crystal-lang