bcardiff has joined #crystal-lang
asterite has joined #crystal-lang
edub has joined #crystal-lang
Liothen has joined #crystal-lang
e_dub has joined #crystal-lang
Excureo has joined #crystal-lang
e_dub has joined #crystal-lang
irclogger____ has joined #crystal-lang
kostya has joined #crystal-lang
bcardiff has joined #crystal-lang
waj has joined #crystal-lang
asterite has joined #crystal-lang
waj has joined #crystal-lang
Excureo has joined #crystal-lang
Excureo has joined #crystal-lang
irclogger_____ has joined #crystal-lang
asterite has joined #crystal-lang
Excurio has joined #crystal-lang
Liothen has joined #crystal-lang
bcardiff has joined #crystal-lang
asterite has joined #crystal-lang
bcardiff has joined #crystal-lang
waj has joined #crystal-lang
CraigBuchek has joined #crystal-lang
Liothen has joined #crystal-lang
bcardiff1 has joined #crystal-lang
alex-guenther has joined #crystal-lang
<alex-guenther> hi
<asterite> hi alex
<asterite> thanks for those wiki updates :)
<alex-guenther> you're welcome
<alex-guenther> what is the status of the c callbacks? are they kind of useable ... for playing around_
<asterite> They have some issues… and if they form a closure they blow up (it's not yet implemented)
<asterite> so you have to be careful not to use outside variables… but you can use a "self" pointer
<asterite> What are you trying to do?
<alex-guenther> well a while ago I was lookin if it is possible to write a sqlite3 wrapper...
<asterite> Oh, that would be nice
<asterite> You can use a class a a hidden "self" parameter for the callback
<asterite> Hmmm...
<alex-guenther> I think I would like to try to write some code examples to see how crystal behaves ... may be usefull for others. Well right now I've got a job with PHP (after working with rails) I miss writing beautiful code, and crystal feels like the language that is really fun
<asterite> You can take a look at the Thread class: https://github.com/manastech/crystal/blob/master/src/thread.cr
<asterite> In the initialize method theres: PThread.create(out @th, nil, ->start(Void*), nil)
<asterite> so that passes a callback to the "start" method of the Thread class
<asterite> You can do something like that for now until we implement function pointers, function literals and closures well
<asterite> Ah, I forgot to say: it's nice to hear that (that crystal feels like the language that is really fun)
<alex-guenther> thanks, I'll try to get something working... bye
e_dub has joined #crystal-lang
e_dub has joined #crystal-lang
e_dub has joined #crystal-lang
e_dub has joined #crystal-lang
Liothen has joined #crystal-lang