freenode/#lisp - IRC Chatlog
Search
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?
17:18:00
beach
I am reading the Common Lisp HyperSpec page on DEFCLASS, and specifically, the last paragraph before the (empty) "Examples" section. Am I right in interpreting this paragraph as the obligation for the compiler to create the class in the compilation environment at compile time?
17:24:19
verisimilitude
It seems like there's enough leeway for it to do the bare minimum, instead of quite that.
17:26:08
verisimilitude
I prefer to write my programs to depend only on what I know I can, not what is likely available.
17:26:25
beach
Because I am writing a better protocol than the one in section 8.5 of CLtL2, and I was wondering whether I need a CLASS-INFO in addition to the others.
17:27:48
beach
Thanks. It is practically done. I mean, I did it for Cleavir. Now, I just want to extract it to a separate system and improve the design.
17:34:33
jmercouris
does anyone know how to do symmetric encryption with ironclad? a simple code snippet?
19:17:48
gendl
The CLF is hosting a donation-doubling appreciation fundraiser for ASDF: https://payments.common-lisp.net/asdf
19:20:09
gendl
Please, take a few minutes from your day and a few guilders to show some love for the countless hours put into ASDF in the past decade. I know there's been some frustration with asdf from time to time, but showing support in this way can help encourage others to contribute in the future as well.
19:20:42
scymtym
gendl: there seems to be a markup problem with the link titled "Appreciation Fundraiser" in the "Valentine's Day Fundraiser" section
19:25:57
jackdaniel
gendl: is there a way to make a paypal payment or a transfer from the bank? I have some dollar and euro so giving my PL card number will introduce unnecessary exchange fee from pln
19:36:04
gendl
jackdaniel: Thanks! There may be a day or two lag before Alternate Payments show up in the Status Area.
19:40:30
gendl
Can y'all help spread word of this fundraiser? I've posted links on Reddit (/r/lisp and /r/common_lisp). Hoping this will get picked up elsewhere. There is $5000 of matching funds sitting there waiting to be applied.
19:41:41
gendl
And, the fundraising page itself (using Stripe) is implemented and running in pure CL. If anyone would like to volunteer to stylize it and clean it up, I can open up repository access as well and get you set up with what you need to run & test it locally.
19:51:10
gendl
ebrasca: thanks for asking. The purpose is to present a monetary gift to Faré the long-time maintainer of ASDF. Hopefully it will have the side-effect of also encouraging future contributions to the ASDF project.
19:52:48
gendl
The Common Lisp Foundation intends to offer fundraising hosting for all projects hosted at https://common-lisp.net, but this one is of special note because there is a Donation Doubler in effect currently -- each donation up to the first $5000 will be doubled, from two large seed donations.
19:53:45
gendl
ebasca: Note that this is an Appreciation fundraiser for past work, and does not bring with it any particular future promises.
19:54:36
gendl
ebrasca: Note that common-lisp.net has been in existence for many years, and a little over two years ago hosted a Quicklisp fundraiser which raised over $17,000 for Xach.
19:55:52
cage_
ebrasca, this is the second time the cl foundation organize a fundraising and as far as i know there wan no complaints
19:56:29
gendl
If anyone can suggest other steps clnet and CLF can take to establish trust, please let me know.
19:57:06
gendl
We are running on a skeleton crew of volunteers, so in fact (in addition to a small amount of technical infrastructure), the main asset we have to offer is indeed trust only.
19:58:12
gendl
CLF is incorporated as a Foundation in the Netherlands, so if there is actual malfeasance there is an entity which can be held accountable.
20:01:01
gendl
Yes, at least I do plan to be at ELS (fully at my own company's expense this year -- last year I was program chair)
20:21:19
dim
ahah, I want to share with you guys a private message I just received, because we're talking about an application written in Common Lisp: “We rely on pgloader heavily and are very grateful for the time and effort you've invested in this tool, which we've found to surpass all other AWS solutions we've come across.”
20:22:05
dim
as pgloader depends on about ~60 libs in Quicklisp, and also piggy backs on the excellent work of SBCL and CCL, I wanted to share the feedback
20:24:47
dim
phoe: I'm not sure I would dare... as the author of pgloader it might just sounds over confident, don't you think?
20:31:30
gendl
ebrasca: I think PayPal accepts things other than cc, but we don’t control that part.
20:33:07
gendl
Two years ago when we started the Quicklisp fundraiser, it was PayPal only, but some people complained they are allergic to PayPal for some reason, so we took the time to make the Stripe integration.
20:34:41
gendl
ebrasca: if you don’t have funds readily available Then please don’t stress about it. There are organizations and individuals out there who depend on CL, and who are well wishers, who hopefully will start donating once they get word.
20:35:24
gendl
So if you’d like to help, the best way might be by trying to broadcast the link in all the channels you know.
20:38:34
no-defun-allowed
i hate to complain, too, but the little yin-yang thing next to Common-Lisp.net in the title bar is off centre
20:39:09
phoe
https://old.reddit.com/r/Common_Lisp/comments/aqb5lr/random_moment_of_pgloader_appreciation/
20:39:42
gendl
And the overriding purpose here is to maintain and improve the CL ecosystem as a mission critical and production-worthy ecosystem, so it will be possible for more and more people to earn livelihoods and avoid becoming frustrated in an unwanted “starving artist” mode.
20:40:43
phoe
https://old.reddit.com/r/Common_Lisp/comments/aqb7md/a_random_moment_of_pgloader_appreciation/