I just put a call to eval in my code and I feel dirty now.
The context went something like this:
(eval (cons 'concat (my-function arg1 arg2)))
I had initially hoped to use
(concat . (my-function arg1 arg2))
...but this resulted in a call to
(concat my-function arg1 arg2)
Which was not what I expected.
Is there a better way I could've written this?
#emacs #lisp #elisp
Edit: Got my answer. I wanted:
(apply 'concat (my-func arg1 arg2))
Edit 2:
It turns out the code I really wanted was:
(string-join arg2 arg1)
I love reinventing the wheel because I didn't know it was already there.
Edit 3:
Here's the actual code:
(defun lambdamoo-run-text-replacements (str)
"Perform text replacements on the string"
(dolist (vals lambdamoo-text-replacements)
(let* ((from (car vals))
(to (cdr vals))
(split (split-string str from)))
(setq str (string-join split to))))
str)
Let's see if there's anything else I've reinvented here.
mirabilos
in reply to Stefano Marinelli • • •mirabilos
in reply to mirabilos • • •R.L. Dane 🍵
in reply to mirabilos • • •It's just Mario brothers, so the lady (Mario & Luigi's mom) is speaking a fake Italian-American dialect.
The joke is that the games were always called "Mario Brothers," never "Luigi Brothers" or "Mario and Luigi."
kabel42
in reply to R.L. Dane 🍵 • • •mirabilos
in reply to kabel42 • • •R.L. Dane 🍵
in reply to mirabilos • • •kabel42
in reply to mirabilos • • •mirabilos
in reply to kabel42 • • •R.L. Dane 🍵
in reply to mirabilos • • •Charles Martinet, however is not. ;)
AFAIK, there was never a Japanese-speaking Mario voice.
kabel42
in reply to R.L. Dane 🍵 • • •R.L. Dane 🍵
in reply to kabel42 • • •I think the cadence is all wrong for it to be Japanese, though.
Not an expert, though.
@sotolf? Can you see the context?
mirabilos
in reply to R.L. Dane 🍵 • • •no, not Japanese.
The Japanese way to write English: with Katakana. Then reading out these.
R.L. Dane 🍵
in reply to mirabilos • • •I'm (vaguely) familiar with it, but it sounds more like "It's-a me" than "イツミ" to me.
Specifically "it's-a" vs. "itsu"
sotolf
in reply to R.L. Dane 🍵 • • •mirabilos
in reply to sotolf • • •[size=small]This post uses ruby annotations and likely will display only in degraded mode in TUI clients like tut.[/size]
@sotolf @rl_dane @stefano @kabel42 no, no reference. Not いつみMario (マリオ).
Literally just イツミマリオ (マリオです). Katakana syllabic writing for what is supposed to be English speech, then read by a Japanese speaker-or-TTS.
sotolf
in reply to mirabilos • • •sotolf
in reply to sotolf • • •mirabilos
in reply to sotolf • • •R.L. Dane 🍵
in reply to mirabilos • • •Patrick Georgi
in reply to R.L. Dane 🍵 • • •: The Ruby Annotation element - HTML | MDN
developer.mozilla.orgR.L. Dane 🍵
in reply to Patrick Georgi • • •mirabilos
in reply to Patrick Georgi • • •Patrick Georgi
in reply to mirabilos • • •HTML/Elemente/ruby – SELFHTML-Wiki
wiki.selfhtml.orgR.L. Dane 🍵
in reply to Patrick Georgi • • •