freenode/lisp - IRC Chatlog
Search
4:33:46
didi
Uh. Evil http://www.nhplace.com/kent/Papers/Technical-Issues.html gave me the idea for https://paste.debian.net/hidden/62100c7d . Evil.
4:44:36
didi
gilberth: Scheme doesn't have this issue? http://www.nhplace.com/kent/Papers/Technical-Issues.html says it can happen with Lisp_1 too.
4:45:18
gilberth
didi: Don't ask me. I just was kidding, because Schemers think our macro system is dirty.
4:48:50
gilberth
didi: Perhaps it can, I tried to be funny in a way. Though I don't remember much Scheme. I love my dozen namespaces.
4:52:02
didi
gilberth: Nope. I tried reading CLtL2, but this stuff is hard. I guess I'll stay with (defmacro mfn (x) (fn ,x)) for now.
4:53:12
gilberth
didi: OK, if that works for you, the better. But dig the different evaluation times when you have time for that.
4:58:50
PuercoPope
is there any reason to prefer ash vs dpb/ldb when 'buidling' integers from octets? Most code I've found in the open uses ash but I'm inclined to think it is more a more a consquence of familiarity with C
5:00:47
gilberth
And here is why: The exact "subsequence" of bits named the byte is explicitly mentioned in the involving BYTE.
5:13:26
PuercoPope
its also more 'clear'. "I want to put this bytes here" instead of add this number and move them to the right X times
5:14:08
PuercoPope
I was surprised to learn that ldb only works on integeres. Is there a reason why it couldn't work on floats?
5:15:42
gilberth
You also could do, say, (DEFCONSTANT +OPCODE-BYTE+ (BYTE 4 28)) and later just (LDB +OPCODE-BYTE+ X)
5:23:36
gilberth
To answer the original question: Yes, I believe DPB/LDB is "cleaner", but people are just used to ASH/LOGAND/LOGIOR because of C idioms.
5:27:08
gilberth
You were asking, why it wouldn't work on floats. So imagine it would, what would happen?
5:30:05
gilberth
ANSI CL specifically does not stick to any particular float encoding. Even decimal floats are possible. See INTEGER-DECODE-FLOAT or what ever that is called.
5:35:37
PuercoPope
I as unware there were different encoding to floats, in that case it doesn't make sense for ldb to work on floats.
5:36:58
gilberth
Did you imagine for LDB and DPB to work on the underlying bit pattern? Instead of the mathematical value?
5:38:39
gilberth
As in: I have a double --- that are 64 bits --- here and there is the exponent and there is the sign?
5:43:59
gilberth
And then the IEEE format is nuts anyway, I hope we replace it by something more reasonable.
5:48:31
PuercoPope
gilberth: yeah, like single-float had only one representation. But if it is like chars, it is a good idea to not leak the concrete encoding into the rest of the language
5:49:40
gilberth
PuercoPope: Correct. That way to extend the character datatype to 29-bit code points didn't hurt.
5:51:48
gilberth
So, when we make contact to aliens, which have their own 40-bit character set, we could easily extend the character data type with no damage done. :-)
5:54:08
gilberth
Actually I love that. We run code, which is 30 years old or older. And it'll still run in 30 years.
6:00:03
PuercoPope
One problem with old code is loading it. Not all old code used mkdefsystem which translates more or less to ASDF. For example loading op5 in SBCL is not straighforward. But I agree its nice for code not to bitrot
6:01:31
gilberth
Well, that is loading "only". Look at CXML for example. I started to write that some 20 years ago and people still use that. Though I have no idea who maintains it right now.
6:05:59
gilberth
There is still older code out there. I still use lalr.lisp from 1988, initially written by Mark Johnson.
6:07:37
gilberth
Point is: I love that Common Lisp is machine independent. In C an "int" is something different everywhere.
6:10:39
gilberth
That once was a straight 72 hour session to convert from some strange typesetting system to SGML and generating HTML.
6:13:50
PuercoPope
I haven't bothered to learn texinfo and now that you can generate info manuals from Org mode I don't think I'll ever will. Its a pitty because modern documentation tools pays little attention to things like indexes
6:16:36
PuercoPope
It helps w/ autocomplete at the very least. But having indexes is a prerequiste to having proper search
6:17:56
gilberth
What I find more important is the term/concept idea. We have that in the CLIM spec. It says, say, "The argument x must be a foo."
10:01:26
feynhat
I am trying to use this library called "kenzo", which I have installed via quicklisp.
10:03:10
White_Flame
in the SLIME repl, kenzo:<TAB> to see what autocompletes is a good starting point to read
10:10:39
feynhat
phoe, was it really necessary though? I am sure people who are familiar with lisp would have figured this out quickly.
10:39:24
MichaelRaskin
The expectation is that either you defvar/defparameter the variable in advance, or create a local binding with let
11:03:43
jackdaniel
but if we assume that we ask about "potential" function, then question is meaningless
11:04:48
jackdaniel
asdf_asdf_asdf: defvar may be put as part of function body, but it is rarely what you want
11:05:27
jackdaniel
so if you use this variable elsewhere, then compilation will either fail or warn you about undefined symbol usage
11:07:55
jackdaniel
I think that you would benefit from reading some introductory material for programming (and if you have some experience, reading practical common lisp obok)
11:08:01
minion
asdf_asdf_asdf: please see pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
11:22:03
Grue`
minion: memo for didi: you can avoid that with (funcall 'square ,y) because then you're only calling standard functions which cannot be redefined with flet, and 'square takes the global definition of square
14:47:07
dtw
dlowe: Here is my own quick hack that may need further polishing and thinking (function UNESCAPE-C-STRING): http://paste.debian.net/1074448/
14:57:16
vms14
https://stackoverflow.com/questions/48932481/lisp-macros-quotation-implementation-in-javascript