Search
Saturday, 12th of June 2021, 8:38:33 UTC
10:54:47
srji
is there any kind of tutorial/guidelines on how to start developing a lisp app?
11:33:16
phoe
MichaelRaskin: thanks, that's the one
11:39:33
Inline
no dispatch function defined for #\{
11:39:47
Inline
is that normal when i load a file containing a dispatch function for it ?
11:41:56
Inline
https://termbin.com/qi2r
11:53:10
tfb
Inline: that's not very idiomatic code but it should work
11:53:38
Inline
first off all the *bla* variables are not set as in the file
11:53:59
Inline
i don't know why the toplevel behaves like a seperate thread
11:54:33
Inline
i even used (eval-when (:execute :load-toplevel :compile-toplevel)...
11:54:50
Inline
i mean wrapped around all that code
11:55:26
Inline
when i do stuff interactively i see changes otherwise when i load from files then not
11:59:03
tfb
I'm not sure what you're doing to break it, but it should be fine (there are other problems like the in-package which makes no sense) but it does work
12:01:21
tfb
Inline: (I've just tried it in two separate implementations)
12:21:53
phoe
I think I just found a use case for (multiple-value-call #'values ...)
12:23:07
tfb
Inline: but note *readtable* (and *package*) is bound by load so you need to set the readtable later. *print-pretty* etc *isn't* so bound however so if you're not seeing changes in those, you're doing something odd
12:24:52
tfb
phoe: (multiple-value-call #'values (round 2.0) (round 3.2))
12:30:24
phoe
though I guess the name multiple-value-values is a bit confusing
12:30:29
tfb
phoe: multiple-value-call is kind of concatenate for values (ish)
13:32:28
phoe
is there a format control for turning 1 into "1st"?
13:32:41
phoe
~R gives full English words from what I see
15:35:17
pjb
beach: thank you for the index!
15:36:00
beach
Pleasure. Still being worked on.
17:58:58
jcowan
beach: Yes, thanks indeed.
18:00:35
jcowan
phoe: You can write a very short function to do "1st"-style formatting for you: take the number mod 10, then convert the number to a string. if the modulo result is {1,2,3}, append {st,nd,rd}, otherwise append "th'.
18:02:42
tfb
need to handle the teens specially
18:03:19
jcowan
and 12th and 13th, yes. So it may be simpler to work with mod 100 and a vector of strings.
18:04:22
tfb
jcowan: oh, yes I had not thought of 111th
18:05:06
jcowan
Unless, like Bilbo, you say "eleventy-first"
18:24:41
pjb
(format nil "~{~D~:*~[th~;st~;nd~;rd~:;th~]~^, ~}" (iota 10)) #| --> "0th, 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th" |#
18:26:26
pjb
(format nil "~:{~D~[th~;st~;nd~;rd~:;th~], ~}" (mapcar (lambda (n) (list n (if (< 10 n 20) 5 (mod n 10)))) (iota 35))) #| --> "0th, 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th, 10th, 11th, 12th, 13th, 14th, 15th, 16th, 17th, 18th, 19th, 20th, 21st, 22nd, 23rd, 24th, 25th, 26th, 27th, 28th, 29th, 30th, 31st, 32nd, 33rd, 34th, " |#
19:40:38
jmercouris
slime command to get documentation for object represented by symbol?
19:40:46
jmercouris
e.g. (defvar xyz "the tomato symbol")
19:40:56
jmercouris
if I see xyz in the codebase, put cursor up to it, I want "the tomato symbol"
19:41:45
MichaelRaskin
Wait, you want variable initial content, or documentation?
19:42:01
jmercouris
so for example, for a function, or a slot, etc
19:42:03
MichaelRaskin
So (defvar xyz "T" "the tomato symbol")
19:42:11
jmercouris
ah sorry, I forgot to provide a value above
19:42:23
jmercouris
(defvar xyz t "the tomato symbol")
19:42:27
jmercouris
I just want "the tomato symbol"
19:45:14
pjb
(defvar xyz t "the tomato symbol") (documentation xyz 'variable) ; implementation specific.
19:45:27
jmercouris
pjb: sure I know that one
19:45:40
jmercouris
no quick and easy? like hover show documentation or something?
19:46:13
jmercouris
I kept trying 'slime-documentation-lookup'
19:46:16
jmercouris
no wonder I wasn't finding it
19:48:52
pjb
doesn't seem to work much…
19:51:49
_death
C-c C-d C-d .. also check https://github.com/mmontone/slime-doc-contribs/
19:54:55
jmercouris
well, for me it checks the CLHS
19:55:08
jmercouris
I installed that one extension by our favorite developer of all time
19:55:16
jmercouris
I feel like saying it is voldemort
19:55:56
_death
clhs would be C-c C-d C-h
19:56:58
jmercouris
I have no idea, I use hydras
19:57:05
jmercouris
in any case, 'slime-documentation-look up, looks up the CLHS for me
Saturday, 12th of June 2021, 20:38:33 UTC