Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 04 17:07

    bakpakin on master

    Add length method ffi/jitfn abs… Merge branch 'master' of github… (compare)

  • Dec 04 16:27

    bakpakin on master

    Add length method ffi/jitfn abs… (compare)

  • Dec 03 23:52

    bakpakin on master

    Add ffi jit example. (compare)

  • Dec 03 18:09

    bakpakin on master

    Address windows compilation war… (compare)

  • Dec 03 17:45

    bakpakin on master

    MAP_ANON(YMOUS) not strictly ne… (compare)

  • Dec 03 17:30

    bakpakin on master

    Add MAP_ANON instead of MAP_ANO… (compare)

  • Dec 03 17:26

    bakpakin on master

    Add ffi/jitfn for JIT compilati… (compare)

  • Nov 27 16:14

    bakpakin on master

    Format compile.c (compare)

  • Nov 25 20:19
    pixelherodev edited #1047
  • Nov 25 20:17
    pixelherodev opened #1047
  • Nov 21 05:00
    dressupgeekout opened #1046
  • Nov 16 12:54
    tionis synchronize #166
  • Nov 15 03:27
    Pebaz closed #1044
  • Nov 15 03:27
    Pebaz commented #1044
  • Nov 14 08:04
    sogaiu commented #1044
  • Nov 14 02:09
    sogaiu commented #1044
  • Nov 13 20:57
    Pebaz edited #1044
  • Nov 13 20:56
    Pebaz opened #1044
  • Nov 11 17:48

    bakpakin on master

    Update state header to include … (compare)

  • Nov 11 17:25

    bakpakin on master

    Simplify eval. Also add more c… (compare)

tionis
@tionis:matrix.org
[m]
thanks!
tionis
@tionis:matrix.org
[m]
As I'm always asking some pretty basic Janet questions, I wanted to ask if this is even the right channel/wanted here?
sogaiu
@sogaiu:matrix.org
[m]
tionis: there is a help channel: https://gitter.im/janet-language/help
tionis
@tionis:matrix.org
[m]
Ah perfect, now I won't spam this channel anymore 👍
sogaiu
@sogaiu:matrix.org
[m]
tionis: fwiw, i think it's not necessary to use do inside each if the desire is to use more than one form. in that was not so clear, here is an example.
ah i see you've moved on...never mind me :)
sogaiu
@sogaiu:matrix.org
[m]

llmII: i updated janet-editor-elf with some fixes for unwrapping comment forms. there is now a separate implementation for indent-region (should be faster for one thing, but requires another add-hook to enable) with some docs and there is a menu which should help with (re)discoverability of some of the commands.

it's been working ok for me, but if you give it a try and notice anything amiss, please let me know.

1 reply
Jason Pepas
@cellularmitosis
I've been picking up a bit of common lisp lately, and I came across this at-a-glance "simplified reference": https://jtra.cz/stuff/lisp/sclr/index.html
My first thought was "I should make one of these for Janet!"
sogaiu
@sogaiu:matrix.org
[m]
ooo, that looks nice with the groupings -- and even seems to fit on a single screen here
Florian Beeres
@cideM

:wave: The Janet version in Nixpkgs is really old 1.16.1 and I'd like to update it because I would like to play around with Janet. After updating to 1.19.2 I get a test failure during the build for suite0009:

11/11 test/suite0009.janet TIMEOUT        30.01s   killed by signal 15 SIGTERM
11/11 test/suite0009.janet TIMEOUT        30.01s   killed by signal 15 SIGTERM

The full log also only contains this error. I don't want to come across as lazy but maybe someone who's familiar with the Janet tests immediately knows what causes this.

The test file in question https://github.com/janet-lang/janet/blob/master/test/suite0009.janet does contain a test where the process is killed after 30s and expects to not find signal 24... but I don't know if this is just that the test runner was killed, or that the process was killed correctly but got the wrong signal.
sogaiu
@sogaiu:matrix.org
[m]
@cideM: the following is the output i get for make test with the current master branch: https://www.pastery.net/esvzev/
this is on a linux box
Florian Beeres
@cideM
I should have definitely added that I'm on an M1 MacBook but also that the tests in this case run in the Nix sandbox. I'll check this on my NixOS (Linux) machine. Be right back.
sogaiu
@sogaiu:matrix.org
[m]
iiuc, the test in question doesn't wait for 30s before killing.
my reading of the code is that the spawned process tries to sleep for 30s, but it is not likely to get very far before being killed by its parent.
Florian Beeres
@cideM
So... took a bit longer since I had to update some stuff. It passes on NixOS, so I'm inclined to believe this is not a result of the Nix sandbox but rather of Darwin, probably even specific to M1.
sogaiu
@sogaiu:matrix.org
[m]

the only issue i see that mentions m1 is this: janet-lang/janet#794

it seems to also mention suite 9

Florian Beeres
@cideM
I just cloned the repo and ran make test and this also passed on my M1 machine. Mysterious. Maybe some weird interaction between M1 AND the Nix sandbox.
Florian Beeres
@cideM

So I created a patch that removes the net/connect and net/server test, which is the one that's failing. With that out of the way, for now, I'm trying to also create a Nix package for JPM.

The docs mention PREFIX but don't really explain what this should be, they just say:

Generally, you will want to install to the same directory that Janet was installed

My assumption is that PREFIX needs to point at a Janet installation and DESTDIR is where I want jpm to be placed. If I now run PREFIX=${janet} DESTDIR=$out ${janet}/bin/janet $src/bootstrap.janet then the resulting tree is strange. It appears to split the path to Janet into segments and then re-create that hierarchy in DESTDIR.

In the command I added, ${janet} is the source of folder where janet is installed.

JPM tree:

$ tree /nix/store/az8320l6kcbrfzmmvxj965gk505giaqv-jpm-0.0.1
/nix/store/az8320l6kcbrfzmmvxj965gk505giaqv-jpm-0.0.1
└── nix
    └── store
        └── w9q7df3gi2pdq0vw214jkw4qffa9sg58-janet-1.19.2
            ├── bin
            │   └── jpm
            ├── include
            ├── lib
            │   └── janet
            │       └── jpm
            │           ├── cc.janet
            │           ├── cgen.janet
            │           ├── cli.janet
            │           ├── commands.janet
            │           ├── config.janet
            │           ├── dagbuild.janet
            │           ├── declare.janet
            │           ├── default-config.janet
            │           ├── init.janet
            │           ├── pm.janet
            │           ├── rules.janet
            │           └── shutil.janet
            └── share
                └── man
                    └── man1
                        └── jpm.1

Janet tree (${janet}):

$ tree /nix/store/w9q7df3gi2pdq0vw214jkw4qffa9sg58-janet-1.19.2/
/nix/store/w9q7df3gi2pdq0vw214jkw4qffa9sg58-janet-1.19.2/
├── bin
│   └── janet
├── include
│   └── janet
│       └── janet.h
├── lib
│   ├── janet
│   ├── libjanet.1.19.dylib
│   ├── libjanet.a
│   ├── libjanet.dylib -> libjanet.1.19.dylib
│   └── pkgconfig
│       └── janet.pc
└── share
    └── man
        └── man1
            └── janet.1.gz
Florian Beeres
@cideM
Or rather, it appears to look at the path to the Janet binary I'm invoking and uses this path and its segments when it creates the output folders.
sogaiu
@sogaiu:matrix.org
[m]
i think when @andrewchambers is around he may be able to help out
Florian Beeres
@cideM
Ah neat, I tagged him in the issue in nixpkgs as well
andrewchambers
@andrewchambers
@cideM will take a look
andrewchambers
@andrewchambers
I will make some time either tonight or tomorrow and we can get the new jpm etc packaged
that might be a janet bug.
andrewchambers
@andrewchambers
another problem is that jpm sort of wants janet to be in the same directory
i also would say its better to install jpm in your home directory and use the nix janet
then its free to install and remove packages
though we could definitely design something more comprehensive that lets nix and jpm work together
anyways, I have a WIP package with jpm but will need to continue on it tomorrow
Florian Beeres
@cideM
We could always use symlinkJoin in Nix to have a single derivation that then includes both Janet and JPM installed into the same directory. At least I think it would work
andrewchambers
@andrewchambers
yeah
i mean it would be nice to be able to do janetWithJPMPackages [ ... ]
but first I'll try to get the latest janet packages with jpm as an optional thing
sogaiu
@sogaiu:matrix.org
[m]

llmII: thanks for testing and the feedback!

you're right that the setup could be simplified. i'll think about that a bit -- i wanted to make it easy for people to opt out of bits they didn't want to use.

the menu is supposed to appear along with other ones along the top -- i guess some people disable it. will post a screenshot.

llmII
@llmii:matrix.org
[m]
sogaiu: interesting, gomuks tried to display the image but the fidelity is awful, opened it in the browser instead; That would be why I didn't see it however, I have the top menu disabled
sogaiu
@sogaiu:matrix.org
[m]
found this regarding doom and the menu bar: hlissner/doom-emacs#3926
llmII
@llmii:matrix.org
[m]
as to the opt out ordeal, could just put a comment above ceach var set with setq local (or after, or however) that would indicate optionality and that it can be disabled/enabled
sogaiu
@sogaiu:matrix.org
[m]
thanks for the suggestion -- will be considering it.
llmII
@llmii:matrix.org
[m]
cool, and also, I had menu mode disabled in my (now defunct) fully custom configuration... I didn't know people actually made use of it and I liked my one line more of text, but I also usually run emacs from a terminal and I imagine it would not do great in terminal mode
but that doesn't mean drop the idea/feature, gui mode is probably a more common usage by now, and it definitely would probably be helpful for others
sogaiu
@sogaiu:matrix.org
[m]

i don't remember things well enough to survive without menus :)

i find using the menu ok in terminal mode via emacs -nw and then f10 and arrow keys

llmII
@llmii:matrix.org
[m]
and my ordeal with combining the setq-local's was more an optimization from a standpoint of "don't call multiple functions if can get away with one", and I think right now, the way you have it is fine, just if there were more optional enablements it'd get unweilding doing a lambda per option I guess at some point
@sogaiu: do you use something like vertico/ivy/helm and an M-x helper?
sogaiu
@sogaiu:matrix.org
[m]
oh yes
llmII
@llmii:matrix.org
[m]
ah, those + which-key are my memory augments lol