freenode/#lisp - IRC Chatlog
Search
5:52:54
verisimilitude
I suppose Shen is a good example of building one's own Lisp on CL, considering it has a CL implementation.
5:59:31
fiddlerwoaroof
verisimilitude: yeah, and the yale haskell compiler was implemented in a half-working attempt at source compatiblity between scheme and common lisp
6:00:17
fiddlerwoaroof
Then, at a further extreme, there are things like clpython and cljs that implement completely different languages by transforming them into CL and then compiling the CL
6:03:42
fiddlerwoaroof
This directory contains a scheme-like set of operators for CL: https://github.com/fiddlerwoaroof/yale-haskell-reboot/tree/master/cl-support
6:08:46
LdBeth
I suppose inventing a third language makes this barely useful to either scheme or CL people
6:10:32
fiddlerwoaroof
Yeah, I think they basically tried to smoothly transition from CL->scheme and then discovered that they hada huge mess :)
6:10:52
fiddlerwoaroof
But, it would be interesting to hear from someone who actually worked on this about what happenend
8:00:26
akater
fiddlerwoaroof: dwim.hu custom syntax, to me, is a nice example of syntax I probably wouldn't use but in the same time one that is fine to read.
8:02:07
akater
It seems there's a verys thin line between custom syntax that is readable and unreadable. dwim.hu sort of manages to deal with it.
8:02:44
akater
In the meantime, I'm still not sure what WITH-UPGRADABILITY means in recent ASDF. :-)
8:13:36
akater
Macros cross the border between “technical abstraction” and “the way people use the language”.
8:13:38
akater
I believe a sufficient condition for a macro to be considered done right is to “make enough sense on the first glance” to a sufficient amount of members of the community using the language.
8:13:46
akater
Here, “enough” is hard to formalize though. But to me, it looks like dwim.hu code pushes the boundary just right. Its macros are mostly understandable by osmosis.
8:18:32
fiddlerwoaroof
akater: WITH-UPGRADABILITY basically prevents sbcl from inlining the function, iirc
8:20:55
fiddlerwoaroof
the goal is to allow ASDF to be upgraded in-place in implementations that ship an old version
8:36:33
akater
Well anyway, comprehensibilty of macros is subjective. But I was a little surprised by jmercouris' objection to something I found quite readable. I wonder if jmercouris would object to some DEFCLASS wrapper that creates homonymous accessors and initargs. (Will have to ask later, I guess.)
8:47:23
hectorhonn
beach: huh? why not? most of the time my slot reader has the same name as the initarg
8:48:00
beach
I find that there is always some slight variation between slots. One slots needs an :ACCESOR, but another needs only a :READER. One needs an :INITFORM, another does not.
8:48:36
akater
hectorhonn: Usage example: (define-simple-class symbol-and-type (expression) ((symbol :type cl:symbol) (type)) (:default-initargs :type t))
8:49:55
hectorhonn
beach: if one uses an immutable style, most of the objects will only need readers
8:50:34
beach
Plus, I always give each slot a name that is different from the reader/accessor, so I would not want the initarg to be derived from the slot name.
8:51:09
beach
Another variation is that there is sometimes several initargs for a slot, and sometimes several readers, or one reader and one accessor.
8:53:11
aeth
A separate writer with with-accessors is awkward so it's imo best to have a reader and an accessor if only a reader is supposed to be public
8:54:29
dim
I tend to use struct so that I don't have to think about all that ;-) but I lean to using classes more these days I think
8:55:14
dim
mmm, thinking about it, I think I use classes when I know there will be some inheritance involved in my data structures, otherwise defstruct and generic functions
8:55:16
akater
hectorhonn: The snippet might be nonconforming, actually. Cf. 3.1.2.1.2.2 Macro Forms: `The consequences are undefined if a macro function destructively modifies any part of its form argument.'
8:55:37
jackdaniel
I've encountered a few times macro defclass* which defines initargs and accessors based on slot names
8:55:49
jackdaniel
so the syntax is essentially the one from defstruct but you may redefine such classes
8:56:18
jackdaniel
also ergolib has define-class which allows you to choose whenever class is backed by a structure-class or a standard-class
8:56:30
aeth
dim: my personal line is that I almost always use structs when :type in slots is important
8:57:51
jackdaniel
I can agree that some dislike such automation (hence criticize defstruct), but other than that it doesn't seem like anything extreme
8:58:36
aeth
The most common thing a defclass* probably would overlook is the reader+accessor combination in a slot definition
8:58:52
dim
jackdaniel: CCL knows how to redefine structs, and SBCL in a more limited way but as I tend to have short-lived objects it's not a problem for me
8:59:07
jackdaniel
aeth: it works (afair) like this: if slot is denoted by a symbol, automatic stuff is defined, if it is a list, then it is left as is
9:00:10
jackdaniel
I've landed a new restriction in ECL develop branch lately which signals an error when structure is redefined in incompatible way
9:04:41
akater
aeth: I mostly use :type to get some useful feedback from the compiler. In case of SBCL, I do! Caught some bugs simply due to type declarations.
9:05:46
akater
aeth: And it makes code more readable for me, too. After a couple of stall weeks, type declarations help to remember what I had in mind.
9:06:33
hectorhonn
beach: several initargs for the same slot? wow i didnt know one could do that. haha
9:07:32
aeth
akater: This will bring up the types debate again so I should say this: There are certain places where types are useless (e.g. helper functions to macros) and certain places where they're near-mandatory imo.
9:09:08
jackdaniel
or the initarg may not be associated with a slot and logic associated with its value may be put in initialize-instance method
9:16:15
hectorhonn
jackdaniel: really a programmable programming language. totally lives up to its name
9:16:28
akater
I recently saw a blogpost from someone who migrated from CL to Julia because CL “has no dependent types”. I can understand this affection. A common rejoinder is, “you can do this with macros” but in my opinion, it's getting old.
9:18:14
no-defun-allowed
stuff like (in haskell) `singularList :: a -> [a]` where the output types depend on the input, often using type "variables"
9:19:03
akater
There was at least one attempt to bring dependent types to CL, namely “cl-parametric-types” but the author (1) became disillusioned, according to his own statement; (2) was inspired by C++ templates, which is not necessarily a terrific idea when one programs CL.
9:23:04
ggole
a -> [a] is just parametric polymorphism, and Julia's "dependent types" thing is having typed array sizes
9:23:46
akater
Julia is worth looking into. At least they are inspired by some of the best achievements out there (Lisp included).
9:31:34
shka_
"code failed to compile, here is the 5 page long explanation of WHY, have fun and fuck you"
9:32:32
akater
Even without dependent types, one Tamas Papp (authoreds some CL libraries) claimed to switch to Julia due to some struggles with CL arrays. https://news.ycombinator.com/item?id=15478131
9:36:41
akater
His grievances are not all justified, imo. But they might be in near future. I treid to read matlisp, and it was not a very pleasant experience. What he complains about, *could be* overcome.
9:37:38
shka_
well, heiseig recently contributed vector-classes which allows to dispatch on vector types
9:39:06
jdz
Right, the author of the article should have tried his code on other implementations of Julia.
9:39:23
jackdaniel
(nb: this is not accurate description either, i.e why double-float is mentioned instead of specialized float arrays in general?)
9:40:07
akater
Yeah, and he says “portable, fast, convenient --- pick 2”. That's not really true, Juila's “portability” is quite dubious, given it's such a young language.
9:40:53
shka_
well, julia seems to have good things going for her, but the advantage over CL is not vast
9:43:04
jackdaniel
"- one quality is enough to fulfill the needs of a grown programmer", "- how many did you take?", "- three!" ;-)
14:58:50
flip214
beach: yeah -- it would be a good explanation why there's always one more room available.
15:04:15
flip214
QL on CLisp gives me "READ from .../quicklisp/http.lisp: there is no package with name "SB-POSIX""
15:06:23
flip214
ql:update-client says The most up-to-date client, version 2017-03-06, is already installed.
15:09:52
flip214
Error while trying to load definition for system trivial-signal ... CFFI-toolchain requires ASDF 3.1!
15:13:28
jackdaniel
now the question is: how much does it really require it and how much was it a backpressure / contributor's strong conviction to put this error
15:27:43
flip214
At ELS I won't be at the dinner on Wednesday... I have to travel to a business appointment on Thursday.
15:35:46
splittist
The dinner on Wednesday is the full <P...> banquet? There's nothing ELS specific?
15:36:32
beach
Perhaps we should organize something for Tuesday. We are leaving on Wednesday anyway.
15:38:12
beach
I dread this kind of organization though. The best thing would be for one person to decide on a place and then invite people to attend. It is nearly impossible to get this many people to discuss and agree on something, especially the same day.
15:59:53
shka_
any idea for less generic name for something that is currently called cl-data-frames?