jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.3 | 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
havenwood has joined #crystal-lang
jtarchie has joined #crystal-lang
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vL1ji
<crystal-gh> crystal/master f54463d Juan Wajnerman: Use GC_push_all_eager to push fiber stacks during GC as explained by Hans Boehm: http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2005-September/000990.html (fixes #773)
strcmp2 has joined #crystal-lang
NeverDie_ has joined #crystal-lang
emmanueloga has quit [Ping timeout: 246 seconds]
jtarchie has quit [*.net *.split]
strcmp1 has quit [*.net *.split]
NeverDie has quit [*.net *.split]
<travis-ci> manastech/crystal#2525 (master - f54463d : Juan Wajnerman): The build passed.
emmanueloga has joined #crystal-lang
jtarchie has joined #crystal-lang
jtarchie has joined #crystal-lang
jtarchie has quit [Changing host]
emmanueloga has quit [Changing host]
emmanueloga has joined #crystal-lang
Dreamer3_ has joined #crystal-lang
badeball_ has joined #crystal-lang
grindhold_ has joined #crystal-lang
endou___________ has joined #crystal-lang
endou__________ has quit [Ping timeout: 943 seconds]
badeball has quit [Ping timeout: 943 seconds]
Dreamer3 has quit [Ping timeout: 943 seconds]
grindhold has quit [Read error: Connection reset by peer]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 246 seconds]
strcmp2 has quit [Quit: Leaving]
NeverDie_ is now known as NeverDie
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 246 seconds]
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 252 seconds]
unshadow has quit [Quit: leaving]
fowlduck has joined #crystal-lang
datanoise has quit [Ping timeout: 256 seconds]
fowlduck has quit [Ping timeout: 246 seconds]
datanoise has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
waj has joined #crystal-lang
BlaXpirit has joined #crystal-lang
fowlduck has joined #crystal-lang
waj has quit [Quit: waj]
fowlduck has quit [Ping timeout: 252 seconds]
datanoise has quit [Ping timeout: 264 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 246 seconds]
veelenga has joined #crystal-lang
daneb has joined #crystal-lang
strcmp1 has joined #crystal-lang
unshadow has joined #crystal-lang
datanoise has joined #crystal-lang
<unshadow> It seems that for each different class (while each class is in it's own file) I need to write require "deps...", also it seems that the load order matters unlike ruby, is this a bug ? or just how crystal works ?
datanoise has quit [Ping timeout: 246 seconds]
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
fowlduck has joined #crystal-lang
daneb has quit [Read error: Connection reset by peer]
daneb has joined #crystal-lang
fowlduck has quit [Ping timeout: 246 seconds]
<unshadow> Is this my fault ? --> http://carc.in/#/r/48o
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
<jhass> unshadow: load order matters in Ruby
<jhass> and yes, looks like a bug
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
daneb has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
daneb has joined #crystal-lang
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
veelenga has quit [Ping timeout: 246 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 265 seconds]
BlaXpirit has quit [Quit: Quit Konversation]
<jhass> >> MODES = {"v", "b", "q", "e", "o", "I", "h", "a"}
<DeBot> jhass: # => nil - http://carc.in/#/r/49t
<jhass> mmh
<jhass> >> record Foo, bar do MODES = {"v", "b", "q", "e", "o", "I", "h", "a"}; end
<DeBot> jhass: Syntax error in eval:4: dynamic constant assignment - http://carc.in/#/r/49v
<jhass> ^ anybody knows why that is?
wuehlmaus has joined #crystal-lang
fowlduck has joined #crystal-lang
datanoise has joined #crystal-lang
fowlduck has quit [Ping timeout: 255 seconds]
daneb has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Read error: No route to host]
Ven has joined #crystal-lang
daneb has joined #crystal-lang
daneb has quit [Remote host closed the connection]
emmanueloga_ has joined #crystal-lang
strcmp1 has quit [*.net *.split]
endou___________ has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
jtarchie has quit [*.net *.split]
jtarchie_ has joined #crystal-lang
endou___________ has joined #crystal-lang
emmanueloga_ is now known as emmanueloga
strcmp1 has joined #crystal-lang
BlaXpirit has joined #crystal-lang
jtarchie_ is now known as jtarchie
ryanf has quit [Ping timeout: 265 seconds]
shadeslayer has quit [Ping timeout: 265 seconds]
orliesaurus has quit [Ping timeout: 265 seconds]
shadeslayer has joined #crystal-lang
ryanf has joined #crystal-lang
orliesaurus has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
grindhold_ is now known as grindhold
datanoise has quit [Ping timeout: 276 seconds]
DeBot has quit [Quit: Crystal]
DeBot has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
strcmp1 has quit [Remote host closed the connection]
waj has joined #crystal-lang
datanoise has joined #crystal-lang
daneb has joined #crystal-lang
datanoise has quit [Ping timeout: 276 seconds]
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
NeverDie has joined #crystal-lang
datanoise has joined #crystal-lang
daneb has quit [Remote host closed the connection]
Ven has joined #crystal-lang
veelenga has joined #crystal-lang
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vLyaW
<crystal-gh> crystal/master 82e63bc Juan Wajnerman: Fix OpenSSL BIO implementation to autoflush before read. Now the HTTP::Server uses buffered sockets. (fixes #834)
<travis-ci> manastech/crystal#2527 (master - 82e63bc : Juan Wajnerman): The build passed.
unshadow has joined #crystal-lang
<unshadow> jhass: can you build latest HEAD ?
<jhass> let me try
<jhass> nope, GC_push_all_eager seems missing
<unshadow> jhass: cool, so im not alone :) https://github.com/manastech/crystal/issues/837
<waj> are you guys linking against the latest libgc?
<unshadow> waj: local/gc 7.4.2-2 A garbage collector for C and C++
vikaton has joined #crystal-lang
<waj> so, you’re not linking to the libgc in the embedded libraries
<jhass> nope
<jhass> looking at the configure args, there's nothing obvious that would enable it?
<waj> the lib included in the embedded libraries have the symbol
<jhass> which version do you ship?
<waj> we just configure with --disable-debug --disable-dependency-tracking --disable-shared
<waj> 7.4.2
<jhass> the arch package does ./configure --prefix=/usr --enable-cplusplus --disable-static
<jhass> source=("http://www.hboehm.info/gc/gc_source/${pkgname}-${pkgver}.tar.gz"
<jhass> weird
daneb has joined #crystal-lang
<jhass> do they include it only in the static one or what?
<unshadow> jhass: maybe the --enable-cplusplus removes some options that may colide or something ?
<jhass> nope it's the --disable-static
<jhass> without it even the .so gets it
daneb has quit [Remote host closed the connection]
<unshadow> damn... so, to build from source ?
daneb has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<waj> I see the GC_push_all_eager has a GC_INNER attribute
<waj> which might be expanded to __attribute__((__visibility__("hidden")))
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
<waj> and here is the definition of GC_push_all_eager: https://github.com/ivmai/bdwgc/blob/master/mark.c#L1491
<jhass> so, who wants to open an issue and get laughed at? :P
<unshadow> jhass: or, we can open an aur package with a special build ./configure
<waj> so… basically it works with the static lib, but no with the shared
<jhass> unshadow: that'd be the workaround
<waj> is it the arch package building both?
<waj> oh… no, you have —disable-static
<jhass> solution is 1) understand why it's that way 2) if upstream can't be convinced to change, try to convince ise to build the static lib
<jhass> yeah
<jhass> waj: can you help out with 1 or do we need to ask upstream?
benjreinhart has joined #crystal-lang
<waj> can you use the embedded lib in the meantime?
<jhass> mh, not really, atm I get off with not installing anything from that package, just using it to bootstrap
<jhass> I'd rather write a drop-in package for gc that changes the flag
<jhass> but as said I think neither is the correct solution
<waj> that makes sense
<unshadow> jhass: upstream is really anti-static libs
daneb has quit [Remote host closed the connection]
<jhass> unshadow: upstream = bdwgc
<jhass> ise = archlinux package maintainer for gc
<jhass> I think it's a bug upstream though
<jhass> --disable-static shouldn't influence what's exported in the dynamic library
<jhass> but it does
<jhass> remove the flag and the .so has it
fowlduck has joined #crystal-lang
<jhass> either it should not be in there regardless or it should be in there regardless
daneb has joined #crystal-lang
<jhass> so I guess it's up to me to get upstream to explain...
<waj> I’m looking for existings conversations
fowlduck has quit [Ping timeout: 244 seconds]
<unshadow> jhass: link the ticket, I'll back you up
<unshadow> it seems there are alot of people affected by this bug
benjreinhart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<unshadow> waj: :( 27 May 11:11 2012
<jhass> so they consider GC_push_eager private API or what?
<jhass> *_all_eager
<jhass> waj: so what do you think, should I open an issue?
<unshadow> waj: can't the call to GC_push_all_eager be replaced with something else ?
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
<waj> jhass: let’s open the issue but I don’t see libgc releases very often
<waj> we need a workaround
<waj> unshadow: I still don’t see a replacement
<jhass> waj: well, depending on a -git package is no issue
<jhass> as long as crystal is in the AUR at least
<unshadow> jhass: a typo ? "infuences" influences
<jhass> meh
<jhass> fixed, thanks
<unshadow> jhass: np ;)
<unshadow> I see latest release is from mid 2014...
daneb has quit [Remote host closed the connection]
<unshadow> jhass: is there a way you could create a gc-git in the meantime ?
<jhass> I'll post a workaround, sec
daneb has joined #crystal-lang
<unshadow> jhass: thanks :) I really want to test latest fixes for the HTTP Server :)
benjreinhart has joined #crystal-lang
daneb has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 246 seconds]
<unshadow> jhass: Thanks, it works for me now :)
waj has quit [Quit: waj]
<travis-ci> manastech/crystal#2528 (master - a9b00cc : Juan Wajnerman): The build passed.
datanoise has joined #crystal-lang
daneb has joined #crystal-lang
havenn has quit [Quit: Textual IRC Client: www.textualapp.com]
benjreinhart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
waj has joined #crystal-lang
datanoise has quit [Ping timeout: 248 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
NeverDie has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has joined #crystal-lang
waj has quit [Quit: waj]
Codcore has joined #crystal-lang
<jbye> are you guys running crystal build manually or have you set it up to run on file changes?
<jhass> manually and mostly just crystal foo.cr (which is a shortcut to crystal run foo.cr)
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 244 seconds]
havenwood has joined #crystal-lang
veelenga has quit [Ping timeout: 246 seconds]
Codcore has quit [Ping timeout: 246 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vLS8R
<crystal-gh> crystal/master 2b67024 Ary Borenszweig: Fixed stack overflow in `String#=~` leading to infinite recursive calls. Fixes #836
<jbye> alright thanks, i have been toying with the atom crystal linter, seems to work really well :)
<jhass> cool
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vLS43
<crystal-gh> crystal/master eca101b Ary Borenszweig: Optimized HTTP::Client by using buffering
<jbye> is it possible to convert an object using json_mapping to a Hash?
<travis-ci> manastech/crystal#2529 (master - 2b67024 : Ary Borenszweig): The build passed.
<jhass> jbye: I don't think so
<jhass> well, you could to_json it and JSON.parse that, but it feels messy
<jhass> maybe your data is better off using Hash(String, String).from_json ?
<jbye> hmm, maybe, haven't looked at that. I am fetching json from an external API, then inserting portions of it in to a database
<jbye> I imagine the Hash.from_json approach will not work well with nested json, or at least not when attempting to access the attributes
<jbye> but for now I guess I can create separate data models, and then do the mapping from one to the other "manually"
<travis-ci> manastech/crystal#2530 (master - eca101b : Ary Borenszweig): The build passed.
<jhass> jbye: you can also metaprogram the to_h http://carc.in/#/r/4ak
fowlduck has joined #crystal-lang
<jbye> thanks for the example! :)
<jhass> not sure how to extract that into something reusable though :/
fowlduck has quit [Ping timeout: 248 seconds]
datanoise has joined #crystal-lang
<jhass> asterite: http://carc.in/#/r/4ax why are the instance_vars empty here?
datanoise has quit [Ping timeout: 256 seconds]
asterite has joined #crystal-lang
<asterite> jhass: not sure, but macros are expanded right away
<asterite> if you want to expand them at the end, use a macro def
<asterite> though that makes it harder because you need to know the type
<jhass> harder = I tried and didn't find a way
<jhass> but I'd expect the json_mapping macro to expand before the included macro anyhow
<jhass> because the include call comes later
<asterite> it seems the macro is expanded even when not calling the method
<asterite> seems like a bug... somewhere
<asterite> Oh, I know!
<asterite> macro included is a macro!
<asterite> so those {% are evaluated right away
<asterite> you need to escape them
<jhass> uh, duh
<jhass> so escaped {% if true %} hack?
<jhass> let's see
<jhass> indeed
<jhass> what's up with the :end.id?
<asterite> But you can probably just remove the "macro included"
<jhass> mmh
<jhass> indeed
<asterite> Macros count the matching if/end (and others) so they know what's the final end
<asterite> if you don't want those to be counted you need to write them in another way
<jhass> http://carc.in/#/r/4b9 well that's acceptable
<asterite> I wouldn't abuse macros that much :)
<jhass> no idea why I didn't try it
<asterite> Yes
<asterite> It won't work for subclasses, but you'd usuaully use it for json mapping, so it's OK
<jhass> I wonder if we should just let json_mapping define it
<jhass> to_h that is
<asterite> I don't know why jbye needs a hash out of it
<asterite> if we know the use case, he probably can do things in another way and much more efficiently
<jhass> well, slice up a hash coming from an API as I understood it to store it (I guess) in a document db
asterite_ has joined #crystal-lang
<asterite_> if it's a document db like mongo then to_json is enough
<jhass> mh, true
asterite has quit [Ping timeout: 246 seconds]
<asterite_> ;)
<asterite_> offtopic, I'm really amazed at the community that's starting to grow
<asterite_> like, ysbadadden noticing performance drops a few moments after we push changes
<asterite_> or the archlinux thing and the bwd-gc "bug"
<jhass> yeah, it feels like we're reaching the critical mass
<jhass> and that's not offtopic at all IMO :P
<asterite_> Friday was a really long day, we had a program that had an object freed incorrectly
<asterite_> those bugs are so hard to find... finally we found it and that's all the push_root things
<jhass> are you using crystal for new internal things?
<asterite_> waj wants to improve the time it takes to context switch fibers
<asterite_> so he wrote a bit of code in assembly
<asterite_> and linked it and replaced some existing code
<asterite_> (btw, inline assembly is coming soon, hopefuly)
<asterite_> and it worked faster
<asterite_> but some things broke
<jhass> nice
<asterite_> we finally concluded that something broke when I did the FileDescriptorIO buffering
<asterite_> but that made no sense at all
<jhass> my x86 assembly sucks, I only know a bit AVR assembly
<asterite_> waj was learning a bit the other day :-)
<asterite_> we learn things as we need them... mmm... waj learns a lot more than me, I have that feeling
<asterite_> so we finally concluded there was a bug beyond all that, but we don't know why it didn't happen so far... pure luck
<jhass> well, meanwhile you squash three times the bugs, fair sharing I'd say ;P
<asterite_> we are a bit obsessed with performance :-P
<asterite_> Definitely!
<asterite_> It's just that everytime we find a bug like that we feel like "Well, this is the end"... but maybe later that day or the next day we fix it :-P
<jhass> it is that way with big codebases, it just takes time to shuffle the right part back into the active part of your brain ;)
<asterite_> I guess :)
<asterite_> jhass: we aren't doing any new internal thing with crystal, but we have some ideas of rewriting some backends to see how it goes
<jhass> nice
<asterite_> for example we'd like to try rewriting the backend of this: http://codegames.io/en
<asterite_> right now it's written in erlang
<jhass> oh, before/after stats would be interesting there, loc, memory cpu time
<jhass> I somehow have no idea in what ballpark erlang is
<asterite_> Well, it's hard to tell because it's a VM language plus it's funcionality, so it's hard to tell what that "compiles" too... but Erlang's performance is pretty good
<jhass> yeah, I also find the "fail and redo" approach interesting, maybe I should give Elixir a try after all
<jhass> I wonder if they kept that
<asterite_> Yes, I think it retains the high availability thing
Liothen has quit [Ping timeout: 252 seconds]
Liothen has joined #crystal-lang
asterite_ has quit [Quit: Page closed]
genericpenguin has quit [Quit: Page closed]
datanoise has joined #crystal-lang
daneb has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 246 seconds]
strcmp1 has joined #crystal-lang
datanoise has quit [Ping timeout: 256 seconds]