freenode/#lisp - IRC Chatlog
Search
19:38:24
makomo
so in the end, the only solutions are (1) use the original macro and EVAL to make it work for an arbitrary number of arguments or (2) write two versions of the same macro
19:42:20
_death
the fact that you call gensym by yourself already indicates an issue.. after all once-only is supposed to hide the use of gensyms
19:43:19
makomo
these are the symbols that then get rebound, but nobody cares about them anyway, because nobody knows their names and what initforms they correspond to
19:43:33
makomo
we care about the gensyms made by ONCE-ONLY, those that are part of the expansion that ONCE-ONLY helped write
19:44:11
makomo
this isn't something the user does, this is just to actually implement the list version of ONCE-ONLY
19:45:47
makomo
and EVAL wouldn't even be a problem if i didn't have to explictily pass variables of the using macro to ONCE-ONLY-LIST so that they're available in the EVAL
19:46:06
_death
if you look at your final fbind macro, it looks pretty similar to the fbind that uses a function that returns the gensyms and the bindings
19:48:35
_death
https://plaster.tymoon.eu/view/842 ;; remove the silly gensym->name that was there to make a point
19:49:40
makomo
right, but i don't see how that's a bad thing. it's not something you can avoid either, since there's an arbitrary number of symbols you have to create
19:51:55
makomo
the call to this function and then binding its results and using them to prefix my own macro with a LET
19:53:33
_death
and still you can have a once-only-list macro that doesn't use once-only and it should be much simpler
19:54:16
makomo
although it then requires that the author plan ahead for the arbitrary version right away, instead of the constant version
19:55:11
makomo
hmm. yeah, the arbitrary one evaluates at macroexpansion time so maybe that's why it appears to be different?
19:58:52
auricle
hello fellows, I have not found a GLL parsing library for CL so I am going to translate one from this Racket GLL library: https://github.com/epsil/gll/blob/master/3/parser.rkt
20:00:39
makomo
_death: huh... i don't think the constant version can be written using the arbitrary version... without EVAL
20:20:26
pjb
makomo: in scheme eval takes an environment argument (like macroexpand or the macro functions). This is what makes it actually rather useless! You don't usually have the environment you want to evaluate things…
21:01:04
auricle
Xach: so one can finally just write literally the BNF grammar one wants without having to factor it at all, like a human being
21:02:43
auricle
Xach: that seems liek a beefed up regex library. I think GLLs are like beefed up PEGs (they can parse CFGs)
21:03:58
auricle
Xach: by that I meant being able to write "expr -> expr + expr" whereas that would never work in most parsers... you'd need to factor it out; not so with GLLs
21:06:10
auricle
Xach: have you ever translated a library from scheme that I could use as a reference for all the tricky "..." (scheme's macro ellipses) etc?
21:25:36
auricle
Xach: in case you're interested there's apparently a so-called "Earley algorithm" that gives us PEGs with left-recursion. anyway, I'm out, have a good day, and thanks for all you do for CL
23:52:38
didi
Is anyone aware of an expression language for defining dates? Like CL-PPCRE accepts a parse tree for defining regular expressions.
0:27:12
pierpa
check out Calendrical Calculations, and use whatever they use (and their software is written in CL, and is available from the publisher website, although with a weird license)
1:36:46
sjl_
defining an after method on initialize-instance is a pretty common idiom. I don't know that I've seen it done on make-instance very much.
1:36:59
skidd0
when I make an instance of a list, i want to auto add that list to a .. list of lists..
1:38:31
skidd0
I have an interactive function that prompts the user for info (like name, tags, about) and then pushes the new list onto a special var *task-lists*
1:40:38
Xach
skidd0: i think i would not do it that way, because it can be nice to make objects without causing a side-effect like that, e.g. when you're just testing things out.
1:43:19
skidd0
but it's worth noting that I always want the task-lists to be added to the list of task-lists
1:44:03
Bike
for testing i've pretty much never regretted being able to make a thing without side effects
1:49:15
skidd0
with make-task, i'm thinking that's basically taking the init args and then using them in a make-instance
1:51:26
Zhivago
Isn't this just a matter of creating a constructor function which also adds the thing it constructs to a list somewhere?
1:54:29
White_Flame
but once you have automatic behavior, then you want to make it optional, you need to have side-band ways of passing in options to that automatic behavior
1:55:06
skidd0
and then, i'll have a really complex way to make lists, and have spent a while learning how to do that, and still not have tasks
1:56:36
White_Flame
btw, (defun maker (&rest params) (let ((obj (apply #'raw-maker params))) ...)) is how you pass through parameters
1:57:05
Zhivago
Probably your problem involves 'making a data structure for some particular purpose', and that just happens to involve lists today.
3:01:54
cnx
hi there, somehow i can no longer load swank server due to `Package ASDF does not exist.'
3:27:40
White_Flame
it's always best to install SBCL from source, instead of from your package manager, due to weird issues like this
3:38:39
White_Flame
if you start SBCL from the commandline and type (require :asdf), what do you get?
3:43:29
White_Flame
it shouldn't just "break", so I would suspect something external in the environment
4:01:26
makomo
phoe: did you take a look at the macros i wrote (regarding the FBIND thing we discussed) :D?
4:09:04
White_Flame
cnx: REQUIRE is a deprecated, implementation-specific thing that's usually only used for implementation built-ins
4:10:07
White_Flame
asdf:*central-registry* is the list of directories it looks for .asd files to load
4:10:27
White_Flame
quicklisp also has a couple for the quicklisp distributions as well as local-projects
4:30:28
White_Flame
cnx: because you asked for asdf:*central-registry*, that means that that symbol was defined in the package, aka it loaded
4:30:58
White_Flame
NIL means the value was defined. It would have blown up with an error if neither that package nor symbol existed
4:38:28
cnx
I'm feeling kinda sick now, I guess I'll try to get more sleep and debug this later, thanks White_Flame
5:25:10
minion
There are multiple help modules. Try ``/msg minion help kind'', where kind is one of: "lookups", "helping others", "adding terms", "aliasing terms", "forgetting", "memos", "avoiding memos", "nicknames", "goodies", "eliza", "advice", "apropos", "acronyms".
5:27:46
makomo
minion: memo for Bike: the "const-size" version of once-only implemented using the list version: https://plaster.tymoon.eu/view/850#850. no EVAL! i guess the most general way to go about it then is to always write a version which works with an arbitrary number of forms and then derive the const-size version from it.
5:28:04
makomo
minion: memo for pjb: the "const-size" version of once-only implemented using the list version: https://plaster.tymoon.eu/view/850#850. no EVAL! i guess the most general way to go about it then is to always write a version which works with an arbitrary number of forms and then derive the const-size version from it.