Comments (39)
Well, there's two things.
- as you have pointed out in #18, there's a couple of TODOs left. Particularly the "make this an abstract enum" stuff should be done before the release, because adding it later would be a breaking change.
- I think I've talked about this elsewhere but I can't find it anymore. The Fs API could be made more typesafe. You can see a sketch here: http://try.haxe.org/#E9921
Maybe that is a bit over the top, given that one would rarely fiddle around with file descriptors in the first place, but if If you guys are ok with it, I would make a pull request.
I haven't looked through the source extensively, but it might be worthwhile detecting other places that lack type safety. We can still get rid of it later on, if it turns out too clunky. The other way round is not possible though.
from hxnodejs.
I've been using it in a "real world" project.. with Http related features
and it is rocking!
Can't we release it under a beta or something?
2015-07-21 9:26 GMT-03:00 Juraj Kirchheim [email protected]:
Well, there's two things.
as you have pointed out in #18
#18, there's a
couple of TODOs left
https://github.com/HaxeFoundation/hxnodejs/search?utf8=%E2%9C%93&q=todo.
Particularly the "make this an abstract enum" stuff should be done before
the release, because adding it later would be a breaking change.
2.I think I've talked about this elsewhere but I can't find it anymore.
The Fs API could be made more typesafe. You can see a sketch here:
http://try.haxe.org/#E9921
Maybe that is a bit over the top, given that one would rarely fiddle
around with file descriptors in the first place, but if If you guys are ok
with it, I would make a pull request.
I haven't looked through the source extensively, but it might be
worthwhile detecting other places that lack type safety. We can still get
rid of it later on, if it turns out too clunky. The other way round is not
possible though.—
Reply to this email directly or view it on GitHub
#40 (comment)
.
[image: Imagem inline 1]
from hxnodejs.
Yeah we should review TODOs but wrt type safety I'm not sure. I remember we wanted to have good balance between typesafe and being able to copy-paste js code with minimal changes.
from hxnodejs.
Same experience as Eduardo and I would agree that we can release with a 0.x
label for a while.
Il giorno mar 21 lug 2015 alle ore 08:37 Dan Korostelev <
[email protected]> ha scritto:
Yeah we should review TODOs but wrt type safety I'm not sure. I remember
we wanted to have good balance between typesafe and being able to
copy-paste js code with minimal changes.—
Reply to this email directly or view it on GitHub
#40 (comment)
.
from hxnodejs.
Also me and other member have our own libs for nodejs libs bindings!
Can we have a hxnodelibs
or similar repository inside the Foundation so we can do a similar work like hxnodejs
?
It would be great to get some help to finish mongodb
and other common libs!
@HaxeFoundation/hxnodejs-team
@HaxeFoundation/owners
from hxnodejs.
@nadako I understand what you are saying. There is of course no reason to make copy pasting particularly hard. That being said, the differences between Haxe and JS are there. Node's module system certainly doesn't make it easier (although I will say that it's module philosophy also decreases the need compared to frontend JS). My broader stance is that we can only seek that balance walking one way through the spectrum, so I think that it might be wiser to get all the room to maneuver we can get (with reasonable effort) and then let user feedback govern how far we go back. But I trust you on making that decision.
One thing I will add though is that in future versions we should be able to use @:from macro
to allow consuming string literals as well, to reduce friction in copy pasting (and please the code golfers).
from hxnodejs.
So I was cleaning up my repo today,
and I've been trying to add hxnodejs
as a git dependency in my haxelib.json
.
Unfortunately, it doesn't seem to be supported right now (see HaxeFoundation/haxelib#238)
Meaning that publishing a first version to haxelib is (at least IMHO) necessary for any third-party to rely on these nodejs externs.
So it may be nice to publish a 0.0.1
to nodejs
on haxelib (as @dionjwa proposed, in my understanding).
BTW it would also be cool to ask similar project authors for removal / deprecation ?
See http://lib.haxe.org/search/?v=node
from hxnodejs.
With regard to version, I thought we agreed on syncing major/minor versions with node.js API version and using patch versions for hxnodejs releases (see #26 (comment))
from hxnodejs.
I'm not too sure about syncing with node.js API versions ?
It is very likely that we will need our own versionning for breaking changes, if only in case the compiler requires it ?
For now, I think it's safer to start with 0.0.1
, at least until we reach an "official" release.
from hxnodejs.
I have just switched my only NodeJS project (CastleDB) from nodejs-std to hxnodejs, it works very well. I have commit js.node.webkit package and started sys package + Sys class implementation. If anyone (@dionjwa ?) wants to contribute to complete these that would be nice.
Also, @nadako, before releasing we should decide on the library name on haxelib. If I remember correclty, @dionjwa proposed that we take over http://lib.haxe.org/p/nodejs/ instead of adding one more nodejs library. That seems like a good idea. We could also ask @eduardo-costa if we wants to contribute to hxnodejs instead of his own nodehx lib.
Let's all join efforts into one single nodejs lib !
from hxnodejs.
We that would be great!
We hxnodelibs repo now!
Em 05/09/2015 09:25, "Nicolas Cannasse" [email protected] escreveu:
I have just switched my only NodeJS project (CastleDB) from nodejs-std to
hxnodejs, it works very well. I have commit js.node.webkit package and
started sys package + Sys class implementation. If anyone (@dionjwa
https://github.com/dionjwa ?) wants to contribute to complete these
that would be nice.Also, @nadako https://github.com/nadako, before releasing we should
decide on the library name on haxelib. If I remember correclty, @dionjwa
https://github.com/dionjwa proposed that we take over
http://lib.haxe.org/p/nodejs/ instead of adding one more nodejs library.
That seems like a good idea. We could also ask @eduardo-costa
https://github.com/eduardo-costa if we wants to contribute to hxnodejs
instead of his own nodehx lib.Let's all join efforts into one single nodejs lib !
—
Reply to this email directly or view it on GitHub
#40 (comment)
.
from hxnodejs.
Yes, please use the 'nodejs' haxelib, that makes the most sense I think. Let me know who needs access and I'll add you as a contributor.
When that's in, I'll definitely help with filling in the stdlib.
from hxnodejs.
Wouldn't delay even more we closing and releasing hxnodejs?
Em 05/09/2015 12:33, "Dion Whitehead Amago" [email protected]
escreveu:
Yes, please use the 'nodejs' haxelib, that makes the most sense I think.
Let me know who needs access and I'll add you as a contributor.When that's in, I'll definitely help with filling in the stdlib.
—
Reply to this email directly or view it on GitHub
#40 (comment)
.
from hxnodejs.
Guys!
We already have the repo!
https://github.com/HaxeFoundation/hxnodelibs
I proposed days ago we merge all our work there.
My non-canon hxnodejs
modules (like mongo
or express
) @dionjwa nodejs
and other people partial work.
We should create each packages matching the npm
name, like:
js.node.mongodb
js.node.express
js.node.multiparty
js.node. ...
from hxnodejs.
ok guys
the kickoff was made!
I transferred all libs I've made so far.. obviously all of them aren't following the established pattern.. but we will steadily correct it!
https://github.com/HaxeFoundation/hxnodelibs
from hxnodejs.
@clemos @dionjwa Feel free to transfer the nodejs libs you have made externs and delete any of mine you think isn't complete enough versus your versions!
@ncannasse The sys
packages really makes sense to be added in the canon hxnodejs
haxelib. Regarding other npm libraries it is best to use this hxnodelibs
project affiliated with the HaxeFoundation.
from hxnodejs.
I like the distinction @clemos makes between e.g. 'js.node.Fs' and 'js.npm.Express'. There's a clear distinction at the package level between packages that are part of the Node.js distribution, and npm packages.
from hxnodejs.
I'm ok with that too..
Em 05/09/2015 21:50, "Dion Whitehead Amago" [email protected]
escreveu:
I like the distinction @clemos https://github.com/clemos makes between
e.g. 'js.node.Fs' and 'js.npm.Express'. There's a clear distinction at the
package level between packages that are part of the Node.js distribution,
and npm packages.—
Reply to this email directly or view it on GitHub
#40 (comment)
.
from hxnodejs.
@ncannasse I thought we've all agreed on the idea that hxnodejs (or whatever name we choose) should only contain core node.js api, so I'm not sure whether placing webkit externs there is a good decision, maybe it should be contained in our hxnodelibs repo? (also, those node-webkit externs are incomplete and undocumented unlike core node.js externs).
As for the name, to be honest anything is fine with me, but IIRC we named it hxnodejs
to be in line with hxcpp
, hxjava
and hxcs
, so I thought we'll have our nodejs based sys implementation in the std lib, but to use it, one would have to install hxnodejs
(similarly to how one installs hxcs to target C#).
Anyway, I love the fact that hxnodejs is getting some attention and sorry I'm a little distracted right now (as I'm on vacation).
from hxnodejs.
@nadako sorry for webkit, but I think it will be necessary anyway to make some specific changes in hxnodejs wrt node webkit implementation.
The reason is that in a pure NodeJS context you might want to have haxe.io.Bytes.BytesData be a NodeBuffer, so you don't have to copy from/to UInt8Array.
OTOH if you're using NWJS (node webkit) you want to keep the bytesdata as UInt8Array because of the native browser APIs which uses it (WebGL etc.)
But I'll leave the decision to you and other maintainers, if you want to keep it there or have it into hxnodelibs.
WRT the name, choose also what is the best for you, I just want to make sure that the most complete/maintained library get first results when searching on haxelib :)
from hxnodejs.
I think that NodeWebkit falls into the hxnodelibs
repo.
I cloned and started it on the weekend, so those who have new NPM libs or better ones in comparison to the ones I have, feel free to start transfering there.
from hxnodejs.
Anything new regarding the release ?
I would like to clean my repo of all the js.node part very soon...
from hxnodejs.
I don't know. I was working on updating externs to node.js 4.0.0 and it's not done yet, but I have a feeling that we'll never catch up to it, so maybe we should just make a "alpha" release and then update it with fixes/changes.
I'm still not sure what to do with the Bytes
situation (Buffer
vs Uint8Array
as @ncannasse described), maybe we could make a define flag for that, however that way we have to duplicate original Uint8Array
implementation from Haxe, which sucks. I'm still thinking whether the best way to handle it is to just move the haxe.io/sys implementation into Haxe std lib like this:
#if js
#if nodejs // or some other flag
...nodejs impl...
#else
...browser impl or error...
#end
#end
from hxnodejs.
Yeah I still think it would be cool to make a release of the current pre-node 4.0.0 version, so we can all link to it.
Also, it would certainly bring back some new attention to the project.
from hxnodejs.
On Thu, Sep 17, 2015 at 2:24 PM, Dan Korostelev [email protected]
wrote:
I'm still not sure what to do with the Bytes situation (Buffer vs
Uint8Array as @ncannasse https://github.com/ncannasse described), maybe
we could make a define flag for that, however that way we have to duplicate
original Uint8Array implementation from Haxe, which sucks.Maybe using 4.0.0 is a good idea then? There release notes (
https://nodejs.org/en/blog/release/v4.0.0/ ) say "(Node's Buffer is now
backed by Uint8Array)".
Best,
Juraj
from hxnodejs.
@back2dos ah, great news ! problem solved :) hopefully NodeWebkit will upgrade to node 4.0 soon as well
from hxnodejs.
@ncannasse Have you tried Electron btw? How does it compare to NW?
from hxnodejs.
@nadako didn't knew about it, might be better I'll give it a try one day
from hxnodejs.
Here is a comparison: https://github.com/atom/electron/blob/master/docs/development/atom-shell-vs-node-webkit.md
Franco has already written externs for electron: https://github.com/fponticelli/hxelectron
from hxnodejs.
Just remembering..
Let's focus the externs of nodejs libs in this repository https://github.com/HaxeFoundation/hxnodelibs
So we keep hxnodejs only with canon stuff
from hxnodejs.
Up ?
from hxnodejs.
I really wish to see a release. Currently using Haxe/Nodejs and js-kit lib for a professional project.
from hxnodejs.
I am currently using it a lot and good with a release.
from hxnodejs.
#42 is definitely a show stopper for a release, we can either release without haxe.io/sys packages, or find a way to fix this.
from hxnodejs.
I prefer a release first, even just 0.0.1, so that other lib can start using it
from hxnodejs.
Okay, it's on haxelib now.
from hxnodejs.
YAY!
from hxnodejs.
👍
from hxnodejs.
gg wp :)
from hxnodejs.
Related Issues (20)
- [discussion] simplify document comment HOT 3
- Update to v12 API HOT 5
- Investigate if dts2hx can be used to generate the externs
- [Feature request] Add `util.format` function HOT 1
- [Feature request] Add `fs.promises` functions
- [Feature request] Add `append` method to `sys.io.File` class HOT 1
- All `js.node.Os` methods should be static
- HTTPS requests without options generates invalid code HOT 1
- Printing the result of hxToBytes will hang the runtime HOT 2
- Sys.getChar HOT 2
- haxe.io.Bytes.getData(): BytesData != ArrayBuffer HOT 2
- implement sys.io.Process HOT 4
- it wont work? HOT 8
- [nodejs] Enhancement: Expose headers in NodeJsHttp
- Ignores `sys` conditional compilation block HOT 1
- hxnodejs does not fully implement sys.net.Socket (needed for sys.Http) HOT 3
- Migrate CI to github actions
- Change uses of @:enum abstract to get rid of deprecation warnings HOT 1
- Release to haxelib following pr #190 HOT 3
- Haxe 4.3 `@:enum abstract` is deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hxnodejs.