willl has quit [Quit: Connection closed for inactivity]
bcardiff has quit [Quit: Leaving.]
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Ven has joined #crystal-lang
dtscode has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dtscode has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BlaXpirit has joined #crystal-lang
Ven has joined #crystal-lang
orliesaurus has quit [Ping timeout: 252 seconds]
a| has joined #crystal-lang
a| is now known as Guest43280
grindhold has quit [Ping timeout: 252 seconds]
grindhold has joined #crystal-lang
daneb has joined #crystal-lang
dtscode has left #crystal-lang ["Leaving"]
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
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #crystal-lang
kulelu88 has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
fowlduck has joined #crystal-lang
BlaXpirit has joined #crystal-lang
<jhass>
asterite: nah, weren't that many after all
<jhass>
github makes it 3-4 clicks after all
fowlduck has quit [Ping timeout: 248 seconds]
<kulelu88>
what is the prime use-case of Crystal ? Systems or performant web-apps?
<jiriki->
I hope both
<jiriki->
because one thing I'd like a new programming language to solve is to have one language everywhere
daneb has quit [Remote host closed the connection]
daneb has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kulelu88>
javascript?
<BlaXpirit>
kulelu88 pls
<BlaXpirit>
javascript brings nothing good, it's just forced
<jhass>
kulelu88: so far web backend, systems, end user CLI tool & GUI seem to be the largest interest areas, the latter two because some people see a ruby like language with potential easy (binary) distribution
<kulelu88>
I was thinking of making a CLI drop-in tool for servers with Crystal as well
<kulelu88>
GUIs though... Is there a QT or GTK binding?
<kulelu88>
I've wondered though. What do people use for GUIs for linux these days. There doesn't seem to be a dev-friendly + commercial option in the wild
<jiriki->
jhass: does crystalg have pointers and manual mm?
<jiriki->
or planning to anyway?
<jhass>
jiriki-: yes for pointers, if you absolutely need to you can also do manual memory management, but I wouldn't
<jiriki->
well I'm looking for a great language, and sometimes MM is useful
<jhass>
it's not a first class language feature for sure
<jiriki->
like what D can do
<jhass>
kulelu88: mmh, Python I guess, both its gobject and QT bindings are pretty good. On the lower level Vala is strong with the Gtk crowd, but JS is growing there too. C++ is still strong with the Qt crowd
<kulelu88>
I think Crystal falls just below those languages. It gives you lots of power + productivity, which those others don't provide
<kulelu88>
jhass: language-wise, there are options. But the GUI itself. There is only QT and GTK
<jhass>
well, yeah
<jhass>
the Englightment people produce robust stuff, but it doesn't integrate well into other DEs
<strcmp1>
and xlib, xlib is amazing
<kulelu88>
perhaps node-webkit-style desktop apps are the future
<jhass>
kulelu88: and I agree that Crystal has the potential to grow in the sweep spot between classic compiled and fast prototyping dynamic languages
<jiriki->
well to be honest, a great programming language should solve the problem of using two languages in first place
<BlaXpirit>
jiriki-, C interoperability is strong
<kulelu88>
if it can connect to the thousands of man-hours of work put into C libs, it's already winning
<BlaXpirit>
well that's what being done
<jiriki->
hmh yeah
<BlaXpirit>
crystal leverages many C libraries even in its core
<kulelu88>
I'm tempted to use the blueprint of crystal to build my own compiler, just to learn how it was done
<jhass>
note that hand written parsers is not the most popular way to do it these days, most people use parser generators ;)
<kulelu88>
is that step number 1? Parsing text?
<vifino>
BlaXpirit: Hey, could you help me generate jackaudio bindings? I get pycparser.plyparser.ParseError: /usr/include/jack/types.h:26:18: before: jack_uuid_t from crystalize.py.
<BlaXpirit>
vifino, can reproduce, will look into it. not necessarily right now, though
<vifino>
BlaXpirit: Thanks :)
<BlaXpirit>
vifino, look at transport.h
<BlaXpirit>
macro POST_PACKED_STRUCTURE is simply not defined
<BlaXpirit>
(and for gcc it's defined as some compiler hacks)
<vifino>
And how can we fix this/go around the issue?
<jhass>
kulelu88: well yes, getting a representation of the source you can work with (typically an AST) is step 1
<kulelu88>
how does making the jump from compiling in another language to using your own language to compile happen? Or is that a natural progression that is achieved based on breaking your back writing your own language?
<jhass>
well, you start with writing a compiler in another language and develop it far enough so that an implementation of your compiler in the target language can compile itself
<jhass>
so to self host, you essentially write two compilers, though you'll do it when the language is still as basic as possible
<jhass>
and then you add stuff to the self hosted version such that the old iteration can compile the next one
<ozra>
Anyone here knowledgable on compiler internals? I'm trying to implement `for` as a POC to learn the internals a bit. Lexing, Parsing: ok. Rewriting: unsure, because the test (`for val in list\n p val\nend`) fails with "undefined local variable or method 'val' (did you mean 'val'?)" (!!??). The ast debug printed after rewrite looks like it should (
<ozra>
rewritten to list.each do |val|...). Any ideas?
<ozra>
(I know Crystal probably won't accept a PR for 'for in', but I need to parse a DSL to compile in Crystal, so I simply use it as the basis for that compiler)
BlaXpirit has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
<NeverDie>
How long until crystal pwns ruby?
<jhass>
NeverDie: 6.283 time units
<NeverDie>
That's too long.
<jhass>
depends on your relativity I guess
_whitelogger has joined #crystal-lang
willl has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
daneb_ has quit [Remote host closed the connection]
daneb has joined #crystal-lang
daneb has quit [Remote host closed the connection]
luislavena has quit []
<bcardiff>
Hi @ozra, you will need to go down the parser and lexer. @asterite loves parsers :-). Check src/compiler/crystal/syntax/parser.cr . I would see how the if is parsed line 879. Since you want a control sequence with inner statements but without the block.
<bcardiff>
It good to get more people in the internals
<bcardiff>
it's*
<crystal-gh>
[crystal] yui-knk opened pull request #912: Allow Set#| to accept union type (master...fix/set_or) http://git.io/vtdNl
NeverDie has joined #crystal-lang
NeverDie has quit [Client Quit]
NeverDie has joined #crystal-lang
asterite has joined #crystal-lang
asterite has quit [Read error: Connection reset by peer]
asterite has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 246 seconds]
<jhass>
asterite: time for #871 btw ;)
<asterite>
ozra: what are you parsing "for" to?
<willl>
bcardiff: asterite: do you have any tips for debugging the parser? A few weeks ago I started in on trying to add required kewords, but hit a bit of a wall and then had to put the patch aside
Ven has joined #crystal-lang
fowlduck has joined #crystal-lang
<asterite>
willl: I usually use puts and run a specific spec, for the lack of a debugger
<willl>
I imagine knowing how everything works helps also :)
<willl>
speaking of a debugger, do you know what it'd take to get more info into lldb, like the local variables?
fowlduck has quit [Ping timeout: 248 seconds]
shama has joined #crystal-lang
<asterite>
Probably learning the metadata format and setting it
<ozra>
@bcardiff, @asterite: Missed your replies, out mowing the lawn... The lexing and parsing (and rewrite) are done and working. I added a `For` node. I rewrite it using the block of the `for` to create a Block node passed to `the_list.each`.
<ozra>
When I `p the_ast_node.to_s` or `dump the_ast_node` it looks like a perfectly correct `list.each do |val|\n p val\nend` - but still I get that error. 'val' is not declared, did you mean 'val'.. Which is .. confusing..
<ozra>
Updated with the test I'm trying to compile with it
NeverDie_ has joined #crystal-lang
NeverDie has quit [Ping timeout: 265 seconds]
DeBot has quit [Quit: Crystal IRC]
DeBot has joined #crystal-lang
fowlduck has joined #crystal-lang
DeBot has quit [Quit: Crystal IRC]
DeBot has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
bcardiff_ has joined #crystal-lang
bcardiff_ has left #crystal-lang [#crystal-lang]
bcardiff has quit [Quit: Leaving.]
bcardiff_ has joined #crystal-lang
bcardiff_ is now known as bcardiff
NeverDie has joined #crystal-lang
NeverDie_ has quit [Ping timeout: 248 seconds]
Ven has quit [Ping timeout: 252 seconds]
daneb has joined #crystal-lang
NeverDie_ has joined #crystal-lang
NeverDie has quit [Ping timeout: 264 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
daneb_ has joined #crystal-lang
daneb has quit [Ping timeout: 246 seconds]
NeverDie has joined #crystal-lang
<ozra>
Anyone alive in here? :-/
NeverDie_ has quit [Ping timeout: 276 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
asterite has joined #crystal-lang
<asterite>
ozra: in the parser, are you pushing the for vars in @def_vars
<asterite>
?
<asterite>
Also, for in Ruby is just .each, that's why I think "for" is a bad idea, it never does "each_with_index"
asterite has quit [Client Quit]
bcardiff has quit [Quit: bcardiff]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
daneb_ has quit [Remote host closed the connection]
<ozra>
asterite: Thanks a lot! Now it works! :-) Yeah, I understand there would be so many discrepancies to the ruby implementation with the scoping and optional index, so I can see why it might be better left out.
daneb has joined #crystal-lang
NeverDie_ has joined #crystal-lang
NeverDie has quit [Ping timeout: 246 seconds]
strcmp1 has quit [Ping timeout: 252 seconds]
strcmp1 has joined #crystal-lang
NeverDie_ has quit [Quit: I'm off to sleep. ZZZzzz…]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
shama has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
daneb has quit [Remote host closed the connection]
strcmp2 has joined #crystal-lang
strcmp1 has quit [Ping timeout: 264 seconds]
BlaXpirit has quit [Quit: Quit Konversation]
fowlduck has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]