Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Juraj Kirchheim
@back2dos
anyway, if it's working, why break it ^^
Ben
@benmerckx
Is there a way to provide completion to a @:op(a.b) macro function ... on an abstract?
Ties Baltissen
@Skudoku
Heyo, anyone that has managed to make a cross platform library with Haxe that uses some kind of Serial class just like Python and other languages have?
Kevin Leung
@kevinresol
Sylvio Sell
@maitag
i've had some really fun with try.haxe today+tonight (outside of -> any .)
1) https://try.haxe.org/program/D3BaCb79/run?r=0.8646075256461726
2) https://try.haxe.org/#c1bF652A
3) https://try.haxe.org/#28a182C2
(^_^)
Ties Baltissen
@Skudoku
@maitag yoo, thats cool!
@tong thanks!, need as many platforms as possible :D
Ties Baltissen
@Skudoku
So what are your editors of choice? I am having a hard time confirming imports and using said imports in Visual Studio Code. I am never certain that my imports and code works if I were to run it.
Ben
@benmerckx
Anyone know of a way to close constrained monomorphs in haxe? (eg. go from Unknown<0> : { field : String } to { field: String })
Peter Achberger
@Antriel
A type check should do: (foo:{field:String}).
Ben
@benmerckx
To be more specific, I don't have the type available. I'd like to have a function merge<A: {}, B: {}, C: B & A>(a: A, b: B): C {...}to return an anonymous type instead of a constrained monomorph somehow. Or, if that is impossible have a way to definitively close monomorph C before using it.
Peter Achberger
@Antriel
Hm, isn't the result already closed?
Kevin Leung
@kevinresol
is that related :point_up: ?
Peter Achberger
@Antriel
Interesting.
Ben
@benmerckx
Yeah, since that was fixed it is possible to express it in the type system. However, monomorphs do not seem the easiest to work with afterwards since: IDE support is not perfect (hovering shows a question mark instead of the type) and it is useless to macro code (can't do much with a TMono in tink.Anon for example).
Kevin Leung
@kevinresol
oh well, yeaaaaaaaaah,
but looks like you got a solution?
Ben
@benmerckx
A hacky one, was wondering if there's a proper way :)
serjek
@serjek
haxe.macro.Position has no field file - why is that?
ah need to use getInfos(). nvm then
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
Ciau
Axel Huizinga
@axelhuizinga
which settings enable me to see a call to an @:autoBuild function? where is the output of trace printed there
Axel Huizinga
@axelhuizinga
how can I get rid of this error message?
WARNING in ./build.hxml
Module Warning (from ./node_modules/haxe-loader/index.js):
/opt/src/DevTest/client/.haxelib/js-object/0,0,7/src/js/Object.hx:160: characters 18-20 : Warning : Using "is" as an identifier is deprecated
Error: /opt/src/DevTest/client/.haxelib/js-object/0,0,7/src/js/Object.hx:160: characters 18-20 : Warning : Using "is" as an identifier is deprecated
at /opt/src/DevTest/client/node_modules/haxe-loader/index.js:58:29
Kevin Leung
@kevinresol
-D no-deprecation-warnings
Ties Baltissen
@Skudoku
Is there a byte datatype in Haxe? I know of Bytes. and when you use Bytes.get(index) it returns an int, can I assume in that way that Haxe uses just Int for a single byte?
Jonas Sonn Jørgensen
@JonasSonn
Hi @ShalokShalom,
Woops, continued: do you know the purpose of @pure? I'm trying to find out what it means when you say a function is side effect free
Short answer... uh..
A function that do not modify anything when called, nor interact with the outside.

Pure functions closely resemble mathematical functions: they do nothing other than compute an output value based on their input values.

Not bad x)

pecheny
@pecheny
@Skudoku Haxe is multitarget language so common types should be available on the all platforms. So it depends on platform(s) you are targeting. For example if you are targeting js – there is no byte type here, only Number. It can't be helped in haxe. For targets with byte type like cpp, cs and java you can look for Int8 in the appropriate package i.e. cs.Int8 for c#.
Ties Baltissen
@Skudoku
Ahh gotcha, so for anything that I will be using byte for I should look for target specific usages that might need to handle that datatype
pecheny
@pecheny
If you don't mind memory usage you can use just Int. It would be like 32 bit but available to read/write with Bytes.
I may be wrong but i think so.
Ties Baltissen
@Skudoku
Hmm alrighty, another question. I have found some info on generics and interfaces and such, but I have a specific case which I am not sure about how to deal with that.
public interface SomethingPipe<T> where T : Something how does one go about making this in Haxe.
Peter Achberger
@Antriel
interface SomethingPipe<T:Something>
Ties Baltissen
@Skudoku
Ah thanks!
Couldnt come up with the term that is type parameter
serjek
@serjek
hey guys did anyone already implement externs for react-native-iap or something alike to handle in app purchases in haxe react? I looked through haxe-react group but found only externs for some outdated libs that were last updated 6-7 years ago. so I wonder, perhaps you have something but forgot to share it?
Juraj Kirchheim
@back2dos
these days dts2hx does a pretty fine job ;)
serjek
@serjek
ah well, saved this for last resort