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/>
ec has quit [Ping timeout: 258 seconds]
ec has joined #commonlisp
pdietz has quit [Ping timeout: 244 seconds]
pdietz has joined #commonlisp
<pdietz> It might be nice to have the keyword args of a function represented by some object other than a plist, an object that had operations for adding, removing, or override keyword args, and that could be passed as the last arg to APPLY in place of a list.
motherhucker has joined #commonlisp
jeosol has joined #commonlisp
motherhucker has quit [Client Quit]
<Catie> (apply #'function :args args :keywords keys)
causal has joined #commonlisp
shka has joined #commonlisp
Lycurgus has joined #commonlisp
hexology has quit [K-Lined]
hexology has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life has joined #commonlisp
pdietz has quit [Ping timeout: 244 seconds]
tasty_ has quit [Quit: rebooting for kernel updates]
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
scymtym has quit [Remote host closed the connection]
Brucio-61 has quit [Remote host closed the connection]
cosimone` has quit [Remote host closed the connection]
ryanbw has quit [Ping timeout: 250 seconds]
cosimone has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
edgar-rft has quit [Ping timeout: 272 seconds]
edgar-rft has joined #commonlisp
Lycurgus has quit [Quit: Exeunt juan@acm.org]
mariari has quit [Ping timeout: 260 seconds]
mariari has joined #commonlisp
<jcowan> Catie: Yes, that works, but it's horribly easy to get wrong.
<jcowan> I've always hated constructions like INSERT INTO foo(a, b, c, d) VALUES (1,2,3,4)
<jcowan> looks okay with four, but when there are seventeen, ugh.
<jcowan> hence a hashtable or equivalent (alist, plist, etc.)
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
<Bike> python has apply and also second class keyword arguments (or so), but the syntax is really weird and every time i've had to deal with it it's been annoying
<hayley> def funcall(f, **kwargs): f(**kwargs) # from memory?
<Bike> something like that
JeromeLon has quit [Read error: Connection reset by peer]
<Bike> it gets weird when you try to mix the one and two asterisk forms
<hayley> From memory, one has to use a special keyword-apply to apply with keyword arguments in Racket.
tyson2 has quit [Remote host closed the connection]
JeromeLon has joined #commonlisp
azimut has quit [Ping timeout: 258 seconds]
dipper has quit [Remote host closed the connection]
tasty has quit [Quit: rebooting for kernel updates]
ski has joined #commonlisp
ritchie101 has joined #commonlisp
ritchie101 has quit [Remote host closed the connection]
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
igemnace has joined #commonlisp
ec has quit [Ping timeout: 258 seconds]
ec has joined #commonlisp
aartaka has joined #commonlisp
dipper has joined #commonlisp
dipper has quit [Remote host closed the connection]
pve has joined #commonlisp
xlarsx has joined #commonlisp
xlarsx has quit [Remote host closed the connection]
dipper has joined #commonlisp
dipper has quit [Remote host closed the connection]
ritchie101 has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
dipper_ has joined #commonlisp
aartaka has joined #commonlisp
ritchie101 has quit [Remote host closed the connection]
dipper_ has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
<beach> In several applications I have written, I use a simple module that can be used to clone or write an instance of a standard class. It consists of a generic function (for now called SAVE-INFO, but that will probably change) with an APPEND method combination, and a macro DEFINE-SAVE-INFO.
<beach> Client code invokes the macro to define how instances of their standard classes should be queried for complete information (usually a subset of the slots, given in the form of an initarg and a slot reader). Because of the APPEND method combination, only incremental information for each class is given.
<beach> Now I am thinking of extracting this code into a separate (very small) repository. I have a name for it: Clonedijk, but I would like to know whether anyone can think of ways in which it needs to be generalized in order to be more useful.
<beach> So any ideas?
enzuru has joined #commonlisp
<beach> I currently use it in Cleavir (version 1) to serialize ASTs, and I use it in Clobber to serialize whatever objects the user wants, and probably in more places as well that I can't remember right now.
<beach> And I have found a use for it in SICL itself, which is why I am now thinking of extracting it.
<beach> Perhaps I should add a CLIENT parameter like we do in several other libraries.
<jdz> ecraven: If you have not looked into it yet, maybe you need the clone(2) syscall.
<ecraven> jdz: thanks! I'll read up on that
<ecraven> just idly wondering how what beach described in closos.pdf would work in practice ;)
ryanbw has joined #commonlisp
thuna` has joined #commonlisp
mikko has joined #commonlisp
<phoe> ecraven: given enough work, why not
<ecraven> I'm not wondering about whether, but about how ;)
<mikko> can someone explain what this backtrace means https://bpa.st/QEMA – i gave fn as a parameter but it claims it's undefined?
<phoe> mikko: (fn x) → (funcall fn x)
<mikko> very new to common lisp, just trying to solve a codewars problem here
<phoe> variable and function namespaces are separate in CL, so if FN is a function object passed as a variable then you need to explicitly FUNCALL it
<phoe> s/as a variable/as a value, bound to a variable/
<mikko> hmm so if i do (fn x) and fn is "sin" it would do (sin x) ?
<ecraven> (fn x) assumes there is a function binding, but fn is bound as a variable name, not a function name
<ecraven> mikko: no, (x 1 2 3) always looks up x in the *function* namespace (where x is maybe not bound), not in the *variable* namespace
<phoe> if you do (let ((fn #'sin)) (funcall fn x)) then it's equivalent to (sin x)
<ecraven> mikko: that's why you need ' *and* #' in common lisp (but not in some other lisps)
<phoe> but the #' operator, or the FUNCTION operator, grabs a function from the function namespace and binds it in the variable namespace
<mikko> i see
<mikko> is there a way to take function as parameter without going through the variable namespace? or do you always need to do the funcall thing?
<beach> The latter.
<mikko> got it, thanks all
<beach> Good luck.
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest1343
dipper_ has joined #commonlisp
_cymew_ has joined #commonlisp
lisp123 has joined #commonlisp
<contrapunctus> beach: isn't that what you also do in Clobber?
<beach> It is.
* beach thinks he mentioned Clobber.
<contrapunctus> Ah, right, you did.
dipper_ has quit [Remote host closed the connection]
ttree has quit [Ping timeout: 250 seconds]
<beach> Also in Compta and Doclang it seems. Two more reasons to extract it.
lisp123 has quit [Read error: Connection reset by peer]
dipper_ has joined #commonlisp
dipper_ has quit [Remote host closed the connection]
chipxxx has quit [Ping timeout: 250 seconds]
chipxxx has joined #commonlisp
chipxxx has quit [Remote host closed the connection]
chipxxx has joined #commonlisp
dre has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
morganw has joined #commonlisp
iceman[m] has quit [Quit: You have been kicked for being idle]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
KaitoDaumoto has quit [Remote host closed the connection]
akoana has joined #commonlisp
<_death> beach: did you mean an instance of a standard object? maybe letting the user specify a constructor name (or define a constructor method, if a client parameter is used) could be interesting
<beach> That's a possibility yes.
random-jellyfish has joined #commonlisp
<_death> also, maybe the "info" could be a standard object itself.. so that a client could extend (by subclassing) with more properties
dre has quit [Quit: Leaving]
<beach> Can you give an example of what you mean? I can't quite understand it.
random-jellyfish has quit [Client Quit]
dipper_ has joined #commonlisp
<beach> No, I meant an instance of a standard class. Only classes can have instances so an instance of a standard object does not always work. An instance of STANDARD-OBJECT might work, but not all standard objects can be cloned this way.
<_death> if I understand correctly, save-info returns a list of "info" objects, represented as lists in the form (initarg reader) .. when serialized, the initarg is written, followed by the value of (funcall reader object)
<beach> Correct.
<beach> But I am not planning to include serialization in this library.
<beach> Just the clone information, since it can be used for cloning as well.
<_death> I guess a user can use "special" initargs/readers to store more context so there's no real need for a more elaborate representation
<beach> Yes, the information does not necessarily correspond to slots. It is instead derived from the intrinsic properties of objects and classes in a typical CLOS protocol.
<beach> So an object can be queried for various pieces of information, and a class can be instantiated by giving make-instance a bunch of pairs of initargs and values.
random-nick has joined #commonlisp
<_death> for clobber, adding a client parameter could also mean that a different serialization format can be used.. so maybe serialize could be split into steps to make such extensions easier
<beach> Yeah, I need to contemplate the CLIENT parameter.
attila_lendvai has joined #commonlisp
<_death> though then load-transaction-log would also need to be "protocolized", so that the read-based format is only a contingency
<beach> I guess you are looking specifically at Clobber?
<_death> yes, because that's where I know save-info/define-save-info from
<beach> The plan so far is to exclude serialization and deserialization from the library, and just provide that one generic function and that one macro.
<_death> I understand.. because it may be useful for other purposes
<beach> Exactly. I use it in at least 4 places.
<_death> but it just reinforces the idea of a client parameter
<beach> I agree. I should consider that one.
<_death> wrt to instance of standard class/object, it was confusion on my part.. I thought "instance of type standard class"
<beach> OK.
<_death> I also agree that the name save-info is not very good
<beach> Definitely.
<beach> I went for CLONE-INFORMATION.
<_death> if reader+writer=accessor, initarg+reader=?
<beach> I have not seen a term for that pair.
<_death> consessor :)
<beach> ... but it deserves one.
<hayley> Is there a word for a function and its inverse?
<beach> Hmm, good question. I can't think of any such word.
<hayley> Extracting slots in a functional language is (also) called a "destructor" sometimes.
<hayley> By "sometimes" I mean I saw the term used once, and had to massage the words I gave to Google substantially to find another occurrence of "destructor" being used in that way.
<_death> I associate "destructor" with Stroustrup.. maybe you mean destructurer?
<hayley> I think it's a category theory thing.
<hayley> Quoting <https://maartenfokkinga.github.io/utwente/mmf91j.pdf#page=10>: "We might call α a “constructor”, since in Set each element of a can be obtained as an outcome of α for precisely one argument, called the “constituents” of the element. The inverse α∪ is then a “destructor”; it maps each element of a into the constituents."
<_death> for category theory, function+inverse = isomorphism
<_death> ?
<hayley> Oh, that use of "destructor" seems specific to category theory.
random-nick has quit [Ping timeout: 240 seconds]
chipxxx has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
<_death> in general, if one speaks of constituents, maybe "composition" and "division" are better terms to use (remember those logical fallacy names?) but maybe in that specific case, could be confused with function composition so avoided
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 272 seconds]
ec has quit [Ping timeout: 258 seconds]
gxt has quit [Ping timeout: 258 seconds]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
gxt has joined #commonlisp
ec has joined #commonlisp
causal has quit [Quit: WeeChat 3.6]
causal has joined #commonlisp
lisp123 has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
gu343111 has quit [Quit: Leaving]
jmdaemon has quit [Ping timeout: 272 seconds]
<lisp123> beach, "What problem would a browser implementation of Emacs solve?" -> Added functionality - Emacs is purely textual - with a browser implementation one can be much more flexible with graphics. But still stay true to as much of the API offered by Emacs. This could be used as a low-level substrate for CL apps
<Colleen> lisp123: dipper said 22 hours, 31 minutes ago: implementing emacs in browser very nice idear, appreciate
<beach> lisp123: I see. Thanks.
<lisp123> So one could envision a CL IDE being built on top of it. I'm writing it in JS/TS (naturally since you have to interface with the browser), but with the aim to expose as much of the elisp functions as possible. Then somebody else can write their CL IDE on top of it
<lisp123> Been about 2-3 months into it so far. Better get back to it, aiming to finish a draft in a year at current pace
<beach> What is being communicated between the browser and the Common Lisp image?
attila_lendvai has quit [Ping timeout: 240 seconds]
<lisp123> The CL image would have equivalent functions for https://www.gnu.org/software/emacs/manual/html_node/emacs/Basic.html
<lisp123> which when run, will send a message (websocket or something) to the browser which would then implement on screen
<beach> What is the nature of the messages being sent? Are they similar to SLIME messages, or more similar to X11 events?
<lisp123> SLIME (because I'm not smart enough to do X11 style, maybe somebody else will)
<beach> I see.
<lisp123> Now one question is where should the data be represented - in the CL side or in the browser implementation, I think it makes sense in the former
<beach> I have no advice to give. The stuff I am working on is meant to move away from this kind of communication between the Common Lisp image and the editor.
<lisp123> That would be a more ideal situation.
Guest1343 has quit [Quit: WeeChat 3.6]
<lisp123> I might try something around that after this project, this has been a good learning experience so far
<beach> So your improvements compared to Emacs are about graphics? Do you have any plans to improve the Common Lisp editing experience compared to that of Emacs, and of so, in what ways?
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest1371
<lisp123> Yes, I'm currently interested purely in adding rich text / graphics to the Emacs experience + actually exposing a sane set of functions for others to build on (surprisingly many online editors don't do this). I have some ideas for improving the CL editing experience but don't have any current plans to develop these
<beach> OK.
<hayley> Has anyone tried pretty printing Lisp code in a way that tolerates different screen sizes? The CL pretty printer is quite clever about fitting into a certain width, but I'm curious as to if there are other approaches.
<lisp123> Here are some quick ideas for improving the CL experience: (i) Ability to refactor easily (e.g. change function name, have all call sites updated), (ii) Spot typos in names, (iii) Spot unused code / functions, (iv) list all usages of a function
<beach> lisp123: How do you plan to implement the additional analyses that are required for these ideas?
<hayley> Philip Wadler wrote about "a prettier printer" which was written in a rather pleasing functional style, but I haven't seen it used for Lisp code before.
<beach> hayley: You might want to check with yitzi, who has studied the subject.
<lisp123> beach, It sort of comes down to your point earlier that the CL image has to have a correct interpretation of symbols (paraphrasing)
<beach> lisp123: Yes, and I know how to do that if the editor runs in the same Common Lisp image, but I don't know how to do it with a wire communication protocol, which is why I am asking.
<lisp123> Haven't really thought about that (my focus is elsewhere atm). Although I think there are some low hanging fruits that could be done and be wrong in edge cases
<beach> I see.
<beach> I don't mean to discourage you. These are things that I just don't understand, so I am asking to improve my understanding. Nothing else.
<lisp123> I know
<lisp123> The thing about Lisp (CL, whatever) IMO is that it's important to get things 100% right if possible
<beach> How is that different from other languages?
<lisp123> Because everything builds upon a few set of primitives. So I'm looking forward to the thorny technical challenges you guys are solving in this space
<lisp123> Okay as a personal example. I was implementing a template method pattern (realised what it was after I did it) where I had a lower-level class implement a general algorithm
<hayley> Does everything build upon a few primitives?
<lisp123> And subclasses override components of that algorithm / supply some functions to be called during that algorithm
<lisp123> Whereas in CL, that whole mess can be avoided because of generic functions
<lisp123> But if generic functions weren't developed as correctly as they are, then it wouldn't work as well as it does today
<lisp123> One thing I'm thinking more about these days is the relative lack of encapsulation in Lisp
<lisp123> Obligatory Reference: https://www.nhplace.com/kent/PS/Name.html
<lisp123> As computer systems get more and more critical in real life, this is one area where IMO lisp could use some further developments
<beach> Packages are used for encapsulation.
<lisp123> But it doesn't enforce it right?
<beach> You don't trust your programmers or yourself to avoid ::?
<beach> If you don't trust the people developing your code, then you have way bigger problems than encapsulation.
<lisp123> Precisely. Imagine a Lisp system all the way down - there are parts of the program(s) where you would want it to be secure
<hayley> @lisp123: Hold my lemonade.
<beach> You mean "secure" so that some of your programmers can't do anything they think they need?
<lisp123> I was thinking more in terms of changing values that should be immutable
causal has quit [Quit: WeeChat 3.6]
<hayley> We could imagine that a user of a multi-user Lisp system probably shouldn't be able to read the data of other users, or hack the compiler to make such mischef possible.
<beach> lisp123: And you can protect from this in other languages, but not in Common Lisp?
<hayley> I agree that few languages are up to the task. Only E, the variant of C# used for Singularly and Newspeak come to mind.
<lisp123> hayley, How does Rust fare in this regard? Or is mostly marketing speak
<hayley> unsafe { }
aartaka has quit [Ping timeout: 240 seconds]
<lisp123> beach, I was of the impression a strongly typed language can enforce characteristics like read only or private variables
aartaka has joined #commonlisp
<beach> Common Lisp is strongly typed.
<hayley> It doesn't have to involve a type system at all. Newspeak has access control and immutable slots, but is dynamically typed.
<beach> The language should help programmers avoid common mistakes by telling them about such mistakes, but the language should not make some things impossible
tyson2 has joined #commonlisp
<beach> lisp123: You would do that in Common Lisp by putting those variables in a separate package and not export their names.
<beach> lisp123: Then you provide either no function for accessing them, just a reader function that reads it, or both a reader and a writer if that is what you want.
<beach> That's what the package system is for.
<hayley> As an example, we might have some class "class C (| private x = 42. |)". x names an immutable and private slot. Trying to send the message x to an instance won't work, as lookup will not retrieve private methods. Trying to send the related assignment message also won't work, as there aren't any relevant methods at all.
<hayley> beach's example in Common Lisp is quite similar. In either case, the access control can be enforced "dynamically" too.
<beach> lisp123: You can think of a traditional object-oriented language as confusing the two ideas of encapsulation and data representation. Luckily, in Common Lisp, those are orthogonal mechanisms.
<lisp123> I see
<lisp123> For example, say I have (defvar *password* "lisp") in a package
<lisp123> How would one avoid an outside program from reading this value?
<hayley> One hopes the password is not stored in plaintext. But it would need to be impossible to produce internal symbols of the package, as to attain a "reference" to the password; or attempts to retrieve bindings of such symbols by SYMBOL-VALUE and the like should fail.
<lisp123> Is that possible in current CL?
<hayley> I don't believe so.
<beach> lisp123: If by "outside program" you mean any old code that you load into your Common Lisp image, then indeed you can't necessarily trust the programmer of that program. But you shouldn't do that. Random code loaded into your Common Lisp image can do arbitrary damage, like erasing your files or plant a Trojan horse in the compiler.
<beach> lisp123: In applications written in most programming languages you can't even do something like that, since you typically have an executable that has been compiled once and for all. The fact that you can in Common Lisp doesn't mean you should.
<lisp123> beach, possibly in an implementation of FCGE there could be an option for restricting access across environments?
<beach> The SICL first-class global environments could have a password associated with them, and the code for the compiler would typically be in a separate environment.
<beach> Then it would be a bit safer to load random code.
<lisp123> That sounds like a good idea
<beach> But now we are talking OS-like functionality and not that of a typical programming language.
<lisp123> Lisp lends itself to such thinking however
<lisp123> So if I could think of any ways to 'improve' lisp (which is already miles ahead of everything else for avoidance of any intent to slander), that's one technical area I think that's lacking
<beach> What area?
<lisp123> Restricting access to variables and functions
<beach> Allowing programmers you don't trust to work on your code?
<beach> Or making it OK to load random code and not have to worry about damage?
<lisp123> Both, but the latter is more convincing for this group (I know the CL community has always had a strong view on the former)
<hayley> "Supply chain attacks" have occurred with dependencies that programmers haven't audited, regardless of language. I think languages should try to avoid such attacks, though the techniques I know of are hardly backwards compatible.
<lisp123> Something like (private (defvar *password* "government-login-kill-switch")) in a mission critical piece of code
<jdz> lisp123: You can do that by using "accessors", and have the value in a lexical environment. But then nothing forbids dumping computer memory and finding that value.
<lisp123> hayley, Yeah I think this is an area of increasing importance. Going off topic, but I can see in the future many critical codebases becoming open-source to increase auditablity
<hayley> In the last year, I have recalled reading incidents involving Python/PyPi, JavaScript/npm and Rust/cargo already. So it appears "everyone" seems equally affected by such an attack.
<lisp123> jdz, do you have example
<jdz> lisp123: (let ((secret-value "bombs go flying)) (defun get-secret-value () secret-value))
<jdz> Note that many programs store secrets by "obfuscating" (encryption is also obfuscation in this context); and hence use of accessors is required, anyway.
<lisp123> jdz, wouldn't a call to get-secret-value return "bombs go flying"
<jdz> lisp123: Yes, isn't that what it should do?
<beach> jdz: I think you missed the level of protection that lisp123 wants.
<jdz> Well, this value cannot be retrieved by enumerating symbols of a package; it might be retrieved using some implementation provided means of inspecting environments. But, again, same can be done by dumping machine memory and inspecting that.
azimut has joined #commonlisp
<lisp123> beach, So the line of thinking I had was CL already has a wonderful condition system, is well suited for building large, robust programs. If I was working in government to create critical codebases, one extra thing I would want is the ability to restrict access. Hence IMO something useful in the future to add
dipper_ has quit [Remote host closed the connection]
<lisp123> jdz, my CL is a bit rusty, get-secret-value wouldn't be added to the package symbol list?
<jdz> lisp123: Yes, but it may accept a parameter (say a passphrase) to decode the value (I already mentioned that the value should be obfuscated, anyway).
<lisp123> Got it! That makes sense
Oddity has quit [Ping timeout: 272 seconds]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
pkal has quit [Remote host closed the connection]
pkal has joined #commonlisp
Guest1371 has quit [Quit: WeeChat 3.7.1]
waleee has joined #commonlisp
eddof13 has joined #commonlisp
pdietz has joined #commonlisp
Cymew has quit [Ping timeout: 250 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
trocado has quit [Ping timeout: 272 seconds]
aadcg has joined #commonlisp
<aadcg> is there a difference between :use :foo-package and :import-from :foo-package in defpackage declarations? I know that I can import a subset of exported symbols from foo-package with :import-from, But, by omission, I believe it import all symbols.
<Bike> using a package is different from importing. when you just use a package, the symbols don't actually become symbols of the using package, they're just accessible through inheritance
<Bike> i think import-from with no symbols listed actually does nothing.
<aadcg> I believe that's not correct Bike
<aadcg> see (info "(asdf) The package-inferred-system extension")
pdietz has quit [Quit: Client closed]
pdietz has joined #commonlisp
<pdietz> I have used (:import-from) to create dependencies seen by package-inferred-system.
<pdietz> (:import-from <package>) I mean
<Bike> that's an asdf extension, not the actual language
<aadcg> hmm, I understand now!
<Bike> asdf might use that to infer dependencies, but does it change the import semantics on top of that?
<aadcg> I believe it doesn't
<Bike> right.
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has quit [Ping timeout: 258 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
<phoe> yes, (:import-from :foo) is a no-op on the lisp side as long as package FOO exists; asdf p-i-s appropriated this no-op for creating dependencies
<phoe> :USE works retroactively as well when the used package adds new exports, :IMPORT-FROM doesn't have anything like that
eddof13 has joined #commonlisp
asarch has joined #commonlisp
jeosol has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 260 seconds]
azimut has joined #commonlisp
pdietz has quit [Ping timeout: 244 seconds]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pkal has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
rogersm has joined #commonlisp
tane has joined #commonlisp
random-nick has joined #commonlisp
gateway2000 has quit [Quit: Leaving]
x88x88x has quit [Ping timeout: 252 seconds]
Shinmera- has joined #commonlisp
akonai has quit [Ping timeout: 252 seconds]
justache has joined #commonlisp
les_ has joined #commonlisp
xantoz has quit [Ping timeout: 252 seconds]
SAL9000 has quit [Ping timeout: 252 seconds]
les has quit [Ping timeout: 252 seconds]
hefner has quit [Ping timeout: 252 seconds]
jdz has quit [Ping timeout: 252 seconds]
bldr has quit [Ping timeout: 252 seconds]
akonai has joined #commonlisp
Shinmera has quit [Ping timeout: 252 seconds]
tevo has quit [Ping timeout: 252 seconds]
viaken has quit [Ping timeout: 252 seconds]
mikko has quit [Ping timeout: 252 seconds]
Shinmera- is now known as Shinmera
migap has quit [Ping timeout: 252 seconds]
jfb4 has quit [Ping timeout: 252 seconds]
doulos05 has quit [Ping timeout: 252 seconds]
gjvc has quit [Ping timeout: 252 seconds]
jaimelm has quit [Ping timeout: 252 seconds]
tychoish- has joined #commonlisp
frodef_ has joined #commonlisp
jfb4_ has joined #commonlisp
epony has quit [Ping timeout: 252 seconds]
zagura has quit [Ping timeout: 252 seconds]
frodef has quit [Ping timeout: 252 seconds]
tychoish has quit [Ping timeout: 252 seconds]
phadthai has quit [Ping timeout: 252 seconds]
justHaunted has quit [Ping timeout: 252 seconds]
tychoish- is now known as tychoish
tevo has joined #commonlisp
cross has quit [Ping timeout: 252 seconds]
jdz has joined #commonlisp
hefner has joined #commonlisp
bldr has joined #commonlisp
xantoz has joined #commonlisp
SAL9000 has joined #commonlisp
jfb4_ is now known as jfb4
jaimelm has joined #commonlisp
doulos05 has joined #commonlisp
epony has joined #commonlisp
migap has joined #commonlisp
phadthai has joined #commonlisp
gjvc has joined #commonlisp
zagura has joined #commonlisp
cross has joined #commonlisp
x88x88x has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
viaken has joined #commonlisp
aartaka has joined #commonlisp
mikko has joined #commonlisp
mikko has joined #commonlisp
mikko has quit [Changing host]
justache is now known as justHaunted
pranavats has joined #commonlisp
cage has joined #commonlisp
attila_lendvai has quit [Ping timeout: 246 seconds]
attila_lendvai has joined #commonlisp
gxt has quit [Ping timeout: 258 seconds]
mariari has quit [Ping timeout: 260 seconds]
gxt has joined #commonlisp
rendar has quit [Quit: Leaving]
rendar has joined #commonlisp
rendar has joined #commonlisp
attila_lendvai has quit [Ping timeout: 255 seconds]
cosimone` has quit [Remote host closed the connection]
mariari has joined #commonlisp
<nytpu> CL has a number of functions like 1+ and PLUSP that are alternatives to `(+ 1 <num>)` and `(> <num> 0)`. i've heard that in naive and/or historical implementations these forms would be more effectively optimized; but for modern optimizing implementations like SBCL i assume both forms will be optimized exactly the same, correct?
mathrick has joined #commonlisp
xlarsx has joined #commonlisp
<Bike> yeah.
<Bike> for example, sbcl transforms (svref vector index) into (aref (the simple-vector vector) index)
tyson2 has quit [Remote host closed the connection]
xlarsx has quit [Ping timeout: 272 seconds]
zyni-moe has joined #commonlisp
xlarsx has joined #commonlisp
pdietz has joined #commonlisp
vn36 has joined #commonlisp
zyni-moe has quit [Quit: died]
frgo has joined #commonlisp
cosimone has joined #commonlisp
aadcg has quit [Ping timeout: 272 seconds]
random-nick has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
random-nick has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
vn36 has quit [Ping timeout: 276 seconds]
snits has quit [Ping timeout: 272 seconds]
snits has joined #commonlisp
attila_lendvai has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Client Quit]
akoana has quit [Quit: leaving]
aartaka has quit [Ping timeout: 272 seconds]
<pdietz> That's a bug, not a feature :)
tyson2 has quit [Remote host closed the connection]
aartaka has joined #commonlisp
<pdietz> (responding to phoe there)
matt` has joined #commonlisp
jeosol has joined #commonlisp
cosimone has quit [Remote host closed the connection]
pdietz has quit [Quit: Client closed]
igemnace has quit [Remote host closed the connection]
asarch has quit [Quit: Leaving]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Krystof has quit [Ping timeout: 252 seconds]
knusbaum has quit [Ping timeout: 250 seconds]
knusbaum has joined #commonlisp
tane has quit [Quit: Leaving]
tmpee has joined #commonlisp
X-Scale has quit [Ping timeout: 250 seconds]
_cymew_ has quit [Ping timeout: 240 seconds]
Krystof has joined #commonlisp
matt` has quit [Remote host closed the connection]
<nytpu> is it possible to write octet sequences to *STANDARD-OUTPUT*? i tried mapping CODE-CHAR over the sequence but unfortunately outputting that encodes the binary values depending on the current character encoding rather than just directly outputting whatever character has that value.
<nytpu> even if i manually defined a function to map between octets and Latin-1 characters or something, it seems like WRITE-CHAR/WRITE-SEQUENCE would forcefully re-encode those as UTF-8 or whatever the implementation's encoding is.
<Bike> *standard-output* is a character stream, so you can't put out numbers
xlarsx has quit [Remote host closed the connection]
xlarsx has joined #commonlisp
<nytpu> well is it possible to change it to a binary stream, or is there a library that wraps a lower-level stdout in a binary stream? because it's objectively possible to do binary stuff on stdin/out on all *nix systems, windows, et al.
Brucio-61 has quit [Ping timeout: 240 seconds]
xlarsx has quit [Ping timeout: 240 seconds]
<Bike> your implementation might expose something. i know on sbcl you can use make-fd-stream and give it a nix file descriptor. i don't know the details.
terrorjack has quit [Ping timeout: 240 seconds]
epony has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 250 seconds]
epony has joined #commonlisp
aartaka has joined #commonlisp
thuna` has quit [Remote host closed the connection]
terrorjack has joined #commonlisp
cosimone has joined #commonlisp
silasfox has joined #commonlisp
shka has quit [Ping timeout: 272 seconds]
luna-is-here has quit [Ping timeout: 246 seconds]
attila_lendvai has quit [Ping timeout: 276 seconds]
<jcowan> And yet CL compilers generally don't hesitate to make self-modifying code impossible.
aartaka has quit [Ping timeout: 240 seconds]
xlarsx has joined #commonlisp
<Bike> what is that in response to?
morganw has quit [Remote host closed the connection]
<nytpu> presumably in response to me saying it's possible to do binary i/o on standard streams on 99% of systems but (portable) Common Lisp makes it impossible anyways
tyson2 has joined #commonlisp
<Bike> sometimes jcowan responds to stuff from like two days ago and i get confused.
xlarsx has quit [Ping timeout: 272 seconds]
<nytpu> since self-modifying code is possible on von neumann machines (barring read-only memory protection and such) but it's not possible in most programming languages
<Bike> sure, and for pretty good reasons
<Bike> putting bytes on a character stream is much less objectionable, of course. i can think of a few problems that might arise but they're comparatively minor
<nytpu> i'm just writing a CGI program (as in RFC 3875, not computer-generated imagery) and it'd be nice to be able to read & write binary data from/to the connection
<Bike> well, for something like that you'd usually just open a binary stream to a socket or whatever, rather than write to stdout
<Bike> or so i would think, i don't usually do that kind of thing.
<Bike> huh, according to the sbcl manual, if you make a socket stream with :default element-type you can give it both characters and bytes.
pve has quit [Quit: leaving]
<nytpu> since this program is solely for my personal use i'm just going to use SBCL's file descriptor capability to make a binary stream on FD 1, but i just found it frustrating that there seems to be no portable way to do so
<nytpu> Bike: i noticed that the CLHS mentioned that STREAM-ELEMENT-TYPE returns the *primary* stream type and that the stream may accept other types, which is interesting
<Bike> Huh, so it does. I did not know that.
Oddity has joined #commonlisp
xlarsx has joined #commonlisp
zyni-moe has joined #commonlisp
<_death> sounds like you want a bivalent stream
silasfox has quit [Quit: WeeChat 3.6]
silasfox has joined #commonlisp
zyni-moe has quit [Quit: died]
<jcowan> Bike: Sorry for being opaque. I'm on a loaner machine. I was responding to beach's statement that CL should not forbid anything.
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 240 seconds]
<Bike> aha
tyson2 has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
xlarsx has quit [Ping timeout: 240 seconds]
xlarsx has joined #commonlisp
epony has quit [Ping timeout: 252 seconds]
Demosthenex has quit [Ping timeout: 246 seconds]
Demosthenex has joined #commonlisp
xlarsx has quit [Ping timeout: 250 seconds]
xlarsx has joined #commonlisp
asarch has joined #commonlisp
son0p has quit [Ping timeout: 240 seconds]
Demosthenex has quit [Ping timeout: 250 seconds]
xlarsx has quit [Ping timeout: 240 seconds]
Demosthenex has joined #commonlisp
tmpee has quit [Ping timeout: 250 seconds]
X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 240 seconds]