freenode/#lisp - IRC Chatlog
Search
10:08:23
luis
madrik: well, you can go back if the upgrade broke your software, or you can have different software on different versions of the quicklisp distribution
11:57:08
drmeister
Xach: We've been running a "quickclasp" server to distribute stuff specific to clasp - it's been working well.
12:30:59
nij
Anyone knows how to use this library? In particular, how to use #'digit? to parse a digit? https://github.com/Ramarren/cl-parser-combinators/blob/9c7569a4f6af5e60c0d3a51d9c15c16d1714c845/token-parsers.lisp
12:59:31
splittist
nij: you mean beyond (parse-string* (seq-list? (digit?) (digit?) (digit?)) "123") ?
13:05:57
nij
Cool. It works. Next is to try to learn how it's implemented.. I feel like it's more advanced than my level.
13:16:02
splittist
Built in? I don't know. As a general parsing lib it must be able to if set up. I guess you'd define atom? (or whatever your language requires) then match on an open paren, any number of sexps and a close paren. Not quite like this: (parse-string* (bracket? #\( (sepby? (int?) #\Space) #\)) "(1 2 3)")
13:21:11
nij
Many articles I read about lisp only says that macro helps you create DSLs a lot easier.
13:25:21
beach
nij: Macros are useful for introducing "syntactic abstractions", i.e., new syntax. You don't need macros if you can express your DSL as a collection of functions with normal function-call semantics. And in cases like that, you can write your DSL in any language you like.
13:27:24
nij
I see. That's my impression yeah. I don't see why macros and DSLs are tided together so much.. at least in many introductory articles.
13:29:55
lotuseater
yes, they can take anything and transform it :) or when you just not want having to type in so much quotes
13:32:29
lotuseater
or eg look at FORMAT, it's a function, that calls the macro FORMATTER, which takes the control-string and transforms that to the corresponding form for using the args
13:34:00
beach
nij: The use of macros to implement a DSL in Common Lisp would be used precisely to make the syntax less Lisp-y. If you want Lisp syntax, just use Common Lisp.
13:35:57
pjb
beach: in general. But in the case of format, it could be used to make it lispier :-) (format (formatter "Name: (a :width 20) Age: (d :width 3) year(p :with-previous-arg t)(newline)") 'john 99)
13:44:36
pjb
nij: but you can pass your own formatting function to format instead of a format control (format t (function my-formatter) a b c)
13:45:12
pjb
format control n. a format string, or a function that obeys the argument conventions for a function returned by the formatter macro. See Section 22.2.1.3 (Compiling Format Strings).
13:53:06
pjb
the trick of the formatter macro, is to let the macro generate the function itself, from a new description of what is to be formatted.
13:54:14
splittist
(defun printformatter (control-string) (lambda (stream &rest args) (apply #'printfcl:fprintf stream control-string args))) (printformatter "%d %d %d") (format t * 1 2 3) => 1 2 3 (:
16:07:30
phoe
European Lisp Symposium 2021 is now over and heisig, easye, SAL9000, flip214, and ehuelsmann all deserve a beer! thanks for their support!!
16:09:25
beach
It seemed to me that several new people attended. Perhaps because of the virtual access. But it is good publicity for ELS anyway.
16:09:58
heisig
The peak was at 178 participants, I think. Most of the time, we had 120-130 participants.
16:54:31
jmercouris
is there a way to run SBCL and have it ignore ~/.config/common-lisp/source-registry.conf.d/user-lisp.conf ?
16:55:36
loli
jmercouris: --no-userinit maybe? I know in script mode it does not read the user default config
17:02:19
jdz
But in general why do you have ~/.config/common-lisp/source-registry.conf.d/ if you don't want it?
17:02:50
jmercouris
however, the tool 'quicklisp-to-nix' breaks when this file is present and populated
17:03:41
jdz
Pretty sure for reproducible builds you do not want to read any system or user initfiles, and provide everything on the command line.
17:09:43
nij
Hello! What's the best timer you've used before? I just realize today that a robust timer isn't very easy to design.. currently the best I have is systemd.timer, but it isn't lispy at all.
17:26:07
nij
I should say systemd.timer supports scheduling a job at a certain time, e.g. [2022-01-01 10:53:46]. It saves a comprehensive backlog of states and outputs/errors from the program. If the machine misses, by being off for example, the job, it will launch the job immediately next time the timer starts.
17:26:40
nij
(I don't like the last feature by the way.. I think it's better for the system to inform the user.. but not force it happens at a time the user wasn't even aware of.')