freenode/#lisp - IRC Chatlog
Search
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
18:46:31
makomo
skidd0: oh, that's neat i guess, but i was thinking of "notes" in the "plain text" sense. i'm not sure what i would go with if i stored my hand-written stuff (such as notebooks) digitally
18:50:48
skidd0
I'm trying to milk my education for all it's worth. But i get the sense that there are major holes
18:54:59
pjb
ACTION is wondering what kind of cheese you can make from the milk milked from an education…
19:00:43
skidd0
they teach "here's a linked list" but none of the context around why it was designed
19:04:37
Bike
it's not a full history exactly, but it's at least a starting point, which is more than what most math texts do
19:06:59
oni-on-ion
apparently the guy is taking it further into big talks and such, ive only seen the original article, but personally very relate
19:10:00
oni-on-ion
also this i came across last night, half-read but very enjoy much inspire, not language-specific, from linus torvalds https://www.brynmawr.edu/cs/resources/beauty-of-programming
19:10:36
TMA
skidd0: from my experience: the missing things are patience and the ability to think out a bigger chunk of code without trying to actually run it on a computer A bigger chunk of code is on the order of APPEND (two list version only) for this purpose
19:14:11
oni-on-ion
LdBeth: it is a very useful skill for C coding. especially back in the day when the edit-compile-run cycle was a big taxing
19:14:41
skidd0
TMA do you mean like, mentally walk through the types, the methods, why it *should* work?
19:15:11
oni-on-ion
it feels good to write a bunch of bug free code and see it happen all at once than small increments of carefully asking the compiler for guidance at each baby step
19:16:37
oni-on-ion
well since the computer can be seen as an external manifestation of our existing sequential computation abilities, all u need is to have no life, and its like english where it becomes natural. where we can "see" ahead, to know how someone will react, in real time while we are talking [programming]
19:16:42
TMA
skidd0: actually perform _any_ reasoning about the code. normally it is just woodoo programming -- change this or that based off some random snippet from the internet -- and try it -- without any mental model
19:16:56
oni-on-ion
skidd0: i am only on that level for C/c++/objc and Haskell and somewhat Ocaml and smalltalk, really.
19:17:38
oni-on-ion
its like watching a movie where we can be almost sleeping and still see whats happening. when we read a book that is challenging we need to internalise stuff and digest and visualise and let our mind become changes etc.
19:17:55
skidd0
the only time i end up trying out 'snippets' is when i've hit a wall trying to reason through the issue
19:19:29
LdBeth
skidd0: the general idea is programming should be friendly enough for people from other fields to utilize it
19:19:51
TMA
some people are like the ancients though, thinking before doing, but I seem to encounter mostly the described kind
19:21:01
skidd0
but when first dipping into the water, i'm certainly more likely to flap my arms around
19:21:44
oni-on-ion
TMA i often wonder how much time is spent thinking back in the day, zoning out, really getting into the zone of creativity..
19:22:25
jasom
I think doing it properly requires having a mental model, and then changing the mental model whenever reality contradicts the mental model. Some people never really form a mental model, others insist on not making any changes until their mental model is 100% correct; one results in bugs, the other results in low productivity.
19:23:25
jasom
right. I see a function called "rename-file" and I assume it renames a file. If I observe it *not* doing so then I need to do some more investigation.
19:24:07
jasom
perhaps it silenty fails when the rename target exists, for example. That would be surprising and require an update to my mental model.
19:24:53
jasom
It's totally okay to have an incomplete and wrong mental model as long as you are on the alert for evidence that contradicts it.
19:25:15
oni-on-ion
always good to keep mental model in sync with reality , never really a time where it is good to not do that unless we are going insane.
19:25:47
jasom
oni-on-ion: if your mental model needs to be perfectly in sync with reality then that greatly constrains the complexity of problems you can tackle.
19:29:10
jasom
humble hubris though, if that's not a contradiction in terms. Act as though you are right while remembering you are probably wrong about at least something.
19:29:39
jasom
If you wait until you know everything before you act as if you know everything, then you won't ever act.
19:30:53
jasom
OTOH if you continue to act as if your initial thought was correct *after* reality has shown you to be wrong, you're not acting with hubris, but just stupidity.
19:32:38
oni-on-ion
yeah no this is important though =) because with lisp we got to be careful to not let it destroy our minds with its power
19:33:53
oni-on-ion
i would like to just add, that hindsight is 20/20, its near-impossible to figure out or define what is currently going on, without destruction and murder of it.
19:43:40
jcowan
skidd0: The point of general education requirements is that a university is not, nor is it intended to be, a vocational training school.
19:44:20
skidd0
they sold it to all my generation as "you want a job programming? to to college to become one"
19:56:06
pfdietz
In light of Griggs vs. Duke Power, it's surprising employers in the US still can ask if you have a college degree. https://en.wikipedia.org/wiki/Griggs_v._Duke_Power_Co.
20:07:52
jasom
pfdietz: if you want to continue talk, Griggs v. Duke is actually part of why colleges are now a gateway
20:09:09
Shinmera
paradoxical would be a program that clears itself out of the icache as it's being executed.
20:10:07
phoe
unless we literally define a program that cleans up all parts of Lisp that are no longer needed in its execution
20:23:48
phoe
(progn (set-macro-character #\( nil) (fmakunbound 'progn) (fmakunbound 'set-macro-character) (fmakunbound 'fmakunbound))
20:24:24
phoe
Unless you have some symbol macros bound just in case, I think that's a finishing move
20:58:21
russellw
Okay, what's the difference? At least if you are going to standard output, they both write all the characters of the string?
20:58:36
Shinmera
write-string only accepts strings. princ is a shorthand for write with print-escape and print-readably being false
20:59:26
Bike
not sure. i think princ in the middle of something else might hit print circle and stuff
20:59:29
Shinmera
or in other words, write-string copies the contents of a string to the character stream. princ prints a representation of an object to the stream
21:00:12
Shinmera
russellw: whether they do the same thing or not is irrelevant. They're there for different purposes.
21:01:23
russellw
Okay so they do the same thing if the argument is a string, but are there for different purposes, that's fine
21:19:33
aeth
russellw: You can think of the print functions as having three layers of abstraction (although terpri seems to occupy the bottom two layers). The bottom layer is write-foo (where write-foo is writing to a character stream and not a byte-stream). The middle layer is prinfoo. The top layer is format.
21:21:21
russellw
aeth, cool. But does Lisp distinguish between character and byte streams? If so, are character streams implemented on top of byte streams? If so, does that mean byte streams are a fourth level of abstraction?
21:22:55
aeth
Oh, I should clarify that write-foo on a character stream expects strings or characters, with the exception of write-sequence, which for character-streams expects sequences of characters (so '(#\A #\B #\C) is apparently valid there)
21:23:30
aeth
prinfoo and format foo could handle conversions, and could be built on something of the lower level
21:25:38
aeth
But now you have the situation where your string is utf32 and your character stream is reading/writing utf8 or something along those lines.
21:29:35
jasom
russellw: many implemenations provide bivalent streams (character & byte), and there are 3rd party libraries that implement bivalent streams on top of byte streams.
21:30:12
aeth
afaik (write-string "abc") could be taking in #(00 00 00 97 00 00 00 98 00 00 00 99) and writing #(97 98 99)
21:30:56
jasom
aeth: lisp actually allows more metadata on characters than just the character code IIRC
21:31:21
russellw
Yeah, that stuff is a headache in every language, so lisp certainly cannot be blamed for the headache
21:32:02
aeth
jasom: I'm assuming that if it's the byte representation of the string, the metadata is probably at the start, once. Similar to how you can get ([un]signed-byte 64) arrays without boxing
21:33:42
jasom
of course utf-32 leaves room for 8 bits of metadata should the implementation wish to use it.
21:34:26
aeth
oh, and I say *could* be writing #(97 98 99) because when (with-output-to-string (*standard-output*) (write-string "abc")) it'll be writing the longer 00 00 00 97 ...
21:35:22
jasom
russellw: anyways see http://edicl.github.io/flexi-streams/ for portable flexible streams. Note that there is some performance overhead though.
21:37:18
aeth
I assume what's comme is internal storage as utf32 and external non-string reading/writing as utf8, but that doesn't have to be the case, and I think some implementations have the encoding configurable. (For the rest I guess you have to use things like babel and work with byte streams?)
0:30:02
aeth
(The part that reads UCI input from a chess AI, not the part that sends UCI output from a chess AI, although that might be the next logical step.)
0:53:09
aeth
I want to (defclass foo-file (source-file) ...) or (defclass foo-file (cl-source-file) ...) and write the absolute minimum necessary to get the file to load and compile via ASDF.
0:54:00
aeth
For the sake of simplicity, I'll do this with cl-brainfuck since I already have a function that turns a foo.bf file into a foo.lisp file.
0:56:16
aeth
So I have (defclass brainfuck-file (source-file) ((type :initform "bf"))) (but might need to turn that into a subclass of cl-source-file and use a cleverly-placed :before method) and I have a function that when given the pathname for a .bf brainfuck file reads it and creates a .lisp Common Lisp file.
0:58:02
aeth
What I want to do is have an ASDF component (:brainfuck-file "foo") that creates an intermediate .lisp file and then handles that created file like a .lisp (:file "foo")
1:00:18
aeth
(Is the Brainfuck version of this useful? No, but what it is is 100% complete. I can already go hello.bf => hello.lisp => hello.fasl and then #'load that fasl and have SLIME say "Hello World!" I just cannot do that through ASDF.)
1:09:03
gendl
aeth: Subclassing cl-source-file and using a :before method to process the .corresponding .bf file into the actual the actual .cl or .lisp file seems intuitive to me.
1:09:38
gendl
that way you don't have to re-write the actual code for doing the compile/load of the cl file
1:09:48
aeth
My best guess at the moment is that I should be subclassing cl-source-file and then replace the source pathname in a :before
1:11:13
gendl
and just have the :before method go look for a file with :defaults source-file :type "bf" and call your cl-bf function to yield the actual .cl source-file just-in-time.
1:12:58
gendl
the position of obsessive ASDF expert is open right now as well, as far as I can tell... (Faré, when will make your fortune in crypto and come back to do CL as your retirement hobby??)
1:13:39
gendl
rpg is somewhat of an expert as well as the official maintainer as far as I know, but he's not around just now.
1:21:39
aeth
Well, by the time it gets to the ops like compile-op, the object c of class brainfuck-file already has the absolute-pathname ending in /cl-brainfuck/hello.bf
1:33:24
no-defun-allowed
cool, now i don't have to write a weird clustering algorithm to find all but the last syllable and things
1:42:46
Bike
i don't know what you mean about slots. you can add slots if you like. you can access existing slots with the defined mop accessors.
1:43:07
no-defun-allowed
actually, i'm not sure if it's a metaclass. i want to make a class similar to standard-class which i want to make instances of
1:44:37
no-defun-allowed
the class will also carry a hidden metadata value which will contain instructions for de/serializing instances
1:46:26
no-defun-allowed
i tried the usual (defclass standard-foo-class (standard-class) ((formats :initarg :formats))) but it errored
1:48:27
no-defun-allowed
The class #<STANDARD-CLASS COMMON-LISP:STANDARD-OBJECT> was specified as a superclass of the class #<STANDARD-NETFARM-CLASS COMMON-LISP:NIL {1002571863}>, but the
1:48:28
no-defun-allowed
metaclasses #<STANDARD-CLASS COMMON-LISP:STANDARD-CLASS> and #<STANDARD-CLASS COMMON-LISP-USER::STANDARD-NETFARM-CLASS> are incompatible. Define a method for SB-MOP:VALIDATE-SUPERCLASS to avoid this error.
1:49:07
Bike
do what it says, define a validate-superclass method. probably oen that always returns t.
1:58:28
no-defun-allowed
one last silly question: is there a way to make function recompilations appear to threads atomically?
1:59:18
no-defun-allowed
so then you wouldn't have a small window of time where threads have updated functions and not updated functions. actually that's probably just bad abstraction.
1:59:42
no-defun-allowed
maybe it's not, but still if you had to replace some kind of backend it'd be best to have it update all in one go
2:03:02
no-defun-allowed
compile some lambdas, interrupt all threads with a thunk that waits on a bt:condition-variable, setf the fdefinitions and notify them when we're done
3:05:21
oni-on-ion
need lisp image sync for true parallel nodes. or, why doesnt lisp have that kind of 'green' thread
3:23:53
beach
It's a portable Common Lisp reader, capable of also "reading" comments and other skipped material and to preserve source location of everything it reads.
3:28:40
beach
pillton: Oh, and I created a #sicl channel where I can freely blab about SICL progress.
3:31:44
beach
The SICL progress is not that spectacular, seen from the outside. But I did find a good solution to the problem with method combinations cited in Didier Verna's paper.
3:33:03
beach
A second (short) article might be "MAKE-METHOD-LAMBDA revisited", because I read Pascal Costanza's article about the subject and it has many errors in it. Plus, I don't think there is a problem with it as his article claims.
3:34:01
beach
A third paper (if I can get this stuff to make fast enough progress) might be describing the SICL bootstrapping procedure.
3:38:34
no-defun-allowed
hey there's three now but there's less chance we'll decide on a common place to host it
3:41:09
oni-on-ion
japan for sure, im always coming across CL stuff in japanese (i can read) and of course reddit.com/r/lisp_ja
3:41:16
beach
pillton: Anyway, that's all the news *I* can think of right now. I am sure there is more that I am not following that closely, or that I forgot about.
3:42:25
beach
pillton: Oh, I don't know whether you know him, but Jim Newton is defending his PhD in Paris on November 20th. It's all about Common Lisp, and I am on the committee.
4:04:05
no-defun-allowed
come to think of it, i don't think you've stuck around to witness the trams at their finest, beach
4:04:11
no-defun-allowed
if you're lucky the trams will stop and you'll have to wait two hours for one, hah
4:09:50
loke
Because the boodness of the loication is inversely proportional to the travel distance from me.
4:28:27
oni-on-ion
someone was asking recently, if there is documentation tools for CL, but got the answer no? there is CCLDoc that works on SBCL
4:38:52
oni-on-ion
i think someone was asking if there is a way to collect docstrings of a CL package
4:39:48
beach
oni-on-ion: That is one of the worst definitions of "documentation tool" that I can think of.
4:42:10
beach
oni-on-ion: Collecting docstrings and turning them into something called "documentation" very frequently results in crapppy such "documentation".
4:42:21
LdBeth
https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/user_man/0.html
4:42:54
oni-on-ion
beach: you could have said that directly? i did not mean to suggest a definition for "documentation tool"