red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
dale_ has joined #lisp
dale has quit [Disconnected by services]
dale_ is now known as dale
oxum has joined #lisp
buffergn0me has quit [Ping timeout: 240 seconds]
red-dot has joined #lisp
bitmapper has quit [Ping timeout: 258 seconds]
dominic34 has quit [Ping timeout: 256 seconds]
space_otter has joined #lisp
oxum has quit [Ping timeout: 256 seconds]
dominic34 has joined #lisp
Harag` has joined #lisp
Harag has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
papachan has quit [Quit: Leaving]
karswell has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
gaqwas has quit [Ping timeout: 246 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
MidHotaru has quit [Quit: Connection closed for inactivity]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
stoneglass has quit [Quit: stoneglass]
akoana has left #lisp ["Leaving"]
wxie has quit [Ping timeout: 260 seconds]
JohnTalent has joined #lisp
Bike has quit [Quit: leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rumbler31 has quit [Remote host closed the connection]
libertyprime has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
kamid has quit [Ping timeout: 246 seconds]
dominic34 has quit [Ping timeout: 246 seconds]
karswell_ has joined #lisp
karswell has quit [Remote host closed the connection]
jesse1010 has quit [Ping timeout: 265 seconds]
vhost- has quit [Quit: WeeChat 2.8]
kinope has joined #lisp
<beach>
Good morning everyone!
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
kinope^ has joined #lisp
gxt___ has joined #lisp
<kinope>
Afternoon :)
oxum has quit [Remote host closed the connection]
Oladon has joined #lisp
red-dot has joined #lisp
gxt__ has quit [Ping timeout: 240 seconds]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 265 seconds]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
JohnTalent has quit [Quit: leaving]
quazimodo has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
libertyprime has quit [Remote host closed the connection]
wxie has joined #lisp
solrize has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 240 seconds]
wxie has quit [Ping timeout: 260 seconds]
shka_ has joined #lisp
oxum has quit [Remote host closed the connection]
<kinope^>
The reason my code didn't run as intended yesterday was because I mistakenly assumed that a symbol that was being passed to a method was free, as if it didn't belong to any package but also all packages simultaneously. I have read some of the spec now, so am I correct in saying that a symbol will always be interned in one or more packages? A symbol
<kinope^>
cannot be 'free' since if it is mapped to no packages then it is considered uninterned. I've internalised the use of (in-package ...) without realising that it is just a convenience function so that symbols may be referrenced by name without the package prefix. I think I may resist the urge to use (in-package ...) until I have a better appreciation
<kinope^>
of the rules, what do you think? So, when a method is created that 'eql' specialises(?) on a symbol, the package of the symbol used in the definition becomes a part of the test because the symbol is not 'free', the actual symbol complete with package prefix is expected to be supplied to the method. If one were to only provide a symbol name then the
<kinope^>
reader would fill in the blank by prefixing it with the current package, therefore creating unintended results if the generic function was called from another package under the same conditions.
oxum has joined #lisp
<White_Flame>
a "free" symbol is typically denoted by #:NAME
<White_Flame>
and has no package
<White_Flame>
they're typically called 'gensym's after the function often used to create them
<White_Flame>
from the reader input, if you do (list '#:foo '#:foo), the 2 symbols generated will not be EQ, as they're not interned
<White_Flame>
macros often create placeholder symbols for use in (LET ((,var ,expr)) ...), and use GENSYM for the purpose of making them unique
<kinope^>
Okay, so you couldn't use them in an eql specialiser as they will not match?
<White_Flame>
unless you pass them around by value, correct
<White_Flame>
eg (defvar *my-symbol* (gensym))
<White_Flame>
but that can easily go pear-shaped if you're not careful
<White_Flame>
and when comparing symbols, EQL is the same as EQ. It must be the same symbol object instance.
<White_Flame>
regardless of package or anything else
<kinope^>
I'll stay away from doing that then, things always seem to go pear-shaped atm, haha
<White_Flame>
packages just generally ensure that the same name (within that reader context) always yields the same symbol object
<White_Flame>
literally a symbol table
<kinope^>
I'm aware of the different grades of equality predicates just not the specifics, I'll try to remember that.
<kinope^>
okay thanks
<kinope^>
_death fixed me up with using keywords as a good way to refer to the same symbol across package boundaries, but if I knew what i was doing it seems like if I just specified the symbol with the correct prefix then that would have worked too.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
bocaneri has joined #lisp
karswell_ has quit [Ping timeout: 246 seconds]
<White_Flame>
kinope^: correct, and/or had the proper import/use clauses set up in your package
<White_Flame>
*defpackage
<kinope^>
I should get more familiar with defpackage and the basics of lisp, It would have saved me a real headache.
<kinope^>
common lisp*
<aeth>
Keywords are usually used for this sort of thing, I think.
<kinope^>
Sure, just making sure I understand the consequences fully
<aeth>
So you could use string= to make the package not matter with a symbol, but then you're doing a string comparison
<aeth>
I wonder if this is what macros like LOOP tend to use internally
<White_Flame>
aeth: the core of the usage seems to be EQL specializers on symbols in method slots
dominic34 has joined #lisp
<aeth>
ah, OK
<aeth>
I think I remember skimming over that conversation a while back now
dominic34 has quit [Ping timeout: 265 seconds]
oxum has quit [Remote host closed the connection]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
oxum has joined #lisp
efm has quit [Read error: Connection reset by peer]
bhartrihari has joined #lisp
Christ0pher has joined #lisp
pi____ has joined #lisp
nikkal has joined #lisp
grewal has quit [Ping timeout: 264 seconds]
grewal has joined #lisp
_whitelogger has joined #lisp
rumbler31 has joined #lisp
oxum has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
dddddd has quit [Ping timeout: 265 seconds]
CEnnis91 has quit [Quit: Connection closed for inactivity]
shka_ has quit [Ping timeout: 256 seconds]
efm has joined #lisp
shangul has joined #lisp
oxum has quit [Remote host closed the connection]
pve has joined #lisp
bsd4me has quit [Remote host closed the connection]
oxum has joined #lisp
gravicappa has joined #lisp
oxum has quit [Ping timeout: 256 seconds]
nikkal has quit [Quit: Konversation terminated!]
nikkal has joined #lisp
red-dot has joined #lisp
<sveit>
does anybody know if it is possible in SBCL to view foreign memory (given a pointer to it in the FFI) as an array (the reverse is possible by pinning the array)?
Christ0pher has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
oxum has joined #lisp
shifty has joined #lisp
nikkal has quit [Quit: Konversation terminated!]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
libertyprime has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Ping timeout: 256 seconds]
<phoe>
sveit: AFAIK nope.
bhartrihari has joined #lisp
slyrus__ has joined #lisp
sdumi has quit [Ping timeout: 256 seconds]
sdumi has joined #lisp
oxum has joined #lisp
slyrus_ has quit [Ping timeout: 246 seconds]
<pi____>
anyone using asdf:make to build their project ? How long it will take to build simple project on your machine's configuration ? On my humble 700 MHZ raspberry pi it is taking time to build hello-world project.
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<pi____>
i can see it is compiling file .quicklisp/dist.... path. Or it is first time thing only ?
karlosz has quit [Quit: karlosz]
jbayardo has joined #lisp
oxum has quit [Ping timeout: 265 seconds]
jbayardo has quit [Ping timeout: 240 seconds]
narimiran has joined #lisp
kinope has quit [Quit: Connection closed for inactivity]
oxum has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
oxum has quit [Ping timeout: 246 seconds]
RedMallet has joined #lisp
sdumi has joined #lisp
Oladon has quit [Quit: Leaving.]
_whitelogger has joined #lisp
oxum has joined #lisp
Oladon has joined #lisp
karayan has quit [Ping timeout: 260 seconds]
Oladon has quit [Client Quit]
cosimone has joined #lisp
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
cosimone has quit [Client Quit]
cosimone has joined #lisp
Christ0pher has quit [Ping timeout: 264 seconds]
pyx has joined #lisp
Christ0pher has joined #lisp
pyx has quit [Client Quit]
space_otter has quit [Remote host closed the connection]
karayan has joined #lisp
orivej has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #lisp
Inline has joined #lisp
rgherdt has joined #lisp
Inline has quit [Quit: Leaving]
larsen has quit [Read error: Connection reset by peer]
oxum has quit [Ping timeout: 256 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
edgar-rft has quit [Quit: Leaving]
RedMallet has quit [Quit: WeeChat 2.6]
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
oxum has joined #lisp
whiteline has quit [Remote host closed the connection]
Christ0pher has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
Christ0pher has joined #lisp
whiteline has joined #lisp
oxum has quit [Ping timeout: 240 seconds]
kaftejiman has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
sdumi has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
You should expect a 20x or so slowdown on the Raspberry Pi (2?)
<no-defun-allowed>
Yes, it'll only have to compile files once after they're changed.
drdee has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
oxum has joined #lisp
<kinope^>
Sounds like the Raspberry Pi B model I have one its 700MHz but I read somewhere that real world performance puts it closer to 300MHz. Dug it out the other day to put a Lisp on it for a makeshift dev environment until I realised it moves about as quick as a sloth. and is only single core.
drdee has quit [Client Quit]
orivej has joined #lisp
<no-defun-allowed>
That makes no sense, because there are many Raspberry Pi B models (one for every "generation", bar the Zero), and "it goes slower" isn't quantifiable using a clock frequency.
<no-defun-allowed>
The 1B? Granted, SBCL on 32-bit ARM is only single threaded, and then ASDF compilation is usually serial.
<White_Flame>
and of course file i/o will be abysmally slow, too
<no-defun-allowed>
Yeah, the (externally powered) external hard drive I have is about 3x faster than the SD card I have; but it is a relatively slow SD card.
<no-defun-allowed>
"On the CPU level the performance is similar to a 300 MHz Pentium II of 1997–99"?
<kinope^>
Yeah 1B, I was working on a lock free queue at the time. I wouldn't have been able to truly test the data structure with only one thread of execution
<no-defun-allowed>
That is also not a very precise metric.
<kinope^>
Apparently so
<no-defun-allowed>
Do you have another computer to write programs on?
<kinope^>
I brushed the dust of my old laptop and am using it now, works just fine although it's chaind to the desk as the battery is shot
karayan has quit [Ping timeout: 244 seconds]
karayan has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
karayan has quit [Read error: Connection reset by peer]
<kinope^>
I think the MHz thing is because the graphics processor and the cpu are stacked together 700Mhz is the clock cycle of the SOC. I imagine the cpu takes more clock cycles to perform an operation compared to other designs(?) GHz and MHz aren't really much better as a metric when comparing older cpu designs to newer ones. It's like an apples to oranges
<kinope^>
comparison.
epony has quit [Read error: Connection reset by peer]
<White_Flame>
the arm & the gpu are separate systems on those chips
* no-defun-allowed
scratches head
karayan has joined #lisp
rumbler31 has joined #lisp
<kinope^>
I'm going to be the first to admit that I'm not qualified to have an opinion on these matters.
<no-defun-allowed>
The "MHz thing" is because the two have vastly different designs and execution, so the author estimated that the Raspberry Pi could accomplish as much in 700 cycles as a Pentium 2 could in 300.
sdumi has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
epony has joined #lisp
karayan has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
<kinope^>
It sounds like the pi chip does the same amount of work in the same time but with far more cycles, what is it spending those cycles on?
nikkal has joined #lisp
<White_Flame>
pentiums were long doing out-of-order execution and such then, the arm core is probably still in-order
<no-defun-allowed>
Possibly in having a shorter pipeline, and thus being able to do fewer steps in executing an instruction in parallel.
<kinope^>
ah
<no-defun-allowed>
Either way, you sort of have the problem of giving the processor as much work to do as possible per cycle. If I really wanted to, I could fab a processor that did noting every cycle, and it wouldn't be "spending" those cycles on anything.
sdumi has quit [Ping timeout: 265 seconds]
<kinope^>
So I guess that MHz really isn't a good indication of the true work done, not that you said so, I'm just talking out loud. I think I'm getting a little off topic now.
<no-defun-allowed>
Sure.
<phoe>
minion: memo for shka: If you're able to give me an abstract today, I'll be able to announce it during today's mail that moves the Lisp meeting
<minion>
Remembered. I'll tell shka when he/she/it next speaks.
random-nick has joined #lisp
epony has quit [Quit: reconfig]
sdumi has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
narimiran has quit [Quit: leaving]
orivej has quit [Quit: No Ping reply in 180 seconds.]
epony has joined #lisp
orivej has joined #lisp
Necktwi has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
Inline has joined #lisp
RedMallet has joined #lisp
RedMallet has quit [Client Quit]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
sdumi has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
karayan has joined #lisp
<no-defun-allowed>
Is there a declaration I can use to provide types for the return values of a generic function? SBCL appears to clobber any FTYPE proclamations before or after a DEFGENERIC form with its own, at the least.
sdumi has quit [Ping timeout: 256 seconds]
sdumi has joined #lisp
shangul has quit [Ping timeout: 246 seconds]
kinope has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
<_death>
you can have a declare field in the defgeneric
<no-defun-allowed>
Sure, but none seem to pertain to declaring the return type(s) of the generic function.
orivej has quit [Quit: No Ping reply in 180 seconds.]
<no-defun-allowed>
none→no allowed declarations
orivej has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
shangul has joined #lisp
<_death>
right.. when they worked on the standard there was also a VALUES declaration.. so there was code declaring argument types using TYPE and return value types using VALUES
<_death>
at some point VALUES got removed (I need to find discussion, if any..) but maybe your implementation has something
<_death>
well, the VALUES declaration only declared the number of return values
<no-defun-allowed>
First thing that comes to mind is if (locally (declare (values <type>)) <form>) would be (the <type> <form>), and/or if it would make sense at all.
<no-defun-allowed>
Oh.
<_death>
wait, no.. it was value types.. morning :/
<_death>
sbcl seems to only handle optimize
orivej_ has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
orivej has quit [Ping timeout: 240 seconds]
<_death>
I wonder why it doesn't handle TYPE at least
sdumi has quit [Ping timeout: 246 seconds]
sdumi has joined #lisp
sabrac has quit [Quit: Konversation terminated!]
<_death>
I guess type declarations for defgeneric may seem useful at one point in time and too constraining at a later point.. so not much effort went to preserve them
cmack has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 260 seconds]
cmack has joined #lisp
orivej has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
dyelar has quit [Quit: Leaving.]
Christ0pher has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<Josh_2>
Afternoon
sdumi has joined #lisp
ggole has joined #lisp
sdumi has quit [Read error: Connection reset by peer]
<beach>
Hello Josh_2.
sdumi has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
<Josh_2>
How are things with you beach ?
<beach>
Excellent, thank you. This morning I found a better technique for FIND-SYMBOL in the CL package. You?
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Read error: Connection reset by peer]
oxum has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
orivej_ has joined #lisp
<Josh_2>
Yes I am good thanks. Just working on a few projects like ya do
jw4 has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
krid` has joined #lisp
Bourne has quit [Ping timeout: 260 seconds]
krid has quit [Ping timeout: 246 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
TwoNotes has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Ping timeout: 246 seconds]
Christ0pher has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #lisp
X-Scale` has joined #lisp
heisig has joined #lisp
X-Scale has quit [Ping timeout: 264 seconds]
X-Scale` is now known as X-Scale
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
X-Scale` has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
krid` is now known as krid
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
cosimone_ has joined #lisp
cosimone has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
oxum has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
nikkal has quit [Ping timeout: 240 seconds]
oxum has quit [Ping timeout: 264 seconds]
EvW1 has quit [Ping timeout: 260 seconds]
mdr_ has quit [Quit: leaving]
bitmapper has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
heisig has quit [Quit: Leaving]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
gxt___ is now known as gxt
oxum has joined #lisp
sz0 has joined #lisp
nikkal has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
rumbler31 has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
ArthurStrong has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
EvW has joined #lisp
sdumi has quit [Ping timeout: 258 seconds]
nicktick has quit [Ping timeout: 246 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
liberliver has joined #lisp
Christ0pher has joined #lisp
liberliver1 has joined #lisp
liberliver has quit [Ping timeout: 264 seconds]
liberliver1 is now known as liberliver
Christ0pher has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
orivej has joined #lisp
gravicappa has quit [Ping timeout: 265 seconds]
nabataeus has joined #lisp
dominic34 has joined #lisp
cosimone_ has quit [Quit: Quit.]
Jeanne-Kamikaze has joined #lisp
EvW has quit [Ping timeout: 272 seconds]
sdumi has joined #lisp
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
Christ0pher has quit [Ping timeout: 265 seconds]
Christ0pher has joined #lisp
sdumi has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
doublex has quit [Ping timeout: 260 seconds]
knuckles has joined #lisp
liberliver has quit [Ping timeout: 246 seconds]
sjl has quit [Ping timeout: 258 seconds]
edgar-rft has joined #lisp
karayan has quit [Ping timeout: 260 seconds]
dominic34 has quit [Ping timeout: 260 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
pi____ has quit [Quit: leaving]
sdumi has joined #lisp
rumbler31 has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
EvW has joined #lisp
karayan has joined #lisp
efm has quit [Quit: Konversation terminated!]
theseb has joined #lisp
akoana has joined #lisp
<theseb>
If a lisp compiler has an *intermediate format*...doesn't that mean you actually have TWO compilers?....you need 1st compiler to go from source -> intermediate form....and you need 2nd compiler to go from intermediate form to assembly/machine code yes?
oxum has quit [Remote host closed the connection]
<TwoNotes>
If the intermediate format is internal to the compiler, it does not matter. I have developed compilers, and various intermediate steps are not uncommon.
<beach>
theseb: There can be several different intermediate formats, each one lending itself to a particular set of transformations. You may call each STEP a compiler if you like, but typically, there is not much syntax and semantic analysis in the intermediate steps, since the compiler writer has complete control of what is generated during previous steps.
oxum has joined #lisp
<theseb>
In case you wondering why i care... well i'm *writing* a compiler....so i was trying to ask a guru for confirmation that i'm not crazy when i noticed i really need 2 compilers! ;)
<theseb>
beach: good point
<theseb>
beach: so those follow on extra "compilers" won't be so hard to write
<theseb>
i like that
<beach>
theseb: For example, SICL uses a Cleavir-based compiler. It transforms the text to a Concrete Syntax Tree (CST), then the CST to an Abstract Syntax Tree (AST), then to High-level Intermediate Representation (HIR) then to Medium-level Intermediate Representation (MIR) then to Low-level Intermediate Representation then to "assembly" in the form of Cluster code, then to machine code.
<beach>
theseb: You can write a one-pass compiler if you like, but it won't produce very good code.
<beach>
theseb: Maybe you should read up on compiler design before you start writing a compiler?
<theseb>
beach: i have some.....i never heard of a CST...interesting..i know about ASTs
oxum has quit [Ping timeout: 240 seconds]
<beach>
I recommend the book by Muchnick.
Lycurgus has joined #lisp
<theseb>
beach: i don't how you learned about compilers...what about this...read a little...code a little...IRC a little....rinse and repeat
<TwoNotes>
Lexical scan, macro processing, syntax, parse-tree, code-motion-optimizations, register allocation, parallelism, code genration, peephole optimizer. LOTS of steps in a modern compiler
Lycurgus has left #lisp [#lisp]
<theseb>
beach: what i want to avoid is "read for 5 years and not code anything" this time
<beach>
theseb: Sure, that's fine. But you should probably spend a week skimming the table of contents of a few books.
OpenZen has joined #lisp
bocaneri has quit [Ping timeout: 260 seconds]
<beach>
theseb: The terminology varies a bit. In Cleavir and SICL, a CST is Common Lisp forms wrapped in standard objects for source tracking. The AST is the result of "minimal compilation" as defied by the standard. HIR/MIR/LIR are traditional instruction graphs at different levels. Cluster assembly is a linear sequence of standard objects representing instructions.
cosimone has joined #lisp
Jesin has joined #lisp
<beach>
Anyway, I'm off to spend time with my (admittedly small) family. Good luck.
gaqwas has quit [Remote host closed the connection]
makomo has joined #lisp
<aeth>
theseb: Two sounds pretty low, you can have as many as you want, as beach said.
<theseb>
right
nikkal has quit [Ping timeout: 240 seconds]
<aeth>
Two might actually be the minimum for a modernish compiler.
bocaneri has joined #lisp
Christ0pher has quit [Ping timeout: 264 seconds]
Christ0pher has joined #lisp
oxum has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
kaftejiman has quit [Remote host closed the connection]
<aeth>
_death: SBCL has VALUES, but it's hard to get right. A function FOO that takes nothing in and returns e.g. (values 1 2) might have a DECLAIM like this: (declaim (ftype (function () (values integer integer &optional)) foo))
<aeth>
The &optional is required or else it will permit extra return values at the end.
shangul has quit [Ping timeout: 265 seconds]
<aeth>
Declaring the return types is probably the biggest conciseness gain for using a macro like my DEFINE-FUNCTION (unfortunately, not quite ready for general use) vs. writing plain CL.
<Bike>
based on sbcl's somewhat bizarre interpretation of the standard
<Bike>
the problem is that the CLHS pages for THE and the VALUES type contradict each other badly
<Bike>
sbcl resolves it by saying if there are no lambda list keywords it's like THE says, and otherwise it's like VALUES says
<aeth>
Oh, and the check-type form of my DEFINE-FUNCTION for return value checking is even worse because you need to m-v-b the return values to intermediate gensyms and then run CHECK-TYPE on them.
random-nick has quit [Quit: quit]
<aeth>
So no matter which style you use, a macro is more concise than doing it the proper way...
rumbler31 has joined #lisp
random-nick has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
efm has joined #lisp
Christ0pher has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
epony has quit [Ping timeout: 258 seconds]
dominic34 has joined #lisp
<flip214>
is there a (declare (not-special )) as well?
<_death>
aeth: you're right that ftype declarations are very tricky.. in fact there are several projects in quicklisp that get them wrong and sbcl gives warnings, but I suppose their authors didn't know because of quicklisp non-verbosity.. but earlier we were discussing a values declaration, not the values typespec
<Bike>
flip214: no, but if a special declaration is local, then a new binding will shadow that
<flip214>
Bike: thanks... I have a globally special, but I'd like to re-use the symbol for a non-special variable.
<Bike>
can't do it.
<flip214>
I'll try a local symbol-macro.
<Bike>
"If an attempt is made to bind a symbol that is defined as a global variable, an error of type program-error is signaled."
<phoe>
flip214: DECLARE LEXICAL was rejected by X3J13
<Bike>
oh, as a proclamation it would be more like defglobal or summat
<Bike>
which seems to be the issue here
<phoe>
"There is no way to locally override or globally undo a SPECIAL proclamation."
<Bike>
yup
<flip214>
The use of symbol-macrolet can be shadowed by let. In other words, symbol-macrolet only substitutes for occurrences of symbol that would be in the scope of a lexical binding of symbol surrounding the forms.
<flip214>
thanks anyway!
Oladon has quit [Quit: Leaving.]
joels has joined #lisp
<_death>
so far some of the saildart messages I've been reading were quite insightful.. and some entertaining.. for example when symbol-macrolet was discussed, Guy Steele proposed a number-macrolet... so (number-macrolet ((6 'hi)) (list 6 '6)) => (HI 6) ;)
orivej has quit [Quit: No Ping reply in 180 seconds.]