freenode/#lisp - IRC Chatlog
Search
17:20:49
makomo
MichaelRaskin: in this case i'm considering both function and macro operators. in general, what if i wanted to collect only the macro operators, how could i tell, once my :on-function-form-pre handler is called, that the operator is really a macro?
17:21:35
MichaelRaskin
Well, you could ask metaenv if it knows such a macro, and if not, ask its fallback-env for a macro-function
17:30:32
akater
casouri: There's a nice little guide to symbols and packages http://www.flownet.com/ron/packages.pdf
17:31:51
Xach
there are a few things i really dislike about that guide. it is ok if you disregard the tone of "isn't this a badly-designed and foolish thing I have to explain for you?"
17:36:51
akater
I guess it's very subjective. I tried to consult PCL on exactly 3 subjects: packages, CLOS, conditions. Each time I failed to find an answer to my question. Since then I don't recommend that book. But this paper did help me with packages.
17:42:32
Xach
Well, "better" is perhaps not the right term. I appreciate their breadth and accuracy.
17:47:43
akater
Why is it that (time (series:subseries (series:scan-range) 0 4)) reports 0 consing, and yet SERIES object has DATA-SO-FAR slot that is filled with some apparently cached results?
17:53:11
Xach
akater: (time (cons 1 1)) similarly returns 0. perhaps there is a certian amount of available allocated space that must fill up before it registers in TIME. (i don't know the true answer, sorry.)
18:27:09
Moosef
Hey I am trying to create a simple web api. Does anyone know a good library/libraries for this. I have been looking at ningle so far.
19:07:44
slightlycyborg
I cant access a slot of a parent class using slot-value. The parent class is defined in a seperate package. I am getting the slot-missing error.
19:09:32
pjb
slightlycyborg: this is why you should instead define an accessor function, and export the name of the accessor function.
19:21:48
fiddlerwoaroof
cage_: that library looks interesting, I've generally used https://github.com/fukamachi/ningle
19:22:54
fiddlerwoaroof
One nice thing about ningle is that you can switch between various webservers fairly easily, including a fastcgi one, for proxying with nginx or similar
20:47:10
makomo
MichaelRaskin: not sure if i already asked you this before, but i definitely forgot if i did: does the EXPAND-VIA-FUNCTION macro in your paper have a slight typo regarding backquote/commas?
20:59:14
makomo
MichaelRaskin: hm, but if e-v-f expands into code which evaluates to the expansion of its body, how is it possible for the evaluation of the example to yield (1 3)? shouldn't the evaluation yield the mentioned expansion?
21:01:04
makomo
MichaelRaskin: oh, also, when trying to load e-v-f itself i get an error because there are nested commas without a corresponding backquote
21:10:17
makomo
MichaelRaskin: even with that fix the example doesn't evaluate to a list of 2 elements. does macroexpanding something that looks like '<form> make sense? sorry if i'm missing something obvious. the transcribed code is here: https://plaster.tymoon.eu/view/1203#1203
21:16:29
makomo
true, but isn't the macroexpand-all in this case recieving the result of `',form, i.e. the result of (list quote form), so that it ends up macroexpanding a quoted form (which iiuc doesn't do anything)?
0:14:07
reepca
eh, I guess it wouldn't be too hard to just use an explicit with-clause and a 'do (incf ...)'
0:16:07
reepca
I was thinking more along the lines of, suppose that I'm iterating over a sublist (tail of some other list), but I'm given the starting index of said sublist in the list it's part of, and I want to keep track of what the index is in the larget list.
0:17:38
verisimilitude
You could always embed a LOOP inside of another LOOP, if that simplifies things, reepca.
0:18:06
reepca
well, the way I would usually go about keeping track of an index in a loop would be 'sum 1 into k' or something like that.
0:21:10
reepca
I guess I hadn't really thought about using multiple FOR clauses. So it would end up looking something like (loop for k from initial-index for x in (nthcdr initial-index list) ...)
0:29:27
reepca
https://paste.debian.net/1068504/ here's what I've got so far (automating some operating systems homework).
0:36:07
verisimilitude
Rather, I'll tell you to look at POSITION, FIND, POSITION-IF, and FIND-IF; these solve half your problem, giving the position or the element, and I've not looked at how you're using FIRST-FIT to see which you actually need; I leave that to you, reepca.
0:39:32
reepca
well, the issue there is that while using FIND followed by POSITION would work for FIRST-FIT, it would involve traversing twice.
0:44:20
verisimilitude
You're just using this to see if a list contains a number or the closest number larger than it, right?
0:46:06
reepca
and to get the position of it in the list. The idea is to then write some code to simulate certain sequences of allocations being made with the various selection methods and generate a nice table.
0:51:31
verisimilitude
Oh, that MAXIMIZE doesn't work, actually, because I unconditionally store the index; in any case, you get the gist of how to approach this.
1:01:19
reepca
well, if the MAXIMIZE clause is never executed, then M is unspecified (I want it to be NIL if no appropriate value is found)
3:57:11
reepca
hm, now I'm trying to replace a (dotimes (i n) (format t "+--")) with (format t "~v@{+--~}" n), but then there needs to be a dummy argument, otherwise it doesn't enter the loop at all. Is there a way to change the format string to make this dummy argument unnecessary?
4:26:35
verisimilitude
You could use ~0* in the main loop of the FORMAT statement, but chances are that would result in suboptimal code.