freenode/#lisp - IRC Chatlog
Search
2:37:15
pillton
jmercouris: Be aware that the standard requires logical pathnames to be all uppercase.
2:37:23
specbot
Syntax of Logical Pathname Namestrings: http://www.lispworks.com/reference/HyperSpec/Body/19_ca.htm
2:59:49
jmercouris
pillton: I found it such an obtuse syntax, but I didn't want to change the code that was using it
3:04:53
pillton
It is my understanding that it was defined at a time when there where no clear "winners" in terms of pathname syntax or file system functionality.
3:22:52
jmercouris
iqubic: I was having trouble just extending the path, the syntax totally threw me off, that's all
4:19:29
aeth
There is one disadvantage to C-w. Now that emacs is integrated with the system clipboard, using C-w as delete will pollute the clipboard
4:46:00
jmercouris
aeth: Is it now? I still have a sort of "manual" integration with OSX: https://github.com/jmercouris/configuration/blob/master/.emacs.d/osx.el
4:55:07
jmercouris
astronavt[m]: yeah, I just detailed the basics in the beginning in case you would like to customize the location of the cocoa files
4:56:03
jmercouris
astronavt[m]: I will publish the directions online in a more consumable format than the repository I linked you to, but Paul Krueger has done a really good job
4:56:38
jmercouris
I remember many times where I was the only person in the room who actually likes objective-c
4:58:44
jmercouris
If all of the things I've read about it are true, then yeah, it seems like a very nice integration
4:59:54
emaczen
jmercouris: it uses the MOP, so you can use a slight variant to CLOS (which is the point of the MOP)
5:05:40
emaczen
by default in commonlisp class objects defined by you are instances of standard-object
5:08:23
sjl
jmercouris: https://mitpress.mit.edu/books/art-metaobject-protocol is a really good book to work through if you want to wrap your brain around the metaobject stuff
5:10:25
sjl
jmercouris: you can get it for around $25 if you don't mind buying used: https://www.amazon.com/gp/offer-listing/0262610744/ref=tmm_pap_used_olp_sr?ie=UTF8&condition=used&qid=&sr=
5:11:54
sjl
it's a good, mind-bendy book. I don't touch the metaobject stuff almost ever, but it was good to read anyway
5:12:30
jmercouris
Yeah, it is certainly nice to understand kind of what is going on behind the scenes
5:13:37
beach
jmercouris: Warning, though: Even as an experienced Lisper, I had to start reading it three times. The first two times, I was completely lost, so I had to put it down.
5:14:21
beach
jmercouris: So, what I am saying is that, even if you are lost, don't give up. You might have to try again.
5:15:05
beach
And people here in #lisp would probably be very happy to give some explanations. For you and for others who might be interested.
5:16:01
jmercouris
One thing that I've really liked about the lisp community is that it seems much smaller and friendlier than the others
5:17:08
beach
Sure, but we draw the line when we have to correct indentation and spacing for the umpteenth time, as would be required for some people who come here.
5:17:35
aeth
jmercouris: Most Lisp programmers use Emacs, but (afaik) most Emacs users don't program in Lisp, beyond perhaps some basic configuration elisp stuff.
5:19:58
jmercouris
I think that makes sense, part of being respectful of the time of other people is making sure that you have the basics down, and that you aren't wasting their time
5:20:37
jmercouris
Especially if you are asking on a public forum, whether it be stack overflow or otherwise, you should really focus on reducing the mental burden of the other person to understand your problem and help
5:21:06
beach
Right. Especially since #lisp is not, as some people think, a "Lisp support channel". Newbie questions are tolerated as long as there is some indication that progress is being made.
5:36:03
loke
Right. So what you need is some memory for the structure allocated. There are two ways of doing so: Either on the heap using basically malloc, or on the stack which has dynamic scope.
5:38:40
loke
Then, you can simply set fields in the stuct using (setf (cffi:foreign-slot-value FOO '(:struct NAME-OF-STRUCT) 'FIELD-NAME) THE-NEW-VALUE)
5:39:46
loke
emaczen: yes. But then you have to make sure you free the memory properly later. Sometimes you can use TRIVIAL-GARBAGE to create a weak pointer so that you can free as paert of garbage collection. It depends a bit on circumstances.
5:42:56
loke
There is a plist representation of a struct value, but that's only used when you pass around literal structures. It's actually quite rare, and most C API's work with pointers to structs.
5:43:00
emaczen
loke: I forget that things inside main are just like any other function and would be dynamic
5:43:57
loke
If you want to see an example of a lot of complex struct processing which also includes heavy use of literal structs, you can take a look at my cl-rabbit project.
5:45:58
loke
In that function, RESULT is a literal struct (plist representation) as returned by a CFFI function that returns a literal struct.
5:46:47
loke
You really need to understand what is going on on a low level, or you'll get mighty confused.
5:48:34
loke
struct foo { ... }; Foo someFunc(Foo x); ← Takes a literal struct as argument and returns another literal struct
8:18:13
beach
I think I have a working CST-to-AST system, modulo silly mistakes of course. Now I am thinking of a system for computing indentation from a CST. Such a system would be structured in much the same way as a CST-to-AST system, i.e., it would determine whether a CST represents an atom, a function call, a special form, or a macro call. Function calls are simple.
8:18:15
beach
Special forms are fairly simple, because they have fixed indentation rules. For a macro call, the macro lambda list determines the indentation of the argument expressions, but then, whether an argument expression is a form or something else, can only be determined by expanding the macro.
8:19:09
phoe_
Are you going to expand the macros each single time then? What if they have side effects?
8:19:33
Shinmera
It's also often desirable to be able to give further hints as to how a macro should be indented as the lambda-list by its own does not provide sufficient information about that.
8:20:11
phoe_
But then again, some macros like OPTIMA's and CL-PPCRE's expanders can be really freaky.
8:20:30
beach
I think the Common Lisp HyperSpec has some paragraph about how it is not known how many times a macro can be expanded.
8:21:57
otwieracz
beach: To be honets, my feeeling is that the editor will be broken if it wont work with something allowed in the language.
8:22:02
pjb
As long as you expect your macro side effects to be obtained at "random" times and multiple times…
8:23:21
beach
otwieracz: There is a difference between what the language "allows" and what it defines the effect of.
8:25:05
pjb
one guarantee by 3.2.2.2 is All macro and symbol macro calls appearing in the source code being compiled are expanded at compile time in such a way that they will not be expanded again at run time. It doesn't mention edit-time…
8:34:23
beach
Shinmera: Definitely very useful. If I use a structure similar to that of CST-to-AST, it will be trivially possible to customize the indentation of macro forms.
8:39:20
antoszka
beach: is that editor of yours already available for checkout/building/testing anywhere?
8:43:41
beach
Yes, but I have separated the GUI from the rest as much as possible, so it ought to be possible to use something else.
8:45:21
Shinmera
I know that the expansion of macros can happen multiple times, and I distinctly remember reading that in the CLHS, but I can't find it for the life of me
8:45:23
beach
CLIM/McCLIM makes so many things much simpler, though. I can't see myself re-implementing things like presentations for a different toolkit.
8:45:53
beach
Shinmera: Yeah, I know exactly what you mean. It is always very hard to find such things.
8:49:55
jackdaniel
yes, but I don't think that it is a must for a decent book to mention this particular thing
8:50:23
jackdaniel
for instance I don't think I've encountered such statement in CL Recipes, yet I think it is a very decent book
8:54:58
phoe_
Shinmera: https://github.com/xach/dpans/search?utf8=%E2%9C%93&q=%22multiple+times%22&type=
8:55:14
phoe_
I've been grepping the dpans3 sources for "multiple times" and were unsuccessful so far.
9:02:53
phoe_
"Macros intended for use in top level forms should be written so that side-effects are done by the forms in the macro expansion. The macro-expander itself should not do the side-effects. "
9:10:42
Shinmera
I mean, it's implicit in the sense that the spec never says that it is only expanded once either.
9:15:31
phoe_
Basically, edit-time will be equivalent to compile-time then, since macros will need to be expanded, so their macro functions will need to be called.
9:16:28
phoe_
Gah, this problem is an issue of type "can God create a stone too heavy for him to lift".
9:17:01
phoe_
We got a language powerful enough to turn its source code into Brainfuck and we're looking for an even more powerful tool to handle its power.
9:44:56
eminhi
from clhs prog2 description: prog2 evaluates first-form, then second-form, and then forms, yielding as its only value the primary value yielded by first-form
11:04:54
dim
is it safe to conclude they already had copy/paste at the time when writing the spec? ;-)
11:53:14
pjb
So it probably pre-existed unix ed, after all, unix is but a simplified clone of older systems and software…
12:51:05
pjb
shka: you have to look at early computers. Later, punched cards were copied first on an input spool tape (using a secondary computer), before being fed to the mainframe.