<markasoftware>
where is (defun (setf blap) ...) documented in CLHS? I'm having trouble finding info about anything other than defsetf and define-setf-expansion
<markasoftware>
or are these "setf functions" just normal functions, and have to be called from inside define-setf-expansion?
<no-defun-allowed>
(setf ...) is just another kind of function name; I don't know where it's documented but it's not too special.
<markasoftware>
So if I define a (setf ...) function (not on an accessor, just a fresh name), it will not affect the operation of the setf macro in any way?
<no-defun-allowed>
(setf (foo ...) v) expands to (funcall #'(setf foo) v ...) if (setf foo) is defined from memory.
bhartrihari has quit [Ping timeout: 244 seconds]
<markasoftware>
that seems right based on some playing around in the repl, no-defun-allowed, except it expands like that even if (setf foo) is not defined, triggering an undefined function error
<markasoftware>
oh thanks _death, exactly what i needed
bhartrihari has joined #lisp
secretmyth has quit [Quit: Leaving]
vegansbane3 has joined #lisp
vegansbane has quit [Ping timeout: 260 seconds]
vegansbane3 is now known as vegansbane
mindCrime_ has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
Bike has quit [Quit: leaving]
grewal has joined #lisp
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
IPmonger has joined #lisp
edgar-rft has quit [Quit: Leaving]
IPmonger has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
IPmonger has joined #lisp
nullheroes has quit [Quit: WeeChat 2.9]
arpunk has quit [Remote host closed the connection]
arpunk has joined #lisp
rumbler31 has quit [Ping timeout: 272 seconds]
bilegeek has joined #lisp
Fare has quit [Ping timeout: 244 seconds]
Fare has joined #lisp
iissaacc has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
<ajithmk_>
I cloned sbcl source from github to a location /media/ajith/Lindows/sbcl-exp/. And I ran sh make.sh --prefix=/opt/mysbcl1. After a few minutes, terminal notified me that the build seems to have finished successfully. Except that, I don't see mysbcl1 in /opt. Turned out that files like /output/sbcl.core and /src/runtime/sbcl are created in the cloned location itself. I am wondering if it ignored my --prefix there. Any
<ajithmk_>
sbcl devs here can make sense of what happened here?
StevePerkins has joined #lisp
StevePerkins has quit [Ping timeout: 240 seconds]
ech_ has quit [Ping timeout: 240 seconds]
gravicappa has joined #lisp
<edgar-rft>
ajithmk_: if I remember right there is an install.sh script that will copy the files to their proper locations
ech has joined #lisp
dominic34 has joined #lisp
dominic34 has quit [Ping timeout: 265 seconds]
<ajithmk_>
Ah yes, It did it. Thanks
dominic34 has joined #lisp
PuercoPop has quit [Quit: WeeChat 1.9.1]
bocaneri has joined #lisp
shangul has joined #lisp
Lord_of_Life_ has joined #lisp
Oladon has joined #lisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
ebzzry has joined #lisp
remexre has quit [Remote host closed the connection]
remexre has joined #lisp
Aurora_v_kosmose has quit [Ping timeout: 240 seconds]
Aurora_v_kosmose has joined #lisp
shifty has joined #lisp
toorevitimirp has joined #lisp
ntwoaaci^ has joined #lisp
edgar-rft has quit [Quit: Leaving]
ebzzry has quit [Quit: WeeChat 2.8]
ebzzry has joined #lisp
shka_ has quit [Ping timeout: 264 seconds]
Fare has quit [Ping timeout: 260 seconds]
iissaacc has quit [Ping timeout: 260 seconds]
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
toorevitimirp has quit [Read error: Connection reset by peer]
dominic34 has quit [Ping timeout: 272 seconds]
borei has quit [Ping timeout: 272 seconds]
iissaacc has joined #lisp
orivej has joined #lisp
vegansbane8 has joined #lisp
vegansbane has quit [Ping timeout: 240 seconds]
vegansbane8 is now known as vegansbane
ebrasca has joined #lisp
toorevitimirp has joined #lisp
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
toorevitimirp has quit [Client Quit]
toorevitimirp has joined #lisp
toorevitimirp has quit [Client Quit]
toorevitimirp has joined #lisp
iissaacc has quit [Ping timeout: 264 seconds]
d4ryus has quit [Quit: WeeChat 2.9]
rumbler3_ has quit [Remote host closed the connection]
d4ryus has joined #lisp
mindCrime_ has quit [Ping timeout: 260 seconds]
supercoven has joined #lisp
supercoven has quit [Max SendQ exceeded]
supercoven has joined #lisp
ajithmk_ has quit [Quit: Connection closed for inactivity]
toorevitimirp has quit [Remote host closed the connection]
ebzzry has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
supercoven has quit [Max SendQ exceeded]
supercoven has joined #lisp
toorevitimirp has quit [Client Quit]
toorevitimirp has joined #lisp
cantstanya has quit [Remote host closed the connection]
toorevitimirp has quit [Remote host closed the connection]
jw4 has quit [Read error: Connection reset by peer]
dmr0x80 has quit [Client Quit]
<beach>
markasoftware: You have a syntax error, so the thing can't be executed.
<no-defun-allowed>
WITH-OPEN-FILE will call CLOSE with :ABORT T if non-local transfer of control occurs. "If abort is true, an attempt is made to clean up any side effects of having created stream."
<markasoftware>
yes, i suppose error needs an argument
<beach>
It does.
<no-defun-allowed>
Hm, even with an invalid ERROR form a file is still created here.
<beach>
Oh?
jw4 has joined #lisp
<no-defun-allowed>
I'm currently using SBCL 2.0.5, and (with-open-file (s "./blah" :if-does-not-exist :create)) will create a file called blah.
<no-defun-allowed>
I forgot the (error) on the inside. Oops.
<beach>
That would do it. :)
random-nick has joined #lisp
<markasoftware>
ok no-defun-allowed, you are right. It happens with :direction :io
<no-defun-allowed>
I forgot it in IRC, rather. There is an (ERROR) in that form that I typed into the REPL.
<markasoftware>
:direction :input does not trigger it i guess. Seems like it's not enough to count as a bug anyway
john__ is now known as gaqwas
gaqwas has joined #lisp
gaqwas has quit [Changing host]
<no-defun-allowed>
Yes, :io or :output will delete the file (indirectly) if non-local transfer of control causes execution to leave the WITH-OPEN-FILE form.
<no-defun-allowed>
"If stream performs output to a file that was created when the stream was created, the file is deleted and any previously existing file is not superseded."
<markasoftware>
well that's pretty clear
<markasoftware>
thanks1
rumbler31 has joined #lisp
pve has joined #lisp
bilegeek has quit [Quit: Leaving]
Lycurgus has quit [Quit: Exeunt]
_whitelogger has joined #lisp
vegansbane has quit [Ping timeout: 272 seconds]
vegansbane9 is now known as vegansbane
wxie has joined #lisp
ntwoaaci^ has quit []
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
space_otter has quit [Remote host closed the connection]
Blukunfando has quit [Ping timeout: 246 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
alex_ has joined #lisp
narimiran has quit [Ping timeout: 260 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Aurora_v_kosmose has quit [Ping timeout: 240 seconds]
jprajzne has quit [Client Quit]
wxie has quit [Ping timeout: 272 seconds]
jprajzne has joined #lisp
iissaacc has joined #lisp
Aurora_v_kosmose has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
toorevitimirp has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
IPmonger has quit [Read error: Connection reset by peer]
IPmonger has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
IPmonger_ has joined #lisp
IPmonger has quit [Ping timeout: 272 seconds]
bocaneri has quit [Ping timeout: 256 seconds]
toorevitimirp has quit [Ping timeout: 256 seconds]
toorevitimirp has joined #lisp
bocaneri has joined #lisp
ebzzry has joined #lisp
leo_song_ has quit [Ping timeout: 246 seconds]
ukari has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
kaftejiman has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
iissaacc has quit [Ping timeout: 272 seconds]
toorevitimirp has quit [Remote host closed the connection]
zaquest has quit [Read error: Connection reset by peer]
zaquest has joined #lisp
CrazyEddy has joined #lisp
jprajzne has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
Krystof has quit [Ping timeout: 265 seconds]
jonatack has quit [Ping timeout: 272 seconds]
cosimone has quit [Quit: Quit.]
Krystof has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
leo_song has joined #lisp
ggole has joined #lisp
reggieperry has quit [Ping timeout: 240 seconds]
reggieperry has joined #lisp
EvW has joined #lisp
yitzi has joined #lisp
toorevitimirp has quit [Ping timeout: 240 seconds]
cosimone has joined #lisp
save-lisp-or-die has joined #lisp
orivej has joined #lisp
EvW has quit [Ping timeout: 272 seconds]
dilated_dinosaur has quit [Ping timeout: 260 seconds]
nullman has quit [Ping timeout: 272 seconds]
nullman has joined #lisp
shifty has joined #lisp
jprajzne has quit [Quit: jprajzne]
<Josh_2>
afternoon
ebzzry has quit [Remote host closed the connection]
<beach>
Hello Josh_2.
Aurora_v_kosmose has quit [Ping timeout: 240 seconds]
iissaacc has joined #lisp
ebzzry has joined #lisp
jprajzne has joined #lisp
Lord_of_Life has quit [Read error: Connection reset by peer]
Aurora_v_kosmose has joined #lisp
hendursa1 has quit [Quit: hendursa1]
Lord_of_Life has joined #lisp
hendursaga has joined #lisp
vegansbane6 has joined #lisp
vegansbane has quit [Ping timeout: 240 seconds]
vegansbane6 is now known as vegansbane
dilated_dinosaur has joined #lisp
iissaacc has quit [Ping timeout: 240 seconds]
__jrjsmrtn__ has quit [Ping timeout: 272 seconds]
gko_ has joined #lisp
rumbler31 has quit [Remote host closed the connection]
__jrjsmrtn__ has joined #lisp
rumbler31 has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
TwoNotes has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
<Plazma>
so if everything can be changed in lisp then it doesn't really have the concept of immutable data structues?
<beach>
Not everything can be changed. For instance modifying literal data is undefined. But you are right, there is not a concept of immutable data structures per se.
<Plazma>
ahh ok
<beach>
Common Lisp is not a purely functional programming language.
<beach>
In fact, you can't even say that it's a functional programming language in that sense.
<Plazma>
ahh ok so i'm confusing that , then. I was reading some things about the theory of that and that's a huge benefit they tout ..a nd i'm still trying to wrap my head around how/why that's such a benefit especially in terms of performance
<beach>
Modern Common Lisp code is highly object oriented, and relies on identity a lot, which is kind of the opposite of functional programming.
<beach>
The advocates of functional programming cite performance only in terms of the possibility of parallelization, since if things are side-effect free, you can presumably parallelize to a greater degree.
<beach>
But side-effect free data structures are often significantly less efficient than the imperative counterpart.
<beach>
The main benefit that is cited by advocates of functional programming is simpler maintenance because programs are supposedly easier to understand if they have no side effects.
<Plazma>
that's also been my analysis thus far, and possibly a security benefit too.. but the fact they just make copies upon copies.. seems
<beach>
It's an interesting problem to try to minimize copying while still maintaining overall side-effect freedom.
<TwoNotes>
Not just parallelization, but also distribution over networks for reliability purposes
<beach>
That too.
<TwoNotes>
Erlang is an extreme example
<beach>
Plazma: You have some of that in Common Lisp, of course. If you do (CDR X), you are not copying anything.
<beach>
... or (CONS <something> x).
<Plazma>
ahhh ok
<Plazma>
i've seen CONS before
<beach>
I should hope so.
<beach>
Speaking of which, I wonder whether it would be better style to use LIST* together with FIRST, SECOND, REST, etc., and CONS only together with CAR, CDR, etc.
<beach>
Plazma: In fact, nothing is every implicitly copied in Common Lisp. At least I can't think of any exceptions.
TwoNotes has quit [Remote host closed the connection]
<Plazma>
so a side-effect can be about anything in this context? basically something that shouldn't happen that would break the entire application/system
<beach>
I don't understand.
<beach>
A side effect is usually defined as a modification to some object that can be detected by code that shares that object.
<ggole>
Structures without identity do make some optimisations easier/possible
<ggole>
Hoisting, numbering, etc
john__ has joined #lisp
<ggole>
Flattening things into arrays
<MichaelRaskin>
beach: well, does incf allocating a new bignum count as implicit copying?
<Plazma>
ahhh ok
gaqwas has quit [Ping timeout: 260 seconds]
<beach>
I don't think so. But you are right, copying could take place where EQ is not defined to work.
<Plazma>
beach: i was essentially asking what a side-effect is in this context.. i was thinking it was more like undefiend behavior vs compiler optimizations
<beach>
Plazma: No, just a mutation.
<Plazma>
ahhh ok
<beach>
Check Wikipedia on Side_effect_(computer_science)
<Plazma>
ahh ok
<Plazma>
so it's a formalized term tehn
<beach>
Yes.
<beach>
Plazma: Remind me, are you new at programming?
<Plazma>
no not at all
<beach>
But nobody told you about side effects?
<Plazma>
oh i'm sure it's came up but i just didn't remember the specifics of it
<beach>
I see.
<Plazma>
i have heard the phrase before but it doesn't come up that much
<Plazma>
also professionally i've been more of a infrastructre/network person
<beach>
I understand.
drl has joined #lisp
Inline has joined #lisp
mangul has joined #lisp
igemnace has quit [Remote host closed the connection]
shangul has quit [Ping timeout: 260 seconds]
IPmonger_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
IPmonger has joined #lisp
jesse1010 has joined #lisp
Fare has joined #lisp
Krystof has quit [Ping timeout: 240 seconds]
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
patlv has joined #lisp
drl has quit [Remote host closed the connection]
dra has joined #lisp
patlv has quit [Ping timeout: 260 seconds]
<dra>
Hello!
vegansbane3 has joined #lisp
<beach>
Hello dra.
drl has joined #lisp
vegansbane has quit [Ping timeout: 260 seconds]
vegansbane3 is now known as vegansbane
alex_ has quit [Remote host closed the connection]
jonatack has joined #lisp
drl has quit [Remote host closed the connection]
Kaisyu7 has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 246 seconds]
yitzi has quit [Quit: yitzi]
Fare has quit [Ping timeout: 244 seconds]
Lycurgus has joined #lisp
jprajzne has quit [Quit: jprajzne]
drl has joined #lisp
IPmonger has quit [Read error: Connection reset by peer]
Lycurgus has quit [Quit: Exeunt]
jprajzne has joined #lisp
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
IPmonger has joined #lisp
narimiran has joined #lisp
drl has quit [Quit: Ex-Chat]
hiroaki has joined #lisp
ebrasca has quit [Remote host closed the connection]
jprajzne has quit [Quit: jprajzne]
mankaev has quit [Read error: Connection reset by peer]
mankaev_ has joined #lisp
jprajzne has joined #lisp
EvW has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
Krystof has joined #lisp
narimiran has quit [Ping timeout: 240 seconds]
dominic34 has joined #lisp
StevePerkins has joined #lisp
StevePerkins_ has joined #lisp
StevePerkins_ has quit [Client Quit]
StevePerkins has quit [Client Quit]
hiroaki has quit [Remote host closed the connection]
random-nick has quit [Remote host closed the connection]
random-nick has joined #lisp
Fare has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
random-nick has quit [Client Quit]
random-nick has joined #lisp
gko_ has quit [Ping timeout: 240 seconds]
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #lisp
jonatack has quit [Quit: jonatack]
jonatack has joined #lisp
Lord_of_Life_ has joined #lisp
ukari has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
Lord_of_Life has quit [Ping timeout: 264 seconds]
Lord_of_Life_ is now known as Lord_of_Life
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Client Quit]
vegansbane9 has joined #lisp
vegansbane has quit [Ping timeout: 260 seconds]
vegansbane9 is now known as vegansbane
patlv has joined #lisp
ukari has joined #lisp
karlosz has joined #lisp
gravicappa has quit [Ping timeout: 265 seconds]
gravicappa has joined #lisp
puchacz has joined #lisp
narimiran has joined #lisp
<puchacz>
hi, parenscripts uses internally special variables, incf etc. any gotchas when using it from many threads?
jprajzne has quit [Quit: jprajzne]
<puchacz>
e.g. when I evaluate in REPL (ps* '(dolist (_ x) _)), I get a piece of javascript with variable named _js_idx345, if I evaluate it again, I get _js_idx346
<puchacz>
etc.
<puchacz>
clearly there is state involved
<puchacz>
also, I am not sure if it is not interning more and more symbols....
<puchacz>
I wrap my web requests with-blank-compilation-environment
<puchacz>
(it is an internal symbol in parenscript)
mindCrime_ has joined #lisp
<puchacz>
it resets the variable naming counter, but still not sure if it is everything - and if I am not leaking new symbols on every request
<puchacz>
gives a variable with 1, every time: _js_idx1
jprajzne has joined #lisp
<puchacz>
Maybe not - (ps::with-blank-compilation-environment (ps:ps-gensym)) returns #:_JS1 - i.e. always 1, always #: so uninterned...
<puchacz>
okay :)
cosimone has quit [Quit: Quit.]
karlosz has quit [Quit: karlosz]
<mseddon>
gensym does not intern. gentemp does.
<puchacz>
mseddon - I used ps-gensym there
<puchacz>
and I don't know what parenscript uses internally in general
<mseddon>
but importantly your dolist example is identical down to variable renaming
jprajzne has quit [Quit: jprajzne]
<puchacz>
what do you mean? that with blank compilation environment, the variable names are the same?
<mseddon>
the gensym'd names are not.
<mseddon>
but they are lexically scoped, and not global, so their name is irrelevant.
<mseddon>
what matters is the identity is the same across the code block
<puchacz>
@mseddon - are you looking at with-blank-compilation-environment macro in parenscript?
<mseddon>
(let ((*gensym-counter* 0)) (gensym)) is basically the same as your with-blank-compilation-environment i'd say
<mseddon>
(in the case of setting your gensym-counter at least)
<mseddon>
that will always produce a #:G0 symbol.
<mseddon>
but that's fine, since you may have many #:G0 symbols, and their identity is determined by eq alone.
<puchacz>
sure, but this is Lisp mechanism you are describing. I am wondering if there is something in parenscript that I need to take care of.
<mseddon>
But, if you (macroexpand 'dolist (_ x) _))) you would surely get a new, uninterned gensym each time too?
<puchacz>
parenscript may be interning (thus leaking memory) or have more variables that I need to wrap with (let ....) to make them lexical
EvW has quit [Ping timeout: 260 seconds]
<puchacz>
mseddon - it is irrelevant - parenscript does not macroexpand it
<mseddon>
doesn't it?
jprajzne has joined #lisp
<puchacz>
I don't think so - I think it just recognises a list like (DOLIST ...) and generates javascript from it
<mseddon>
Yes, but that variable name is irrelevant to the output
<mseddon>
If you macroexpand dolist you will see the same behaviour
yitzi has joined #lisp
<puchacz>
it works all right but I don't know if it is going to be thread safe - maybe I would need to make more variables lexical - and importantly - is it leaking any symbols interning them forever somewhere?
<mseddon>
Gensym does not intern, so presumably neither would ps:gensym
tychoish has quit [Quit: ish]
tychoish has joined #lisp
Khisanth has quit [Read error: Connection reset by peer]
<mseddon>
And.. thread safety in the browser isn't a thing, since it's an event loop on a single thread.
<puchacz>
I mean thread safety in the server
<puchacz>
my javascript is generated dynamically
<puchacz>
so thread safety in parenscript
<mseddon>
Well, two distinct #:G0 will look like different variables to lisp, so no
Jeanne-Kamikaze has joined #lisp
tychoish has quit [Client Quit]
tychoish has joined #lisp
<mseddon>
(and in general *gensym-counter* is thread local, being a special variable, so if this were to be an issue common lisp would have already hit it)
ebzzry has quit [Remote host closed the connection]
<mseddon>
I don't think it should be a problem, they are neither interned nor does their generated name matter for a lisp compiler.
<mseddon>
at most it may produce some weird code that LOOKS as though there are two #:G0's when printing, but probably *print-circle* would show that for you.
<mseddon>
and that would require a fairly pathalogical case of macroexpanding in a separate thread, and inserting the results in another, which is so contorted you're unlikely to end up there by mistake.
edgar-rft has joined #lisp
<mseddon>
(defmacro test-gensym-variable-identity(a b)
<mseddon>
(x2 (make-symbol "X")))
<mseddon>
`(let ((,x1 ,a) (,x2 ,b))
<mseddon>
(+ ,x1 ,x2)))) ; if parenscript incorrectly assigns the same variable to x1 and x2, this is not an + function.
<mseddon>
(let ((x1 (make-symbol "X"))
<puchacz>
oki
<mseddon>
but both of those symbols are called #:X
<mseddon>
hopefully that will allow you to trigger bugs if you are concerned.
random-nick has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 260 seconds]
<mseddon>
but again, gensym doesn't intern anything, if you can't access the pointer to the generated symbol from a global, the stack, or the heap, it will be garbage collected, so you can go crazy if you want.
<mseddon>
(LET ((#1=#:X 2) (#2=#:X 3)) (+ #1# #2#)) ;; with *print-circle* t- what lisp sees is two, unique lexical variables that happen to have the same name.
Fare has joined #lisp
<puchacz>
all right
<puchacz>
thanks
<markasoftware>
does uiop have unix<->dos newline conversion?
<markasoftware>
and if not, what's my best bet for doing it?
mangul has quit [Ping timeout: 256 seconds]
Alfr has quit [Quit: Leaving]
<edgar-rft>
AFAIK #\newline is the same character in unix and dos, I think what you want is LF to CRLF conversion?
<puchacz>
markasoftware - I think you can use cl-ppcre with explicit characters to be replaced
<puchacz>
(so not \n, but 13, 10 etc.)
<markasoftware>
i am trying to convert \r\n to \n. I don't actually expect any stray \r characters so (remove #\Return str) is working fairly well
edgar-rft has quit [Quit: Leaving]
space_otter has joined #lisp
CrazyEddy has quit [Ping timeout: 240 seconds]
galex-713 has quit [Remote host closed the connection]
caelie has joined #lisp
galex-713 has joined #lisp
patlv has quit [Ping timeout: 260 seconds]
john__ has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 260 seconds]
Alfr has joined #lisp
CrazyEddy has joined #lisp
<markasoftware>
looks like uiop:stripln is commonly used for this stuff too
caelie has quit [Quit: WeeChat 2.9]
supercoven has quit [Read error: Connection reset by peer]
<Josh_2>
there is the library cl-str
narimiran has quit [Quit: leaving]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
jprajzne has quit [Quit: jprajzne]
akoana has joined #lisp
ayuce has quit [Read error: Connection reset by peer]
ayuce has joined #lisp
jprajzne has joined #lisp
kaftejiman has quit [Remote host closed the connection]
enzuru has joined #lisp
EvW has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
vegansbane1 has joined #lisp
EvW has joined #lisp
vegansbane has quit [Ping timeout: 256 seconds]
vegansbane1 is now known as vegansbane
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
frgo has joined #lisp
aeth_ has joined #lisp
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
liberliver has quit [Ping timeout: 240 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Oladon has joined #lisp
karlosz has quit [Quit: karlosz]
jgodbout has joined #lisp
patlv has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` is now known as X-Scale
vgmind has joined #lisp
_Ark_ has joined #lisp
ark has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
enzuru has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
dale has quit [Remote host closed the connection]
dale has joined #lisp
Inline has joined #lisp
EvW has joined #lisp
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
ggole has quit [Quit: Leaving]
space_otter has quit [Remote host closed the connection]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
Inline has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
tessier has quit [Ping timeout: 265 seconds]
tessier has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Alfr has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 260 seconds]
jprajzne has quit [Quit: jprajzne]
orivej has quit [Ping timeout: 272 seconds]
jprajzne has joined #lisp
Alfr has joined #lisp
puchacz has quit [Remote host closed the connection]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
patlv has quit [Ping timeout: 260 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
vegansbane3 has joined #lisp
patlv has joined #lisp
cosimone has joined #lisp
vegansbane has quit [Ping timeout: 258 seconds]
vegansbane3 is now known as vegansbane
ukari has quit [Remote host closed the connection]
vgmind has left #lisp [#lisp]
dra has quit [Quit: Leaving]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
bubo has joined #lisp
dvdmuckle has quit [Quit: Bouncer Surgery]
<bubo>
Hi! Is it possible to defun a function inside a defmacro with the name of the function being passed as an argument to the macro?
<bubo>
I'm writing some really ugly code. I don't really know why I'm triggering an error by doing this
<bubo>
"The NAME argument to DEFUN, 'BLABLA is not a function name."
<White_Flame>
looks like an extra quote in there
jprajzne has quit [Client Quit]
<White_Flame>
(defun (quote blabla) ...) without the pretty printer converting it to single-quotes
<White_Flame>
if you pass in (make-fun 'my-func ...) then that error would occur
jprajzne has joined #lisp
<White_Flame>
remember, macros deal with source code literally, you don't need to quote things passed into it
dvdmuckle has joined #lisp
<White_Flame>
in other words, the parameters to a macro are _not_ evaluated before calling the macro. There is no evaluation context, at it's at compile time
<White_Flame>
just the raw source code of the parameters are given, and the macro returns new source code using that input source code
<bubo>
Allright. Pardon me for the noob question now. Should I do (defun ,name) or (defun name)?
<White_Flame>
`(defun ,name) which is the same as (list 'defun name)
<White_Flame>
`(defun name) is the same as (list 'defun 'name) which will just get you (defun name) literally
<White_Flame>
the comma escapes out of the quoted context and allows it to be evaluated
<bubo>
Aaah, I might be confused by where I put my backtick
<White_Flame>
the same place you put a '
bilegeek has joined #lisp
<White_Flame>
but also, #clschool is a good place to ask stuff like this, especially when this channel gets otherwise busy
<bubo>
The whole macro is just a big IF, each branch defining a function with some extra fancyness
<bubo>
I just wrapped my if with a backtick, at the beginning of the definition
<White_Flame>
that means that the IF form will be returned, so the IF decision making will happen at runtime
<White_Flame>
if the IF is not quoted, then the macro is deciding which code to generate/return at compile-time
bubo has quit [Read error: Connection reset by peer]
bubo has joined #lisp
<bubo>
Whoop, my internet connection died all of the sudden. Is it possible to see chat logs?
<White_Flame>
1st link in the topic
<White_Flame>
also, I don't think you missed anything
Inline has quit [Ping timeout: 240 seconds]
patlv has quit [Ping timeout: 260 seconds]
aeth has quit [Ping timeout: 265 seconds]
paul0 has joined #lisp
aeth has joined #lisp
<bubo>
I uploaded the macro here -> https://pastebin.com/TrbHDNaA . If someone is willing to look at it, I'm ready to be roasted.
patlv has joined #lisp
<bubo>
Trying to learn CL without much programming exp, can only be a good thing
jgodbout has quit [Quit: Connection closed for inactivity]
bubo has quit [Quit: leaving]
<White_Flame>
that pastebin 404s for me
<White_Flame>
ah,missed
Volt_ has joined #lisp
luna_is_here has quit [Remote host closed the connection]
luna_is_here has joined #lisp
iissaacc has joined #lisp
cantstanya has quit [Ping timeout: 240 seconds]
luna_is_here has quit [Ping timeout: 272 seconds]
cantstanya has joined #lisp
galex-713 has quit [Ping timeout: 246 seconds]
luna_is_here has joined #lisp
galex-713 has joined #lisp
DGASAU has quit [Ping timeout: 260 seconds]
luna_is_here has quit [Ping timeout: 246 seconds]
luna_is_here has joined #lisp
pve has quit [Quit: leaving]
borei has joined #lisp
cosimone has quit [Ping timeout: 260 seconds]
matijja has quit [Ping timeout: 260 seconds]
matijja has joined #lisp
random-nick has quit [Ping timeout: 260 seconds]
Jeanne-Kamikaze has quit [Ping timeout: 264 seconds]