<hectorhonn>
what is the complexity of remove-duplicates?
tumdum has quit [Ping timeout: 252 seconds]
<Bike>
depends on implementation. the obvious is n², but i think some implementations use hash tables and stuff to reduce it
<hectorhonn>
Bike: alright, thanks
arescorpio has joined #lisp
pierpal has joined #lisp
Bike has quit [Quit: Lost terminal]
<beach>
Good morning everyone!
<LdBeth>
Morning
<hectorhonn>
Morning beach
arescorpio has quit [Remote host closed the connection]
<no-defun-allowed>
i put a basic chip8->cl compiler in my emulator and it's 10 times faster, averaging 800 x86 cycles/chip8 cycle
<beach>
Nice!
<no-defun-allowed>
thanks! i'd like to emulate something more difficult but i'm not sure what to do next
<no-defun-allowed>
(the way it works is i save the dispatched function bodies and i try to get all strings of code where no jumps are done)
Tordek has quit [Remote host closed the connection]
CCDell has quit [Remote host closed the connection]
<beach>
How about RISC-V?
arescorpio has joined #lisp
elderK has joined #lisp
<no-defun-allowed>
alright, i'll give that a go
<no-defun-allowed>
it seems a lot of the issues with emulators are C problems, like not having the system compiler (well, maybe not with llvm or libgcc) and having to write half a compiler
<beach>
I don't need such a thing immediately myself, so I won't be of much use for testing it.
Tordek has joined #lisp
<beach>
So you mean these problems are solved by using the Common Lisp compiler instead?
<no-defun-allowed>
yes, i think that would simplify a lot of emulator writing as you don't have to invent an IR and compiler for it
<beach>
Sure.
<beach>
Maybe RISC-V is not a good platform for testing that hypothesis.
sauvin has joined #lisp
<beach>
Are you emulating the chip8 language or the virtual machine?
<no-defun-allowed>
i read someone's documentation on writing a dynamic recompiler and most of the issues they listed seemed to be "inventing your own compiler" problems?
<no-defun-allowed>
the virtual machine/bytecode
<beach>
I see.
<beach>
I do something similar (I think) in my SICL bootstrapping procedure. I take the intermediate code generated by the Cleavir compiler, and I translate it to Common Lisp and compile it with the native compiler.
arescorpio has quit [Remote host closed the connection]
<no-defun-allowed>
yes, you've explained it very well in #sicl
<beach>
So, yes, it is very handy to have the compiler around.
<beach>
What I mean to say is that I think your analysis is right that a lot of difficulties in this domain are solved by having the compiler around.
<no-defun-allowed>
i'll be back later to discuss this, sorry
<drmeister>
Shoot - I went to the trouble of implementing a parallel compile-file and now I'm running into a problem with special variables and quicklisp.
<drmeister>
A thread doesn't inherit the special bindings of the thread that started it.
<drmeister>
I'm encountering a problem when compile-filing quicklisp.
<drmeister>
I compile-file that form in a child thread - when I load the compile-file'd result it should create the special variable and bind it globally.
<drmeister>
So it should be available - but it's unbound.
Kundry_Wag has joined #lisp
<drmeister>
No - this doesn't make sense.
<beach>
True, it doesn't.
<beach>
DEFVAR does not make the value available to forms that appear later in the same file.
<beach>
So, there should be no compile-time reference to the value in the same file as the DEFVAR form.
elfmacs has quit [Ping timeout: 250 seconds]
slyrus has quit [Ping timeout: 240 seconds]
slyrus1 is now known as slyrus
slyrus1 has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
emaczen has joined #lisp
<drmeister>
It might be messing up because I'm hot patching the code and reloading things. I'll wipe everything out and rebuild from scratch.
<drmeister>
My little experiments all performed properly.
<drmeister>
Did you hear? I have a parallel compile-file!
<beach>
Congratulations!
<drmeister>
There are these teething problems that I'm sorting out.
<beach>
Does it work as we have discussed, i.e. generate the ASTs sequentially and then work on each AST in parallel?
<no-defun-allowed>
oh wow, nice!
<drmeister>
Also - it doesn't fully utilize the machine - I have some mutexes around parts of the compiler that are throttling performance. Compile and discriminating functions drop back to serial.
<drmeister>
beach: Yes. ASTs sequentially and everything after that is tossed into threads.
<aeth>
drmeister: are you planning on having a parallel ASDF, too?
<drmeister>
Would there be any compile's going on after the AST is generated?
<drmeister>
Maybe I can't do anything about the lock around COMPILE because it needs to be serial for AST generation.
<drmeister>
aeth: I wrote a module to parallelize ASDF - I'm going to use them both.
lavaflow has quit [Read error: Connection reset by peer]
<drmeister>
The parallel compile-file doesn't use all cores - I see maybe a 2x speedup - even though I see like 15 threads for the clasp process.
lavaflow has joined #lisp
<drmeister>
I'm a little puzzled why it doesn't do better.
<drmeister>
But there are several things that could be throttling performance, my COMPILE lock (which I could get rid of with llvm7) the Boehm GC, llvm malloc.
<drmeister>
But even 2x improvement would be welcome.
<aeth>
drmeister: I suspect parallel compile file in CL won't get you much in general because most people have many small files.
<aeth>
And the only thing I'm aware of that builds into one file is ASDF
<drmeister>
Still, we are seeing about 80% of the time being spent in llvm - if there are more than two top level forms then that should all go parallel. I'm a bit mystified.
<drmeister>
You know what I can do though - I can use dtrace and profile everything. That should illuminate what is locking.
<drmeister>
ASDF is a test case. With the serial compile-file it takes 190 seconds, with the parallel one it takes 120 seconds.
<drmeister>
I really figured it should do better than that.
vlatkoB has joined #lisp
Kundry_Wag has joined #lisp
emaczen has quit [Quit: ERC (IRC client for Emacs 26.1)]
Kundry_Wag has quit [Ping timeout: 240 seconds]
<elderK>
Lo all
<no-defun-allowed>
hey elderK elderK
<elderK>
o/ no-defun!
yangby has joined #lisp
yangby has quit [Client Quit]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
pierpal has quit [Ping timeout: 246 seconds]
pierpal has joined #lisp
<elderK>
Man, I'm trying to like, come to terms with continuations and CPS.
<elderK>
Trying to write a basic DS -> CPS conversion thing.
<elderK>
It's doing my head in :P
<elderK>
lol
<elderK>
It's crazy how like, fundamentally, nothing is really different. But conceptually, wayyyy different. Never returning, always calling our successor. Programs get turned inside out.
Necktwi has quit [Quit: leaving]
drewes has joined #lisp
rnmhdn has quit [Ping timeout: 250 seconds]
drewes has quit [Client Quit]
Necktwi has joined #lisp
dale has quit [Quit: dale]
makomo has joined #lisp
Kundry_Wag has joined #lisp
<aeth>
drmeister: I'm not sure ASDF is a good test case.
<aeth>
ASDF and UIOP are fairly advanced and not typical in their design.
<aeth>
drmeister: It might be best to ask someone who has all of Quicklisp for some large files
<aeth>
(i.e. have them wc -l and sort)
elfmacs has joined #lisp
<drmeister>
Well, ASDF works. But I can't get quicklisp to work yet with the parallel compile-file.
frgo has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 250 seconds]
frgo has joined #lisp
Inline has quit [Quit: Leaving]
rumbler31 has quit [Remote host closed the connection]
<drmeister>
Yeah - it's an interesting bug. ~/quicklisp/quicklisp/package.lisp - it defines many packages, among them :ql-config.
<drmeister>
If I load the bitcode file generated by my parallel compile-file - the package is defined.
<drmeister>
If I load the fasl - it isn't
frgo has quit [Ping timeout: 250 seconds]
<drmeister>
Yeah - the results should be identical but they are not.
<drmeister>
Here are the list of packages I get from the bitcode file:
<drmeister>
Clearly something is wrong - but the compiler is generating the correct bitcode! But lowering it to object code or linking it into the final fasl is messing up.
<drmeister>
Hmmmmm
<drmeister>
It might be some simple problem with linking
marusich has joined #lisp
drewes has joined #lisp
Kundry_Wag has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
JohnMS_WORK has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
frgo has joined #lisp
atgreen has quit [Ping timeout: 246 seconds]
gxt has quit [Quit: WeeChat 2.3]
emaczen has joined #lisp
angavrilov has quit [Ping timeout: 250 seconds]
frgo has quit [Ping timeout: 246 seconds]
schweers has joined #lisp
frgo has joined #lisp
frgo has quit [Ping timeout: 250 seconds]
frgo has joined #lisp
<dim>
if you want to benchmark easily, I guess that (ql:quickload "pgloader") could be a nice test as it loads about 64 systems with the build dependencies ;-)
frgo has quit [Ping timeout: 244 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
frgo has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Cymew has joined #lisp
<hectorhonn>
what is the idiomatic usage of streams? is it possible to take N first characters from a stream?
<beach>
Although I tested it for lots of random values both of the base and for the number itself.
<beach>
I tested it against SBCL PRINC.
<beach>
And they print the same stuff.
<beach>
What is confusing to me is that SBCL seems to be slower.
<beach>
So I must have forgotten something.
<beach>
Especially since my version uses (SPEED 0) (DEBUG 3).
<beach>
For example, printing (expr 12 1000000) seems to take less than 5 seconds, whereas SBCL takes more than 6.
<beach>
I am printing to /dev/null in both cases.
<dim>
maybe you maths background is better than the one of the sbcl contributor who implemented that? or maybe your code is using cache lines in a way that is better for modern CPUs?
<jdz>
beach: How important is for your implementation to use double floats instead of single floats?
<jdz>
Also have you tried benchmarking with single floats if the precision does not matter?
flamebeard has joined #lisp
marusich has quit [Quit: Leaving]
varjag has joined #lisp
<beach>
jdz: I don't think it is important.
<beach>
dim: I didn't take cache lines into account when I wrote it. It was the first thing I could think of.
<beach>
jdz: Are you saying my code may be slower if I use single floats?
<beach>
And I am not using (manual) lambda lifting either. But then, perhaps the SBCL compiler does that automatically.
<beach>
Oh, and I am calling lower recursively on the second part. I could make that step iterative instead.
<beach>
Stuff like that.
<beach>
I mean, the performance of printing an integer probably isn't terribly important. So I am not going to do all that.
<beach>
Here is the test I ran for SBCL: (progn (with-open-file (stream "/dev/null" :direction :output :if-exists :overwrite) (time (princ (expt 12 1000000) stream))) nil)
<beach>
And this is for my code: (progn (with-open-file (stream "/dev/null" :direction :output :if-exists :overwrite) (time (print-positive-integer (expt 12 1000000) 10 stream))) nil)
<beach>
Could someone run these in other implementations, like CCL, ECL, Clasp?
<beach>
I get 6.2 seconds in SBCL and 4.8 seconds with my code.
<jdz>
beach: No, I would not expect code to be slower with single floats. If anything, I'd expect it to be faster; but that's why I'm asking because expectations like these should not be held :)
<jackdaniel>
print-positive-integer?
<beach>
jackdaniel: Both native PRINC and my PRINT-POSITIVE-INTEGER, yes.
<jackdaniel>
doesn't princ on sbcl do a check first what type is the thing you print? maybe that's the reason of different reasults?
<beach>
I can't imagine that such a test would take more than 1 second.
<jackdaniel>
and on ccl it is 15s and still running
<beach>
I am not so surprised about ECL because it is probably written in C.
<beach>
But I am surprised that your computer is so much faster than mine, and mine is brand new.
<jackdaniel>
I didn't put global debug proclamations
msb has quit [Ping timeout: 240 seconds]
<beach>
Sure, but that should not affect a call to PRINC.
<beach>
... at least I wouldn't think so.
<jackdaniel>
ccl still running, I'm interrupting the execution
<beach>
OK.
<jackdaniel>
my computer is not super fast
<beach>
Thanks for your help.
<no-defun-allowed>
beach: i remember you usually keep lisp images open for a while, but do you have the same declarations as before?
<jackdaniel>
sure
<no-defun-allowed>
last time we had that confusion it was cause i had default declarations and you were on...was it (speed 3) (debug 3)? something like that
<beach>
no-defun-allowed: Changing the OPTIMIZE settings does not significantly influence the performance of my code, probably because there are no declarations.
<no-defun-allowed>
fair enough
<beach>
I didn't check with PRINC but I would be surprised.
msb has joined #lisp
<beach>
... surprised if different OPTIMIZE settings influenced it that much.
<beach>
But that would explain the difference between what jackdaniel is getting and what I am getting.
smokeink has quit [Remote host closed the connection]
<beach>
Let me verify...
<beach>
Ah, yes, that's it. Thanks for reminding me.
<beach>
This is not the first time I do something like this, is it?
<beach>
Now I get 2s for SBCL.
<beach>
And, whew, my computer is living up to its expectations.
<no-defun-allowed>
yay
smokeink has joined #lisp
rnmhdn has joined #lisp
<beach>
It's that DEBUG 3 that gets me every time.
kdas_ is now known as kushal
yvy has joined #lisp
jochens has joined #lisp
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
Zaab1t has joined #lisp
<shka__>
beach: well, at least it is predictable :-)
rnmhdn has quit [Ping timeout: 246 seconds]
rnmhdn has joined #lisp
<beach>
Heh, yes.
orivej has joined #lisp
rk[ghost] has quit [Quit: leaving]
<shka__>
beach: actually, your results are not even so extreme
<beach>
What do you mean?
<shka__>
impact of debug 3 in sbcl
<shka__>
for me, debug 3 resulted in one test case to run for about 2 seconds
<shka__>
but without... ✓ 382863 tests completed (172ms)
<beach>
Hmm.
<shka__>
recursive functions though
<shka__>
which makes huge difference
<beach>
I am not sure what you did. Can you describe it more?
<shka__>
well, i have a test file, in this file i have few testing forms, few of such forms tests large chunk of random data, one of those forms runs test for 2 seconds with debug 3
hhdave_ has joined #lisp
<shka__>
but without debug and speed 3 whole file passes in 172 ms
<beach>
I see.
<beach>
Well, I have observed huge differences myself.
<beach>
SICL bootstrapping takes 5 minutes with debug 3 and 2 minutes with debug 2.
<shka__>
now i wonder about debug 1 :D
<beach>
I have seen very little difference between DEBUG 2 and DEBUG 0 in terms of performance.
<beach>
The big difference is between 3 and 2.
<shka__>
oh, interesting
orivej has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
yvy has quit [Ping timeout: 246 seconds]
Kundry_Wag has quit [Ping timeout: 250 seconds]
gxt has joined #lisp
smokeink has quit [Ping timeout: 250 seconds]
flamebeard has quit []
<splittist>
morning
<beach>
Hello splittist.
gxt has quit [Ping timeout: 244 seconds]
heisig has joined #lisp
scymtym has joined #lisp
<schweers>
beach: you do the bootstrapping with sbcl?
<beach>
At the moment, yes.
<beach>
I tried CCL at some point, but got a strange error message, so I didn't pursue, especially since the problem I had with SBCL was kindly fixed by stassats.
<schweers>
That would have been my next question ;)
<beach>
I suspect that I am using some MOP functionality that is not portable.
<shka__>
stassats the heor ;-)
<shka__>
*the hero
<beach>
It was very kind of him. Especially since the problem I had would be a showstopper.
rnmhdn has quit [Ping timeout: 250 seconds]
<schweers>
I’m trying to get my stuff to be more portable, but its sbcl only too at the moment. CCL does some weird thing with files.
dddddd has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
<heisig>
A lot of thought went into the design of CCL. If it does something weird, there is usually a good reason for it.
<ogamita>
drmeister: notice that list-all-package returns the actual internal list of all packages. This is very dangerous to mutate this list! My advice for a quick and dirty fix, would be to (copy-list (list-all-package)) all occurences. Next you have to find where you mutate it.
Kundry_Wag has joined #lisp
<schweers>
maybe I didn’t put that right. It does some things differently than I expected it.
<schweers>
For instance that streams are by default locked to the thread in which they were created, if I’m not mistaken. But also regarding doing dirty tricks with file descriptors and symlinks in linux’ proc directory. Things that are kinda non-portable anyway (which is why I’m getting rid of them).
<schweers>
Not kinda non-portable. Totally non-portable.
Kundry_Wag has quit [Ping timeout: 250 seconds]
smokeink has joined #lisp
<trn>
today in history:
<trn>
December 13 1957: "Memo to Morse: A Proposal for a [LISP] compiler", J.McCarthy
<ogamita>
That's great! They actually thought that: "the provisions for referring directly to machien registers and their parts, which we believe must be included in any powerful source language, have been worked out only for the IBM 704". That's CAR/CDR (and there was also CPR and CTR (and CPRF).
<ogamita>
This idea was still present in 1969 when they designed C!
<beach>
"C came into being in the years 1969-1973"
<loke>
OK, Wikipedia says 1972
<loke>
struct wasn't intorduced until 73
<loke>
apparently
<loke>
“The development of C started in 1972 on the PDP-11 Unix system”
<jackdaniel>
trn: thanks!
<loke>
I think the Wikipedia article needs some cleaning up
<loke>
beach: I think your link should be good enough of source material to wrrant some edits to Wikipedia
<beach>
I see, yes.
<trn>
:)
<beach>
I am not that interested myself. I just followed the reference in the Wikipedia article.
<loke>
beach: Yeah. I was talking about myself :-)
<beach>
Great! Go for it!
<loke>
Oh, that link was actually already referenced in the wikipedia article? So much the greater reasons for someone like myself making those edits :-)
<jackdaniel>
oh, functions which return multiple values are (or were) called multiplet-valued functions :)
<trn>
I have a question topical for the channel.
<beach>
trn: Go right ahead.
<trn>
Were there ever any non-Emacsish LISP editors?
<jackdaniel>
I think that LEM is not Emacsish
edgar-rft has quit [Remote host closed the connection]
<jackdaniel>
VI also has integration for CL (slimv)
<jackdaniel>
by lisp editors do you mean editors written in lisp, or editors meant to edit lisp?
edgar-rft has joined #lisp
<jackdaniel>
well, lem is emacsish, nvm that remark
<trn>
I mean written in LISP, thinking maclisp but I would accept for any LISP machine.
<ogamita>
trn: there's an ed(1) clone: com.informatimago.common-lisp.ed.ed
<trn>
That's interesting but not classical, though I guess I didn't specify 'vintage'
<trn>
Nor did I specify 'screen/video editor'
<ogamita>
And by "LISP editor", do you mean, editor to edit lisp code, or editor written in lisp?
<trn>
But that's what I was thinking. Written in LISP.
<ogamita>
About the worst question asked since at least 3 months!
<jackdaniel>
I'm not aware of any (I assume that by LISP you mean all languages being descendants of LISP 1.5 – Racket nor Clojure doesn't count in there)
<jackdaniel>
s/count/belong/
<trn>
I guess a proper question would be ... were the only editors in use on LISP machines Emacs and the Emacs clones (ZWEI/Hemlock, etc)?
<ogamita>
What about the lisp machine program to edit the documentation? Was it an emacs?
<jackdaniel>
(nb: it is not that much related to channel topic)
<ogamita>
trn: I guess you could find a lot of this old software and check whether there was an editor that wasn't an emacs.
<ogamita>
My guess is that there were some.
<trn>
Obviously in practice Emacs eclipsed all the other editors, and there were non-Emacs screen editors (like Yale's Z) on the PDP-10 which was a 'competitor' but not written in LISP. I'm just surprised that nobody "reinvented the wheel" and thought they could create a better editor.
<trn>
If they did the effort is lost to history I guess.
<ogamita>
For example, there were a lot of lisp systems on early personal computers. Probably a good share of them had an integrated editor, like turbopascal and other IDEs. And most probably, they weren't emacs. On the other hand, they might have been programmed in assembler instead of lisp…
<ogamita>
trn: still, you can find a lot of old sources and binaries on the internet, so you can check.
<trn>
I've looked, though not extensively, and haven't found anything yet.
<trn>
Anyway, carry on :)
razzy has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
<ogamita>
Funny, in CC-56, 1.3, point 1. A type of statement called the equivalence statement which provides for the introduction of abbreviations for any kind of expressions. Isn't it the definition of macros?
Kundry_Wag has quit [Ping timeout: 244 seconds]
dfcat has quit [Ping timeout: 240 seconds]
schweers has quit [Ping timeout: 250 seconds]
hectorhonn has quit [Quit: Page closed]
Odin- has quit [Quit: Wait, there are PEOPLE here?]
nowhere_man has quit [Ping timeout: 252 seconds]
gxt has joined #lisp
Essadon has joined #lisp
Bronsa has joined #lisp
robdog_ has joined #lisp
rnmhdn has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
<xificurC>
standard doc generator? The cliki lists too many to browse :( https://cliki.net/Documentation%20tool . Ones that look OK on a first look so far - staple, heap
robdog_ has quit [Remote host closed the connection]
<shka__>
xificurC: nothing that can be considered 'standard'
heisig has quit [Ping timeout: 260 seconds]
<xificurC>
shka__: any subjective tips?
<shka__>
i wrote my own, but i don't recommend using it
<jackdaniel>
subjective tip: write documentation, don't generate it (because by then it is hardly a documentation)
<shka__>
but codex had few major issues that made it useless to me
<ogamita>
xificurC: yeah, you have basically two choices: 1- you learn SGML and you use docbook. 2- you write your own.
<ogamita>
xificurC: if you write your own, be sure to generate one of the input formats of pandoc.
<ogamita>
xificurC: in practice, you may also use org-mode (with #+latex stuff).
<ogamita>
I liked reStructured Text, but it's too rudimentary to produce nice PDF, so you end up using a lot of extensions custom or not, and the rst document is not readable anymore. So org-mode does it for now.
SaganMan has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<xificurC>
I appreciate, understand and agree with most of what you all said. We already agreed we only want a few lines of comments of docstrings to document the functionality and would rather browse the sources for more in depth knowledge. This is a low-effort task as the tool being documented is marginal compared to other tasks we have. However a few lines
<xificurC>
from the author can save 30 minutes of "what is this supposed to do/be used for?"
<xificurC>
I like the idea of "write your own" if it's not rocket science to crawl a file and get back all the comments and defined symbols with their docstrings
<shka__>
xificurC: don't walk on files...
<shka__>
extract docstrings from loaded system
<shka__>
it is far more reliable method
<xificurC>
...
<xificurC>
there's no system, it's written as a set of loose scripts
pierpal has quit [Ping timeout: 250 seconds]
<shka__>
oh, ok
<xificurC>
I really don't want to go into the details of why and what would it take to rewrite, but that's where we are
<shka__>
i have no suggestion for that
<xificurC>
shka__: a loaded system doesn't preserve comments though, right?
<shka__>
yup
<xificurC>
that would require a full-fledged CL parser, right?
<shka__>
i suspect so
heisig has joined #lisp
<jackdaniel>
xificurC: take a look at eclector
<flip214>
What's the base location of PURI nowadays? cliki points to puri.b9.com which doesn't exist anymore; is com.b9.puri.ppcre the current replacement? (QL seems to return pure PURI, though)
<jackdaniel>
flip214: in quicklisp-projects repository you may find the exact url from which ql gets it
<jackdaniel>
kmr-git it seems, not sure where it is expanded into url
<ogamita>
xificurC: a full-fleshed CL parser includes a full implementation of CL, thanks to reader macros and #. in particular!
nowhere_man has joined #lisp
<ogamita>
shka__: extracting docstrings frmo loaded systems is very defective. (defun foo (x) #+sbcl "X must be a sb-ext:foo and this will do such and such" #-sbcl "X must be a string describing a foo and this will do that and the other" …)
<beach>
xificurC: Eclector was designed to be a complete Common Lisp READ function, which, in addition, is able to keep "discarded" material such as comments and expressions discarded by reader conditionals.
<ogamita>
shka__: it's not theorical, there are quite a number of implementation specific definitions, and docstrings depending on features in the wild.
<ogamita>
shka__: ask the quickdoc project how hard it is to extract the docs.
<shka__>
ogamita: if you are generating documentation for your own code, this issue become irrelevant
<shka__>
which is the case here i think
<ogamita>
shka__: not at all: my own code targets several platforms!
<shka__>
and you are using #+sbcl in docstrings?
<ogamita>
Or you need to run the doc generation on each of your targets.
<ogamita>
shka__: and elsewhere.
<shka__>
i care about docstrings
<shka__>
anyway, this whole approach those not strike me as a reasonable approach
<ogamita>
If you generate the doc on ccl, you won't have the doc of #+sbcl (defun foo …)
<shka__>
so whatever
<ogamita>
The point is that you need to further restrict the language to be able to process it so naively. In any case, there are already software engineering rules and other conventions. But the problem is when you do that without documenting the language the restrictions.
<ogamita>
And hence the reason why there are more doc generation systems than developers.
<shka__>
well, i wrote my own, and i kinda want to write another
<shka__>
but i don't think that either of those is perfect
<shka__>
or would be
Kundry_Wag has joined #lisp
igemnace_ is now known as igemnace
nicksmaddog has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
<flip214>
after doing QL:update-all-dists and ql-dist:clean I now get "Component "dexador" not found - needed by cl-coveralls, it seems
<flip214>
ah, but "clear ASDF config and retry" did continue.
milanj has quit [Quit: This computer has gone to sleep]
orivej has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 2.3]
dddddd has quit [Quit: Hasta otra..]
dddddd has joined #lisp
AeroNotix has joined #lisp
sarkic has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
cage_ has joined #lisp
rnmhdn has quit [Ping timeout: 268 seconds]
jmercouris has quit [Read error: Connection reset by peer]
mercourisj has joined #lisp
warweasle has joined #lisp
Buje is now known as Bike
milanj has joined #lisp
hectorhonn has quit [Quit: Page closed]
elfmacs has quit [Ping timeout: 250 seconds]
* pfdietz
is using Eclector in a "real" project right now.
<beach>
Yay!
terpri has joined #lisp
<beach>
Everytime a module extracted from SICL to an independent project is independently useful, I am pleased. Even more so when said project is improved and maintained independently, as in this case by scymtym.
Inline has joined #lisp
nowhere_man has quit [Ping timeout: 268 seconds]
atgreen has quit [Ping timeout: 272 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
rippa has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
Cymew has quit [Remote host closed the connection]
smokeink has quit [Ping timeout: 244 seconds]
<scymtym>
pfdietz: can you tell us about it?
mercourisj has quit [Ping timeout: 250 seconds]
<pfdietz>
It's a context-aware diff/merge tool, working on ASTs from various sources. For Lisp, it uses ASTs produced by Eclector.
<scymtym>
cool. thank you
<cage_>
pfdietz, sounds nice!
igemnace has joined #lisp
<beach>
Speaking of extracting stuff, would there be a "market" for an extracted Common Lisp printer? I.e. would such a thing be possible to incorporate into existing Common Lisp implementations. In particular would it be possible to incorporate it into implementations written in C or C++, or would they need a printer written in the host language anyway?
jmercouris has joined #lisp
<jmercouris>
okay, so I have an interesting question here
<jmercouris>
if I define macroA which expands to something that includes macroB, but macroB has not been yet read
<jmercouris>
what will happen?
<Bike>
"read"?
<dlowe>
macros expand during compilation/evaluation
<Bike>
beach: ecl's pretty printer and FORMAT are written in lisp, at least
<jmercouris>
Bike: I mean a file with macroA loaded first
<beach>
Bike: Good to know.
<dlowe>
jmercouris: if they're in the same compilation unit, they'll see each other
<jmercouris>
well better than me trying to explain, let me just post a pastebin
<jmercouris>
dlowe: that's what's very very strange about this
<Bike>
sounds like a good idea to me.
<beach>
There is already a portable pretty printer that I assume most implementations are using. I have a near-complete FORMAT for SICL, but this time I was thinking more of PRINT-OBJECT, PRINT, etc. and the printer variables.
<jackdaniel>
jmercouris: if you wrote macro-a which expands (macro-b something), and macro-b is not defined yet when you type (macro-a), then it will expand to (macro-b something) and treat macro-b as function
<jackdaniel>
since macro-b were not available at the compilation time
<jmercouris>
define-parenstatic is within macro.lisp
<jmercouris>
and define-command is within command.lisp
<jmercouris>
and the example form I showed you is from scroll.lisp
<Bike>
And all files are in the same package?
<jmercouris>
Yes
<jackdaniel>
nb: you want to use alexandria:parse-body in there
<jackdaniel>
your simplified code ignores the case, where declaration comes before docstring
<Bike>
Could you additionally paste the exact error or whatever you're seeing?
<jackdaniel>
moreover your code will break, if body has declarations (due to what you do there, either get declarations correctly or wrap ,@body in locally
<Bike>
um, wait.
<Bike>
i'm looking at macro.lisp and the definition of define-parenstatic doesn't seem to match your paste.
<jmercouris>
yes, sorry that's because I'm working on a local copy
<Bike>
is the paste a hypothetical change?
<jmercouris>
yes, the paste is a hypothetical change
<Bike>
alright.
<jmercouris>
I've only changed it from "defun" to "define-command"
<jmercouris>
and added a docstring to avoid a style warning from define-command
<jackdaniel>
so what is the error?
<pfdietz>
beach: it would be interesting if the pretty printer could be made to print other languages as well. I think it already can, to large extent. I think Baker had a paper on this.
<jmercouris>
so there is no error in the debugger sense
<jmercouris>
however, I find that the command instance does not exist
<pfdietz>
Another thing that would be nice would be printing to something other than raw ascii.
<Bike>
pfdietz: i saw one once that used it to print pascal or something.
<jmercouris>
if you look at line 28 of my paste, for some reason, that never happens
<Bike>
don't think i could give you a reference, though.
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<Bike>
The command instance doesn't exist? Does the function exist?
<pfdietz>
For example: print to HTML, print with color codes embedded, things like that.
<jmercouris>
the function does exist, yes
<pfdietz>
And yet still have the prettiness work.
<jmercouris>
which is what really perplexes me
<jackdaniel>
how do you know that this instance doesn't exist?
<Bike>
Are you sure that you're actually using the definition of define-parenscript with the define-command and not the one with the defun?
<jackdaniel>
it is top-level make-instance
<jackdaniel>
where do you expect it to "appear"?
<Bike>
yeah, that's also weird.
<jmercouris>
I expect it to appear within a hash table
<jmercouris>
one moment
<Bike>
what puts it in the hash table? initialize-instance magic?
<jmercouris>
specifically line 44 of the file linked
<Bike>
as a matter of style i wouldn't do that but that's not really the salient point
<Bike>
if i were you i'd reload everything, making sure the version of define-parenstatic with defun is never loaded
<Bike>
i suspect that may be sticking around
<jmercouris>
Ok, let me restart my inferior lisp
<Bike>
because in the terms of your initial question this should certainly not be a problem.
<jackdaniel>
I'd put error in initialize-instance and see, if it gets triggered
<pfdietz>
beach: so just as Eclector is interesting because it's extensible/customizable, so a printer would be. There are real use cases (came up in my previous job) where this would have been handy.
<Bike>
oh good idea.
<jmercouris>
jackdaniel: it would get triggered for all sorts of valid commands though
<jmercouris>
I would have to go through and try a million times
<jmercouris>
maybe I'll just put a print, and a function name
<jmercouris>
like (print (name command))
<jmercouris>
ok, so I put the print in there
<jmercouris>
and as expected it did not print out scroll-to-top
<jmercouris>
or rather "SCROLL-TO-TOP"
<Bike>
that's before or after restarting?
<jackdaniel>
navigate to your definition and press C-c M-e
<jmercouris>
after restarting
<jackdaniel>
and examine expansion
<jackdaniel>
(in file)
mrcom has quit [Read error: Connection reset by peer]
<jmercouris>
that is mind blowing
<jmercouris>
I should really read the slime manual
robotoad has joined #lisp
<jmercouris>
okay well, here are the results of that
<pfdietz>
beach: I think what a printer would need to produce is some intermediate representation (with indentation and line breaks computed), which could then be walked to produce the actual output (raw ascii, HTML, etc.)
<jmercouris>
jackdaniel: as expected, putting in the break before make instance results in the debugger coming up
<pfdietz>
Like Eclector might do, but in reverse.
<beach>
pfdietz: Very interesting idea.
<jackdaniel>
but there is still no entry in your hashtable?
<jmercouris>
jackdaniel: let me continue, and see
<jmercouris>
it now exists in my hashtable, yes
<jmercouris>
if I manually C-c C-c the forms after my system is loaded, they exist in the hashtable
<jackdaniel>
then under what condition it does not exist in the hashtable?
<jmercouris>
when just loading the system
<jmercouris>
normally these are all supposed to be populated on system load
<jackdaniel>
and if you put break in this expansion (toplevel, before make-instance), do you get a break during load
<jackdaniel>
?
<jmercouris>
are you saying if I keep the break that you suggested earlier
<jmercouris>
will I enter the debugger on system load?
<jackdaniel>
yes
<jmercouris>
yes, I enter the debugger
<jmercouris>
but curiously, only once
<jmercouris>
I would expect it to be invoked for every define-command
orivej has quit [Ping timeout: 268 seconds]
<jmercouris>
it's a little bit strange, no?
josemanuel has joined #lisp
mrcom has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<jmercouris>
however its okay, I can do without this functionality for now, I'll leave it out
<jmercouris>
there's a lot of improvement to be done to this lisp code..
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
marvin2 has quit [Ping timeout: 246 seconds]
<jackdaniel>
I've cloned your software (don't put binary data in git repository <sigh>), adjusted parenstatic macro and loaded it
<jackdaniel>
scroll-to-top is present in the hash table
frgo has quit [Ping timeout: 246 seconds]
sjl has joined #lisp
<jackdaniel>
so the problem is in your local setup
<jackdaniel>
jmercouris: ↑
LiamH has joined #lisp
<jmercouris>
jackdaniel: in my local set-up?
<jmercouris>
how can that be?
<jmercouris>
my sbclrc is like two lines
<jmercouris>
jackdaniel: also, what binary data are you talking about?
<jmercouris>
there is no binary data in the repository afaik
<jmercouris>
unless you mean the single XCF file
<jmercouris>
and a couple of pngs
<jackdaniel>
assets/ directory. repository has over 50 thanks to that, while source is less than 500KB
dale has quit [Quit: dale]
<jackdaniel>
over 50MB
<jmercouris>
woah
<jmercouris>
50MB?
<jmercouris>
wtf
<jmercouris>
I have to look at that
<jackdaniel>
just don't put pictures in git repository. either way clean your cache, clone repository anew, make change to the parenstatic macro and load it, problem solved
<jmercouris>
shows only 13mb here on my disk, but stll
<jmercouris>
how can I clean my cache?
<jackdaniel>
do you count .git directory?
<jmercouris>
is there a command to do so within slime?
<jmercouris>
I'm not looking in the .git directory
<jackdaniel>
rm -rf /^H ~/.cache/common-lisp
<jmercouris>
however at this point, I'm not sure how I feel about obliterating old data and forcing a fast forward or something
<jmercouris>
alright, cleared the cache
<jackdaniel>
do what you want, keep in mind though that pulling 50MB for 500KB of source code may be considered silly. git is not good at managing something what is not text (there are annex and lfs extensions for that afaik)
<jmercouris>
yeah, I just wanted nice animations on github...
<jackdaniel>
good for you, enjoy. I need to be somewhere else now, later \o
<jmercouris>
goodbye, and thanks for the help
<jmercouris>
good to know it is just a problem with my set-up/not the code
<jmercouris>
indeed, clearing the cache fixed the problem, thanks!
Cymew has joined #lisp
jmercouris has quit [Remote host closed the connection]
dale has joined #lisp
Cymew has quit [Ping timeout: 250 seconds]
josemanuel has quit [Ping timeout: 245 seconds]
rnmhdn has joined #lisp
frgo has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
slyrus1 has quit [Ping timeout: 250 seconds]
hhdave_ has quit [Ping timeout: 240 seconds]
marvin2 has joined #lisp
igemnace has quit [Ping timeout: 240 seconds]
igemnace has joined #lisp
varjag has joined #lisp
makomo has quit [Ping timeout: 250 seconds]
kajo has joined #lisp
m00natic has quit [Remote host closed the connection]
makomo has joined #lisp
frgo has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
emaczen has quit [Ping timeout: 264 seconds]
dyelar has joined #lisp
frgo has quit [Read error: Connection reset by peer]
makomo has quit [Ping timeout: 240 seconds]
frgo_ has joined #lisp
rnmhdn has quit [Ping timeout: 272 seconds]
rnmhdn has joined #lisp
cage_ has quit [Remote host closed the connection]
atgreen has joined #lisp
pjb has joined #lisp
pierpal has joined #lisp
makomo has joined #lisp
sauvin has quit [Remote host closed the connection]
shifty has joined #lisp
yvy has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
makomo has quit [Ping timeout: 268 seconds]
emaczen has joined #lisp
nicksmaddog has quit [Ping timeout: 250 seconds]
dyelar has quit [Quit: Leaving.]
makomo has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
vlatkoB has quit [Remote host closed the connection]
orivej has joined #lisp
vlatkoB has joined #lisp
notzmv has quit [Ping timeout: 240 seconds]
milanj has quit [Quit: This computer has gone to sleep]
CrazyEddy has quit [Remote host closed the connection]
heisig has joined #lisp
heisig has quit [Client Quit]
gxt has quit [Ping timeout: 240 seconds]
yvy has quit [Read error: Connection reset by peer]
ealfonso has joined #lisp
rnmhdn has quit [Ping timeout: 250 seconds]
<stylewarning>
If a library should add a keyword to *FEATURES*, where shall it do that?
<Bike>
wherever it wants? what do you mean?
<pjb>
stylewarning: good question.
<pjb>
stylewarning: the problem being that *features* are usually used with #+/#-, ie. at read-time.
<pjb>
So it should be added before the sources of the library are read.
<pjb>
ie before they're compiled.
<pjb>
On the other hand, the purpose of that library may be to add it for the benefit of other libraries, such as client libraries, so it could add it whenever you want, at compilation-time, at load-time or at run-time, depending on the intended use.
<stylewarning>
Bike: I mean, would you just do a toplevel PUSH somewhere while the system is being compiled? Should it really be done at load time?
<stylewarning>
PUSHNEW rather*
<Bike>
depends on when the feature is provided, i suppose.
<Xach>
stylewarning: i don't know of a standard place. hunchentoot does it in specials.lisp
<Xach>
i think i'd do it in package.lisp
<stylewarning>
I want to place this variable to indicate a library has a particular feature (the library complies to a standard). So it seems like it should be done at load time, since somebody could compile it into a bunch of FASLs.
<stylewarning>
Xach: package.lisp sounds like a great suggestion
<pjb>
It's better to provide features last, when you're sure the whole library has been loaded without errors.
<jackdaniel>
stylewarning: cffi has a separate file in its sources called "features.lisp" and it is the last file (just as pjb suggests)
<stylewarning>
These were all great pointers and suggestions. Thank you everybody!
rnmhdn has quit [Ping timeout: 245 seconds]
gxt has joined #lisp
vlatkoB has quit [Remote host closed the connection]
<fe[nl]ix>
stylewarning: try to avoid touching *features*, or at least don't push keywords
<stylewarning>
I pushed an interned symbol
Mr-Potter has joined #lisp
<fe[nl]ix>
better, but I would try to completely avoid that
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
SaganMan has quit [Read error: Connection reset by peer]
gxt has quit [Quit: WeeChat 2.3]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
permagreen has quit [Remote host closed the connection]
scymtym has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
permagreen has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
<pfdietz>
Bind *features* when the file is loaded or compiled. No long term change.
<pfdietz>
(good use for an around method)
nopolitica has joined #lisp
nopolitica has quit [Client Quit]
makomo has joined #lisp
notzmv has joined #lisp
Jesin has quit [Quit: Leaving]
ealfonso has quit [Ping timeout: 252 seconds]
Jesin has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
igemnace has quit [Quit: WeeChat 2.3]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
phoe has quit [Read error: Connection reset by peer]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
shifty has quit [Ping timeout: 250 seconds]
mrcom has quit [Read error: Connection reset by peer]
mrcom has joined #lisp
nowhere_man has joined #lisp
verisimilitude has joined #lisp
<verisimilitude>
How have you all been, lately?
meepdeew has joined #lisp
dacoda has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
makomo has quit [Ping timeout: 240 seconds]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
<verisimilitude>
I see you've been working with CHIP-8, lately, no-defun-allowed; I find that interesting, as I've been working with CHIP-8 as a starting point for some of my works, although this isn't much related to Lisp. Feel free to PM me if you're interested.
Kundry_Wag has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 250 seconds]
pillton has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
orivej has quit [Ping timeout: 244 seconds]
kajo has joined #lisp
LiamH has quit [Quit: Leaving.]
jack_rabbit has quit [Ping timeout: 252 seconds]
graphene has quit [Remote host closed the connection]