freenode/#lisp - IRC Chatlog
Search
17:28:33
aeth
It has a lot of calculator stuff (e.g. mean, binomial-coefficient, factorial) and a lot of stuff for quick programming one-liners (e.g. curry/rcurry)
18:09:34
jmarciano
I would need to construct all variables and functions, like list of it to get better completion.
18:11:47
aeth
*slime-repl foo-lisp* with paredit (or something similar) is basically everything that one needs, and then some
18:12:34
Bike
(do-external-symbols (s :cl) (fresh-line completions) (write (symbol-name s) :stream completions))
18:20:24
jmarciano
That makes sense, than each implementation with rlwrap or rlfe can have symbol completion and history.
18:40:34
Bike
(defvar *alphabet" "abcdefghijklmnopqrstuvwxyz") (defun alpha-code (char) (position char *alphabet*)) (defun code-alpha (code) (char *alphabet* code)) (defun caesar (string n) (map 'string (lambda (c) (code-alpha (mod (+ n (alpha-code c)) 26))) string))
18:40:54
aeth
All you really need is an incf-mod/decf-mod for that, e.g. https://gitlab.com/mbabich/cl-brainfuck/blob/master/brainfuck.lisp#L22-33
18:42:09
aeth
I prefer to implement incf-mod/decf-mod and mod+/mod- (in several places actually, I should make a library) because I think tiny helper functions/macros that express things exactly are more idiomatic Lisp.
18:43:40
pjb
Bike: you have to take into account non-*alphabet* character to encode caesar. Either filtering them, or leaving them alone.
18:49:10
aeth
pjb: what I'd probably do is use code-char and char-code to have the A-Z, a-z ranges (although this non-portably assumes that the char-code/code-char system has A-Z in a row and then a-z in a row)
18:50:01
aeth
One could also set different ranges to cycle over, and non-portably assume unicode or something.
18:53:45
aeth
actually, you'd only need the #\A and #\a if you assume they're cycles of 26 characters with e.g. a at (+ lower-case-a-position 0) and the last at (+ lower-case-a-position 25)
20:45:54
jmarciano
is there a way to get LISP result in Emacs buffer directly just like I can do it with Emacs Lisp
20:48:49
jmarciano
I know it is beautiful in the clouds, but when you are too long there, you miss the earth.
20:50:09
Bike
i don't... are you saying i'm stuck up? it's not like the repl isn't available to you either
20:51:17
jmarciano
I do use REPL all the time, more than SLIME, it depends if I am writing something or calculating, or running some programs
20:52:44
jmarciano
I need less then a second to open REPL, and I need way longer to come into Emacs, Slime, to get REPL, makes no sense.
20:53:19
jmarciano
My REPL is bound to C-t l in stumpwm, and it just comes up, less than a second, with all the functions prepared.
20:55:06
Bike
i think you need to do, uh.... (slime-setup '(slime-repl)) in your emacs configuration
21:08:23
jmarciano
It somehow makes sense to run Window Manager in SBCL, where runs Emacs and CLISP in background.
21:11:45
tetero
jmarciano: Oh I typically tend to split when I have more than one window, and mode-line helps if you're into that
21:12:34
jmarciano
My laptop is smaller for splitting. And I enlarge all letters to watch easy from more than 1 meter with extended keyboard.
21:16:18
tetero
Although, what is it that you need to copy/paste between? Your terminal and most apps should support that
21:16:25
jmarciano
(define-key *root-map* (kbd "=") "rcd-paste") I have that like this, but is not getting into terminal
21:34:55
PuercoPop
jmarciano: you can use the xtest extension to send mouse clicks from lisp. its implemented in CLX
21:40:21
jmarciano
I don't need a mouse, programs need a mouse more than me, like some make programs for sake of programs, and not of people.
21:55:59
phoe
beach: You have your style guide in the SICL repository. Do you think you could extract it into a separate document?