Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Peter Achberger
@Antriel
Still, it must actually extend something. With macro stuff and externs it's a bit more complex.
Kevin Leung
@kevinresol
Autobuild does change the the inheritance (extended class and implemented interface) unless you explicitly change them in the macro
Correction: I don't think you can change them at all. Build macro can only modify the fields
serjek
@serjek
another question: how do I use generic type function with @:generic class (if this even possible)? https://try.haxe.org/#7cC0F - this one does not compile, but works just fine if @:generic is removed.
serjek
@serjek
heh duck typing seem to compile though: https://try.haxe.org/#75F3b
Peter Achberger
@Antriel
That comes down to generic class being different from a class with a type parameter.
So it won't work because they're simply different classes. And the function is bound at runtime, not compile time like the generic class.
Fix is either to use structural subtyping or interfaces.
serjek
@serjek
not much I can do as this is an external lib (colyseus) and I want to convert ArraySchema and MapSchema to ObservableArray/Map from tink.state
Peter Achberger
@Antriel
That might be difficult.
serjek
@serjek
serjek
@serjek
perhaps this better be done with build macro that is applied to root schema and deeper, perhaps I will do that later
matrixbot
@matrixbot
Kočyš Mikajlo Hello! I have maybe a dumb question about Webpack Haxe Loader. How do they split whole packages? I tried to modify the graph but it resulted in some classes remain in the main bundle, some in the usage bundle and very few in the bundle I need (basically the ones with underscore).
Gabriel Hayes
@piboistudios
@serjek For colyseus-hx, it seems like I need to run schema-codegen for it to work.. any way I can get a haxe schema from a haxe server (using colyseus-hxjs)?
serjek
@serjek
hey I think for server you declare your schemas and then you can either copy them to your client and fix decoration a little bit, or after some hxjs modification you can even use same files.
main difference there is that server externs use constants in meta and client uses plain strings (which I personally do not like but Endel wants to keep it this way for consistency with other clients)
Gabriel Hayes
@piboistudios
Alright thanks, I'll give it a shot
Ah I don't think that'll work. Including colyseus-hxjs in client-side requires node.js and client is built for HTML5
serjek
@serjek
well yeah, but it should not be a big deal to unify both libs so that they could use same schema files. tbh I was never bothered with this as for my project modifying them manually is quite enough
hxjs has a hard dependency on nodejs because it's an extern for nodejs project after all. may be it can be decoupled but I don't see much profit in this :D
BeboBBM
@BeboBBM
Hello guys
Can we specify our own GC in Hashlink?
Kevin Leung
@kevinresol
I think you will have to contribute to the hashlink sources
in that sense, yes
BeboBBM
@BeboBBM
Yea but, I don't know ocaml
Kevin Leung
@kevinresol
it is c
BeboBBM
@BeboBBM
Can we use c?
Kevin Leung
@kevinresol
hashlink is written in c
BeboBBM
@BeboBBM
Oh that good thanks
I thought is written in ocaml like haxe
Emugel
@emugel
with hxcpp, there is in C a typedef struct foo_state { unsigned char k[32]; unsigned char n[24]; unsigned char _pad[8] } foo_state. I want to instantiate one such struc in haxe, because a function I must call in C is like f(foo_state *st) (it will fill one such structure). How can I do it? Looking at haxe cpp package I think maybe I should use Struct.hx but I don't know how to use it
or maybe I should just prepare a byte with the proper length and pass it, as I don't really need to access the field in haxe, I just need this as 'state' for various function calls. But anyway I'm still curious about the proper way to do it as in my first message :)
Juraj Kirchheim
@back2dos
there's @:structAccess ... creating such a struct will require an additional C function ... it's detailed in this thread: https://groups.google.com/g/haxelang/c/CwoKx7ODURI/m/KI8-IagzCwAJ
Emugel
@emugel
thanks juraj, will study this with my coffee
BeboBBM
@BeboBBM
When will the time come to write haxe in haxe guys
Kevin Leung
@kevinresol
someone has to work on it
BeboBBM
@BeboBBM
I have. Net Core 3.1, can some one tell me how to target this version
Rudy Ges
@kLabz
I generate c# sources and then compile with dotnet cli
I started a proper tool last year but didn't finish and current setup works so hard to find time for it
BeboBBM
@BeboBBM
i can't compile the c# code using dotnet cli
Rudy Ges
@kLabz
Why?
BeboBBM
@BeboBBM
I fixed it :) thx bro
Axel Huizinga
@axelhuizinga
How is the best way to check for an empty Map - a Map without any keys ?
Rudy Ges
@kLabz
Which way is the best may depend on the target, but there's !map.keys().hasNext() / Lambda.empty(map) (which does exactly the same but on values)
Axel Huizinga
@axelhuizinga
thx
Frank F. Hirsch
@0ffh
Hi, I'm very new. I just installed haxe, haxeui and various dependencies.
I want to test the haxeui component-examples.
When I run "haxelib run haxeui-core test flixel" (in example "buttons") I get "Invalid field access : execute".
Any ideas what the problem might be?
Philippe
@elsassph
@0ffh you might want to ask in the haxe-ui chat https://gitter.im/haxeui/general
or in the Haxe Discord
(discord is the most active)