freenode/#lisp - IRC Chatlog
Search
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
16:06:47
beach
shangul: That might not be a good idea for Common Lisp. Depending on what you are good at of course.
16:07:49
beach
shangul: Emacs with SLIME is probably the best environment for editing Common Lisp code.
16:08:30
beach
shangul: If you use something else, you are not only depriving yourself of some important functionality, but are also likely to submit code that does not follow widely accepted conventions.
16:12:17
beach
jcowan: The Bootstrapping paper is embryonic, but it has a Makefile and it builds for me.
16:14:04
beach
ELS is not really a paper. It seems to be some kind of presentation, but it is probably not important.
16:18:41
beach
Merge-sort is embryonic. We don't have the research results yet. You can safely forget about it.
16:19:45
jcowan
Are you familiar with Shivers's algo for mergesorting lists in constant space? It has problems when the implementation has a write barrier, as you might expect, but is very interesting
16:24:13
jcowan
https://github.com/scheme-requests-for-implementation/srfi-32/blob/master/sort-ref-impl/lmsort.scm <-- Shivers's algorithm (should be readable even without knowing Scheme)
16:24:59
beach
jcowan: I can ask my favorite coauthor to do the commits so that it builds, but it won't be today.
16:26:20
verisimilitude
On the topic of how Emacs formats Common Lisp, I'm disappointed with how LOOP is done; I always manually format it.
16:26:54
beach
verisimilitude: That's because you are not using the slime-indentation contributation.
16:31:42
beach
Again, my research is about using merge sort on vectors. There are algorithms that use constant space already, but the overhead is often great.
16:32:14
verisimilitude
On that further topic of looping forms, which do you find yourself using often? ITERATE is nice, but its being a library makes it much less usable in many instances. LOOP is often most brief if you can fit your loop perfectly to it. I find myself using PROG and PROG* for many loops with complex control flow needs, but also with very simple loops that aren't perfectly expressed with the other macros.
16:33:23
beach
jcowan: The point of the research is similar to that of the Reverse-order paper. Check how much stack is available, and use a big chunk of it. That way you avoid the overhead. If little stack is available (which almost never happens), then use the high-overhead constant-space algorithm published in the literature.
16:35:17
beach
verisimilitude: I use LOOP a lot. It is very rare that I have such a complex control flow that LOOP can not express it. In fact, even control flow that LOOP can express perfectly well can be too complex for the maintainer.
16:36:21
jcowan
Is the high-overhead constant-space algo you mention stable, and if so, is it natural?
16:36:39
pierpa
ITERATE is nice, and if you want to maintain readability for LOOPers you can restrict yourself to the common subset
16:37:04
beach
jcowan: There are both stable and non stable algorithms in the literature. I don't know what "natural" means in the context of an algorithm.
16:37:21
beach
I mean, algorithms are made by people who are part of nature, so in that sense they are natural.
16:37:38
sjl
verisimilitude: I use LOOP in my libraries to avoid forcing another dependency on users, but ITERATE in my own personal code
16:37:43
beach
But some people remove people from their concept of "nature" and then no algorithm is found in nature.
16:38:12
verisimilitude
Another reason I'd use PROG or PROG* over LOOP is to avoid needing to deal with the formatting issues or precede any Lisp with DO, so I'd call that a further advantage.
16:38:33
beach
jcowan: I don't remember. I think getting constant space is probably hard enough as it is.
16:40:15
verisimilitude
I'd simply argue that algorithms are everywhere in nature, but I can see how that would diverge too much.
16:40:19
jcowan
beach: AYC can you send me a pointer to a stable constant space vector merge sort, either code or description?
16:41:05
beach
jcowan: You are asking a lot, especially since dinner is minutes away. I'll do my best, but you may have to remind me.
16:48:15
beach
jcowan: If you continue with this level of intellectual curiosity, you might even want to contribute to SICL one day. :)
16:53:18
verisimilitude
I'm curious if any of you discuss Lisp on imageboards, as there's one area in particular I believe some of you may find interesting.
17:03:49
jcowan
pervasive laziness is unmitigatedly a bad thing (as opposed to facultative laziness which is sometimes useful)
17:04:55
jcowan
Eh? The whole point of alists IMO is that you can push and pop things off them, which only works if they are pure. Plists are another matter.
17:05:45
Bike
i mean, in theory, yeah, but sometimes you have an alist where you know a key is there, like a cheap structure kind of deal
17:06:45
ldb
jcowan: the first time i do prog i used a list to store data in emacs lisp and get f**ked by mutating conses
17:06:58
verisimilitude
You should look at the source to ACUTE-TERMINAL-CONTROL as an example. To explain, I use the SGR, SELECT GRAPHIC REPERTOIRE, control function to change colors; this is a variadic control function and I express this in Common Lisp by requiring a list as the parameter; I didn't want to allocate a new list every time the relevant functions are called, so I have a CONS cell bound that I use RPLACA with to recycle whenever necessary.
17:06:59
dlowe
99% of the time, when I start by using nested generic sequences, I eventually end up converting it all to structures.
17:07:40
jcowan
One advantage of immutable pairs is that rest-lists need not be copied, nor do you need to do data flow analysis to make sure they are not mutated
17:07:56
jcowan
Rest-lists are the only point (in Scheme at least) at which the PL touches the data structures
17:11:00
jcowan
parallel to the mutable-list lib, I mean, not parallel in the sense of parallel computing
17:14:48
verisimilitude
With my understanding of the way the standard is written, you can modify rest lists, but only do so well if you make certain to never do this with APPLY.
17:15:46
verisimilitude
Even then, it seems like you could do even that, so long as you don't use a constant as the rest list.
17:16:10
Bike
"constant, conforming programs must neither rely on the list structure of a rest list to be freshly consed, nor modify that list structure" says apply
17:17:12
Bike
a few years ago i spent time implementing a scheme like language with immutable conses
17:17:49
verisimilitude
>Because a function can neither detect whether it was called via apply nor whether (if so) the last argument to apply was a constant, conforming programs must neither rely on the list structure of a rest list to be freshly consed, nor modify that list structure.
17:18:28
verisimilitude
So, it seems fair game to modify the rest list, so long as it's not a constant and it doesn't need to be freshly consed.
17:18:52
Bike
i think if an implementation did whatever with rest lists and a user modified one and didn't get what they expected and complained, the implementors probably wouldn't care
17:21:29
verisimilitude
In practicality, constant modification is usually permitted and lists are probably simply usually freshly consed.
17:21:47
TMA
verisimilitude: the whole sentence does not permit conforming programs to modify or expect freshness, there is no exceptions for programs that can provably avoid the APPLY
17:23:16
TMA
verisimilitude: the emptines of the latter notwithstanding. an implementation is permitted to use APPLY during evaluation of all function calls
17:23:23
verisimilitude
It seems clear to me that it's saying that, since APPLY can recycle the rest list, it can't be expected to be freshly consed and, in addition to this, it's possible a constant may be used in this way, and so only because of this should it not be done.
17:23:58
verisimilitude
So, it seems to me that it simply derives from the constant modification rules.
17:24:18
TMA
verisimilitude: the 'because' is just a supporting argument in that case. it does not limit the prohibition in any way
17:26:02
verisimilitude
I suppose, either way, it's splitting hairs, as an implementation is likely to only ever try to detect this statically and not care, otherwise.
17:30:01
TMA
verisimilitude: the other part is that if your interpretation of the standard were true, then adding (apply #'foo '(1 2 3)) to your *conforming program would render it nonconforming. It seems absurd that this is the intended reading. This could make any program with (APPLY ... constant) nonconforming.
17:33:07
jackdaniel
ACTION this that this interpretation simply doesn't hold and there is no point in arguing for it
17:46:15
drmeister
I'm trying to get it up and running. I have a server running and I'm trying to get vim to connect to it.
17:49:46
sjl
I think all the Vlime shortcuts are prefixed with localleader, which most people have set as \ these days, but I don't know what the default actually is
17:51:28
drmeister
sjl: Thank you for your time. I added that to .vimrc and restarted vim - no errors
17:53:25
sjl
Well, if it's not mapped that's what it should be doing (\ -> unmapped, beeps, cc-> change current line)
17:55:26
drmeister
I tried changing the localleader to _ (underscore) - and restarting - same behavior although no *bloop* but _cc puts it into change current line mode.
17:56:55
drmeister
When installing vim Plugin support I left out a lot of lines that I thought were just plugins.
17:57:36
sjl
Hm, I don't use Vundle myself, so I'm not sure exactly how Vundle would be installing Vlime for you
17:57:43
drmeister
Because I probably don't have it installed in the right place - it's currently in /Users/meister/Development/vlime
17:58:36
sjl
> 1. Add Plugin 'l04m33/vlime', {'rtp': 'vim/'} to your vimrc, then run :PluginInstall in Vim.
17:59:30
drmeister
Yeah - but what does 'l04m33/vlime' mean? That looks like a relative path - but relative to what?
18:00:26
drmeister
Yeah - but where is it supposed to go? I'm going to put it in ~/.vim/bundle for yucks
18:00:29
sjl
Like I said, I don't use Vundle. I know Vlime works great with Pathogen and I prefer installing plugins like that
19:05:57
makomo
jackdaniel: just wanted to let you know i enjoyed your McCLIM demo video, it was pretty cool! keep going! :-)
19:11:51
oleo
it actually works it's just i can't call something like [1 .. 3] for createing say a list (1 2 3) by inputting that
19:26:21
didi
Hey, I found out the greatest use of `result-form' from a `dolist' ever: A `push' form, which is only evaluated if the `dolist' doesn't eval a `return' form.
19:28:46
jackdaniel
I plan to record video on creating gadgets (and since mirroring branch has been merged after two weeks of development I can get back to it)
19:31:55
jeosol
Anyone working with long running applications, how do you protect or account for failure before completion. A related problem, yesterday we had rain + thunderstorm in the night, woke up my computer tripped up -- UPS didn't last long
19:32:54
jeosol
I am interested in options for saving state and possibly restarting. I have not done much, but have a small prototype that uses CLOS, saves the state in the object and writes to disk each step. Then I pick it up later and continue.
19:35:48
jeosol
jcowan: thanks for the link. I guess I am doing something similar by idea but not robust enough. I will look into that
19:36:15
jcowan
the link to the first reference is borked, but http://web.archive.org/web/20170610140344/http://hillside.net:80/sugarloafplop/papers/5.pdf will work
19:38:02
phoe
shangul: the text is free to read on the gigamonkeys.com website, you can turn that HTML into PDFs
19:38:28
phoe
you can find PDFs of it for free on the Internet but accessing them that way will be breaching its license.
19:39:44
phoe
they have made a PDF, it's an ebook version of the original book, and it has its price.
19:40:41
phoe
shangul: no problem, you can access the channel logs at https://ccl.clozure.com/irc-logs/lisp/
19:40:47
shangul
phoe, so pdf has its price and reading online is free, is it legal to download the htmls?
19:41:28
jcowan
In practice you cannot read them without downloading them into your browser cache, so yes.
19:42:42
nydel
howdy phoe. i love to search the logs and see how even-dumber-than-today i was a while back
19:45:39
jcowan
shangul: Depends on your country, but in practice, who's going to find out? Just don't redistribute the results.
19:47:31
jcowan
Then no worries, but if you do publish some derivative work, you should mark it as unauthorized to warn off any law-abiding people in Berne Convention countries
19:58:47
jcowan
I don't understand this requirement in the HyperSpec under generic function lambda lists: "Zero or more required parameters must be specified." I don't see any circumstances in which this MUST could be violated.
20:06:58
jcowan
I carefully went through every instance of MUST, MAY, and SHOULD in R7RS-small and made sure they all referred to implementation requirements or non-requirements
20:07:46
jcowan
as opposed to user requirements, which are expressed as "It is an error if/unless ..."
20:09:06
jcowan
The Google CL stylesheet appears to require that code spell "connection" as "connexion", since it is (a) British and (b) shorter.
20:17:29
blurgh
Can "sbcl --load" take multiple files? (ex: sbcl --load ~/lisp/stumpwmrc.lisp ~/lisp/startstump.lisp)
20:18:53
blurgh
sjl: so "sbcl --load ~/lisp/stumpwmrc.lisp --load ~/lisp/startstump.lisp" will work?
20:20:39
blurgh
Shinmera: I'd have to restart my computer if I did that right now. It's complicated. Sorry about bugging you guys.
20:21:41
sjl
blurgh: he means doing like `echo '(print 1)' > a.lisp && echo '(print 2)' > b.lisp && sbcl --load a.lisp --load b.lisp`
21:29:19
Colleen
Command Syntax: notify TARGET &STRING MESSAGE
Documentation: Send a notification message that will be displayed as soon as the user speaks again.
21:33:08
ldb
minion: memo for verisimilitude: seem you used something like `&aux (&optional ...)' in `cl-ecma-48', but Clozure CL I use complains about that because lambda list keywords are specially treated in ccl
22:27:20
fourier
how to create a constant hash-table? I've tried alexandria's define-constant + (eval-when (:compile-toplevel :load-toplevel) ..), but on any attepmt to recompile the file (sbcl) i got an error on define-constart for my hash-table