asterite changed the topic of #crystal-lang to: #crystal-lang The Crystal programming language | http://crystal-lang.org | Crystal 0.6.1 | 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
<sadin> a5i: im here cause of the reddit thread :P
<a5i> sadin: Glad I caught your attention :P
<sadin> Its interesting I saw your thread and was a little sad cause now I have two new projects im looking at using. The other being, cause its impressive to say the least. http://lwan.ws/
<a5i> sadin: That would be a pretty cool library in Crystal, did u try putting your web server in the techempower benhcmarks?
<jhass> sadin: ^ perfect match, make a binding for lwan in crystal :P
<sadin> some one put lwan in there already a5i jhass, https://www.techempower.com/benchmarks/previews/round10/#section=data-r10&hw=peak&test=json it smokes the competition the guy who made it is pretty clever
<sadin> as far as json serialization goes anyway
<sadin> still does well in the other categories besides plaintext
<a5i> Nice !
<sadin> setting up crystal now to play with tho :)
<a5i> I'd like to see Crystal smoke some competition :D
<a5i> What's ngx_mruby ?
<sadin> a5i: http://www.mruby.org/ served using nginx i believe
<a5i> pretty impressive results by it :o
<a5i> now I wanna see how Crystal stands in those benchmarks >:)
<a5i> sadin, if you ever try to bind lawn to Crystal, I'd like to help :)
<sadin> a5i: id have to get more confident with C
<a5i> sadin: fair enough
<jhass> nah, I know basically no C and made a gobject binding that can load a simple glade file :P
<sadin> jhass: I mean I could give it a shot its just if i did something like that Id like to go into it knowing I could implement it to the best of my ability lol
<a5i> jhass, okay whats next?
havenn has joined #crystal-lang
<a5i> !hello_world
<a5i> I ran the deps successfully
<jhass> a5i: not sure, what do you want?
<jhass> ah, well, start to use it :P
<a5i> jhass, thats the problem, There are no samples/docs to know how to
<jhass> read the source!^^
<a5i> I'm not very good at that :c
havenwood has quit [Ping timeout: 252 seconds]
sadin has quit [Remote host closed the connection]
<jhass> I can tell you didn't try
<jhass> a5i: so you probably want to start with making a https://github.com/sferik/twitter-crystal/blob/master/src/twitter/rest/client.cr
<a5i> Why did manastech name this potentially amazing web-framework frank ?
<jhass> don't you know sinatra? ;)
<a5i> Of course, I love Sinatra(the actual singer) but Frank is too generic
<a5i> Yeah I know that as well
<a5i> But I personally use Cuba.rb for http://stackin.money
sadin has joined #crystal-lang
ponga has joined #crystal-lang
<a5i> O
<a5i> jhass, is there a way to run frank with a webserver like puma? xP
<jhass> no
<jhass> well, actually you probably could write a ruby extension that exposes a rack interface to the ruby side
<jhass> not sure that would be less work than binding lawn though :P
<a5i> Damn :P
asterite has joined #crystal-lang
<asterite> a51: you can also try to run `crystal doc` on that project (twitter-client)
<asterite> it should (hopefully) generate documentation for the project, at least you can browse classes and methods
<a5i> Thanks
waj has joined #crystal-lang
<asterite> By the way, I think that project is a proof of concept: it might work, but it doesn't have the full twitter API
<asterite> They will develop one for the next Rails Girls Summer of Code :)
<a5i> ooo
<a5i> Btw, does Frank run on Webrick ?
<asterite> No, it runs on Crystal :)
<asterite> Frank is also not finished... as we do things we realize what's missing in the language, so we go back and continue developing the language
<asterite> Btw, thanks for that reddit post, a5i :)
<a5i> asterite: No problem at all :P
<a5i> Cuba+Passenger is faster than Crystal and Express
<a5i> But Crystal is faster than Cuba w/out passenger, and express beats crystal by a hair
<asterite> Did you compile your app with --release? Also, after 0.6.1 Crystal will have non-blocking IO and lightweight processes like in Go, so you'll have to run your benchmarks again :)
<asterite> jhass: if you know there's a way to make the traffic public, I'll enable it
<a5i> What
<a5i> The
<a5i> Flipping
<a5i> shet !
<jhass> don't think there is
<a5i> Crystal gets better by the hour
asterite has quit [Ping timeout: 246 seconds]
<a5i> asterite, Now Crystal bets express by a hair
<a5i> beats*
<a5i> though can;t wait to benchmark with the new features coming up
ponga has quit [Read error: Connection reset by peer]
ponga has joined #crystal-lang
ponga has quit [Client Quit]
waj has quit [Quit: Leaving.]
waj has joined #crystal-lang
ponga has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 264 seconds]
bcardiff has joined #crystal-lang
ponga has quit [Quit: Leaving...]
bcardiff1 has quit [Ping timeout: 272 seconds]
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 256 seconds]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff1 has quit [Ping timeout: 264 seconds]
waj has quit [Quit: Leaving.]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/jMWV
<crystal-gh> crystal/master 9c2f376 Ary Borenszweig: Spec: added global "before_each" and "after_each" hooks. This will make it easier to use libraries like timecop.cr and webmock.cr
<travis-ci> manastech/crystal#2176 (master - 9c2f376 : Ary Borenszweig): The build was broken.
havenwood has joined #crystal-lang
havenn has quit [Ping timeout: 252 seconds]
sadin has quit [Remote host closed the connection]
canhtak has joined #crystal-lang
waj has joined #crystal-lang
Ven has joined #crystal-lang
ponga has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
waj has quit [Quit: Leaving.]
Ven has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Client Quit]
sandelius has joined #crystal-lang
canhtak has quit [Quit: canhtak]
<sandelius> is there a roadmap for this project?
canhtak has joined #crystal-lang
<jhass> asterite certainly has its todo list
<jhass> er, his
<jhass> and there's the rather unmaintained and spanish https://github.com/manastech/crystal/wiki/Backlog :P
<jhass> I think it's more on a whatever comes up basis at this point :)
<sandelius> jhass ok. thx
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> btw crystal is written entirely in itself, which makes hacking the stdlib actually a fun task and any PR is welcome ;)
<sandelius> jhass yeah I got so excited so I've almost gone threw all stdlib classes on github :)
<jhass> :D
<sandelius> jhass when a program is compiled it can only be run on the same OS it got compile on right?
<jhass> well, same as with any other compiled language on a modern OS
<jhass> the architecture has to match the dynamic libraries in the same/compatible versions need available
<jhass> *need to be
<sandelius> that makes sense
<sandelius> so now we can create "ruby" (crystal) programs and give them to people that not have ruby installed. Wehaa
<a5i> Hey
<sandelius> jhass is there any docs on how to compile a program?
<a5i> sandelius: I gotchu if you need any help
<a5i> im kinda new myself
<jhass> sandelius: crystal foo.cr to compile & run it, crystal build foo.cr to generate an executable
<jhass> but yeah, should probably be a chapter in the docs
<sandelius> jhass ok but to build an entire project with the structure src libs etc
<jhass> you generally have an entry file that you compile that requires everything else
<a5i> jhass, do you know when Crystal will release its next version?
<sandelius> jhass ahh ok, and that file can be called whatever?
<jhass> yeah
<sandelius> got it
<jhass> a5i: nope
<a5i> mk
<jhass> I think it needs some time though, due to the heavy change of switching IO to libevent
<jhass> you can easily run the current head version thouhg
<jhass> just clone the repo, run make and use /path/to/repo/bin/crystal
<jhass> btw docs are at https://github.com/manastech/crystal/tree/gh-pages if anybody wants to sent a patch ;)
<a5i> what is Crystal Schema?
<jhass> where did you read that?
<sandelius> jhass what's that -crystal folder that got created when I built my program?
<sandelius> jhass are you part of the core team?
<jhass> .crystal you mean? it's where stuff is cached so subsequent builds can be faster
<sandelius> jhass ahh ok
<jhass> I don't have commit access, so I wouldn't say so
<jhass> a5i: that's the json_mapping stuff I think
<a5i> o
<jhass> it's nice to see crystal at the top, but those benchmarks are not too well done tbh
<sandelius> why are there three different crystal approaches in the benchmarks? What's the difference?
<jhass> different (interfaces to) the parsers
<jhass> if you look at the source it should become apparent :)
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 244 seconds]
<sandelius> ahh the test_schema has the schema predefined and that's why it's faster?
<jhass> tbh I can't explain why it's faster
<jhass> I'd expect the pull parser to win
<jhass> as said those benchmarks are not the best executed ones ;)
<sandelius> I feel like a kid on christmas eve :) what will the switch to libevent do for Crystal?
<jhass> https://github.com/manastech/crystal/issues/430 you can find some discussion here
Ven has joined #crystal-lang
<sandelius> jhass that's really interesting. Wonder why people don't talk more about Crystal. In theory all this sounds amazing
<jhass> somewhere you have to start talking, I think we're at the point where that's happening ;)
<jhass> crystal is still young, especially considering that it is a side project for 2-3 people at the end of the day
<a5i> sandelius: People are talking about crystal :P
<jhass> even was place one on /r/ruby for a while
<a5i> jhass, How low-level can Crystal go on?
<jhass> very
<a5i> Like can it give the programmer control over low-level stuff, like the memory reprensentation of objects, layers of indirection, when memory/resources are freed, etc.?
<jhass> You can do pointer arithmetik
<jhass> well, no real control over GC
<jhass> that is you can't easily turn it off
<sandelius> how is the memory consumption compared to ruby?
<jhass> more efficient, there's no runtime besides the GC and thus basically no internal management structures needed, it's just your data
<jhass> DeBot here is currently in 13 channels and consumes 9M of resident memory
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
<jhass> and I did no memory optimization for it at all
<jhass> we also have two categories of objects, regular objects who are allocated on the heap and structs who are allocated on the stack
<sandelius> jhass is there any docs about testing? It kinda looks like RSpec 2
<jhass> no, not really http://crystal-lang.org/api/
<a5i> jhass, for the bot, I need to create a class for each command ?
<jhass> Spec has no explanations yet
<jhass> so just read existing code :P
<jhass> a5i: yeah
<jhass> well, you could one class have handle many commands
<a5i> mk
<a5i> oh how ?
<jhass> like I do for the Admin module for example
<a5i> funny, im on admin.cr right now
<jhass> or Hangman has some example of doing completely custom parsing
<a5i> hmm
<a5i> jhass ^ I'm trying to make the !say command work in this case, but I cant seem to know a way to parse the message arguments
<a5i> I'm getting this: MatchData("!say lol" ["lol"])!
<a5i> for debugging purposes I put in match
<jhass> yeah, match is a MatchData
<jhass> match[1] is the first match group
<jhass> match[1]? is the same but will return nil if it doesn't exist
<a5i> I see
<jhass> (match[1] will raise if it doesn't exist)
havenwood has joined #crystal-lang
<a5i> hmm
DeBot has quit [Quit: Crystal]
DeBot has joined #crystal-lang
ponga has quit [Quit: Leaving...]
<a5i> Anyone know of a library thats used as an http client ?
<jhass> a http client is in stdlib, require "http/client"
<jhass> >> require "http/client"; HTTP::Client.get "http://google.com"
<DeBot> jhass: Errno: Error writing file: Bad file descriptor
<jhass> hehe, worth a try :P
<jhass> no, not really
<jhass> http://crystal-lang.org/api/HTTP/Client.html not really documented yet either, but there you can see the available methods
<a5i> jhass, what would be in place for 'self' ?
<jhass> ah yeah that should probably be stripped in the docs or replaced with the :: ruby convention
<jhass> it denotes a method called on the class instead of an instance of it
<a5i> wait wut? :S
<jhass> class Foo; def self.bar; end; end; -> Foo.bar; class Foo; def bar end; end; -> Foo.new.bar
<jhass> same as in ruby really
<jhass> ruby docs use #bar and ::bar as notation
<a5i> im quite new to ruby as well :P
wanderer has joined #crystal-lang
wanderer is now known as Guest72238
asterite has joined #crystal-lang
<a5i> asterite: Hey, Idk if you got my msg from last night but now Crystal beats express by a hair :P
<asterite> a5i: Nice! This is with crystal head or crystal 0.6.1?
<a5i> Uhh, I'm not quite sure :/
<a5i> asterite: doing crystal --version is 0.6.1
<asterite> Ah, ok. If you'd like to try with the new IO model you can clone the repo, go to that directory and from there run your benchmark with bin/crystal your_program.cr ... that should use the code from HEAD
<a5i> how much faster is it from 0.6.1 ?
<a5i> eh, Ill test it myself
<a5i> asterite: about the http/client?
<asterite> But waj knows more than me, he did the benchmarks and basically implemented the new IO model
<asterite> Mmm... what request you need to do? You can do: HTTP::Client.get("http://www.goole.com") for example
<a5i> Yeah thats what I needed
<a5i> though im getting a bunch of error, this is straight form ruby minus the libs
<asterite> In the docs, "class method summary" means you can do HTTP::Client.method, while "instance method summary" means you need to create an instance (probably with "new"), like this: client = HTTP::Client.new "www.google.com"; client.get "/"
<asterite> Always look for "new" class method, and then use "instance methods", or use class methods directly
<asterite> It'll be easier to browse the docs like that :)
<jhass> asterite: btw I'd render the summary header, not the the method definition in the details too
<asterite> Ah, the error messages can be long, but they are split in two sections (look for the long ================== chain)
<asterite> Above that you will see it says undefined method 'index' for HTTP::Response"
<asterite> Try response = HTTP::Client.get(url); body = response.body
<asterite> In the next release wi will be able to add return types to the methods and docs, so it'll be easier to browse and understand them even without comments
<asterite> so you'll see it returns an HTTP::Response and not a String
<asterite> You can ask about the changes there :)
<asterite> But it seems to work, I get "Wyomissing, PA | 6.6°F | Overcast"
<a5i> hmm
<a5i> What does not_nil! do
<jhass> raise if it's nil ;)
<a5i> oh right
<sandelius> asterite is explicit return required?
<asterite> Nope
<sandelius> noticed the return result :)
<asterite> Where?
<asterite> Oh!
<asterite> It's because I copied the code from the pastebin and did some changes to make it work, I didn't see that line
<a5i> asterite: ^
<sandelius> I'm really looking forward to start building a web framework in Crystal :)
<a5i> sandelius: That would be really cool!
<asterite> Question: I'll send a talk proposal to curry-on and there's one input field saying "Affiliation"... what does that mean? I have no idea what to put there
<sandelius> I'll probably hold untill libevent thingy has been decided and realeased
<sandelius> asterite what's curry-on?
<a5i> asterite: Are you using Crystal 0.6.1 ?
<sandelius> I would love some docs about the spec library
Guest72238 is now known as wanderer_
wanderer_ is now known as wanderer__
<jhass> sandelius: do they have separate ones for company/employer? If not it's usually that, the organization you're affiliated with
<jhass> er, asterite ^
wanderer__ is now known as wanderer_
<jhass> sorry, no idea why that went wrong :P
<wanderer_> asterite: so did you get my memos about commenting `Crystal.generate_docs`?
<asterite> jhass: I guess it's the organization then
<asterite> This is curry on http://curry-on.org/
<asterite> wanderer_: Ah, yes. What's the problem with that?
<asterite> wanderer_: I fixed something about that, there's a bug that's already fixed but you can try this workaround: https://github.com/manastech/crystal/commit/07a8d478db455b48a14408cb6e6a23097aa3c09d
<wanderer_> when I uncomment it, I can't compile the crystal compiler because I get some strange error
<wanderer_> check out the package I sent you for compiling on windows, it works, but only when Crystal.generate_docs is commented out
<wanderer_> uncomment this single line and it fails compiling
<a5i> asterite: I still can't seem to fix the String error :(
<asterite> a5i: did you see my gist?
<a5i> asterite: Yup, copy/pasted and I still get a String error :(
<asterite> wanderer_: I think we can deal with that issue later
<sandelius> asterite hope you get accepted. would be awesome to see.
<asterite> Oh, we added String#gsub(String, String) recently
<a5i> now it works, thanks asterite
<asterite> sandelius: Thanks! It'll be hard though, we didn't prepare anything, I'll try to write something now... and waj is on vacations. We want to talk about the type inference, macros and unions and show examples and patterns that arise from that
<asterite> I'll use "Crystal: a programming language for humans and computers" as a title talk, but if you have other ideas I'm very open (as in: I have no idea how to sell a talk) to suggestions :)
<wanderer_> asterite: k, the thing is I can't really continue working on windows support without grasping what's actually going on
sadin has joined #crystal-lang
<sandelius> asterite sounds interesting. This project really feels promising. As soon it's been more stable full focus should be on docs so more people can start contribute
<a5i> asterite: Do you need any help with setting up guidelines for the community in places like Reddit or tutorials for newcomers?
<asterite> I think it would be very nice to have guidelines for the community... you should talk with capn_krunk, I think he manages that subreddit
<a5i> Yeah
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<a5i> I'm thinking of creating a folder in my PE repo for Crystal written solvers
<a5i> right now I only have Rust in it
harisamin has joined #crystal-lang
Ven has joined #crystal-lang
<harisamin> guys i just found out about cyrstal lang the other day
<harisamin> i'm super impressed
<harisamin> and excited
<harisamin> :)
<sandelius> harisamin me too, feel like a kid at christmas :)
<asterite> wanderer_: Ok, I'll take a look at it (but later today, or maybe tomorrow)
<harisamin> yeah
<a5i> sandelius: same !
<harisamin> i've been doing ios for the past two years almaost while stil doing ruby
<harisamin> and have been dong go on and off
<harisamin> and finally more recently to move one of our sidekiq workers off ruby and in go
<harisamin> crystal just seems amazing
<harisamin> lol
<a5i> my timing couldnt have been better o.o
<harisamin> its almost exactly what i want for my server code
<a5i> harisamin: cheers!
<harisamin> so i guess i hvae a few questions
<harisamin> i've been reading the docs
<harisamin> and they are great and i know its always a WIP
<harisamin> but i'm not quite sure what teh state of concurrency is in crystal
<asterite> jhass: I thought you didn't have a reddit account ;-)
<harisamin> i know that there's a Thread class that maps to native threads and no GIL
<jhass> asterite: things change...
<harisamin> but i heard something about concurrency being linekd exclusivley to libuv or libev (this was in a disucssion in the github issues)
<harisamin> but then i also saw and example of Channels
<harisamin> so yeah
<harisamin> a bit confused as to what the real state of concurrency is in crystal
<asterite> harisamin: Right now HEAD is using libevent and libpcl. As you mentioned Go, the concurrency model will be very similar to that of Go
<a5i> >> "hello"
<DeBot> a5i: "hello"
<asterite> There will be a global scheduler and lightweight processes
<a5i> jhass, my eval does not work :(
<harisamin> right i came across that
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<harisamin> asterite: so using libev...does that mean that crystal is opting for more of a nodejs like concurrency pattern
<harisamin> via an evented model?
<jhass> a5i: it requires some setup
<asterite> But all of this is a very recent change, and not everything is working well right now, so it'll take some time for the next release to happen
<harisamin> in go you're able to use multiple cores that are vaiableb
<a5i> asterite: Oh! When will the version of Crystal with non-blocking IO and such be released?
<harisamin> which u can't in nodejs unless you're kinda forking the process
<harisamin> as far as i understand
<a5i> jhass, is it complicated?
<asterite> harisamin: we'll start with a scheduler that runs on one thread, but eventually we'll make processes be distributed in many threads. So it will be similar to node.js at first but to Go in the end
<jhass> a5i: I have a script it expects to be run on an archlinux host
<harisamin> asterite: cool
<a5i> oh :(
<asterite> harisamin: also, I don't think we'll be moving the processes between threads at first... we do things slowly but steadily :)
<harisamin> ideally i would liek the go model
<harisamin> but to be fair i'm not sure how many peeps are setting GOMAXPROCS to more than one in prouciton atthe omement
<harisamin> asterite: so taking the whole performance thing with a grain of salt...i know it varies and benchmaks most times are meaningless...does this mean that we can expect for the most part same performance level as GOMAXPROCS=1 ? I was seeing some discussions in github and seemed liek ppl seemed to be getting similiar perfromance ot their go programs
<harisamin> of course i realize i'm being very hand wavy right now
* harisamin waves his hand
<harisamin> :)
<asterite> harisamin: I guess so. But I'm not that one that knows much about these things. @waj knows a lot more, but he's currently on vacations :)
<harisamin> :)
<harisamin> is crystal compleeltey a community driven project?
<harisamin> is their any corporate backing?
<harisamin> i don't have opinions either way
<harisamin> just curious
<harisamin> if some companies are sponsoring some of the core devs
<harisamin> i would hope so i guess :)
<a5i> I don't think it has corporate backing
<harisamin> cool
<harisamin> agan just asking questions
<harisamin> i was up till 4AM
<harisamin> reading up
<harisamin> lol
<harisamin> got really excited
<a5i> Its fine, just try to use spaces instead of the return key alot xP
<a5i> asterite: When you have time, could you show a simple example of how low-level Crystal can get?
<harisamin> a5i: lol sorry...i got excited :)
<a5i> Its fine
<wanderer_> a5i: you can use pointers and easily import from the c runtime, can't get much lower (there's no inline asm, though)
canhtak has quit [Quit: canhtak]
<asterite> Yes, crystal is community driven
<asterite> We started it as a side-project in our company (Manas), staying after work to develop it and brainstorm (it was really fun!)
<asterite> But it's not funding it... sometimes we can use some hours to develop it hoping we can use it at work to speed up the development process and not having to migrate Ruby backend code to Erlang/Java/Go from time to time :)
<asterite> And of course hoping it can be useful to others as well
<asterite> a5i: here's an example
<asterite> >> a = 1; ptr = pointerof(a); ptr.value = 2; a
<DeBot> asterite: 2
<asterite> There I got a pointer to a variable and set its value
<harisamin> asterite: yeah we've beeng porting over a couple of our sidekiq workers over to go...its been a mixed expereince, i've done some go in the past so part of it was me being rusty at it, but yeah kinda wish we would've taken the time to do it crystal...but we odn't have that much time :)
<harisamin> so far the go port is going well and we're excited about it, but yeah porting over our ruby code would've been much easier :)
<harisamin> i am curious though...might be worth creating a cyrstal sidekiq compliant worker lib
<harisamin> i know there's already a redis crystal client available
<jhass> my favorite PoC is still https://github.com/manastech/crystal_ruby
<harisamin> so in crystal...if u don't wanna do libuv style concurrency...can u do manual threads too instead?
<jhass> yeah, pthreads is available
<jhass> the bot here uses it
<harisamin> jhass: that's pretty awesome.
<harisamin> i haven't done much straight up threading code
<harisamin> i do love Grand Centtral Dispatch on cocoa/objc/swift
<harisamin> perhaps using libdispatch would be a fun experiment
<jhass> I did a simple producer/consumer pipeline for it https://github.com/jhass/DeBot/blob/master/irc/src/irc/workers.cr
<harisamin> some times i wish i could use GCD style concurrency eveyrwhere :)
<harisamin> anyone else played with GCD/libdispatch ? i know its mostly an ios/mac thing, but its an open source lib and well maintained from what i hear
<wanderer_> btw. what about having the compiler's source in /src/ and the stdlib in /std/? Isn't it kind of more comprehensible?
<harisamin> i have to look at that crystal example that helps create bindings
<jhass> wanderer_: you can use the compiler as a standard library though :P
* harisamin mind blown
<harisamin> i've always wanted to play with llvm and go throught he kaleidoscope tutorial they had, wish i could help build awesome features in crystal :) but i know its a tricky and hard road compilers and such
<jhass> it's what the PoC I linked earlier essentially does
<asterite> >> require "compiler/crystal/**"; Crystal::Parser.parse("[1, 2, 3]").class
<DeBot> asterite: Sorry, that took too long.
<asterite> Oh :(
<asterite> But yes, you can use the compiler in some project, maybe for code analysis
<asterite> harisamin: There's a brainfuck compiler that generates llvm code in the samples, https://github.com/manastech/crystal/blob/master/samples/llvm/brainfuck.cr , LLVM is pretty small, once you learn it it's super intuitive :)
<asterite> harisamin: You can try doing the kaleidoscope tutorial in Crystal! :-P
<asterite> You'll learn Crystal and LLVM at the same time
<ytti> is there tutorial to write ruby module in crystal, that might be interesting to wide audience
<ytti> too bad ruby isn't really designed to be interfaceable by other languages
<harisamin> asterite: not a bad idea at all :)
<harisamin> this might be a crazy suggestion, and I'm definitely not the most knowledgable on all of this at all, but would be crazy to think crystal's concurrency model can be backed by libdispatch ?
<asterite> ytti: There is, it's ruby.h . Maybe with mruby this will be easier, supposedly it's form embedding it in other apps
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> mh, do we have a compiler interface to generate dynamic libraries?
<asterite> Not yet. It should be easy. You would you `fun` to provide that interface, I guess. The "problem" is that these libraries will require the GC
<asterite> * you would *use*
bcardiff has joined #crystal-lang
<a5i> Okay, so Crystal can get low-level but not as much control as C
<asterite> a5i: For example?
<a5i> 1 moment
<a5i> asterite: Can Crystal construct multiple objects (of different types) in the same dynamically allocated block.
<jhass> what does that even mean :P
<asterite> I think it's a union?
<asterite> >> ptr = Pointer.malloc_one(123456_i64); f = ptr as Pointer(Float64); f.value
<DeBot> asterite: 6.09954e-319
<asterite> I allocated memory for an Int64 but reinterpreted it as Float64
<asterite> Is that what you mean?
<asterite> There are also built-in unions. Or you can use C unions for interfacing with C (but you can use them in your code too, but nobody does that, it's unsafe)
<asterite> >> lib L; union U; i : Int64; f : Float64; end; end; u = L::U.new i: 123456_i64; p u.f
<DeBot> asterite: 6.09954e-319
<asterite> Similar to the above
<a5i> I'm trying to prove to a friend
<a5i> aboout crystals low-level capabilites
<jhass> had the feeling those were not your words :P
<a5i> :)
<asterite> We basically wanted to be able to interface with C without writing C code, so I guess that means we can do anything C can do
<asterite> Not that it's advisable to program as in C, we usually stay at a higher level and get protection from the GC
<a5i> i see
<wanderer_> btw asterite doing `proc = ->LibC.memset; proc.pointer` seems to work as a workaround for `pointerof(LibC.memset)`, but not with LLVM 3.5.1, at least on windows, haven't tested it with 3.5.1 on linux yet
<asterite> a5i: Yes, you can, you would assing two types to the same instance variable of "block
<wanderer_> a5i: you can, e.g. the String class is built kinda like this
<asterite> and then do something based on that type. But in C you can accidentally use the union in the wrong way, in Crystal you can't
<asterite> I'll write a small gist showing this
<a5i> thanks!
<wanderer_> there are structs, unions, malloc and most important pointers, everything you need for dynamically allocating space and storing data and references in it the way you want
<jhass> and typecasts
<jhass> you can shoot yourself into the foot in as many ways as you like!
<a5i> :D
<asterite> I didn't copy your friend's example, I just did a smaller example showing the feature
<a5i> yeah, he said "Where's the part where I allocate both objects in the same memory block?"
totimkopf has joined #crystal-lang
<totimkopf> \o/
<jhass> o/
<totimkopf> I can't wait to check crystal out
<a5i> \o
<totimkopf> any web frameworks under construction?
<a5i> totimkpf, there is Frank
<totimkopf> ohh
<a5i> totimkopf: *
<asterite> Yes, this: https://github.com/manastech/frank , but it's not advanced right now, kind of halted
<wanderer_> jhass: how are typecasts actually done? if I have e.g. an Int32 and want a SizeT from it
<a5i> asterite: could you include that?
<asterite> a5i: can't right now, sorry :(
<a5i> asterite: totally fine
<a5i> I understand your busy schedule :P
<asterite> a5i: I don't see "nope" used in that code, so I don't understand what your friend means. But tell him you can use malloc and do pointer manipulation and cast, so you can do everything C can do
<a5i> okay, counds good
shama has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 246 seconds]
<a5i> This is a pretty longshot question, but how safe is Crystal?
<jhass> a5i: start by defining safe
wanderer_ has quit [Quit: Page closed]
<a5i> jhass: Well coming from a bit of Rust, lots of them claim that most languages are "unsafe" compared to them
<jhass> so memory safety
<jhass> the memory unsafe parts in crystal are Pointer and bindings (and typecasts I guess, sort of), if you don't touch those and use only code that uses those two properly, we should be as memory safe as rust is
<jhass> we do have a Slice class, which is a Pointer with an associated length that does bounds checking, I think that's similar to the constructs Rust provides (without looking at Rust in detail yet)
<jhass> btw Rust has those unsafe areas too
<a5i> Yeah ik
<a5i> Thanks
<a5i> I think I'm going to post Crystal release on reddit for each major change
<a5i> releases*
<asterite> Yes. Instead of having an "unsafe" keyword, we basically assume that all pointer manipulation is unsafe. Abstractions built on pointers are considered safe as long as their are implemented well (similar to Rust, I guess). There's this: https://github.com/manastech/crystal/issues/124 but now I'm not sure I like it, it will just add noise
<a5i> I see
<jhass> rust and crystal are quite similar feature wise actually, at least that's what I could gather from a talk with a friend who's into rust
<ytti> i don't see that
<ytti> crystal is GC'd
<asterite> Really? But Rust doesn't have a GC. I think that's a major difference
<ytti> rust is explicit
<ytti> with complicated by advanced pointer system
<jhass> let me try to remember what we could identify, I think it was mostly things like an advanced macro language, open classes and things like that
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 264 seconds]
waj has joined #crystal-lang
<sadin> once i get my blog up and running and im happy with the design im gonna do a pretty lengthy post on crystal lol
<a5i> :~D
harisamin has quit [Remote host closed the connection]
<sadin> just wish there was more time for everything, college is hoarding it all :P
<a5i> High school is hoarding mine :P
<a5i> The Things that can get Crystal more popular is benchmarks(meaningful ones) against popular languages or rising ones, and cool release features
<a5i> which non-blocking IO and lightweight processes is surely a good one
wanderer has joined #crystal-lang
wanderer is now known as Guest37982
Guest37982 is now known as wanderer_
leafybasil has joined #crystal-lang
<a5i> >> "a" + "b"
<DeBot> a5i: "ab"
leafybasil has quit [Ping timeout: 246 seconds]
palla has joined #crystal-lang
<wanderer_> UInt8* is a shortcut for Pointer(UInt8), isn't it? Should (UInt8*).malloc() work then?
<jhass> >> (Uint8*).malloc
<DeBot> jhass: Syntax error in eval:3: unexpected token: )
<jhass> uh, not sure
<jhass> >> (Pointer(UInt8)).malloc
<DeBot> jhass: Error in line 3: wrong number of arguments for 'Pointer(UInt8):Class#malloc' (0 for 1, 2)
<jhass> maybe?
<jhass> I'd continue to use Pointer(UInt8).malloc I think
palla has quit [Client Quit]
<asterite> UInt8* is a syntax sugar for the pointer type, but only in two places: type restrictions and type arguments
<asterite> So, def foo(x : UInt8*); end ; works
<asterite> Also: Array(UInt8*).new works
<jhass> casts too, no?
<asterite> It was originally added so we can write C bindings more comfortably, because C uses lots of pointers and it was going to be boring to write Pointer(Pointer(UInt8)) all over the place
<asterite> Casts too, yes
<asterite> We could restrict it to C bindings, though, if it avoids confusion
<wanderer_> (UInt8*).malloc or UInt8*.malloc would be shorter to write
<asterite> I also imagined maybe we can have some syntax for talking about types, so for example ::(UInt8*), or ::(Int32 | String)
<wanderer_> it just creates confusion as there're no complete docs yet, if you know it's syntactic sugar and where it applies, it simplifies stuff
<wanderer_> I just thought it'd also apply in general, so something like UInt8*.malloc was possible
totimkopf has quit [Quit: leaving]
<a5i> for loops in crystal is the same as ruby's correct?
<jhass> Crystal actually dropped for loops from the regular code (which ruby should do too), they're only present in the macro language
<jhass> so you want .times, each and stuff like that
<a5i> oh
<a5i> jhass, that script i posted in #ruby, i want to rewrite that in crystal
<a5i> and the obstacle is the for loops
<jhass> mmh, do we have each_index? I guess not
<jhass> >> [1, 2, 3].each_index {|i| print i }
<DeBot> jhass: 012[1, 2, 3]
<jhass> oh, we do!
<a5i> lol
<a5i> so the .each_index is my outer for loop ?
<jhass> yeah
<jhass> the inner is (array.size-1).downto(i) do |j| I guess
Excureo has quit [Remote host closed the connection]
Excureo has joined #crystal-lang
sadin_ has joined #crystal-lang
sadin has quit [Ping timeout: 252 seconds]
sadin_ has quit [Remote host closed the connection]
<a5i> jhass, shouldn't this work ?
<jhass> maybe, sorting algos always give me headaches
<jhass> it doesn't how?
<a5i> Syntax error: Syntax error in ./hello.cr:5: expecting token '=>', not 'NEWLINE'
<a5i>
<a5i> temp = array[j]
<a5i> ^
<jhass> oh
<jhass> you made silly { } around the if
<asterite> Yes, for if don't use curly brace, just newline and "end" at the end of it
<jhass> actually use do end for the each_index here too, looks more consistent
<asterite> Ah, this chat UI doesn't scroll well :(
<a5i> ok
<jhass> asterite: then get a proper client already :P
<ytti> maybe the parser should report context where it is
<ytti> if it said 'in hash definition' maybe it would have been more obvious
<ytti> or maybe not
havenwood has quit []
JJS_ has joined #crystal-lang
JJS_ has quit [Client Quit]
jhass is now known as apeiros
apeiros is now known as jhass
havenwood has joined #crystal-lang
havenwood has quit [Client Quit]
<a5i> I'm copying a friends JavaScript algorithm repo and translating it to Crystal
<jhass> we like snake_case for our filenames and 2 spaces for indentation :)
<jhass> you can do a swap like this: a, b = b, a
<jhass> also not sure why you have bubblesort twice in that file :P
<a5i> One for greatest to least and vice versa
<jhass> I'd name then accoridngling
<jhass> bubblesort_ascending, bubblesort_descending
<jhass> insertionsort_ascending, insertionsort_descending
bcardiff1 has quit [Quit: Leaving.]
<jhass> gosh, the indentation makes it really hard to read tbh
<a5i> hmm
<a5i> I keep changing the spaces but github doesnt seem to chnage it
<jhass> you still have tabs
<jhass> try selecting the whitespace in the diff, you'll notice
<a5i> in the diff?
<jhass> well, anywhere really
<jhass> don't mix tabs and spaces, that's the worst :P
<jhass> also maybe time for a proper text editor ;)
<a5i> my text editor is never like that
<jhass> j = j - 1 -> j -= 1
<a5i> ah
<jhass> er, remove that comment
<asterite> There's also array.swap(i, j)
<a5i> Is there an array.slice() ?
<a5i> like JS has
<jhass> sort of, Array#[] takes ranges or two parameters
<jhass> array[start_idx..end_idx] and array[start_idx, items_to_take]
<a5i> ahh
<a5i> what about the equivalent of ++i
<jhass> that actually adds inconsistencies to most languages that have it
<a5i> Thats the only part I need to translate right now, then i can work on a better example
<jhass> i += 1
<a5i> oh..
<a5i> Undefined use of method 'slice' on Array of Int32
<a5i> oops
<a5i> forgot
<a5i> heh, I got a seg fault :P
<a5i> code for MergeSort ^
<jhass> mh, could you start to use a pastebin with syntaxhighlighting?
<jhass> we use snake_case for variable names too btw
<a5i> oh damn :/
<jhass> the return keywords are implicit at the points where you use them in that code
bcardiff has joined #crystal-lang
<jhass> pastebin.com is not a better pastebin :P
<a5i> :[
<a5i> I'm just trying to fix the seg fault
<jhass> use gist, pastie, hastebin
<jhass> well, that's something for asterite to look at :P
<jhass> you're still mixing tabs and spaces btw, a good editor can be configured to insert spaces when you press tab ;)
<a5i> I'm using codeanywhere.com :>
<asterite> I'm getting "index out of bounds" on your example
<asterite> Ah, it's segfault on 0.6.1
<asterite> I fixed some issues in Array recently, regarding array slicing
<asterite> You'll have to use HEAD
<a5i> o
bcardiff has quit [Ping timeout: 256 seconds]
<a5i> and how do I install that again?
<jhass> git clone https://github.com/manastech/crystal.git; cd crystal; make
bcardiff has joined #crystal-lang
<jhass> then to run: /path/to/crystal/bin/crystal foo.cr
<a5i> I found an error in the Crystal compiler :/
bcardiff has quit [Ping timeout: 246 seconds]
<a5i> Error: cannot allocate memory
bcardiff has joined #crystal-lang
<jhass> hehe
<jhass> you don't seem to have much memory .)
<jhass> :)
<a5i> Does having a 512 MB RAM vps cause the error?
<asterite> Last time I compiled the compiler it needed about 700~800 MB
<a5i> oh no ;-;
<asterite> We didn't do many optimizations in the compiler to make the memory consumption lower... on the other hand the compiler is pretty fast
<asterite> We assume devs machines are powerful :)
<a5i> Im only 26
<a5i> 16 *
<a5i> and on windows ;-;
<a5i> Is this going to be the case for future releases @ asterite ?
<asterite> a5i: you mean, less memory consumption?
<a5i> yeah
<a5i> in installation
<asterite> I don't know... I think there are more "important" things right now
<jhass> a5i: it will be slow, but you can probably workaround with a swapfile
<asterite> But at least the compiler is a bit better than that of Rust: https://twitter.com/horse_rust/status/581986578966319104
<asterite> (there's nothing wrong with that, they just didn't optimize the compiler yet)
<a5i> I just want to be able to use crystal in future releases, thats all :(
<jhass> dd if=/dev/null of=./swapfile bs=1M count=1024; mkswap ./swapfile; swapon ./swapfile
<asterite> Ah, but for each release we provide installabls
<jhass> *packages ;)
<asterite> Yes, that. I didn't know what word to use :)
<a5i> lmao
<jhass> but try with the swapfile
<a5i> jhass, im confused as to what you want me to do with that bash thing..
<jhass> it's three commands to run, the last one as root
<a5i> swap area has to be at leat 40 kb
<jhass> er right, it's /dev/zero not /dev/null, sorrry
<a5i> well i was making crystal and this error showed
<a5i> v
<jhass> ah, yes try installing libevent and libpcl
<a5i> with apt?
<jhass> yeah
<a5i> whats that second package?
<jhass> it provides coroutines, which Ruby and Crystal named Fibers
<jhass> nothing you really need to care about at this point I'd say :)
<asterite> jhass: so it takes 30 seconds for you to build the compiler?
<jhass> well, I didn't remove the cache :P
<jhass> gotta get some people interested :P
<jhass> meh we need terms for the compiler doing the compilation and the compiler being compiled when compiling the compiler :D
sadin has joined #crystal-lang
<jhass> anyway, otoh the compiler doing the compilation wasn't compiled in release mode
sadin has quit [Ping timeout: 265 seconds]
<asterite> tems == docs ?
<asterite> * terms
asterite has quit [Quit: Page closed]
asterite has joined #crystal-lang
<jhass> no, words, expressions
<jhass> like -> { } is called stabby lambda
<jhass> release mode compiler halfes the crystal relevant times for me btw
<asterite> Yes, for me it's the same. In non-release it takes 15 seconds for me
<asterite> I'm curious about this: Codegen (clang): 00:00:10.1797780
<asterite> That should be the "cc" call, in my case it's 0.8445160
<jhass> yeah, FS caches I guess
<jhass> my harddisk is rather slow
<jhass> now that it's cached it's at 1 second
<asterite> Ah, good :)
bcardiff has quit [Quit: Leaving.]
sadin has joined #crystal-lang
<a5i> jhass, libpcl doesnt exist
<a5i> nor does libpcl-dev
leafybasil has joined #crystal-lang
<jhass> pcl without lib ?
<a5i> no luck either
asterite has quit [Ping timeout: 246 seconds]
<jhass> ubunut?
<jhass> *ubuntu?
<a5i> debian
<jhass> meh, might just mock LD_LIBRARY_PATH then
<jhass> is a libpcl.so in /opt/crystal/embbeded/lib or whatever the path was?
<a5i> what path ?
<jhass> /opt/crystal/embedded/lib I think
<jhass> look around
<a5i> jhass, not there
<jhass> meh
<a5i> sigh :/
<jhass> you didn't look very hard :P
<jhass> so debian slapped a 1 onto the library name
<jhass> because... debian
<a5i> lol
<a5i> cannot find -lpcl
<a5i> ARGH
sadin has quit [Ping timeout: 264 seconds]
<jhass> mh
<jhass> get the -dev too
<a5i> Why
<a5i> am I getting
<a5i> error after ERROR AFTER ERROR
<a5i> >:O
<jhass> welcome to the early adopter stage ;)
<a5i> main_module:(.text+0x296): undefined reference to `co_set_data
<a5i> like wtf
<wanderer_> jhass: colorize injects into class Object, is this common practice in ruby? for example, in javascript appending to the prototype chain of already existing objects like String or Array is possible, too, but kinda frowned upon
<jhass> a5i: meh, I guess the version debian ships is too old
<a5i> damnit debian >:(
<wanderer_> I had that error, too, a week ago
<wanderer_> version mismatch as far as I recall
<a5i> wanderer_: you have debian?
<wanderer_> ubuntu vm
<jhass> wanderer_: mh, common practice, it's okay to do if it makes sense, like if you really are adding to the functionality
<a5i> uhhh, how did you fix it?
<jhass> if it's just a convenience function for your library, you shouldn't do it
<jhass> though all of that is a rather controversial topic in Ruby too
<wanderer_> a5i: sry, I didn't, instead I downloaded 0.6.1 :D
<a5i> sigh
<a5i> Im just going to wait for the next release
<jhass> yeah, I guess it'll bundle a recent libpcl
<jhass> or you could get a antergos VM I guess :P
<wanderer_> a5i: well, I'm trying to port it to windows and a lot has been changed and added after 0.6.1 (also regarding libpcl), so I thought it'd be easier if I start with 0.6.1
<wanderer_> what's antergos?
<jhass> a graphical installer for arch, essentially
<a5i> wanderer_: That would be interesting
<wanderer_> sounds cool
sadin has joined #crystal-lang
<wanderer_> should set up a vm and try it, though, I still have to port my keyboard layout to linux.. without it I can't use anything different from windows, lol
<wanderer_> a5i: I already have a rudimentary crystal.exe that is able to compile the compiler srces
<a5i> wanderer_: What's next?
<a5i> oh and it seems impossible to create a MergeSort in Crystal 0.6.1
<a5i> the next version has to come out asap :P
<jhass> it's not impossible
<jhass> your implementation has a bug
ckreon has joined #crystal-lang
<a5i> I tried another implmenation online
<a5i> > segfaults
<jhass> the bug crystal has it to segfault instead of raise on that bug
<a5i> jhass ^ this gives some weird errors ever since I put in the puts line
<jhass> there's no or and and in Crystal, only || and &&
<a5i> wow
<a5i> just as I fixed it you said that, I'm also glad that its like that
<a5i> and it finally works
<a5i> ffs
<jhass> and it starts to look idiomatic, did you port a ruby version this time? :P
<a5i> Yeah :P
<a5i> porting messy javascript will just infect messiness into other languages, even nice ones like Ruby
<wanderer_> jhass: I don't quite understand what's `make_relative_unless_absolute` for in crystal_path.cr
<wanderer_> it uses expand_path, so it transforms a relative path to an absolute one
<wanderer_> why is it called "make relative unless absolute" then?
<jhass> yeah, seems like a misnomer
<jhass> expand_path_unless_absolute or so would be better
<jhass> well, actually it expands in any case
<jhass> ensure_absolute_path maybe?
<wanderer_> yes, something like that
<jhass> PR time! :P
<wanderer_> doesn't the first like `filename = "#{Dir.working_directory}#{File::SEPARATOR}#{filename}" unless filename.starts_with?('/')` makes the expand_path unnecessary?
<jhass> no, expand_path also resolves symlinks and normalizes stuff like "/foo/bar/../baz" to "/foo/baz"
<wanderer_> ah, k
<wanderer_> so it checks if filename is relative, if so it prepends working_directory and in either case it uses expand_path
<jhass> yeah
<jhass> I guess in windows you could check for :\ or something like that to be in the path or whether it starts with \
<jhass> in ruby actually pretty much any method that deals with paths accepts / on windows too, I wonder whether we should aim for the same
<wanderer_> windows itself accepts either \ or / in most cases
<wanderer_> an absolute path on windows always starts with X:\, so one could check for a : at [1]
<jhass> mh, my windows times are far away, but I have a faint memory of seeing paths start with \
<wanderer_> I'd say something like require "bla/blubb" is like an abstract command, so on windows it should stay /
<jhass> though I guess they were relative to the drive of the current working directory or something
<jhass> yeah
<wanderer_> yes, if they have : at [1] they're absolute, elsewise they're relative
<jhass> though what to do with require "/foo/bar" ?
<wanderer_> bin\bla.exe and \bin\bla.exe are both relative
<wanderer_> I just did `ifdef windows; path.tr("/", "\\"); end`
<wanderer_> so it stays / in the require command, but gets translated to \
Lewix has joined #crystal-lang
<a5i> Hey Lewix
c355E3B has joined #crystal-lang
<c355E3B> Has anyone used this in production yet?
<jhass> nothing customer critical
<c355E3B> Or to rephrase, does anyone know of any caveats that would keep it from being used so
<jhass> afaik manstech has an internal tool or two in crystal
<jhass> you'll run into language bugs and holes in the stdlib still
<jhass> we're in the phase were that kind of stuff is still ironed out
<Lewix> hey
<jhass> o/
<Lewix> who's at the helm of the project
<jhass> c355E3B: that said I have a personal project or two that run quite solid after the language bugs I hit with them got fixed
<a5i> Whats a Crystal programmer called?
<c355E3B> crystalizer ?
<jhass> Crystalist? :D We still have to make all these terms up ;)
<c355E3B> hmm ok
<jhass> Lewix: https://github.com/manastech/crystal/graphs/contributors shows that pretty clearly I think ;)
<a5i> why don't all Rubyists just take one step the the right and move to Crystal
<a5i> shouldnt be that hard
<jhass> it would
<a5i> how so
<jhass> Crystal won't replace Ruby and Ruby won't replace Crystal
<a5i> Well yes
<a5i> nvm disregard what I said
waj has quit [Quit: Leaving.]
<jhass> Ruby as an interpreted language offers a completely runtime defined, introspectable and modifyiable meta model, something Crystal as a compiled language without a runtime just can't offer
<jhass> otoh. Crystal offers native code/binary generation, something Ruby due to the features it has can't offer
<jhass> to pick just two points at random
<Lewix> sheesh
<Lewix> too many languages
<c355E3B> Its great isnt it?
<c355E3B> Well unless you ask my coworkers
<a5i> Well I just think Crystal as a compiled Ruby with its benefits
<a5i> Wait a sec, how can Crystal gain traction with Ruby sitting up top?
<c355E3B> The same way stuff like nim is still around
<jhass> Crystal can certainly steal a few usecases from Ruby
<c355E3B> Or elixir
<c355E3B> Offer a diffrent way of relieving a pain point
<jhass> and enter territories Ruby isn't popular in, like GUI programming
<a5i> I'd like to see Elixir vs Crystal
havenwood has joined #crystal-lang
<c355E3B> I can give you a 3 min version if you want
<c355E3B> Elixir heavy though, crystal is still building for me
<a5i> does Crystal have Compile-time execution ?
<jhass> limited, the macro language is indeed quite powerful though
<a5i> c355E3B: sure
<c355E3B> Elixir builds on top of the erlang vm
<a5i> I'd greatly appreciate it
<c355E3B> which gives it access to the nicest part of erlang (IMO) the OTP
<a5i> btw, this may be a weird question but
<c355E3B> which is the libary that gives erlang its reputation of being a rock solid beast
<jhass> https://github.com/manastech/crystal/blob/master/src/json/mapping.cr demos what the the macro language can do for a large part
<a5i> is there a way to detect when the GC is executed
<a5i> does Crystal also support async/await ?
<c355E3B> So you get the ability to use that without dealing with the proglog bits of erlang
<c355E3B> Crystal compiles w/o a runtime, you would need to bring all of the hot-swapping, supervision and fault tolerance yourself
<jhass> (you can see the GC as a runtime, but yeah, nothing beyond that)