freenode/#lisp - IRC Chatlog
Search
18:43:28
PuercoPope
What is the easiest way to evaluate the initform of a slot if I don't want to instantiate an instance of the class? I can get the form from the slot's initform slot but I'd like not avoid evaling it
18:46:25
scymtym
PuercoPope: would this work: (defclass foo () ((%x :initform (random 10)))) (funcall (c2mop:slot-definition-initfunction (first (c2mop:class-slots (c2mop:ensure-finalized (find-class 'foo)))))) ?
19:18:58
pjb
PuercoPope: or, you could do it in pure CL (not using the MOP), like this: (defun x-initform () (random 10)) (defclass foo () ((%x :initform (x-initform)))) (x-initform)
19:55:41
PuercoPope
I won't work for what I'm trying to do. The initform is a constructor, (rgb r g b), so I can't reuse a function. The jury is still out wether using the mop is a good idea though.
20:06:43
verisimilitude
I'm here to share a style document I've written for Common Lisp programmers:
20:06:45
PuercoPope
From the class definition. https://gist.github.com/PuercoPop/602c1fb39204d181aec7e413bdb5bdb5
20:09:28
pfdietz
Trying to determine which lisp unit testing frameworks define functions with the names of the tests. Stefil is one; are there others?
20:12:42
jackdaniel
when 3am and 4am are written, I can imagine 4:30 will follow, then 4:45am etc up to 4:59am and beyond, to 4:59:59am
20:27:02
_death
verisimilitude: most of it looks ok, though there are peculiarities that make it hard to recommend to those in need of such a document
20:27:43
verisimilitude
I expected such; what peculiarities do you find particularly egregious, _death?
20:29:22
verisimilitude
Also, if you've a style guide you prefer, do make me aware of it; those I did read were terrible in my eyes.
20:31:10
verisimilitude
I've already read that one, I recall, although it's been too long for me to recall my particular criticisms thereof.
20:32:11
_death
verisimilitude: likely the most offensive is disregard of special variables naming convention.. there's also usage recommendations for when/unless/and/or/#./##/comments/&aux/loop-keywords
20:33:16
verisimilitude
I'm still amused with the dislike of &AUX; it's part of LAMBDA, such a critical part of the language, and yet many don't seem to learn of it.
20:34:22
z147
verisimilitude, I'd suggest simplifying the language if You're going for an international audience. Non-natives won't necessarily understand "infeasible" but won't have a problem with "less practical" or "not practical".
20:34:22
_death
verisimilitude: the dislike is not due to ignorance of it.. likely it's due to the fact that the lambda list is not considered the right place for internal bindings
20:36:03
verisimilitude
I appreciate your thoughts, z147, but I'm unwilling to simplify my English for those who merely may not know the language well.
20:36:43
verisimilitude
Words exist for a reason and I find it best to use them where appropriate; I don't believe I've used any particularly obscure words therein.
20:37:38
verisimilitude
Fret not, z147, I'd like to eventually learn Esperanto and translate some of my work.
20:38:47
z147
The manuals and edu. materials I've participated in producing have all been done with a core vocabulary in mind
20:39:51
verisimilitude
One could argue many style guides are like this and that I'm more honest about it, say.
20:39:51
jackdaniel
style is not consistent: at one point you write "I do something" in another you write "something is preferable" -- by whom then?
20:41:00
verisimilitude
It's a style document, wherein I list how I write Common Lisp and give other preferences, along with other advice.
20:41:22
jackdaniel
back to the first concern, maybe some people are less onest, but they put more work to provide compelling argumentation why something is better
20:42:46
verisimilitude
I've seen few style guides which bother making compelling arguments. I don't feel the need to; they're my opinions and what I use.
20:45:06
jackdaniel
I've given feedback on the actual guide, but if you do not appreciate it then it's up to you.
20:46:10
jackdaniel
as of actual style, it touches very few style concerns so there is not much to comment either. and since there is no argument in favour, then it is hard to argue with it; I believe it is in line with your taste (so I won't argue with that ;)
22:08:27
jmercouris
I'm working with: https://github.com/atlas-engineer/cl-webkit/blob/master/webkit2/webkit2.web-view.lisp#L171
22:21:19
jmercouris
https://webkitgtk.org/reference/webkit2gtk/2.5.1/WebKitWebView.html#webkit-web-view-run-javascript
22:21:30
jmercouris
so the thing is, we are catching the error in webkit_web_view_run_javascript_finish
6:25:07
beach
I think of a style guide as merely documenting established conventions. Not as an attempt to expose personal preferences.