freenode/#lisp - IRC Chatlog
Search
4:23:31
beach
jcowan: I don't understand your question. Cleavir is designed to be used to build the compiler(s) of Common Lisp, i.e. COMPILER-FILE, COMPILE, EVAL. So the unit to compile is either a file or a top-level lambda expression.
4:27:20
beach
I think I have a phrase in there somewhere, but I haven't designed any general mechanism.
4:31:51
beach
First the top-level lambda expression is turned into an AST, then to HIR, and that process returns a lambda expression that corresponds to a FASL file. So it has to be "tied" (or linked if you prefer) to a first-class global environment.
4:32:34
beach
That lambda expression is then compiled and executed on some arguments, like the environment.
4:33:12
beach
The side effects from executing that function will create the functions, variables, and other side effects that would normally happen when a FASL is loaded.
4:42:22
jcowan
Some of the historical section of the LispOS paper contains errors, but I'm not going to fuss over them now
4:46:07
jcowan
You say that processes exist because of the limited memory of minicomputers, but they were born on mainframes
5:00:55
beach
jcowan_: I re-read that paragraph, and as a result, I removed the "mini" prefix. Thanks for pointing that out.
5:56:49
beach
bjorkintosh: For example, when a program fails, in Multics, you have access to the stack. Then you can try to to fix the problem, say an attempt to call a function that does not exist, type `continue' and the execution continues.
5:57:28
beach
bjorkintosh: In many ways, the Multics development environment was similar to our Lisp environment, and in many ways better than what our free Common Lisp implementations can do.
6:04:06
ldb
Which has been said from `the Arise of Worse is Better', included in the appendix of the UNIX Haters Handbook
6:19:10
shrdlu68
I call CL the "undead language" - it's alive, only with an unholy, supernatural vigor.
6:25:05
beach
ldb: I find it more interesting to compare Multics and TOPS-20 on the one had to UNIX, Windows, MacOS, Android on the other hand, than to compare Multics and TOPS-20. My point in the LispOS specification is that we can do much better than what current systems do, and we have a good model for it, namely our Common Lisp environments.
6:32:47
epony
pinch of salt here, "What Every Programmer Should Know About Memory" - Ulrich Drepper (2007) https://www.akkadia.org/drepper/cpumemory.pdf
6:34:55
epony
Not much changed since the time the paper got written, except maybe NUMA if it's not mentioned there.
6:38:48
flip214
and if your swap device is a remote iSCSI disk, the local trash /tmp might still be much faster than that
6:40:12
ldb
beach: I mean, as long as we are working on it, we have to sacrifice either performance or convenience, can't detach from heavy work of dealing with ugly hardware interface
6:41:55
epony
I still think it's a funnily stupid idea to consider double trickery in application virtualisation against the host OS for the same resource abstracting away the hardware to absolutely irrelevant ideas like "unlimited transparent secondary storage".
6:43:12
epony
Either context switch in the OS, or the OS is the language interpreter and be done with the OS concept once and for allllllll.
6:50:08
flip214
ldb: and as for ecraven's recommendation (I'd have suggested mmap, too ;), see https://github.com/zodmaner/trivial-mmap
6:50:53
ecraven
also, I've read recently that mmap is not significantly faster than just reading, it just might be more convenient
6:51:29
ldb
flip214: ecraven: i could do mmap, but i also want to process stream data like UNIX stdin
7:01:32
beach
I think I must study this interesting psychological phenomenon that I am frequently confronted with. Like in our "incremental parsing" paper, we do orders of magnitude better than Emacs, but we are told that we must also solve the halting problem at typing speed.
7:01:41
verisimilitude
I've been writing some Common Lisp programs others may find interesting and figured I maybe should mention them here, if you're interested.
7:02:11
beach
And in my LispOS specification, I suggest something that is way better than what we now have, and I am told I also need to solve the Von Neumann bottleneck.
7:04:04
verisimilitude
So, in order, the first is SHUT-IT-DOWN, which is a single symbol package that can be used to exit the implementation; one of the nicknames is QUIT and so you can call it as (QUIT:QUIT).
7:04:42
verisimilitude
The second is an implementation of the ECMA-48 standard, Control Characters for Coded Character Sets; surprisingly, it doesn't seem like anyone had implemented this in Common Lisp, before me.
7:05:27
verisimilitude
The third and last is ACUTE-TERMINAL-CONTROL, which as an abstract program for controlling terminals; it uses CL-ECMA-48, the second.
7:06:07
verisimilitude
>I also have a large disgust with the use of Curses varieties in Common Lisp programs, as this unnecessarily and substantially complicates using such a program. Risking memory leaks shouldn't be necessary to control a terminal.
7:09:44
verisimilitude
In designing the ACUTE-TERMINAL-CONTROL interface, I naturally found myself using SETF for some functionality and so decided this was best for all functionality.
7:10:44
verisimilitude
As an example, (CURSOR) returns the cursor location corresponding to the stream argument, which defaults to *STANDARD-OUTPUT*; (SETF CURSOR) is used to reposition the cursor, similarly.
7:14:02
flip214
beach: "if you're going to start work on that, do it RIGHT" is the general assumption, I guess.
7:16:32
shrdlu68
verisimilitude: If I understand this right, acute-terminal-control simply spits out ANSI control codes, right?
7:18:39
shrdlu68
Ah, those have been implemented before, such as https://github.com/pnathan/cl-ansi-text
7:19:18
phoe
verisimilitude: SHUT-IT-DOWN is already implemented by UIOP:QUIT, see https://github.com/fare/asdf/blob/master/uiop/image.lisp#L59
7:19:53
shrdlu68
verisimilitude: What's currently missing is one such library that also has low-level control of the terminal, which would reqiure making syscalls to the OS.
7:21:19
phoe
verisimilitude: your terminal stuff does look nice - please add it to quicklisp via https://github.com/quicklisp/quicklisp-projects
7:22:18
verisimilitude
I've already taken a look at several of these projects, shrdlu68, and they all either use a Curses or a simply inefficient.
7:23:46
verisimilitude
You may be interested by taking a look at CL-ECMA-48; I implement all 162 control functions that optimize the representations sent and the code to do this is also optimized.
7:24:15
phoe
simply put them on any host from where they can be cloned by git, and then ask someone who uses github to make an issue on quicklisp-projects
7:24:47
phoe
multiple QL projects are cloned from git repos that are not hosted on many of the big git services.
7:25:27
verisimilitude
I do, however, provide each of these as a gzipped tar file; currently, the latest issue Xach informed me of was that they didn't decompress into their own directory, which has been corrected.
7:26:32
LdBeth
verisimilitude: one thing I most concern, which is lacked in ncurses, does it support Unicode display?
7:27:28
verisimilitude
It only sends control functions through Common Lisp streams; anything that can be sent through should be fine.
7:28:27
verisimilitude
I also simply dislike the idea that I should manually run a version control tool; it should be handled for me, but it isn't.
7:29:34
verisimilitude
>Functionality which may be added is as follows: control over input echoing; control over whether input is buffered by the system and whether reading will block or not.
7:29:34
verisimilitude
>The preceding functionality both cannot be implemented with purely ECMA-48 functionality nor in portable Common Lisp and so the utility of adding it is put into question. It is thought, perhaps, the functionality will always pretend to be present or not available to the environment otherwise, but this is undecided.
7:32:02
verisimilitude
If I don't necessarily need to run the program yet, I don't even need comments.
7:33:26
jdz
The next step is when your code is released, people may contribute improvements. This activity is concurrent by definition.
7:34:32
LdBeth
shrdlu68: well it’s OS’s job to provide a try, but I don’t think controlling display and move cursor around requires more syscalls except write to the device
7:34:33
verisimilitude
That's true, but I would simply manage that manually until it became unwieldy.
7:35:38
verisimilitude
I'd prefer to avoid complicating my setup until it's absolutely necessary, but I appreciate the suggestion, epony.
7:36:30
verisimilitude
Now, the issue with adding that functionality to ACUTE-TERMINAL-CONTROL is that it does require syscalls; there is, however, the fact that this could still be done in a way that avoids UNIX shared library garbage does make it seem appealing if it's utterly necessary.
7:36:49
jdz
I personally like Git because it is a dumb tool to manage snapshots of a directory tree, with a lot of tooling built around it (including Emacs integration).
7:37:21
verisimilitude
If I ever used version control under UNIX, it would probably be required that I could use it only from Emacs, while avoiding the tool itself as much as I can.
7:38:40
LdBeth
verisimilitude: for controlling low level io, please look this http://quickdocs.org/trivial-raw-io/
7:39:17
epony
verisimilitude you can do transparent revisioning like this https://www.emacswiki.org/emacs/VersionControl
7:40:15
epony
verisimilitude actually rcs is pretty much sufficient for per file revisioning and is the easiest thing ever
7:42:32
verisimilitude
Well, there's also the point that SHUT-IT-DOWN and CL-ECMA-48 probably won't see much change now; the latter in particular is rather finished, unless I discover a flaw.
7:43:20
LdBeth
My irc is a small script and I was looking for a good terminal interface lib for a while, and that’s why I get excited today
7:43:21
verisimilitude
Regardless, I'm curious as to what you all think of these three programs, so far.
7:47:43
phoe
verisimilitude: SHUT-IT-DOWN is duplicated by UIOP:QUIT, the other two are pretty fun. I might use them when I write a terminal application.
7:50:58
verisimilitude
Xach also expressed this concern, phoe, but SHUT-IT-DOWN has a better interface (I think), supports far more implementations, is significantly smaller and more targeted, and is under a more permissive license.
7:54:25
verisimilitude
I wasn't aware of that, but would be inclined to believe SHUT-IT-DOWN supports more implementations than that as well.
7:56:40
verisimilitude
Well, SHUT-IT-DOWN supports eighteen, if you don't count MCL variants as more than one.
7:58:06
verisimilitude
I'd support MOCL, but I can't find any documentation and the developers won't respond to my emails.
7:58:46
verisimilitude
Asides from MOCL, there's just Movitz and the Lisp machines I'd want to support, but those are in odd states for searching for this.
8:00:01
verisimilitude
Exit codes are irrelevant to Common Lisp and I find it inelegant to have an interface like this pay them any mind.
8:02:05
verisimilitude
UNIX didn't invent processes nor files, epony, but it's done a good job at implementing them poorly.
8:02:17
jackdaniel
poplog is a common runtime and a compiler suite for a variety of languages, Common Lisp included
8:07:49
verisimilitude
It's the same reason you should use USER-HOMEDIR-PATHNAME instead of simply hardcoding "~/", epony.
8:13:50
blurgh
I installed stumpwm from source using make, and it gave me a warning from cl-ppcre. Nevertheless, it compiled and I set up .xinitrc. startx gave me a blank window. loke: early '70s IIRC. It predates Symbolics. I think it was made on the ITS.
8:18:29
loke
There aren't many other software packages that old that are still being maintained and developed.
8:18:42
phoe
loke: I basically have a server to which clients can connect, and objects that represent operations that are permitted to be done in my system by clients.
8:18:44
verisimilitude
Would it be too forward of me to mention another Lisp community and see if any of you may have used it before?
8:19:21
loke
LdBeth: there is a difference though. Modern versions of TECO are full rewrites. I don't think anyone maintaining the original code base.
8:19:22
phoe
They need to have some state, but it also makes sense to me that they're operations, so they should be funcallable on some arguments.
8:22:35
loke
This is a good place to start if you want to follow the work on it: https://github.com/PDP-10/its
8:22:38
LdBeth
loke: seems Emacs helm uses a lot of funcallable instances. Btw, I use TOPS-20 on SDF
8:26:38
blurgh
Speaking of old machines, does anyone have documentation for the Lisp Machine file systems and kernels?
8:27:25
phoe
loke: an alternative is a standard object that holds some slots, and a method specializing on that object's class. But it's a bit inelegant in my case to have a separate method if I can just invoke that.
8:28:18
loke
In my experience, I've never seen the case where a funcallable instance did more than I could do with a plain closure.
8:28:39
loke
Although, I guess if you need ways to manipulate the closed-over values, it can get a bit ugly with closures.
8:29:07
loke
http://www.bitsavers.org/pdf/symbolics/software/release_6/996055_Reference_Guide_to_Streams_Files_and_IO_Mar85.pdf
8:32:47
blurgh
loke: Maybe. I've heard that Lisp Machines had persistent environments (similar to Smalltalk images) and were interactive throughout. Is there documentation on the design choices for implementing this? Gap buffers and system images like Emacs?
8:33:09
ecraven
blurgh: there are various lisp machines available as virtual machines, you can try one of them
8:33:36
ecraven
the Open Genera sources can be found on the web, you can look at the actual source code
8:34:19
ecraven
blurgh: well, as I said, they can be found... depending on your country, that finding may be legal or illegal
8:35:08
blurgh
ecraven: legal in USA? I remember hearing about how someone at MIT said they would release the source code for one of the machines (MIT CADR?) but hadn't followed through at the time of writing.
8:35:31
ecraven
blurgh: the mit cadr sources are freely available, as far as I know, but Symbolics' Open Genera sources haven't been open sourced, I think
8:38:07
blurgh
ecraven: thank you! It looks like there is an MIT CADR repo: https://github.com/hanshuebner/cadr2
8:38:57
LdBeth
The CADR emulator works fine except it has never considered what if the user use a Japanese keyboard layout
8:39:19
verisimilitude
That's interesting; I didn't see any Lisp communities when I perused things, but I also didn't look hard.
8:39:33
blurgh
err, wrong link. There's several cadr-on-an-fpga projects, but one emulator, here: https://github.com/joshuaeckroth/cadr/tree/master/usim
8:39:56
verisimilitude
I've been meaning to setup a GNU Social instance on my server, but Debian issues want a kernel upgrade and it's a mess.
8:40:20
verisimilitude
Now, Mastodon works with some manner of hashtag like grouping, right; is it simply #lisp, then, loke?
8:40:54
loke
verisimilitude: You have to follow the right people. Check the local timelines on functional.cafe and icosahedron.website. Or just search for #lisp
8:42:22
verisimilitude
I meant do you use it for Lisp purposes or is it more tangential to what you usually do there.
8:45:46
verisimilitude
I suppose, in a more general way, I'm asking how the Lisp community there is.
8:46:21
loke
verisimilitude: It's a group of peple, all different. Arguably there are more than one community :-)
8:47:09
loke
I also check G+ once in a while, but the mountain bike community is flooded with spammers at the moment.
8:56:07
verisimilitude
My current solution to this, shrdlu68, is to simply call stty in the sh program I use to launch the Common Lisp program.
8:56:54
verisimilitude
Yes, LdBeth; for a supposedly file-based operating system, UNIX certainly does prefer syscalls passing C structs to files for a great many things.
8:57:00
schweers
under which circumstances are calls to BREAK ignored? I am trying to debug a piece of code and can’t get it to enter the debugger anymore. Yesterday it still worked.
8:57:21
schweers
it does run in a background thread, but that wasn’t a problem yesterday. I’m using sbcl and slime. any ideas?
8:57:53
schweers
Before someone asks: i optimize for debug and safety, both on level 3, nothing else
8:58:42
schweers
I also sometimes have the contrary behaviour: I have a breakpoint somewhere, but the debugger (also) enters at some other time, which I did not intend.
8:59:54
schweers
not yet, as I cannot use ECL, and CCL does not support single stepping, which is the point of this excersise
9:02:45
schweers
I’ve got a piece of code which runs in a separate thread, which I’d like to single-step. Yesterday this worked, but now it just seems to skip the BREAK call :/
9:02:49
verisimilitude
If you don't want to, simply omit date of birth and SSN information; we've trimmed the context already.
9:07:16
schweers
it has not behaved as I’d like since I started working on this new feature in an extra git branch
9:10:33
schweers
the program itself works, I might try what happens on the other branch with an added breakpoint
9:11:55
schweers
interesting. I forgot to change the optimization settings on the master branch to debugging. it still entered the debugger
9:12:24
verisimilitude
I figured your carefully selected OPTIMIZE settings were being changed somewhere.
9:14:53
schweers
I don’t get it. the debugger works on the master branch, but not on the branch where I need it
9:15:47
schweers
I put a (break) call directly into the MAIN function, as the first statement, and I still don’t land in the debugger :/
9:19:07
verisimilitude
Surely, it's a simple matter of locating the offending difference between these two and it doesn't seem like it's a very large difference.
9:20:01
schweers
what do you mean? I have a bunch of systems and I load one of them. Now, I found out something new. Because of a bug in one of the changes I made, the code which contained the breakpoint I actually wanted to debug was never called. So that mystery is solved. BUT: the breakpoint directly in the toplevel function I called is still not triggered.
9:20:31
schweers
Also, now that I fixed the aforementioned bug, the breakpoint I was interested in all along enters the debugger.
9:23:32
schweers
I deleted the sbcl directory in ~/.cache and I still have the same situation. While I am happy for the moment, as I can debug the code I am really interested in, I am a little confused that a previous call to BREAK does not enter the debugger, although said code is run in the repl thread and comes earlier (it’t the first thing it should do)
9:24:08
kammd[m]
LdBeth: I am more interested in reading logs and shipping it over to some remote entity.. Like logstash
9:25:56
verisimilitude
>The user interface aspects of break and cerror are permitted to vary more widely, in order to accomodate the interface needs of the implementation. For example, it is permissible for a Lisp read-eval-print loop to be entered by break rather than the conventional debugger.
9:27:02
verisimilitude
I'm still fuzzy on precisely what the issue could be, schweers, due to insufficient context.
9:29:49
myrkraverk
Is it possible to make a local binding, something like FLET, for a function created by a macro?
9:30:10
schweers
the heavy lifting is done in WAYSPLIT, which obviously calls a myriad of other functions. In one of these other functions I have a breakpoint which now works just fine (it was never reached, which was my own fault), but this is not the point. See that the very first expression in MAIN is (BREAK)? that is not triggered when I call MAIN.
9:30:13
myrkraverk
That is, when the macro returns a function, can I make it a local binding for the function space?
9:31:26
kammd[m]
LdBeth: Yep.. Was wondering if there is any library/tool which does some of that.. Don't want to reinvent the wheel..
9:31:38
verisimilitude
Cloudflare seeks out and blocks several types of VPN and whatnot and pastebin uses Cloudflare.
9:32:14
schweers
anyway, the function looks like this: (defun main (args) (break) (do-stuff-with args))
9:32:26
LdBeth
ACTION sent a long message: LdBeth_2018-04-04_09:32:25.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/kUZGRTXJfUkgmThcCexubYiA>
9:33:18
schweers
I call MAIN directly, so I know for a fact that the function is called. It’s in the same file as the other code I was discussing here, i.e. same optimizations. Any ideas why this (break) call does not enter the debugger?
9:33:38
verisimilitude
I'd recommend you try to use a different implementation and see how that debugs.
9:33:41
schweers
mind you that I don’t need the breakpoint there, I just put it there to see if it would trigger
9:35:16
verisimilitude
I don't know enough about this particular issue of yours to know if it's a bug, but it's a possibility.
9:36:28
myrkraverk
Is there a way to SETF a function, which is created by a macro, to some kind of local (not top-level) binding?
9:37:15
myrkraverk
verisimilitude: to be explicit, I want to bind locally a function (if possible) returned by postmodern:prepare
9:40:36
myrkraverk
The function created by the macro has arguments according to $Ns in the statement.
9:46:01
myrkraverk
(let ((foo (prepare "select $1::text"))) (format t "~a" (funcall foo "Hello, Postgres")))
9:46:50
myrkraverk
Is what I have right now; since (prepare...) returns a function that takes indeterminate number of arguments, I don't know how to avoid the funcall, which I personally find ugly.
10:01:14
phoe
https://github.com/TBRSS/cl-yesql Somewhat tricky to get it to run at first but fun and working.
10:02:21
myrkraverk
phoe: I'm quite happy with postmodern for the most part; it's only this slight "blight" when I don't want global functions that bother me.
10:04:13
phoe
myrkraverk: I remember there was a construct that allowed to lexically bind an anonymous function to a function name
10:05:28
flip214
also, there's the (:select ...) syntax that would allow to fetch the number of parameters...
10:06:59
phoe
see https://github.com/TBRSS/serapeum/blob/5917e581ca81eb88f1f1194cf4f122122b3bf211/fbind.lisp#L305
10:08:15
flip214
ain't it easy to have a macro that uses a local inline function to do the FUNCALL (GENSYM)?
12:28:17
phoe
Because suddenly the object itself is funcallable, which does not fully fit in the definition of protocol described as a set of generic functions and protocol classes.
12:31:22
phoe
I mean a protocol where funcallable objects which are not GFs are a part of that protocol
12:31:38
phoe
I just realized I'm speaking of a terribly unspecific thing; I'll try to make it more concrete and then post back
13:05:26
phoe
For creating a funcallable class, is it enough to subclass funcallable-standard-object?
13:09:15
Bike
no. having a function slot can be controlled by allocate-instance, which is specialized to do so with funcallable-standard-class.
13:10:36
phoe
so (defclass foo (funcallable-standard-object) () (:metaclass funcallable-standard-class)) it is
13:58:12
beach
phoe: I haven't really thought about it, but my initial reaction is that there is nothing special here.
15:54:11
shangul
What book do you suggest for someone who already had experiences with other languages(mostly C-family) to start Common Lisp?
15:57:21
beach
It is also important that you consult with #lisp participants before you attempt to decide on an implementation, and editor, etc.
15:57:48
beach
A lot depends on what you already know, what OS you are on, what you are willing to learn, etc.
16:00:54
jcowan
I wanted to get permission to rewrite it as Practical ISLisp, but apparently the rights are very tangled.
16:02:35
Shinmera
I don't care whether you like it or not, I'm debating your assertion that it is condescending.
16:03:04
jcowan
I don't see how that can be usefully argued when it depends on perspective. One person's condescension is another person's welcomed handholding.
16:04:03
beach
Also, pierpa was in a very different situation when he read it, compared to that of shangul.
16:05:01
jcowan
beach: I have tried to build the papers in the SICL tree, but some have no Makefiles, some don't build, and some build but don't produce the whole paper
16:05:16
jcowan
I see from your links that some are on metamodules, but there seems to be no index of them
16:05:29
beach
shangul: This channel is dedicated to Common Lisp, so that's the only language you will see discussed, but there are at least 3 reasonable general-purpose implementations, and a few more for special situations.
16:05:47
jcowan
or rather there is an index, but it does not include either the LispOS or first-class environments papers