creationix / dukluv

LibUV bindings for duktape JS engine
http://dukluv.io
MIT License
265 stars 36 forks source link

No console.log available (only print?) #12

Open radare opened 9 years ago

creationix commented 9 years ago

Correct, you can implement your own console object using print.

radare commented 9 years ago

What about making it node compatible? :p

On 28 Nov 2015, at 01:05, Tim Caswell notifications@github.com wrote:

Correct, you can implement your own console object using print.

— Reply to this email directly or view it on GitHub.

creationix commented 9 years ago

This would be a fine project, but it outside the scope of dukluv's immediate goals. Right now I'm still trying to find time to finish solid libuv bindings for duktape.

mamod commented 9 years ago

@creationix I have some work with duktape and porting it to complete nodejs api, I use my own tiny event loop library for that task, I just started to play with dukluv and I think making a nodejs compatible using dukluv will be much easier, it's just a fine piece of work, I'll keep playing and if you're interested I'll ping you once I have something working.

creationix commented 9 years ago

@mamod sounds great, let me know if you hit any more issues at the duktape/libuv layer.

creationix commented 9 years ago

@mamod, in particular, I'm not happy with how dukluv currently does objects. If you can think of a better API style, I'm all ears.

mamod commented 9 years ago

Wow, that would be great and very generous of you. I'll do some prototyping and see if I can be useful :) Thanks

creationix commented 9 years ago

@radare, "making it node compatible" is no small task. Rewriting luv (lua + libuv bindings) took me a few weeks of full-time work. I've spent over a year working on the node.js style sugar layer on top for luvit.io (also mostly full-time work). Don't underestimate the amount of effort required to get from libuv in duktape to a full node.js drop-in replacement. Also it's a moving target.

mamod commented 9 years ago

@creationix you're totally right, it's not an easy task, I tried to make a nodejs port to perl a year ago, didn't finish because of lack of time back then and lots of issues, so I feel what you had to go through when you wrote luvit which is another great piece of work by the way. I'm currently working on a port to duktape comojs and it's not an easy task, in these 2 implementations I tried to write pure (javascript & perl) libuv emulation which was the main factor for complexity, on the other hand I think working with dukluv should be easier because I'm considering using node modules as is then just write wrappers around duktape and dukluv, this time I don't have to deal with libuv directly :)

nodejs being a moving target is another issue, but first let's hope things will be as easy as I think :P

aquawicket commented 3 years ago

A little late to the party. I've been using Duktape with RmlUI (formerly) librocket, to piece together a VERY basic DOM implementation. https://github.com/aquawicket/DigitalKnob/tree/master/DKPlugins/DKDom If you can abstract away from the DKLibraries, it'll give ya some good ideas. I still have a lot of faith in Duktape