libera/#commonlisp - IRC Chatlog
Search
14:18:47
beach
lisp123: It has taken me decades to understand the language well enough to hope to implement it. It will take me another couple of decades to acquire enough knowledge to improve it.
14:20:19
lisp123
beach: at least you will know that what you are doing is on the frontier of Computer Science, whilst other languages keep re-applying the old concepts that CL already worked through
14:25:04
_death
more reasons that CL isn't very extensible in some parts is that it's an evolutionary step and had to take backwards compatibility into account.. also, CLOS was a new design and not everyone had lots of experience with it, and the idea of a CLOS-less subset of CL was in the air as well
14:27:00
beach
pve has a point as well, given that PCL was the best they could do at the time in terms of generic dispatch, generic functions would have had a significant cost associated with them.
14:28:09
lisp123
beach: nice, his article(s) on exceptional situations in lisp were A+, although I must admit I can't be bothered using conditions when I code lol (although I might for one use-case soon: when I use somebody else's packages and am not guaranteed of the behaviour of that package)
14:28:29
beach
That's part of what impresses me with the language. They didn't include features that they weren't absolutely sure could be implemented efficiently. Unlike people who create other languages like Python.
14:29:37
lisp123
Indeed, I think especially given the circumstances of processing power in the 70s and 80s
14:29:55
_death
if you have a language like Go, which didn't need to care for any previous codebases, you can see that some parts of its standard library are designed with extensibility in mind that makes things very convenient after adoption.. in CL you can create de-facto standards of extensibility, and it has more powerful tools to adapt the language, but it's more evolutionary and less "intelligent design".. of course, as time goes by, Go has to
14:30:32
lisp123
beach: I write 95% of my code, so I keep it all in my head and make sure it all works - as long as I don't open it up to the outside world, it hasn't been too much of an
14:31:29
beach
lisp123: Oh, dear. You must have debugging nightmares, with incorrect results propagating way too far along the way.
14:33:23
lisp123
beach: lol ;) I'm learning by struggling :-) I'm doing a lot of very conceptual work, so there are less moving pieces and rote code, so for now I'm spending all of my limited energy on the problem at hand. I think as my program evolves, I will switch over to a more robust phase
14:35:07
beach
I recommend the work of Bertrand Meyer about modularity. He made a lot of concepts clear, like preconditions, invariants, exceptional situations.
14:37:23
lisp123
I would say a little bit above newbie, but not professional. I dropped out of IT in University (switched to business), but I do all front-end web dev work without probolem and created my own (somewhat popular :) ) apps in Swift for IOS
14:38:24
beach
Here is a short description of his work: https://en.wikipedia.org/wiki/Design_by_contract
14:38:30
lisp123
but no formal training, so a lot of stuff I do very badly (error handling and writing proper commit messages seem to be common ones), and wouldn't be able to work in a team for sure
17:02:38
lotuseater
beach: Why did you choose the BSD license for SICL? (I don't know much about licensing yet.)
17:15:37
lisp123
(sorry to continue this topic among us non-lawyers, buts its an interesting one), but that would imply all emac packages are GPL?
17:16:08
lisp123
whereas people do release their packages under other licenses, so perhaps their view is different
17:18:43
jackdaniel
gpl seems to be often disregarded with passion based on fueled fud (me ceases offtopic ;)
20:45:06
aeth
Personally, I use permissive licenses for CL stuff where I'd consider the GPL in other languages because I want to encourage people to use CL. YMMV.
20:46:32
aeth
jfb4: I mean, if someone has to load up ECL to interface with some big, proprietary C/C++ program because they really, REALLY want to use my code, I consider that a win for CL.
20:59:50
aeth
You could use LGPL but idk how it would interact with being embedded as part of ECL, rather than as a separate C/C++ library
20:59:54
edgar-rft
it *can* be used with proptietary code but only when the proprietary code is laid open, too, what in practice is very unlikely to happen :-)
21:00:07
aeth
But always make sure that your code runs in ECL even if you never use it, at least imo
21:00:18
aeth
Because if a C programmer really, really wants your code, they're going to have to use ECL
21:04:45
jackdaniel
I have it fixed, but here comes an interesting (to me) fail: (loop for key in keys for pos = (position key head) collect (lambda (elt pos body)))
21:05:53
jackdaniel
because pos is modified destructively by loop, all collected lambdas will see the same pos value
22:05:37
lotuseater
How can I correctly define a readermacro in lexical-scope of a DEFMACRO? is clear what I mean?
22:14:09
lotuseater
eg I want such construct like (vec! [1,2,3]) expanded as (make-array 3 :initial-contents '(1 2 3)). but ok, VEC! would be enough as a function there. the point is I thought about when one wants the readmacro for #\[ just being activated as the macro/function starts
22:16:57
Bike
unless you override the entire reader, which is probably where a macro on ( is leading
22:17:30
lotuseater
because I understand it by now that the reader looks at everything before compiling, so if #\[ is not in the toplevel defined an error occurs
22:18:46
pjb
vec! cannot be a function since it will interpret the text until the closing parenthesis differently.
22:19:40
pjb
For that, you need to write a reader macro for #\( that will see that the operator is vec! and dispatch to some read-time parser.
22:22:06
lotuseater
yesterday in the late evening I played with defining one for lambdas with #\\ so eg \x y . (+ x y) => (lambda (x y) (+ x y))
22:26:56
lotuseater
or those Clojurists which are still enslaved to the JVM. but that's much opiniated and so offtopic :)
22:27:42
lotuseater
the tip with emacs is helpful, I still know not much about that all to configure right (but use is most times)
22:33:23
pjb
On a 105-key PC keyboard, you have 3 modifiers on the left and 4 on the right of the space bar.
22:52:50
jcowan
In any case, there is no existing CL implementation under the full GPL except CLISP, and that does not impose the GPL on your code (per the FSF's GPL FAQ)
22:56:42
aeth
also, by the FSF's writings on the LGPL and Java, the LGPL (no need for the LLGPL) should be compatible with CL as long as the LGPLed files are user-replaceable (like Java's JAR files), e.g. as separate loaded FASLs
22:57:30
aeth
and the implementation files certainly should fall under that, so the LGPL also would work
22:58:46
aeth
moon-child: right, it does make packaging awkward because you'd have to load FASLs via something like ASDF, rather than building an all-in-one binary
22:59:06
moon-child
if my code is closed-source, and I use an LGPL'd macro, the result of that macro is output in my code. Changing the content of the macro won't change my code
22:59:45
aeth
You would have to recompile the dependent files if the dependencies' FASLs are replaced, like QL:QUICKLOAD does, but unlike what packaged Lisp binaries tend to do
23:13:37
etimmons
Doesn't the LGPL say that small enough macros (<10 lines, IIRC) don't make the object file that uses them a derivative work?
23:14:49
etimmons
But that does suggest that trivial macros don't really limit how you distribute your closed source executable
23:15:43
etimmons
(other than the aforementioned requirement to allow people to swap out the LGPL'ed fasls)
23:17:02
aeth
etimmons: well, yes, the language is C-specific, but https://www.gnu.org/licenses/lgpl-java.html
23:17:26
aeth
"FSF's position has remained constant throughout: the LGPL works as intended with all known programming languages, including Java. Applications which link to LGPL libraries need not be released under the LGPL. Applications need only follow the requirements in section 6 of the LGPL: allow new versions of the library to be linked with the application; and allow reverse engineering to debug this."
23:18:26
aeth
Considering that they have 2 Common Lisps (CLISP, GCL), 3 Schemes (Guile, Kawa, MIT), and at least 1 other (elisp), "all known programming languages" has to apply to Lisps
23:21:54
etimmons
aeth: yeah, I've seen that. I was mostly bemoaning the language with respect to macros