dukluv icon indicating copy to clipboard operation
dukluv copied to clipboard

No console.log available (only print?)

Open radare opened this issue 10 years ago • 10 comments

radare avatar Nov 20 '15 01:11 radare

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

creationix avatar Nov 28 '15 00:11 creationix

What about making it node compatible? :p

On 28 Nov 2015, at 01:05, Tim Caswell [email protected] wrote:

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

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

radare avatar Nov 28 '15 01:11 radare

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.

creationix avatar Nov 30 '15 18:11 creationix

@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.

mamod avatar Nov 30 '15 19:11 mamod

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

creationix avatar Nov 30 '15 19:11 creationix

@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.

creationix avatar Nov 30 '15 19:11 creationix

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

mamod avatar Nov 30 '15 20:11 mamod

@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.

creationix avatar Nov 30 '15 20:11 creationix

@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

mamod avatar Nov 30 '15 21:11 mamod

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

aquawicket avatar Apr 30 '21 04:04 aquawicket