jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
<younder> well you could always use the partition I pasted earlier
azimut_ has quit [Remote host closed the connection]
azimut has joined #commonlisp
waleee has quit [Ping timeout: 276 seconds]
dtman34 has quit [Ping timeout: 260 seconds]
jonatack has joined #commonlisp
johnjaye has joined #commonlisp
<BrokenCog> I'm probably not udnerstanding alists ... but ... how would one test if a variable is an alist? (alist-p *thing*)?
<BrokenCog> I guess iterate the entire alist and check if it consits of elements of cons?
josrr has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 268 seconds]
Gleefre has quit [Remote host closed the connection]
<Mondenkind> BrokenCog: in general, you don't
<Mondenkind> why do you want to do that?
<BrokenCog> well, I want to create a deftype and the type is an alist in affect.
<Mondenkind> there's not a good way, in general, to tell if something 'is' an alist, or just happens to have the same structure (to wit, (every #'consp list) or so)
<Mondenkind> you could say (defun alist-p (list) (every #'consp list)) (deftype alist () '(satisfies alist-p))
<BrokenCog> right. the (every #'consp list) is the key. I was stuck on manually iterating list.
<Mondenkind> (loop for x in list always (consp x)) is not too bad. You will need to do extra work in either event to cope with the possibility of list's not being a proper list (or not a list at all)
<BrokenCog> right.
<BrokenCog> so, I don't need to defun a mytype-p ? the '(satisifies alist-p) is sufficient?
<Mondenkind> not sure what you're asking
<Mondenkind> you need to define alist-p in order for (satisfies alist-p) to work as a type
<BrokenCog> right. this: https://lispcookbook.github.io/cl-cookbook/type.html is saying I need a predicate checker for my type?
<ixelp> Type System
<BrokenCog> is that in addition to the (deftype mytype) with the '(satisfies) clause?
<BrokenCog> ahh ... never mind.
<BrokenCog> I get it. it's just invoking the alist-p function.
<Mondenkind> yes
<Nilby> (defun now-p (x) (= x (get-universal-time))) (typep (get-universal-time) `(satisfies now-p))
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 256 seconds]
<BrokenCog> that it ever could be since the time would be millisconds off but I undrstyand.
Lord_of_Life has quit [Ping timeout: 252 seconds]
<BrokenCog> *not that
Lord_of_Life has joined #commonlisp
dra has quit [Ping timeout: 264 seconds]
<aeth> BrokenCog: yes, an alist is just a list of conses
<aeth> while a plist is even simpler, it's just an even-length list
<aeth> satisfies types aren't efficient, though
<aeth> in practice you want a bit more structure
<aeth> plists have every other element as a key (symbol? keyword? maybe even a string with the string= or string-equal tests?) while alists have the car as a key, so any check may want to check that they have an appropriate key type
epony has joined #commonlisp
<BrokenCog> aeth: what would be an appropriate key type? it is easier present or not, no?
kevingal_ has quit [Ping timeout: 256 seconds]
kevingal has quit [Ping timeout: 256 seconds]
<BrokenCog> in that type.html link above, LispCookBook, it gives an example deftype with "(array ,type 1)" ... what is array?
<BrokenCog> (arrayp #( 1 2 3)) -> t, but, (array #(1 2 3)) -> Undefined Function array
<aeth> a 1D array is a vector... this is normally what you see
<aeth> but it can also be 0, 2, 3, ... dimensional
<BrokenCog> I know what an array is. What is that functoin? it's not defined in sbcl
<aeth> type definitions have their own syntax
<Inline> #(1 2 4) is already an array
<aeth> e.g. ,(typep #(1 2 3) '(simple-array t (3)))
<ixelp> (typep #(1 2 3) '(simple-array t (3))) => T
<aeth> e.g. ,(typep #((1 2 3)) '(simple-array t (3 1)))
<ixelp> (typep #((1 2 3)) '(simple-array t (3 1))) => NIL
<aeth> e.g. ,(typep #((1 2 3)) '(simple-array t (1 3)))
<ixelp> (typep #((1 2 3)) '(simple-array t (1 3))) => NIL
<aeth> e.g. ,(typep #((1 2 3)) '(simple-array t (1)))
<ixelp> (typep #((1 2 3)) '(simple-array t (1))) => T
<aeth> that's actually an array of a list
<aeth> but then ,(typep #2A((1 2 3)) '(simple-array t (1 3)))
<ixelp> (typep #2A((1 2 3)) '(simple-array t (1 3))) => T
<aeth> and ,(typep (make-array 3 :element-type 'single-float :initial-contents '(1f0 2f0 3f0)) '(simple-array single-float (3)))
<ixelp> (typep (make-array 3 :element-type 'single-float :initial-contents '(1f0 2f0 3f0)) '(simple-array single-float (3))) => T
<aeth> They are usually but not always simple-arrays. Non-simple arrays include adjustable arrays and displaced arrays.
<aeth> BrokenCog: Note though that it's not a function, it's a thing that you use in TYPEP quoted, in CHECK-TYPE or DECLARE not quoted, or in DEFTYPE (to define a new type) quoted/quasiquoted.
<aeth> so while people call Common Lisp a Lisp-2 it's more accurately described as a Lisp-3 here because the types have their own namespace.
<edgar-rft> note that ASSOC has a :TEST parameter, so there is not only one type of a-lists, instead there are *lots* of vspecialized a-list types for every imaginable function that can be uses as :TEST
<aeth> yes, that's what I was trying to get at with what makes a valid and/or useful key in an alist... it depends on what test you're going to use on it!
<BrokenCog> so, within that deftype the (array) is a type check?
<aeth> BrokenCog: no it's a type spec
<BrokenCog> which returns T or NIL?
<BrokenCog> based on what?
<aeth> ,(deftype vec3 () `(simple-array single-float (3))) ,(typep (make-array 3 :element-type 'single-float :initial-contents '(1f0 2f0 3f0)) 'vec3)
<ixelp> (deftype vec3 () `(simple-array single-float (3))) => VEC3, and then (typep (make-array 3 :element-type 'single-float :initial-contents '(1f0 2f0 3f0)) 'vec3) => T
<BrokenCog> (array) is synonymous with (simple-array)?
<aeth> no, array is a superset of simple-array
<aeth> (typep (make-array 3 :initial-element 0) 'simple-array)
<aeth> ,(typep (make-array 3 :initial-element 0) 'simple-array)
<ixelp> (typep (make-array 3 :initial-element 0) 'simple-array) => T
<aeth> ,(typep (make-array 3 :initial-element 0 :adjustable t) 'simple-array)
<ixelp> (typep (make-array 3 :initial-element 0 :adjustable t) 'simple-array) => NIL
<aeth> this isn't the only way to use types, you may use them in e.g. CHECK-TYPE instead, but CHECK-TYPE doesn't do anything if it's of the correct type
<aeth> ,(let ((a (make-array 3 :initial-element 0))) (check-type a simple-array) a)
<ixelp> (let ((a (make-array 3 :initial-element 0))) (check-type a simple-array) a) => #(0 0 0)
<aeth> it's probably best just to play around with a bunch of variations of this in the REPL
<aeth> there's an array form and an (array ...) form as well as a simple-array form and a (simple-array ...) form as well as vectors (1D arrays!) so it gets a bit confusing/complicated
<BrokenCog> that's what Ive been doing ... but I couldn't figure out what (array ,type 1) was doing. It seemed to be predicate testing ,type is a 1 dim array ... but now I see i only works in the deftype context.
<aeth> well, in a type context (declare, typep, deftype, check-type, ...)
<aeth> ,(typep "string" '(simple-array character (6)))
<ixelp> (typep "string" '(simple-array character (6))) => T
<jcowan> I would say that a plist needs unique symbol keys, which makes it expensive to check
<BrokenCog> a structure was suggested rather than an alist, but, I'm unclear what that would look like ... isn't an alist a structure?
<BrokenCog> (sequence of members)
<aeth> alists and plists aren't particularly structured because there's nothing to enforce the assumed constraints and it's quite expensive to test
<aeth> as opposed to using defclass or defstruct or, heck, even a hash table has more enforcement of the constraints
<aeth> alists and plists still show up all of the time, especially inside of macros
<aeth> or, heck, if assumed to be immutable, even a 2D array (because it will always have two elements, though that doesn't enforce the uniqueness of keys)
<aeth> s/two elements/two elements per row/
<aeth> you can, however, write wrapper functions around anything and assume that things are just going to break if someone modifies the underlying alist/plist/etc. directly
<aeth> this stops you from having to call an expensive function to verify that it's a valid (to varying degrees of valid!) alist or plist every time
<BrokenCog> I get it.
occ has joined #commonlisp
tasty_ has quit [Quit: bye bye!]
<BrokenCog> I think defstruct is what I should use. that was my first incinatoin and I didn't think about defstruct!
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
<mfiano> It is rarely a good idea to use defstruct, as you're throwing out a lot about the languages dynamism in doing so (at least portably).
<mfiano> If you are performance constrained, sure. But I hope you have a proof of concept product ready to be launched, first, or similar.
<aeth> defstruct is deceptive because it has simple syntax
<mfiano> You can get the same inlining of type hinted accessors with a custom metaclass using the MOP, if you really wanted to avoid them still.
<aeth> but defstruct is really not that useful, not even in its alternate form where it's backed by an array and just creates accessors (because it doesn't create the type! and if you have to do that in a macro anyway, might as well write your own set!)
<aeth> imo, defstruct's place is when you need typed slots, especially when they're well-specified (so you probably won't ever need to redefine it), so e.g. dealing with certain kinds of formats
<BrokenCog> cl-json I thinik uses an alist to represent the json data?
<aeth> cl-json's primary claim to being the go-to JSON library in CL is that it got the name "cl-json" first
<BrokenCog> I can see that.
<aeth> for instance, it does nil <-> null and nil <- false, which shows such a basic misunderstanding of what NIL is in Common Lisp that I'm not sure I can trust it beyond the documentation (but, hey, at least it has documentation)
<BrokenCog> and thigns grow roots after ten years ...
<aeth> if you use an alist or plist for JSON, you create an up to four way ambiguity between [], {}, null (bad no no no NIL is not null bad why why why), and false
<BrokenCog> json library suggestion?
<Nilby> jsown or com.inuoe.jzon
<aeth> I think everyone writes a json library
<aeth> but treating NIL as a language's null (although tbf CL has some terrible naming, giving NIL the type NULL and the predicate NULL when, in fact, it is functionally a false and the empty list and not a null thing since null needs to be distinct from false and kind of breaks type systems)
<aeth> is pretty bad
<aeth> the other thing to look out for is how {} is represented because there are many ways to do it with different tradeoffs
<aeth> while [] is usually just list or vector
beach` is now known as beach
igemnace has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.2.1]
<markasoftware> Is there any easy way, eg in Slime, to set a number of expressions to "watch", and every time I evaluate another sexp, the value of those expressions updates?
<markasoftware> Use case is that I'm designing a piece of furniture, and have some mathematical expressions for the different dimensions based on a few base variables, and want to see how those dimensions update as I play around with the variables.
<markasoftware> Would be really easy to do this in a spreadsheet or even Desmos, but I always prefer CL!
<beach> It would be a breeze to write a CLIM application to do that. But I guess you could also define a generic function for updating each of the variables. Then an :AFTER method on that generic function could compute the expressions.
<aeth> you could have a hidden *special* variable
Pixel_Outlaw has quit [Quit: Leaving]
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
AetherWind has joined #commonlisp
msavoritias has joined #commonlisp
decweb has quit [Ping timeout: 268 seconds]
<aeth> (defvar *x* 42) (defun x () *x*) (defun (setf x) (value) (setf *x* value))
<aeth> so you (setf (x) 45) and now (x) is 45 instead of 42
<aeth> though technically you could also do that as a lexical closure
<aeth> but then it's all one form when you recompile it (all getters/setters as well as all of the variables' defaults themselves)
<aeth> to be clear, the function (setf x) can update everything, not just *x*
<jcowan> IMO the Right Thing for JSON mapping is: JSON array <-> CL general vector, JSON object <-> alist, JSON null <-> symbol NULL (or perhaps :NULL), and the obvious mappings for strings, numbers, and booleans
<Mondenkind> say, what is the 'obvious' mapping for numbers?
<Mondenkind> json doesn't specify a numeric format
<Mondenkind> 2.1 will not be exactly representable as a float in most implementations. Should it be a rational?
<jcowan> If there's a period or exponent, then default float, otherwise integer
<jcowan> people who write JSON numbers generally expect them to be understood as floats, though the spec doesn't prescribe that. Alternatively, map every JSON number to a float.
<jcowan> s/write/write non-integral
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
mulk has quit [Ping timeout: 264 seconds]
AetherWind has quit [Quit: leaving]
st_aldini has quit [Ping timeout: 268 seconds]
AetherWind has joined #commonlisp
mulk has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
mulk has quit [Ping timeout: 264 seconds]
mulk has joined #commonlisp
yvm has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
Mondenkind has quit [Quit: !]
childlikempress has joined #commonlisp
eriedaberrie has joined #commonlisp
childlikempress is now known as Mondenkind
wacki has joined #commonlisp
treflip has joined #commonlisp
oneeyedalien has joined #commonlisp
igemnace has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
mulk has quit [Ping timeout: 256 seconds]
mulk has joined #commonlisp
occ has quit [Ping timeout: 268 seconds]
treflip has quit [Remote host closed the connection]
varjag has joined #commonlisp
danse-nr3 has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
eriedaberrie has quit [Remote host closed the connection]
traidare has joined #commonlisp
bendersteed has joined #commonlisp
shka has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
danse-nr3 has quit [Ping timeout: 264 seconds]
danse-nr3 has joined #commonlisp
jack_rabbit has quit [Ping timeout: 260 seconds]
lagash has quit [Ping timeout: 260 seconds]
mgl_ has joined #commonlisp
dcb has quit [Quit: Connection closed for inactivity]
danse-nr3 has quit [Ping timeout: 264 seconds]
dino_tutter has joined #commonlisp
danse-nr3 has joined #commonlisp
occ has joined #commonlisp
random-nick has joined #commonlisp
johnjaye has quit [Ping timeout: 264 seconds]
szkl has joined #commonlisp
Gleefre has joined #commonlisp
jmdaemon has quit [Ping timeout: 246 seconds]
bilegeek has quit [Quit: Leaving]
yitzi has joined #commonlisp
pawa2 has joined #commonlisp
lucasta_ has joined #commonlisp
lucasta_ has quit [Client Quit]
lagash has joined #commonlisp
AndreiDuma has joined #commonlisp
ronald_ has joined #commonlisp
Gleefre has quit [Ping timeout: 250 seconds]
yitzi has quit [Remote host closed the connection]
ronald has quit [Ping timeout: 260 seconds]
Gleefre has joined #commonlisp
pawa2 has quit [Quit: leaving]
rtypo has joined #commonlisp
danse-nr3 has quit [Ping timeout: 256 seconds]
tyson2 has joined #commonlisp
jeffrey has quit [Remote host closed the connection]
traidare has quit [Ping timeout: 268 seconds]
yitzi has joined #commonlisp
AetherWind is now known as awlygj
johnjaye has joined #commonlisp
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rbcarleton has joined #commonlisp
a51 has joined #commonlisp
danse-nr3 has joined #commonlisp
AndreiDuma has joined #commonlisp
AndreiDuma has quit [Quit: Textual IRC Client: www.textualapp.com]
decweb has joined #commonlisp
josrr has joined #commonlisp
cage has joined #commonlisp
traidare has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.0]
szkl has quit [Quit: Connection closed for inactivity]
jack_rabbit has joined #commonlisp
jonatack has joined #commonlisp
Gleefre has quit [Ping timeout: 250 seconds]
<beach> dnhester26: I think I fixed the broken link in the MOP repository. Two files were modified, one was added, and four were deleted.
<beach> dnhester26: Let me know if you encounter any other problems.
jon_atack has quit [Ping timeout: 260 seconds]
<beach> In summary, CLASS-DIRECT-SUBCLASSES does not have four methods (specialized to STANDARD-CLASS, FUNCALLABLE-STANDARD-CLASS, FORWARD-REFERENCED-CLASS, and BUILT-IN-CLASS respectively) as one might be led to believe from the table on page 215 in the AMOP book, but a single method (specialized to CLASS) that behaves according to that table for different types of arguments.
<beach> mop class-direct-subclasses
<ixelp> class-direct-subclasses
lucasta has joined #commonlisp
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
kevingal__ has joined #commonlisp
bjorkint0sh has quit [Quit: Leaving]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
azimut has joined #commonlisp
ronald_ has quit [Read error: Connection reset by peer]
fe[nl]ix has quit [Quit: Valete!]
ronald has joined #commonlisp
fe[nl]ix has joined #commonlisp
<josrr> (eq 1 1)
<varjag> T
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
<josrr> ja!, sorry wrong window, again.
<beach> josrr: ,(eq 1 1)
<ixelp> (eq 1 1) => T
<beach> josrr: Implementation specific result.
igemnace has quit [Read error: Connection reset by peer]
<josrr> beach: "However, numbers with the same value need not be eq"
<beach> Exactly.
kevingal has quit [Remote host closed the connection]
rbcarleton has quit [Remote host closed the connection]
rbcarleton has joined #commonlisp
bjorkintosh has joined #commonlisp
Gleefre has joined #commonlisp
kevingal__ has quit [Ping timeout: 260 seconds]
kevingal_ has quit [Ping timeout: 260 seconds]
igemnace has joined #commonlisp
_cymew_ has quit [Ping timeout: 264 seconds]
danse-nr3 has quit [Ping timeout: 260 seconds]
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
awlygj has quit [Ping timeout: 264 seconds]
awlygj has joined #commonlisp
danse-nr3 has joined #commonlisp
<thuna`> Is there any implementation that actually has them as non-eq?
<beach> I was toying with the idea of making BOCL be such an implementation.
<thuna`> What's the advantage?
<beach> Catch errors in code that might rely on non-conforming behavior.
<thuna`> If it's conforming in virtually all cases, is it really non-conforming?
<thuna`> (The answer is yes but still)
manicennui has quit [Ping timeout: 268 seconds]
<beach> I don't understand.
<thuna`> It's just, if (EQ 1 1) is T in all widely-used implementations, then even though it's non-conforming it's not something that will realistically cause a problem
manicennui has joined #commonlisp
<thuna`> Even in future implementations, I don't see any benefits to having (EQ 1 1) be nil, so I would consider it "basically-conforming"
occ has quit [Ping timeout: 264 seconds]
<beach> That's true, but it is considered bad style to use EQ on numbers, so i am sure that people who do that by accident would want to be informed. And an implementation that is very strict about it would more easily catch things like that.
<beach> Take for instance code that uses an EQ hash table, and then use integers as keys. That can very well happen, and their code would have a hard-to-find bug that would manifest itself only when keys are greater than the largest fixnum.
awlygj has quit [Quit: Lost terminal]
<beach> And since the largest fixnum is also an implementation-specific value, the bug could manifest itself differently on different Common Lisp implementations.
<thuna`> That is true, although I would consider it a part of the compiler's responsibilities rather than EQ
jon_atack has joined #commonlisp
<Nilby> If (eq 1 1) is always T you may not be able tell if numbers are stored in different locations. So maybe (eq 1 1) => but maybe (let ((x 1)) (eq x 1)) => NIL Numbers really are stored in different places so having eq always be T blinds you to that.
jonatack has quit [Ping timeout: 246 seconds]
<beach> Nilby: Nah. Usually, small integers are not stored in any locations at all, but encoded in the pointer. So they preserve EQ-ness when copied.
a51 has joined #commonlisp
AetherWind has joined #commonlisp
cage has quit [Remote host closed the connection]
szkl has joined #commonlisp
st_aldini has joined #commonlisp
<beach> Nilby: Does that make sense?
<beach> thuna`: What made you think that EQ would be involved in this issue? It just compares pointers.
<Nilby> It can be confusing to new programmers that (let ((x 1/2)) (eq 1/2 x)) is sometimes NIL on some implementations.
<thuna`> beach: I meant that in reference to you saying that you were considering having EQ on numbers be nil in BOCL to catch errors
rbcarleton has quit [Remote host closed the connection]
<beach> Nilby: But now you are changing the subject from small integers to ratios.
rbcarleton has joined #commonlisp
<beach> thuna`: Yes, but that would not involve EQ at all. It would just represent numbers as pointers and allocate a new number when the number is copied.
<beach> ,(let ((x 1/2)) (eq 1/2 x))
<ixelp> (let ((x 1/2)) (eq 1/2 x)) => T
<beach> Nilby: Ratios are very likely allocated on the heap, so in this example, EQ returns T probably because the two instances of 1/2 were coalesced.
<beach> ,(let ((x (/ 1 2))) (eq 1/2 x))
<ixelp> (let ((x (/ 1 2))) (eq 1/2 x)) => T
<beach> Hmm, interesting.
<beach> Oh, constant propagation of course.
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
<younder> So eq'ness is broken if you compute a number that is a fraction?
yitzi has quit [Remote host closed the connection]
<younder> Whatever use eql for numbers right..
<beach> younder: It is not broken. EQ should not be used on numbers at all. But, it is very unlikely that a ratio would be possible to represent in a pointer the way that most implementations do with small integers.
<beach> younder: So it is very unlikely (barring coalescing) that two ratios would be EQ in any current implementation.
bendersteed has quit [Quit: bendersteed]
_cymew_ has joined #commonlisp
<younder> ,(eql 1/2 (/ 1 2))
<ixelp> (eql 1/2 (/ 1 2)) => T
<younder> ,(eq 1/2 (/ 1 2))
<ixelp> (eq 1/2 (/ 1 2)) => NIL
dra has quit [Ping timeout: 256 seconds]
<younder> ,(eq .5 (/ 1.0 2.0))
<ixelp> (eq .5 (/ 1.0 2.0)) => NIL
<younder> ,(eql .5 (/ 1.0 2.0))
<ixelp> (eql .5 (/ 1.0 2.0)) => T
<younder> Just like I would expect..
<gilberth> Well, would that have been the 64-bit version of CCL, (eq .5 (/ 1.0 2.0)) would have been T.
<younder> Yeah.. In SBCL (64 bit) it is T
a51 has quit [Quit: WeeChat 4.2.0]
Gleefre has quit [Remote host closed the connection]
<younder> Always helpful to know how make code that breaks on 32 bit machines :)
* younder has visions of C and int
<gilberth> Whoever specified the ABI for AMD64 was a coward. IMHO 'int' here should have been 64-bit. Somewhere it is said that 'int' is thought to reflect the natural word.
<gilberth> 'short' could have been 32-bit and there could have been a 'short short int' for 16-bit :-)
a51 has joined #commonlisp
<younder> int is supposed to be the largest signed integer that can fit in a register. For performance reasons.
<gilberth> Yes, and that is 64-bit. Not 32-bit like with the AMD64 SYSV ABI.
<younder> Works particularly well when it will just wrap around if increment above max int ;)
traidare has quit [Ping timeout: 260 seconds]
<gilberth> Yes, it's not an integer data type to begin with. It's misnamed.
<younder> modular ring type perhaps?
<gilberth> Like that. They should have called it 'mod' instead.
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
dra has joined #commonlisp
dra has joined #commonlisp
Posterdati has quit [Ping timeout: 256 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
danse-nr3 has quit [Ping timeout: 246 seconds]
dra has quit [Ping timeout: 264 seconds]
<aeth> ixelp isn't logged on the logs, which makes reading this conversation a bit weird because it's based on the output of evaluating expressions whose result is not logged
<beach> I wonder why it is not logged.
<thuna`> It's a notice is the only reason I can think of
<aeth> yes, it uses NOTICE instead of PRIVMSG
* aeth wonders if this is logged
<aeth> apparently logged as "aeth ACTION wonders if this is logged"
<thuna`> Why is ixelp using NOTICE anyways?
<aeth> the spec
<aeth> one of the RFCs says that bots should use NOTICE and never respond to a NOTICE so they don't get in an infinite loop of replying to each other
<aeth> iirc
<aeth> in my over 20 years of IRCing, only ixelp has ever done that
<thuna`> The "don't respond to NOTICE" thing is for all clients and servers iirc, not just bots
mjhika has joined #commonlisp
Gleefre has joined #commonlisp
<thuna`> rfc1459#4.4.2: "The difference between NOTICE and PRIVMSG is that automatic replies must never be sent in response to a NOTICE message. This rule applies to servers too..."
<bike> NOTICE is supposed to be for bot use. but clients tend to highlight it as being something super important so bots usually don't bother with it. whoever wrote ixelp is more stringent, i guess.
<aeth> I think NickServ, etc., may use NOTICE
markb1 has quit [Ping timeout: 260 seconds]
Posterdati has joined #commonlisp
AetherWind has quit [Quit: leaving]
johnjaye has quit [Ping timeout: 260 seconds]
wacki has quit [Ping timeout: 256 seconds]
vyrsh has joined #commonlisp
villageidiot has joined #commonlisp
markb1 has joined #commonlisp
wacki has joined #commonlisp
vyrsh has quit [Client Quit]
vyrsh has joined #commonlisp
dcb has joined #commonlisp
cage has joined #commonlisp
villageidiot has quit [Quit: Client closed]
johnjaye has joined #commonlisp
rbcarleton has quit [Remote host closed the connection]
rbcarleton has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
tyson2 has quit [Remote host closed the connection]
waleee has joined #commonlisp
lucasta has quit [Quit: Leaving]
ym has joined #commonlisp
yitzi has joined #commonlisp
ronald_ has joined #commonlisp
waleee has quit [Ping timeout: 276 seconds]
waleee has joined #commonlisp
kztx has joined #commonlisp
ronald has quit [Ping timeout: 264 seconds]
ronald has joined #commonlisp
attila_lendvai_ has joined #commonlisp
ronald_ has quit [Ping timeout: 256 seconds]
Gleefre has quit [Remote host closed the connection]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 260 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
vyrsh has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
johnjaye has quit [Ping timeout: 264 seconds]
<jcowan> One a certain channel (which I do not choose to name) there used to be four bots running, and a well-crafted prompt message would produce 8 responses (fortunately not an infinite number). It was something like "foo, tell bar that baz ..." but I don't remember the prompt exactly.
tyson2 has joined #commonlisp
<gilberth> Well, regarding to using NOTICE: I'm just a bit paranoid, especially as you can make ixelp say whatever you want.
azimut has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
Gleefre has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
wacki has joined #commonlisp
ronald has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
ronald has quit [Ping timeout: 260 seconds]
ronald has joined #commonlisp
josrr has quit [Remote host closed the connection]
rbcarleton has quit [Remote host closed the connection]
rbcarleton has joined #commonlisp
<aeth> ,"Aeth is the best."
<ixelp> "Aeth is the best." => "Aeth is the best."
<aeth> thanks, ixelp
<aeth> of course, written like that, it seems more like a p => p logical tautology
mgl_ has quit [Ping timeout: 260 seconds]
msavoritias has quit [Ping timeout: 256 seconds]
jmdaemon has joined #commonlisp
<ixelp> aeth: Would you please stop playing with me?
johnjaye has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
paule32 has left #commonlisp [Leaving]
attila_lendvai_ is now known as attila_lendvai
johnjaye has quit [Remote host closed the connection]
varjag has joined #commonlisp
johnjaye has joined #commonlisp
Lycurgus has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
ronald has joined #commonlisp
scymtym has quit [Remote host closed the connection]
scymtym has joined #commonlisp
lucasta has joined #commonlisp
Lycurgus has quit [Quit: leaving]
tyson2 has joined #commonlisp
<NotThatRPG> gilberth: Is that supposed to be an empty page?
<NotThatRPG> oh, I see....
Posterdati has quit [Ping timeout: 260 seconds]
luis1903 has joined #commonlisp
ronald_ has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
Posterdati has joined #commonlisp
mgl_ has joined #commonlisp
_cymew_ has quit [Ping timeout: 252 seconds]
deadmarshal_ has quit [Ping timeout: 255 seconds]
dra has quit [Ping timeout: 264 seconds]
Gleefre has quit [Remote host closed the connection]
mgl_ has quit [Ping timeout: 264 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
gxt has quit [Remote host closed the connection]
mgl_ has joined #commonlisp
gxt has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
yitzi has quit [Remote host closed the connection]
zetef has joined #commonlisp
zetef has quit [Remote host closed the connection]
igemnace has quit [Read error: Connection reset by peer]
deadmarshal_ has joined #commonlisp
<jcowan> thuna`: De facto, fixnums are eq to themselves, bignums are not.
shka has quit [Ping timeout: 276 seconds]
<jcowan> IMO, eq should not be used at all unless you have proved that the resulting speed improvement (a) exists and (b) is necessary for your use case. It is a performance hack, whereas eql is Lisp's identity predicate.
<edgar-rft> bad news: there can be temporary copies of fixums in CPU registers what makes them not EQ any longer
igemnace has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
Lycurgus has joined #commonlisp
wacki has quit [Quit: Textual IRC Client: www.textualapp.com]
mgl_ has quit [Ping timeout: 264 seconds]
Lycurgus has quit [Client Quit]
amb007 has quit [Ping timeout: 240 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #commonlisp
Jach has quit [Quit: Leaving.]
<BrokenCog> so, I have a bit of data: (setq blob '("asdfasdfsadf" json-str)). If I do: (jsown:parse json-sttr) I get (:OBJ) correctly. If I do: (jsown:parse (cdr blob)) I get an error: The value "{\"..." is not of type CHARACTER
<BrokenCog> when setting an element of (ARRAY CHARACTER)
<BrokenCog> (the value ... is the json-str
johnjaye has quit [Ping timeout: 246 seconds]
kevingal_ has quit [Ping timeout: 252 seconds]
kevingal has quit [Ping timeout: 252 seconds]
<bike> should it not be (second blob)?
<BrokenCog> isn't that cdr?
<BrokenCog> hm, guess not. (second blob) works.
<random-nick> SECOND is CADR
<random-nick> FIRST is CAR, SECOND is CADR, THIRD is CADDR, etc.
<BrokenCog> I didn't think it was the same. I guess (cdr blob) is returning a list of the second item ... i thought it just returns the second item.
<random-nick> CDR has an alias called REST
johnjaye has joined #commonlisp
<BrokenCog> right. I knew that. car returns the first itme, cdr returns a list of everything else.
rgherdt has joined #commonlisp
amb007 has joined #commonlisp
johnjaye has quit [Ping timeout: 276 seconds]
pranavats has left #commonlisp [Error from remote client]
johnjaye has joined #commonlisp
gxt has quit [Ping timeout: 255 seconds]
rbcarleton has quit [Remote host closed the connection]
gxt has joined #commonlisp
rbcarleton has joined #commonlisp
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #commonlisp
johnjaye has quit [Client Quit]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
jack_rabbit has quit [Ping timeout: 264 seconds]
amb007 has quit [Ping timeout: 256 seconds]
<Kingsy> Hi all, I have a question. I was looking to play around with the sqlite package in common lisp. it exposes a function called "connect" but thats quite a common name. how can I namespace that function so it doesnt interfere with other functions in my package?
<random-nick> you can avoid putting the package in :USE and refer to symbols from that package with a namespace prefix, and if the package name is too long you can also use a local package nickname to change which prefix you use
<random-nick> if you want to continue using :USE, then you can put CONNECT into your package's :SHADOW
<random-nick> which makes a symbol called CONNECT in your package and makes ignores any with the same name from packages in :USE
<Kingsy> oh of course. not sure about the :shadow point though, what do you mean by makes ignores? you mean its not possible if you use :shadow to create a function ni the package called connect? it will just ignore it?
pranavats has joined #commonlisp
<Inline> when it's shadowed, :use won't have any effect
<Kingsy> no fair enough, but what does the shadow do?
<Inline> :shadow this-symbol that-symbol
<Inline> it overrides symbols from other packages
<Inline> so even when you pull in symbols from other packages via :use when they are also in the :shadow list, they are overriden
<Inline> i.e. any mention of some symbol from then on in your package will be a new symbol
josrr has joined #commonlisp
<Kingsy> thanks! I will have to read a bit but I think I understand
<Inline> so when you mention connect it will be the connect in your package not some <other-package>::symbol
<Inline> err <other-package>::connect
pranavats has left #commonlisp [Error from remote client]