Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 07 14:36

    bakpakin on master

    Add some more changes to hashin… (compare)

  • Dec 07 14:27
    bakpakin commented #889
  • Dec 07 14:25

    bakpakin on master

    Address #889 - Switch high and … (compare)

  • Dec 07 14:17
    bakpakin commented #889
  • Dec 07 14:17
    bakpakin commented #889
  • Dec 07 10:07
    felixr commented #889
  • Dec 07 10:06
    felixr commented #889
  • Dec 07 09:54
    nulldatamap opened #891
  • Dec 06 23:27

    bakpakin on master

    Prepare for 1.19.2 release. Upd… (compare)

  • Dec 06 23:27

    bakpakin on v1.19.2

    Prepare for 1.19.2 release. Upd… (compare)

  • Dec 06 23:22

    bakpakin on master

    More improvements to hashing fo… (compare)

  • Dec 06 22:47
    felixr commented #889
  • Dec 06 17:00
    pyrmont commented #889
  • Dec 06 14:51

    bakpakin on master

    Don't use janet_stacktrace anym… (compare)

  • Dec 05 22:34

    bakpakin on master

    Prepare for 1.19.1 release. Update hash mixing behavior - a… (compare)

  • Dec 05 21:35
    felixr commented #889
  • Dec 05 21:12
    bakpakin commented #889
  • Dec 05 21:10
    bakpakin commented #889
  • Dec 05 20:16
    bakpakin commented #889
  • Dec 05 20:13
    felixr commented #889
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
andrewchambers
@andrewchambers
I see
yumaikas-
@yumaikas:matrix.org
[m]
It's @pyrmont 's testament library, though it might be a few versions old at this point
andrewchambers
@andrewchambers
wait i think i see the bug
yep
so
you have janet_struct_begin but no janet_struct_end
@yumaikas:matrix.org ping, i wonder if valgrind would pick that up
the symptoms of that are quite fun
yumaikas-
@yumaikas:matrix.org
[m]
Ah, yeah, that'd do it. Would that also cause my windows laptop to start locking up?
andrewchambers
@andrewchambers
um, i guess if it caused some sort of cpu spin or memory hogging, but i really don't know. I wouldn't have thought so.
but it is possible
yumaikas-
@yumaikas:matrix.org
[m]
huh
That's a derp on my side
andrewchambers
@andrewchambers
its not totally obvious
since the wrap call feels like a sort of final operation
:P