freenode/lisp - IRC Chatlog
Search
8:07:59
beach
Since I am on the subject, Second Climacs is already able to parse the contents of the buffer, using a modified version of the Common Lisp reader. The next step is to "compile" top-level forms at typing speed, at least enough for the editor to be able to determine the role of each symbol.
8:08:31
beach
It can then do things like compute correct indentation (which Emacs/SLIME can not do), and highlight the same symbol differently according to its role.
8:09:55
beach
For example, in the form (LET ((PROG1 ...)) ...) the symbol PROG1 does not refer to the Common Lisp operator. It is just a lexical variable.
8:10:47
beach
emaczen: For example, if you type (let ((bla <newline>, Emacs will position the cursor under the `b' in bla, which is correct.
8:12:24
beach
loke`: I am hoping to be able to do a lot more to help the programmer than what is possible with what you call the "pragmatic approach".
8:13:10
loke`
beach: I have no doubt. I'm just saying that a purely compiled solution will not be enough.
8:14:04
loke`
Your approach is obviously superior. It's jsut that some amount of guesswork still has to happen.
8:14:11
beach
emaczen: There should be no difference in indentation when you rename a lexical variable.
8:15:23
White_Flame
then there's cases like embedded DSLs where we reuse symbols like CASE, but have different semantics where the 1st parameter isn't supposed to be specially indented. But because it's CL:CASE, you really can't know that it's used for other purposes, except that it's quoted
8:16:17
beach
loke`: Nothing is ever "enough" with your requirements. I am happy if I can do something significantly better than what we are currently able to do.
8:16:21
emaczen
beach: I wrote a quick note-taking program which indents based on left and right paren counts -- basically indent for each new level in the tree
8:17:57
emaczen
but that is not how SLIME does it, and I don't think I've ever seen CL code that looks like that
8:19:12
splittist
being able to, for example, cleanly rename each use of the variable - but not symbol - LIST in a form/region would be a boon.
8:19:19
beach
emaczen: That's a good start, but you need to know the role of each symbol to do it better. Even Emacs/SLIME can do some of that, such as indenting the body of a macro call differently from other macro parameters.
8:20:36
beach
splittist: As soon as I convert the top-level form to HIR, I will know which occurrences refer to the same variable.
8:34:03
loke`
beach: I didn't realyl give “requirements” per se. I was merely pointing out that there are cases where heuristics might be necessary. However, in most cases that's not really the case. I actually agree with you in that your approach is better.
8:44:49
phoe
tapioco: https://common-lisp.net/project/cffi/manual/html_node/foreign_002dtype_002dsize.html#foreign_002dtype_002dsize ?
8:44:52
White_Flame
I'm no FFI expert, but that would be a property of the type, not that of an instance
9:04:45
flip214
tapioco: to use the foreign type, you need to have a definition of its contents, right?
9:05:12
flip214
if you can only deal with it like with a (void*), then you're missing that information
9:11:49
flip214
http://ftp.stu.edu.tw/FreeBSD/distfiles/cffi/0.14.0/cffi-manual.html#Allocating-Foreign-Memory
9:59:08
_death
tapioco: there is a note giving the alignment rules in cffi's types.lisp (search for "structure alignment")
10:08:06
_death
yeah, those pesky yes/no, on/off, here/there, none/some, discretely dichotomizing kind of things
10:11:07
_death
:uint8 for example, means 8 bits, what we call one octet, on your chosen platform, one byte.. sizeof returns the size in those units
10:47:36
pjb
tapioco: the pad is bad; it should be defined in terms of uint8. Otherwise you may have additionnal underlying alignment.
10:49:45
pillton
Has anyone seen any implementations of destructuring when the lambda list isn't known until run-time?
10:50:31
pjb
You get a list of binding at run-time. You cannot bind lexical variables, since they are known at compilation-time, not at run-time.
10:56:05
pillton
I have written tree based pattern matchers. I don't need to discriminate between patterns.
10:59:44
edgar-rft
DataLinkDroid: I know that Peter Herth still answers questions on the mailing list, so at least it's not completely dead.
11:01:53
DataLinkDroid
pillton: No updates in six years for a system that needs to be updated may mean that it is effectively dead, or looking for someone with sufficient interest to take it on...
11:13:15
DataLinkDroid
edgar-rft: Yes, you're right. Very low volume indeed. I may have missed something, but the latest response I could see from Peter himself was back in the middle of last year.
11:13:41
DataLinkDroid
I guess there is some sort of activity still, but to me at least, it seems quite moribund.
11:41:09
edgar-rft
DataLinkDroid: I think the main problem is that Tk (the GUI part of Tcl/Tk) may be okay for very simple GUIs, but as soon as it gets a bit more complex Tk sucks terribly. Also Tk on Linux in 2017 still looks like sh*t. It's not so much LTK's fault.
12:48:45
epipping
emaczen: about deploying standalone lisp apps... if you're using asdf to build your application, you can use asdf's ":build-operation program-op". https://github.com/epipping/cl-echo is a sample project that shows how.
12:51:55
p_l
pjb: there are sometimes pushes regarding what something should be done in, though. That said, after reading in depth, it was continuation of old CL planning software
12:52:55
pjb
Yes, people if left at their own devices will introduce any kind of programming languages and toys to have fun with, instead of working.
13:57:40
zulu_inuoe
Anyone know an way to get slime-compile-file to spit FASL's to the same place ASDF does? Is there some config option I'm not seeing?
14:10:13
shka
i need this, beceause i want to use two different slot definition classes, with separate options in one class
14:26:50
jackdaniel
slime is also meant for interaction with lisp image and buffers, it doesn't know much (anything?) about asdf
14:28:01
phoe
I bet that some sort of slime or even swank function returns a path to the resulting FASL - if you're in for a dive, you can use that to copy the resulting FASL where you want it to be.
14:29:53
zulu_inuoe
Right, so on my system my fasls go in ~/AppData/common-lisp/sbcl-1.3.15-win-x64/<FULL-PATH-TO-FILE>
14:31:07
zulu_inuoe
It's something that (at least on my use case) would not have anything to do with asdf, really. So it seems like it'd be easy (famous last words) to have slime spit out using that same scheme
14:32:12
tapioco
please, does cffi:foreign-free destroy complex object too like structures or shall I destroy any single allocated pointer inside the structure itself?
14:32:15
zulu_inuoe
jdz: Yeah that would work, but I do like the other transform since it makes it trivial to identify where files are coming from
14:34:20
zulu_inuoe
jdz: Thought so, too. Didn't see an option out of the box so I thought I'd ask here in case I was blind
19:32:02
gendl
Hi, is it possible to package cffi for a runtime deployment without depending on ASDF?
19:32:28
gendl
If i use (asdf:operate 'asdf:monolithic-compile-bundle :cl+ssl) to generate a standalone loadable .fasl file,
19:33:31
gendl
I don't need all CFFI's generate capabilities, just the runtime -- no easy way to disentangle ASDF from it?
19:35:29
jackdaniel
you may want to try to create a "mini" system which doesn't include extra goodies
19:39:34
jackdaniel
but I think ASDF injects itself into bundle dependencies (see `:no-uiop' option to program-system
19:42:59
gendl
jackdaniel: thanks. Looks kinda complicated to disentangle it. I'll have to circle back to it later.