https://linen.dev logo
Join Discord
Powered by
# haxe
  • b

    bitter-family-72722

    03/15/2020, 11:05 AM
    > Math.pow( v ) seems quite clunky hence my suggestion to use
    v.pow()
    which is a nice compromise 😛
  • b

    brainy-machine-50829

    03/15/2020, 11:05 AM
    And that's ^ not a valid syntax I guess.
  • b

    brainy-machine-50829

    03/15/2020, 11:05 AM
    So something along those lines.
  • o

    orange-van-60470

    03/15/2020, 11:07 AM
    I think it would be interesting to engage with some maths professors and see if Haxe math support could be improved, I feel haxe is ideal for education being so versitile but the science and maths support is fairly minimal, abstracts can help but they can be a bit hit and miss.
  • o

    orange-van-60470

    03/15/2020, 11:09 AM
    ah first click on julia examples has
    z^2
    so it is fairly standard for modern math code.
  • o

    orange-van-60470

    03/15/2020, 11:11 AM
    I guess I would also love
    |v|
    for Math.abs
  • o

    orange-van-60470

    03/15/2020, 11:11 AM
    but that I imagine would be really hard to implement anyway
  • o

    orange-van-60470

    03/15/2020, 11:15 AM
    Anyway if someone does have macro for
    |v|
    and
    v^2
    I would be really curious, I may actually take another look at macros, rather than mostly avoid them 🙂
  • b

    bitter-family-72722

    03/15/2020, 11:25 AM
    you can't do
    |v|
    , it's not valid syntax
  • b

    bitter-family-72722

    03/15/2020, 11:25 AM
    v^2
    would work, since it's an existing operator, but it would be messy, since it already has a meaning for integers
  • o

    orange-van-60470

    03/15/2020, 12:18 PM
    could ** be added as an operator since ... I think maybe one?
  • o

    orange-van-60470

    03/15/2020, 12:20 PM
    I think it would be nice to add ** as Math.pow alternate, I know it's mostly icing but it seems cleaner.
  • o

    orange-van-60470

    03/15/2020, 12:20 PM
    ...
    is an operator already
  • o

    orange-van-60470

    03/15/2020, 12:20 PM
    so
    **
    should be feasible?
  • o

    orange-van-60470

    03/15/2020, 12:22 PM
    I guess you could code conceptually to allow mix operators of up to 3 eg:
    *.-
  • o

    orange-van-60470

    03/15/2020, 12:23 PM
    so
    +-
    could be used etc...
  • o

    orange-van-60470

    03/15/2020, 12:23 PM
    developers could then have quite a few combinations that could be used for various operators.
  • o

    orange-van-60470

    03/15/2020, 12:24 PM
    currently
    >==
    might have a meaning but it would be a special case
  • o

    orange-van-60470

    03/15/2020, 12:25 PM
    if you opened up combinations perhaps code would be more flexible
  • b

    bitter-family-72722

    03/15/2020, 12:26 PM
    seems pretty messy
  • o

    orange-van-60470

    03/15/2020, 12:28 PM
    well I can imagine you may want `' special operator for some abstract maths, I think that currently the assumptions limit the possible use cases too tightly.
  • o

    orange-van-60470

    03/15/2020, 12:29 PM
    <=>
  • o

    orange-van-60470

    03/15/2020, 12:30 PM
    also the number of permutations is quite high so you can support richer interactions.
  • o

    orange-van-60470

    03/15/2020, 12:31 PM
    there are for instance quite a few cross product definitions for a 3x3 matrix I think, you could quite easily use permutations to provide more than one.
  • o

    orange-van-60470

    03/15/2020, 12:32 PM
    perhaps it's too hard and too flexible.
  • b

    bitter-family-72722

    03/15/2020, 12:39 PM
    I'm not sure I'd want that
  • b

    bland-petabyte-41289

    03/15/2020, 12:46 PM
    anyone knows how to target haxelib to specific language only? I am making some sort of extern classes for one framework which is written in Lua and I want one function to return lua.Table but I get an error: "You cannot access lua package while targeting cross".
  • o

    orange-van-60470

    03/15/2020, 12:50 PM
    in your compile.hxml you define lua as the target
  • o

    orange-van-60470

    03/15/2020, 12:50 PM
    in your haxelib.json you put python not cross
  • b

    bland-petabyte-41289

    03/15/2020, 12:50 PM
    Copy code
    json
    {
      "name": "mtasa-haxe-types",
      "license": "MIT",
      "tags": ["mta", "gta"],
      "description": "Multi Theft Auto San Andreas variables and classes types",
      "version": "0.0.1",
      "classPath": "mtasa/",
      "releasenote": "Still WIP",
      "contributors": ["Piorun"]
    }
12345...6261Latest