zoglesby has quit [Remote host closed the connection]
usermain has joined #commonlisp
yauhsien has joined #commonlisp
tyson2 has joined #commonlisp
zacque has joined #commonlisp
Madsy has joined #commonlisp
karlosz has joined #commonlisp
livoreno has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
phantomics has quit [Ping timeout: 240 seconds]
pjb has quit [Ping timeout: 260 seconds]
karlosz has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
Inline has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
poselyqualityles has joined #commonlisp
usermain has quit [Quit: Quit]
yauhsien has joined #commonlisp
karlosz has joined #commonlisp
yauhsien has quit [Ping timeout: 272 seconds]
Guest52 has joined #commonlisp
<Guest52>
Hey there, is there a way to get the line number of a source file during macro expansion time?
<Guest52>
I'd like to write a dead simple macro that spits out the line number it's on
<masinter>
macro expansion happens at a different time than read/load
<Guest52>
ah, then I guess I mean read time
<masinter>
by the time you get to a macro expansion there aren't any lines
<zacque>
How can I use cl-ppcre to match newline character with "." operator?
<zacque>
Something like "/s" modifer? But I couldn't get it to work
<Guest52>
masinter: yeah, so read time would be the time to store a line number? I'm lost as to how to go about doing so
<masinter>
why do you need a line number anyway? who counts lines?
<beach>
Good morning everyone!
kevingal has quit [Remote host closed the connection]
<Guest52>
mastinter: it's not a REAL reason. A friend mentioned they wanted a language feature where they can write something like `@@@' and have it print the line number. I know it's dumb for lisp anyway because of slime & whatnot.
<Guest52>
I just wanted to show them how lisp lets you alter the language to do such things (but alas my knowledge can't prove it)
<Guest52>
s/mastinter/masinter/
waleee has quit [Ping timeout: 256 seconds]
eddof13 has joined #commonlisp
<masinter>
i don't know anything about slime
semz_ has joined #commonlisp
poselyqualityles has quit [Ping timeout: 256 seconds]
semz has quit [Ping timeout: 256 seconds]
<pillton>
Guest52: SBCL has the macro (SB-EXT:COMPILE-FILE-LINE).
yauhsien has joined #commonlisp
Bike has joined #commonlisp
<Guest52>
pillton: ah, that's neat! thanks
<pillton>
Guest52: I don't think it matters whether it is a macro or a reader macro as both still need to interact with the environment which is processing the file.
lisp123 has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
occ has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
attila_lendvai has quit [Ping timeout: 260 seconds]
eddof13 has joined #commonlisp
ssafar has quit [Ping timeout: 272 seconds]
ssafar has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
Guest52 has quit [Quit: Client closed]
yauhsien has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
pjb has joined #commonlisp
yauhsien has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frgo has quit [Ping timeout: 246 seconds]
yauhsien has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #commonlisp
treflip has joined #commonlisp
yauhsien has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
rotateq has joined #commonlisp
Oddity has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
shka has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
Josh_2 has joined #commonlisp
<Josh_2>
CLHS entry a day on email list
<Josh_2>
that would be cool
<flip214>
Josh_2: better clus... reading one, extending one
<beach>
Josh_2: I don't understand what you are suggesting.
<beach>
Did I miss something?
<Josh_2>
No you didn't miss anything
<Josh_2>
I think it would be cool to send a link to a random CLHS article each day via email
<rotateq>
ehm
<Josh_2>
If you are allowed to do that, then sure
<pjb>
Josh_2: not a link, but the contents directly in the email.
Cymew has joined #commonlisp
<jackdaniel>
or even not the directly but by an intermediate
MajorBiscuit has joined #commonlisp
<pjb>
Josh_2: you are allowed to do it, if you do it locally :-)
<pjb>
Josh_2: so now, we have the specs: write a crontab CL program that selects a random clhs page, format it, and send it to yourself by email.
<jackdaniel>
or even not by email but by snailmail, and not the spec but a random cookie
<pjb>
With a little robot, yes, you can send random cookies. Subscribe to monthly cookie boxes from Japan, and let the robot hand unpack them and forward them one per day.
treflip has quit [Remote host closed the connection]
<rotateq>
Yesterday I thought again on something, about how to build something on top to maybe define compiler macros more modularly if needed.
<rotateq>
So that it collects part definitions and puts them together in the final macro.
<hayley>
What sort of "parts" would you use for a compiler macro?
<rotateq>
For mathematical definitions such as identities.
<rotateq>
Just playing around in my head from what I had last year.
<hayley>
Right. So you propose generating compiler macros from rewrite rules?
<rotateq>
maybe yes
<rotateq>
many possibilities of course so don't take it too seriously :)
<hayley>
Well, most of the efficiency of my regular expression compiler comes from clever application of rewrite rules.
<rotateq>
macros are anyway nice as we don't have to define everything verbose, like when it's commutative if a thing for fulfilling the identity even is something simple as '(1+ x) or '(+ 1 x) or '(+ x 1)
<rotateq>
hayley: nice, can learn much from that
X-Scale has quit [Ping timeout: 272 seconds]
Oddity has quit [Ping timeout: 246 seconds]
nature has joined #commonlisp
occ has quit [Ping timeout: 260 seconds]
treflip has joined #commonlisp
trocado has quit [Ping timeout: 260 seconds]
<dbotton>
is there a way to force a new recompile of packages in quicklisp?
<dbotton>
found cache, nevermind
<Nilby>
dbotton: If it's already downloaded there's :force t and :force :all to asdf:load-system
mon_aaraj has quit [Ping timeout: 250 seconds]
<dbotton>
thanks
mon_aaraj has joined #commonlisp
amk has quit [Ping timeout: 240 seconds]
amk has joined #commonlisp
amk_ has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.4]
s-liao has joined #commonlisp
mon_aaraj has quit [Ping timeout: 250 seconds]
MajorBiscuit has joined #commonlisp
mon_aaraj has joined #commonlisp
OlCe`` has quit [Remote host closed the connection]
dec0d3r has joined #commonlisp
ssafar has quit [Ping timeout: 260 seconds]
occ has joined #commonlisp
OlCe has joined #commonlisp
ssafar has joined #commonlisp
s-liao has quit [Ping timeout: 250 seconds]
yauhsien has quit [Remote host closed the connection]
<hayley>
Yes, if you replace all the bad things in a bad diagram with good things, then you get a good diagram.
<Nilby>
i think it would mostly just require a SPIR-V backend to some CL
<hayley>
I think drmeister mentioned a Cleavir to OpenCL(?) pass in a talk, still, but he said it didn't get very far. So far I'm beginning to prefer APL for array munging though; and having a pure language probably helps for optimisations around parallelism and loop fusion.
<random-nick>
isn't it more appropriate to generate kernel code from some DSL than to compile CL to kernel code?
<hayley>
Auto-vectorisation for C is just plain scary, honestly. And I don't think CL fares better there.
<random-nick>
since existing CL code probably isn't appropriate for running on the GPU
<Nilby>
If the DSL can just be like this: (if (> (mod y 100) 50) (if (> (mod x 100) 50) (px .5 0 0) (px .5 .5 .5)) (a x y\
<Nilby>
))
<Nilby>
then sure
<hayley>
I don't see why SICL or SBCL compiler hackers would be useful for another DSL.
kevingal has quit [Ping timeout: 260 seconds]
kevingal_ has joined #commonlisp
<hayley>
There are also two ports of Petalisp on GPGPU, which is a sort of array munging DSL, though mine is awful and isn't faster than CPU still.
<random-nick>
hmm, I wonder, would it be possible to hook up april and petalisp together?
<Nilby>
most of CL can run on the GPU just fine, just leave out File(names)/System Contruction/Environment
semz_ is now known as semz
<hayley>
Anything involving branching and pointers will be slow enough that you shouldn't bother.
<random-nick>
don't GPUs really don't like many staples of CPU programming such as branching and function calls?
<hayley>
Garbage collection on a GPU would be interesting in a terrifying way, too.
<hayley>
random-nick: Branching more than function calls. I think it's called "wavefront divergence".
mon_aaraj has quit [Ping timeout: 272 seconds]
<Nilby>
ok, but it's allready done for C++ code which has all that
mon_aaraj has joined #commonlisp
<random-nick>
from what I understand it's really a small subset of c++, at least in the case of opencl
<Nilby>
unfortunately I feel like the % of silicon CL can run on will keep steadily decreasing unless someone does CL targeting the GPU/FPGA/DSP/Tensor etc. now I can use less the .5 the compute power in any typical system
<hayley>
GPUs are quite bad for general purpose computing though. It's only a tiny bit of compute if you measure by peak FLOPS, or something like that.
s-liao has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
<hayley>
I write GPGPU code occasionally, but that is only when the only appropriate algorithm is a "brute force" algorithm, or is purely numeric. Note that very little of what I do is purely numeric.
<hayley>
And, to my knowledge, the only exposed interface for tensor hardware is purely dataflow. So C++ is equally hopeless for that.
aeth has joined #commonlisp
frgo has joined #commonlisp
phantomics has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
kevingal has joined #commonlisp
yauhsien has joined #commonlisp
kevingal_ has quit [Ping timeout: 252 seconds]
* Nilby
sighs in *Lisp
kevingal has quit [Remote host closed the connection]
yauhsien has quit [Ping timeout: 246 seconds]
yauhsien has joined #commonlisp
wacki has quit [Quit: Leaving.]
wacki has joined #commonlisp
livoreno has quit [Ping timeout: 260 seconds]
Bike has joined #commonlisp
prxq has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
luis has quit [Ping timeout: 252 seconds]
cage has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 272 seconds]
treflip has quit [Remote host closed the connection]
rotateq has quit [Remote host closed the connection]
ec has quit [Quit: ec]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
lispy has joined #commonlisp
tyson2 has joined #commonlisp
s-liao has quit [Quit: Client closed]
yauhsien has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
waleee has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rawley has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
eddof13 has joined #commonlisp
<Josh_2>
Is there a good tutorial on writing a DSL anywhere?
<Josh_2>
With reader macros
yauhsien has joined #commonlisp
<Guest74>
depends on what you mean by dsl. There's that morse code video.
<beach>
I suspect Josh_2 doesn't want a DSL with S-expression surface syntax. But then, all the advantages of that syntax are lost.
<Josh_2>
^
<beach>
As in "but my users can't be taught to use that syntax!".
<Josh_2>
Nay
<beach>
"Nay" as in "they CAN be taught to use that syntax"?
<beach>
If so, all you need is ordinary macros and On Lisp is a good source for how to do that.
Oddity has joined #commonlisp
mon_aaraj has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
<Guest74>
I figure any text on parsing would be helpful, as that's the missing step between reader macro dsl and normal macros. Then just design your dsl to be easily parsed.
<beach>
The easiest syntax to parse is S-expression syntax, and you can use READ to parse it.
<Guest74>
but some people just have to do it the way they need to do it.
<Guest74>
...to usually learn why they shouldn't have.
<beach>
The creators of Multics Emacs wrote an essay on how it was no big deal to teach admin staff to write Emacs customizations as S-expressions. I think we tend to underestimate what people are capable of.
ec has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.4]
<yitzi>
I've taught Intro Physics students (non-calc based) LaTeX before. Not easy, but it can be done.
<splittist>
Millions of people build Excel spreadsheets that basically work, with no training.
<Guest74>
though I wonder when the parentheses are necessary.
<beach>
Er, READ kind of depends on them.
<Guest74>
do you give people a command interface? or just a repl.
tyson2 has quit [Remote host closed the connection]
<Nilby>
you don't need parens to do a read based repl or dsl
<jackdaniel>
> "Thou shalt do something"
<Guest74>
what's clim's reasoning behind the no parens?
<jackdaniel>
minion> YES
<jackdaniel>
I'm sure that you'd find some parens in clim
heisig has joined #commonlisp
<jackdaniel>
I saw two at the same time the other day
rotateq has joined #commonlisp
<Guest74>
so..., do you know?
<jackdaniel>
do I know what?
<jackdaniel>
why clim provides *also* parsers that do not rely on READ?
<jackdaniel>
well, probably because it is a convenient feature to define interfaces targetting people who are not sex-pression nerds
<Nilby>
Guest74: Typing efficiency. CLIM command input is supposed to support typing the fewest unambiguous letters, space, then arguments, etc..
<Guest74>
who would honestly think I meant clim has no parens whatsoever?
<jackdaniel>
nobody, but it was funny how silly it was phrased
<yitzi>
I thought it was funny.
<Guest74>
nilby: so are they restricted in what they accept/can accept?
<Nilby>
my main repl is parenless for at least 20 years
<Nilby>
Guest74: Usually yes, but of course you can have them take any sexp
<Nilby>
Guest74: the normal listener isn't restricted, but other command inputs are or can be
<Nilby>
like the difference between M-x and M-Esc in emacs
<jasom>
Josh_2: There are many ways to do DSLs with reader macros; an easy way to do an arbitrary (i.e. non-s-expression) DSL is to use reader macros to implement tokenization and then a regular macro to implement parsing and code-gen.
<Guest74>
I've often wondered if I should drop the parens in my turtle-graphics so you can just copy any logo stuff.
<Guest74>
then I think it's a good way to teach sexps.
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guest74>
I don't see how any of the refactoring I've been doing can affect line drawing, but apparently it does. That or another case of losing code between computer transfers after one dies.