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
<ozra> Unicode chars are officially supported in identifiers, right?
NeverDie has joined #crystal-lang
datanoise has quit [Ping timeout: 276 seconds]
NeverDie_ has quit [Ping timeout: 246 seconds]
emancu has quit []
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vtezD
<crystal-gh> crystal/master 2e18fd8 Ary Borenszweig: Fixed #847: Allow number after capital letter for type vars
ejohnson has joined #crystal-lang
<ejohnson> hello
<asterite> ejohnson: o/
emancu has joined #crystal-lang
<travis-ci> manastech/crystal#2546 (master - 2e18fd8 : Ary Borenszweig): The build passed.
datanoise has joined #crystal-lang
waj has quit [Quit: waj]
datanoise has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 276 seconds]
<ozra> willl: Ah, missed the comment. Ok, thanks. Then I'll fix the highlighter in sublime after I've patched up the Nim one...
<ozra> Is there a mmap module for Crystal?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vteKu
<crystal-gh> crystal/master 3699a4f Ary Borenszweig: Updated Changelog
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vteK1
<crystal-gh> crystal/master 42efdbf Ary Borenszweig: Crystal 0.7.4
havenwood has joined #crystal-lang
<asterite> You can use mmap from C, we are already using it for the fibers
<asterite> Heh, there's mmap for ruby: https://github.com/tenderlove/mmap
<asterite> Not surprisingly... tenderlove
<asterite> but I don't know much about mmap, maybe a wrapper would be ok to have
NeverDie has joined #crystal-lang
<travis-ci> manastech/crystal#2547 (master - 3699a4f : Ary Borenszweig): The build passed.
<travis-ci> manastech/crystal#2548 (master - 42efdbf : Ary Borenszweig): The build passed.
waj has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 256 seconds]
zodiak_ has joined #crystal-lang
zodiak has quit [Read error: Connection reset by peer]
havenwood has joined #crystal-lang
<willl> nice 0.7.4
fowlduck has quit [Read error: Connection reset by peer]
<asterite> :-)
<asterite> following our very regular schedule... ( ? )
fowlduck has joined #crystal-lang
<willl> one of the best libraries I've ever used does one release a month, almost to the day, and it's really nice because it's always just gradual steady progress https://github.com/jeremyevans/sequel/blob/master/CHANGELOG
asterite has quit [Ping timeout: 246 seconds]
k2b6s9j has joined #crystal-lang
<k2b6s9j> Anyone in here using my Crystal packages for Atom?
<k2b6s9j> Either the Grammar or the Linter?
<ozra> k2b6s9j: Atom font rendering doesn't follow linux fontrules so the font rendering sucks, so I had to change to sublime, sob sob.
<k2b6s9j> ozra: How long ago was that? I thought they had improved Linux font rendering...
<ozra> k2b6s9j: Well, some weeks ago, maybe they've fixed it partially? It will not follow fontrules ofc. (webkit doesn't seem to) so it depends on if webkit re-introduce the font-hints css rule they removed (because W3C dropped it from css def). But, in honesty, I've had zero crashes with sublime and a bunch with atom, so I think I'll way until it has matured a bit more...
<k2b6s9j> ozra: Fair enough. I've had no issues with OS X or with Ubuntu 15.04.
<ozra> asterite: right C use. Cool.
<k2b6s9j> I was hoping to find someone in here who was using to see if they would be interested in a Crystal IDE package.
<ozra> k2b6s9j: Good to hear :)
<ozra> k2b6s9j: Maybe just the wrong time of day for activity here?
<k2b6s9j> ozra: When do you think I should come back? Or should I post to the mailing list?
<ozra> k2b6s9j: I just found my way here to day, soo... dunno B-)
<k2b6s9j> ozra: Well then, welcome to #crystal-lang. :D
<ozra> Woa, and I should get to sleep. Need to get up in four hours.
<ozra> Thanks k2b6s9j :-)
<waj> k2b6s9j: I have Atom and your Crystal package but I mostly use Sublime because it’s faster, at least in osx
<k2b6s9j> waj: Are you using both the Grammar and the Linter? Because I'm considering wrapping them into one with some autocomplete features.
<waj> mm… no, actually this is the package I have: https://atom.io/packages/language-crystal
<k2b6s9j> Are you sure it's not https://atom.io/packages/language-crystal-actual?
<k2b6s9j> The one you've posted has been down for months.
<ozra> k2b6s9j: Are sublime and atom syntax grammars compatible?
<k2b6s9j> ozra: Sublime Grammars can be converted to Atom Grammars. I don't know about the other way though.
<waj> somebody should define a meta-grammar :P
<wmoxam> woot, 0.7.4!
datanoise has joined #crystal-lang
<ozra> I'm fixing up some highlighter bugs in sublime atm I'll PR tomorrow - if there's anything that can help the atom pkg too.
<waj> k2b6s9j: I’m sorry… as I said I don’t use Atom much, but I’ll give your package a try
<wmoxam> k2b6s9j: I'm trying your package now
<k2b6s9j> Well I was just popping in to see if there is interest in a package that combines grammar, linter, and autocompletion in one. Sort of like a Crystal IDE.
<k2b6s9j> Kinda like the Nuclide stuff Facebook published today.
<wmoxam> k2b6s9j: what's the advantage of having them together?
<wmoxam> or is it like a meta package?
<k2b6s9j> Easier to update. Especially now that linter is being merged into Atom core, and just had a huge API overhaul.
<k2b6s9j> I have to go. I'll be back in 30 minutes.
k2b6s9j has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ozra has quit [Ping timeout: 246 seconds]
<wmoxam> I spent a little bit of time looking into what it would take to port Crystal to a BSD (OpenBSD, to be specific). I wrote some notes here: https://gist.github.com/wmoxam/991cadc6d7b0ddfff325
<wmoxam> I'm sure that I'm totally overlooking something, if you have any tips/warnings/etc please share!
waj has quit [Quit: waj]
datanoise has quit [Ping timeout: 246 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
k2b6s9j has joined #crystal-lang
willl has quit [Quit: Connection closed for inactivity]
fowlduck has quit [Read error: No route to host]
fowlduck has joined #crystal-lang
datanoise has joined #crystal-lang
charmander is now known as dtscode
datanoise has quit [Ping timeout: 252 seconds]
BlaXpirit has joined #crystal-lang
daneb has joined #crystal-lang
<vikaton> hmm
k2b6s9j has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
willl has joined #crystal-lang
unshadow has quit [Quit: leaving]
k2b6s9j has joined #crystal-lang
k2b6s9j has quit [Client Quit]
daneb has quit [Remote host closed the connection]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Ven has joined #crystal-lang
datanoise has joined #crystal-lang
unshadow has joined #crystal-lang
<unshadow> Good job everyone for 0.7.4 !
<unshadow> !memo asterite change topic to indicate 0.7.4 ;)
<DeBot> unshadow: Added memo for asterite.
datanoise has quit [Ping timeout: 256 seconds]
<unshadow> jhass: What about an update to crystal-git ? and crystal in AUR ?
<unshadow> jhass: I would do it but I dont have anywhere to build for 32bit
daneb has joined #crystal-lang
<unshadow> jhass: where did you take the "r127" in the PKGBUILD ?
<unshadow> in the version
<jhass> unshadow: good morning :D
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
<unshadow> jhass: hehe sorry for the Attack :)
<unshadow> jhass: this works for 64bit https://gist.github.com/bararchy/2cd1da19acb08501aadf
<jhass> the rnn is autogenerated by pkgver if you rebuild ;)
<unshadow> ohhhh
<unshadow> it changed to r0 for me now XD
<jhass> that's probably correct
<unshadow> crystal --version
<unshadow> Crystal 0.7.4 [42efdbf] (Wed Jun 24 07:55:29 UTC 2015)
<unshadow> working :)
vikaton has quit [Quit: Connection closed for inactivity]
<jhass> unshadow: gonna depend on gc-static ;)
<unshadow> jhass: you made a package ?
<unshadow> for the gc with --static flags
<unshadow> aur/gc-static 7.4.2-1 (0) A garbage collector for C and C++ (includes static library)
<unshadow> cool !
<unshadow> jhass: BTW , what about the issue on upstream ? did they replay ?
<jhass> not yet
<jhass> github has a subscribe button btw ;)
<unshadow> hehe yeha, I added my self to the issue now
<unshadow> >> a = ["test", 123, "more test"]; pp a
<DeBot> unshadow: a = ["test", 123, "more test"] - more at http://carc.in/#/r/4zq
<unshadow> >> a = ["test", 123, "more test"]; p a
<DeBot> unshadow: ["test", 123, "more test"] - more at http://carc.in/#/r/4zr
<unshadow> getter is for both read and write ?
havenwood has quit [Ping timeout: 252 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
willl has quit [Quit: Connection closed for inactivity]
veelenga has joined #crystal-lang
<jhass> unshadow: no, it's for getters...
<jhass> getter, getter?, getter!, setter, property, property?, property!
<unshadow> but but why setter dont have ! and ?
ozra has joined #crystal-lang
Ven has joined #crystal-lang
<jhass> unshadow: what would they do?
<jhass> >> `crystal --version`
<DeBot> jhass: # => "Crystal 0.7.4 (Wed Jun 24 10:10:39 UTC 2015)\n" - http://carc.in/#/r/4zx
<unshadow> nice
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 264 seconds]
<unshadow> >> a = gets("\0\0")
<DeBot> unshadow: Failed to run your code, sorry! - http://carc.in/#/r/507
<unshadow> :(
<unshadow> jhass: your bot is too polite
<jhass> I'm sorry
<unshadow> should say "f**k you and your code, this s**t cannot be ran"
<unshadow> hahah
<unshadow> >> gets("::::")
<DeBot> unshadow: Sorry, that took too long. - http://carc.in/#/r/508
<jhass> gosh, apt is so slow ...
<unshadow> compered to pacman ? ;)
<jhass> sure
datanoise has joined #crystal-lang
txdv has joined #crystal-lang
<txdv> "This doesn?t work with instance variables, class variables or global variables. To work with these, first assign them to a variable:"
<txdv> i tried it out and it actually works
<txdv> has this been fixed or something and somebody forgot to adjust the documentation?
<jhass> txdv: can you post your example that "works" to http://carc.in ?
<txdv> it says guaranteed
<txdv> i rushed too fast maybe
<jhass> okay, what the docs there try to bring across is that it resolves unions for local variables but not the others
<jhass> but agreed, "doesn't work" should probably be "this guarantee doesn't hold for" or something
waj has joined #crystal-lang
<txdv> well, upcase doesnt exist for int
<txdv> if you leave it out, it works as intended
<jhass> both work as intended
<jhass> note that my first example is a compile time error
<txdv> yeah
<txdv> are you part of the manas group?
<jhass> nope
<jhass> there, we can ask crystal what it thinks what the types of the variable can be
<jhass> note how it is sure that a is a String but that didn't happen for @a
<txdv> I understand now
datanoise has quit [Ping timeout: 248 seconds]
<txdv> this is awesome, read a while ago about crystal but tried it out only now
<txdv> are the binaries stand alone or do i need to have crystal installed?
<jhass> you don't need crystal but they're not statically linked (yet)
<unshadow> txdv: they are "standalone" as long as you have the dynamic libs installed
<jhass> txdv: run crystal build foo.cr and then ldd foo to see what the binary depends on
<txdv> that is a good idea jhass
<txdv> nice, thanks for the help
<jhass> yw
havenwood has joined #crystal-lang
waj has quit [Ping timeout: 256 seconds]
waj has joined #crystal-lang
<unshadow> now we just need to wait for Arch to get latest version into repo ? then no more need to maintain a side project right ?
<jhass> right
<jhass> bad timing, if they had done that yesterday I had done gc-git instead :/
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vtJHr
<crystal-gh> crystal/master 3130ae6 Ary Borenszweig: Fixed: incorrect String length calculation when it has a zero byte. Fixes #850
<unshadow> I like getting my issues fixed :)
<txdv> jhass: i don't think this is a problem with instance variables, i mean, the returned type of sample is a union type between int and string (don't know the term in crystal)
<jhass> yes, union type is correct ;)
<jhass> if you print typeof(a) before the if you'll see it still has that union type
<txdv> hm, it is actually
<txdv> your example didnt compile
<jhass> huh?
<jhass> my initial one, yes
<txdv> this one
<jhass> yeah
<jhass> so is_a? resolves the union for local variables, but only for them
<travis-ci> manastech/crystal#2549 (master - 3130ae6 : Ary Borenszweig): The build passed.
emancu has quit []
datanoise has joined #crystal-lang
waj has quit [Quit: waj]
bcardiff has joined #crystal-lang
waj has joined #crystal-lang
<unshadow> >> is_a?.is_a?(Namespace)
<DeBot> unshadow: Error in line 4: undefined local variable or method 'is_a?' - http://carc.in/#/r/525
<unshadow> XD
daneb has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
<veelenga> Hey. Probably this was already discussed... but is there a way to search though HTML in crystal by xpath ?
<jhass> mmh, I guess you can try throwing HTML at the basic libxml2 binding in stdlib
jonahR has joined #crystal-lang
<veelenga> do you mean to C++'s libxml ?
<jhass> libxml2 != libxml afaik
<jhass> libxml2 is used in various languages, the most popular ruby XML/HTML parser nokogiri is a libxml2 binding for example
<veelenga> yeah, sure.
<veelenga> ok, thanks
bcardiff1 has joined #crystal-lang
<veelenga> i will try to look how nokogiri uses it.
<jhass> veelenga: http://carc.in/#/r/52j at least the simple case seems to work
bcardiff has quit [Ping timeout: 244 seconds]
<veelenga> ha, I have tried it already. And it failed to work for me. Here is example: http://carc.in/#/r/52o
<veelenga> because of that is not a valid xml
<veelenga> need to have a root tag
<jhass> uh, yeah
<jhass> libxml2 can handle it as nokogiri proves
<jhass> just not mapped out
<veelenga> ok, thanks for help
<jhass> btw if you want to contribute towards that I prospect good chances of getting it into stdlib ;)
<veelenga> yeah, good motivation ;)
<ozra> What are the rules for the different identifiers (variables, types, constants, etc.)? I'm polishing the highlighter in sublime and might as well get it right (TM).
daneb has joined #crystal-lang
<ozra> Regarding rune usage...
<jhass> out of my guts: ConstantHasToStartWithUppercase
<jhass> local_variable_or_method_with_lower_caseButInTheoryheadlessCamlCaseIsAllowed
<jhass> And_underscore_case_in_constants
<jhass> @instance_variables_start_so
<jhass> @@class_variables_start_so
<jhass> $globals_start_so
<jhass> TypesAreJustConstants
<jhass> _variables_actually_can_start_with_an_underscore
<jhass> mmh
<jhass> digits at the start should be forbidden
<ozra> jhass: thanks, I'll look the spec up too :)
<jhass> but identifiers aren't limited to ASCII
<jhass> methods have various special cases
<ozra> jhass: That's how I found bugs in the HL - I use unicode chars in them..
<jhass> like ?, ! and = at the end
<ozra> jhass: I saw there was a RFC issue about the special chars in identifiers too.
<jhass> +, -, !, *, /, ==, === and probably some I forgot are valid method names
<ozra> what does `id=` signify?
<jhass> that's first of all just the name of a method
<jhass> the magic is in the way you can call it
<ozra> ok. like a setter?
<jhass> >> class Foo; def id=(v); @id = v; end; end; foo = Foo.new; foo.id = "bar"
<DeBot> jhass: # => "bar" - http://carc.in/#/r/52p
<ozra> ah, right.
<jhass> >> class Foo; def id=(v); @id = v; end; end; foo = Foo.new; foo.id=("bar") # which was just syntax sugar for this
<DeBot> jhass: # => "bar" - http://carc.in/#/r/52q
<txdv> does crystal have os level threads?
<jhass> txdv: yes and no, Thread is just a pthread binding but since 0.7 Crystal is moving towards a Go like concurrency & IO model and thus most IO operations are broken outside the main thread
willl has joined #crystal-lang
<jhass> at least currently
<txdv> go like concurrency
<jhass> txdv: yap, https://github.com/manastech/crystal/blob/master/samples/channel_primes.cr here was ported from the Go samples
<txdv> channels
<txdv> why not add libuv
<jhass> afaik they had some issues which libevent solved
<jhass> (stdlib IO is using libevent)
<txdv> so crystal doesn't work on windows?
<jhass> it hasn't fully been ported yet, no
<jhass> some works towards that is in https://github.com/xwanderer/crystal/tree/win32
<BlaXpirit> > 27 days ago
asterite has joined #crystal-lang
<jhass> yeah, thought so :)
<jhass> asterite: http://carc.in/#/r/519 can't decide if that's a bug :/
<BlaXpirit> >> さかな = "fish"; puts さかな
<DeBot> BlaXpirit: fish - more at http://carc.in/#/r/52s
<BlaXpirit> :>
<asterite> I think we should just forbid using a generic type as a type argument
<asterite> I think many have been bitten by that and it's not very useful
<jhass> I kinda expected that answer :P
<asterite> txdv: libuv is not thread safe
<asterite> Right now we are using libevent, but in the future we could implement that logic in crystal... like how we will remove libpcl with a short inline assembly code
<jhass> >> def (ノ `Д´)ノ ~┻━┻; "chill"; end; (ノ `Д´)ノ ~┻━┻
<DeBot> jhass: Syntax error in eval:4: expecting any of these tokens: IDENT, CONST, <<, <, <=, ==, ===, !=, =~, >>, >, >=, +, -, *, /, !, ~, %, &, |, ^, **, [], []=, <=>, []? (not '(') - http://carc.in/#/r/52t
<jhass> derp
<asterite> The idea is, as long as the API doesn't break, underneath we can use whatever we want
<txdv> asterite: is libevent2 thread safe?
<txdv> what does thread safety mean in an event loop
<txdv> the very idea of an event loop is that you do all the actions you get dispatched from the event loop in the same thread as the event loop is running
<jhass> why is that the idea of an event loop?
<jhass> I thought it's about inversion of control
<asterite> txdv: don't know, waj is doing most of that stuff, but probably it is or provides some locking mechanisms
<jhass> "don't call us, we call you"
<jhass> so why would distributing the handler calls among a thread pool be against the idea of an event loop? I didn't do much event driven programming yet so forgive me if it's obvious
<asterite> wow, I just noticed play.crystal-lang.org has 0.7.4, you are fast, jhass!
<jhass> heh, update one, update all
daneb has quit [Remote host closed the connection]
<jhass> it's just mean that you release on 3am CEST :(
<jhass> j/k
<waj> the reason to use libevent instead of libuv was more about how it fits in the Crystal programming model
<waj> libuv was designed for nodejs (AFAIK)
<jhass> I suck at that
<asterite> We need a native English speaker :-)
waj has quit [Quit: waj]
<jhass> we got a guy at diaspora for that, no coding skills at all but professional copy editing
<jhass> wish more people from that area would recognize how big of a contribution that can be :/
asterite has quit [Quit: Page closed]
<willl> I'll do the PR for the docs, but one of you want to take the 'bits about crystal' for the blog post?
jua_ has joined #crystal-lang
asterite has joined #crystal-lang
<asterite> willl: what's 'bits about crystal'? A description of it?
NeverDie has joined #crystal-lang
<jhass> let's dig out some older blogposts
<willl> Yeah that's what I think he's looking for
<jhass> I think that's all
<asterite> The descriptions seem to be pretty short
<crystal-gh> [crystal] yui-knk opened pull request #851: Remove duplicated `to_macro_id` (master...fix/macros) http://git.io/vtTOT
<jhass> yeah, though I doubt they'll reject a slightly larger blob
<asterite> I guess we can use the curry-on excluding the bits starting from "It provides a Garbage Collector..."
<jhass> I'd actually even include that sentence still
<jhass> maybe take out the new in the first sentence, not because it's not true but just less relevant :P
waj has joined #crystal-lang
jua_ has quit [Ping timeout: 264 seconds]
asterite has quit [Ping timeout: 246 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
NeverDie has joined #crystal-lang
shama has joined #crystal-lang
daneb has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #851: Remove duplicated `to_macro_id` (master...fix/macros) http://git.io/vtTOT
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
NeverDie has joined #crystal-lang
shadeslayer has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtarchie has quit [Quit: Connection closed for inactivity]
<ozra> may class names begin with a lowercase?
<ozra> Eh, I'll test, stupid question...
<jhass> ozra: no
<ozra> thanks
<travis-ci> manastech/crystal#2551 (master - eea3fd2 : Ary Borenszweig): The build passed.
daneb has quit [Ping timeout: 246 seconds]
daneb has joined #crystal-lang
vikaton has joined #crystal-lang
<ozra> any good examples of macros somewhere? The manual is rather thin on the subject...
jonahR has quit [Quit: brb]
<jhass> stdlib has a few I'd say
<jhass> https://github.com/manastech/crystal/blob/master/src/json/mapping.cr is probably the most complex one in stdlib
<jhass> ECR is a nice example of calling an external process from a macro, in this case the compiler itself https://github.com/manastech/crystal/blob/master/src/ecr/macros.cr
<jhass> for some more simple stuff the getter's etc https://github.com/manastech/crystal/blob/master/src/object.cr#L203
<jhass> inspect is a nice example for a macro def https://github.com/manastech/crystal/blob/master/src/reference.cr#L50
<jhass> Tuple has some examples of entering the macro language outside a macro https://github.com/manastech/crystal/blob/master/src/tuple.cr#L329
<jhass> https://github.com/manastech/crystal/blob/master/src/compiler/crystal/macros/methods.cr and here are all the methods you can call in macros besides the syntax constructs (if/unless/elsif/unless/for)
<ozra> jhass: very helpful, thanks alot!
<ozra> jhass: Is there no way of "reversing" template vs logic? Instead of it being "templaty", being ast +ast-manip-code centric (no php-style tags around code)?
<jhass> it's pretty much a simple template language with access to AST nodes and specific methods on them and then the output fed back into the parser, so I guess the answer is no
<jhass> ah, I forgot to mention that certain macros are called automatically, like macro method_missing when a method doesn't exist, macro included if a module is included and macro inherited if a class is inherited
<ozra> jhass: Ok. Yeah I saw those in the man.. Well, so a macro working on a ast-tree, mutating it, creating new branches, and then return it or render it is out of the question?
<jhass> at least for the short term I'd say
<jhass> I mean you can expect more macro methods to be added possibly reaching deep into the AST nodes
<jhass> but it'll be "render out to code that's parsed again" for now
<ozra> Ok. I touched on the subject in the issue about JIT... Ok, will be interesting to see what the future holds :)
jonahR has joined #crystal-lang
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
bcardiff1 has quit [Quit: Leaving.]
blaix has joined #crystal-lang
<travis-ci> manastech/crystal#2552 (master - 70ee0c6 : Ary Borenszweig): The build passed.
jonahR_ has joined #crystal-lang
jonahR has quit [Read error: Connection reset by peer]
veelenga has quit [Ping timeout: 246 seconds]
bcardiff has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
blaix has quit [Quit: Leaving.]
<ozra> waj: What's "19syntax"?
<waj> give me some context :)
<ozra> haha, sorry. There's a match in sublime HL that makes parameters with type look weird, because they get scope "constant.other.symbol.crystal.19syntax" which takes precedance. Couldn't figure out what it is (regards literal with colon at end)
<jhass> ozra: Ruby 1.9 introduce an alternative syntax for hash literals with symbol keys
Kilo`byte has joined #crystal-lang
<jhass> where you previously had to write { :foo => bar, :baz => quux }, you can now write {foo: bar, baz: quux}
<jhass> and I think the sublime package is pretty much copy paste from the ruby one ;)
<jhass> one difference to Crystal is that in ruby you can also leave the braces off of a hash literal if it's the last argument to a method call
<Kilo`byte> yesterday i ran into an interesting issue (while reinventing the wheel and writing an own simple optionparser without realizing there already is one): i managed to get Hash#[]= to segfault
<jhass> foo(a, :b => c) -> foo(a, :b => c) -> foo(a, b: c)
<Kilo`byte> is that a known issue?
<jhass> probably not, do you have a (small) test case?
<Kilo`byte> jhass: uh i have not tried reproducing it outside of the life code
<Kilo`byte> but i can try rq
<jhass> that would be great
<Kilo`byte> hmm nope that did not work
<Kilo`byte> jhass: hah there we go
<Kilo`byte> line 5 will segfault
<jhass> oO
<Kilo`byte> version 0.7.3.r145.gf34dd09
<Kilo`byte> if you don't put it in a class it works fine
<ozra> jhass: ok, is there a special context for it, and foremost: is it part of _crystal_?
datanoise has quit [Ping timeout: 272 seconds]
<jhass> Kilo`byte: looks like 0.7.4 broke there something, 0.7.3 has no issues
<ozra> sorry, should read before I type, haha
<Kilo`byte> jhass: well yeah, git version of crystal. just wanted to let you guys know
<Kilo`byte> i'll now open an issue on github
<jhass> ozra: crystal supports {foo: bar} as hash literals, also {"foo": bar}
<jhass> Kilo`byte: I think we can reduce it a bit further http://carc.in/#/r/534
<Kilo`byte> so it affects arrays as well? good to know
<Kilo`byte> jhass: how long are those links valid?
<jhass> for now forever
<jhass> that is until my DB explodes :P
<Kilo`byte> kk so i can safely include that in the issue
<jhass> reminds me, I should setup backups for it
<Kilo`byte> heh
<Kilo`byte> good idea
<Kilo`byte> just curious, hows that stuff sandboxed
BlaXpirit has quit [Quit: Quit Konversation]
<jhass> nope, don't get it further reduced :/
<jhass> playpen
<jhass> feel free to break it
<jhass> just tell me if you did :P
<vifino> Hey jhass :)
<jhass> o/
<jhass> oh, bundler update time
<vifino> Kilo`byte: Hah, you're here too :D
<Kilo`byte> no i am totally not
<vifino> >_>
jonahR_ has quit [Remote host closed the connection]
<Kilo`byte> thats just imagination
<vifino> <_<
<Kilo`byte> :P
<vifino> The doctors said that before, my friends say to not believe the
<vifino> *them.
jonahR_ has joined #crystal-lang
<vifino> Kilo`byte: we need to get stary here
<Kilo`byte> yes xD
<vifino> For whatever reason we can make up.
<Kilo`byte> mhm
bcardiff has quit [Quit: Leaving.]
<vifino> jhass: By chance, do you know if crystal has any known issues with llvm 3.6.X?
<jhass> works fine for me
<Kilo`byte> doubt it
<vifino> Ah, okay.
<jhass> well, --debug symbol generation is broken I think
<Kilo`byte> my sys has only 3.6 installed and it works fine
<jhass> since llvm 3.6 changed the format for that
<Kilo`byte> jhass: well, it does have some dbug symbols xD
<vifino> Because if the example asterite works for him but not for me, it might be related to that. Dunno what ver osx provides.
<jhass> I think that's just the regular ones
<Kilo`byte> or gdb wouldn't have that useful output
<jhass> debug symbols would be line numbers
<Kilo`byte> oh okay
<jhass> ah yeah, that might be actually
<Kilo`byte> yeah it does not have those :/
<Kilo`byte> 0x000000000040aee8 in *Hash(String, String)@Hash(K, V)#[]=<Hash(String, String), String, String>:String ()
<jhass> I think llvm 3.6 did quite some changes to the JIT stuff
<Kilo`byte> thats what gdb gets me on my code snippet
<vifino> Yeah, that's what I'm thinking, jhass.
<Kilo`byte> mhm
<jhass> Kilo`byte: yeah, that's just the function name essentially
<Kilo`byte> rubinius still doesn't support 3.6 for example
<vifino> Yeah..
<Kilo`byte> which makes heavy use of llvms JIT iirc
<vifino> Well, of course it makes use of it.
<Kilo`byte> vifino: i am not sure if thats the entire reason
<vifino> Kilo`byte: What do you mean?
<Kilo`byte> jhass: obtw, can i c export a function
<jhass> from crystal? I think fun names are unmangled
<Kilo`byte> vifino: it might have other reasons why its taking so long to port
<jhass> but generating the so is hairy
<jhass> and then you have an .so which uses a GC...
<jhass> >> fun foo; raise "hey"; end; foo
<DeBot> jhass: Error in line 7: undefined method 'inspect' for Void - http://carc.in/#/r/53j
<jhass> bleh
<jhass> >> fun foo; raise "hey"; end; foo; 1
<DeBot> jhass: Exception: hey - more at http://carc.in/#/r/53k
<Kilo`byte> how'd you implement overloading without mangling
<jhass> hmm
<jhass> I guess you can't overload funs
<jhass> never tried
<Kilo`byte> oh fun
<Kilo`byte> i should learn to read
<Kilo`byte> xD
<Kilo`byte> fun != def
<jhass> idk, don't use them :P
<Kilo`byte> also i am curious how one would implement a plugin system
<vifino> Kilo`byte: Plugin, as in dynamic?
<vifino> Uuuuh.
<jhass> well, "plugin system" is not a very defined thing ;)
<jhass> you mean runtime module loading?
<vifino> I think that's what he means.
<Kilo`byte> as in, load a compiled plugin at runtime
<Kilo`byte> in c you'd use dlopen/dlsym for that
<jhass> doubt it'll happen for crystal in the next 2 years tbh
<jhass> crystal does a lot of stuff, loading the same "header" code into two programs can/will result in quite different ABIs
<jhass> currently it even does a few things that will make the ABIs incompatible across compilations of the same program
<Kilo`byte> yay
<Kilo`byte> too bad
<Kilo`byte> well, we can still do plugins compile time :P
<jhass> I guess you could do it with loading non crystal code though
<vifino> Kilo`byte: Hey, rpc's are a thing :)
<Kilo`byte> that too
<vifino> Thinking bout it, I should make some bindings.
<vifino> For stuff like lua or ømq
<vifino> Meh, Either ØMQ or WAMP :/
<jhass> is amqp the protocol?
<vifino> Both are awesome.
<ozra> ZMQ and the "successor" nanomsg would be interesting. Very.
havenwood has joined #crystal-lang
daneb has quit [Remote host closed the connection]
datanoise has joined #crystal-lang
jonahR_ has quit [Quit: brb]
ozra has quit [Quit: Page closed]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
zodiak_ has quit [Ping timeout: 255 seconds]
zodiak has joined #crystal-lang
NeverDie has joined #crystal-lang