freenode/#lisp - IRC Chatlog
Search
12:52:07
ecraven
the more I work at the SLIME repl, the more I understand how powerful PRESENT and ACCEPT actually are :-/ I wish SLIME and Emacs could implement them
13:16:14
phoe
This page says nothing about the dangers of using NCONC when the lists in question share structure.
13:19:20
ggole
Defining the exact operation of every list operation for cyclic list structure would probably be a mistake
13:21:59
Bike
you get #1=(1 2 3 4 5 6 . #1#). printing that will loop if you have print-circle off, ofc.
13:26:41
Bike
also, not sure why that hangs in sbcl. if you do (apply #'nconc (mapcar #'identity (list x y))) it's fine.
13:36:23
Bike
i mean mapcan uses nconc. that's destructive. pretty much tells you 'oh, the things being nconced ought to be fresh"
13:59:10
flip214
when loading a big XML file using CXML, how would I parse only the first few levels via callbacks in the handler but either skip entire subtrees or get them as a CONS tree structure?
14:14:21
flip214
I guess I should be using KLACKS, and then pass the sub-documents via SERIALIZE-ELEMENT to MAKE-XMLS-BUILDER...?!
14:38:00
phoe
The lambda list for EXTREMUM is (sequence predicate &key) - it's no predicate there, it's a test.
14:39:33
francogrex
scymtym: good question. so all indications telling that that mem is not executable however for the 32 bit, it is?
14:48:00
sjl_
phoe: > predicate n. a function that returns a generalized boolean as its first value.
14:49:31
sjl_
it calls it predicate because it says > if the subsequence ... was sorted using PREDICATE and KEY.
14:50:31
sjl_
an argument of TEST typically checks for equality, but that's not what it's used for in sort/extremum
15:02:38
phoe
(By the way, I apologize - I'm way too nitpicky nowadays. My day job is seriously getting on my nerves and wrecking my calmness.)
15:03:46
sjl_
I know that feeling. My solution was to quit the job (luckily I was able to find a new one).
15:13:45
phoe
I'll find out by the end of the year if the *new* money is worth it. New, as in, the amount I ask for.
15:37:07
didi
So, as far as I can tell, when calling a function using `~/package:function/' with `format', `format' doesn't care if the symbol `function' is exported or not.
15:38:38
beach
flip214: First one: How is ASLR unrelated to the fact that a Unix process has full access to its entire address space?
15:41:41
ggole
ASLR means that instructions are mapped into the process at (boundedly) randomised locations
15:43:04
beach
I claim that ASLR would not be necessary if the process did not have access to its entire address space.
15:46:00
ggole
You pretty much need direct access to instruction memory if you want to be able to call a function
15:46:01
beach
In the same way as a Common Lisp system does not let the user access an arbitrary address on the stack or on the heap.
15:46:50
beach
I thought I could skip that part, because my question was relative to the CLOSOS document.
15:47:16
beach
I am not sure I am up to re-typing the entire argument here and now. I have had a long day already.
15:47:22
ggole
Are you intending to rely on well defined, safe software to avoid entirely the possibility of the things that ALSR is a mitigation for?
15:49:25
beach
*sigh*, again, I thought I could rely on flip214 knowing what I refer to. Sorry about that. I should be more precise in the future.
15:50:49
beach
Many people here already know what I am referring to, and I should not have assumed that everyone does.
15:55:59
beach
So what happened was that flip214, who is an excellent proofreader, did what he often does and for which I am grateful, namely he took a document I have written and went over it with a fine-tooth comb.
15:58:22
beach
Most of his remarks are uncontroversial and I just go ahead and incorporate them. But occasionally I have questions about them.
16:04:27
oni-on-ion
yeah. i've no alternative, so i cant directly say anything, just that it felt wierd to type and read in both upper and lower cases
16:06:25
beach
oni-on-ion: It is my best guess that most people will never have to neither read nor type it.
16:07:30
oni-on-ion
again, havent said it is not fine, also have not suggested to change it or anything. just asking if there was particular reason for what it *is* currently
18:23:12
jcowan
two questions: how strong is the convention that package names (at least user-visible ones) use only uppercase letters and hyphens?
18:26:18
jcowan
second, is CLtL1 online anywhere? I have a hard copy, but I wanted to look up something quickly
18:27:11
pfdietz
Hyphens vs. underscores is traditional. I suspect it goes back to the character sets at the start of Lisp not having underscore.
18:30:51
pfdietz
Package names being upper case comes from the default reader, which is again traditional, and which upper cases everything. Lower case characters would require escaping with | |.
18:37:58
didi
I always wonder what would break if I change `readtable-case'. For example, how many packages use `foo' and `"FOO"' as synonyms.
21:48:01
phoe
Which are function objects, symbols that name functions, and SETF forms that name functions.
21:49:01
phoe
It seems that the only difference is that ENSURE-FUNCTION does not work in case of lambda forms.
22:33:01
didi
In `format', can I fix the value of `v' so it's used for multiple args? For example, instead of writing (format t "~{~vD~}" (list 5 1 5 2 5 3)) so (eql v 5), I want to write something like (format t "~{~vD~}" 5 (list 1 2 3)), that is, `5' only once.
22:38:57
pjb
didi: (format t "~:{~VD~}" (mapcar (lambda (x) (list 5 x)) '(1 2 3 4 5))) #| 1 2 3 4 5 --> nil |#
22:39:08
LdBeth
jcowan (IRC)jcowan (IRC) Original text of CLtL1 is included in CLtL2, the later is annotatiton on first version for mofifications.
22:40:28
pjb
didi: (defun fmt-5V (stream val colon at &rest args) (format stream "~5D" val)) (format t "~{~/fmt-5V/~}" '(1 2 3 4 5)) #| 1 2 3 4 5 --> nil |#
22:41:40
didi
pjb: This is interesting. I tried something like that with `FLET', but the function wasn't found.
22:41:48
pjb
didi: (defvar *w* 1) (defun fmt-D (stream val colon at &rest args) (format stream "~VD" *w* val)) (let ((*w* 5)) (format t "~{~/fmt-D/~}" '(1 2 3 4 5))) #| 1 2 3 4 5 --> nil |#
22:44:27
didi
It's a little brittle. I wrote a version of ~D that also accepts strings as arguments to use with ~/.
22:48:14
pjb
~D already accepts strings. ~A is left align, and ~D is right align: (format nil "~5A ~:*~5D" "Foo") #| --> "Foo Foo" |#
22:51:35
pjb
But strangely (well, not really), only clisp implements padchar with ~D correctly for non-integers: (format nil "~5,,,'*A ~:*~5,'>D" "Foo") #| --> "Foo** Foo" |# "Foo** >>Foo" in clisp.
0:01:50
gendl
Hi, how do we feel about the :iterate system? (from Jonathan Amsterdam; available in Quicklisp from repository maintained by Attila Lendvai on gitlab.common-lisp.net)?
0:02:49
gendl
I am with a customer who is dealing with converting a bunch of old code using a proprietary ICAD iteration construct called `let-streams'
0:03:33
gendl
I have also been gifted a set of functions which purport to translate let-streams forms into iterate forms.
0:04:07
gendl
well, ICAD does not exist anymore, so this code must be migrated off of let-streams somehow or other.
0:04:54
gendl
The customer has also embarked on a consulting project which converted the let-streams into LOOP constructs.
0:05:10
gendl
To me, these let-streams look much more similar to iterate forms than they do to LOOP.
0:06:02
Bike
the main selling point of iterate is that it can do what loop does, but with a more regular "lisp like" syntax
0:06:51
gendl
I'm leaning toward nudging the customer in the direction of iterate, if this is something I am going to sign up to support.
0:07:12
gendl
The customer is probably going to want to tend toward sticking with something which is in the standard, if possible, though.
0:07:38
gendl
But if I can make a case that iterate is stable, well-defined, not likely to disappear or experience chaotic changes...
0:09:37
Bike
well, as far as stability goes, the cl-net page says it predates the standard, so it's not like something someone came up with on a whim five minute sago
0:10:53
gendl
they were something of competitors back in the day, though neither made it into the standard, in favor of LOOP.
0:12:21
Bike
that is kind of weird, but you can get similar weirdness from typed value accumulation in lisp
0:14:09
aeth
Where I've gotten weirdness in LOOP is an unreachable code deletion warning in SBCL for ":for foo := (bar ...)" where foo isn't used on the first iteration through the loop.
0:14:39
aeth
Since ":for foo := (bar ...)" presumably expands to ":for foo := (bar ...) :then (bar ...)" when there's no then
0:16:58
aeth
If you want no magic, use DO because that's usually pretty directly expanding into a LET over a TAGBODY with a GO when you macroexpand-1.
0:17:55
aeth
On the other hand, the magic is sometimes very useful, like collect/append (there are higher order function equivalents, but only when not collect/append is not conditional)
0:19:38
aeth
And while LOOP is normally equivalent to DO* for things like :for foo := (bar) :then (baz), there is no short :for foo := (bar) with DO*. Not having the increment step is like LOOP's :with. So it could potentially reduce a lot of duplication there