freenode/lisp - IRC Chatlog
Search
16:35:26
Nilby
Unless you want to specialize #'documentation on target audience, I say just write copious reasonable docstrings for everybody.
16:39:20
Nilby
I know slots are like the divergent base case, but sometimes there could be quite useful inoformation about a slot.
16:40:37
Nilby
e.g (defclass container () (... (damage :documentation "A list of bounding boxes whose area may need to be redraw.")))
16:41:21
jackdaniel
you are right, there may be a useful information. the question is whether it should be put in a comment, in a docstring or in a documentation
16:43:53
jackdaniel
I don't have a strong opinion on the topic. if the slot's accessor is exported, then it should be documented in the external document. as of whether a slot itself should be documented in a comment or via documentation - I suppose it heavily depends on the programming style
16:44:37
jackdaniel
when someone mainly operates on a living image (i.e by relying heavily on introspection), then the documentation option sounds fine; when they work solely based on a source code for clean builds, then a comment is good
16:45:37
jackdaniel
mind, that documentation strings in lisp are not very nice. for instance when you have more information to cover, they just clutter the code
16:46:03
jackdaniel
you can't also associate with them any semantic information (it is a string after all)
16:47:08
Nilby
My view is there is no external. The documentation is an object accessible from the repl.
16:47:48
jackdaniel
ACTION burns his books and printed manuals yelling "burn! thou is not accessible from the repl"
16:48:42
jackdaniel
that said, a live documentation writing and reading system in clim is a nice idea :)
16:49:09
jackdaniel
if I had a source code of unfinished thing in my repositories directory, I'd call it "London" after a famous writer
16:49:37
dieggsy
I've been in scheme world for a long time and am revisiting my old project euler problems in CL - what am I doing wrong in the CL defun here?: https://paste.dieggsy.com/2021-04-11T12:50:05
16:50:34
loke[m]
dieggsy: I'm afraid you have to be a bit more precise than just asking "what's wrong".
16:52:49
dieggsy
jackdaniel: I have slime installed and slime-mode enabled, doesn't seem to make a difference
16:54:20
jackdaniel
so, based on responses here: 1) fix the indentation, 2) provide more context of what is wrong
16:55:36
dieggsy
Ok, but indentation is /not/ a factor in the code results lol, thats' part of why i like lisp
16:56:32
dieggsy
Hmm. Well, if slime-mode is supposed to fix my indentation and it simply isn't ... ?
16:57:50
_death
dieggsy: slime sets up a lisp-mode hook (slime-lisp-mode-hook) that sets the lisp-indent-function to common-lisp-indent-function
17:00:47
dieggsy
sweet, yeah, i had done some gobbledygook with indentation ages ago. I actually used to use CL a good amount heh, it's just been a long time since i've revisited
17:03:17
dieggsy
And i think I found out what's wrong with my code. Every loop, i should be taking the previous value of j, but i'm also modifying j every loop and i think it's taking that. dunno, will investigate further
17:06:23
dieggsy
_death: that's probably part of the problem, but i think i'm still running into what i described above ? if i starts at 1 and j starts at 2, the next time i should be 2 (old j) and j should be 3 (old i + old j)
17:07:05
sm2n
(ql:quickload :mcclim) is failing for me on the package 3bz, with the error "The function SB-VM::MAKE-EA is undefined."
17:08:03
jackdaniel
sm2n: it seems to be a problem with sbcl changing its internals (i.e downgrade sbcl). the real problem is a library that depends on the implementation internals
17:08:15
_death
dieggsy: (loop for i = 1 then j #.(read) j = 2 then (+ i j) repeat 10 collect (list i j)) ;; evaluate two times; first enter FOR, then enter AND
17:12:15
dieggsy
_death: the problem statement is basically just sum all even fibonacci numbers until some limit FWIW. I can do it using a recursive function but i'm trying to figure it out using loop. not sure why input should be involved.
17:12:56
_death
dieggsy: input is involved because I want to show you how FOR and AND differs, so the form I gave asks you what to use
17:14:01
dieggsy
_death: oh, no. i got you. I missed the 'ENTER' bit, you're right. my bad again. thanks, this is great and a rather fascinating way to demonstrate the difference heh
17:14:31
_death
#. is read-time evaluation.. so while the form is read, it asks you for the value to use
17:15:41
dieggsy
interesting. cool. and does indeed solve my problem in this case actually, i think i was just modifying bits of the code carelessly. thanks!
17:18:54
dieggsy
How uncommon or looked down upon is it to use keywords in loop e.g. (loop :for ... :then )
17:19:10
dieggsy
it works, and it kind of separates the keywords with highlighting from the rest of the code. but is this considered bad style?
17:35:30
mfiano
I like it because a) it highlights it differently which is (imo) easier to read, and b) it doesn't intern symbols into my package, which might make completion of similar symbols more annoying.
18:01:29
fiddlerwoaroof
I don't like keywords because all the extra colons are too much syntax for me :)
18:18:20
jasom
Let me know if this is too off-topic, but woud you call the traditional lisp implementation of incremental compilation a jit or not? To me, requiring explicit compilation disqualifies something as a JIT, so the traditional implementation is not, but a case could be made for e.g. SBCL where it will sometimes (previously always) compile at EVAL time.
18:20:33
jasom
The 3 sides were roughly "All runtime compilation qualifies as JIT" "Compilation must be implicit to qualify as JIT" and "Some form of dynamic recompilation is necessary to qualify as JIT"
18:23:42
_death
I think the JIT buzzword was mainly associated with bytecode that gets compiled to native code
18:26:22
_death
then there was AOT that had the bytecode translated and the final result delivered, and dotnet had that GAC..
18:37:26
asarch
How do you destroy objects? I mean, I have (defun foo () ...) and then I use (foo ...) and then I no longer need foo. How would I deleted it? (setf foo nil)?
18:40:00
lotuseater
and giving the same function another symbol name eg ^ for expt does (setf (symbol-function '^) #'expt)
18:41:07
phadthai
yes removing references to the object should allow it to eventually be freed, the time when it'll actually be done is implementation dependent however, with some implementations allowing to force a GC run or to explicitly free/destroy specific objects
18:48:32
_death
you can add a function that tells swank to tell slime to visit a file, perhaps at some position if source info is available for a function name you might give
19:11:55
alanz
I have sly-edit-definition bound to "g d" via evil-mode. And it works for me, takes me to the source
19:40:05
asarch
Here in México a fellows stole a truck (a Hilux pickup) and in the truck there was an industrial device for X rays which uses the Iridium-192 radioactive element. As the meme says: "Kare-ra wa mō shinde iru" X-P
19:40:37
Shinmera
Thought I'd also throw it in here that I just released a big update to my game, Kandria, for free: https://reader.tymoon.eu/article/395
20:59:24
contrapunctus
lotuseater: I also know that Bevuta GmbH is the home of most of the CHICKEN Scheme devs, but it's not listed there yet
21:14:30
Josh_2
I have a dumped lisp image that depends on slynk, however when I try to connect to it using port forwarding sly always fails
21:22:57
Josh_2
Okay well its working but I get this error when I connect https://plaster.tymoon.eu/view/2385#2385
21:30:16
_death
somewhere, maybe a dot file, you have a reference to this cl-asdf thing.. likely you want to get rid of it
21:42:14
alanz
you get used to the monadic stuff after a while. Same with rust and its borrow checker.
21:42:50
alanz
I think every language has things that eventually you internalise and then don't even notice what you are doing. Landmines that you dodge without thinking.
21:43:59
alanz
I have to say, I am pretty impressed with the feedback SBCL gives about code, when there are problems
21:48:43
_death
well, unfortunately the spec doesn't have a Rationale section with all the history :).. but we do have cl-su-ai and c.l.l for example
21:51:15
_death
cl-su-ai is a mail archive containing some discussions from the CL standardization effort https://cl-su-ai.cddddr.org/
21:53:37
_death
I put it and some other archives here https://github.com/death/gnus-friendly-archives
0:56:43
loke[m]
moon-child I was almost impressed with by his consistency. How can you spend years doing that stuff over and over again.
1:01:44
Bike
the few times i've looked at c.l.c this guy wj made a ton of posts about how CL sucked.
1:02:45
moon-child
the main ~spammers I remember are rick c hodgin (religious propaganda) and prof. fir (all-around fun times)
1:03:26
no-defun-allowed
raisins CL sucks 1. Only common why would you not use items with higher rarity 2. No abelian groups for pure IO 3. Too fast, can't overcharge people for rewriting in C
1:03:41
semz
wait a second, what is c.l.c? i assumed comp.lang.c, but anti-CL posts sound out of place
1:05:06
no-defun-allowed
Bike: no, else IO would be commutative and that wouldn't help with "sequencing" IO
1:05:35
no-defun-allowed
I think that's how it is, I dunno and only came up with Abelian IO for the joke.
1:21:27
dieggsy
Bike: The former, I think. I want to be able to type "the integer 1e6" without 1000000 or (floor 1e6)
1:22:30
Bike
i see. there's no built in way. if you wanted you could probably write a reader macro fairly simply.
1:27:18
edgar-rft
expt is what I am using for huge bignums, you're of course free to use something different
1:31:12
Bike
(defun sharp-e (stream sub num) (declare (ignore sub)) (* num (expt 10 (read stream t nil t))))
1:32:48
edgar-rft
using 1e<n> is rather seldom, you usually need numbers like 127364538463e16278364536372 and I doubt that this can be shortened by a read macro