Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 24 16:43

    bakpakin on master

    Add `math/gcd` and `math/lcm` t… (compare)

  • Oct 23 19:18
    bakpakin labeled #852
  • Oct 23 19:18
    bakpakin opened #852
  • Oct 23 14:59

    bakpakin on master

    Allow compiling tables as peg g… (compare)

  • Oct 22 12:56

    bakpakin on master

    Use named union in JanetGCObject Merge pull request #850 from py… (compare)

  • Oct 22 12:56
    bakpakin closed #850
  • Oct 22 12:56
    bakpakin closed #849
  • Oct 22 04:08
    pyrmont edited #850
  • Oct 22 02:53
    elimisteve closed #851
  • Oct 22 02:53
    elimisteve commented #851
  • Oct 22 02:47
    elimisteve opened #851
  • Oct 22 00:54
    pyrmont opened #850
  • Oct 21 23:17

    bakpakin on master

    Fix error for uname switch -o o… Add comment to explain Linux ch… Merge pull request #848 from py… (compare)

  • Oct 21 23:17
    bakpakin closed #848
  • Oct 21 10:23
    pyrmont commented #849
  • Oct 21 08:57
    pyrmont opened #849
  • Oct 21 08:45
    sogaiu commented #848
  • Oct 21 08:44
    sogaiu commented #848
  • Oct 21 05:23
    pyrmont synchronize #848
  • Oct 21 05:19
    pyrmont opened #848
andrewchambers
@andrewchambers
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
sogaiu
@sogaiu:matrix.org
[m]

i tried cloning bagatto's repository then:

cd bagatto
JANET_PATH=janet_modules jpm deps
JANET_PATH=janet_modules jpm build
JANET_PATH=janet_modules jpm install

that seemed to work

(above janet_modules was actually a full path)
i think that the bag executable ends up under janet_modules/bin/ in this case.
heyarne
@heyarne:matrix.org
[m]
Setting JANET_PATH to a full / absolute path already fixed the issue :)
sogaiu
@sogaiu:matrix.org
[m]
nice :)
heyarne
@heyarne:matrix.org
[m]

So

export JANET_PATH=/some/absolute/path
jpm install […]/bagatto

works fine

Thanks for the super quick response and help! 🙏
sogaiu
@sogaiu:matrix.org
[m]
glad it worked out!
subsetpark
@subsetpark:matrix.org
[m]
heyarne: please feel free to ping me if you’ve got any bagatto feedback or questions; I’m happy to hear that it piqued your interest :)
yumaikas-
@yumaikas:matrix.org
[m]
@pyrmont:
Assertion: (= (ymd 2021 1 23) (chrono/add-days (ymd 2021 1 20) 3))
Expect: {:month 1 :month-day 23 :year 2021}
Actual: {:month 1 :month-day 23 :year 2021}
^ Is there a potential reason why what should be two identical structs would compare wrong?
(defmacro ymd [y m d] ~{:year ,y :month ,m :month-day ,d} )
static Janet j_add_days(int32_t argc, Janet *argv) {
    janet_fixarity(argc, 2);
    JanetDictView date = janet_getdictionary(argv, 0);
    int32_t days_to_add = janet_getinteger(argv, 1);

    chrono_ymd ymd = date_from_dict(date);
    auto curr_date = year{ymd.y}/ymd.m/ymd.d;

    auto days_duration = std::chrono::floor<days>((sys_days)curr_date);
    days_duration += days(days_to_add);
    auto new_date = year_month_day{(sys_days)days_duration};

    JanetKV *dt = janet_struct_begin(3);
    janet_struct_put(dt, janet_ckeywordv("year"), janet_wrap_number((int)new_date.year()));
    janet_struct_put(dt, janet_ckeywordv("month"), janet_wrap_number((unsigned)new_date.month()));
    janet_struct_put(dt, janet_ckeywordv("month-day"), janet_wrap_number((unsigned)new_date.day()));
    return janet_wrap_struct(dt);
}
I can push up more details as needed but I'm curious why two structs that look the same would compare false?
andrewchambers
@andrewchambers
yes
yumaikas-
@yumaikas:matrix.org
[m]
@andrewchambers: Care to elaborate, or do you need more details?
andrewchambers
@andrewchambers
sorry, got distracted
so, perhaps one of those numbers is an int/s64
i've been bitten by this before
just a guess
yumaikas-
@yumaikas:matrix.org
[m]
Hrm....
I've had this working before, but accidentally deleted some code
Looks like type comparisons might be in order, though
andrewchambers
@andrewchambers
though it mostly seems like those would not be int/s64
so, not really sure
yumaikas-
@yumaikas:matrix.org
[m]
...
hrm
andrewchambers
@andrewchambers
could it be your test library has a bug ?
yumaikas-
@yumaikas:matrix.org
[m]
I doubt it?
andrewchambers
@andrewchambers
which library is it?
formatting the assertion
it could also be a janet compiler bytecode bug
yumaikas-
@yumaikas:matrix.org
[m]
When I use (assert-expr (= ) instead of assert-equal, I still get the same bug