<cobax>
Why is Lisp image-based? Why did it start this trend? What was this feature trying to solve?
<pierpa>
It solves the problem of how to have fun programming.
<no-defun-allowed>
it solves the issue of "what if they don't have an sbcl though?"
fikka has joined #lisp
<aeth>
cobax: Faster development time. There are other ways, but they came much later afaik. And most involve an IDE.
<jasom>
cobax: once you have a dynamic environment and automatic memory management, the idea kind of falls out naturally; I'm not sure if smalltalk or lisp did it first.
fikka has quit [Ping timeout: 252 seconds]
<Bike>
also developing the language with the OS
<cobax>
from stack overflow I found this bit, and I wonder if this was part of the motivation:
<cobax>
"There were at one time Prolog systems that saved "working memory" as disk images. It used to be common practice, especially when the OS system calls didn't do a good job with compression and memory-management of special data structures, which is why LISP and Smalltalk did it too."
<LdBeth>
Smalltalk is Lisp inspired
Lycurgus has quit [Quit: Exeunt]
<jasom>
LdBeth: there was a lot of cross-pollination, though lisp did come first.
<cobax>
Also, where can I read about what entails an "image" and how it is usually implemented, and a minimalist implementation of a lisp-with-image, for example?
<jasom>
cobax: old applications would do something similar; a document was actually just a memory dump of the data structures the application used.
<cobax>
I have Queinnec's book and many others but Queinnec doesn't touch on the image-based aspect of Lisp and it is otherwise very rarely discussed
<jasom>
cobax: at it's simplest form, it's just copying the heap to disk.
<aeth>
Recompiling a graphical application while it is running and immediately seeing the changes is a magical thing. (Except, of course, that doesn't always work even in CL. Changes won't always be reflected. It depends somewhat on the architecture.)
<jasom>
cobax: usually there is a header and some metadata on top; most implementations also support some way of specifying functions to call upon startup too.
<cobax>
jasom: that is interesting, I wonder what best ways they found to keep the heap, in order to facilitate its serialization
slyrus1 has quit [Quit: slyrus1]
<Oladon>
5
<jasom>
cobax: if a compacting GC of some sort is used, you run that first and then the whole world is in contiguous memory
<Oladon>
Whoops, you guys aren't a REPL.
ober has quit [Ping timeout: 252 seconds]
<Oladon>
(On second thought, you kinda are, but nobody had presented a "5" option recently.)
<cobax>
jasom: that makes sense to me, but I am still looking for some papers or hard reading. for instance, it's a bit magical that lambdas can be serialized, among other things
<cobax>
or does Lisp achieve ease-of-persistence because code is data? and so when it serializes the heap it's just plain old lisp code?
<cobax>
I have so many books on lisp compilers, they never cover this part, and it's fascinating
graphene has quit [Read error: Connection reset by peer]
<AeroNotix>
cobax: which books on Lisp compilers?
<no-defun-allowed>
Oladon: 5
<no-defun-allowed>
well the CL spec doesn't require you to log lambdas as s-expressions
<Oladon>
no-defun-allowed: *
<cobax>
AeroNotix: I have all of Nils Holm's books, I have many old books on old Lisps, and many of the new ones such as "Interpreting Lisp" by Knott
<no-defun-allowed>
Oladon: 5
<cobax>
and Queinnec's book of course
<Oladon>
no-defun-allowed: 5
<no-defun-allowed>
Oladon: 5
<Oladon>
:P
<no-defun-allowed>
:P
graphene has joined #lisp
<cobax>
Holden's "Build Your Own Lisp"
<Oladon>
no-defun-allowed: Guess who's trying to get the old Weblocks running...
<cobax>
so if anyone can point me to some good reading on image-based language implementation I'd appreciate it
<no-defun-allowed>
Oladon: *** The variable GUESS is unbound.
<no-defun-allowed>
0: Enter a new value for GUESS.
<no-defun-allowed>
1: Enter a new form to evaluate.
<no-defun-allowed>
2: Exit to the REPL.
ober has joined #lisp
<Oladon>
(run-game 'rpg)
<no-defun-allowed>
You are at a dead end of a dirt road. The road goes to the east. In the distance you can see that it will eventually fork off.
<no-defun-allowed>
The trees here are very tall royal palms, and they are spaced equidistant from each other. There is a shovel here.
<Oladon>
(get 'shovel)
<no-defun-allowed>
Taken.
<Oladon>
(dig)
<no-defun-allowed>
Digging here reveals nothing.
<Bike>
yo, ther'es off topic and there's off topic
<no-defun-allowed>
*** Interrupt from moderator.
<Oladon>
:D
<no-defun-allowed>
0: Blame Oladon
* no-defun-allowed
presses 0
<Oladon>
pfft, Bike knows better than that.
* no-defun-allowed
avoids the temptation of making jokes about riding bicycles
<no-defun-allowed>
anyways, how could you write a long string with lots of embedded #"s in them?
<no-defun-allowed>
there's a lot of #"s to quote.
<Bike>
you could define a compiler macro with a different delimter.
<Bike>
(or use cl-interpol or something, which does that)
<no-defun-allowed>
okay thanks
warweasle has quit [Quit: later]
<ober>
#+sbcl (gc-full :t) ;;ard
<no-defun-allowed>
caught STYLE-WARNING: undefined function GC-FULL
<no-defun-allowed>
The function CL-USER::GC-FULL is undefined.
<Bike>
gc :full t
Pixel_Outlaw has joined #lisp
<no-defun-allowed>
NIL
<ober>
Bike: thanks
<no-defun-allowed>
nice, my head feels less cramped
Pixel_Outlaw has quit [Quit: Leaving]
Pixel_Outlaw has joined #lisp
anewuser has quit [Ping timeout: 244 seconds]
makomo has quit [Ping timeout: 252 seconds]
dmiles has quit [Read error: Connection reset by peer]
logicmoo has joined #lisp
suskeyhose has joined #lisp
equwal has joined #lisp
mason has quit [Quit: leaving]
mindCrime has joined #lisp
<White_Flame>
cobax: it's always fun to read old Lisp machine manuals, you can get a sense of the scope of the utilities they had
<cobax>
White_Flame: I agree!
mason has joined #lisp
<johnjay>
AeroNotix: ah ok. when the world renowned expert in X doesn't understand X that well
<johnjay>
that's probably bad
esrse has joined #lisp
<cobax>
is Elephant the "Gemstone/S" of Common Lisp?
kristof has joined #lisp
noobly has joined #lisp
noobly has quit [Ping timeout: 252 seconds]
dale has joined #lisp
<aeth>
Who is the world renowned expert in Lisp?
<scottj>
xah lee
<aeth>
s/Lisp/Common Lisp/
<aeth>
is there someone who can claim to know 100% of the Common Lisp language?
anewuser has joined #lisp
<aeth>
(including de facto standard components like the MOP)
<Bike>
i claim i know 100% of lisp and also am suzerain of the moon
<no-defun-allowed>
i still want to know if xach or xah lee would win in a fight
<aeth>
Bike: if you claimed to know 100% of Lisp I'd probably believe it
<no-defun-allowed>
is CL just the CLtL and Art of the MOP books or every library created?
<no-defun-allowed>
(the hypothetical fight is an important question cause obviously whoever would win in a fight knows more about lisp and the two are correlated)
<aeth>
no-defun-allowed: I'd personally say the HyperSpec and anything covered by a de facto standard portability library (MOP, bordeaux-threads, CFFI, etc.)
<aeth>
The latter *are* part of most implementations
<aeth>
The libraries are just there for portability
<no-defun-allowed>
fair enough
<no-defun-allowed>
still of course xahlee knows everything about lisp and emacs and we must follow his intellectual thought
rumbler31 has joined #lisp
<aeth>
fair enough
<no-defun-allowed>
for a while i thought xah and xach were the same person.
<aeth>
for a while I thought Xach and XachX were the same person
<no-defun-allowed>
for a while i thought emma-__ (mod of /r/emacs) and another emma (devout vim user) were the same person
<no-defun-allowed>
and this one isn't excusable either, there's too many emmas.
Pixel_Outlaw has quit [Quit: Leaving]
laoguan_ has joined #lisp
_whitelogger has joined #lisp
impulse has joined #lisp
mindCrime_ has joined #lisp
dale has quit [Quit: dale]
<AeroNotix>
johnnymacs: a y combinator is a way to implement recursion using anonymous functions
orivej has quit [Ping timeout: 245 seconds]
mindCrime has quit [Ping timeout: 246 seconds]
<johnnymacs>
Yes indeed I can use it to loop over a specific function.
<johnnymacs>
There are a couple of properties of it I am unaware of though
<johnnymacs>
I do not know if in a non lazy langauge it will stack overflow. I also do not know if it has a clause for termination.
<AeroNotix>
johnnymacs: you're in #lisp, which is for Common Lisp. Common Lisp isn't (by default) lazy.
<AeroNotix>
secondly, the clause for termination is up to the functions being passed to and initially called by, the y-combinator.
jcowan has joined #lisp
<johnnymacs>
As long as there possibly is a clause for termination this answers my second question. My first question remains unanswered.
<johnnymacs>
In common lisp does the y combinator cause stack overflow by default?
<jcowan>
When using symbols at run time, rather than to hold the values of globals, is it normal to use the symbol-value and symbol-function slots for anything?
<AeroNotix>
johnnymacs: Common Lisp doesn't require tail end recursion optimization
<johnnymacs>
This is true.
<johnnymacs>
Are you saying that because common lisp does not require this that the y combinator will stack overflow?
<AeroNotix>
No
<johnnymacs>
So the y combinator will only overflow if the function passed to it will cause an overflow.
<AeroNotix>
I am saying to write portable Common Lisp you cannot expect a program which requires TCO to work properly, to work properly.
<johnnymacs>
The probability that you have answered my question is 80% which I find suitable
johnnymacs has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<jcowan>
johnnymacs: But if you go over to the Scheme side of the Force, you don't have that problem. -)
<White_Flame>
if you look at the docs of your implementation, particularly around optimization declarations, you should see if they can enable it or not
<White_Flame>
if it's supported, it's usually at some speed level setting, not necessarily a separate declaration
<AeroNotix>
I really hate answers like this tbh. I wish we could all just agree that SBCL is the shiznit and all to use that
<White_Flame>
well, it's a pretty abstract question, too
<AeroNotix>
White_Flame: I'm drunk, I suspect they were too. Hence why I understood
<White_Flame>
and as always, DISASSEMBLE is your friend
<White_Flame>
oh, he left. whoops
<AeroNotix>
yeah
<jcowan>
I can understand not supporting it in a particular implementation, but why would support be selective in systems that do support it?
<AeroNotix>
jcowan: what do you even mean btw? I've been mulling it over since you posted it but I don't get why you mentioned "rather than to hold the values of globals"
<AeroNotix>
jcowan: I've never understood selective support either. I've brought it up a few times in here
<jcowan>
iow symbol slots hold the value of defun, defmacro, defparameter, etc, and at run time you can discover those values.
<AeroNotix>
The standard makes no recommendation either way on TCO, which makes it *even worse*
<jcowan>
But symbols can also be used as a pure data structure, in which case the p-list helps you associate auxiliary information with each symbol.
<White_Flame>
yeah, a lot of old code (pre-hash-table specifically) does that
<jcowan>
You also have the symbol-value and the symbol-value slots: is it usual to use them in such applications?
foom2 has joined #lisp
<White_Flame>
instead of table->key->value, you store key->tablename->value on the plist
<jcowan>
AeroNotix: The Java argument not to support it is that people want full stack traces, and stack traces are hard in the presence of TCO
<jcowan>
otoh, it's not uncommon to have hundreds of lines of stack trace in Java exceptions: who looks at those?
<AeroNotix>
jcowan: there are differences between: (quote foo), #'foo and foo
<jcowan>
Sure.
<jcowan>
If foo is global, then #"foo is (symbol-function 'foo) and foo is (symbol-value foo).
foom has quit [Ping timeout: 252 seconds]
<jcowan>
But here I am talking about the use of symbols as pure data structures, not as part of the implementation of global variables.
<White_Flame>
I've not heard of it, but I don't think there'd be anything stopping you
<AeroNotix>
jcowan: do you mean to fill those slots with garbage only your program understands?
<jcowan>
just so
<AeroNotix>
yeah => #php is thattaway
<jcowan>
Technically the function slot has to be filled with a function, but I don't know if anyone enforces that or not.
<AeroNotix>
jcowan: why do you want to do this?
<White_Flame>
the only 3 fully accessible slot from the spec seem to be symbol-function, symbol-plist, and symbol-value
<jcowan>
I don't. I want to make sure that no one else would reasonably do it either.
<jcowan>
Also symbol-name
<White_Flame>
so the macro binding, etc, probably aren't directly available via normal/portable code
<White_Flame>
symbol-name is a function, not an accessor
<jcowan>
right, macros are not
dddddd has quit [Remote host closed the connection]
<jcowan>
but I don't know why you say symbol-name (and symbol-package for that matter) are not accessors
<White_Flame>
because the spec says they're functions...
<Oladon>
Anyone have any suggestions for finding something similar to https://bugs.launchpad.net/sbcl/+bug/1654550 in Weblocks, where it's breaking something with the MOP somehow, but I'm not sure what method(s) it's defining that are breaking things? It's not the specific example in the link; that appears to have been fixed (based on grep), but I'm still getting that weird unknown pointer error, and I'm not sure the best way to track down the culp
<White_Flame>
try it. You can't setf symbol-name, because that's an unknown operation
<jcowan>
Well, okay, it's a read-only slot then.
<Oladon>
Tried grepping for defmethod.*standard -- nothing that looks suspect
pierpa has quit [Quit: Page closed]
<White_Flame>
"accessor" means you can read & write. "function" just means you can call it and it does something & returns something
<jcowan>
Fair enough.
<jcowan>
I bet it's implemented as a defstruct slot, though
<AeroNotix>
jcowan: sounds implementation specific though
<White_Flame>
there's nothing in the spec that requires symbols be objects with slots. It could create an integer per symbol, and have separate arrays for some symbol-* interfaces, and do other thigns with others
foom2 has quit [Read error: Connection reset by peer]
foom2 has joined #lisp
<jcowan>
I'm thinking about writing a symbol-and-package system for Scheme for runtime only. Of course it doesn't have to conform to CL, but I don't want to make it *gratuitously* different.
<White_Flame>
but yes, most will likely be structs, with some overrides to optimize NIL being both a symbol and sort of a cons cell
<AeroNotix>
Oladon: a bare sbcl shell doesn't exhibit the same behaviour. There's something missing from that bug report
<Oladon>
AeroNotix: It's Weblocks-specific
<aeth>
White_Flame: And that's what I thought (the integer way) until today
<Oladon>
AeroNotix: They fixed that specific bug, but if you quickload weblocks and then try to make-instance something, you'll get the unknown pointer
<AeroNotix>
Oladon: trying now
<aeth>
White_Flame: NIL is a LIST but not a CONS iirc
<jcowan>
Still, it sounds like I can leave out all the machinery around the value and function slots; if you want those things, put properties on the p-list.
<White_Flame>
aeth: coming from 6502 home computer land, that was a very common data organization method, as you didn't have easily flexible full 16-bit pointers
<aeth>
White_Flame: So LIST is afaik (OR NULL CONS)
cobax has quit [Ping timeout: 240 seconds]
<Oladon>
It looks like they do have an :around method defined on initialize-instance with ((obj composite)) as the first arg... wonder if that'd do it.
<White_Flame>
right, that's why I said "sort of a cons cell", so CAR/CDR of NIL can easily return NIL without type checks
<jcowan>
Historically NIL was stored at address 0 as a cons whose car and cdr slots pointed to 0, and punned with a symbol
emaczen has quit [Ping timeout: 240 seconds]
mkolenda has joined #lisp
<AeroNotix>
Oladon: confirmed.
<jcowan>
so e.g. the first two slots of a symbol were name and package, say, and then the logic for getting the name and package of NIL was special cased
<Oladon>
AeroNotix: So... any ideas on troubleshooting it? :)
<jcowan>
anyway, thanks for the information
<AeroNotix>
Oladon: stop using weblocks?
<Oladon>
AeroNotix: Can't stop, haven't started yet! :)
<White_Flame>
aeth: btw, symbols probably also allocate an integer offset for themselves for a thread-local binding table, so you're not totally wrong
<Oladon>
AeroNotix: Nah, but seriously, I like a lot of its ideas, and in theory it should still run...
<AeroNotix>
Oladon: I'm playing with a few ideas in the repl now but don't expect much, I don't care about weblocks at all.
Hu0p has joined #lisp
<Oladon>
AeroNotix: Fair enough. Do you do any web stuff in Lisp?
<AeroNotix>
Oladon: if by "web stuff" you mean "processes that return html", no
<AeroNotix>
no idea, tried a few simple checks. It's something whacky that weblocks is doing
<Oladon>
Fair. Appreciate your help nonetheless.
<Oladon>
Yeah
<Oladon>
Thanks anyway
<AeroNotix>
np
<White_Flame>
aeth: in SBCL, accessing a special variable means dereferencing a TLS offset from the symbol structure, reading that entry from the thread-local table, if that's unbound then hit the symbol-value slot of the symbol object itself
<White_Flame>
(from my reading of the disassembly)
<AeroNotix>
Though, :around :before :after methods, as you suggested sounds like a sound place to start your debugging
<Oladon>
Yeah, just not sure where to go from there. So they've got an :around method on initialize-instance... now what? :)
igemnace has joined #lisp
<AeroNotix>
on what specialisers?
<AeroNotix>
Oladon: link to code, plz
<Oladon>
AeroNotix: One moment
rumbler31 has quit [Remote host closed the connection]
<no-defun-allowed>
i keep seeing that in my head everytime you say that
<beach>
I understand.
impulse has joined #lisp
shka_ has joined #lisp
<beach>
no-defun-allowed: When I lived in Auckland for a year, there were around 5 lispers within a radius defined by a 3-hour flight. Here in Europe, there are hundreds.
<no-defun-allowed>
"literally dozens"
<no-defun-allowed>
when i lived in melbourne for 17 years, there were around 2 lispers within a radius i didn't really measure
<drmeister>
Hello everyone.
<drmeister>
Here in Philadelphia we have to make lispers
impulse has quit [Remote host closed the connection]
<drmeister>
Hey - are there any lispers who use 'buildbot'? It's a Python continuous integration system. I just figured it out for building a Clasp CI system. I'm interested in comparing notes.
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
<drmeister>
Drop me a message if you do - it's late here so I'm heading to bed.
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
<no-defun-allowed>
hi drmeister
<no-defun-allowed>
why is lisp named after a speech impediment
<no-defun-allowed>
no i'm not, someone took my laptop off me during a prac at school
<no-defun-allowed>
i'm sorry about that.
Balooga_ has quit [Quit: Balooga_]
<jackdaniel>
AeroNotix: there is and it is called quicklisp-controller
zxcvz has quit [Ping timeout: 245 seconds]
igemnace has quit [Quit: WeeChat 2.2]
shifty has joined #lisp
<beach>
MAKE-METHOD-LAMBDA says that the METHOD argument may be uninitialized. It doesn't say that about the GENERIC-FUNCTION argument, but it says that it might not be the generic function that the method will be used with, so I don't see what information MAKE-METHOD-LAMBDA could use about that generic function, other than its class.
<beach>
And if so, the GENERIC-FUNCTION argument could be uninitialized as well.
<beach>
If I am allowed to pass an uninitialized generic function to MAKE-METHOD-LAMBDA I can solve the problem indicated by Pascal Costanza's article.
<beach>
For DEFGENERIC, the file compiler can just store the GENERIC-FUNCTION-METHOD-CLASS and the METHOD-CLASS arguments with the name of the generic function in the compile-time environment.
<beach>
DEFMETHOD can pass the class-prototype of those classes to MAKE-METHOD-LAMBDA.
moei has quit [Ping timeout: 244 seconds]
pierpal has quit [Ping timeout: 246 seconds]
gpiero has quit [Quit: Leaving.]
<no-defun-allowed>
okay bad idea time: it'd be interesting if CONSTANTLY could return multiple values
<mfiano>
Xach: Seems to be. For some reason library authors think it is good practice to assume transitive dependencies will always be present instead of writing a proper system definition.
<mfiano>
So that makes all 3 third-party cl-sdl2 addon libraries at fault assuming a dependency specified in cl-sdl2's :depends-on list will always be present. Impressive.
<mfiano>
Sadly I do not have commit access to repositories outside of the lispgames GitHub organization to fix that one.
<aeth>
no-defun-allowed: call it multiple-value-constantly
<no-defun-allowed>
good idea
<mfiano>
With cl-sdl2-ttf, it is even worse. It is directly calling trivial-garbage functions itself.
<mfiano>
Sigh
shka_ has quit [Ping timeout: 272 seconds]
mingus has joined #lisp
joga has joined #lisp
smokeink has joined #lisp
mingus has quit [Remote host closed the connection]
s-geometry has joined #lisp
scymtym has quit [Ping timeout: 246 seconds]
gpiero has joined #lisp
igemnace has joined #lisp
SaganMan has joined #lisp
fikka has joined #lisp
shrdlu68 has joined #lisp
kristof has quit [Ping timeout: 252 seconds]
scottj has quit [Quit: leaving]
moei has joined #lisp
heisig has joined #lisp
omilu has quit [Ping timeout: 246 seconds]
DGASAU has quit [Ping timeout: 264 seconds]
omilu has joined #lisp
shka_ has joined #lisp
<shka_>
good morning!
stacksmith has quit [Ping timeout: 240 seconds]
<zigpaw>
morning :)
vlatkoB has joined #lisp
<no-defun-allowed>
morning shka_
varjag has joined #lisp
smokeink has quit [Remote host closed the connection]
schweers has joined #lisp
scymtym has joined #lisp
<shrdlu68>
shka_: Morning
<shka_>
shrdlu68: hello, how are you/
<shka_>
?
<no-defun-allowed>
shrdlu68: pick up a big red block.
pierpal has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
oh, wrong shrdlu
atgreen__ has joined #lisp
atgreen_ has quit [Ping timeout: 244 seconds]
rumbler31 has joined #lisp
mingus has joined #lisp
shrdlu68 has joined #lisp
joast has quit [Ping timeout: 252 seconds]
<shrdlu68>
shka_: Sorry, got disconnected. I haven't tried your btrie yet, but I tried cl-container's trees and the performance was sub-par to hashtable.
k-hos has quit [Ping timeout: 245 seconds]
<shka_>
hm, ok
suskeyhose has quit [Quit: ERC (IRC client for Emacs 26.1)]
<shka_>
i think that this result is not relevant to trie, though
<shka_>
shrdlu68: forgot to call recursive setf at-bit-trie
<shrdlu68>
shka_: Testing...
<shrdlu68>
shka_: Heap exhaustion, same heap size as hash tables.
<shka_>
shrdlu68: obviously this is not space efficient structure
<shka_>
try smaller heap, if it is faster, you can apply compression
<j`ey>
beach: I dont quite get what cleavir is
<beach>
minion: Please tell j`ey about Cleavir.
<minion>
j`ey: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
<j`ey>
I'm just not sure what a compilation framework means here
HDurer has joined #lisp
<j`ey>
I see in the example it uses sbcl, so Im not sure what cleavir does before?/after? SBCL
<shka_>
j`ey: set of tools
<beach>
j`ey: Basically it is a compiler. But since every implementation has its way of compiling things, it must be possible to customize it.
<minion>
.(run-program "rm" '("-rf" "")): An error was encountered in lookup: Parse error:URI "https://www.cliki.net/.(run-program%20\"rm\"%20'(\"-rf\"%20\"\"))?source" contains illegal character #\" at position 38..
<j`ey>
beach: what does cleavir compile to?
<beach>
j`ey: That is up to the implementation to decide. Currently, Cleavir first converts the Common Lisp code to an AST and then the AST to HIR (High-level Intermediate Representation). Then it runs some optimizations on that code. The rest is pretty much up to the implementation.
<j`ey>
beach: the implementation could be, for example, SBCL
<beach>
j`ey: Clasp turns HIR into LLVM.
<beach>
Sure, yes.
<beach>
But that probably won't happen.
<j`ey>
is HIR some standard?
<beach>
No.
<beach>
I invented it.
<Shinmera>
Well, most compilers have a HIR of some kind
<no-defun-allowed>
HIR's just what's relatively easy to compile
<beach>
The compiler book mentions MIR which is pretty standard. HIR has the interesting characteristic that all objects manipulated are Common Lisp objects. Address calculations are not exposed.
<dim>
beach: I guess you have a disassemble like function that outputs the optimized HIR? I kind of like poking into those levels of abstractions from the REPL ;-)
<no-defun-allowed>
Clang/LLVM uses an IR which is distinct from the C it consumes and the assembler it emits
<no-defun-allowed>
nice
<j`ey>
beach: so the SBCL example is a bit confusing indeed
<beach>
j`ey: Definitely. I should remove it.
<beach>
dim: I don't have such a function.
<beach>
dim: But I have a CLIM_based IR visualizer.
<no-defun-allowed>
does CLIM expose much for tree or graph drawing?
<beach>
Yes, it has a graph-layout module, but it is not very elaborate.
shrdlu68 has quit [Ping timeout: 250 seconds]
<no-defun-allowed>
i'd like to draw some graphs, and so far graphviz is the best solution
<beach>
So I use my own in the visualizer.
<no-defun-allowed>
well, i'll just use graphviz then
<beach>
McCLIM can draw trees fine.
<no-defun-allowed>
i'm sure that can be done recursively...somehow.
<no-defun-allowed>
but these might not be trees, they're most likely messy graphs
<Shinmera>
with IR graphs, graphviz results are pretty terrible
<no-defun-allowed>
yeah, grapviz is probably not designed to show program flow or order
<beach>
That's why I wrote the visualizer. We used Graphviz, but it was impossible to follow even a slightly complicated graph.
<beach>
Plus, it was tedious to use. Generate dot, translate it to (say) PDF, start the PDF viewer.
<no-defun-allowed>
fortunately this project only will be drawing horrid messes of graphs
<no-defun-allowed>
that's true
<beach>
j`ey: So is it a bit more clear now what Cleavir does?
<beach>
Hmm, I guess not. :(
razzy has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
<j`ey>
beach: cleavir is a frontend :)
equwal has quit [Ping timeout: 246 seconds]
steiner has quit [Remote host closed the connection]
smokeink has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
<beach>
j`ey: At the moment, yes. But I intend to supply highly customizable translators to MIR and machine code.
<j`ey>
a few years ago I looked at clasp quite a bit, but I've forgotten all the details now :(
<beach>
j`ey: Currently, Cleavir has 3 clients: SICL (of course), Cleasp, and CLISP.
<j`ey>
how old is cleavir?
<j`ey>
or is it something that CLISP moved to "recently"?
<beach>
10 years old it seems.
<beach>
Sorry, SICL is 10 years old.
<beach>
Cleavir is newer.
<beach>
I don't know exactly.
<j`ey>
pretty cool that CLISP uses cleavir then
<beach>
Yes, this past summer karlosz worked on a GSoC project to write a Cleavir-based compiler for CLISP.
Hu0p has quit [Quit: Do Macbooks Dream of Electric Sheep?]
curl has joined #lisp
<curl>
hi
<curl>
can anyone help me with a quick assignment?
<beach>
Hello curl.
<j`ey>
beach: Im a big fan of bootstrapping
<beach>
Don't ask to ask. Just ask.
<curl>
in racket, which Horn clause does '((1 2 3) (-3 -1) (1)) represent?
<beach>
curl: This channel is dedicated to Common Lisp. Sorry!
<curl>
:)
<curl>
that's why I asked
<beach>
Racket is not an implementation of Common Lisp.
<curl>
as #racket seems to be dead
m00natic has joined #lisp
<beach>
There is nothing we can do about that.
<curl>
fair enough, guess I'll have to come to grips with my status as a refugee
<curl>
well... but 'in general' which Horn clause does that directed graph represent?
<makomo>
curl: i don't think that's specific to racket. it's just a particular representation of horn clauses (i think)
<makomo>
horn clauses are a specific thing from logic -- why would racket have something like that built-in
<makomo>
if it turns out to be true, i'll be surprised
<curl>
it doesn't
<makomo>
well then, what horn clause that list represents depends on how you're representing/encoding those horn clauses within your program
<makomo>
no way for us to know that
<curl>
I'm supposed to implement a function which decides whether a given horn clause is satisfiable
kooga has joined #lisp
<jackdaniel>
sounds like an university assignment, aren't those supposed to do without help?
<j`ey>
beach: what was wrong with the old Boot, why are you working on a new one?
<curl>
well the assignment was implement the function
<curl>
not parse notation
scymtym has joined #lisp
<curl>
I had hoped one of the luminaries here could provide an answer
<beach>
j`ey: It was too confusing. I imported too much stuff from the host, so I couldn't keep track. I got "no applicable method" errors instead of "unknown function" errors.
mjanssen has joined #lisp
<beach>
j`ey: I am going to have lunch guests in a few minutes. I'll be back in a couple of hours.
<j`ey>
beach: Have fun!
<curl>
Lunch guests are not an implementation of Common Lisp.
steiner has joined #lisp
<antoszka>
They might be.
DGASAU has joined #lisp
orivej has joined #lisp
dddddd has joined #lisp
zfree has quit [Remote host closed the connection]
logicmoo has quit [Ping timeout: 240 seconds]
<curl>
how can '((1 2 3) (-3 -1) (1)) even be a directed graph
<no-defun-allowed>
Lunch guests probably can evaluate Common Lisp in their heads. If they're beach's guests, they can even write compilers probably.
dmiles has joined #lisp
<jackdaniel>
curl: what you give us is just a list of lists. interpretation depends on the task description. if that is unclear in the assignment I think you are fully entitled to write your teacher an email with that question
esrse has quit [Ping timeout: 246 seconds]
<no-defun-allowed>
I don't know how you'd parse that list, curl.
<curl>
I don't get the negatives
zfree has joined #lisp
<curl>
if you're representing a directed graph why the negatives
<no-defun-allowed>
You're asking us.
<no-defun-allowed>
We've got even less context on this task.
<curl>
I thought maybe it was obvious and I just wasn't getting it
<makomo>
curl: maybe something like: the i-th (1-based) element of the list represents a node with the identifier i. that element is a list which stores other node ids to which that node is connected to. a positive id means that the arrow is going towards that node, while a negative id means it is going away from that node
<makomo>
curl: "that node" being the various nodes within a node's list
<makomo>
so, e.g. (1 2 3) would means that the 1st node is connected to: itself, the 2nd node and the 3rd node
<makomo>
curl: i don't know whether this makes sense or not though, just guessing. the assignment must say something about it, or perhaps it was explained during a lecture so you might want to review your notes
<no-defun-allowed>
That's pretty clever, but the indexing looks off to me.
<curl>
our TA was supposed to document the exercises
<curl>
but he didn't do it or did like the bare bare minimum
<curl>
makomo: I also thought of that, but how would that explain '((1 2 3) (-3 -1) (1)) the node (-3 -1)
<makomo>
curl: the sign of the index represents the orientation
<makomo>
the orientation of the arrow/connection*
<makomo>
(1 2 3) means 1->1, 1->2, 1->3; (-3 -1) means 2<-3 2<-1
<makomo>
but hm, one could do without the negative indices just by replacing them with positive indices within different nodes
<curl>
but why is the third node just (1) then?
<curl>
why is it not (1 2) ?
<makomo>
2<-3 is really 3->2, so you could put 2 in the 3rd node's list
<makomo>
curl: the 3rd node is connected to the 1st one, 3->1
<makomo>
curl: because it's a directed graph, as you said
<curl>
and the 2nd no?
<makomo>
*directed* graph
<makomo>
right, that's why i said that i'm not completely sure about these negative indices
<curl>
yeah the graphs directed, but (.. ) (-3 -1) (..) means the 2nd node has arrows coming from the third and first nodes
atgreen__ has quit [Remote host closed the connection]
atgreen__ has joined #lisp
<zigpaw>
the negative nodes could be added by the teacher to just level-up the difficulty level for the students (as it doesn't make sense in a real world application, where you should strive for the simplest solution and avoid unnecessary complexity).
<curl>
I'm thinking '((1 2 3) (-3 -1) (1)) represents (x1 v x2 v x3) ^ (!x1 v !x3) ^ (x1) ?
atgreen__ has quit [Read error: Connection reset by peer]
vydd has joined #lisp
<makomo>
i don't know whether horn clauses and dags are related at all, but cs3.28 doesn't like it represents a dag
<makomo>
it obviously represents horn clauses, where the integers denote variables. just because both of those use lists as its representation doesn't have to mean they're conceptually related somehow
<makomo>
s/like/look like/
rumbler31 has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
Essadon has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
Bike has joined #lisp
<makomo>
how come symbol macros can't compute their expansion like normal macros can? the expansion form is just taken verbatim and used in place of the symbol
kajo has quit [Ping timeout: 252 seconds]
<beach>
Because there are no parameters that can alter the expansion.
<makomo>
beach: what about using dynamic variables that are part of the compiler environment, or just using it for macroexpansion-time side-effects in general?
<Bike>
cos that would be super nasty.
<makomo>
because i could really use something like that right now
<Bike>
if you want to have a compiler environment with different expansions of some global symbol macros, you can just shadow using symbol-macrolet.
<Bike>
as for side effects, only the Great Deceiver can help you
<makomo>
;_;
<makomo>
the problem is, i have an additional requirement of needing to register all of the signal reads (along with writes (but that uses a special function/macro)). if i go the "macroexpansion solution" route as we discussed yesterday, i would also need my symbol macros to register such information during macroexpansion
<makomo>
(the context is my VHDL DSL)
<Bike>
i haven't been paying attention. do you have a link to an explanation of the syntax for your thing, or whatever
<makomo>
but i guess that's impossible. which means that the macroexpansion solution isn't a good choice
igemnace has quit [Read error: Connection reset by peer]
foom2 is now known as foom
DGASAU has quit [Ping timeout: 252 seconds]
schweers has quit [Ping timeout: 250 seconds]
DGASAU has joined #lisp
igemnace_ has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
DGASAU has quit [Ping timeout: 252 seconds]
bradcomp has joined #lisp
DGASAU has joined #lisp
nika has joined #lisp
cage_ has joined #lisp
Hu0p has joined #lisp
DGASAU has quit [Ping timeout: 240 seconds]
gpiero has quit [Quit: Leaving.]
johnjay has joined #lisp
<phoe>
Xach: I am here to complain about updating Quicklisp on poor WiFi
<phoe>
I am in a train now and lost connection mid-way through downloading packages
<Xach>
phoe: where is the wifi? maybe i can help
<Xach>
I will try to update the train
<phoe>
Now Quicklisp assumes it has successfully finished downloading everything
<phoe>
Please do
<Xach>
phoe: well, if anything is not actually updated, it will be updated on demand.
lavaflow has quit [Ping timeout: 240 seconds]
<Xach>
This is a common source of anxiety - perhaps dist upgrades shouldn't update previously installed projects?
lavaflow has joined #lisp
<phoe>
Xach: yes, it's confusing for me
<phoe>
a dist upgrade and a project upgrade are separate things for me
<phoe>
and, for some reason, (ql:update-all-dists) does both
<phoe>
it updates the dist itself *and* updates all downloaded packages
<Xach>
It's meant as a convenience. If you have foo-1.0 installed and the next dist provides foo-1.1, the assumption is that you want to have foo-1.1 when you update.
<phoe>
Yep, I want to have foo-1.1 when I update
<phoe>
And if the update process breaks due to poor connection, I'd like to be able to resume it
<phoe>
And not have Quicklisp go "nope, everything's fine, I didn't see that connection break two seconds ago".
<Xach>
Right. It's never been very high-priority to change because it will be fetched when next needed anyway.
<phoe>
This is the most confusing part
<phoe>
Sure thing it's self-healing because things are fetched on-demand afterwards, but if #'update-dist pulls new systems when it's run for the first time, it should also pull them when it's run for the nth time
<phoe>
or at least check if we have newest versions for all installed systems
<phoe>
(I got scared for a moment there, I admit)
varjag has joined #lisp
pfdietz has quit [Ping timeout: 250 seconds]
Jesin has quit [Quit: Leaving]
equwal has joined #lisp
equwal has quit [Remote host closed the connection]
equwal has joined #lisp
cl-arthur has joined #lisp
Jesin has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
equwal has quit [Remote host closed the connection]
equwal has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
lavaflow_ has joined #lisp
smokeink has quit [Remote host closed the connection]
lavaflow has quit [Ping timeout: 272 seconds]
DGASAU has joined #lisp
lavaflow_ has quit [Ping timeout: 252 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
Arcaelyx has joined #lisp
orivej has joined #lisp
Hu0p has quit [Quit: See You Space Cowboy. . .]
Hu0p has joined #lisp
s-geometry has quit [Ping timeout: 272 seconds]
m00natic has quit [Remote host closed the connection]
dyelar has joined #lisp
pjb has joined #lisp
doubledup has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
regreg has quit [Quit: Konversation terminated!]
rippa has joined #lisp
regreg has joined #lisp
regreg has quit [Remote host closed the connection]
cage_ has quit [Quit: Leaving]
graphene has quit [Read error: Connection reset by peer]
graphene has joined #lisp
Lycurgus has quit [Quit: Exeunt]
emaczen has joined #lisp
graphene has quit [Remote host closed the connection]
suskeyhose has joined #lisp
graphene has joined #lisp
rozenglass has joined #lisp
lavaflow_ has joined #lisp
varjag has quit [Ping timeout: 252 seconds]
<mfiano>
Xach: No. I mentioned I only have write access to lispgames repositories. I sent a PR to failproofshark
varjag has joined #lisp
<phoe>
gah
<phoe>
I wish I could destructure vectors
<Shinmera>
I have an implementation of destructuring-bind that you could adapt to do so I guess.
<pjb>
phoe: easy to define such a macro…
<pjb>
Remember if you write in lisp, it's because the fun there is in writing such macros!
sauvin has quit [Remote host closed the connection]
Bronsa has quit [Ping timeout: 245 seconds]
<scymtym>
optima/trivia support it out-of-the-box (and much more): (optima:match #(1 2 3 4) ((optima:vector* 1 b c) (list b c))) => (2 #(3 4))
lavaflow_ has quit [Ping timeout: 246 seconds]
<oni-on-ion>
=/
<phoe>
scymtym: yep, I was thinking of using optima
<phoe>
but then I realized my case is so trivial that I'd rather write three LET clauses than complicate my code with external dependencies
<pjb>
(let ((v (vector 1 2 3))) (symbol-macrolet ((a (aref v 0)) (b (aref v 1)) (c (aref v 2))) (+ a b c))) #| --> 6 |#
pierpal has quit [Read error: Connection reset by peer]
<pjb>
(let ((v (vector 1 2 3))) (symbol-macrolet ((a (aref v 0)) (b (aref v 1)) (c (aref v 2))) (values (+ (incf a) (incf b) (incf c)) v))) #| --> 9 ; #(2 3 4) |#
meepdeew has joined #lisp
noobly has joined #lisp
pierpal has joined #lisp
xrash has quit [Remote host closed the connection]
megalography has quit [Quit: Leaving.]
rtypo has joined #lisp
graphene has quit [Read error: Connection reset by peer]
graphene has joined #lisp
nika has quit [Quit: Leaving...]
Khisanth has quit [Ping timeout: 240 seconds]
kooga has quit [Quit: :]
meepdeew has quit [Remote host closed the connection]
orivej has joined #lisp
Khisanth has joined #lisp
<whartung>
so, for server programs, is it pretty common to have a high level handler-case on condition to catch any rogue conditions that wraps a handler-bind on condition to dump a stack trace?
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
dyelar has quit [Quit: Leaving.]
<White_Flame>
sure, have it as a thread launch utility
<White_Flame>
and integrate it with your general application logging facility
<Shinmera>
S-expressions existed well before the 90s and are not structurally equivalent to the absolute mess that is XML
<no-defun-allowed>
*needlessly reinvented s-exprs
<makomo>
no-defun-allowed was talking of the reverse, no? -- that xml is just a shitty "90s variant" of sexps
<Shinmera>
xml is not a reinvention
<Shinmera>
it's completely unrelated
<no-defun-allowed>
Okay then
<makomo>
how are the two ideas not related? both structure information in a tree-like manner
<Bike>
that's kind of broad.
<makomo>
true i guess, but my point is that they're not that far apart
<no-defun-allowed>
What systems can I use to balance animals on rakes?
<Shinmera>
s-exprs are fundamentally about lists or cons-cells. XML is about "objects"
<dlowe>
file systems are just binary on-disk s-expressions
moriarty has joined #lisp
<makomo>
no-defun-allowed: maybe you can look into Ethereum. last time i checked Barski was involved in Clojure and Ethereum
<Shinmera>
they're not related beyond being data formats
<dlowe>
memory heaps are just s-expressions of bytes
moriarty has left #lisp [#lisp]
vlatkoB has quit [Remote host closed the connection]
<Bike>
sml is based on sgml, which was apparently based on something called gml, which is for some intel word processor ish thingamajig from 1969. learning things today...
rumbler31 has joined #lisp
<no-defun-allowed>
makomo: I see, do I have to buy weaselrakecoin first?
lavaflow_ has quit [Ping timeout: 272 seconds]
<no-defun-allowed>
That sounds quite complicated for the task but I guess that's how people do programs now