Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Sylvio Sell
@maitag
is there no better things to do *lol (^_^)
thx to hx all is superportable now .)
Thomas J. Webb
@thomasjwebb
This thing I'm working on for a client would be way better off if they made it in haxe from the get-go ;)
Sylvio Sell
@maitag
you think to much for your "clients" Thomas!
sometimes it is time to code also some stuff you are need (all is NEED!)
ShalokShalom
@ShalokShalom
Hi there. I just spend 15 minutes, searching for @pure in the documentation, and the build-in search has shown me nothing and I think this could be improved. Also consider adding this to the documentation about functions itself.
Here is it, currently pretty hidden for the value it provides, imho: https://haxe.org/manual/cr-metadata.html
And this is one of the many places, I find it appropriate to be added: https://code.haxe.org/category/beginner/declare-functions.html
Thomas J. Webb
@thomasjwebb
That's a cool feature
I think it was added recently?
Juraj Kirchheim
@back2dos
purity and the corresponding metadata which the compiler adds in a later pass it was added in 3.4 in late 2016 ^^
it is more of an internal detail of the analyzer, although it's indeed quite useful when creating externs, where the compiler cannot infer purity due to lacking implementation
Thomas J. Webb
@thomasjwebb
aah ok
ShalokShalom
@ShalokShalom
Or you can use it pretty much all over your code, to avoid unwanted side-effects. xD

it's indeed quite useful when creating externs, where the compiler cannot infer purity due to lacking implementation

How do you mean "infer purity"? Since when can Haxe infer purity and what does this mean?

Juraj Kirchheim
@back2dos
since 3.4 added in late 2016 ^^
and no, you shouldn't add it all over your code, unless you're sure it's safe for the compiler to remove it
Thomas J. Webb
@thomasjwebb
It would be awesome if there was a macro that enforced lack of side-effects but haxe can't know enough at that stage (or ever, as the case may be) to do such an enforcement. It's unfortunately just an assertion of purity. But you can always make your own functional haxe dsl that directly targets other languages? (very non-trivial)
ShalokShalom
@ShalokShalom
Assertion of purity?
Either its pure or not.
Thomas J. Webb
@thomasjwebb
But haxe can't know unless you tell it.
ROYAL
@ROYALEPRO
lol
William Song
@Freakwill
hey
bkilm
@bkil:matrix.org
[m]
hi
Tim
@Timmmm
Hi, I'm trying to add a new target to Haxe (TCL; yeah I know). I'm making progress but when I run haxe compile-tcl.hxml to try to compile the unit tests it says D:\workspace\haxe\std/Std.hx:23: characters 8-88 : Please don't add haxe/std to your classpath, instead set HAXE_STD_PATH env var. However haxe compile-lua.hxml works fine. I can't figure out where the difference is. Any guesses as to where I might have gone wrong?
Tim
@Timmmm
Ah I figured it out. You have to provide a custom Std.hx implementation - it finds it automatically, e.g. for me I needed std\tcl\_std\Std.hx.
bkilm
@bkil:matrix.org
[m]
Anybody want to work on a Perl target? It's also common on ("static") web hosting, and it might resemble PHP enough to make porting (or even dual targeting) work bearable.
David
@fayten:matrix.org
[m]
@Timmmm: I'm curious about the tcl target you're building, what are your use case plans?
I fondly remember playing around with tk and starkits. You reminded me that zipkits were the next big thing and it looks like it was released back in 2020! Looks like quadcode kind of died off though. :/
bkilm
@bkil:matrix.org
[m]
:point_up: Edit: Anybody wants to work on a Perl target? It's also common on ("static") web hosting, and it might resemble PHP enough to make porting (or even dual targeting) work bearable.
I played around with the Erlang binding of Tk way back and it was entertaining.
David
@fayten:matrix.org
[m]
https://github.com/TkinterEP/ttkthemes is a nice library of themes too, you can use em with any embedded tcl/tk interpreter too.