Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 24 10:50
    llmII commented #816
  • Sep 24 10:37
    saikyun commented #815
  • Sep 24 10:21
    saikyun opened #816
  • Sep 24 10:15
    saikyun opened #815
  • Sep 21 23:03

    bakpakin on master

    Add custom base option to numbe… Merge branch 'master' of github… (compare)

  • Sep 21 20:16

    bakpakin on master

    Apply deprecation machinery to … Merge branch 'master' into use-… Merge pull request #811 from so… (compare)

  • Sep 21 20:16
    bakpakin closed #811
  • Sep 21 20:16
    bakpakin reopened #811
  • Sep 21 20:16
    bakpakin closed #811
  • Sep 21 20:15
    bakpakin synchronize #811
  • Sep 21 14:55

    bakpakin on master

    Remove accidental limit on max … (compare)

  • Sep 21 14:53
    pepe closed #814
  • Sep 21 14:46
    pepe synchronize #814
  • Sep 21 13:44
    pepe opened #814
  • Sep 21 13:37
    soulawaker commented #813
  • Sep 21 05:04
    pyrmont commented #798
  • Sep 20 00:47

    bakpakin on master

    Add -i flag to run .jimage file… (compare)

  • Sep 19 19:30
    bakpakin closed #813
  • Sep 19 19:30
    bakpakin commented #813
  • Sep 19 19:19

    bakpakin on master

    Remove thread module. Instead,… (compare)

John Gabriele
@uvtc

@bakpakin:matrix.org , I'm also not getting how the linting levels work, but looking forward to your docs. I think I'm confused because I'm lacking context: is "strict" from the perspective of the user calling janet -w|-x foo ("I want to see anything at all in this code that might possibly be an issue!", or "I'm relaxed and only need to see any really glaring issues with this code."), or is it from the perspective of the library author adding :deprecated metadata to their code ("I'll only provide a warning or error for this if the user of my library is being really paranoid/strict", or "the user of my library is relaxed and not concerned with these minor low-risk warnings").

Actually, I'm likely completely conflating and confusing code deprecations with lint warnings. Hoping the docs disentangle these apart.

bakpakin
@bakpakin:matrix.org
[m]
The linting levels are from the perspective of the user setting the command line flags.
saikyun
@saikyun
is there a way on windows, linux and macos to get the directory of a janet executable?
e.g. if I run my editor I'd like to be able to find font files relative to the binary if possible
(by janet executable I mean something built with jpm build)
saikyun
@saikyun
ended up using the first of the arguments to main (defn main [path-to-exec] ...)
andrewchambers
@andrewchambers
on linux you can readlink /proc/self/exe
not sure about other platforms
bakpakin
@bakpakin:matrix.org
[m]
You can use (dyn :executable) although that won't actually do the lookup into PATH.
saikyun
@saikyun
@andrewchambers thanks :) in this case I'd like a multiplatform way. though there seems to be wrappers that do what you said on linux (https://github.com/gpakosz/whereami)
@bakpakin:matrix.org thanks, I'll try it :) what do you mean about lookup into PATH? don't understand that part
saikyun
@saikyun
ah, now I get the path problem. it won't show the right path if I have the executable on my PATH
saikyun
@saikyun
is it possible to let my code see if it has been built by jpm build or jpm install?
saikyun
@saikyun
is there a way to do a "clean" jpm install? just had problems installing new version of freja, using jpm install https://github.com/Saikyun/freja due to old code being left in JANET_PATH/.cache
bakpakin
@bakpakin:matrix.org
[m]
Sudo jpm clear-cache. Although I dont understand why old code would be left in the cache
saikyun
@saikyun
thank you. sadly that causes raylib to need to recompile :'D ah well, better than old version
hm, yeah, I have no clue
@bakpakin:matrix.org here's my project.janet https://github.com/Saikyun/freja/blob/main/project.janet
aoeua
@aoeua:matrix.org
[m]
Hi all -- is there a library with which I can extract a zip file using janet? I can't seem to find such functionality in the standard library or available community libraries, but maybe I'm missing something..
sogaiu
@sogaiu:matrix.org
[m]

aoeua: i haven't seen one. may be someone else has though.

depending on your setup, perhaps shelling out is an option?

at one point i thought about wrapping the following: https://github.com/kuba--/zip/ but did not go through with it.

bakpakin
@bakpakin:matrix.org
[m]
There is janet-miniz although I haven't yet wrapped reading and writing to files
The miniz library contains the needed functions though
damnpepe
@damnpepe:matrix.org
[m]
I am using miniz for on the fly minimizing of the RPC requests without any problem https://git.sr.ht/~pepe/hemple/tree/master/item/hemple/init.janet#L25
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
Hm i suppose that’s true!
yumaikas-
@yumaikas:matrix.org
[m]
Can peg/replace interact with captures?
1 reply
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]

This message is replying to a Matrix event but we were unable to find associated bridged Gitter message to put it in the appropriate threaded conversation.

Ah, I know the reason I couldn’t use match. I didn’t want to bind to the object, I wanted to bind to the result of getproto on the object. In other words, IF x is a table, and IF x has a prototype, then do something with the prototype.

bakpakin
@bakpakin:matrix.org
[m]
Zach Smith (subsetpark): Sounds like cond + when-let is what you need. Or you can write your own macro, could be useful
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
Yeah. If I wrote my own macro would you want a PR @bakpakin?
bakpakin
@bakpakin:matrix.org
[m]
If it seems general enough for inclusion into the core but I would encourage you to make it specific to your own use case
heyarne
@heyarne:matrix.org
[m]
Hi :) I've stumbled over janet a while ago and I'd like to try it for bagatto, which seems like a simple static site gen
I can't install it via jpm for some reason. jpm install https://git.sr.ht/~subsetpark/bagatto eventually fails with
Error building git repository dependency: could not find module temple:
    janet_modules/temple.jimage
    janet_modules/temple.janet
    janet_modules/temple/init.janet
    janet_modules/temple.so
I tried manually installing temple via jpm install https://git.sr.ht/~bakpakin/temple and so a temple.janet exists inside janet_modules
Is still get the above error. Can somebody explain why?
andrewchambers
@andrewchambers
did you accidentally leave JANET_PATH unset when you installed temple?
it seems your command is looking for ./janet_modules/temple.janet
hmm sorry, i misread what you said.
it sounds like what you have done is correct
hmm, for me jpm install https://git.sr.ht/~subsetpark/bagatto was successful
sogaiu
@sogaiu:matrix.org
[m]
fwiw, it worked for me too.
i tried with janet 1.16.2-dev-41a7154a
heyarne
@heyarne:matrix.org
[m]
I'm on 1.16.1-release
sogaiu
@sogaiu:matrix.org
[m]
i'll rebuild and try with that
heyarne
@heyarne:matrix.org
[m]
And I set $JANET_PATH to janet_modules before doing anything
There are a lot of other deps which seem to be fetched and built just fine
But for some reason it stops at temple.
$ ls -l janet_modules | wc -l
21
sogaiu
@sogaiu:matrix.org
[m]
ok, i reproduced
1 reply
with 1.16.1-87f8fe14 (i think that's release), creating janet_modules, setting JANET_PATH to that and doing the jpm install command yielded what looks like the same results
1 reply
heyarne
@heyarne:matrix.org
[m]
It also seems to build and fetch temple just fine
cloning repository https://git.sr.ht/~bakpakin/temple to /home/arne/dev/arnes.space/janet_modules/.cache/https___git.sr.ht_~bakpakin_temple
Cloning into '/home/arne/dev/arnes.space/janet_modules/.cache/https___git.sr.ht_~bakpakin_temple'...
remote: Enumerating objects: 20, done.
remote: Total 20 (delta 0), reused 0 (delta 0), pack-reused 20
Unpacking objects: 100% (20/20), 4.56 KiB | 194.00 KiB/s, done.
no dependencies found
removing /home/arne/dev/arnes.space/janet_modules/temple.janet
removing manifest /home/arne/dev/arnes.space/janet_modules/.manifests/temple.jdn
Uninstalled.
generating /home/arne/dev/arnes.space/janet_modules/.manifests/temple.jdn...
Installed as 'temple'.
sogaiu
@sogaiu:matrix.org
[m]
it also happens with the latest from master afaict
heyarne
@heyarne:matrix.org
[m]
Just to be clear, the longer log I just posted is an excerpt of the output of jpm install [...]bagatto