freenode/#lisp - IRC Chatlog
Search
0:08:27
aeth
ebrasca: When writing something new, you'll eventually have a realization that something old you wrote should be rewritten. At that point, do it.
0:08:44
aeth
(As long as it's not a library that someone else is using. Then you're restricted because you can't break the API.)
0:13:12
pjb
elderK: instead of prefix symbols for different uses or protection leves, you can define different packages, for users, developers, etc.
0:13:19
whartung
since I write code not for the sake of writing code, I tend to put time in new software to do new things than updating old software to do the same thing it always has done before. If I have to modify older software, then I would certainly consider incorporatng whatever I’ve learned since I wrote in to the new changes I’m making, if appropriate.
0:15:14
pjb
elderK: (defpackage "YOUR.IMPLEMENTATION" (:use "CL") (:intern "FOO" "BAR" "BAZ")) (defpackage "YOUR.API" (:use) (:import-from "YOUR.IMPLEMENTATION" "FOO" "BAR") (:export "FOO" "BAR")) (defpackage "YOUR.USER" (:use) (:import-from "YOUR.IMPLEMENTATION" "BAZ") (:export "BAZ"))
0:15:54
pjb
So you can write your code in the package, YOUR.IMPLEMENTATION, and develoers can use YOUR.API:FOO and YOUR.API.BAR, while users would use YOUR.USER:BAZ.
0:24:07
elderK
pjb: :P Damn, I'm using % as a marker to say "internal, but you can use it if you're doing something weird."
0:39:10
|3b|
"this is dangerous, so make sure you know what you are doing if you call it, but it is exported so it is a supported API"
0:43:19
elderK
Is there any effective difference to like, adding something to a symbol's plist in the macro expander itself, to doing the same in the expansion in an eval-when (:compile-toplevel)?
0:55:54
elderK
Bike: By macro forms, do you mean that the macro expansion function might be invoked in weird times and stuff?
0:59:25
whartung
depends on the macro. Some macros may be part of a larger context that makes sense to capture context level state.
1:01:50
jcowan
The main thing is not to do anything in a macro (except for debugging etc.) that is not idempotent.
1:02:52
whartung
well, in my field example, you could see the “my-set” field set could contain a list of fields that are defined within the scope of “with-field-set”, so you need a list, or vector, or something to capture them. field would be an example of a macro with a side effect.
1:05:34
whartung
the entire “field set” is a contrived example (I have no code defining fields sets, I can’t expand on the detail as to what a field-set is, or does, or when you would use one, etc.)
1:06:02
whartung
it’s simply demonstrative of a rare case where you may have macros that work together.
1:06:48
whartung
the “with-field-set” creates a context within which the “field” macro works at aiding in the defintion of the field set.
1:07:30
whartung
the side effect is how the individual “field” macros affect the context created by “with-field-set"
1:08:18
whartung
for example if you have 2 field macros, then the list of fields in the field-set will be 2 fields long. If you define 3, then it’s 3 fields long. That list is an attribute of the field-set that the field macro affects.
2:05:22
dlowe
I'm trying mcclim for the first time, and I type in the first example in the manual (sbcl/linux x86-64)
3:49:39
loke`
If I were to ask a whether I can ask a question about asking questions in the possible future, would I be asking too much?
3:51:39
elderK
pillton: It's not that I really have a concrete question, it's that I want to brainstorm with someone more experienced than I am :D
3:53:47
loke`
elderK: If you want to lure someone into a discussion like that, it's better to ask a question than to request people to allocate personal time for something which they don't even know the topic of. :-)
4:20:28
loke`
aeth: And that's what pillton suggested, wasn't it? To simply ask and not ask permission to ask
6:00:33
fiddlerwoaroof
elderK: as a general rule you ask your question and if anyone can think of anything to say you might get a flameware out of it
6:01:59
aeth
fiddlerwoaroof: Everyone knows that the only valid programming style is my style and the only valuable problems to solve are the problems I find interesting!
6:02:17
aeth
fiddlerwoaroof: Also, the only editor one should use is the editor I use (well, at least the Lisp community doesn't have a debate there)
6:24:00
fiddlerwoaroof
I use VS Code almost exclusively for JS because I haven't been able to find a good emacs setup for react that works with aggressive-indent-mode
6:28:13
elderK
fiddlerwoaroof: Thing is, well, iono. I wish I had someone to talk about the idea with. I know what I want to do, hell, I even know the expansion I want. But every way I do it feels nasty in some way.
6:28:45
elderK
:P I'm surprised Alexandria doesn't a have function that like, creates a lot with N of whatever you specify.
6:29:09
aeth
*mentioning... for some reason my n key hasn't registered all of the n's today. Not reason why an i also got dropped
7:14:39
LdBeth
What's the (probably terminal) setting to let lisp eval a form immediately after parenthesis pair up without send return?
7:28:07
pillton
I think you would have to use read-preserving-whitespace and a terminal setting. See chapter 17.3 of The GNU C Library.
8:57:17
elderK
I've been working on a system that'll allow me to do, like, the kind of work I wanna do.
8:57:52
elderK
I've been working on "binary structures" for most of the day today. It winds up being a much more uh, detailed, problem than it first appears. Taking a peek at other such systems, many sidestep some tough stuff.
8:58:21
elderK
Or doing most of their stuff by way of type info at runtime, rather than actually generating efficient "readers" with the important stuff baked i n
8:58:41
elderK
Of course, you also want to be able to have structures in structures, or arrays of structures in structures :P
8:59:13
elderK
And be able to correctly parse them. Conceptually, it winds up pretty straight forward. But, I have not yet been able to implement it in a way I feel happy with.
9:00:07
elderK
I erased what (little) I wrote for define-binary-structure. Instead, I just wound up documenting the core ideas.
9:00:22
jackdaniel
actually no, minimal cases which illustrate the problem which are well formated increase likehood of someone looking at them
9:00:45
jackdaniel
brettgilio: also it is the minimum level of politeness to prepare clean example if you request help/review
9:01:49
jackdaniel
and people who count on approachable people will lose big because non-approachable (yet kind) experts won't bother to look at that
9:04:41
jackdaniel
(and I understand your point of view - it is very kind one, hard to criticize it, I've just provided argumentation, that "dirtier the better" may wrong headed if you think about consequences)
9:06:48
elderK
Well, I'd like to discuss the design as it were, but I'd prefer to do that in private with someone. I came here earlier hoping to chat with someone about it all but I was shot down for it.
9:08:07
_death
elderK: the issues you talk about are both about design and implementation.. in this case, I suggest you figure out the right syntax describing the binary structures, sketching a simple implementation and leave the efficiency issues for later
9:08:53
elderK
_death: I know /exactly/ what I want to generate. That hasn't been the problem. The problem has simply been that each implementation I've written to do what I want to do, feels horrible :P So, I have cycled over and over trying to do it differently, do it better.
9:09:31
elderK
I'm happy with the simpler parts of my system so far. Just, structures, atm are the interesting thing. Mostly because I want to allow stuff as mentioned earlier.
9:11:29
elderK
_death: I have been. And for the most part, everyone here has been extremely useful. I appreciate it.
9:24:59
fiddlerwoaroof
elderK: fwiw, if you already know what the generated code should look like, you should build up your higher-level interface incrementally