freenode/#lisp - IRC Chatlog
Search
9:25:30
White_Flame
OlCe: the primary point of distinguishing them is pointing out the lack of representation of some when there's an overfocus on others
9:28:55
no-defun-allowed
I feel like the ACM gets enough tributes with how it handles accessing papers.
9:28:55
White_Flame
doing "science" is not what progrmaming is about. it's a background enrichment study
9:30:07
OlCe
White_Flame: Science can also be a synonym for art (how improper it may sound to scientists).
9:30:08
White_Flame
which is why I put it into quotes. Doing the work/process of computer science has nothing to do with actually writing code
9:30:35
cl-arthur
seperating compsci as a discipline from general software development seems nice to me. creates better space and focus for theory etc. for those inclined/interested. Dijkstra's opinions on the topic of compsci vs. software engineering as expressed in e.g. EWD898 and EWD1036 are amusing, though.
9:32:11
White_Flame
and obviously, those just doing basic programming are not informed in nor practicing computer science
9:33:03
beach
I consider something a "science" not as synonym for "good stuff", but for a discipline that uses the scientific method. Then, mathematics and computer science do not qualify.
9:33:52
White_Flame
but, you can still create working, delivered code by doing programming wihtout CS or SE
9:34:38
beach
White_Flame: Yes, but it is extremely rare. More common is that unqualified programmers create a total mess that is inefficient.
9:35:34
beach
White_Flame: What do you mean? I have seen industry code of considerable size that I would not want to maintain.
9:36:23
beach
Sure, then pretty much anybody (including medical doctors apparently) can produce working code.
9:43:42
White_Flame
one of my biggest complaints is that university tracks tend not to teach programming
9:45:20
White_Flame
where SE is more related to process & abstraction, and CS is related to making solid theory
9:46:59
beach
I am one of a tiny number of exceptions in that I worked in the software industry, and in that I acquire some experience by actually writing code and reading papers, watching talks, etc., about programming.
9:47:40
White_Flame
yeah, that's pretty rare. And the one prof I had that came from industry didn't know at all how to teach, with is the opposite problem
9:48:38
beach
... plus, of course, people working in industry are not that good developers on the average either.
9:50:08
White_Flame
bringing back on semi-topic, if CL was much more widely represented in industry, I doubt there would be an air of "CL makes you a better programmer because you abstract more" sort of claims, as all the below-mediocre developers would happen to be working in it as well
9:50:33
cl-arthur
I had a big surprise when I took over some code maintenance and found numbered fn versions. Aka (defun some-fn-1 ...) (defun some-fn-2 ...) and only the latter was used anywhere.
9:51:07
beach
White_Flame: It is a fluke that there is a correlation between Lisp and highly intelligent and highly knowledgeable people.
9:51:42
White_Flame
beach: those with a greater passion for programming will find themselves in some esoteric niches; the average programmers won't
9:53:29
cl-arthur
White_flame: just reduce the size of the industry at the same time to move the average quality higher :D
10:37:40
Xach
if you are an amateur and something bothers you about common lisp. if you are paid only if you use common lisp, anything that bothers you will be a real source of pain.
10:44:05
flip214
when SBCL tells me "Don't know how to REQUIRE sb-bsd-sockets." when trying via ASDF, but an interactive REQUIRE works fine, what's the problem?
10:44:47
Xach
flip214: i don't know in specific detail, but to me that usually signals some kind of incorrect/incomplete installation
10:46:53
flip214
Xach: thanks, solved. outdated FASL cache, as slime doesn't use the default location ~/.cache/common-lisp/
10:48:05
Xach
flip214: is there anything different about the environment where REQUIRE and loading the system are different?
10:48:20
Xach
i mean, do you get the same thing if you start sbcl from the terminal and the only thing you do is require or asdf:load-system?
10:48:36
flip214
that's what I'm trying to find out... interactive running works, but the image doesn't
10:50:24
flip214
yeah, sorry... in my dev environment I also use an image with lots of things already loaded
10:50:30
jackdaniel
you might have dumped an image with asdf that has already cached location of asd files (and that location may be obsolete now)
10:50:51
flip214
but I don't understand why sb-bsd-sockets is REQUIREd at that time, it should be included in the image anyway
10:51:44
jackdaniel
asdf reloads the system if it changes. if the location of asd changed (or asd disappeared) it will try to reload it
10:52:19
flip214
ah, disappearing makes it reload? does that make sense? if it knows it's gone where would it reload from?
10:52:21
jackdaniel
since the definition is already registered in the system, asdf won't fall back to calling require (it does that by default when definition is not found)
10:52:47
jackdaniel
well, that's precisely the problem you have I think -- you should register the system either as preloaded, or eventually as immutable
11:09:35
flip214
grr.... in production there's a symptom, locally I get it only if I don't use (load?) swank
12:27:11
decentyousername
Xach: I'm trying to understand a system someone wrote and I wanted to get an overview of all the symbols
12:27:12
jackdaniel
I've read "how do I list all internal symbols of a specified package" and it got me curious :)
12:27:50
Xach
decentyousername: ahh. i don't think all interned symbols will necessarily get you there - it might be more helpful to limit it to bound/fbound symbols.
12:28:16
phoe
you'll get things like local variables and internal function/macro names and what else mixed in there
12:29:06
decentyousername
phoe: It's a little tool written by borodust to parse tiled maps. It only exports 'convert.
12:30:03
decentyousername
I still need to know how to use the function, because there is no documentation.
12:31:36
jackdaniel
(do-symbols (var 'climi) (when (eq (nth-value 1 (find-symbol (symbol-name var) 'climi)) :internal) (print var))) ; is what I came up with, quite clumsy
12:34:15
_death
(let ((package (find-package "FOO"))) (remove package (apropos-list "" package) :test-not #'eql :key #'symbol-package)) ;; may be of interest, on some implementations
12:38:50
Xach
i sometimes use mpage -4 to print out source code and then just read it through that way, taking notes directly on paper.
12:39:27
_death
if you import symbols from another package, they may become internal symbols as well
12:41:27
flip214
Xach: around 1985 my neighbor printed his source code on continuous paper... about 15m (45 ft) or so, and marked the GOTO cross-references with colored pens ;)
12:42:11
Xach
flip214: i used to think paper was hopelessly old-fashioned until i tried it. i suppose it only works for projects of a certain size.
12:42:21
borodust
decentyousername: load the system, and go down the rabbit hole by going from convert to what it uses jumping around with M-.
12:43:34
borodust
decentyousername: it was hacked during a jam, there was little time to do anything properly
12:46:45
flip214
Xach: well, you know, it seems that 40x25 character screens held too little of the sources for a good overview...
13:55:56
|3b|
Xach: 3b-glim/2d will probably eventually be in https://github.com/3b/3b-glim but i don't think it does anything yet. if you are trying to run graph-paper, i think you can just comment it out for now
14:03:50
fe[nl]ix
flip214: maybe, I don't know if that's possible on top of the existent mutexes provided by implementations
14:14:47
flip214
fe[nl]ix: there's a rwlock primitive on pthreads as well: https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_rwlock_init.html
14:22:47
fe[nl]ix
I know but that's not very relevant because I can only use whatever the implementation exposes
14:28:40
kirtai
regarding the discussion earlier about editing, how do the Medley structure editors hold up?
14:38:16
beach
I started writing a GUI structure editor in the past, but it quickly became quite messy. I had a quadratic correspondence between states (cursor positions) and commands.
14:55:30
kirtai
I'm pretty sure the Medley release has the structure editors in it. I don't know which language they're in though, and unfortunately it still uses CLtL rather than ANSI CL
14:56:01
kirtai
might be worth a look sometime though, once the devs have sorted through what they have
14:57:24
phoe
e.g. https://github.com/Interlisp/medley/blob/master/lispusers/AUXMENU looks nothing like CL
14:58:08
kirtai
sedit and dedit iirc. I know the first is interlisp, it's the second I need to check
14:58:12
Xach
|3b|: thanks. when i try (display (make-instance 'graph-paper) t) i get an unhandled memory fault
15:07:03
beach
Structure editing is going to be tough for Common Lisp with the presence of user-defined reader macros.
15:10:25
beach
You then kind of need to write code for the macro twice. Once for the reader and then another time for the editor.
15:11:02
beach
And if you distribute the code, you need to ship it with the editor customization as well.
15:11:39
kirtai
would medleys more image based orientation help? Since it's editing live code and not files directly
15:12:29
jackdaniel
what is the "live code" textual representation? i.e the loaded file is (list #p"/foo/"), how do you see that in the editor after loading it?
15:14:07
kirtai
jackdaniel: medley works more like a smalltalk system. Source is attached to the in memory code and is imported/exported to files
15:17:30
kirtai
if I understand you correctly, when you call up the code, the way it works is it shows you and lets you edit the in-memory version of the source.
15:19:37
beach
OK, so let's take an example. Let's say a Common Lisp programmer writes a reader macro, say ι to mimic APL vectors.
15:20:53
Nilby
My opinion is structure editors should work on post-read objects. The trouble then is is the aesthetic art of indenting, and so also semantic parsing.
15:21:07
beach
Now, the in-core version is just a vector. Is that going to be presented to the user as a vector of 100 elements, and if so, how does the programmer change it so that it is now the result of (say) ι50 instead.
15:22:16
beach
Nilby: Sure, but is that really convenient? Don't you have to stop using reader macros?
15:24:06
beach
How does the system "know" that this particular vector was the result of typing ι100?
15:26:49
shka_
beach: hey, do you recommend https://github.com/s-expressionists/Concrete-Syntax-Tree/tree/master/Lambda-list for basic lambda list parsing?
15:36:17
beach
Macros are no problem. They are represented like everything else. The main issue is reader macros.
15:40:28
phoe
so if we have (defun foo () ι100) then I suppose that the ι100 macro could be handled without much trouble
15:40:30
Nilby
I'm sure its obvious, but for example the reader macro for " turns into a keyboard macro which says let the user type a string a push it at the point. The display method (display (obj string) ...) puts quotes around it.
15:41:39
beach
Nilby: Again, the problem is not input. The problem is output. How does the system display the code in a way that allows user to edit it in a way that it was originally typed in.
15:42:18
Nilby
If you have a custom reader macro, you have to have custom display code, or you just get #(0 1 ..)
15:43:33
jackdaniel
my naive attempt at this would be preserving the textual representation and the underlying object (so reading it basically), when the programmer modifies the textual representation, then that part of the buffer should be re-read
15:43:44
beach
phoe: Yes, and I am now thinking whether that is really what is meant by "structure editing".
15:44:20
beach
jackdaniel: That is *definitely* not structure editing. And you are describing exactly what I do for Second Climacs.
15:44:49
Nilby
beach: That doesn't seem like much of a problem to me, especially given that hopefully non-standard reader macro use infrequent and close to redefining the language, e.g. zeta-c.
15:45:52
phoe
beach: I guess that you'd need to add a layer of indirection; if you have (defun foo () ι100) then you have a simple list structure under the hood, but you also could have a layer of indirection that points to that concrete list structure and also holds information about e.g. macro usage
15:46:12
phoe
so it can figure out that (make-array 100 :initial-contents '(0 1 2 ... 99)) was actually macroexpanded from ι100
15:46:46
phoe
then you'd need editable function objects to refer to this sorta-textual context information so it can be picked up by the structure editor
15:46:49
beach
phoe: Something like that would be needed, yes. Not sure about the implications of it.
15:47:24
phoe
I guess there would be none, other than for the fact that if such information is not provided then some reader macros may be expanded
15:48:22
beach
I am kind of wondering now what the original advantages of structure editing were meant to be, and how they would be preserved in such a scenario.
15:52:00
Nilby
I worked on a structre editor and my biggest problem was indendting and line filling, eg. when to + 2 3 vs. + next-line 2 next-line 3
15:55:40
Nilby
My fingers typed it, but my brain as usual has little recollection of the event. It so far hasn't made it out of the laboratory.
16:03:35
Nilby
I think I used medley a little bit a long time ago on a TI lispm. it was cool but as an emacs user, the key bindings felt awkward and would take some getting used to, probably like paredit.
16:11:44
kirtai
there's a short manual for sedit in the medley release notes at appendix b in this document: http://bitsavers.trailing-edge.com/pdf/xerox/interlisp-d/198809_Medley_1.0/400006_Lisp_Release_Notes_Medley_Release_1.0_Sep88.pdf
17:06:48
tfb
SEdit was ... well, if you haven't used SEdit it's hard to describe what it was like, but it was astonishing, or at least I remember it being so.
18:20:36
Xach
As I wrote, I'm happy to add anything and (perceived by me) quality is not a roadblock. But I do look at personal utility libraries a little harder than other stuff and would love to see if the authors are open to feedback and possible improvement.
18:36:17
shka_
Xach: btw, can you take a look and say if it displays fine? https://sirherrbatka.github.io/cl-data-structures/l_1.html#812753871995231275
20:14:09
dlowe
is there a library or implementation feature that allows for asserting that only one reference is held to a particular object?
20:16:07
Bike
dlowe: kind of hard to define, or to know that it's true given everything that happens under the hood
20:16:28
Bike
for example, if you write a defmethod, machinery is gonna keep the original arguments around for (call-next-method)
20:17:32
dlowe
if it's hard for a function, it's even harder for the poor human trying to figure it out
20:21:47
dlowe
so a gc in its reaping or copying phase comes across something that really-should-be-garbage but isn't, it can signal an error or comething
20:27:44
phoe
I don't know if I can use this tool properly though and if it does what I think it does
20:56:39
mseddon
dlowe, I appreciate your pain, and thanks for both your and phoe's insight into observing this
20:59:19
mseddon
Please do report back how complete it's coverage is. It's at least conservatively great.
21:01:46
dlowe
mseddon: I would have to manually add (garbagify <object>) calls everywhere to figure out coverage
21:05:39
phoe
an error, what do you mean? that you want to signal an error if a given object is alive?
21:06:41
phoe
a minor issue is that the SBCL GC runs in the C world, you'll need to jump back to Lisp... which will be troublesome because the world is stopped during GC