Search
Saturday, 23rd of December 2017, 5:38:19 UTC
8:16:09
whoman
oh boy. "understanding one macro does not yield to understanding all of macrology, any more than understanding a particular formula of a particular theorum yields to understanding the whole of mathematics."
8:26:30
beach
whoman: Where is that quotation from?
8:28:23
antoszka
Book of the Prophets, Ez. 4,1.
8:41:08
whoman
beach, i reworked it from just below here: https://letoverlambda.com/index.cl/guest/chap3.html#sec_6
8:44:16
whoman
kind of also like saying : understanding a programming language, does not mean understanding the program written with it
15:28:52
Posterdati
please how can I overwrite a line with format? Thanks
15:29:05
pjb
This is not a feature of format.
15:29:30
pjb
The best way to do it, would be to use cl-charms (ncurses).
15:29:51
pjb
However, in practice, you may also make some implementation dependent assumptions.
15:30:27
pjb
Like, if your implementation writes ASCII bytes converted from your character, then you could use the semi-standard character name #\return.
15:30:28
loke
Posterdati: You _might_ be able to do it by sending a CR.
15:30:55
pjb
(format t "Foo Bar Baz~CBar~%" #\return)
15:31:07
pjb
Yes, if it is available, it's its name.
15:31:43
pjb
#+#.(cl:if (cl:ignore-errors (cl:read-from-string "#\\return")) '(:and) '(:or)) (format t "Foo Bar Baz~CBar~%" #\return)
15:31:55
pjb
Posterdati: yes, I forgot to mention the condition: if your terminal interprets it.
15:32:05
pjb
Posterdati: ie. not in slime!
15:32:34
pjb
For slime have a look at: https://framagit.org/nasium-lse/nasium-lse/blob/master/src/swank-terminal.lisp
15:32:56
pjb
Posterdati: So you have to use a I/O layer with #+swank/#-swank
15:33:07
pjb
check this nasium-lse project for more example about this.
15:34:18
pjb
There's also another way: you can open a xterm from a running program. So even if you use swank/slime, you can still open an xterm and send it ECMA-048 control sequences.
15:34:51
pjb
But it relies on implementation specific features, to open a pipe to the xterm and make a stream of it.
16:53:33
makomo
is there anything in CL like haskell's mapConcat?
16:54:00
makomo
map a function over multiple lists, concatenate the resuting lists and return that
16:54:34
jackdaniel
(reduce 'append (mapcar 'foo list-1 list-2)) ;?
16:55:03
makomo
err, mapping over one list at a time
16:55:18
makomo
unless i'm mistaken about how MAPCAR (& co.) work?
16:55:52
makomo
from what i understand, if you give MAPCAR multiple lists it calls the function by passing it all of the current heads at the same time
16:56:22
jackdaniel
and what do you want to do? one after another?
16:56:33
makomo
an example of what i want would be (map-concat #'1+ '(1 2 3) '(4 5 6)) == (2 3 4 5 6 7)
16:59:27
jackdaniel
I think there isn't something builtin
16:59:47
jackdaniel
(mapcar #'1+ (flatten list-1 list-2 …))
17:00:30
jackdaniel
or not flatten, append rather
17:01:45
makomo
jackdaniel: ah that's much nicer, i was going to do it with a loop
Saturday, 23rd of December 2017, 17:38:19 UTC