Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:07
    llmII commented #847
  • 10:09
    pepe commented #847
  • 08:56
    pyrmont opened #847
  • Oct 18 19:48
    elimisteve closed #834
  • Oct 18 19:48
    elimisteve commented #834
  • Oct 18 12:49
    sogaiu commented #834
  • Oct 17 01:30
    bakpakin commented #833
  • Oct 17 01:28
    bakpakin closed #794
  • Oct 17 01:28
    bakpakin commented #794
  • Oct 16 22:57
    hdcos commented #794
  • Oct 16 22:53
    llmII commented #794
  • Oct 16 22:50
    hdcos commented #794
  • Oct 16 22:49
    hdcos commented #794
  • Oct 16 21:26
    llmII commented #794
  • Oct 16 21:19
    hdcos commented #794
  • Oct 16 20:28

    bakpakin on v1.18.1

    (compare)

  • Oct 16 20:05

    bakpakin on master

    Prepare for patch release. (compare)

  • Oct 16 17:51

    bakpakin on master

    Fix typo in docstring Merge branch 'master' into jgar… Merge pull request #843 from jg… (compare)

  • Oct 16 17:51
    bakpakin closed #843
  • Oct 16 17:51
    bakpakin synchronize #843
damnpepe
@damnpepe:matrix.org
[m]
I am using miniz for on the fly minimizing of the RPC requests without any problem https://git.sr.ht/~pepe/hemple/tree/master/item/hemple/init.janet#L25
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
Hm i suppose that’s true!
yumaikas-
@yumaikas:matrix.org
[m]
Can peg/replace interact with captures?
1 reply
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]

This message is replying to a Matrix event but we were unable to find associated bridged Gitter message to put it in the appropriate threaded conversation.

Ah, I know the reason I couldn’t use match. I didn’t want to bind to the object, I wanted to bind to the result of getproto on the object. In other words, IF x is a table, and IF x has a prototype, then do something with the prototype.

bakpakin
@bakpakin:matrix.org
[m]
Zach Smith (subsetpark): Sounds like cond + when-let is what you need. Or you can write your own macro, could be useful
Zach Smith (subsetpark)
@subsetpark:matrix.org
[m]
Yeah. If I wrote my own macro would you want a PR @bakpakin?
bakpakin
@bakpakin:matrix.org
[m]
If it seems general enough for inclusion into the core but I would encourage you to make it specific to your own use case
heyarne
@heyarne:matrix.org
[m]
Hi :) I've stumbled over janet a while ago and I'd like to try it for bagatto, which seems like a simple static site gen
I can't install it via jpm for some reason. jpm install https://git.sr.ht/~subsetpark/bagatto eventually fails with
Error building git repository dependency: could not find module temple:
    janet_modules/temple.jimage
    janet_modules/temple.janet
    janet_modules/temple/init.janet
    janet_modules/temple.so
I tried manually installing temple via jpm install https://git.sr.ht/~bakpakin/temple and so a temple.janet exists inside janet_modules
Is still get the above error. Can somebody explain why?
andrewchambers
@andrewchambers
did you accidentally leave JANET_PATH unset when you installed temple?
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....