<dmiles>
it converted all the CLOS objects to be visible to the engine
karlosz_ has joined #lisp
wccoder has quit [Quit: Lost terminal]
igemnace has joined #lisp
ym555 has quit [Read error: Connection reset by peer]
ym555 has joined #lisp
FreeBirdLjj has joined #lisp
trocado has quit [Ping timeout: 272 seconds]
semz has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 246 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
t58 has quit [Quit: Leaving]
zcid has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
semz has joined #lisp
vutral has quit [Remote host closed the connection]
Grue` has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
alexanderbarbosa has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
<LdBeth>
good morning
<no-defun-allowed>
morning LdBeth
Kundry_Wag has joined #lisp
karlosz_ has quit [Quit: karlosz_]
nu11heroes has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
keramida has joined #lisp
fortitude_ has quit [Ping timeout: 245 seconds]
ym555 has quit [Ping timeout: 268 seconds]
gravicappa has joined #lisp
nu11heroes has quit [Ping timeout: 252 seconds]
actuallybatman has joined #lisp
keramida has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
Necktwi has quit [Ping timeout: 246 seconds]
atgreen has quit [Ping timeout: 276 seconds]
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
dddddd has quit [Read error: Connection reset by peer]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
_whitelogger has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
atgreen has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
mindCrime_ has quit [Ping timeout: 272 seconds]
<beach>
Good morning everyone!
vlatkoB has joined #lisp
vutral has joined #lisp
vutral has quit [Read error: Connection reset by peer]
ym555 has joined #lisp
libertyprime has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
atgreen has quit [Ping timeout: 276 seconds]
dieggsy has joined #lisp
zagura has quit [Ping timeout: 252 seconds]
dieggsy has left #lisp [#lisp]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
sauvin has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
sauvin has quit [Max SendQ exceeded]
sauvin has joined #lisp
khisanth_ has quit [Ping timeout: 244 seconds]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
khisanth_ has joined #lisp
vutral has joined #lisp
alexanderbarbosa has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
libertyprime has quit [Ping timeout: 272 seconds]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
rippa has joined #lisp
vutral has quit [Remote host closed the connection]
svillemot has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
svillemot has joined #lisp
svillemot has quit [Client Quit]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
svillemot has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
libertyprime has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
wigust has joined #lisp
wigust- has quit [Ping timeout: 245 seconds]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
actuallybatman has quit [Ping timeout: 245 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
lnostdal has quit [Quit: "Fascism, Nazism, Communism and Socialism are only superficial variations of the same monstrous theme—collectivism." -- Ayn Rand]
lukego has joined #lisp
shka_ has joined #lisp
ym555_ has joined #lisp
ym555 has quit [Ping timeout: 268 seconds]
zcid has joined #lisp
hhdave has joined #lisp
cosimone has joined #lisp
orivej has joined #lisp
cyraxjoe has quit [Quit: I'm out!]
keep_learning_M has quit [Quit: This computer has gone to sleep]
<frgo>
Good morning everyone!
dale has quit [Quit: dale]
gxt has joined #lisp
<frgo>
I am wrestling with log4cl. I have implemented an appender that gets a pattern layout of "%m". So, nothing complicated. Now if I call (log:debug "hello") directly from the REPL, all is fine. If I call the same from within a function the appender prepends my message with something that looks like the category, resulting in the string 'TEST::MSG "hello"'. Any idea how I can prevent this?
dmiles has quit [Read error: Connection reset by peer]
hhdave has quit [Quit: hhdave]
CloseToZero has joined #lisp
<frgo>
Hmpf - solved. (log:debug "~A" msg) and not (log:debug msg).
CloseToZero has quit [Quit: WeeChat 2.5]
CloseToZero has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
vutral has quit [Remote host closed the connection]
dmiles has joined #lisp
FreeBirdLjj has quit [Ping timeout: 272 seconds]
vutral has joined #lisp
random-nick has joined #lisp
FreeBirdLjj has joined #lisp
^ is now known as uplime
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
cosimone has quit [Ping timeout: 264 seconds]
vutral has quit [Remote host closed the connection]
cosimone has joined #lisp
<no-defun-allowed>
Can asdf compile in parallel?
vutral has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
vutral has quit [Remote host closed the connection]
refpga has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
moei has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
paule32 has joined #lisp
<paule32>
hello
<paule32>
i working with Common Lisp atm
<Josh_2>
hi
<paule32>
is it possible, to have a class/structure named "wire"
<paule32>
and instances, that init alone like "wire-1" or "wire-2" ... ?
trocado has joined #lisp
vutral has joined #lisp
<Josh_2>
yeh
vutral has quit [Remote host closed the connection]
<Josh_2>
wait I don't know about the second part, you could make a wrapper function around make-instance that makes the name for you
nanoz has quit [Ping timeout: 248 seconds]
<paule32>
then i could count up a counter variable make "wire-cnt" ?
<no-defun-allowed>
You could use an :after method on initialize-instance that sets the name and increments a counter.
<frgo>
paule32: This can be done. You'd need a slot with class allocation that tracks the last instance number
<no-defun-allowed>
Yeah, a class-allocated slot would be neater too.
<pjb>
or use a hash-table if you think you'll have a lot of wires.
szmer has joined #lisp
<Josh_2>
yes but why not use the specific function used to find entries in alists?
<Josh_2>
but yes use a hash table if you will have lots of wires
<LdBeth>
GG
orivej has joined #lisp
<paule32>
LdBeth: ?
hhdave has quit [Quit: hhdave]
Bike has joined #lisp
<LdBeth>
paule32: I think you’re doing right on you implementation. But I don’t get why give names to wires, do you expect to pick up a wire by its name?
mindCrime_ has quit [Read error: Connection timed out]
keep_learning_M has joined #lisp
wxie has quit [Ping timeout: 276 seconds]
kajo has quit [Ping timeout: 252 seconds]
kajo has joined #lisp
igemnace has joined #lisp
<Josh_2>
can someone help me write this macro oof https://plaster.tymoon.eu/view/1439#1439 that's the code I have and one of my many attempts, the macro needs to expand to the function at the bottom when given the args '(home login users register) basically
<Josh_2>
I'm stuck
<aeth>
Josh_2: for capitalize-nth-character, I would put n second, not first, since in all sequence functions the index comes second. It's only in the older nth/nthcdr/etc. list functions where n comes first afaik.
<aeth>
this is because sequence/array functions can have optional/keyword arguments, and in aref they need arbitrary length
<aeth>
Josh_2: for the macro, I would separate the mapcar in the flet into its own function (wrapped in an eval-when) because it's very large. Then you can test this separately.
<Josh_2>
okay on the first part
<Josh_2>
makes sense
Arcaelyx has joined #lisp
<Josh_2>
Not so okay with the second part
<aeth>
Instead of append-n-to-symbol (n usually stands for an integer, which you're not doing... you're using a string (s) or character (c)...) you could try using FORMAT instead, that might be clearer than concatenating
heisig has joined #lisp
<Josh_2>
whats unclear about concatenating?
<aeth>
(concatenate 'string n (symbol-name symbol)) vs. (format nil "/~S" (symbol-name symbol))
<Josh_2>
I disagree with you
<Josh_2>
concatenate is certainly more specific, telling the reader exactly what is happening
<Josh_2>
anyways, doesn't matter
<Josh_2>
I don't know what you mean by seperating the mapcar into It's own function
<aeth>
Josh_2: The first thing that I do when working with a mega-macro is separating the genration parts (which are embedded with , or ,@) from the generated content. I personally find that that makes things more readable. Either a separate function or a flet or a let, doesn't really matter. The important part is that the parts that are unquoted are trivial, like what you did with ,(get-standard-image) and ,(get-title)
<aeth>
Josh_2: So instead of `(flet ,@(mapcar ...) ...) I would do `(flet ,@(generate-navigation-item ...) ...) or `(flet ,@navigation-item ...) depending on if I used a function (either separate or in flet) in the first case or a let in the second case
<aeth>
s/genration/generation/
<Josh_2>
Right okay
<aeth>
oh sorry, it would be generate-navigation-items or navigation-items, since it's the whole list
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
<aeth>
Josh_2: it doesn't look like you special-case 'home to mean "/" instead of "/home"
<aeth>
Josh_2: one way to handle arbitrary special cases would be to use a typecase followed by a DESTRUCTURING-BIND. So something like (etypecase form (symbol ...) (list (destructuring-bind (name &optional link) form ...))) and maybe even have that form return multiple values with VALUES which is then handled by a MULTIPLE-VALUE-BIND.
<aeth>
So the pattern there is to accept a symbol or a list and use the magic default on the symbol, or on the list if the optional or keyword is not provided. You would pass in '((home "/") login users register) instead of '(home login users register) and you're explicit about the special case.
<Josh_2>
okay I basically got it
v88m has quit [Ping timeout: 258 seconds]
<Josh_2>
yes I thought about doing that aeth
<Josh_2>
So you could specify the url directly instead of letting the macro do it
<aeth>
Oh, and another way of basically doing the same thing would be to turn the symbol form into a list and then share the destructuring-bind code for both branches. Probably makes it a bit easier if you're going to make it optional anyway.
keep_learning_M has quit [Quit: This computer has gone to sleep]
<aeth>
e.g. (destructuring-bind (name &optional link) (etypecase form (symbol (list form)) (list form)) ...)
<Josh_2>
I don't know if (generate-navigation-html) is okay ¯\_(ツ)_/¯
refpga has quit [Read error: Connection reset by peer]
<aeth>
You need to wrap it in (eval-when (:compile-toplevel :load-toplevel :execute) ...) iirc
refpga has joined #lisp
<Josh_2>
I don't know what that is
<Josh_2>
I've never used it
cosimone has joined #lisp
<aeth>
That makes the function available to the macro at macroexpansion time iirc
<aeth>
What library are you using? get-standard-image and get-title and with-html are undefined.
<Josh_2>
Those are my own functions, get-standard-image just evals to a path and title to a string
<Josh_2>
both strings actually
<aeth>
I wouldn't begin with get-*. CL has a few get-*, mostly related to time, but the idiomatic style that has developed is to basically say foo instead of get-foo and because it's a lisp-2^37 the namespaces will make things work out fine
<Josh_2>
so what should I use instead?
<Josh_2>
all it does is return the value of a global var
<aeth>
just say standard-image and title. If you're concerned about title having name conflicts (although packages will mostly solve that) you can call it html-title
<Josh_2>
alrighty
<carmack>
I use quicklisp and get this error: The archive file "local-time-20190202-git.tgz" for "local-time" is the wrong size: expected 298,139, got 7,739
<carmack>
What i should to do?
<Josh_2>
I went with (website-title)
<Josh_2>
I will put etypecase form into the gen-nav-html so that I can specify a url instead
<aeth>
carmack: the first thing I would try is deleting it and retrying
<aeth>
(or renaming it if you think it might be interesting)
<carmack>
aeth: well, i do this
refpga has quit [Read error: Connection reset by peer]
<aeth>
Josh_2: It looks like you're missing an (:a ..) surrounding the last part of your generated HTML if I try to do (generate-navigations-html '(foo bar))
<carmack>
aeth: if I try to load local-time separately, the error is the same
<aeth>
carmack: I have never encountered that and (ql:quickload :local-time) works for me.
<aeth>
perhaps some cache got corrupted if it repeatedly happens even after you delete the file
<aeth>
It's HTTP so that might be some sort of error message saying it's blocked instead of the content. I was going to suggest looking at the file with a text editor to see if it's actually HTML
<aeth>
if it was HTTPS they afaik couldn't do that and would only be able to block the entire domain
<aeth>
This is essentially a MITM
<carmack>
So if HTTPS, i can download archive, but how said to quicklisp do same?
<carmack>
i mean get from HTTPS, not HTTP
<aeth>
Quicklisp doesn't use HTTPS. If it was HTTPS, someone in the middle would be unable to block specific packages from quicklisp because they would only see the domain quicklisp.org itself afaik.
<aeth>
carmack: You can download local-time from Github, and put it in your local projects, which is probably ~/quicklisp/local-projects or wherever your quicklisp install is. Then quicklisp will use the more recent git version and not attempt to download the package from the blocked URL
xkapastel has quit [Quit: Connection closed for inactivity]
<aeth>
Even if there's a filter for *local-time* that won't work on the https github
<aeth>
(well, probably won't... work laptops can still MITM HTTPS iirc)
donotturnoff has joined #lisp
Folkol_ has joined #lisp
Folkol has quit [Read error: Connection reset by peer]
nanoz has quit [Ping timeout: 272 seconds]
xkapastel has joined #lisp
karlosz_ has joined #lisp
v88m has quit [Ping timeout: 272 seconds]
cosimone has quit [Ping timeout: 252 seconds]
cosimone has joined #lisp
v88m has joined #lisp
Lycurgus has quit [Quit: Exeunt]
VTToonses has quit [Ping timeout: 260 seconds]
<Josh_2>
how do I comment a region in emacs/sly?
<Josh_2>
Pretty sure It's the same as slime
<Josh_2>
Well whats the keybinding
<aeth>
M-x comment-region
<aeth>
It doesn't look like there's a key binding, at least for me, since it suggests a shorter M-x command instead of a key binding.
CloseToZero has quit [Quit: WeeChat 2.5]
<aeth>
(Maybe Sly adds one, though)
karlosz_ has quit [Quit: karlosz_]
<Josh_2>
ahh okay
<aeth>
It's possible that there's something that does something very similar that I don't know about that does have a key binding. It's happened to me before.
nanoz has joined #lisp
nowhere_man has joined #lisp
Inline has quit [Ping timeout: 252 seconds]
ym555_ has quit [Ping timeout: 246 seconds]
heisig has quit [Remote host closed the connection]
terpri has quit [Ping timeout: 268 seconds]
<Josh_2>
So this is what I have settled on aeth https://plaster.tymoon.eu/view/1440#1440 seems to be working perfectly I finally noticed what you meant about missing an (:a )
<Josh_2>
Thanks for all your help :)
<aeth>
you're welcome
Inline has joined #lisp
karlosz_ has joined #lisp
varjag has joined #lisp
random-nick has quit [Remote host closed the connection]
random-nick has joined #lisp
v88m has quit [Ping timeout: 272 seconds]
<trocado>
Josh_2: is M-; what you're looking for?
Kundry_Wag has joined #lisp
<aeth>
weird, that appears to do the same thing, but it was not suggested as the shortcut so it's probably executing a different M-x foo
t58 has joined #lisp
<p_l>
M-; is kinda "dwim-comment" thing - depending on where you're in the code it will do different things
<p_l>
in lisp-mode, if you have region active, it will comment it out with line comments
<aeth>
Disappointingly, not intelligent enough. If I do M-; with "bar" selected on the line "foo bar" it turns it into "foo ;; bar" instead of "foo ; bar"
v88m has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
<aeth>
for new comments it does seem to understand ;;; vs. ;; vs. ; but it adds a bunch of space in front of the ;
<aeth>
For new comments making typing ; itself be smart would be more convenient
actuallybatman has joined #lisp
Josh_2 has quit [Read error: Connection reset by peer]
refpga has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
refpga has joined #lisp
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
Kundry_Wag has joined #lisp
<paule32>
so back from party
<paule32>
give it news?
Kundry_Wag has quit [Ping timeout: 248 seconds]
<paule32>
the lisp webpage, are changed?
alexanderbarbosa has quit [Remote host closed the connection]
anewuser has joined #lisp
<paule32>
i thinking it has a little bit changes, but can be false
<ck_>
paule32: you would do well to work on your language skills a little bit
<paule32>
ok
solrize has left #lisp ["Leaving"]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 248 seconds]
v88m has quit [Remote host closed the connection]
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
bendersteed has joined #lisp
flazh has quit [Ping timeout: 258 seconds]
varjag has quit [Read error: Connection reset by peer]
varjag has joined #lisp
flazh has joined #lisp
v88m has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
semz has quit [Quit: Leaving]
SenasOzys has joined #lisp
orivej has joined #lisp
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
alexanderbarbosa has joined #lisp
Necktwi has joined #lisp
Necktwi has quit [Client Quit]
actuallybatman has quit [Ping timeout: 268 seconds]
anewuser has quit [Ping timeout: 244 seconds]
<Josh_2>
I have to save data from forms submitted on a website, should I use an sql database or can I just save straight to drive in a text file? Basically It's just 5 bits of info, two numbers, a postcode and two strings
<Josh_2>
this is not for a trivial application, I suggested to my boss that I'd create a website that can be used by his employees to log their mileage :O
<Josh_2>
so basically I gotta make it, and then trial it while I'm working xD
<ck_>
well, will you have to worry about race conditions and so forth?
<Josh_2>
Why would I have to worry about that?
<ck_>
or are you proposing one file per interaction
<Josh_2>
No, just one large file recording all the data
<ck_>
why would you have to worry? because maybe you have thousands of employees, and two of them might hit "submit" at the same time
<Josh_2>
basically it would get 5 submissions at most a day
<Josh_2>
There isn't thousands of employees, this is not a tech field It's agriculture
<ck_>
then I don't quite understand why you brought up a database in the first place
<Josh_2>
well I was asking for advice
<pjb>
Josh_2: there are still about 400,000 agricultors in France… They might all use their computer at the same time, in the evening!
<Josh_2>
pjb: xD they are not employees of my boss though
<MichaelRaskin>
Well, databases have some effort invested into data surviving a hard-power-off
<MichaelRaskin>
Maybe not the latest data written and not synced, but at least the previous record
<Josh_2>
a postgres db isn't hard to use, I could have a text file at the same time for simplicity
<ck_>
I can't give my opinion because you didn't speak about the whole job. Who will access the data (how often), would querying through a database be an advantage, how large will the file get, etc.
anewuser has joined #lisp
<ck_>
okay, so do that. run it for a month or two, see if one is easier/faster/more reliable than the other method
<Josh_2>
alrighty
refpga has quit [Remote host closed the connection]
<Josh_2>
If I was to host a sly session running my CL image with hunchentoot etc running on an external server the best way to connect is to xforward of ssh right?
bendersteed has quit [Ping timeout: 248 seconds]
<Josh_2>
xforward over*
refpga has joined #lisp
anewuser has quit [Quit: anewuser]
<ck_>
xforward? if you mean an ssh tunnel, sure.
orivej has quit [Ping timeout: 244 seconds]
<Josh_2>
yep
SenasOzys has quit [Remote host closed the connection]
semz has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
gravicappa has quit [Ping timeout: 248 seconds]
VTToonses has joined #lisp
trocado has quit [Ping timeout: 248 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
nanoz has quit [Ping timeout: 258 seconds]
dale has joined #lisp
donotturnoff has quit [Ping timeout: 246 seconds]
oni-on-ion has joined #lisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
xkapastel has joined #lisp
Folkol has joined #lisp
Folkol_ has quit [Ping timeout: 248 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
moei has quit [Ping timeout: 245 seconds]
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
dacoda has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
orivej has joined #lisp
random-nick has quit [Remote host closed the connection]
random-nick has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
shka_ has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
cosimone has joined #lisp
vlatkoB has quit [Remote host closed the connection]
Folkol has quit [Read error: Connection reset by peer]
Lycurgus has joined #lisp
Folkol has joined #lisp
dacoda has quit [Ping timeout: 245 seconds]
akoana has joined #lisp
kajo has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
dialectic has joined #lisp
<dialectic>
I'm reading characters into a vector with an adjustable array with a fill-pointer. I'd like to intern those sequences and get a symbol back. However, INTERN, MAKE-SYMBOL etc. take strings.
<minion>
dialectic, memo from White_Flame: You can even scope a MACROLET around multiple DEFUNs if you want
<minion>
dialectic, memo from White_Flame: If you have a macro that's only used in 1 function, then use MACROLET locally
<Bike>
dialectic: have your adjustable array be a string?
<Bike>
that is, specify an element-type that's a character type
<dialectic>
coercing those character buffers into string make fresh strings... I know this because (eq v (coerce v 'string)) => NIL
<dialectic>
Bike: A string must be a SIMPLE-ARRAY
<Bike>
nope.
<dialectic>
!!
<Bike>
"string" just means "an array with a character element type".
<Bike>
er, a vector.
<Bike>
there's a separate simple-string type, even.
<Bike>
separate - i mean, it's a subtype, obvs
<dialectic>
Wow. This whole time I was putting up with the print syntax for vectors of characters.
<dialectic>
Thanks Bike
<pjb>
Bike: note that you can make multidimensional arrays of strings: (quote #2A("ABC""DEF")) #| --> #2A((#\A #\B #\C) (#\D #\E #\F)) |#
Folkol has quit [Read error: Connection reset by peer]
Folkol has joined #lisp
jcowan has joined #lisp
<jcowan>
I may have asked this before, but is there any way to implement /= in CL (over n arguments) that doesn't involve sorting or hashing?
<Bike>
doing quadratically many comparisons?
<jcowan>
Or worse, I should obvs have said. :-)
<jcowan>
After all, you could use bogosort (randomize order, test, repeat)
<Bike>
probably not then
leedleLoo has joined #lisp
Kundry_Wag has joined #lisp
<jcowan>
Thanks
atgreen has quit [Ping timeout: 264 seconds]
dialectic has quit [Remote host closed the connection]
dialectic has joined #lisp
<dialectic>
jcowan: What's wrong with reducing?
<jcowan>
dialectic: Not sure what you mean by reducing.
Kundry_Wag has quit [Ping timeout: 248 seconds]
atgreen has joined #lisp
<dialectic>
(/= a b c d) can only ever be nil if all the elements are =. But if all the elements are = that means that walking down the list and comparing direct neighbors is sufficient.
<dialectic>
(NOT (AND (= a b) (= b c) (= c d)))
<MichaelRaskin>
dialectic: (/= 3 3 5 3) is false.
<dialectic>
... let me reread the definition
<MichaelRaskin>
jcowan: I guess you could use some fancier data structure…
varjag has quit [Ping timeout: 245 seconds]
aindilis has quit [Remote host closed the connection]
<pjb>
No need for a data structure. It's usually called on a small number of elements.
aindilis has joined #lisp
<pjb>
Now, if call-argument-limits is very big, then you might want to use a hash-table, but given the overhead, I would advise checking the number of arguments first.
<pjb>
So have a compiler-macro to do this check at compilation-time and select /=-On^2 or /=-Onlogn depending on your overhead.
<jcowan>
dialectic: Yes, that works for =, being careful to avoid variadic recursion (which CLs are allowed to optimize away, but most don't seem to).
<pjb>
Also, note that: (= 1 1.0 #c(1.0 0.0)) so you have to use an equal hash-table.
aindilis has quit [Remote host closed the connection]
<pjb>
If you use sort, you cannot use < since that works only on real, not on complexes.
<jcowan>
I specified lexicographic sort on complex numbers (but not in <, of course)
aindilis has joined #lisp
<pjb>
jcowan: lexicographic, but such as 1 1.0 #c(1.0 0.0) are together. (remove-duplicates '(1 1.0 #c(1.0 0.0) 2 2.0 #c(2.0 0.0) 3 3.0 #c(3.0 0.0)) :test (function =)) #| --> (#C(1.0 0.0) #C(2.0 0.0) #C(3.0 0.0)) |#
<pjb>
and #C(1 0), and 3/2 with #C(3/2 0) etc.
<pjb>
Quite a funny lessp to write…
paul0 has joined #lisp
Lycurgus has quit [Quit: Exeunt]
dialectic has quit [Remote host closed the connection]
<jcowan>
It can defer to < for every real < real determination and handle the other cases by relying on the behavior of real-part and imag-part for real numbers.
Kundry_Wag has joined #lisp
VTToonses has quit [Ping timeout: 260 seconds]
ym555_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
leedleLoo has left #lisp [#lisp]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
paule32 has left #lisp ["Leaving"]
Kundry_Wag has joined #lisp
refpga has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 272 seconds]
ebrasca has joined #lisp
alexanderbarbosa has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
VTToonses has joined #lisp
xkapastel has joined #lisp
oni-on-ion has joined #lisp
random-nick has quit [Read error: Connection reset by peer]