Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 14 20:59

    bakpakin on master

    Update Janet version. (compare)

  • May 14 15:27

    bakpakin on master

    Fix meson.build for older versi… (compare)

  • May 10 14:22
    bakpakin commented #970
  • May 09 18:55
    patranger commented #970
  • May 09 15:29

    bakpakin on v1.22.0

    (compare)

  • May 09 15:28

    bakpakin on v1.22.0

    (compare)

  • May 09 15:28

    bakpakin on master

    Fix version bump. (compare)

  • May 09 15:20

    bakpakin on v1.22.0

    (compare)

  • May 09 15:19

    bakpakin on master

    Prepare for 1.22.0 release. (compare)

  • May 08 13:38
    bakpakin closed #974
  • May 06 00:24

    bakpakin on master

    Add `module/value` function to … (compare)

  • May 05 23:33

    bakpakin on master

    Remove file/popen - address #974 (compare)

  • May 05 23:28
    bakpakin commented #974
  • May 05 23:27

    bakpakin on master

    Use janet_getnat when non-negat… (compare)

  • May 05 13:56
    bakpakin closed #975
  • May 05 13:56

    bakpakin on master

    Fix #975 - null ptr dereference… Merge pull request #976 from ri… (compare)

  • May 05 13:56
    bakpakin closed #976
  • May 05 13:56
    bakpakin commented #976
  • May 05 05:13
    rick2600 opened #976
  • May 05 05:01
    rick2600 edited #975
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
Relevant to the recurring conversation about more powerful version resolution in jpm, this is apparently all the rage: https://nex3.medium.com/pubgrub-2fb6470504f
crocket
@crocket
On gentoo linux, I manage jpm packages as gentoo packages. On other linux distributions, jpm needs to take care of jpm package updates.
jpm doesn't seem to have a command for updating installed jpm packages.
bakpakin
@bakpakin:matrix.org
[m]
Reinstalling a package should update. No easy way to update all at once though besides iterating through the manifest
pp
@damnpepe:matrix.org
[m]
bakpakin: what is the easiest way to use u64 with string/from-bytes please?
or even better I have 64 bit number and I need to create string with bytes from it :-)
pp
@damnpepe:matrix.org
[m]
This is the best I have managed to do it :-)
(string/from-bytes 2r01111111
                           ;(seq [i :down-to [56 0 8]]
                              (scan-number (string (band (brshift (int/u64 dl) i) 0x000000FF)))))
the 64bits number is the seq
@saikyun: PS: finaly fixing trevor, as I got over the 16 bits size tooo :-)
pp
@damnpepe:matrix.org
[m]
maybe string and scan-number is good enough, at least for me now
saikyun
@saikyun

@saikyun: PS: finaly fixing trevor, as I got over the 16 bits size tooo :-)

haha, nice! :D

I took a break from working on my blog, hopefully I'll get to it again sometime soon :)
2 replies
I got a new job and will work 50% on creating a game using Freja :D starting in janetuary
yumaikas-
@yumaikas:matrix.org
[m]
Congratulations 🎉
1 reply
pp
@damnpepe:matrix.org
[m]
bakpakin: just an idea, but I guess we can have (get (int/64 1) 0) for the first byte and so on?
bakpakin
@bakpakin:matrix.org
[m]
@pp that sounds like a very bad interface
pp
@damnpepe:matrix.org
[m]
true :)
harryvederci
@harryvederci
Nice saikyun, will you blog about making the game?
saikyun
@saikyun
@harryvederci I was mostly thinking about blogging about Freja, but atm I've only written half a blog post, so who is to tell :P
llmII
@llmii:matrix.org
[m]
If one was to need a config file for software they've written, what do people typically use with Janet
I see there is support for toml and json. No idea about yaml or ini. I really dislike json for configuration files, but I have used json with Janet for talking to other processes so I know that works well. XML and alike are most definitely a no go.
pp
@damnpepe:matrix.org
[m]
I am using .jdn where needed
llmII
@llmii:matrix.org
[m]
pp: approachable from a human standpoint? (like, can comment in the file)
pp
@damnpepe:matrix.org
[m]
very good question about which I am not sure, but it is a Janet code at the end, so I guess you can
llmII
@llmii:matrix.org
[m]
hmmm, since it's janet code, I guess the major diff between it and regular janet code is it only allows returning values? as in, protected from arbitrary code exec?
pp
@damnpepe:matrix.org
[m]
well I am reading the config this way: (def file-conf ((compile (parse (slurp file))))) so definitely executing the code
but I guess you can protect it easily
sogaiu
@sogaiu:matrix.org
[m]
depending on what you want, you don't need to do compile iiuc: https://github.com/janet-lang/janet/blob/master/test/suite0008.janet#L297-L298
pp
@damnpepe:matrix.org
[m]
Indeed. to be frank, I am not sure why I do in the snippet I have sent :-)
llmII
@llmii:matrix.org
[m]
seems I should learn what the parse function does...
pp
@damnpepe:matrix.org
[m]
well I highly recommend it, especially to someone already deep in Janet as I feel you are
llmII
@llmii:matrix.org
[m]
@pp: you mean parse or jdn?
pp
@damnpepe:matrix.org
[m]
parse sry
llmII
@llmii:matrix.org
[m]
sogaiu: that's awesome, the example you linked
sogaiu
@sogaiu:matrix.org
[m]
parse wraps the parser/* stuff
pp
@damnpepe:matrix.org
[m]
thank you sogaiu!
llmII
@llmii:matrix.org
[m]
pp: just had to be sure, parse really definitely will be useful to know
sogaiu
@sogaiu:matrix.org
[m]

llmII: here's a taste of what you can do with parser/* stuff: https://github.com/sogaiu/janet-editor-elf/blob/master/janet-editor-elf/delims.janet#L16-L53

this is what i use to find missing delimiters in "partial" code

llmII
@llmii:matrix.org
[m]
I'll probably want the parser api, if I could somehow parse multiple blocks, or I guess I could just wrap the entire file in [] to get it all back as an array of toplevel values
sogaiu
@sogaiu:matrix.org
[m]
yes i think that would work (assuming you added a @ on the front)
parsing multiple things should be doable too
llmII
@llmii:matrix.org
[m]
I'm guessing the full parser API would be needed for the multiple things?
sogaiu
@sogaiu:matrix.org
[m]
yes i think so
unless you wrap like you described
llmII
@llmii:matrix.org
[m]
that's why my first thought was array-wrapping a string, keeps things simple to be just a single parse call
sogaiu
@sogaiu:matrix.org
[m]
well...
yes :)
llmII
@llmii:matrix.org
[m]
hehehe, I thought you were about to mention an edge case where doing so means breaking everything lol
sogaiu
@sogaiu:matrix.org
[m]
:)
llmII
@llmii:matrix.org
[m]
thanks sogaiu, @pepe