Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Kevin Leung
@kevinresol
Oh well yeah bills are real
But I think experienced compiler devs are scarce anyway. So maybe still worth a talk with the HF
Rudy Ges
@kLabz
I wouldn't mind following a proper compiler dev formation
Kevin Leung
@kevinresol
Let me bring this up (softly) in the haxe-dev 😜
Rudy Ges
@kLabz
:ok_hand: :laughing:
Kevin Leung
@kevinresol
(it feels so weird waking up at 4am thinking of Haxe stuff, I deserve a better dream I guess... Cya...)
Rudy Ges
@kLabz
(good night :x)
(and thanks!)
Thomas J. Webb
@thomasjwebb
I’ll contribute to this crowdfund and if it happens, I’ll gladly fix the issues with the python target.
Gabriel Hayes
@piboistudios
:) Haxe can hire me. Rather work on a compiler than figure out why 4Gl and PowerBuilder apps aren't playing ball.
Gabriel Hayes
@piboistudios
Does Haxe perform all the compiler optimizations on the generated code only or also to the IR?
Gabriel Hayes
@piboistudios

hxgenpe so far.

Right now, it is just a quick test that generates a "Hello, World!" executable assembly using Mono's Ilasm sources (converted into a class library), but this is what it looks like to hook directly into the Ilasm CodeGen API

Gabriel Hayes
@piboistudios
image.png
(The generated assembly in dotPeek)
Gene Pavlovsky
@gene-pavlovsky
Hey guys. Have you ever had a problem with haxe JsonParser throwing "Uncaught exception Invalid char 123 at position 337", but when you trace the input, then copy-paste it from the log file into a JSON validator, the JSON is actually valid? Somehow it happens on some of our CI servers but not the others, according to the log the input to Json.parse is exactly the same (same MD5). Running on haxe 4.1.5, eval target (within a build macro)
Peter Achberger
@Antriel
Maybe encoding playing a role?
Rudy Ges
@kLabz
It will be hard to help without the json part that fails on haxe =/
Gene Pavlovsky
@gene-pavlovsky
It turned out that the node process that generates the output sometimes was polluting stdout with some logging... Works after directing logs to stderr
Axel Huizinga
@axelhuizinga
I have a problem with a copied source directory in vscode the libs in the local .haxelib folder don't show up under Haxe Dependencies and the related libs imports within the code are underlined red as Type not found however the app compiles and runs as usual !? Any ideas how to tell vscode where to find .haxelib?
Nycole Xavier
@nycolexavier
3 replies
Thomas J. Webb
@thomasjwebb
How are you running the build? Are you sure it’s building for js and not another target?
Rudy Ges
@kLabz
And if it's running for another target, how the hell does it end up with js-specific stringmap? :x
Nycole Xavier
@nycolexavier

How are you running the build? Are you sure it’s building for js and not another target?

how can I do this?

Thomas J. Webb
@thomasjwebb
Are you building on the command line or using a gui? If you run haxe manually, the -js argument builds for js. But if you’re doing something like “openfl build mac” then it will use the hxcpp target.
Gene Pavlovsky
@gene-pavlovsky
Looks like the single pattern check v.match(...) doesn't work for enum abstract types, is that right?
Thomas J. Webb
@thomasjwebb
That sounds right. Some things you can’t do because there’s no guarantee the value is one of your defined values.
Like when I do switch statements I have to always have a default iirc
Gene Pavlovsky
@gene-pavlovsky
Heh, it's a pity. We switched a lot of our Enums to enum abstract(Int) to reduce generated code size, but turns out some things are more comfortable with classic Enums
Kevin Leung
@kevinresol
It would be quite simple to add a macro to support that
serjek
@serjek
why macro
static function match<T>(a:T, b:T):Bool
    return a == b;
ah well for matching multiple values yes, a simple macro
serjek
@serjek
@gene-pavlovsky we can add this to our codebase. I know using context.parse is not classy but hey, it works.
https://try.haxe.org/#993107ed
Kevin Leung
@kevinresol
or you can just pass it to a switch case directly:
https://try.haxe.org/#9195cc75
public static macro function match(e:Expr, v:Expr) {
  return macro switch ($e) {
    case $v: true;
    case _: false;
  }
}
serjek
@serjek
lovely
PtrMan
@PtrMan
I got a problem: I am trying to write a TCP server and get a exception Unix.Unix_error Unix.Unix_error(56, "recv", "") when ever a client disconnects
I am trying to catch the exception to handle the error but when catch(e: Unix.Unix_error) it doesn't compile because it can't find the namespace/class of the exception
so how to catch and handle it?
ah yes I am on windows
Emugel
@emugel
catch (e) will catch everything. To locate the namespace (or I should say package) I would just look for a file called Unix.hx in the computer and look at the first line beginning with package xxx.
Then you can use this name
PtrMan
@PtrMan
i can find the string online in the binary of haxe, because I am using --interp
I'll try catch (e) :)
I can't catch the exception :(
PtrMan
@PtrMan
in --interp
looks like a bug to me, because with --jvm traget I can catch something
Emugel
@emugel
Since you are dealing with a server, I suspect the uncaught exception has to do with the presence or absence of threads. Unfortunately I don't really know the interp target.
PtrMan
@PtrMan
yes I am using threads too, thanks for your help anyways
Emugel
@emugel
on cpp target if a thread is launched, a try/catch on the main process won't catch anything thrown from that thread. Anyway hopefully you will find or someone else helps :)
senthilattivo
@senthilattivo
I want to add one of the native(android) activity on top of lime, is any one explore on this ?
pecheny
@pecheny
@senthilattivo Android project is based on template located in lime/templates/android. It can be overridden in your project (template tag in the project file iirc). For interop you can look at externs. Also you can find something useful in native extension like https://github.com/HaxeExtension