freenode/#lisp - IRC Chatlog
Search
3:54:26
Bike
little did they realize that i can only be killed by a sword forged from the four lost fragments of Izathitch
5:03:37
loke`
jack_rabbit: Cool. What are the specific features that made you implement it? (every implementation has something that makes it...hmm.. unique?)
5:04:46
jack_rabbit
loke`, I just had an idea suddenly. I finally knew how to build something like this, so I did.
5:05:57
jack_rabbit
The code really needs to be cleaned up. I just did a major code-writing session and committed all kinds of commented code. I'll clean it up tomorrow.
5:06:52
loke`
The bytecode seems to be instances of struct binstr, which is instructions of a stack-based bachine?
5:08:49
jack_rabbit
The instr field is the address of code in a section of the vm proper. When instructions are finished, they jump to the next instr in the VM.
5:10:31
loke`
Although your implementation doesn't seem to define an actual bytecode format. Rather, it's a list of malloced C structs. That means that the obvious FASL format (just dumping the structs to a file) would not be portable.
5:17:53
jack_rabbit
But I'd rather use my own assembler, as imperfect as it is: https://github.com/knusbaum/assembler
5:20:33
Bike
does it really just use malloc and free? i don't think malloc is really designed for lots of tiny objects, or something...
5:23:58
jack_rabbit
Mark everything white, then check the roots, mark them grey and put them in a queue.
5:25:55
jack_rabbit
Basically, all the operations like macro expansion, compilation, etc. work within the VM itself.
5:26:19
jack_rabbit
So as long as I make sure all live objects are on the stack, I'm safe from the GC.
5:30:28
jack_rabbit
It's pretty fast, too. Without gc, it does (fib 40) about twice as fast as python. With gc, it's about a third slower.
5:41:21
jack_rabbit
hard to say. There's definitely synchronization of some kind necessary in any GC.
5:42:14
beach
Hmm. Either you run the GC to completion once you started it, or else you only run it a little bit and resume the mutator(s).
5:43:09
jack_rabbit
Yeah, mine runs concurrently, but stops the main program at key points. I guess that's incremental.
6:34:31
impaktor
Hmm, but it's usually my fault. When stuff breaks. And I think I have the same sbcl version on another computer that works fine.
6:41:40
axion
The guy who packages SBCL for Arch Linux doesn't know what he's doing. I emailed him several times and just compile from source myself these days.
6:42:44
pookleblinky
sbcl has always been rather finicky for me. Oddly, I never had a problem with it on arch, only on debianish distros
6:49:22
impaktor
Ah! Yesterday I told my zsh to not load the global /etc/zsh as that overrides my prompt with a retarded smiley face(!). In doing so, I wonder if this caused my $SBCL_HOME to becoming NIL (as it is now).
6:54:52
impaktor
Now I would be far more happy if I understood why that happens, and how it is interconnected with my disabling reading the global zsh configuration file in /etc/.
7:57:34
beach
Significant progress: The lambda-list parser that I am working on, and that is based on the Earley parsing technique, seems to work for simple cases. Ultimately, it will work on concrete syntax trees (CSTs), but at the moment, I am using ordinary Common Lisp lists. I still have to design a technique for invoking it recursively when the lambda list allows nesting, such as the macro lambda list.
8:00:30
beach
A library that is meant to make it easier for a compiler or a text editor to keep track of source locations of Common Lisp code read from a file or an editor buffer.
8:04:11
beach
Mostly, the library is trivial, but parsing lambda lists is a bit harder, especially since I want client Common Lisp systems to be able to adapt the parser to their needs. The standard specifically allows Common Lisp systems to add their own lambda-list keywords, and I have to take that into account.
8:05:44
beach
The other part that is not trivial is the "intelligent macroexpander". It attempts to "guess" the origin of expressions that occur in a macroexpansion. But that one is already written, so I am working on the lambda-list parser now.
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