~subsetpark

http://zdsmith.com

Trackers

~subsetpark/erasmus

Last active a month ago

~subsetpark/bagatto

Last active 8 months ago

~subsetpark/fugue

Last active 2 years ago

~subsetpark/doozer

Last active 2 years ago

~subsetpark/ec

Last active 3 years ago

~subsetpark/tamerlane

Last active 3 years ago

~subsetpark/sl

Last active 3 years ago

#1 Add location to filename in ref a month ago

Ticket created by ~subsetpark on ~subsetpark/erasmus

foo.md:12 will go to line 12 under gf.

#22 datestr->secs breaks bagatto on FreeBSD 8 months ago

Comment by ~subsetpark on ~subsetpark/bagatto

Hi there-

Thank you for the kind words. Unfortunately, as last I checked, there was no native method to convert between the two, and thus this rather ugly hack.

However, it should be totally optional - you should be able to write a function that shells out to whatever other command you need, and you shouldn’t need to invoke this one.

Have you encountered otherwise? You say that Bagatto can’t be used—is there somewhere that the whole program breaks as a result of the different format? If so, that is probably a bug and I’ll definitely try to fix it.

On Mon, Jul 31, 2023 at 9:51 PM ~mieum outgoing@sr.ht wrote:

Hello!

I have discovered that bagatto cannot be used on FreeBSD due to the use of a flag to date that is not available on that system (the -d flag to be precise). Trying to run bag index.janet fails with the following error:

date: illegal option -- d
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
            [-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
            [[[[[[cc]yy]mm]dd]HH]MM[.SS] | new_date] [+output_fmt]
error: Distribute error:
Encountered error getting attrs for data spec posts:

command(s) (@[date -d "2022-12-02" "+%s"]) failed, exit code(s) @[1].
  in errorf [boot.janet] on line 169, column 3
  in distribute-gather [src/threads.janet] (tailcall) on line 39, column 22
  in main [main.janet] on line 52, column 23

The equivalent flag on FreeBSD is -r, but in fact the syntax is slightly different. Is there no way to convert between datestrings and seconds in the janet standard library? I am not yet very familiar with janet, but if I can find the time I will mess with this and submit a patch!

Thanks! I really love the project!

-- View on the web: https://todo.sr.ht/~subsetpark/bagatto/22

#15 What should happen when you call `:new` on a child instance? 2 years ago

Ticket created by ~subsetpark on ~subsetpark/fugue

Right now it crashes:

repl:4:> (def a-tab (new-Tab))
@Tab{:_meta @{:object-type :instance}}
repl:5:> (:new a-tab)
error: expected iterable type, got nil
  in new-from-Tab [repl] on line 3, column 1
  in _thunk [repl] (tailcall) on line 5, column 1

#3 Automatic array interpolation? 2 years ago

Ticket created by ~subsetpark on ~subsetpark/doozer

Sqlite doesn't support arrays as parameters, but you can construct one by iterating the param in wrapping in ().

How would we best support that? Some kind of backend-implemented hook on arbitrary operators?

#2 Performance optimizations 2 years ago

Ticket created by ~subsetpark on ~subsetpark/doozer

In reply to andrewchambers (andrewchambers)
 a nice feature might be automatically precompiling a query if it is possible to do so Yeah, one thing that might be interesting is, detect if the compose-query call is happening at compile time - and if so, automatically cache the output of to-sql onto the query itself.

You could further take advantage of that by saying, ‘ok, we’ve got this pregenerated query - you can change any of the literal values in the query and we won’t regenerate it; we’ll just replace the parameter’

#1 maybe: `(:foo bar)` as alias to `(. foo bar)` 2 years ago

Ticket created by ~subsetpark on ~subsetpark/doozer

#14 match doesn't work with prefixed symbols 2 years ago

on ~subsetpark/fugue

REPORTED RESOLVED FIXED

#14 match doesn't work with prefixed symbols 2 years ago

bug added by ~subsetpark on ~subsetpark/fugue

#14 match doesn't work with prefixed symbols 2 years ago

Ticket created by ~subsetpark on ~subsetpark/fugue

repl:11:> (macex1 '(match token
repl:12:((>       (@ parser/Special {:value char}) (handle-special s char)
repl:13:((>       _ (eval/eval-and-push s token)))
(as-macro <function match> token {:_name "parser/Special" :value char} (handle-special s char) _ (eval/eval-and-push s token))

We are taking the name directly and using that in the pattern match. Instead, we should try to eval the symbol, get the name off of the actual table, and use that.

#9 Allow creation of prototypes inheriting from raw tables? 2 years ago

Comment by ~subsetpark on ~subsetpark/fugue

defproto call succeeds;

repl:7:> (:new Foo)
error: expected iterable type, got nil
  in new-from-Foo [repl] on line 3, column 1
  in _thunk [repl] (tailcall) on line 7, column 1

creation fails