libera/commonlisp - IRC Chatlog
Search
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
1:35:04
lisp123
What are the downsides of representing a buffer as an Array of strings, one for each line?
1:43:28
kakuhen
depends on what you're doing i guess... the buffers I often deal with would make that representation a very inconvenient one...
1:59:26
kakuhen
i usually deal with things like audio samples... which make that representation a bit inconvenient
2:00:14
mfiano
Arrays of arrays (array of strings) cannot be made very efficient either, being an array of pointers.
2:03:59
lisp123
the context of why I'm going down this route (after doing some analysis), is that an array of 'lines' lends itself to subclassing lines to various media formats - plain text, rich text, pictures, videos, etc
2:28:15
mfiano
I seem to recall there was a way to tell CL to invoke the debugger on printer releated errors, instead of silence and seeing <<error printing object>> (on SBCL) in the printed repr. Is that something on the CL side or SBCL side? (it's been way too long for me to remember this stuff). cc: yitzi I think it was who wrote a portable printer implementation.
2:36:14
Fare
mfiano: in those cases, I had handlers or ignore-errors and validity checks in my own print-object methods