freenode/#lisp - IRC Chatlog
Search
15:48:01
sjl_
luis: the file changed messages could help swank fix its line locations when you edit a file to move stuff around without evaluating
15:50:51
jdz
I personally save files way more often than they are in a compile-able state. Probably a habit from the old days when I've lost half-a-day work because of not saving files.
15:51:57
sjl_
an alternative is to use tmux or whatever and have a key in your editor to send the (quickload foo) to the REPL split
15:51:58
jdz
LispWorks also has a feature (at least had) that tracked changes in files and could recompile only the changed expressions.
15:52:55
sjl_
LSP not having everything you could possibly want for lisp development built-in doesn't mean it's not worth using.
15:54:28
jdz
Emacs itself has a mode that tracks changed parts of files, but I've found it more troublesome than useful back in the day.
15:54:50
sjl_
Anywhere, there's a 2-year old repo at https://github.com/cxxxr/cl-lsp that has a license now. Unsure if it's worth using as a base, or if the protocol has changed too much since then to make it viable.
16:24:56
pfdietz
I will also sometimes use methods as a way to check argument types. And in SBCL, type declarations are assertions at safety 3.
16:35:23
asarch
How would you write an application just like "tail -f" work? (I mean, it would inspect for new content of a file)
16:37:34
flip214
asarch: seek to the end of the file, remember the position, seek to the end of the file, check whether the position changed.
16:43:14
anamorphic__
asarch, perhaps use an existing implementation as a guide, eg. https://git.busybox.net/busybox/tree/coreutils/tail.c#n340
17:33:30
pfdietz
Use defgeneric as you might use the declaration of a function signature in C. Also, it's a place to hang the :documentation string for the whole function.
17:34:07
pfdietz
SBCL used to issue style warnings if it encountered a defmethod without first having seen the defgeneric.
18:17:15
jackdaniel
I'd even say taht for exported interfaces you should have defgeneric for accessors/readers too
18:19:00
pfdietz
SBCL did not issue style warnings for those in the absence of defgeneric, but the documentation would be good.
18:20:56
jackdaniel
I'm saying that, because with time readers may deteriorate and become normal methods anyway, but the interface doesn't change
18:22:13
jcowan
Makes sense to me. For every method a defgeneric, even methods not created by defmethod.
18:32:22
pfdietz
The interesting style question to me is: what to name these accessors? The potential for collisions of short names is high.
18:34:04
shka_
personally i name accessors access-size, read-size, write-size but this is NOT mainstream
18:34:36
jcowan
I guess that within the scope of an app the accessors should be named after the domain objects of the design
18:45:55
Xach
I consider the notion that they are associated with a slot to be an implementation detail
19:06:36
pfdietz
I often use slots as exactly that, populating the cache with a slot-unbound method.
22:28:41
no-defun-allowed
okay i finally realised something very very stupid about disassembling car/cdr
23:14:14
pfdietz
That's right. And the low order bits of fixnums are zero, so addition and subtraction work just fine.
0:57:08
sjl
cl-ppcre:all-matches returns a list of (start1 end1 start2 end2 start3 end3 ...) but I only want to print the starts
1:18:45
Bike
"A common trick is to use capturing technique inside an unanchored positive lookahead" oh god, what the hell
1:26:50
sjl
http://paste.stevelosh.com/89de123b33b7efe1e927d9c9dfbdb30dd89d5819 will let me move on with my life I guess