Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 04:28

    kevinresol on master

    Allow fall through on error for… (compare)

  • Sep 16 02:46

    kevinresol on master

    Guard not applicable tests (compare)

  • Sep 16 02:38

    kevinresol on master

    Modernize some syntaxes (compare)

  • Sep 16 02:19

    kevinresol on master

    Deprecate string cast for Id ht… Enable tests (compare)

  • Sep 16 02:15

    kevinresol on master

    Setup transactions Merge remote-tracking branch 'u… Merge branch 'master' into tran… and 22 more (compare)

  • Sep 16 02:15
    kevinresol closed #130
  • Sep 16 01:59
    kevinresol synchronize #130
  • Sep 16 01:38
    kevinresol synchronize #130
  • Sep 16 01:33
    kevinresol synchronize #130
  • Sep 15 13:00
    kevinresol synchronize #130
  • Sep 15 07:19
    kevinresol synchronize #130
  • Sep 15 07:06
    andyli closed #89
  • Sep 15 07:06

    andyli on master

    comment out failing targets/tes… (compare)

  • Sep 15 02:26
    andyli opened #89
  • Sep 09 08:07
    kevinresol commented #164
  • Sep 07 02:39
    kevinresol commented #164
  • Sep 07 02:39
    kevinresol commented #164
  • Sep 07 01:26
    kevinresol commented #164
  • Sep 06 01:44
    kevinresol edited #164
  • Sep 06 01:39
    kevinresol edited #164
Juraj Kirchheim
@back2dos
excellent
Peter Achberger
@Antriel
For context: I want to merge two types into new type, in a sorta-OOP-inheritance way, but one that allows what would be a inline override function.
Juraj Kirchheim
@back2dos
a what? :D
I don't think the compiler will let you do that, but ok
Peter Achberger
@Antriel
It won't, but if I generate a completely new class, and just replace one function with new one... I get the same result.
Apart from duplicating all the code, but that's alright.
Juraj Kirchheim
@back2dos
in any case, you should switch on the type returned from the buildcache
Peter Achberger
@Antriel
applyTypeParameters doesn't work on the class I think. It only works on the typed fields, or something.
Juraj Kirchheim
@back2dos
sure?
Peter Achberger
@Antriel
That's how it behaved for me before.
I had to go into each field and apply it on that field, but of course that won't get the anything I could return.
Juraj Kirchheim
@back2dos
I'd say you wanna get the BaseType::paramsfrom the returned Type and then stick that in as the typeParameters arg - and the last arg being whatever it is that you want applied
Peter Achberger
@Antriel
But I'm not entirely sure why it didn't work there. Maybe it will with the type from BuildCache.
Yeah, that's exactly what I was doing before.
It kept all the fields the same, they still refered to the param, not a concrete type.
Juraj Kirchheim
@back2dos
Peter Achberger
@Antriel
Huh, so it does work there. Thanks!
Will try that out tomorrow, hopefully.
Juraj Kirchheim
@back2dos
good luck ;)
Peter Achberger
@Antriel
Doesn't work. :D For some reason it simply doesn't change the type. Will have to simplify and figure it out.
Peter Achberger
@Antriel
Well. Did one little change in your demo. It does work, but I'm not sure it works as it's supposed to. https://try.haxe.org/#D77C2e0b
I wonder if it might have anything to do with the new monomorph system, in either case, the call to apply type param isn't doing anything.
Which is how it behaved in my tests. I could apply it on the fields that use it, but not on the whole class, that just does nothing.
Juraj Kirchheim
@back2dos
ah, I see
serjek
@serjek
I updated haxe to 4.2-latest and started to get those cryptic messages in tink_sql:
Inconsistent setter for field myField : null should be default
why is that?
all right, this is because it now doesn't like mutable typedefs and requires fields to be final
serjek
@serjek
but still, tink.sql.Id now refuses to cast to Int
Peter Achberger
@Antriel
Well, will open an issue about the apply type params, but going through complex type works, although turning the type into complex type is a bit awkward. https://try.haxe.org/#48677A50
serjek
@serjek
guys can you please explain me why I get this error: tink.sql.Id<MyTable> should be Int? why to Int is not working in this case?
it feels like haxe now since 4.2.x is very selective about what to cast
Juraj Kirchheim
@back2dos
perhaps adding @:transitive to Id will fix the issue
serjek
@serjek
it doesn’t, the first thing i checked
Juraj Kirchheim
@back2dos
mhh, perhaps it's some variance issue introduced by the new monomorph handling ... can you open an issue with a minimal example?
serjek
@serjek
sure!
serjek
@serjek
Juraj Kirchheim
@back2dos
cheers ;)
Kevin Leung
@kevinresol
is there a way in tink_lang to enable just a subset of features? In particular, I want to just enable the hxx sugar
Juraj Kirchheim
@back2dos
nope ... there's an issue here as per @nadako's request: https://github.com/haxetink/tink_lang/issues
but I never really got around to it
that said, the transforms are in tink_hxx
it's just https://github.com/haxetink/tink_lang/blob/e13fc181246e32680be6ff7543988aa1525b45cc/src/tink/lang/Sugar.hx#L313 and https://github.com/haxetink/tink_lang/blob/e13fc181246e32680be6ff7543988aa1525b45cc/src/tink/lang/Sugar.hx#L268-L272 ... and you may be better off just calling these from your own build macro (thus bypassing the overhead of tink_syntaxhub - unless you're using it anyway)
Peter Achberger
@Antriel
I do remember just calling hxx from my own macro to parse it all out. Worked well.
Rudy Ges
@kLabz
How do I do an orderBy with tink_sql?
(hmm, problem seems to be doing it without "where")
serjek
@serjek
select(...).where(....).orderBy(...)
note that orderBy has bit weird syntax:
.orderBy(fields -> [{field: fields.created, order: Asc}]).all();
public function ratingData(user:SessionUser):Promise<Array<RatingStatsData>>
    return db.UserRating
        .where(UserRating.user == user.id)
        .orderBy(fields -> [{field: fields.created, order: Asc}])
        .all();
Rudy Ges
@kLabz
Yeah I got it working, issue was that I had no where() yet and it doesn't work without a where
serjek
@serjek
ah, yeah, good point
Rudy Ges
@kLabz
Anyone made an sqlite driver for js target using another npm package? ("better-sqlite3" rather than "sqlite3", for example)
sqlite3 package breaks nodegui's webpack somehow, while things like "better-sqlite3" don't but has a different api..