libera/#commonlisp - IRC Chatlog
Search
14:25:25
Josh_2
The MOP is a very good example of the divide between MIT and New Jersey, its pretty complicated but can create a very simple interface
14:28:38
pjb
Josh_2: is CLOS more complex than Smalltalk Meta Object System? (I'd say yes, but that's because multiple-inheritance, and methods attached to generic functions vs. classes).
14:30:00
pjb
flip214: and even, while (the nil (values)) seems logical, there's no specification that no values returned by (values) is of type NIL! We just know that NIL is an empty type.
14:30:39
pjb
flip214: on the contrary, it's specified that (values) = NIL as soon as you need something.
20:16:30
Josh_2
Can I make all instances of a metaclass funcallable without using initialize-instance?
20:19:30
Bike
or do you want these classes to have funcallable-standard-object as their default superclass instead of standard-object like usual?
20:20:15
Josh_2
I've made instances of a class funcallable and tried it, but I'd like the setting of the funcallable function to be done when the class is defined rather than when and instance of that class is initialized
20:22:22
Bike
could you like, provide some context, maybe? i don't understand what you're doing. why would you want to call a class?
20:22:50
Josh_2
I want the funcall function to be set when the class is defined not when an instance is made
20:23:47
Bike
it sounds like maybe you want a default function but i still don't understand what you're doing. what's the problem with doing it in initialize-instance?
20:32:58
saturn2
according to this, there is no other way to set the funcallable-instance-function than calling set-funcallable-instance-function on each instance
22:12:42
hendursaga
Anyone aware of some CL equivalent to this? https://github.com/jgoizueta/sys_cmd
22:13:18
hendursaga
Basically a DSL for 'building up' commands + their arguments to be called on a shell
22:18:21
Alfr
hendursaga, you're after the escaping part of it? Maybe uiop:escape-shell-command fits your needs?
22:20:37
hendursaga
Alfr: like, some kind of macro that takes something say unix-opts might use to parse command-line arguments, but instead of parsing, generate a function that would take in arguments and then output the string of the resulting command to call externally..
22:21:10
copec
hendursaga, I would google using common lisp as shell, I bet that would link to lots of useful things
22:22:52
Alfr
hendursaga, I don't understand what that function is supposed to do. Query a user for the arguments separately?
22:41:47
Alfr
hendursaga, from that package's description and the listed examples, I don't see how that project you linked does anything more than (except for being really verbose): (let ((s (uiop:escape-shell-command '("echo" "arg1" "arg with spaces")))) (uiop:run-program s :force-shell t :output 'string))
23:28:13
Nilby
Psybur: Yes, if you allow nesting of them, they have the same properties as lambda calculus.
23:41:02
edgar-rft
Psybur: if no skilled Lisp archaeologists show up in the next minutes, you can try yourself here -> http://www.softwarepreservation.org/projects/LISP/
23:49:55
Nilby
Psybur: The requirements for lambda calculus are fairly low. Anything that allows variable substitution and function application. Literal encapulation can be used in place of recursive function application, but of course it's quite tedious to construct things.
0:08:03
dieggsy
edgar-rft: it's like strftime, the other way around. e.g. if you give it "2018-12-01" and "%Y-%m-%d" it would spit out a date time object
0:08:42
dieggsy
idk why i've suddenly taking to using "spit out" instead of return, it's rather icky sorry lol
0:10:23
edgar-rft
don't know about allegro but local-time might have such a thing -> https://www.cliki.net/local-time
0:12:23
dieggsy
i try to avoid using extra deps where possible but good grief do we need a proper date/time handling library
0:13:11
dieggsy
we have a bunch of hacked together ways of detecting and converting date formats across several files and it's .... less than ideal
0:14:28
edgar-rft
I also try to keep external dependencies as low as possible but writing your own time/date handling rather quickly becomes an enterprise in itself :-)
0:21:16
dieggsy
there's multiple functions that do the same things, none doing it particularly well or strictly validly lol
0:24:15
edgar-rft
another fun is that in most networks every computer uses its own built-in hardware clock for the time and the clocks are rather seldom synchronized with each other
0:26:18
dieggsy
but i've been doing some tests and who knows how allegro is interpreting (date-time "20-800") lol. "20-200" is the 200th day of 2020...800 ... wraps around maybe? lol
0:27:55
Nilby
There was a good date/time string parser on old lisp machines, but it's much much harder to do now, since you have to know and allow locale and language and cultural specific formats, calendars, etc, and also things like do you allow things like 2 leap seconds?
0:28:50
mfiano
There is a Common Lisp book dedicated to calendrical calculations on my bookshelf I've been meaning to read.