libera/#commonlisp - IRC Chatlog
Search
12:52:38
jackdaniel
mfiano: it seems that you follow steps of the original creator of array-operations (https://www.tamaspapp.eu/post/common-lisp-to-julia/) :)
12:58:45
mfiano
pjb: No, I don't want any shared structure with the original. I want to retain its simple-array property when possible, also, so big no to displacement.
14:32:46
pjb
mfiano: then just add a copy-seq: (defun linearized-array (arr) (copy-seq (make-array (reduce #'* (array-dimensions arr)) :displaced-to arr)))
14:44:09
jackdaniel
(subclassp style-warning silly-condition) ; boing, silly condition is not a class
14:46:16
jackdaniel
a simple-minded condition system would not check for types at all and leave that for higher level constructs
15:06:11
phoe
but yeah you might want to ask him directly; I've seen gigamonkey say a thing or three here in the past few years but he hasn't really been particularly active AFAIR
15:07:57
random-jellyfish
not sure I understand, Peter Norvig goes by the nickname gigamonkey in here?
15:10:10
phoe
random-jellyfish: please disregard everything I've said since it refers to Peter Seibel
15:21:55
random-jellyfish
how does it do the replacement? each word is replaced by a random non-sense latin word? or does it work at sentence level?
15:27:11
_death
hmm, why would one want to do that? upload confidential documents? if the same word translates to the same replacement word, some information is preserved..
15:31:01
splittist
It's a thing I use so I can work on realistic documents in my private life without taking home company-confidential stuff. I agree it requires trusting me. But I do! (:
15:37:04
_death
ok, but may also want to note that it may not be so difficult to recover at least part of the text
15:43:09
splittist
_death: I tried in the bit that says it is not a cipher, and should not be used as a means of encryption. But perhaps I should just delete "confidential" at the top.
15:46:04
_death
splittist: right, it's not a cipher because the function is not 1-to-1.. each lorem ipsum word is a bucket of original words, and you can try and figure out sentences probabilistically
15:50:01
splittist
It's not very sophisticated at all, of course: https://github.com/splittist/loremizer . In particular, it uses Word's idea of a run, which might encompass a whole word, or might split a word into a number of parts, depending on editing history, phase of the moon etc.
16:09:57
Nilby
as my "Word" is my bond, your confidential documents are 365% safer from lions when you upload them to the herd with everyone else's confidential documents.
16:52:19
pve
Hi, I'm exploring some ideas about "file-local" effects. Here's the first one I made. I'd like to hear thought on this.. is it useless or could there be something here worth exploring further?
16:53:24
pve
the idea is to make the code a bit more brief by having a shorthand for the long protocol name
17:02:03
pve
beach: I thought about that, I could see situations where the protocol is not in a separate package. Also, sometimes packages are designed to be "USE"d, and I don't know if package-local-nicknames would help there.
17:03:01
beach
I see. I think I always put a protocol in a separate package. And I specifically design packages not to be USEd. That's why I didn't see the use case.
17:26:00
_death
splittist: btw, since the processor operates a single-pass word by word, extending the buckets, it is a simple substitution cipher up until the first reoccurrence of a bucket label.. then either the bucket is extended or the word was already seen, and so on.. this could make recovery even easier than what I considered from the description
20:05:00
pjb
also, Casting Spels in Lisp Conrad Barski, M.D. http://www.lisperati.com/casting.html for macros.
20:05:39
pjb
seok: sicp chapter 4 is all about metalinguistic programming in lisp (it uses scheme, but it's the same).
22:35:42
aeth
Common Lisp macros are surprisingly easy if you use separate functions (the catch: the functions have to be in a separate file from the DEFMACRO or they need to be inside of an EVAL-WHEN). Remembering when to gensym can be a bit tricky, too, but you avoid issues like not unquoting with , at the right time (nobody knows how to write ` in `) if you use a lot of functions, or at least a giant LET/FLET
22:37:44
_death
to avoid eval-when you can have the functions and defmacro in a single file, but users of the macro in another
22:38:24
aeth
_death: that works until you have a second macro that expands into the macro you just wrote
22:39:29
aeth
there's one thing that's not obvious at all with fancy macros, though: if you need to produce two forms instead of one (macroexpand-1 on DEFUN in some implementations to see this), you need PROGN
22:40:45
aeth
But I don't think there's any book substitute to just writing macros because it's just a bunch of edge cases you get from experience.
22:42:49
lisp123
its just a bit of experience and your mind starting to memorrie the combos of `,, `, etc
22:45:20
lisp123
splittist, be careful - most companies are very against sharing company materials with private e-mails or accounts
22:45:40
lisp123
its just not worth the hassle (and if they are not paying you, why work extra for the company?)
23:10:22
lisp123
phoe, indeed. I think the trick is to teach what is macro (syntax generating function), how macroexpansion etc works - its always on my list to write such a tutorial but never mustered enough energy to do so
23:14:09
phoe
it has been a three-step process for me - imagine the form before expansion, imagine the form after expansion, write a pure/idempotent function that will translate from the former to the latter
23:14:53
aeth
phoe: the problem comes from when it's too big to cleanly fit inside of just one function... which is why sometimes people nest `s and create a mess
23:15:54
phoe
and then, a macro is just a pure* function; if you need to split it up then factor it like you would any pure function
23:16:04
aeth
although I guess putting bindings probably results in nesting ` if not cleanly organized, since you'd do e.g. `(let ,(mapcar ...
23:18:01
phoe
with https://github.com/phoe/portable-condition-system/blob/master/src/restarts.lisp being probably the heaviest example