freenode/#lisp - IRC Chatlog
Search
11:01:33
no-defun-allowed
Lunch guests probably can evaluate Common Lisp in their heads. If they're beach's guests, they can even write compilers probably.
11:03:22
jackdaniel
curl: what you give us is just a list of lists. interpretation depends on the task description. if that is unclear in the assignment I think you are fully entitled to write your teacher an email with that question
11:07:31
flip214
curl: I don't understand how https://en.wikipedia.org/wiki/Horn_clause would match your list in any way.
11:13:53
makomo
curl: maybe something like: the i-th (1-based) element of the list represents a node with the identifier i. that element is a list which stores other node ids to which that node is connected to. a positive id means that the arrow is going towards that node, while a negative id means it is going away from that node
11:15:32
makomo
so, e.g. (1 2 3) would means that the 1st node is connected to: itself, the 2nd node and the 3rd node
11:16:06
makomo
curl: i don't know whether this makes sense or not though, just guessing. the assignment must say something about it, or perhaps it was explained during a lecture so you might want to review your notes
11:19:38
curl
makomo: I also thought of that, but how would that explain '((1 2 3) (-3 -1) (1)) the node (-3 -1)
11:21:17
makomo
but hm, one could do without the negative indices just by replacing them with positive indices within different nodes
11:23:00
curl
yeah the graphs directed, but (.. ) (-3 -1) (..) means the 2nd node has arrows coming from the third and first nodes
11:38:49
zigpaw
the negative nodes could be added by the teacher to just level-up the difficulty level for the students (as it doesn't make sense in a real world application, where you should strive for the simplest solution and avoid unnecessary complexity).
11:40:22
curl
(define cs3.28 '((1 -2) (-1 -3) (1 2) (-3 4) (-1 4))) means (x1 ∨ !x2) ∧ (!x1 ∨ !x3) ∧ (x1 ∨ x2) ∧ (!x3 ∨ x4) ∧ (!x1 ∨ x4)..
11:51:21
makomo
i don't know whether horn clauses and dags are related at all, but cs3.28 doesn't like it represents a dag
11:51:59
makomo
it obviously represents horn clauses, where the integers denote variables. just because both of those use lists as its representation doesn't have to mean they're conceptually related somehow
12:31:47
makomo
how come symbol macros can't compute their expansion like normal macros can? the expansion form is just taken verbatim and used in place of the symbol
12:34:09
makomo
beach: what about using dynamic variables that are part of the compiler environment, or just using it for macroexpansion-time side-effects in general?
12:34:50
Bike
if you want to have a compiler environment with different expansions of some global symbol macros, you can just shadow using symbol-macrolet.
12:36:40
makomo
the problem is, i have an additional requirement of needing to register all of the signal reads (along with writes (but that uses a special function/macro)). if i go the "macroexpansion solution" route as we discussed yesterday, i would also need my symbol macros to register such information during macroexpansion
12:37:39
Bike
i haven't been paying attention. do you have a link to an explanation of the syntax for your thing, or whatever
12:37:44
makomo
but i guess that's impossible. which means that the macroexpansion solution isn't a good choice
12:39:24
Bike
honestly i'm a little confused as to how there can be arbitrary lisp code in there tho.
12:40:25
makomo
Bike: i want to reuse stuff like conditionals, loops, etc. also, i will get macros for free to abstract away any repetitive patterns
12:41:01
makomo
scymtym: hm, i thought about that briefly but didn't fully think about it. that might work
15:59:10
Xach
This is a common source of anxiety - perhaps dist upgrades shouldn't update previously installed projects?
16:02:39
Xach
It's meant as a convenience. If you have foo-1.0 installed and the next dist provides foo-1.1, the assumption is that you want to have foo-1.1 when you update.
16:03:02
phoe
And if the update process breaks due to poor connection, I'd like to be able to resume it
16:03:20
phoe
And not have Quicklisp go "nope, everything's fine, I didn't see that connection break two seconds ago".
16:03:57
Xach
Right. It's never been very high-priority to change because it will be fetched when next needed anyway.
16:04:48
phoe
Sure thing it's self-healing because things are fetched on-demand afterwards, but if #'update-dist pulls new systems when it's run for the first time, it should also pull them when it's run for the nth time
18:02:42
mfiano
Xach: No. I mentioned I only have write access to lispgames repositories. I sent a PR to failproofshark
18:23:10
Shinmera
I have an implementation of destructuring-bind that you could adapt to do so I guess.
18:29:18
scymtym
optima/trivia support it out-of-the-box (and much more): (optima:match #(1 2 3 4) ((optima:vector* 1 b c) (list b c))) => (2 #(3 4))
18:31:00
phoe
but then I realized my case is so trivial that I'd rather write three LET clauses than complicate my code with external dependencies
18:32:23
pjb
(let ((v (vector 1 2 3))) (symbol-macrolet ((a (aref v 0)) (b (aref v 1)) (c (aref v 2))) (+ a b c))) #| --> 6 |#
18:33:27
pjb
(let ((v (vector 1 2 3))) (symbol-macrolet ((a (aref v 0)) (b (aref v 1)) (c (aref v 2))) (values (+ (incf a) (incf b) (incf c)) v))) #| --> 9 ; #(2 3 4) |#
19:05:12
whartung
so, for server programs, is it pretty common to have a high level handler-case on condition to catch any rogue conditions that wraps a handler-bind on condition to dump a stack trace?
19:46:11
no-defun-allowed
"Write your own domain specific language to parse XML, draw charts, rate stocks or balance weasels on a rake."
19:47:42
no-defun-allowed
I'll tell you what's not cooler: when the book doesn't actually have an XML parser or weasel balancer
19:50:39
Shinmera
S-expressions existed well before the 90s and are not structurally equivalent to the absolute mess that is XML
19:52:02
makomo
no-defun-allowed was talking of the reverse, no? -- that xml is just a shitty "90s variant" of sexps
19:54:01
makomo
no-defun-allowed: maybe you can look into Ethereum. last time i checked Barski was involved in Clojure and Ethereum
19:55:19
Bike
sml is based on sgml, which was apparently based on something called gml, which is for some intel word processor ish thingamajig from 1969. learning things today...
19:58:25
no-defun-allowed
That sounds quite complicated for the task but I guess that's how people do programs now
19:59:51
makomo
i suppose most of you have already seen this, but it discusses xml and sexps http://www.defmacro.org/ramblings/lisp.html
20:00:15
makomo
oh and also, naggum's xml rant :^) https://www.schnada.de/grapt/eriknaggum-xmlrant.html
20:02:14
makomo
i found that rant pretty tough to read. i had to concentrate quite a bit more than when reading something else
22:10:29
Xach
rename-package provides an escape hatch for dealing with potential package-name conflicts between independently created projects.
22:11:47
Xach
If you had asked "does anyone do this?" I suspect the answer is "Very few". But I do feel some comfort in there being an option.