freenode/#lisp - IRC Chatlog
Search
7:01:40
ealfonso
I'm trying to md5 an image from the web, but using ironclad: (ironclad:digest-stream :md5 (drakma:http-request "https://github.com/favicon.ico" :want-stream t)) I get "Unsupported stream element-type FLEXI-STREAMS::CHAR* for stream #<FLEXI-STREAMS:FLEXI-IO-STREAM {1004B2CE73}>." Is there an easy way to change the stream element type to the correct one?
7:04:37
|3b|
ealfonso: from https://edicl.github.io/drakma/#arg-want-stream, "If you want to read binary data from this stream, read from the underlying stream which you can get with FLEXI-STREAM-STREAM. "
8:41:38
beach
Luckily, we are using Common Lisp, so implementing an idea is fairly easy, compared to some other languages.
8:42:19
Shinmera
no-defun-allowed: You implement it and then half a year later you realize it was crap and do it over again until that stops happening
8:43:36
beach
My colleagues in the generation before me had no experience in actually writing code, but they had read in the software engineering literature that you have to design before implementing. That rule was created when designing was relatively easy and implementing was hard (punch cards, batch processing, delays...).
8:44:19
Shinmera
Well, designing ahead of time is still a good idea, just to braistorm ideas and architectures
8:45:05
beach
Lycurgus: These colleagues were all theoreticians, and this is France, so there was comparatively little practical work done in academia at the time.
8:46:49
Lycurgus
well coding generations are less than 10 years anyway. I like to think about it till I match it up with enough done stuff to make my work doable.
8:46:57
beach
I still write specifications first sometimes, especially when I know that implementing and testing it is going to be hard, like for the SICL garbage collector.
8:48:37
Shinmera
I need to start documenting some bits of Trial because even I'm starting to lose track of how everything was supposed to fit together
8:51:19
Shinmera
I also have an idea for an ELS paper based on some more Trial work that builds on what I presented this year.
9:20:07
Demosthenex
i've been having a hardware issue causing crashes (laptop sleep), is there a way to make slime save the comint history frequently?
12:24:06
hjudt_
any idea why my sb-impl::*default-external-format* is :ansi_x3.4-1968 inside a docker container and not :utf-8? or what i do have to set to choose :utf-8 support automatically?
12:25:54
hjudt_
locale tells me cannot set to default locale: no such file or directory for LC_CTYPE, LC_MESSAGE and LC_ALL
12:28:04
hjudt_
maybe. sbcl knows about :utf-8 because i can specify it when using with-open-file and it works.
12:30:02
hjudt_
yes. i will see what is installed, maybe some locales package is still needed in the image.
12:49:08
scymtym
hjudt_: if i recall correctly, you can use the C.UTF-8 locale without installing additional packages
13:13:33
hjudt_
i've added "RUN localedef -i en_US -c -f UTF-8 en_US.UTF-8" to the dockerfile, now it works.
14:45:05
jdz
scymtym: I recently got burned by C.UTF-8 locale because it is defined only in Debian (and derived) distros.
14:46:45
jdz
Yes, and my understanding is that it is hard-coded in glibc and cannot be generated using /etc/locale.gen.
14:47:40
jdz
My gripe with the software that unconditionally uses such locale is that said software does not first check if the current locale has UTF-8 support.
14:48:52
jdz
But then again, most software up until recently only supported ASCII, and even now most software does not support left-to-right and top-to-bottom writing systems.
14:49:51
loke
jdz: Using that locale is bad. But assuming that you have a UTF-8 locale is becoming a reasonable thing to do.
15:41:50
skidd0
also, do I need to structure my code so that macros are defined before they are used?
15:46:51
pfdietz
Macros get executed at compile time, so they absolutely must be defined before use.
15:53:08
gendl
Hi, I'm having trouble completely understanding an :around method for an asdf:perform (tried reading ASDF manual but I'm still a bit lost). Here's the file in question:
15:53:33
_death
skidd0: update your quicklisp dists.. this should update the project nibbles, which ironclad uses.. it used sbcl internals that were changed, and had to be patched
15:53:51
gendl
The way this is written, after that asdf-tricks.lisp is compiled/loaded into Lisp, it will affect any file of type "cl" forever more, is that right?
15:54:20
gendl
If possible, I'd like to have it affect only a certain ASDF system, which is gonna be named "zaserve" or "aserve"
15:55:46
gendl
otherwise, what that `with-zacl-build-environment' does is bind a modified readtable around its body -- i'd prefer not to make that start happening with any and all .cl files which get processed after zacl is loaded...
15:58:27
_death
skidd0: also, if you've already updated nibbles, then the patch is not backwards compatible and you should update sbcl..
16:00:17
_death
(ql:update-client) to make sure you have latest quicklisp, then (ql:update-all-dists)
16:00:17
gendl
pfdietz: I see... so anyway the only way it would be a problem as it is now, would be if someone else is also using :cl-file as a class in their .asd file.
16:00:38
gendl
it won't affect all files of type "cl" unless they're using the same class name to specify that file type
16:01:33
gendl
but still, it seems like it would be safer to have a more specific and guaranteed unique class name.
16:03:48
gendl
But, in order for :components ((:cl-file ...)) to work, the class cl-file _has_ to be put into the asdf package, right?
16:04:33
gendl
similarly if we do (defclass asdf::zacl-cl-file (asdf:source-file) ...) it necessarily has to be in the asdf package... right?
16:05:16
pfdietz
I don't know. If it's a keyword being translated to a class name, they probably yes. But can the class name itself be used there?
16:06:24
gendl
pfdietz: good question. I'll play around with it. I've only ever seen it be a keyword, tagging those :components.
16:09:15
spm_
silly question: Where in the hyperspec do I look to see the rules around string formatting that allow the cl reader to convert into object/structs? i.e. If I want to read a stream and have the reader be able to convert directly into CL objects, where do I find those rules.
16:10:21
HighMemoryDaemon
Anyone here use both Common Lisp and Racket? What do you love about both languages? I'm still a beginner and learning about ASDF/Quicklisp. I like that package management is quite simple and familiar in Racket. Great documentation around Racket as well.
16:19:09
pfdietz
It is. And if you are invoking sbcl from slime, you should set it. The emacs variable slime-lisp-implementations allows one to specify its value in the :env part of list members.
16:21:25
beach
HighMemoryDaemon: One of the great strengths of Common Lisp is that it has a standard, published by an independent standards organization. It is independent, in the sense that the standards organization does not supply any Common Lisp implementations, and the people writing the implementations can not influence that standard. As I often say, the project leader for a software project who chooses a language without an independent
16:23:37
gendl
pfdietz: ok it works to use a non-keyword symbol (naming a class) instead of e.g. :cl-file
16:25:40
gendl
Apparently it's not universally kosher to redefine packages at will - e.g. SBCL always throws a warning when redefining a package.
16:26:12
gendl
(or is it only if the redefinition is somehow not compatible with the previous definition?)
16:27:02
Bike
"If the new definition is at variance with the current state of that package, the consequences are undefined" from clhs defpackage.
16:27:31
gendl
Bike: Ok. So that means that if the new definition is _not_ at variance, then we're kosher. Right?
16:29:07
Bike
gendl: that handles most basic cases, like loading a system twice with no changes in the middle
16:29:26
skidd0
is there anything other that the directories in local-packages that I should also remove
16:33:25
_death
please show a transcript of ls ~/quicklisp/dists/quicklisp/software , sbcl --eval '(ql:quickload "ironclad")'
16:38:10
pjb
(setf *error-output* (open "/tmp/stderr" :direction :output :if-does-not-exist :create :if-exists :append)) ; why stderr? in CL, it's *error-output*.
16:38:47
pfdietz
It means SBCL could benefit by offering public APIs for some things that both sides could agree would not change often. There's demand there. A project on my back burner is to characterize these trespasses to prioritize possible APIs.
16:39:07
skidd0
_death: https://bin.0x00sec.org/?991731ad9b75cda2#u//C19bBps2faueVhesd3J0cyy7/B1RUUEYgnZavk1I=
16:46:13
_death
you should either remove ironclad from local-projects and update quicklisp dists or clone both ironclad and nibbles and work with those
16:57:24
dim
about ironclad failing to compile, as in https://github.com/dimitri/pgloader/issues/834, do we know what to say to our dear users?
17:02:58
pjb
To implement the restart part, you could write a little script: #/bin/bash \n while true ; do sbcl ; done Call it /usr/local/bin/lisp, and (setf inferior-lisp-program "/usr/local/bin/lisp") in ~/.emacs
17:07:52
dim
you can use ,restart-inferior-lisp, thanks to autocompletion it's only 3 keystrokes here (, r RET) from the SLIME prompt
17:31:14
gendl
Hi, is there something like ccl:lookup-hostname and ccl:ipaddr-to-hostname in sbcl, or in usocket or another standard library?
17:31:18
dim
I can't wait until we have a good story with the McClim editor/IDE solution that some people are working on here, btw, as a solid alternative to Emacs/SLIME
17:33:29
skidd0
but my workflow was slower and I struggled trying to set up spacemacs in a way i liked
17:33:46
skidd0
i spent more time configuring the thing than using it, which i've heard is common with all emacs types
17:34:41
dim
well I've spent way more time than I care to admit until I had my Emacs setup as I like it, and I have now been using that for years without a change
17:42:01
dim
if you're using a macos you might want to try the Clozure-CL IDE too, it might work for you
17:43:58
gendl
Hi, is there something in usocket or another library for finding a hostname based on an IP (dotted or undotted), or vice versa?
17:46:35
Bike
there's sb-bsd-sockets, which despite the name is supportedon at least three implementations
17:49:44
anamorphic
gendl, there is also https://common-lisp.net/project/iolib/manual/iolib.html#Address-Functions
17:53:53
gendl
but i'm not sure if I want to introduce all these C and lib dependencies just for a couple functions...
17:58:00
gendl
Ah, I'm seeing stuff like get-host-by-name. Missed those the first time through the manual somehow, sorry.
17:59:15
makomo
skidd0: i'm using spacemacs and i'm quite happy with it. anything in particular that bothered you?
18:01:39
gendl
_death: it has an unexported usocket::host-to-hostname, but that is returning just dotted IP in stringified form.
18:03:48
jcowan
beach: So it's your view that only Ada, APL, APT (a numerical control language), Basic, C, C++, Cobol, Common Lisp, Dibol, Forth, Fortran, Mumps/M, PANCM, Pascal, PL/B (aka Databus), PL/I, Rexx, Smalltalk, and SQL are fit for purpose?
18:04:51
jcowan
That would cause a pretty serious slaughter among the leaders of programming projects.
18:11:28
_death
jcowan: I think you can add JavaScript there though, which shows that it's not the whole story ;)
18:30:34
jcowan
_death: The question is then what counts as an independent organization. ISO, ANSI, IEEE certainly, but that doesn't get you very far nowadays
18:30:39
sukaeto
in the case of Ada, the "[compiler writers] can not influence [the standard]" clause might rule it out
18:34:42
sukaeto
yeah, Ada 2012 is the latest revision. I believe there'll be a new one in 2020. I was just pointing out that some of the things adopted by the standard over the years were originally extra libraries offered by a particular implementation
18:37:48
makomo
skidd0: hm, this is the first time i heard of vim-wiki. taking a quick look and it seems like 0.01% of what org-mode offers you :-)
18:39:08
makomo
skidd0: well, then just don't use it :-), but sooner or later i think you'll want to use at least some of it
18:41:08
makomo
skidd0: for example, i have all of my phone contacts stored in an org-mode file (and it's readable as well, trust me). using org-vcard, i export the contacts into a vcard format and import them on my phone. easy peasy
18:42:20
makomo
i'm using org-mode to store them because (1) i don't want to store them in the cloud and (2) it serves as a backup if my phone dies or i acidentally format it (which i did once...)
18:43:08
makomo
skidd0: yeah, correct. if someone else wants to work on org-mode files, they can use any text editor, but they'll have the best experience with emacs of course
18:43:52
makomo
except that maybe vim-wiki is simpler and has less features, so it would be easier to do "bare handed"
18:44:12
makomo
you don't have to live in it of course, but where else would you take your notes? :-D