#go2hx

1 messages · Page 2 of 1

livid bane
#

Okay maybe it's a little too technical, I'm writing up take 2 real quick

#
  1. Look at the website for working stdlibs.
  2. Follow the go2hx library install instructions above.
  3. Add -lib go2hx to your hxml for openfl/haxeflixel users <haxelib name="go2hx" />
  4. prefix path to the stdlibs with stdgo
  5. Import for example unicode/utf8 import stdgo.unicode.utf8.Utf8
  6. Use function Utf8.runeCount
#

I'll add it to the readme shortly

livid bane
#

in the readme now

livid bane
#

I found out a trick today

#

you can see all of the go stdlibs by running

go list std
#

277 total
19 vendored (3rd party support libs that the stdlib uses)
99 internal (not userfacing)
3 syscall (lowlevel pkg that os uses)
8 runtime (interface with the go runtime)
13 go (for use to print and parse go code)

total: 135

silent wasp
#

What will the try.haxe integration do?

livid bane
cinder sierra
#

imo at that point you should just make your own playground

livid bane
#

Based on that document, I'd say we are in between Q1 and Q2.

  • ✅︎ Go test suite easy (no stdlib imports) 100% passing
    (if all goes well by next week) go2hx early alpha release
  • ✅︎ (19 so basically yes) 20+ stdlibs passing
  • go2hx.github.io 3rd party library search. No but the stdlibs are searchable and provide lots of information
    ❌ Bootstrapping the compiler (not a priorirty at the moment, really cool and cool to if it was pulled off, but the stdlibs for parsing go code, is not the same as the libs I want to release, and releasing takes precedence)
    ❌ Using go libraries in the compiler

If you guys are interested I could write a plan for 2025, it would be much more humble then last years but with a high chance of actually hitting the markers. I'd also not write plans after 3-6 months, because it's just too unpredictable

livid bane
#

I'm interested in ideas though, my current mindset now is if I get the compiler stable enough to pump out libraries all the other glamor is not as useful

#

at the same time I also want to grow a community around go2hx, so effort on that end for users to be interested, testing and giving feedback is worthwhile

livid bane
#

[showcase] the docs are coming! Does the style looks good?

stiff estuary
livid bane
cerulean hornet
#

I read showcase

#

Any reason that image/color is supported before other parts?

#

It's rlly cool tho :D

cerulean hornet
livid bane
cerulean hornet
#

Niceeee

livid bane
#

The order is mainly due to complexity and focus I have on prioritizing certain fixes over others, I didn't intentially get image/color working, it just so happened I was trying to get reflect.Value.call working for some other tests and it passed image/color by coicidence :,)

cerulean hornet
#

Ah its the domino's effect we were talking about 4 days ago

#

Niceeee

livid bane
#

Indeed :,) the hope is that is will fall faster and faster now

cerulean hornet
#

Why does so much rely on reflection though?

cerulean hornet
#

cgo will probably be a really substantial one

livid bane
#

it's a big part of testing, the reflection features in go are really powerful, and they allow the creation of lots of heavy testing

livid bane
cerulean hornet
#

Ahh

#

Also did you manage to fix the git repo

livid bane
#

most libs don't use cgo,, if cgo worked perfectly it'd increase the amount of translatable library by 10 thousand plus, but those libs also use unsafe and may have other issues. If someone wants to try and pull off cgo I will be fully down to support it, but it's not the priority atm for me

livid bane
cerulean hornet
#

Let's hope it works now

livid bane
#

The fix is that I wasn't deleting everything from stdgo completly when rebuilding, so it was leaving previous files in that should've been removed

#

so build-js is not working yet, which is causing the stdgo regeneration to skip, so I can't see yet

#

once build-js works again I should be able to tell... that's my number prio to have working tonight

#

here is what it's hanging on

wheat fox
#

go to hx

livid bane
# wheat fox go to hx

Yes, what can I take for your order? The special today is text/scanner with a side of image/color

blazing heath
#

Your your graphic is a bit unclear

#

37 193 what is this meant to represent 😄

livid bane
#

How about this?

#

I get the data from this ^

#

Or maybe this is more clear?

#

I'd like to publish in a clear way that X stdlib now passes all of its tests and should be able to be used now for projects if interested. Still unsure how to represent it, my plan was just to try out a few designs and get feedback and see what works the best

blazing heath
#

probably thousand

#

just read it wrong at first

livid bane
#

and thought I'd put a space and it'd be obvious but it's not 😂 I'll do a comma then

livid bane
blazing heath
#

lol good

#

it was only cause I read it when I woke up

#

wasn't something that I was used to

livid bane
#

Yeah fair enough

blazing heath
#

lol

#

realised i use the ctrl shift o shortcut so much that i've just rebinded to f4

#

actually i'll rebind it to ctrl o, who cares about opening files that much 🤣

livid bane
livid bane
#

this is a test that works fine except on interp, and I don't know why

cerulean hornet
#

ah basically a segfault

livid bane
livid bane
#

CI is green again!

cerulean hornet
#

yayyyy

viscid harness
#

🎉

livid bane
#

So name collisions have been fixed

#

Reverted the import initializer for stdlibs, that was causing runaway import graphs, I'm hoping with this change and a few others I'll get regexp2 working.

#

On top of that created a separate branch for new rewrite of go channels for the lzma compression library to get that working

#

Plan is to get these both working by Monday or Tuesday and then start semantic versioning for all 3 repos:

go2hx/go2hx
go2hx/regexp2
go2hx/lzma

cerulean hornet
#

cant wait for lzma

#

looking real good man

#

very hyped

livid bane
#

go2hx use cases as I see it for Haxe ecosystem.

  1. Library does not exist in Haxe but does in Go
  2. Library exists in Haxe but it's old or target depedent and in Go it's not.
  3. Library exists in Haxe but it's platform specific (regexp, math, etc) and for go2hx it would be the same across targets.
  4. Library exists but it's buggy and not reliable, Go version is well tested and not buggy.

Cases against go2hx (to be objective about it)

  1. Might be too slow for performance critical libraries
  2. Code generation may be too big (mostly for js)
  3. Not easy to work with such as if the library uses encoding/json in go but you want to use haxe's Json
  4. Limited Go knowledge if there is an issue (specifically with the go2hx extern system)
  5. A given library simply does not work (because of all sorts of factors)
  6. Uses macros for reflection type data, don't want extra build time.
  7. Do not want longer compile times (2 to 5 seconds)
  8. Too complex for a given project needs (this is because of the compile times, big code gen, slow speeds, and/or not easy to work with.)
livid bane
#

New channel rewrite that I started to get lzma working with @cerulean hornet is now pushed into master

#

Trying to get all cases of GoKey maps working, need to change entire functionality of a basic type so that it can work with a key... But once that's resolved I suspect regexp2 to run and pass it's tests and then into lzma and work on fixing any channel bugs

cerulean hornet
#

That's lovely

#

And rapid fast

livid bane
cerulean hornet
#

:D

#

Don't force yourself tho

livid bane
# cerulean hornet Don't force yourself tho

Yeah I won't I'll have a sanity check with my mentor on Tuesday, but I still want to shoot for it, because regexp2 has already worked and lzma is close.

The more open the project is to testing and use the better it will be in the long run, and that comes from putting out regular versions, and having usable libraries for people to use from it

livid bane
#

@cinder sierra btw I've been meaning to ask about your current take on Choma, so is the highlighting not being good enough a show stopper?

cinder sierra
livid bane
cinder sierra
#

It isn't even that Haxe ecosystem's bad for it. I am sure you can toss something together that works fineish. But 11ty is very very good.

blazing heath
#

i'll defo be messing with wisdom at some point tho

cinder sierra
#

wisdom isn't really suited for static stuff

blazing heath
#

ahh yeah

#

iirc there was a static site generator in haxe tho

cinder sierra
#

there are a few

livid bane
#

my favorite one is markdown to html :p

blazing heath
#

but yeah, for web dev i'll defo be messing with wisdom

cinder sierra
#

01010111 made a simple one awhile ago

blazing heath
#

can't wait to have a project for it x)

livid bane
#

what's so good about wisdom and 11ty?

cinder sierra
#

wisdom is a haxe library, think of it like vuejs or react

livid bane
#

oooh

blazing heath
#

made by jeremy as well!

cinder sierra
#

11ty is a really feature complete static site generator, it is really simple to pick up compared to others i have played with

livid bane
#

I don't know how I missed this, brain must have forgotten

cinder sierra
#

haxeflixel, ceramic, and feathersui all use it (11ty)

silent wasp
#

wow

#

cool

livid bane
cinder sierra
blazing heath
#

lol

cinder sierra
#

!b have you used entities2 yet?

blazing heath
#

not yet no

#

most coding i've been doing is stabilising my project on native as that will be my main target

#

just sometimes lose track of that and end with a bit too much time on electron

#

hard to track down awkward issues but i think i'm mostly through the major hurdles now

livid bane
#

major hurdles come from continued deving, if it ramps down, or no new features are added then it's possible for the major hurdles to stop coming otherwise it's pretty inevitable

livid bane
#

Guys!

cerulean hornet
#

Yea?

livid bane
#

check this out

cerulean hornet
#

JOJOJOJOJO

#

REGEXP2 PASSES?

livid bane
#

BUT YEAH big that it's this far along, SO HAPPY :>

cerulean hornet
#

Holyyy shittt

blazing heath
#

dang

livid bane
#

thoughts on design?

cerulean hornet
#

looks good!

blazing heath
#

agreed!

livid bane
#

thanks guys blobuwu

#

Exicted and all a little nervous not gonna lie, tommorow should be the day of release for regexp2 and the start of versioning for the compiler

blazing heath
#

nothing to worry about

#

you'll probably get a bunch of nothing for a while 🤣

livid bane
#

Yeah true though!

#

Regardless it will be nice for at least the potential for others to use it too, I still have the libs I need for my projects, but those are farther out

blazing heath
#

^ that's when you'll really start to have fun 😄

livid bane
#

But who knows maybe the stability of getting a release and better quality insurance will get the libs I want faster then I realize

#

here's what happened since my push for the release, so stats wise it seems possible

blazing heath
#

what's the stats measuring

livid bane
#

7/14 is 50%

#

trying to measure in progress stdlibs, ones that can compile and run, but don't pass all of the tests yet

#

non compile ones don't show up, fully compiling ones also don't , and also I manually define what stdlibs to test or not

blazing heath
#

oh cool

#

i think i joined the roundup on the tail end of you talking about this

livid bane
#

A great stage to see if anything can be pushed over the line to fully working that would be useful

#

I'd also love in the future to use the graph to nerd snipe people, but I think that comes later

stiff estuary
#

(but I would be questioning the relevance of it even if that's possible)

#

11ty is great for static sites

livid bane
#

Soo lzma will not make the cut for the expected release for Today/Tomorrow of libs + compiler

Sorry @cerulean hornet :,( (Though still planned for after!)

Got super backed up on fixing file insensitive casing issue that effected pretty much the entire codebase and each case had to be manually rewritten...

Onto not life draining issues. Dox is working for the go2hx stdlib and will be released in the same timeframe.

And other good news an example case documenting regex failing on js and not on hl, and then using the regexp2 library to have it now work for js has been found and will be one of the examples for the lib.

All in all, thanks for all the support this week!
(You guys are seriously amazing who have stuck around and given the project hope)

I'm not expecting a major difference from prerelease to alpha release, user wise but I am optimistic it may give people a reason to test it out and stay more tuned into the updates.

  • It will also provide better stability for users/contributors (no more breaking master)
  • dox api for the stdlib and working 3rd party libs compiled under the go2hx umbrella
  • Updates on github in the form of releases
  • Semantic versioning
  • Updates will also start to be written on the Haxe community form again (maybe like a monthly thing)
  • Better community building, I'll be more active in discord and I'm hyped to get more suggested 3rd party libs working.
  • Clear communication on what should work and what will likely not, with explanations to figure it out yourself for various libs you are interested in.
cerulean hornet
#

Also good to hear the problem was fixable :D

livid bane
livid bane
#

Sooo update

#
  • the file insensitivity issue branch is working and now merged to master
  • go2hx std now has an api website
  • regexp2 library with example created, and testing it against multiple targets using CI
cerulean hornet
#

Iirc go behaves differently regarding file insensitivity depending on the platform

livid bane
#

It's not about Go but more because I split all variables into seprate files to improve the Haxe depedency graph of go2hx programs it has caused Unicode_pP.hx and Unicode_pp.hx to be a thing

#

Now if that happens it will merge the 2 variables together in a file that matches the lowercase equivlant

#

Tldr: broke lots of stuff, now fixed, onto release!

cerulean hornet
#

Ahhh gotcha!

livid bane
livid bane
livid bane
#

[showcase] I proudly present, regexp2 a go library porting the .NET regex engine, now transpiles into Haxe code correctly! Passing the tests!

This is a major milestone for the compiler to be able to compile non trivial libraries.

Try it out, give feedback, and more to come!

example program:

import github_dot_com.dlclark.regexp2.Regexp2;
function main() {
    final r = Regexp2.mustCompile("^(abc|xyz)?(?(1)abc|xyz)", 0);
    // left because it's a return tuple of (bool,error), right would give the error field
    trace(r.matchString("abc").left);
    trace(r.matchString("xyz").left);
    trace(r.matchString("def").left);
}

lib:
https://github.com/go2hx/regexp2
output:
https://gist.github.com/PXshadow/a97a898ff7641befdab2c89416e54b9d

cerulean hornet
#

:O

#

Awesome!!!!

livid bane
#

Hehe :) I'll probably join the discord later today if peeps want to hang out

cerulean hornet
#

I can only join in the evening sadly

livid bane
#

No worries what time about like 6?

cerulean hornet
#

Eh more like 7

#

I'm off to drumming lesson at like 5

livid bane
#

Gotcha, yeah that's too late for me, next time though

cerulean hornet
#

Alright :D

livid bane
#

guys we are moving to a new house come down from the attic and pack your things!
#haxe-go

cinder sierra
#

it was getting cramped up there

#

hopefully the new attic is a bit more spacious

#

maybe we'll get an entire basement 😮

livid bane
#

tbd based on how much haxing you do next week

livid bane
#

@cerulean hornet well done for getting the tests green! When you get a chance look through my review

cerulean hornet
livid bane
#

and the most important one! hehe but other one is resolved :]

cerulean hornet
livid bane
#

I think pending means I can't see it

cerulean hornet
#

Oh

livid bane
#

kind of dumb UI I did the same shit too

#

Had the review sit for hours before I realized you coudn't actually see it

cerulean hornet
#

can you see it now?

cerulean hornet
cinder sierra
#

lol why are you still talking in here

livid bane
#

MKI hates the new house appperently

#

#haxe-go

cinder sierra
#

I think you can lock this thread

livid bane
#

he is a house hatter he loves the attic

cinder sierra
#

Or maybe !b has to

cerulean hornet
cerulean hornet
livid bane
#

well I am the idiot then

cerulean hornet
#

but yes i do love the attic

#

less work cleaning the place aye

livid bane
cinder sierra
#

I think reflaxe has a couch

livid bane
livid bane
blazing heath
#

Why have a channel when the author doesn't use it blobmeltsob

#

you're too used to this home 😆

livid bane
#

I'll have to hide it or something

blazing heath
#

😆

cerulean hornet
#

Archive it kekw

#

Seal the attic

livid bane
cerulean hornet
#

I will die

#

My mancave will get sealed

livid bane
#

if you want to stay here, I won't stop you heck we can even keep talking in here idc :p

#

whatever is more chill

#

The big up sides to the #haxe-go channel is, easier for others to see it, and more control like pings and I think we can even do go2hx annoucments or something cool like that

blazing heath
#

you have access to /everyone in here

livid bane
blazing heath
#

channel no

#

in threads /everyone pings everyone who's watching the thread

#

in channels it pings the whole server

#

channels don't affect visibility of a project also... it's more superficial visibility than any kind of real benefit. The visibility is driven by activity

livid bane
#

I see, would be interesting to use it for regular weekly updates but at the same time, might annoy people

#

Well I think channels are nice that everyone can see them by default

#

for projects it's only ones where I have wrote a message show up for me

blazing heath
#

channels have a purpose, that's why I made it 😄

#

it's just not for 'popularity'

livid bane
blazing heath
#

can be easier to navigate to where you want to go

livid bane
blazing heath
#

it completes the projects first 🤣

livid bane
#

the projects section is always higher up so I just naturally write here and then realize it's not the channel

blazing heath
#

heh

livid bane
#

like the voice chats /s but seriously don't do it if it would take any sort of time

blazing heath
blazing heath
#

it would be cooler if discord let us favourite channels or something

#

but alas such a thing doesn't exit

livid bane
blazing heath
livid bane
blazing heath
#

nope 😄

cinder sierra
#

could we just lock this thread

dense palm
#

never

tropic phoenix
cinder sierra
#

it sucks, ruins discoverability

blazing heath
cinder sierra
#

You have a list of channels that you opt in to

blazing heath
#

for discord

#

you can opt out of channels already

#

I don't think that's the same thing as favourites

brittle spoke
#

How did you make that showcase image? is that a screenshot of some haxelib tool?

blazing heath
#

#haxe-go 😂

#

but it is a cool screenshot

cerulean hornet
#

is there something off about it?

brittle spoke
#

To the contrary, it looks well done

cerulean hornet
#

i see

livid bane
brittle spoke
#

I agree it looks cool, wanted to see if i could pull up stats for other libs

cerulean hornet
livid bane
brittle spoke
#

thanks!

rain gazelle
#

go2hx

livid bane
rain gazelle
#

#voice-text message

#

😄

#

you pinged me first

livid bane
#

daz is true

viscid harness
#

go go go(2hx)

livid bane
#

But good try!

wheat fox
#

go go go2hx

wooden spade
#

Is there a docker container that runs go2hx out of the box?