<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.
<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…]
<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
<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).
<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
<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
<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
<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]
<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