freenode/#lisp - IRC Chatlog
Search
5:38:17
burzos
Is there a variable I can toggle to force `format` to always show the dot in proper lists?
5:40:14
beach
I don't think so. FORMAT probably just calls the appropriate PRINT function, so ultimately PRINT-OBJECT. But you are not allowed to modify the standard behavior of PRINT-OBJECT. You can try doing it anyway and see. Why do you need this?
5:41:39
burzos
I have assoc lists and I'm `format`ing them in a user console, but it's confusing when some of the entries are dotted and some aren't (because the value can be a list or an atom).
5:44:31
beach
You can always print it "manually". I mean, the REPL is not meant to be used for end-user stuff.
5:46:26
burzos
Yeah. The frontend def needs a lot of work, this is just for debugging in the interim.
5:47:16
loke
He only wants to display the first level using ditted notation, and doing that is trivial with format (FORMAT T "(~s . (~{~s~^ ~}))")
6:22:44
beach
More generally, it is impolite, because you kind of encourage dozens of people to click on links that might be of no interest to them. So you are wasting people's time.
6:34:04
onion
what about notes and comments about someone's behavior, i can see this being more productive if it was a personal concern, kept privately. but i notice some people are looking at CL implementations on the web so i thought i would share that right where those people have been asking. maybe my timing is off
8:33:11
johnnymacs
I have done an apt-get install ecl and when I check the filesize of /usr/bin/ecl it appears to only be 6 kilobytes
8:33:29
johnnymacs
Somehow that does not seem posible to me. Can embedded common lisp really be that small?
8:37:39
beach
Usually, systems like that define a minimal subset of Common Lisp written in some other language, then the remaining Common Lisp functionality is written in that minimal subset.
8:40:33
johnnymacs
Is there a ftp where I can find some precompiled binaries for different architectures for ecl?
8:42:12
johnnymacs
on the busybox website they have a list of all the main archs, a few arms, windows, linux x86 linux x64
8:44:30
jackdaniel
so you either have to rely on your distribution packager (i.e Linux package managers, Windows has freebox, there is package on Google Play maintained by Polos), or you build it yourself
8:45:05
johnnymacs
I guess buxybox does come with dpkg or rpm so it should be able to install the debian or fedora packages
8:47:46
jackdaniel
one more thing: given you use busybox I assume you won't have C compiler on the machine
8:48:46
jackdaniel
(one example of maintaining prebuilt binaries: say we had one you like, you download it and it doesn't work, because it was built with assumption C compiler is on the host)
9:00:04
stacksmith
johnnymacs: Raspberry Pi works really well with CCL and reasonably well with SBCL, and you can get a decent linux going. I used it as my main system for a few months. US$35
9:00:48
Shinmera
SBCL unfortunately does not have threads on 32 bit ARM, and I think there's still no distro that really offers ARM64 for the Pi 3.
9:03:17
stacksmith
Originally I wanted to use it as a secure computer of sorts, but it uses the GPU to boot with god knows what code...
9:03:23
flip214
debian removed all the "incompatible" warnings for rpi3 in the last few months, so I'm about to try booting the 4.15.0-1-arm64 directly.
9:05:19
stacksmith
I wound up switching to a bigger box because my monitor is too big for the Pi, but otherwise I hardly ever noticed any issues with speed or memory...
9:06:21
stacksmith
Actually I stepped on it once and destroyed it. But it took about 30 seconds to swap SD cards and cables with another RPI.
9:32:41
beach
loke: The reason that the visible area in the buffer of Second Climacs is not adjusted when the cursor goes outside it is that there are two cases.
9:32:46
beach
One is when the cursor is moved as the result of the execution of a command, in which case, the visible area should follow the cursor.
9:32:47
beach
The other is when the user scrolls so that the cursor is outside the visible area, in which case, the cursor should be moved instead. I need to think about how to distinguish those two cases.
9:34:04
beach
I guess maybe I can try to detect when this situation happened as a result of executing a command.
9:36:33
beach
But sometimes the cursor must be moved to be inside the area, and sometimes the area must be moved so that the cursor is inside it.
9:36:39
loke
So, if you decide to not allow it, then the situation is quite simple, IMHO. When cursor moves: Adjust scroll location. And when scroll location changes, adjust cutsor.
9:38:12
beach
Come to think about it, maybe you are right. I was afraid that the first case would then trigger the second case.
9:39:04
loke
beach: Well, it could. I seem to recall Emacs having that problem. But... It was caused by a callback function executing after a scroll. That callback function moved the cursor, triggering a loop.
9:40:48
beach
I think I'll do the following: After the execution of any command, check whether the cursor is outside the visible area, and if so, adjust the viewport.
9:41:26
beach
Then, when replaying the contents of the visible area, first check whether the cursor is outside it, and if so, move the cursor first.
9:41:28
loke
But, the fact that the discussion was quite recent, and they survived for a couple of decades before anyone stumbled on it suggests that the issue is less common than one might think.s
9:42:25
beach
If the cursor moved as a result of a command, it will then be in the visible area, so no action will be taken in the second case.
9:42:43
beach
If not, then the area moved as a result of scrolling, so the cursor will be moved first.
13:43:26
cess11_
puchacz: Perhaps https://stackoverflow.com/questions/41378669/how-to-get-a-stream-from-a-bit-vector-in-common-lisp could be of help.
13:46:24
lieven
it's a pity the standard only has with-input-from-string and make-string-input-stream and not the corresponding ones for octets
14:12:35
jcowan
If I want to make a package which does not :use any other package, is :use () always going to work?
14:23:16
Zhivago
I think I'd prefer to see cl::foo instead of guessing, although perhaps things like + might be worth directly importing.
14:23:35
dlowe
so what you want is something like (defpackage foo (:use) (:import cl defun cond if lambda))?
14:26:07
Zhivago
Probably the criterion should be to import it when you use it enough to get tired of looking at the cl:: on it.
14:30:31
jcowan
well, I want to export certain cl symbols as well, and I was under the impression that you cannot export anything that you have not defined or imported; is that wrong?
14:32:15
jcowan
dlowe: I am trying to provide an implementation of ISLisp that will work on any CL, thus saving me a lot of work
14:33:17
dlowe
jcowan: right, you can export whatever symbols you want, regardless of whether or not they are bound to something.
14:34:18
jcowan
The point is that if you :use the islisp package, you will get some names that ultimately come from the common-lisp package and others that are defined in the islisp package *under names that exist in the common-lisp package*.
14:35:58
jcowan
*mostly* names that are the same in ISLisp and CL have the same semantics, but not always
14:36:12
dlowe
jcowan: I think your understanding is correct, except the symbol just has to exist in the package, it doesn't have to be used for anything.
14:36:25
Zhivago
Well, just export the names that name things with the semantics that you want to export.
14:37:13
jcowan
Zhivago: if I did that, you'd have to import the common-lisp package into ISLisp code, which would pollute the namespace
14:37:45
dlowe
wow, islisp solves character encoding difficulties by pretending that there are only 95 characters.
14:39:12
jcowan
The ISLISP character set has at least ninety-five printing characters plus a newline character.
14:39:44
Zhivago
jcowan: You never need to import the common-lisp package -- you can always just import particular symbols from common-lisp.
14:40:24
jcowan
but I have to import them (with their definitions) if I plan to export them, because otherwise they are not in the package.
14:41:12
Zhivago
A package is just thing for turning "FOO" into "BAR::FOO" automatically, pretty much.
14:41:42
Zhivago
It isn't a module, it doesn't contain stuff -- it just knows how to turn unqualified symbols into qualified symbols.
14:42:44
Zhivago
So there's no problem with a package turning "FOO" into "CL::FOO" and "BAR" into "ZOO::BAR".
14:42:59
jcowan
What I'm saying is that if a symbol is not locally used nor imported, it cannot be exported
14:43:45
jcowan
if I refer to IF as CL:IF, then exporting IF will export a symbol whose print name is "IF" but which cannot be used as IF by any package that uses me.
14:45:02
Zhivago
Use a second package to set up the user environment rather than developer environment.
14:45:36
Zhivago
Then it can import and export CL::IF and FOO:BAR and whatever is convenient for a user.
14:47:01
jcowan
(cl:if x this that) is not valid ISLisp for expressing a conditional: you have to write (if this that)
14:49:21
dlowe
if that was the case you couldn't be able to use (if this that) from the CL-USER package
14:53:52
jcowan
It will have to begin (use-package :islisp) (in-package :islisp), I don't see any way to avoid that.
14:54:36
shka
it produces object that can be quered for cardinality and combined with other object of the same type to calculate cardinality of union
14:55:01
shka
would it be reasonable to call combination function "union", or is it to far stretched?
14:56:32
Zhivago
If the name is really shka-cardinality-thingy::union and it is documented, I don't see why not.
15:24:13
Shinmera
bjorkintosh: https://www.reddit.com/r/lisp/comments/6qc61v/second_edition_published_interpreting_lisp/
15:25:44
jcowan
ACTION steals the opportunity to say "windowless monad" on both #lisp and #haskell within a few minutes
15:26:27
bjorkintosh
Shinmera, thanks a lot. I think this is the relevant thing: This book is actually an introduction to a language called GOVOL that completely became dead - googling for it gives not even a description of the language, excluding quotes from this book itself.
15:27:25
bjorkintosh
shka, because the author probably thought 30 years is a long enough time for anyone to have forgotten about the first one?
15:27:45
jcowan
A book whose intro begins "LISP is commonly implemented with an interpreter program called the LISP interpreter" is surely not worth reading
15:28:40
Bike
Hullo, MOP question. at what point are slot specifications (like (bar :initarg :bar) and whatnot) turned into actual slot definitions? MOP seems to say ensure-class-using-class does it, but elsewhere has an example where MAKE-INSTANCE is called directly with slot specifications.
15:28:41
jcowan
bjorkintosh: No, but he says the name has the same origin as JOVIAL, which stands for "Jules's Own Version of the International Algorithmic Language" (i.e. Algol 58)
15:29:16
dlowe
Bike: I believe MOP has a finalize-class function which is called before any instance is created.
15:29:17
jcowan
JOVIAL actually did catch on as a language for military applications: it has a lot of specialized real-time and low-level I/O stuff
15:29:45
makomo
jcowan: i was just about to mention a related thing. google for "semantic designs" and JOVIAL
15:30:23
makomo
semantic designs is a company that specializes in code refactoring. one of the things they've done is rewritten a million or so lines of JOVIAL code for a military stealth bomber i think?
15:31:10
Shinmera
Bike: Maybe you can BREAK on DIRECT-SLOT-DEFINITION-CLASS to see where it's called in existing implementations.
15:31:22
makomo
the engine itself is written in a "homebrew" version of lisp that was built to support parallelism
15:32:44
bjorkintosh
well, algol should be properly considered a half sibling of Lisp since St McCarthy the first left his imprint on it!
15:32:48
makomo
it's not open source but it's interesting just to read about. also, the main guy behind the tool answers a lot of parsing technology-related questions on stack overflow
15:33:24
makomo
quite fascinating stuff. they parse C++ completely from an auto-generated parser. no manual work at all.