Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:16
    bakpakin closed #809
  • 04:14

    bakpakin on master

    Prepare for 1.17.2 release. (compare)

  • Sep 18 18:42

    bakpakin on v1.17.2

    Prepare for 1.17.2 release. (compare)

  • Sep 18 18:40

    bakpakin on master

    Format and update CHANGELOG.md (compare)

  • Sep 18 17:41

    bakpakin on master

    Address #809 - treat first docs… (compare)

  • Sep 18 16:46
    bakpakin commented #809
  • Sep 18 16:00
    bakpakin closed #808
  • Sep 18 16:00
    bakpakin commented #808
  • Sep 18 08:28
    sogaiu edited #811
  • Sep 18 08:23
    sogaiu converted_to_draft #811
  • Sep 18 08:19
    sogaiu opened #811
  • Sep 18 00:21

    bakpakin on master

    Add semi-colon. (compare)

  • Sep 17 22:00

    bakpakin on master

    Add makefile var to fix jpm to … Avoid including windows.h in ja… (compare)

  • Sep 17 12:53
    llmII commented #808
  • Sep 17 12:13
    llmII edited #809
  • Sep 17 11:43
    llmII commented #808
  • Sep 17 11:40
    llmII opened #809
  • Sep 17 11:39
    llmII opened #808
  • Sep 16 23:36

    bakpakin on master

    Pass DESTDIR directly to jpm bo… (compare)

  • Sep 15 22:29
    lucasemmoreira closed #805
saikyun
@saikyun
when trying jpm build / install, I get this error:
$ JANET_PATH=../janet_lib jpm build
generating executable c source...

@{:name "hello"}
@{:name "bert"}
@[(0 1 :open-paren) (5 2 :open-paren) (11 2 :close-paren) (12 1 :close-paren) (22 1 :open-paren) (35 1 :close-paren)]

found native /home/jona/programmering/freja/build/text-rendering.so...
found native ../janet_lib/jaylib.so...
error: try to marshal unregistered abstract type, cannot marshal <core/channel 0x55A3799FA3F0>
  in marshal
  in <anonymous> [/usr/local/bin/jpm] on line 738, column 20
  in do-rule [/usr/local/bin/jpm] on line 263, column 26
  in do-rule [/usr/local/bin/jpm] (tailcall) on line 259, column 44
  in _thunk [/usr/local/bin/jpm] on line -1, column -1
  in cli-main [boot.janet] on line 3422, column 39
I'm not sure what that means
what is it that it's trying to marshal? top level bindings
looked a bit at jpm source but didn't really understand
andrewchambers
@andrewchambers
a channel
for some reason a channel is being marshalled
saikyun
@saikyun
but why? :'D
I mean, what and why is getting marshalled by jpm?
andrewchambers
@andrewchambers
jpm sometimes marshals janet code it puts into natives
saikyun
@saikyun
okay, and how do I avoid that?
andrewchambers
@andrewchambers
that being said,not sure why channels can't be marshalled
saikyun
@saikyun
does it have with top level bindings to do?
andrewchambers
@andrewchambers
seems like a mistake to me
saikyun
@saikyun
ah
fwiw I'm on 1.16.0 dev
saikyun
@saikyun
seems like top level channels might have been the problem :o
yup
saikyun
@saikyun
though it seems to work in a minimal project... hm
saikyun
@saikyun
will have to try more to figure out what causes it
currently I can just not include a file that only has a (def thing (ev/chan 1)) in it, and it will build
and if I do import that file, I get the error
but apparently something else is also acting up, since the same setup with the rest of my project removed works
andrewchambers
@andrewchambers
@Saikyun its only if you reference it
saikyun
@saikyun
Ohh
I'll try that
saikyun
@saikyun
you're right :)
saikyun
@saikyun
made an issue: janet-lang/janet#710
saikyun
@saikyun
is it bad practise to name src folder "src"? I imagine it's easy to cause collisions if one uses declare-source :O
1 reply
andrewchambers
@andrewchambers
i think its fine
saikyun
@saikyun
But what happens if two dependents declare a src folder? :O
3 replies
Dependencies
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.