Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 27 23:27
    crypt17 opened #493
  • Oct 27 11:47
    pepe commented #491
  • Oct 27 11:45
    pepe synchronize #491
  • Oct 26 15:21
    drkameleon synchronize #492
  • Oct 26 13:46
    drkameleon opened #492
  • Oct 26 10:24
    pepe commented #491
  • Oct 26 09:39
    pepe commented #491
  • Oct 26 09:39
    pepe opened #491
  • Oct 26 08:46
    pepe commented #490
  • Oct 26 03:23
    andrewchambers edited #490
  • Oct 26 03:23
    andrewchambers edited #490
  • Oct 26 02:51
    andrewchambers edited #490
  • Oct 26 02:51
    andrewchambers edited #490
  • Oct 26 02:50
    andrewchambers opened #490
  • Oct 20 21:46
    andrewchambers commented #489
  • Oct 20 21:46
    andrewchambers closed #489
  • Oct 19 12:19

    bakpakin on master

    Address #489 Add gc pressure w… (compare)

  • Oct 14 00:17
    andrewchambers opened #489
  • Oct 12 07:14
    andrewchambers commented #488
  • Oct 11 23:38
    Kartiku opened #84
andrewchambers
@andrewchambers
well, depends what you mean by type safety
becaues
you could do something similar to how C and the OS deals with file descriptors
i.e. an integer represents an object
that is type safe, if you pass a bad integer
it can just return an error
but maybe wiring that up is too much effort for the task
Ilari Perämäki
@Ilariel
Not really, but I think that would make it harder on Janet side if I have to query the type
But then again abstract type pool would have to be implemented as typed array of abstract types I guess
So there would be just one root instead of one per object
andrewchambers
@andrewchambers
right.
Now that I think more, a pool just in janet makes sense
Ilari Perämäki
@Ilariel
Yup, but I have get that pool from C and pull an object so it feels dirty to me
but that might just be me
andrewchambers
@andrewchambers
what is the application if I may ask?
Ilari Perämäki
@Ilariel
Janet support for Godot
They use their variant implementation for passing arguments to most of the api
and if you want to take in parameters you have to use them too
It is almost the same as Janet type for Janet
But I'm mostly trying to cover only what I need for a simple-ish roguelike so I won't cover the whole Godot API
Ilari Perämäki
@Ilariel
So I'm trying to more or less cut corners where I can
Michael Camilleri
@pyrmont
I don't understand how an abstract type is going to help you. If you have to create the element each time, that's going to involve memory allocation before you even get to the point where you're trying to include it in a collection of some sort.
Michael Camilleri
@pyrmont
Or to put it another way, to instantiate the abstract type from Janet, you're going to need to have the data in a more basic Janet type and that's going to require memory allocation.
I suppose you could have a C function that receives data from outside Janet and it creates the abstract type. Although I'm struggling to conceive of how that would work.
3 replies
andrewchambers
@andrewchambers
I guess I would see what people are doing for lua if its been done before
crocket
@crocket
@Ilariel You might want to look at http://nas.sr/magic/
andrewchambers
@andrewchambers
@crocket that seems pretty unrelated to me
matrixbot
@matrixbot
sogaiu there is a clojure clr godot port already fwiw
sogaiu rather, arcadia
crocket
@crocket
I think https://github.com/JulNadeauCA/libagar is a good alternative to Gtk and Qt. I might write bindings for it someday.
Ilari Perämäki
@Ilariel
I've seen libagar couple of times, but for some reason I never used it and I can't remember why. Some thing felt off I think, but I have no idea what.
andrewchambers
@andrewchambers
lots of these frameworks render all their own controls
which makes them not work quite like native programs
they also often break things like accessibility tools
though, not saying thats the case here
crocket
@crocket
Accessibility for blind people?
crocket
@crocket
I don't care much about native look because most of my programs look like material-design programs anyway.
My terminal looks like material-design UI. My brave web browser looks like one. Emacs and sway, too.
Material design all the way down.
I guess it's time to learn C....
Levi Tan Ong
@levitanong

Hi guys, dunno if this is the right place to put this (and if it isn't, I'm sorry, please let me know where I should be sharing this)

I made a module loader for importing JDN data directly into source. It's useful for loading, say, configuration, or things meant for extension like syntax grammars. Stuff that could be .janet files, but should conceptually be .jdn files.

https://github.com/levitanong/jdn-loader

Michael Camilleri
@pyrmont
@levitanong: Nice!
Levi Tan Ong
@levitanong
@pyrmont thanks! :D
crocket
@crocket
You should register it....
Levi Tan Ong
@levitanong
crocket
@crocket
Yes
Levi Tan Ong
@levitanong
@crocket didn’t know I could just do that. 😅 will do!
crocket
@crocket
@Ilariel Have you succeeded in embedding janet in godot game engine?
Ilari Perämäki
@Ilariel
Not really, I can run Janet code that returns values to Godot, but I can't call into Godot code at this moment