amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Inline has quit [Ping timeout: 246 seconds]
luni has quit [Ping timeout: 265 seconds]
galex-713 has quit [Ping timeout: 246 seconds]
galex-713 has joined #lisp
Inline has joined #lisp
galex-713 has quit [Ping timeout: 246 seconds]
galex-713 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
ym has joined #lisp
ym has quit [Remote host closed the connection]
amb007 has joined #lisp
galex-713 has quit [Remote host closed the connection]
ym has joined #lisp
galex-713 has joined #lisp
ym is now known as Guest82407
Guest82407 is now known as yvm
galex-713 has quit [Ping timeout: 246 seconds]
Kingsy_ has left #lisp [#lisp]
mindCrime has quit [Ping timeout: 268 seconds]
isoraqathedh has quit [Quit: WeeChat 2.8]
contrapunctus has left #lisp ["Disconnected: closed"]
random-nick has joined #lisp
contrapunctus has joined #lisp
monkey__ has joined #lisp
toorevitimirp has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
kevingal has joined #lisp
varjag has joined #lisp
rigidus has joined #lisp
cage_ has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
ksierka has quit [Quit: leaving]
attila_lendvai has joined #lisp
monkey__ has quit [Remote host closed the connection]
theothornhill has joined #lisp
luni has joined #lisp
<theothornhill>
Hello! If I have a string, how do I parse out the char code for newline? Ex: (char "Hi!\n" 3) => #\n, and I want (char "Hi!\n" 3) => #\Newline. How do I do that?
mrchampion has joined #lisp
<phoe>
Common Lisp strings don't escape \n the way C does
<phoe>
"\n" is one character long, because \ makes a single escape for the character n
<phoe>
so "\n" === "n"
<phoe>
you may want CL-INTERPOL for interpolating literal strings in your code
<theothornhill>
I don't think I need that, since what I'm doing is parsing a string, and incrementing a value when I reach a "\n". I do the check with (char-code), but now it returns 110 (#\n, as you say), and not 10 (#\Newline)
<beach>
The best thing would be to avoid strings with C-specific syntax, such as this one.
edgar-rft has joined #lisp
<theothornhill>
So how would you get the newline?
<beach>
theothornhill: That's because the string does not contain a newline as phoe pointed out.
<phoe>
this is how you get a *literal* newline in Lisp strings
<phoe>
by, emm, literally making a newline
<theothornhill>
hmm that may actually be good enough by itself!
<phoe>
:D
<beach>
theothornhill: If you write Common Lisp code, there is usually no reason to put C-specific stuff in your strings.
<phoe>
there's this belief that "\n" is the only way of getting newlines inside strings
<theothornhill>
Yeah, I'm not. I'm writing a parser for graphql, and just want to increment the line number when I reach a newline
<Nilby>
or just (format nil "Hi!~c" #\newline)
<phoe>
but you know there is this thing called "Hello
<phoe>
world!"
<phoe>
or what Nilby said
<beach>
Nilby: Or use ~%.
<theothornhill>
So I think it would be good enough to just read a file as a string, then (char file-as-string position) should give me newline when I see one. :fingers-crossed:
<phoe>
sure, that works
<phoe>
mind the windows CRLF stuff, and other than that you should be good
<theothornhill>
Yeah, I think I know how I'd handle that. Was mostly bothered by the \n thing. Thanks :)
<phoe>
:D
davisr_ is now known as davisr
matryoshka has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
dilated_dinosaur has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
dilated_dinosaur has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Inline has quit [Ping timeout: 246 seconds]
cage_ has joined #lisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
kevingal has quit [Ping timeout: 246 seconds]
kevingal_ has joined #lisp
yvm has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
theothornhill has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
attila_lendvai has quit [Ping timeout: 240 seconds]
cantstanya has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
cantstanya has joined #lisp
Helmholtz has joined #lisp
theothornhill has quit [Ping timeout: 268 seconds]
dilated_dinosaur has quit [Ping timeout: 268 seconds]
dilated_dinosaur has joined #lisp
rumbler31 has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
rumbler31 has joined #lisp
theothornhill has joined #lisp
caoliver has joined #lisp
<caoliver>
Any obvious workaround for slime's use of sb-kernel:%simple-fun-next?
<caoliver>
That symbol was excised in 2.1.2. I suppose I could revert.
<phoe>
caoliver: upgrade slime I guess?
<phoe>
I think a fix was pushed
theothornhill has quit [Ping timeout: 265 seconds]
<caoliver>
I just pulled the git. Hang a sec. I may have just installed an old branch. Let me try again.
<phoe>
the current git master gives no hits when searched for simple-fun-next or %simple-fun-next on github
<caoliver>
OK. That's probably what happened. I had a patch to deal with Slackware's version of texinfo.
<caoliver>
I need to cherrypick that.
<caoliver>
errr... rebase
<phoe>
good luck gittin' it to work
theothornhill has joined #lisp
<caoliver>
It lives!
<phoe>
:O
<phoe>
kill it before it lays egg---- I mean, congrats!
<caoliver>
There was a two line patch on the texinfo to cope with missing codequoteundirected and codequotebacktick on Slackware.
<phoe>
ooh, I see
theothornhill has quit [Ping timeout: 268 seconds]
<caoliver>
Upgrading SBCL often means upgrading slime and always maxima.
* caoliver
keeps maxima around 'cos the computer's a better bookkeeper than he is.
<caoliver>
Back during early calc I remember making sign errors copying problems that turned trivial exercises into insoluble problems.
<beach>
caoliver: Have you tried Climaxima?
<caoliver>
No. I use the wxmaxima shell. I'm certainly interested in having SBCL as something to live in rather than just run though.
* caoliver
used to have a 'bolix xl1201 back when dinosaurs roams the earth.
<beach>
As you can perhaps guess, Climaxima uses McCLIM for its rendering.
<caoliver>
roamed
<beach>
loke[m]1 did a lot of work to make it look nice.
<caoliver>
I wish I still had the keyboard, but an idiot tossed it when I wasn't watching.
<caoliver>
It's your personal proj? Cool!
<beach>
Me? No.
* caoliver
should learn more about CLIM.
<caoliver>
Main HLL GUI framework I've hacked on is Morphic under Squeak.
<caoliver>
Anywho, I think I have everything that *was* working working again, so I need to push stuff out to the other boxes.
<beach>
loke[m]1: Do you have a handy link for a Climaxima demo?
<beach>
I was trying to locate a link in the #clim logs, but I failed.
<loke[m]1>
beach apart from the one I posted above, there were a few others that are lost
<phoe>
remember the channel is logged, we can try to find them!
Lycurgus has joined #lisp
<loke[m]1>
They were on a different peertube instance that is down now.
<phoe>
ouch
theothornhill has joined #lisp
toorevitimirp has quit [Quit: Konversation terminated!]
Colleen has quit [Remote host closed the connection]
Colleen has joined #lisp
theothornhill has quit [Ping timeout: 260 seconds]
Sheilong has joined #lisp
semz has quit [Ping timeout: 276 seconds]
dilated_dinosaur has quit [Ping timeout: 265 seconds]
toorevitimirp has joined #lisp
toorevitimirp has quit [Client Quit]
heisig has joined #lisp
theothornhill has joined #lisp
tiwEllien has quit [Ping timeout: 246 seconds]
Nilby has quit [Ping timeout: 258 seconds]
tiwEllien has joined #lisp
supercoven has joined #lisp
zaquest has quit [Read error: Connection reset by peer]
zaquest has joined #lisp
galex-713 has joined #lisp
semz has joined #lisp
imuo has joined #lisp
dilated_dinosaur has joined #lisp
stux|RC has quit [Quit: Aloha!]
elusive has joined #lisp
abhixec has joined #lisp
stux|RC has joined #lisp
skapata has joined #lisp
Lycurgus has quit [Quit: Exeunt]
stux|RC has quit [Quit: Aloha!]
stux|RC has joined #lisp
supercoven_ has joined #lisp
supercoven has quit [Ping timeout: 240 seconds]
user51 has left #lisp [#lisp]
lotuseater has joined #lisp
mindCrime has joined #lisp
luni has joined #lisp
johnjay has quit [Ping timeout: 265 seconds]
unimog has joined #lisp
johnjay has joined #lisp
Josh_2 has joined #lisp
cosimone has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
unimog has quit [Client Quit]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #lisp
srhm has joined #lisp
<beach>
loke[m]1: Thanks! That will do I hope.
<lotuseater>
Hey fellow lispers, long time no see :) Had a question some days ago. DEFINE-COMPILER-MACRO is just for DEFUNs, not for DEFMETHODs, right?
theothornhill has joined #lisp
theothor` has joined #lisp
theothornhill has quit [Remote host closed the connection]
bjorkintosh has quit [Remote host closed the connection]
<semz>
lotuseater: you don't call a specific method, you call the generic function; but afaik compiler macros for generic functions are completely fine.
<lotuseater>
oh cool. but there's not much written about them in general, do you have sources?
<lotuseater>
CLHS and Let over Lambda is in my mind covering that
<semz>
i'm going off clhs 3.2.2.1 here
<semz>
documentation on compiler macros is generally kinda lacking
<lotuseater>
yes but they're most times rarely to use
curtosis[away] has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
motersen has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
epony has quit [Quit: upgrade]
akoana has joined #lisp
epony has joined #lisp
raeda has quit [Read error: Connection reset by peer]
raeda has joined #lisp
JamesLu has quit []
jonatack has quit [Ping timeout: 265 seconds]
jonatack has joined #lisp
amb007 has quit [Ping timeout: 246 seconds]
theothor` has quit [Ping timeout: 240 seconds]
anticrisis has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothor` has joined #lisp
_Ark_ has quit [Ping timeout: 240 seconds]
ark has joined #lisp
theothor` has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 246 seconds]
v3ga has joined #lisp
CrazyPython has joined #lisp
CrazyPython is now known as JamesLu
theothor` has joined #lisp
Inline has joined #lisp
karlosz has joined #lisp
theothor` has quit [Ping timeout: 246 seconds]
karlosz has quit [Client Quit]
monkey__ has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
gaqwas has quit [Ping timeout: 240 seconds]
theothor` has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
karlosz has joined #lisp
notzmv has joined #lisp
theothor` has quit [Ping timeout: 246 seconds]
defaultxr has joined #lisp
<defaultxr>
is it possible in CL to do something like (defun (setf *variable*) (value) ...) to intercept setting of a variable's value? i'm guessing not. basically trying to change a variable into a class slot while preserving backwards compatibility for users of my library
<Xach>
defaultxr: symbol macros, sort of.
<defaultxr>
hmm... will look into this, thanks!
theothor` has joined #lisp
<defaultxr>
exactly what i needed, thank you :)
theothor` has quit [Ping timeout: 268 seconds]
bjorkintosh has joined #lisp
<Xach>
great!
theothor` has joined #lisp
random-nick has quit [Ping timeout: 246 seconds]
theothor` has quit [Ping timeout: 265 seconds]
kevingal_ has quit [Remote host closed the connection]
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #lisp
<aeth>
On that note, SYMBOL-MACROLET is how WITH-ACCESSORS is (probably) implemented. Although you kind of want a global version of that.
xsperry has quit []
xsperry has joined #lisp
<aeth>
Symbol macros are incredibly useful things. You can use them to e.g. treat multiple values like one value. (Combine a function that returns VALUES with a SETF form, defined via DEFSETF, to take in multiple values)
<aeth>
There's probably some even fancier trick
madage has quit [Quit: leaving]
monkey__ has quit [Ping timeout: 268 seconds]
igemnace has joined #lisp
madage has joined #lisp
theothor` has joined #lisp
<fiddlerwoaroof>
macros as places might be useful too
<fiddlerwoaroof>
slightly different use-case
<fiddlerwoaroof>
(let ((a 1) (b 2) (c 3)) (list (list a b c) (symbol-macrolet ((v (values a b c))) (setf v (values c b a)))) (list a b c))
karlosz has quit [Quit: karlosz]
theothor` has quit [Ping timeout: 246 seconds]
<mfiano>
symbol macros + &environment capturing gives you pre-ANSI compiler-let ability I have read, though I haven't explored this in detail.