Skip to first unread message

giuseppe....@yahoo.it

unread,
Jul 20, 2017, 5:15:52 PM7/20/17
to Haxe
Good evening,
I am a university student in Italy. I decided to make Haxe project my main thesis argument. The only obstacle to this is that the documentation I found was mostly about how to use it, so I don't understand the internal mechanics of the project: how it compiles, what Haxe adds to the programs it compiles for each language, the history about how it was born. If there are some haxe processes or residue at runtime or if there is software in the middle. If haxe generates the executable directly or it can generate only the source code.
My thesis isn't a very in-depth thesis because it is in the middle of my course of study.
Despite that the document I'll produce could be, if well written as I'll try, an italian reference for italian people who want to know Haxe. I want to ask you if there are other documentation about how haxe works and how haxe is made. Documents about its history could be useful too.
Thanking you in advance for the time you are devoting to me and all the possible help you could give me
Sincerely,
Giuseppe Nardiello

Justin L Mills

unread,
Jul 21, 2017, 7:23:54 AM7/21/17
to giuseppe.nardiello via Haxe



On 20/07/2017 22:15, giuseppe.nardiello via Haxe wrote:
Good evening,
I am a university student in Italy. I decided to make Haxe project my main thesis argument. The only obstacle to this is that the documentation I found was mostly about how to use it, so I don't understand the internal mechanics of the project: how it compiles, what Haxe adds to the programs it compiles for each language, the history about how it was born. If there are some haxe processes or residue at runtime or if there is software in the middle. If haxe generates the executable directly or it can generate only the source code.
My thesis isn't a very in-depth thesis because it is in the,middle of my course of study.

There is some history here although more targets have since been added and there are more core members contributing.
https://haxe.org/manual/introduction-haxe-history.html

I tried to track down relevant video where Nicolas talks about history but 10 years one was nearest I could find.  As I understand it Haxe was created to target Flash, Javascript, Neko ( PHP alternative that he also wrote ). The concept was to create more consistant and language for web development rather than the mismatch he found himself using and he applied his functional Ocaml college understanding in boththe implementation and in some of the features added since then much of the compile has been rewritten to be more robust and target more languages using an AST tree.

Simn who now heads up the haxe compiler explains the AST tree here:
https://haxe.org/blog/the-journey-of-hello-world-through-the-haxe-compiler-part-1/

Core members are documented here but there are hundreds of contributors in the ecosystem surrounding Haxe.
https://haxe.org/foundation/people.html

Haxe language compiler is written in Ocaml, so you will need Ocaml language installed to build it yourself

You can find the source here:
https://github.com/HaxeFoundation/haxe

To build Haxe yourself you can use the Make file from terminal.
https://github.com/HaxeFoundation/haxe/blob/development/Makefile

Depending on the target language Haxe creates code, bytecode/script,  or binary, so it really depends.

Flash target is a SWF which is binary sometimes zipped.
Neko target is bytecode but you can use the compiler to create a binary.
C++ target create c++ code.
Cppia target generates like a script/string that is interpretted by Haxe C++ at runtime.

Really to answer all your questions you need to hang out daily on the Haxe IRC and ask questions at different times of day and you will slowly get more and more information on various aspects but it's a huge subject so you can't expect someone to provide all the answers in one go hopefully some start.  I suggest you put some time into looking through both the old and new haxe site there is a huge amount of information hidden away on them.

Despite that the document I'll produce could be, if well written as I'll try, an italian reference for italian people who want to know Haxe. I want to ask you if there are other documentation about how haxe works and how haxe is made. Documents about its history could be useful too.
Thanking you in advance for the time you are devoting to me and all the possible help you could give me
Sincerely,
Giuseppe Nardiello
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Mark Knol

unread,
Jul 21, 2017, 7:31:32 AM7/21/17
to Haxe
Hi!

"I decided to make Haxe project my main thesis argument" Nice

"how it compiles" Haxe compiles to many targets, sometimes to sourcecode sometimes to bytecode

"the history about how it was born"

"what Haxe adds to the programs it compiles for each language" This highly depends per compiler target and what the target already supports or not. In general you can say, it (aims to) add the minimum amount of code to support the Haxe language features for the target you compile to. Beside that there is the Haxe Standard Library, which is code that works on all targets. This sometimes adds bit more code than you expect for that certain target, but that is to make Haxe code usable over multiple targets. If you look at the javascript target, not much additional code is added. https://try.haxe.org/#246cD
Some other targets c++ work with a support library (so called haxelib) named "hxcpp" which generate headers, libraries and support code (garbage collector) required to generate a fully compiled executable from sourcecode Haxe generates.

"how haxe works" Very good ;)
From a developer perspective, look at the manual, api docs or cookbook.

"How haxe is made" If you look for history, see above. If you want to know with which code language to create the compiler: ocaml. But Haxe is more than a compiler, it consists of several tools and many libraries. If you want to know by who, Haxe is a opensource project maintained by many people from the community but there is also a core team; Find all tools and sources on Github: https://github.com/HaxeFoundation

Hope this helps a bit

giuseppe....@yahoo.it

unread,
Aug 30, 2017, 3:33:07 PM8/30/17
to Haxe
Hi,
thanks to all for answers. I want to ask you if there are additional docs about the compiler's architecture. Can anyone help me?
Thanks again
Giuseppe Nardiello

Marcelo de Moraes Serpa

unread,
Aug 30, 2017, 5:48:00 PM8/30/17
to haxe...@googlegroups.com
thanks to all for answers. I want to ask you if there are additional docs about the compiler's architecture. Can anyone help me?

I don't think so but that'd be pretty nice to have indeed. I guess right now the only way is to read the source code and try to understand it in a trial-and-error basis and by reading comments. Someone from the compiler team please correct me if I'm wrong.

--
Reply all
Reply to author
Forward
0 new messages