These are chat archives for olebedev/go-duktape

21st
Apr 2016
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:10
hi there
how does this lib differences from otto? is this also an interpreter?
some examples on the repo would be helpful :)
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:17
on what i'm interested, is calling javascript functions from go
oh, i see on the doc. the api it's really tigh to "c duktape". i'll look there for more documentation..
Oleg Lebedev
@olebedev
Apr 21 2016 14:29
Hi @juanolon
this library is binding to duktape lib written in plain C via cgo instead of otto's native golang implementation
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:30
thanks
Oleg Lebedev
@olebedev
Apr 21 2016 14:31
The docs you may find here https://godoc.org/github.com/olebedev/go-duktape. But it's just thin wrapper around duktape native api. however, the are some golang spesific methods, all of them was pointed at readme file.
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:32
@olebedev do you have any os project using go-duktape? :)
so i get a quicker idea of how this work
Oleg Lebedev
@olebedev
Apr 21 2016 14:33
Yep, I use it in go-starter-kit
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:33
i'm currently looking at the duktape wiki.. but more code to read is welcome :)
will take a look, thanks
Oleg Lebedev
@olebedev
Apr 21 2016 14:34
You are welcome.
Let us know if you use it in some projects.
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:35
sure. i hope it works as i expect ^^
Oleg Lebedev
@olebedev
Apr 21 2016 14:37
Yeah, but be careful. If you use some timers(disable by default), don't forget to use built in mutex - https://github.com/olebedev/go-duktape/blob/v2/duktape.go#L39
One interesting project based on go-duktape - https://github.com/mcuadros/go-candyjs
Juan Pablo Stumpf
@juanolon
Apr 21 2016 14:39
nice
now i have lots for reading ^^