[Showcase] Externs in haxe language #366
Replies: 19 comments
-
Someone just posted benchmarks to your library and it shows less than 40k req/sec? Pretty slow. I'd recommend using Javascript with uWS.js or C with uWS instead of messing with this Haxe thing |
Beta Was this translation helpful? Give feedback.
-
I have no idea what haxe or externs is and it looks to be quite obscure. Unless haxe is number two most popular thing in the world there is no value in it. |
Beta Was this translation helpful? Give feedback.
-
My point is uWebSockets.js is because nodejs is incredibly popular, not because I have any specific love for nodejs (I kind of hate it). |
Beta Was this translation helpful? Give feedback.
-
Haxe generated js in most cases is the same speed as I would write it by hand but I have strong typed and many useful features. The benchmark is just about uWS.js speed)))
Thank you I don't think js or c are suitable for me. Keep that crooked languages with yourself if you like |
Beta Was this translation helpful? Give feedback.
-
So it is like TypeScript or Flow? Okay, but I don't see the relevance here.
Opinions aside, the reality is that C and JS are two of the most popular languages by far in this whole industry, so either you cry in a corner how twisted reality is or you go with the flow. I would like JS to burn in hell, but I kind of have to deal with it. |
Beta Was this translation helpful? Give feedback.
-
There is another way: for performance critical thing I can choose for example C but for business logic I prefer well-designed languages. Haxe allowes me to do that way) @alexhultman I don't want any holy wars. I just want to thank the lib authors for the really well made thing. |
Beta Was this translation helpful? Give feedback.
-
Alright 👍 |
Beta Was this translation helpful? Give feedback.
-
@hst-m As expected no difference in speed between haxe and pure js djaonourside/uwebsockets-externs#1 (comment) |
Beta Was this translation helpful? Give feedback.
-
Ah! I understand. I looked in your src folder and okay I get it. You have essentially made what in TypeScript is called definitions. Aka you have specified the static interfaces in these .hx files. Okay, well yes then the performance should be identical because you are still using the same very V8 binding. There is no difference. Problem is nobody is using Haxxe, so again it has kind of only niche value |
Beta Was this translation helpful? Give feedback.
-
I think these definitions are well written and nicely made, but again Haxe is entirely foreign and nobody is using it.
So the reality of the situation is that it has no value for this project. |
Beta Was this translation helpful? Give feedback.
-
@alexhultman Unfortunately that's true haxe languages is not popular despite of its well-done design and features( I think even better than java in many cases). Unlike typescript it can be compiled not only into js but also into cpp(and many other platforms). I'll try to write cpp externs of your lib and share with you a performance test result if you wouldn't mind. |
Beta Was this translation helpful? Give feedback.
-
Languages aren't supposed to be perfect. All languages have strange legacy quirks. Look at Swedish - it is the most nonsensical Viking legacy of a language and has roots in basically all of Europe and even parts of Asia. It makes no sense in most cases, and it has more exceptions than rules. But many people speak it so it has value. This is also why an ancient language like C is still the most important language of computing - because millions of people speak it and it runs in every single device ever created. |
Beta Was this translation helpful? Give feedback.
-
Ok I suppose it's a long time dispute. It's cool both of us has instrument/interface he likes. My message was just about opportunity for interaction between different interfaces:) |
Beta Was this translation helpful? Give feedback.
-
@djaonourside he needs to do better benchmarks, they are low because he is using |
Beta Was this translation helpful? Give feedback.
-
@hst-m It's a separate discussion why big and easily maintainable projects with a reach business logic shouldn't be written in pure javascript or c. I agree that c lang is most suitable for low level infrastructural projects like this one. Popularity is not any argument for me. Vice versa all the unique and beautiful things are(were) created by the significant minority of people who are unknown for majority. All the low-grade bullshit is about majority and mainstream. Do you know the name of antibiotic inventor? But probably you do know well hits of Lady Gaga or shit like that. After all I see no reason why serious people should count copy pasted js github repos. Quantity will not become quality. |
Beta Was this translation helpful? Give feedback.
-
if you are like me doing full stack apps JS is the best and only choice, vanilla JS for complex single page browser apps for mobile and desktop, JS for server coding, database coding (mongodb) and the large ecosystem with every library you could want, and the language has matured nicely with needed features added |
Beta Was this translation helpful? Give feedback.
-
Not only and not best. I have the full access to all js infrastructure with haxe(the externs I showed above is illustrating it). And also I have access to cpp, c#, java, jvm, python, lua infrastructure only with one well-designed strictly typed language with smart compiler with macro support(meta programming). Js is not well-designed with its raw dynamics and f*cking implicit type transformations that look like an endless source of shooting in the self foot. Js badly approaches complicated projects. #-sign for private fields - are you serious? And it's not legacy it's modern thing invented by loads of Dan Abramov's adepts. When I see first time the simplest js code |
Beta Was this translation helpful? Give feedback.
-
the things you consider negative I consider positive, like everything else the quality of the code depends on who wrote it, 90% of JS is probably coded badly and looks like spaghetti mess. You mention Dan Abramov of react so this is probably why you have bad impression, react.js is bad adds unnecessary black box layer of code that only overcomplicates everything and slows it down. So you must not do any front-end browser coding otherwise you'd be using JS and not trying to compile to it, so you have different use case. Anyone doing browser coding will want to use JS in browser and being able to use on server is a plus |
Beta Was this translation helpful? Give feedback.
-
Whatever floats your boat(s) |
Beta Was this translation helpful? Give feedback.
-
Hello! Just want to share externs of uWebSockets.js in haxe language https://github.com/djaonourside/uwebsockets-externs. Haxe can also compile to cpp and hashlink(haxe virtual machine) and it's possible to have the same code of using uWebSockets for node.js and native target. Native uWebSockets externs are not ready(I am not a native developer and need help in this direction ). It would be nice you add section "other languages" in readme and notice about the extern lib. Feel free to close the issue after reading:) Thank you for your library.
Beta Was this translation helpful? Give feedback.
All reactions