asterite changed the topic of #crystal-lang to: #crystal-lang The Crystal programming language | http://crystal-lang.org | Crystal 0.6.0 | 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
waj has joined #crystal-lang
weskinner_ has joined #crystal-lang
chc4 has joined #crystal-lang
weskinner_mac has joined #crystal-lang
canhtak has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
weskinner_mac has quit [Quit: weskinner_mac]
waj has quit [Quit: Leaving.]
canhtak has quit [Quit: canhtak]
weskinner_ has quit [Ping timeout: 245 seconds]
ismael has joined #crystal-lang
ismael is now known as Guest99456
ismaelga has quit [Read error: Connection reset by peer]
weskinner_mac has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Client Quit]
weskinner_ has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Quit: Leaving.]
weskinner_mac has quit [Quit: weskinner_mac]
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
shama has quit [Remote host closed the connection]
weskinner has quit [Quit: Connection closed for inactivity]
weskinner_ has quit [Ping timeout: 264 seconds]
Guest99456 has quit [Remote host closed the connection]
jhass has quit [Quit: Bye]
jhass has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 252 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 244 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 245 seconds]
chc4 has quit [Quit: yes.]
canhtak has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 252 seconds]
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 250 seconds]
zamith has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 240 seconds]
leafybasil has joined #crystal-lang
ismaelga has joined #crystal-lang
canhtak has quit [Quit: canhtak]
ismaelga has quit [Ping timeout: 245 seconds]
endou________ has joined #crystal-lang
endou_______ has quit [*.net *.split]
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 265 seconds]
weskinner_mac has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Ping timeout: 244 seconds]
ismaelga has joined #crystal-lang
bcardiff has joined #crystal-lang
weskinner_mac has quit [Quit: weskinner_mac]
weskinner_mac has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
weskinner_mac has quit [Quit: weskinner_mac]
waj has joined #crystal-lang
weskinner_mac has joined #crystal-lang
weskinner_mac has quit [Client Quit]
ismaelga has quit [Remote host closed the connection]
canhtak has joined #crystal-lang
asterite has joined #crystal-lang
weskinner_mac has joined #crystal-lang
weskinner_mac has quit [Quit: weskinner_mac]
weskinner_mac has joined #crystal-lang
ismaelga has joined #crystal-lang
weskinner_mac has quit [Quit: weskinner_mac]
ismaelga has quit [Ping timeout: 256 seconds]
asterite has quit [Quit: Leaving.]
asterite has joined #crystal-lang
asterite has quit [Client Quit]
ismaelga has joined #crystal-lang
asterite has joined #crystal-lang
bcardiff has joined #crystal-lang
endou________ has quit [Remote host closed the connection]
tmoore has quit [Remote host closed the connection]
weskinner_ has joined #crystal-lang
orliesaurus has quit [Excess Flood]
a- has joined #crystal-lang
endou________ has joined #crystal-lang
tmoore has joined #crystal-lang
canhtak has quit [Quit: canhtak]
<weskinner_> Any update on a decision to continue with libuv or switch to something else?
canhtak has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
shama has joined #crystal-lang
<crystal-gh> [crystal] weskinner opened pull request #434: ignore keep-alive in non evented mode (master...keepalive-workaround) http://git.io/ACEs
<asterite> weskinner_: we'll probably switch, but it's hard to decide because libuv is not thread-safe. It will also take some time, as many APIs stop working in evented (for example IO.select)
<crystal-gh> [crystal] asterite pushed 4 new commits to master: http://git.io/ACaW
<crystal-gh> crystal/master add419c Ary Borenszweig: Fixed a bug where you couldn't define a method on a enum with @[Flags]
<crystal-gh> crystal/master a2ceaf7 Ary Borenszweig: Allow checking inside macros if a type has a given attribute (to replace the macro var @enum_flags)
<crystal-gh> crystal/master 9658f24 Ary Borenszweig: Added Enumerable#join(separator = "", &block)
leafybasil has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
<travis-ci> manastech/crystal#2025 (master - f19e96b : Ary Borenszweig): The build passed.
canhtak has quit [Quit: canhtak]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/ACX8
<crystal-gh> crystal/master a66ab0a William Skinner: ignore keep-alive in non evented mode
<crystal-gh> crystal/master 8be8d74 Ary Borenszweig: Merge pull request #434 from weskinner/keepalive-workaround...
<asterite> jhass: I just tried that glade thing, it's pretty cool!
<jhass> :)
<asterite> Are there UI editors for that xml?
<jhass> yeah
<jhass> called Glade :P
<asterite> :D
<asterite> Very nice. This could make making GUI apps in crystal a reality :)
<jhass> well, it needs a lot of work still I'm sure
<asterite> But it looks pretty promising already
<jhass> I only pushed it as far as I needed to get the sample run really
<jhass> 68kloc of generated code already ;D
<asterite> wow, src/generated/gtk is huge!
<jhass> Gtk is huge ;)
<asterite> I was just seeing that. I'm amazed that the greeter app compiles in half a second
<jhass> yeah
<asterite> It's because crystal doesn't do semantic check for methods that are not instantiated :D
<asterite> And parsing and definition is pretty dummy :)
<asterite> The "bad" thing is that that generated code might have error… but there's always a tradeoff, I guess
<jhass> yes, there'll be tons of errors still
<jhass> I really only mapped out what's needed for the samples in the generator
<asterite> What actually amazes me is that you are generating the wrappers… it seems?
<jhass> yes
<jhass> you didn't think I wrote 60kloc by hand? oO
<travis-ci> manastech/crystal#2026 (master - 8be8d74 : Ary Borenszweig): The build passed.
<asterite> Well, DeBot has quite a few lines
<jhass> so the idea is to generate the basic wrappers and then add overrides and additions for where the generation provides a crappy interface
<asterite> The whole generator is inside src/generator ?
<jhass> 1-2klock I think?
<jhass> that's more the bootstrap code
<jhass> it calls into src/g_i_repository
<asterite> Well, we have the first program/lib that's bigger than the compiler :-P
<jhass> well, the generated stuff doesn't really count IMO :P
* asterite whispers *nobody has to know*
<jhass> 1300 of handwritten code
<jhass> so it's still smaller than DeBot :P
Exilor has joined #crystal-lang
Exilor has quit [Quit: Page closed]
<asterite> jhass: do you (or did you) code games?
<jhass> nope
ismaelga has quit [Remote host closed the connection]
<asterite> Do you like games, though? :)
<jhass> eh, well, that's like asking do you like entertainment :P
<jhass> as far as video games go I like things that tell me a story and small puzzle games
<jhass> not too much into that RPG stuff
<weskinner_> crystal could be a great alternative to C++ for gamedev
<asterite> I'd really like to do games in crystal… except that I don't know how to make games (I know the really basic stuff, but not more complex things, nor know existing frameworks, or how to model one)
<jhass> we had to do a mills in java in 2. semester
<asterite> What's mills?
<jhass> that thingy
<weskinner_> asterite: 3D or 2D?
<asterite> weskinner_: both!
<jhass> asterite: gosu seems quite popular on Ruby in that area
<weskinner_> I mean, what would your preference be?
<asterite> Well, I'm more of a 2D guy, I like classic games
<asterite> But then I really, really loved Antichamber, for example
<weskinner_> seems like 2D has a much lower art overhead and a more "fun" dev experience
<asterite> Yes, I think that too
<jhass> a good SDL binding should get you pretty far already I guess
<asterite> We started this, but we are doing it very slowly: https://github.com/ggiraldez/crystal-pong
<weskinner_> agreed. I think a lot of indie games use little more than just SDL
<asterite> mostly because we don't have unlimited time :-P
<weskinner_> was thinking about trying to port DOOM to crystal :D
<asterite> :o
<asterite> The name of the game would pretty much describe the experience, I guess
<weskinner_> maybe should start with a simple platformer first though
<asterite> But doom is pretty old… like, not sure it used sdl or anything like that
<weskinner_> yeah don't think they even used OpenGL
<weskinner_> or even had it available
<jhass> wasn't it ported to JS + HTML5 <canvas>? WebGL at least I'm sure about
<asterite> Maybe they used emscripten or something like that
<asterite> ouch
<weskinner_> asterite: did the manas team have any experience writing compilers before crystal?
<asterite> not at all
<asterite> we didn't even know how to use llvm
<asterite> we learned everything in the process, it was quite enlightening :)
<asterite> and we are still learning!
<weskinner_> I can imagine
<asterite> Jonathan Blow is also doing a compiler. One comment someone did to him was "Now I can see that compilers are just regular programs, there's no real magic"
<weskinner_> for sure, I've learned a lot just trying to get crystal programs to run! :P
<asterite> and I agree with that, they are just programs :)
<weskinner_> it's funny how hard it was to wrap my head around the concept of a self hosting compiler
<waj> yup… they are just programs that when executed they can read their own source code and generate a replica of itself :P
<asterite> :-P
<asterite> I actually knew just a tiny bit about compilers because I liked D back then and I did an IDE for it (using Eclipse), and in the process I read a lot of code from DMD (the D compiler). But what DMD does has nothing to do with crystal (in terms of algorithms, I mean). Like, they don't use the visitor pattern
<asterite> But I didn't read the dragon book, for example
<waj> hehe… just joking around the same concept. Is not that hard after all… but we have some funny stories like when we found we didn't have a definition of some constant because it was just taking the previous value of the constant :)
<weskinner_> hmm, from a previous version of the compiler?
<waj> yes, I think it was IntNN::MAX
<waj> the value was just hardcoded to IntNN::MAX, but the real value wasn't defined anywhere
<weskinner_> ahh, haha, and it was never there to begin with?
<asterite> I'll search it
a- is now known as orliesaurus
<waj> it wasn't Int::MAX
<waj> it was the Float32::INFINITY
<asterite> We were using Float32::INFINITY, for instane
<asterite> because it was a "primitive", and the value is already defined by the compiler… and we had no access to how that value go there :)
<asterite> Kind of hard to explain
<asterite> Or how we spent a couple of months trying to make the language work without generics… :-P
<weskinner_> I feel like generics are one of these features you desperately try to avoid but there's no way around it for statically type programs
<weskinner_> no better solution, I Mean
<asterite> Well, we wanted the compiler to infer the generic type of arrays and other generic types, but it was awfully slow
<asterite> Worse, we wanted to do that without you saying "array is generic", so that logic would apply to any class, really
weskinner_work has joined #crystal-lang
weskinner_ has quit [Ping timeout: 264 seconds]
bcardiff has quit [Ping timeout: 265 seconds]
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
zamith has joined #crystal-lang
<jhass> asterite: struggling with can't infer block type again: http://paste.mrzyx.de/pju6us649
<asterite> If you cast it with `as` it works?
<asterite> We need to improve the type inference for blocks, I think it's possible, but right now it's not as lazy as it should
<jhass> it's inside array.cr
<jhass> I can't just cast it
<asterite> And what's the code calling map?
<jhass> .from_json
<jhass> Array(Something).from_json
<asterite> The map call is also in the std?
zamith has quit [Quit: Be back later ...]
<jhass> yes, my code stops at the Array().from_json call
<jhass> I'll see if I can reduce it
<asterite> Good :)
<asterite> I think this is the error that needs the most attention right now… I think I have an idea of how to solve it, but it'll take me some time. I'll try
weskinner_work has quit [Ping timeout: 240 seconds]
canhtak has joined #crystal-lang
asterite has quit [Quit: Leaving.]
asterite has joined #crystal-lang
weskinner_work has joined #crystal-lang
asterite has quit [Quit: Leaving.]
<jhass> I'll see if I can reduce it
<jhass> whoops, wrong terminal :)
asterite has joined #crystal-lang
asterite has quit [Client Quit]
canhtak has quit [Ping timeout: 246 seconds]
canhtak has joined #crystal-lang
stuffl has joined #crystal-lang
weskinner_work has quit [Ping timeout: 265 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
waj has quit [Quit: Leaving.]