freenode/#lisp - IRC Chatlog
Search
11:23:54
flip214
scymtym: having a cpu-using body in with-recording seems to work... although I now see %start-time being 0, so I need to zoom 51y into the graph ;(
11:26:59
scymtym
flip214: i don't know what "work" means given the different execution and failures modes you have described. are you still trying to do deterministic profiling or are you now looking for a flamegraph based on statistical profiling? i think the incorrect duration happens when no deterministic traces have been recorded. as i said: i can only address issues if you provide a recipe for reproducing them
11:32:08
scymtym
flip214: did you adjust the SAMPLE-RATE in CALL-WITH-RECORDING? otherwise it will skip a certain ratio of calls
11:34:27
scymtym
note that you can record calls that are already in-progress when the recording starts. that's where WARNING: Dropping #S(EVENT …) comes from
11:36:42
flip214
well, if it hangs, I get _no_ swank communication any more - checked with wireshark.
11:38:34
scymtym
for the bogus duration, right-click that run and look at the start/end times and the traces
11:41:37
flip214
grrr... got 12.4seconds (correct), but clicking on "Analyze run" made the CPU spin for ~15secs - but no response any more
11:44:00
flip214
got one with 1.4sec, one with 51y now... but when I try to inspect the 51y one I get no response.
11:47:54
flip214
I added to the packages list... but had a type, ":HUNCHENTOOT" instead of "HUNCHENTOOT" - and that seems to give a loop that allocates memory until the heap is exhausted.
11:49:17
scymtym
i can look into that specific problem but generally, i don't understand what you are doing
11:51:37
flip214
seems the :record-blockers and :record-io breaks my usecase (socket IO via swank??), removing them helps tremendously
11:51:56
flip214
and not needing :specifications is good as well, now I can even trace with external load generators
12:07:53
flip214
jdz: QR is ~25% in my macro benchmark, so you've got a chance to increase performance of my usage by 1.33x! ;)
12:21:55
jdz
Apparently I've missed their previous posting about fully-remote position 6 months ago (https://old.reddit.com/r/lisp/comments/jiz3pt/remote_common_lisp_developer_vacancy_at_ravenpack/).
12:55:38
agumonkey
on a machine (linux mint + sbcl) I could load-asd "/.../...asd" then load-system :foo and it fetched dependencies
12:56:34
agumonkey
but on my remote laptop (arch + sbcl) if I load-asd then load-system `I get Component ASDF/USER::CL-HTML-DIFF not found, required by #<SYSTEM "nyxt">
12:57:57
agumonkey
hmm so asdf doesn't deal with fetching, only loading/setting up when they're already retrieved by quicklisp:quickload ?
13:01:16
Xach
agumonkey: that's right, asdf loads what is available and signals an error if something is missing. quicklisp handles that error and fetches things to retry.
13:40:32
royae
C. Queinnec once report in a paper that D. Moon told him not to use packages as a module system, as it is a reader thing.
13:41:38
beach
royae: It is often pointless to ask "why" Common Lisp is missing something. I mean, the answer is that it wasn't put in when the standard was made.
13:42:08
beach
royae: So are you asking what the state of mind of the members of the committee was when they didn't include it?
13:42:29
phoe
oh, OK - one issue I see is that it's hard to assign a piece of Lisp code to a module because it's hard to cleanly slice pieces of a Lisp image; there's side effects that can mutate the state of the whole image
13:42:33
jackdaniel
there are two rickety and deprecated interfaces for modules: require and provide
13:43:10
phoe
ASDF works around this, but it's still not 100% modular where you can plug things out as easily as you can plug stuff in
13:43:53
beach
royae: If I may guess, the reason is that they were not able to figure out a solution that was both semantically sound and that would not harm performance.
13:44:49
beach
royae: For instance, when I wrote my paper on first-class global environments, I read the paper by Queinnec, and decided that the overhead was going to be too great for Common Lisp.
13:45:15
beach
royae: Most module systems I have seen require a hash-table lookup for every function call, and that would be totally unacceptable.
13:48:47
beach
I doubt that it will be adopted by existing implementations, so I fear that the impact is going to be low.
13:49:16
beach
It can't be bolted onto an existing implementation. The implementation would have to do some major rewrites.
13:51:50
beach
Plus, implementations like SBCL that are optimized for performance will not even consider it. Although there is no overhead for a function call, there is a hash-table lookup for things like (fdefinition <non-constant-name>).
13:53:56
beach
royae: And you can't really resolve bindings completely at compile time, given that Common Lisp requires late binding, so you still need an indirection. I guess existing proposals did that with a hash table lookup and, like I said, it is not acceptable because of performance.
13:54:33
royae
Well I think it'a very attractive functionality for SICL. I miss it in CL implementations more often I need performance.
13:56:24
beach
The main difficulty is with having different versions of the same system loaded simultaneously.
14:06:38
beach
Another possible answer to "why" is that the vendors involved in the standard thought it would cost too much for them to implement it, given their existing CLtL1 implementations. As I mentioned, it would be a major rewrite of several parts of such an implementation. Given how programs were written at the time, it is likely that the absence of a module system permeates most of the code,
14:10:14
royae
Neverless I think the fact that packages are a reader thing make the code less clear.
14:12:58
beach
There is a long tradition in the Lisp world that new features are first implemented as libraries (that may require minor modifications to the implementation), and then tested for a significant amount of time before becoming widely adopted. CLOS is an example of that.
14:13:00
beach
The people in the standards committee would not just dream up some feature that they thought would be useful. And that is unlike the many relative newbies here in #lisp, who think that is a good way of defining new features.
14:15:17
beach
So we can consider first-class global environments as the first step of such a process. Next will be the incorporation of first-class global environments in a native version of SICL. Perhaps many years later, it will be agreed that it is a good feature with reasonable performance cost. Only then would it be adopted more widely.
14:18:46
royae
Thanks for answering. I'm reading scheme48 implementation code but then I will have a look at SICL !
14:20:38
beach
The standard says that, but then it also says it they are allowed to be one and the same, and that's what all implementations do.
14:23:29
beach
"The compilation environment inherits from the evaluation environment, and the compilation environment and evaluation environment might be identical. The evaluation environment inherits from the startup environment, and the startup environment and evaluation environment might be identical."
14:23:55
beach
ebrasca: But that's not the point here. The point here is that more than one run-time environment is needed for modularity.
14:26:46
CL-ASHOK
What's the best way to write Lisp documentation? I am thinking detailed documentation on exported functions within a package, with some basic notes how internal functions work?
14:27:37
jackdaniel
CL-ASHOK: I'm usually linking this post written by sjl: https://stevelosh.com/blog/2013/09/teach-dont-tell/
14:27:55
no-defun-allowed
CL-ASHOK: You likely want to make separate documentation for the protocol users should use, and for internals.
14:28:19
beach
CL-ASHOK: You mean what software to use? There are so many choices that any one choice would only get a tiny fraction of approval.
14:28:23
jackdaniel
it provides a very good intuition about different types of documentation and how they supplement each other
14:29:13
CL-ASHOK
no-defun-allowed: That's true, will do that. For now, its just documentation for myself, but I'll then split it into two and the exported functions will go to the user documentation
14:29:42
CL-ASHOK
beach: I'm just using GitHub Wiki Pages for Now, want to keep overhead as low as possible
14:37:00
no-defun-allowed
It can, but one should wonder if it should. At least nice documentation needs more formatting and introductory text than what you can get from scraping documentation strings.
14:39:22
CL-ASHOK
I never had the chance to use it. I see QuickRef from time to time, but I'm not the biggest fan
14:43:08
no-defun-allowed
My best documentation is probably in <https://theemacsshibe.gitlab.io/documentation/> which is still incomplete, but has almost everything I think is right for a reference.
14:44:31
no-defun-allowed
Sometimes it also mentions why a design decision was made, which also wouldn't fit in a documentation string or internal comment.
14:47:39
CL-ASHOK
Thats a very detailed example. The decision of the pages (left hand menu, prev / next on the top) is really good
14:48:42
CL-ASHOK
Yes, I think documenting the why behind design decisions is very important. Basically the exported definitions should be clearly explained so that a newcomer can read them, then the internal definitions should be lightly explained, with a focus on the why and how vs. detailed notes on each function
14:49:06
CL-ASHOK
IMO many functions are self explanatory, and we get lazy anyway when it comes to writing docs.
14:50:17
no-defun-allowed
My "aggressively move code into separate functions" strategy also lets me seemingly avoid comments by picking nice function names.
14:51:50
ptdevnull
I'm trying to set up a Doom Emacs environment with sly, but I keep running into issues with sly-contrib. Currently it's throwing an error trying to load sly-macrostep and complaining of an attempt to load an empty FASL file. Does anyone have a working configuration?
14:51:52
no-defun-allowed
(Of course, one picks good function names instead of writing good comments.)
14:53:22
CL-ASHOK
I do the same, although I still haven't mastered what I think is a good naming convention for functions. I do really like functions & variables having separate namespaces
14:54:21
CL-ASHOK
e.g. (let ((word-list (word-list word-string))... is preferred style, the repetition of the variable / function name imo makes it easier to digest
15:07:27
CL-ASHOK
ptdevnull: sorry don't know the answer of your query. Although I recommend Vanilla Emacs if you want to modify things a bit, after some time, the customised solutions like Doom / Portacle become a pain to modify to your desired setup
15:37:38
lukego
splittist, fiddlerwoaroof: hey I just pushed a small-but-big change to CLIME on the emacs side. Now it basically works fine to kill/yank CLIME images into other buffers. (Before if you moved the point onto an image then the keyboard stopped working because all the keymap events were buggered up, and yanked images didn't work with ACCEPT.) "Simple" fix that took a full day w/ help from #emacs to work out :)
15:39:12
lukego
Have to think about performance soon... I currently have about 60,000 presentations alive in both Emacs (as area definitions on image objects) and in Lisp (as strong references in clim-emacs::*presentations* registry.) It takes noticable time for Emacs to update all the presentations when switching input context e.g. a couple of seconds now.
15:46:58
jmercouris
no-defun-allowed: comments are not intended to explain what, but how, the function name should /always/ suffice for what
15:47:14
jmercouris
they are not arbitrary symbols, they are a piece of text that is supposed to convey meaning for programmers
15:47:24
jmercouris
otherwise each function could be completely anonymous or named by memory address... etc
15:48:19
phoe
I'd be more like, names explain the "what", documentation and docstrings explain the "how", comments explain the "why"
15:55:33
jnewton
jmercouris: should I have to change the name if I don't change what a function does, but I change how it does it?
15:56:22
jnewton
I would say that normally a function name is independent of its implementation. There are exceptions of course such as. FooFast and FooSlow
17:36:18
pjb
phoe: yes, but only superstars need to apply to join Ravenpack's team of superstars… ;-)
17:41:48
loli
beach: is that the case because of qualification and updating qualification upon module changes would be too expensive?
17:44:13
loli
beach: also do you have any more references for first class environments, I've read your SiCL paper about the subject
18:33:41
rpg
I could use some iterate advice if anyone has it. I have an iter loop using with-vector, and when I declare the type of the iteration variable I get this warning: Iterate, in clause (FOR CHILD IN-VECTOR (CHOICE-CHILDREN CHOICE-ENTRY) WITH-INDEX INDEX): Cannot supply an initial value for type (OR NULL CHOICE); using NIL. I have no idea how to make it go away.
18:38:55
rpg
The problem only arises when I put in a type declaration for this variable (so, yes, I know -- don't do that then!).
18:54:19
Bike
the function that's coming from looks dicey but i don't understand what it does well enough to diagnose anything
18:54:36
Bike
seems like they could just do (subtypep null declared-type) and if true, heyo, initialize to nil
19:42:33
nij
Is there a typo in Alexandria's manual, as in "Function: mappend function &rest lists" ;; https://common-lisp.net/project/alexandria/draft/alexandria.html
20:19:26
jackdaniel
I wrote a small tutorial about CLIM: http://turtleware.eu/posts/You-dont-need-a-backend-to-use-CLIM.html for those interested :)
21:07:11
nij
How much mouse should I use with CLIM? Is it possible to customize it to be keyboard-centric?
21:23:53
jackdaniel
nij: thanks. that depends on the application, but in principle commands may have keyboard accelerators
21:24:48
jackdaniel
as of selecting presentations on the screen, at some point of time I saw that someone hacked something so small numbers appeared beside acceptable presentations so it was possible to type the number instead of using a pointer