Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 01 05:07
    GrayJack commented #709
  • Jul 31 20:49

    bakpakin on master

    Note "int" vs "double" represen… Merge pull request #747 from db… (compare)

  • Jul 31 20:49
    bakpakin closed #747
  • Jul 31 16:12
    dbready opened #747
  • Jul 31 15:00

    bakpakin on master

    Patch util.c (compare)

  • Jul 31 00:30

    bakpakin on master

    Add semantics for closing chann… (compare)

  • Jul 30 23:34
    bakpakin closed #742
  • Jul 30 06:20
    pepe closed #745
  • Jul 30 06:20
    pepe commented #745
  • Jul 30 04:04
    bakpakin closed #746
  • Jul 30 04:04
    bakpakin commented #746
  • Jul 30 02:41
    sogaiu commented #746
  • Jul 30 02:30

    bakpakin on master

    Run the formatter. Merge branch 'master' of github… Put source mapping info in stac… (compare)

  • Jul 30 02:17
    soulawaker commented #746
  • Jul 30 01:05
    uvtc commented #746
  • Jul 29 22:36
    sogaiu commented #746
  • Jul 29 10:44
    soulawaker opened #746
  • Jul 29 09:02
    sogaiu commented #745
  • Jul 29 08:51
    yumaikas commented #745
  • Jul 29 08:50
    yumaikas commented #745
bakpakin
@bakpakin:matrix.org
[m]
and use :normal for most things
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
hm ok
i think i'll have to dive into these flags and the different usecases
bakpakin
@bakpakin:matrix.org
[m]
Literally just think of them as 1, 2, and 3 for relaxed, normal, and strict
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
well the mapping between the keywords and the integer isn't the part i need to digest :)
bakpakin
@bakpakin:matrix.org
[m]
The logic to show or raise an error:
            (each [level line col msg] lints
              (def lvl (get lint-levels level 0))
              (cond
                (<= lvl lint-error) (do
                                      (set good false)
                                      (on-compile-error msg nil where (or line l) (or col c)))
                (<= lvl lint-warning) (on-compile-warning msg level where (or line l) (or col c)))))
Pretty much sums it up
Saikyun
@Saikyun
how do I force a newline in docstrings? I thought double space at end of line would suffice
sogaiu
@sogaiu:matrix.org
[m]
i think crocket asked for something like this recently.
@Saikyun: may be it's this: janet-lang/janet#694
Saikyun
@Saikyun
thank you!!
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