libera/#commonlisp - IRC Chatlog
Search
10:56:21
Nilby
nobody wants to write cdaadr etc explictly, but probably the humble posix shell is actually used more for metaprogramming
12:44:35
jackdaniel
if anyone wants a mind-bending expierience I'm recommending implementing :arguments for define-method-combination - we expand body and arguments twice then - once for the method combination function and once for the effective method
13:51:13
pjb
contrapunctus: programmers able to write backquote forms 3 levels deep. `(… `(… `(… ,,,x …) …) …)
13:51:37
jackdaniel
contrapunctus: there is a trivia regarding a three star programmer (related to C - you dereference pointers to pointers to pointers)
13:52:07
phoe
two backquotes, you're a lisp wizard capable of writing backquoted forms that generate backquote stuff
13:52:07
jackdaniel
it is adapted to common lisp. check out a phrase three star programmer in your search engine
14:12:52
scymtym
i know this is not specified but what do people think (with-input-from-string (stream "hello" :start 2) (file-position stream)) should return? nil or 0 or 2 or something else?
14:15:31
phoe
if you are willing to put in the work to define and document the extension then 2 would be very nice to have, if not then NIL is a sane default
14:15:37
scymtym
i think 0 and 2 are both sane. i have a (weak) argument for preferring one over the other but i would like to hear other opinions first
14:17:18
jackdaniel
I read (wifs (stream string :start 2) ...) as a virtual version of (with-open-file (stream #<stringoid>) (setf (file-position stream 2)) ,@body)
14:17:42
phoe
0 feels wrong because (... "hello" :start 2) is a different thing than (... "llo") even if they seem to produce equivalent results in the body
14:18:25
phoe
if you open a file containing "hello" and then set the file position to 2 then the file position is going to be 2
14:19:49
phoe
scymtym: do you plan on supporting the two-arg FILE-POSITION for string input streams?
14:20:56
phoe
if :START is set to 0, then should the two-arg FILE-POSITION be able to rewind beyond that and access earlier characters?
14:21:29
phoe
or is :START and :END supposed to work like in SUBSEQ and effectively pass only a slice of the string into the stream
14:21:51
scymtym
phoe: setting the file position is a consideration, yes. i'm thinking about the user's perspective. in particular what WSCL could say in this regard
14:26:27
scymtym
i realize the issue is pretty niche, but it can cause actual inconveniences: https://github.com/s-expressionists/Eclector/issues/75
14:35:51
scymtym
phoe: sure, you can work around the issue but it seems like an unnecessary point of divergence
14:36:52
phoe
this sounds like a very good WSCL issue with very poor chances of resolving if in favor of one common definition of "what does a file position mean when applied to a string"
16:59:23
contrapunctus
beach: should I add a TLS library to the suggested projects? https://github.com/shrdlu68/cl-tls/ may be a starting point...