libera/#commonlisp - IRC Chatlog
Search
11:17:28
mfiano
What is a good way to transform a string repeatedly given a list of cons of translation characters. For example given the list ((#\, . #\-) (#\; . #\:)) and the string "foo,bar;baz", it should produce "foo-bar:baz"
11:20:58
semz
Although this may run into issues if one character is replaced with another character that is to be replaced later
11:33:14
lisp123
this week going to have about 5000 people using my CL app (for a few minutes each at a conf)
11:35:30
mfiano
Something like this maybe is sufficient: https://gist.github.com/mfiano/5616e646ad101334ff4c4938872caaa7
11:39:14
mfiano
I do not want subsequent passes to mutate previous passes. I want to do it all in one pass to avoid that
11:40:32
jackdaniel
what is a testimony that replace is perhaps not the best name for that particular function
11:41:42
rotateq
I always see what I didn't use yet so often. Or today, that NTH-VALUE is actually a macro.
11:44:37
mfiano
Maybe I should be looping over STRING instead of NEW-STRING. I have to read to iteration restrictions in the CLHS again
12:01:00
jackdaniel
clisp payed a dear price for rlwrap integration - it had to change its own license
12:17:40
Mrtn[m]
<lisp123> "one day I will learn C" <- What will you do in the afternoon of that day?
12:45:58
rotateq
trev: It's really one of the most impressive talks I know, due to the idea of translating the metaprogramming for chemistry.
12:56:09
mfiano
jackdaniel: How would you modify your example such that if the cdr is nil, it means trim the original character without replacing (shorter string)?
13:07:38
jackdaniel
I'd probably have a string with a fill pointer along with the index closed over (map nil …)
13:10:37
jackdaniel
(let ((string (make-it size :fill-pointer 0))) (map nil (lambda (c) (when-let ((val (assoc-value …))) (vector-push-extend val string))) *the-other-string*)
14:46:26
trev
i should also say that it made me feel like a total loser after watching, and now i am contemplating my entire purpose in life!
14:51:41
trev
beach, cause it was awesome stuff and when you are just working a mildly interesting day job just for money, it is easy to envy academia
14:54:18
jackdaniel
you should start putting easter eggs in the day job, then it will be for money *and* for easter eggs :)
15:14:03
Bike
relatedly, what de/serialization libraries are good. i tried marshal first, and that works okay, but i'd have to devise my own efficient output format and the code is a bit ugly in parts
15:25:09
mfiano
I am not sure. I used it quite a bit, but not for multi-dimensional arrays. Relatedly, the conspack author left Lisp some years ago, but I am still in contact with him. If you want to hack in support for that, I can see about transferring the repo to sharplispers etc.
15:33:49
Bike
indeed it does. i'm more concerned with compactness than speed here, but that's still nice
15:36:34
mfiano
I never used anything but conspack and cl-store, and elephant...i experienced corruption with the latter two.
15:37:11
Bike
it looks like i might be able to hack in md arrays through tmaps without actually altering the encoding... that would be convenient
15:46:16
Guest74
I've been thinking of how to provide game/character saves in a format that isn't trivially hacked to cheat. Seems like this conspack could provide at least one layer of obscurity.
15:53:32
semz
If it's a singleplayer game, it doesn't matter - let them ruin their own fun if they want. If it's a multiplayer game, you shouldn't be doing that kind of security client-side in the first place.
15:53:34
Guest74
for the determined person sure, but i think it would deter some people that see the save file is just a struct.
15:55:48
dlowe
I think if you're making a game, then until you have a game, this save file encryption is a complete distraction :)
15:57:22
dlowe
People think the hard part of programming is the math, or the problem solving, or learning the technologies. But the actual hard part is managing your enthusiasm, your focus, and other people
15:57:45
Guest74
well, mainly writing the engine and not a specific game. The example is already a 'game' and I already handle saving of character by just writing out their slots.
16:00:09
Guest74
I've already got simple saving in since if you develop within the system instead of using an editor you don't want to lose your work.
16:01:11
mfiano
Bike: Well this project deserves to be moved to a publicly writable community repository in any case. I'll see what the dev says. He transferred some of the gamedev libs to me in the past.
16:01:39
Bike
i was thinking of rolling my own serialization based on my experience staring at make-load-form, but it's probably better to at least start with what already exists
16:04:31
Guest74
I've been thinking about the possibility of using irc to build a multiuser whiteboard. Anybody know of anything like that being done before?
16:05:23
Bike
dunno about irc, but i've used a couple collaborative editors before, if that's what you mean
16:06:37
jackdaniel
sometimes I wonder whether we have more common lisp implementations or game engines in common lisp