freenode/#lisp - IRC Chatlog
Search
14:15:42
jjkola
my quicklisp update became partially borked and now some of the package are still using the old version even though the latest is available and installed
14:17:57
jjkola
when I connect to slime it says the version is 2.20, and also when I connect to other instance where the dists version is latest, slime complains that swank is 2.23 while the currently used is 2.20
14:23:10
jjkola
the reason it became borked was because when updating it complained that ubiquitous could not be found
14:25:29
Xach
jjkola: it seems to me like emacs is loading an old slime through some other means. where does emacs think the function slime-connect is defined?
14:26:33
Xach
Then you will be in slime.el and can check the path to the file with C-x C-f for example
14:27:01
polezaivsani
Hi! Does anybody have tips on what reference (or else) material is good for getting up to speed with subj for somebody having a basic grasp of scheme? I'm thinking to scratch an itch with sbcl planning to learn as i go/fall.
14:27:43
Xach
polezaivsani: first, forget everything you know about scheme when trying to learn how to use CL and SBCL effectively. second, there are many good books on the topic. i like practical common lisp and paradigms of ai programming.
14:27:53
polezaivsani
Bike, thanks i know that. i mentioned scheme to let you know that i have some relevant exp
14:28:15
Xach
i found scheme experience to be harmful rather than helpful, but your experience may vary
14:28:19
Bike
i don't think you have to forget _everything_, but it's definitely a distinct language
14:30:19
Xach
jjkola: hmm! the swank.txt file should point quicklisp-slime-helper to the 2.23 version. i don't know why it is not.
14:31:01
polezaivsani
Oh, i didn't thought of scm experience to pose an issue - i'll keep an eye out for it!
14:33:50
Bike
in lisp the same symbol can name multiple different objects in the same scope, unlike in scheme
14:35:09
polezaivsani
i too worry mostly about recursion, namespaces doesn't seem that big of a deal to me
14:37:15
polezaivsani
thanks for the hints fellows! i heard good praises about PCL and will prob stick with it for now
14:38:00
Bike
the tail recursion thing does imply actual restructuring of program logic more, though.
14:50:33
jackdaniel
when I buffer unfinished lines (from stream-write-string which has a string, start and end parameters) what would be better: storing (list string start end) in internal collection or maybe rather copying the appropriate part of the string to an internal "buffer" string?
14:53:47
jackdaniel
the first approach seems dumb, but otoh it avoids unnecessary copying so it might actually pay off...
14:54:29
jackdaniel
good point, thank you. also when I spoke it aloud I now think I'm in a microptimization tarpit (in a passage which is not a bottleneck)
14:55:08
shka_
jackdaniel: i actually suspect that for short strings copying may be even faster and require less memory
15:15:33
jcowan
I think in practice there is only one implementation that does not do tail recursion, and a few more that don't do arbitrary tail calling. However, it's not CL style to depend on this.
15:17:40
jcowan
One problem with storing "fat pointers" into strings is memory leaks: if you read a 1 MB string from a file and then save a "fat pointer" to just five characters of it, the rest of the 1 MB is basically a memory leak
15:18:42
lieven
jcowan: yes, but things like unwind-protect and similar even in macros may make code that looks tail calling not actually be tail calling
15:19:54
lieven
it took the Scheme people some 20 odd years to correctly define what is meant by tail calls so it's a rather hard problem
15:20:14
jcowan
(I must say that I did not find my knowledge of CL to pose a difficulty in learning Scheme. Although if CL had been my first language, or even my first Lisp, things would probably have been otherwise.)
15:21:51
lieven
the main problem is some people insisting in writing one language in the syntax of another language instead of using a language idiomatically
15:31:02
gendl
i think i can get the seed donors to go along, if we think it will help get closer to the matching target..
16:52:30
glv
Hi. Does anyone know if there is an example somewhere showing how to make a text-field gadget act as a password field in a McCLIM GUI (showing '*' instead of characters)?
17:04:03
djeis[m]
glv: You might have better luck asking that question on #clim, although I'm not entirely sure that the text field gadget supports that kind of operation given only the CLIM 2 specification.
18:02:22
glv
ThomasLewis: Thanks. I saw a similar piece of code in the CLIM 2 user guide, but I have not yet managed to make it have any effect on my text-field gadget.
18:54:51
jackdaniel
for the record: I've explored alternative approach which lead to a bug report: https://github.com/McCLIM/McCLIM/issues/726
19:14:46
ThomasLewis[m]
glv: (setf password (accept 'password :stream query-io :prompt "Password:" :query-identifier 'password))
19:34:03
pfdietz_
jcowan: I don't think there's a need to preserve the entirety of an array if something is displaced into it.
19:35:23
pfdietz_
Referencing your earlier comment: "One problem with storing "fat pointers" into strings is memory leaks: if you read a 1 MB string from a file and then save a "fat pointer" to just five characters of it, the rest of the 1 MB is basically a memory leak"
19:37:15
pfdietz_
The CL displacement mechanism for arrays is essentially an immutable offset into a subsection of another array. A sufficiently smart garbage collector could free up the parts of the target array that are no longer reachable.
20:48:49
pjb
But the point is that you map the keycodes to keysyms with xmodmap, and there's no windows keysym.
20:50:14
pjb
emacs uses C- M- and S- and combinations. So we're free to do whatever we want with choards including s- H- and A-.
20:50:58
didi
Idea: In REDUCE, if I say `:FROM-END t', then :START means end and :END means start. Why? Because then I can say `:FROM-END t :START 1' to avoid the last element and not have to say `:FROM-END t :END (1- (length seq))'.
20:51:38
pjb
didi: NOPE. (reduce (function list) "abcdefgh" :start 1 :end 3 :from-end t) #| --> (#\b #\c) |#
21:11:22
comborico1611
So if I run a compiled file in a REPL, it is pretty consistent with how the program would run outside of a REPL? -- specifically concerning the order of defining variables and functions.
21:12:28
comborico1611
The context I'm discussing is pretty expressed here: "REPLs tend to work a little differently, because they are usually used interactively, so don't take their warnings as good normal practice. I'm not familiar with your REPL, but most of them have a paste mode or a compile mode that will work more like a regular compile environment."
21:13:20
Grue`
if it's not a fresh REPL, the previously executed code might affect the newly loaded code
21:22:01
comborico1611
Anyone have recommendations for an article on the subject of order of definitions in Lisp?