jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<Bike> what you're talking about is basically moving correctness checks up to when they're constructed or written to. (defstruct kons (type t) car cdr) (defun (setf kar) (v kons) (assert (typep v (kons-type kons))) (setf (kons-car kons) v)) etc
<Bike> it should be obvious that this would not be fast
gitfaf_ has quit [Remote host closed the connection]
gitfaf has joined #lisp
<aeth> Bike: Well at the moment I do something similar except it's closer to (defstruct kons () (car nil :type foo) (cdr nil :type (or null kons)))
<Bike> then you could hypothetically have a reduce definition that does (cond ... ((and (eq function #'+) (typep sequence 'kons) (subtypep (kons-type sequence) 'fixnum)) (setq function #'fixnum-+)) ...))) bla bla bla.
<Bike> that is completely different.
<Bike> that is not a runtime tag.
<aeth> Isn't it both?
<Bike> no. foo is fixed at compile time.
<aeth> Yes.
<aeth> The conses I was proposing would be fixed at compile time as well.
<aeth> You could have a foo-cons that can only hold foo in the car and (or null foo-cons) in the cdr, not suitable for arbitrary uses of conses, but suitable for typed singly linked lists
<Bike> but with any arbitrary type foo.
<aeth> Then the compiler can infer that every (foo-car my-foo-cons) will be of type foo
<aeth> Right, because it's arbitrary there would have to be some generic name, such as (typed-car my-foo-cons) or (car* my-foo-cons) and so you'd need to inform the compiler that you know it's a foo-car. Perhaps with THE or DECLARE or CHECK-TYPE or maybe just because you created the foo-cons somewhere earlier in the function
<Bike> so C++ templating. could be worse.
<aeth> Otherwise you'd lose the efficiency, but you'd still be able to say some things as far as correctness goes
<aeth> Bike: Yeah, basically some form of static-generic data structure like you'd see in the static languages
<Bike> it doesn't have to be that complicated, really.
<aeth> But that way you could just do (check-type something 'my-foo-cons) and then the compiler will know for the rest of the function that the cars of something have to be foo
<Bike> as you're probably aware, you can declare the types of the car and cdr of a cons now. you'd just need a relatively small extension to declare proper list types.
dented42_ has left #lisp [#lisp]
<aeth> Bike: But can you define the CDR of that CONS to be the CONS you're defining?
<Bike> extension, i said.
<aeth> That's what you'd need to only have to verify the head. At the moment, I do that in structs
<aeth> Would be nice to be able to use all the list operations and get all the type information
<Bike> verification is a different question.
<Bike> that's where you do need some kind of runtime type tag.
<aeth> Bike: What kind of extension would hash-tables need? e.g. key-type KEYWORD and value-type (UNSIGNED-BYTE 8)
<aeth> This seems even more useful than typed conses.
<Bike> something like that.
<aeth> Having e.g. an ub8 value-type seems like it could be allocated efficiently at the back end, too
<aeth> closer to specialized arrays
<Bike> it's important to separate the compile time and runtime parts.
<Bike> the precedent of array types is bad.
<Bike> there's no great reason to know that you declared an array to have element-type (integer 17 2083) at runtime, fixnum is fine for that, but the compiler might want to know that about an array.
<Bike> but the array type declarations confuse this.
<Bike> or confuse programmers, rather. seriously, it sucks
<aeth> I disagree. (integer 17 2083) might be an important precondition for your function to work as expected, and you lose that precondition because e.g. on SBCL (upgraded-array-element-type '(integer 17 2083)) => (UNSIGNED-BYTE 15)
<aeth> And the worst part is, you don't know what it's going to round to
<Bike> it might be good for correctness. but it would be substantially slower correctness. and you can always do that precondition yourself.
<aeth> It would check on write, assume on read (as long as it knows what the precondition is before AREF time), so there are situations where it could be faster. e.g. If you're subtracting 17 from the AREF, the compiler will know it stays unsigned
<Bike> ok i just said separating runtime and compile time.
<Bike> you can, right now, declare that an array has element type [whatever integer thing] and the compiler can take advantage of that if it wants. that's not the new part.
<stylewarning> types-as-constraints, types-as-storage, types-as-identifiers
<Bike> it's so confusing.
<Bike> fucking types as identifiers. this sucks
<aeth> types as identifiers as in member types?
<Bike> coerce, map
<Bike> and types-as-predicates, that was the fourth i identified when i thought about this too much
<Bike> "unlike right now"
shlecta has quit [Ping timeout: 244 seconds]
<aeth> Well, at the moment types in CL are usually used either for correctness or for performance (sometimes both)
<Bike> obviously
<stylewarning> aeth: i would also say for documentation
<stylewarning> at least that's a reason I use them
<stylewarning> I don't load up a bunch of CHECK-TYPES because I want things to error, but just because I want to remember what I'm supposed to pass to a function (:
<aeth> stylewarning: I would file that under correctness because you're assuming the user doesn't read the documentation :-)
<stylewarning> i've been writing up a document about a tentative plan to implement a dialect of ML in Lisp because I want some clearer value coming from types
<aeth> I've been writing a lot of my CL functions as essentially statically typed with type declarations. The type declarations are checked in SBCL and CCL and they're used for static typing in (at least) SBCL and for various reasons pretty much every other implementation doesn't run my code other than SBCL or CCL so I can rely on the type declaration behavior.
<aeth> The problem with check-type is that SBCL correctly infers that the function arguments are of type T because the CHECK-TYPE will be happy to replace them with the correct types at runtime.
<stylewarning> aeth: yeah but isn't it annoying that said code isn't polymorphic
<aeth> In theory my macro that generates functions with type declarations in a slightly more convenient syntax can also generate check-types in other implementations just by pushing that to *features* and having a #+foo change the default behavior of define-function on those implementations
<Bike> to elaborate on the compile/runtime thing. when you're talking about (check-type array '(array [integer nonsense])) not iterating, that's information thatll have to be stored in the array somehow. that stored information cannot do shit for the compiler. a check-type or declaration could, but that's actually orthogonal to the runtime information.
<Bike> compiler extensions to the language would probably be easier in several ways
<aeth> stylewarning: You can get type polymorphism with specialization-store
<aeth> the only problem is that it relies on type declarations. It can't tap into the type inference
<stylewarning> aeth: ad hoc polymorphism, not parametric polymorphism, right?
sjl has quit [Ping timeout: 244 seconds]
<Bike> i think it's ad hoc, yeah.
<Bike> can't say i'm fond of that term
<stylewarning> ad hoc polymorphism is nice with types/classes/CLOS/spec-store/whatever, but I meant parametric polymorphism above, where we define a function that's singly generically useful for many types
<aeth> could you define it on top of specialization-store?
<Bike> you'd probably have to specify the set of types you want to polymorph over ahead of time, which is kinda bleh.
<stylewarning> if you did, it would look like a frankenstein dynamic version of C++ templates
<Bike> i don't think it would be /that/ bad
<stylewarning> I mean, supposing some function F was polymorphic over a type variable S, then calls to F would need to check if it was specialized for S's instantiation, and if not, generate that code
<Bike> yeah, that's what i was getting at with the ahead of time bit. we can't do that now.
<stylewarning> (F (alexandria:whichever "X" 1 'a nil))
<Bike> unfair!
<stylewarning> (:
<Bike> i would expect a compiler error. or warning and fallback to dynamism, i guess
<stylewarning> I bet you could get something to work, but I don't think it's a good use of something like spec-store.
<stylewarning> spec-store or my own worse version of it is good for when you---as you said---know types at compile time and want to specialize accordingly
<Bike> the whole 'generate that code' bit implies a lot of crazy and yet extremely boring problems with compilation units. last time i asked C++ compiler people about it they went off to get blackout drunk
<stylewarning> sounds like a reasonable response
<Bike> i zoned out when the special elf flags came up
JuanDaugherty has quit [Quit: Exeunt]
<stylewarning> rambling about static types in lisp https://github.com/tarballs-are-good/coalton/blob/master/thoughts.md
<aeth> I use static types (and similar things) a lot in my game engine. And there are drawbacks to static types, they just seem to make sense a lot in the core of a game engine.
<aeth> on the other hand, in that same engine in functions called from defmacro everything's pretty dynamic
Fare has quit [Ping timeout: 260 seconds]
allcr has joined #lisp
<aeth> What I like about CL is that it's a messy mix of everything all in one language, so you just use whatever's most convenient for the problem.
jack_rabbit has joined #lisp
<stylewarning> aeth: I have often said something like that, but I think that viewpoint would benefit from more refinement.
<aeth> Well, I think the downside with CL is that its weaknesses are things that have gained popularity since the mid-90s. Stuff you see in Haskell or Rust or Go, etc.
<mason> Like what?
<stylewarning> aeth: I think a "weakness" that is present in the current ecosystem is just lack of completeness, comprehensiveness, or robustness.
<aeth> You even see stuff in Java that CL is lacking, like a rich standard library full of lots of built-ins like queues, sets (other than the very weak lists-as-sets), etc.
<stylewarning> Maybe I want to write in a functional fashion. What are my options? Use a mishmash of Alexandria, FSet, and a few other things?
<aeth> What you miss with custom data structures is (1) whatever the library author (or you) forgot to add and (2) any kind of convenient way to use them
<stylewarning> I think 1 and 2 are really, really important. 1/2 are the reasons people use a library/paradigm/whatever.
<stylewarning> "You can do functional programming in Lisp because it has all of the fundamental primitives you need." -- generally not convincing enough for me to employ a functional paradigm, because it's asking me to roll out and "complete" the paradigm
<aeth> Pure FP in CL is almost as bad as pure FP in JavaScript, btw. You lose any kind of efficiency that you'd have in a language like Haskell.
<aeth> And things like lazy lists are just awkward to use in CL.
<stylewarning> Anyway, this is the point I'm making and what I meant about refining that viewpoint.
<stylewarning> You can access a lot of "primitives" to lots of paradigms/ways of doing things, but they're often just not full featured or complete or 100% integrated
<aeth> Where CL implementations would need modernization are in FP, types, and concurrency.
<stylewarning> But that's almost never Lisp's fault, and it's almost never the compiler writers' faults.
<aeth> CL's pretty much still #1 in dynamic OOP, although that's kind of out of style at this point
rumbler31 has joined #lisp
<aeth> stylewarning: I'd go farther and say not only can you do lots, you can do pretty much anything in CL through elaborate enough macros (or reader macros), but it won't feel integrated and it probably will be via an undocumented, incomplete library
rumbler31 has quit [Remote host closed the connection]
<aeth> At a far extreme you could have a reader macro with a new syntax compile down to an implementation's inline-assembly or something.
milanj has quit [Quit: This computer has gone to sleep]
<stylewarning> lisp is a good substrate for all of that, i agree
<aeth> at least at the state it's currently in, I'd personally say Lisp is more like a language for writing functional (or at least declarative) languages than a functional language
Kundry_Wag has joined #lisp
<Zhivago> Given that it's a procedural language, that seems likely. :)
<aeth> I'm actually surprised there aren't more languages like Shen that have a CL backend. (Although, personally, I'd *just* have a CL backend rather than have like 20 backends like Shen does)
<aeth> Perhaps CL is missing some features that modern language implementers want.
<Zhivago> Common adoption? Thin implementations?
<asarch> The function COMMON-LISP:INTEGER is undefined. <- ?
<stylewarning> asarch: what context?
<asarch> The default when you start SBCL
<stylewarning> asarch: yes, but what code did you run?
<asarch> (defparamter *beers* (integer 10))
<stylewarning> asarch: that's not valid code
<stylewarning> why did you write (integer 10)?
<stylewarning> you can just write (defparameter *beers* 10)
<asarch> Well, I am reading at Sonja E. Keene's book (Object-Oriented Programming with CLOS) that for each Common Lisp data type, there is an equivalence CLOS class for that
<asarch> I could: (defparamter *user* (string "asarch"))
renzhi has quit [Quit: WeeChat 2.1]
<asarch> But there is no INTEGER class :-(
<Bike> yeeeah there is?
rumbler31 has joined #lisp
<Bike> there's just no function "integer"
<Bike> calling "string" there is also completely pointless
<asarch> ?
<asarch> (defparameter *age* (make-instance 'integer))
<asarch> Cannot allocate an instance of #<BUILT-IN-CLASS COMMON-LISP:INTEGER>.
<Bike> yeah, make-instance is for standard classes
<Bike> fyi, 10 is an integer
<Bike> so you can just (defparameter *age* 10)
<asarch> How would you use INTEGER?
<Bike> what, the class?
<Bike> there's no function called that.
<asarch> Oh :-(
<asarch> I thought it was like with JavaScript
<stylewarning> asarch: what about reading Practical Common Lisp first instead?
<Bike> i'm... you don't have to do "Integer(10)" in javascript, do you?
<Bike> you just do 10 + 17 and there ya go
<asarch> You could in JavaScript: [1, 2, 3].forEach(...) or Arra(1, 2, 3).forEach(...);
<stylewarning> asarch: It sounds like you have a wrong model of what Lisp is like or what its syntax is. You'd benefit from reading PCL.
<Bike> you mean Array? that's like the cl function VECTOR, i guess
<Bike> and stylewarning is correct
<asarch> Yeah, I mean, Array(1, 2, 3).forEach(...);
<asarch> Oh
<asarch> So, what's the point of CLOS classes for each Common Lisp data type?
* asarch takes notes...
<Bike> you seem to be confusing classes with like, constructor functions.
<asarch> In the book: (defmethod encode ((num integer) stream) ...)
<asarch> When I was learning to develop web applications with Perl with Catalyst, I found that Catalyst uses the new object system of Perl called Moose which is based on Class::MOP which it uses the Meta-Object Protocol
<asarch> When you declare a new class with Moose, you can actually define the data type for each slot: has 'x' => (is => 'rw', isa => 'Int');
<stylewarning> asarch: What's your goal with this discussion? :)
<asarch> I thought the class was to "facilitate" operations on the slot variable
<stylewarning> Are you talking about perl? lisp? what?
<asarch> Common Lisp
<stylewarning> Do you know what a "slot" is in Common Lisp?
<asarch> Yeah, a variable member in other OOP languages
<asarch> class point {integer x; ...}; // The 'x' variable member of the 'point' class in C++
<asarch> For example
<asarch> Although C++ doesn't define an Integer class (I think Java actually does it)
<stylewarning> asarch: so why would you suppose a class has anything to do with "facilitating" operations on a slot?
<stylewarning> Shouldn't a class more so be for defining what slots are associated with some data structure you're creating?
<Zhivago> A class need have no slots, per se.
<Zhivago> Think of a class as a way to describe how something is represented.
<Zhivago> That representation may be slot based or not.
<asarch> (defclass point () (x :initvar 0 :accessor :x)) <- What is 'x' then?
<stylewarning> x is the name of a slot
<stylewarning> :x is an initarg keyword for the slot named x
<asarch> In the book there is a table with the precedence of classes corresponding to Common Lisp types
<stylewarning> asarch: Sorry, it just seems you're saying a collection of random things that you're maybe reading about. I'm not sure what you're actually trying to figure out / ask / discuss with the channel.
<asarch> Yeah, yeah. My mistake: (defclass point () ((x :initarg :x initform 0 :accessor x)))
housel has quit [Read error: Connection reset by peer]
<asarch> Well, reading the book I thought I could use the class INTEGER just I could with the class String in Java
<stylewarning> And why would you expect that? Because Lisp and Java both take 4 letters to spell?
<stylewarning> Object orientation in Common Lisp is quite different from other languages. My advice to you (aside from reading PCL) would be to dispose of, or quarantine, what you know about object orientation from other languages while learning about it in Lisp.
renzhi has joined #lisp
<asarch> Oh :-(
<stylewarning> Analogies are rarely going to carry over well. If you are a fan of analogies, then PCL would be a good book for you, since it was written by somebody who is incidentally also an experienced Java programmer.
<asarch> Anyway, my mistake again
<asarch> Thank you guys :-)
<asarch> I'm still in the phase of do's and do not's of the language
<asarch> 頑張ります!
<stylewarning> You must recognize that Lisp is quite a unique and different language, and that you have to invest in learning it in its own right, and not be fooled into believing that understanding Lisp is merely a translation of some other language you're already familiar with.
<asarch> Yeah, yeah
gitfaf has quit [Remote host closed the connection]
<asarch> This is one of them
gitfaf has joined #lisp
<asarch> All of its data types of Smalltalk are actually classes, right?
<no-defun-allowed> yes
<asarch> Since Lisp and Smalltalk both inspired each other, I thought with CLOS was the same :-(
<Zhivago> All values in CL have a class.
<Zhivago> But those classes describe rather than prescribe.
orivej has quit [Ping timeout: 256 seconds]
<asarch> I see
arbv has quit [Quit: ZNC - https://znc.in]
arbv has joined #lisp
Guest5800_ has quit [Quit: Connection closed for inactivity]
arbv has quit [Client Quit]
marvin2 has quit []
arbv has joined #lisp
robotoad has joined #lisp
equwal has joined #lisp
Fare has joined #lisp
dented42 has joined #lisp
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
robotoad has quit [Client Quit]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
moei has quit [Quit: Leaving...]
vmmenon has quit [Quit: vmmenon]
robotoad has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
Bike has quit [Quit: Lost terminal]
housel has joined #lisp
quazimodo has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
loli has quit [Quit: WeeChat 2.2]
loli has joined #lisp
gitfaf has quit []
gitfaf has joined #lisp
<beach> Good morning everyone!
<beach> I see another long and pointless discussion about what Common Lisp ought to have but it currently doesn't.
<beach> It is pointless because of two things: 1. It is not going to happen.
<beach> More importantly though: 2. Suggesting random changes to the language without knowing the consequences to implementations reminds me of how languages are designed by benevolent dictators. They often end up being impossible to implement efficiently.
<beach> Designing a language requires deep knowledge about compiler design, garbage collection, object representation, generic dispatch, etc.
broccolistem has joined #lisp
<beach> And in the case of Common Lisp, it also requires deep knowledge about how ALL the current features fit together. Changing some random feature is very likely going to break many other things.
gitfaf has quit [Remote host closed the connection]
broccolistem has quit [Read error: Connection reset by peer]
<asarch> Hi beach!
<asarch> How are you? :-)
<beach> I am fine. And you?
<beach> Oh, wait! Crap! Now I am going to be accused of "elitism" again, i.e. requiring that people who design languages know something about language design.
_whitelogger has joined #lisp
emaczen has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<asarch> I'm fine. Thanks :-)
<asarch> Don't be paranoic
<asarch> You are a great person
<asarch> And that's all matter
<asarch> How can you load an account file in Compta?
captgector has quit [Ping timeout: 240 seconds]
pjb has quit [Ping timeout: 256 seconds]
<beach> There is a command named "read organization".
<beach> There is another "read organization default" for a default organization.
<asarch> Thank you
<beach> There is no command for loading a file containing only an account.
<beach> You can add an account interactively and then use the command "write organization" to save the entire state of things.
stnutt has quit [Ping timeout: 260 seconds]
captgector has joined #lisp
<edgar-rft> beach: ...about elitism - I found that it's important to be *aware* of my own stupidity because being aware of it it can include it into my planning, and my plans work *much* better since I take my own stupidity into account. That's one of the secret how life works.
<beach> edgar-rft: Good advice.
<beach> edgar-rft: Another trick I use: I am VERY careful about assuming that I know ANYTHING about a particular domain. That is why I rarely participate in discussions about isolated changes to the language. I must go away and think VERY HARD and for a VERY LONG TIME before I am convinced that some such suggestion is possible, let alone desirable.
<beach> edgar-rft: Though perhaps you meant "ignorance" rather than "stupidity"?
<edgar-rft> both :-)
<beach> Heh, OK.
<beach> I read somewhere that people with a low level of knowledge (or was it intelligence, I forget) often significantly overestimate their level, whereas people with a high level often underestimate theirs. This is statistics, of course, so no conclusion should be drawn with respect to an individual, nor should any causality be inferred.
<edgar-rft> It's rarely never a good idea to think about isolated things, but the problem is that noone knows really *all* consequences, so the trick is to find a reasonable compromise. But judging is hard because we all have only partial knowledge.
<beach> I agree.
Copenhagen_Bram has quit [Ping timeout: 248 seconds]
<beach> That is why, for language design, I have decided to limit myself to WSCL, i.e., I am just aiming for more specified behavior where the Common Lisp HyperSpec does not specify it. That way, I can leave features alone that I am not sure of, and only work on those that I am certain will work out.
Copenhagen_Bram has joined #lisp
allcr has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
emaczen has joined #lisp
meepdeew has joined #lisp
lemo has joined #lisp
lemo has left #lisp [#lisp]
<sabrac> :beach I think you are referring to the Dunning-Kruger effect
<no-defun-allowed> yeah that's the name of it
<beach> sabrac: Oh, thanks for the information.
<beach> sabrac: Yes, definitely that. Thanks!
<jack_rabbit> Is it possible with sbcl to cross-compile an executable for arm on x86?
<beach> I have recently taken an interest in phenomena in psychology and behavioral economics with respect to how these phenomena influence software development.
emacsoma` has joined #lisp
edgar-rft has quit [Quit: Leaving]
gitfaf has joined #lisp
slyrus2 has joined #lisp
<jack_rabbit> hmmmm. :(
slyrus has quit [Ping timeout: 240 seconds]
slyrus1 is now known as slyrus
slyrus2 is now known as slyrus1
<jack_rabbit> I'm getting memory faults with the latest mcclim in quicklisp.
<jack_rabbit> Not sure how to figure out where this is coming from.
<no-defun-allowed> imho i'd start with any cee bindings
<jack_rabbit> could also be my sbcl, which was updated.
<jack_rabbit> I don't use any c bindings in *my* application. I can't speak to which libraries use them.
gitfaf has quit [Ping timeout: 268 seconds]
kerrhau has quit [Read error: Connection reset by peer]
<jack_rabbit> There doesn't appear to be anything *funny* in the stack trace.
kerrhau has joined #lisp
<no-defun-allowed> mcclim uses cee, maybe something's up with how it's called
<jack_rabbit> maybe... I'm just not sure how to begin debugging.
<jack_rabbit> hmm. I think it's definitely in mcclim. The demos are faulting as well.
stnutt has joined #lisp
<beach> no-defun-allowed: In what way does McCLIM use C?
quazimodo has quit [Ping timeout: 268 seconds]
eschatologist has quit [Ping timeout: 244 seconds]
eschatologist has joined #lisp
quazimodo has joined #lisp
pjb has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
pjb has joined #lisp
Fare has quit [Ping timeout: 272 seconds]
gitfaf has joined #lisp
Inline has quit [Quit: Leaving]
<jackdaniel> McCLIM has a lot of letters #\c in its source code, maybe that's what he means?
<jackdaniel> for instance: draw-reCtangle ;-)
<jackdaniel> no-defun-allowed: McCLIM does not use C. some of it extensions might, but none of them is enabled by default
<jackdaniel> communication with X server is done via clx, which talk through a socket
gitfaf has quit [Ping timeout: 244 seconds]
<no-defun-allowed> my bad, i thought it used cee xlib
<no-defun-allowed> (also i use she/her pronouns thanks :)
<beach> I knew that, but jackdaniel did not.
<no-defun-allowed> huh, i thought that was the first time i brought it up.
<beach> Nope. :)
<no-defun-allowed> alright then
<jackdaniel> regarding discussing changes (possibly unwise): it is one of many ways to learn to know better; that's more a question of curiosity not stupidity
<jackdaniel> unless we take, that someone has to study for n years before he is allowed to have his own convictions about a subject (and they still may be wrong!)
<beach> 18.05.04:05:43:21 * theemacsshibe[m] gives magic GNU🦄PONUT a vegetable burger she got from the barbeque
foom2 has joined #lisp
<no-defun-allowed> annoying things about computing classes: 1. python 2. it's an "all boys" class and if i dare say anything i'd be made fun of
<no-defun-allowed> well that's all
<no-defun-allowed> *old
<beach> Sorry to hear that.
emaczen has quit [Read error: Connection reset by peer]
megalography has joined #lisp
JuanDaugherty has joined #lisp
<beach> no-defun-allowed: Did you see my quotation?
<no-defun-allowed> yes
<no-defun-allowed> my computing teacher is trying to learn FP through python
<beach> Ouch!
foom has quit [Ping timeout: 240 seconds]
<no-defun-allowed> i used a lambda once with map cause [.. for x in ...] is too long for me and that led somewhere apparently
<beach> You probably mean "teach" though. :)
<no-defun-allowed> no, he's learning
<beach> Wow! That's terrible.
<no-defun-allowed> he does physics and maths so i might suggest ML to him, i know enough of it. he's seen lisp and he can't quite parse it yet
Fare has joined #lisp
<JuanDaugherty> good thing he doesn't do irc
<no-defun-allowed> it's probably not english or mathy enough
<beach> It is interesting to me that mathematicians and scientists, who are "perfection oriented" in their domains, are often "performance oriented' (or have a "closed mindset, as Carol Dweck says) when it comes to their computing tools.
<no-defun-allowed> i'll be honest, sometimes what he knows is scary. for example, he knows tag bits are a thing
asarch has quit [Quit: Leaving]
* JuanDaugherty worked as a system programmer on the main mainframe with tag bits
<no-defun-allowed> well, not hardware stuff. not sure how cpython does it but sometimes (especially on x86_64) you put it in the pointer and it's okay cause of address space and alignment trickery
<JuanDaugherty> right in this time of the overwhelming predominance of commodity architectures there are no real machines with tag bits
<no-defun-allowed> indeed.
<JuanDaugherty> the one I referred to stopped being fabbed about a decade ago
<no-defun-allowed> which one was it?
<jackdaniel> [--> #lispcafe]
<JuanDaugherty> burroughs
<no-defun-allowed> hm, maybe i should push lisp on him more
renzhi has quit [Ping timeout: 240 seconds]
<aeth> no
<aeth> People want a fun little toy program that they can write and see immediate results in and Lisp doesn't really have those frameworks yet. Work on helping one of those get mature.
<no-defun-allowed> i thought that was the REPL
<aeth> (Well, I mean, I can name half a dozen of them, but not ones I'd show to a stranger without spending a few weeks contributing documentation to first)
<JuanDaugherty> haskell is the fp star of this time
<JuanDaugherty> although I sense it has peaked
<no-defun-allowed> if i do, he'll lose faith in python and there'll be 25 more newbies asking me crap though
<aeth> no
<aeth> newbies ask in #clschool
<no-defun-allowed> these are 16 year olds. they don't use IRC.
<no-defun-allowed> i already get enough "hey no-defun-allowed, please check my code" questions so for me, the selfish weenie, that's not convenient
<aeth> when I was 12 I was in IRC. oh, a different era
sauvin has joined #lisp
sauvin has quit [Max SendQ exceeded]
<jackdaniel> [--> #lispcafe]
<no-defun-allowed> The variable [--> is unbound.
<no-defun-allowed> fine i'll go
vlatkoB has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
Fare has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
sauvin has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
meepdeew has quit [Remote host closed the connection]
fikka has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gitfaf has joined #lisp
gitfaf has quit [Remote host closed the connection]
dddddd has quit [Read error: Connection reset by peer]
meepdeew has joined #lisp
gitfaf has joined #lisp
gitfaf has quit [Remote host closed the connection]
trittweiler has joined #lisp
meepdeew has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
<dim> hi!
<shka_> dim: good morning
schweers has joined #lisp
gitfaf has joined #lisp
<no-defun-allowed> morning dim
gitfaf has quit [Remote host closed the connection]
robotoad has quit [Quit: robotoad]
ofi has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
robotoad has joined #lisp
<shka_> phoe: i solved my problem
megalography has left #lisp [#lisp]
<shka_> how can i set CPATH for asdf?
orivej has joined #lisp
<jackdaniel> shka_: do you mean groveller?
<shka_> i actually don't know :(
<shka_> groveller is on a stack trace, so i guess you are right
<jackdaniel> you may modify various flags in c-toolchain from cffi (which is what groveller use)
<shka_> ok, so i should check cffi manual, yes?
<jackdaniel> find source of cffi-toolchain:*cc-flags*
<jackdaniel> there you'll find other dynamic variables you may customize
<shka_> ok
<shka_> thanks
<jackdaniel> afair when cffi adds its own flags it preserves ones already specified in dynamic variable
<jackdaniel> also dare not doing (let ((*cc-flags* '(my-stuff))) …)
<jackdaniel> always append previous *cc-flags* value
<jackdaniel> otherwise it will fail miserably
<jackdaniel> (let ((*cc-flags* (append (list my flags) *cc-flags*))) …)
<jackdaniel> (of course this applies to ld-flags and others too
<jackdaniel> )
<shka_> good tip
varjag has joined #lisp
gitfaf has joined #lisp
gitfaf has quit [Remote host closed the connection]
gitfaf has joined #lisp
gitfaf has quit [Remote host closed the connection]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
heisig has joined #lisp
renzhi has joined #lisp
Oddity has quit [Ping timeout: 240 seconds]
gitfaf has joined #lisp
gitfaf has quit [Ping timeout: 240 seconds]
gitfaf has joined #lisp
stnutt has quit [Ping timeout: 244 seconds]
zfree has quit [Quit: zfree]
stnutt has joined #lisp
gitfaf has quit [Remote host closed the connection]
kerrhau has quit [Ping timeout: 244 seconds]
Oddity has joined #lisp
angavrilov has joined #lisp
robotoad has quit [Quit: robotoad]
nopf has quit [Ping timeout: 265 seconds]
cpape has quit [Ping timeout: 256 seconds]
azimut_ has joined #lisp
azimut has quit [Ping timeout: 272 seconds]
meepdeew has joined #lisp
pierpal has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
meepdeew has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
XachX_ has joined #lisp
spal has quit [Ping timeout: 268 seconds]
XachX has quit [Ping timeout: 245 seconds]
simplegauss has quit [Ping timeout: 245 seconds]
Duns_Scrotus has quit [Read error: Connection reset by peer]
nyaray has quit [Read error: Connection reset by peer]
tfb has quit [Read error: Connection reset by peer]
abbe has quit [Ping timeout: 245 seconds]
XachX_ is now known as XachX
pyc has quit [Ping timeout: 268 seconds]
simplegauss has joined #lisp
abbe has joined #lisp
pyc has joined #lisp
spal has joined #lisp
wheelsucker has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
makomo has joined #lisp
renzhi has quit [Read error: Connection reset by peer]
makomo has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
igemnace has joined #lisp
m00natic has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
fikka has joined #lisp
X-Scale has quit [Ping timeout: 272 seconds]
Kundry_Wag has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 244 seconds]
nopf has joined #lisp
milanj has joined #lisp
DataLinkDroid2 has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
meepdeew has joined #lisp
pierpal has quit [Quit: Poof]
lyosha[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
pierpal has joined #lisp
meepdeew has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
moei has joined #lisp
<mrottenkolber> did anything change in the simple-date/cl-postgres integration?
<mrottenkolber> For some reason I can’t get postmodern to print its timestamps in SQL statements anymore
fikka has quit [Ping timeout: 244 seconds]
<mrottenkolber> Seems I now have to manually load SIMPLE-DATE/POSTGRES-GLUE
<mrottenkolber> Shinmera: while I am here, do I remember correctly that you have a lib for html sanitization I could use instead of sanitize?
figurelisp has joined #lisp
<Shinmera> You are correct in the sense that my HTML parser is lenient and will chug anything. It will always produce valid HTML or XML when serialising its dom, so you can use it to sanitise.
<Shinmera> Note however that Plump does not follow the HTML5 spec on parsing invalidly formatted content, so the results might be slightly different from how a browser would interpret it.
igemnace has quit [Remote host closed the connection]
<figurelisp> Pardon my ignorance but where can i find how a function is internally implemented in Common lisp for ex let's say implementation of set-difference
<Shinmera> Put your cursor over a call of the function and hit M-.
<phoe> figurelisp: basically, if the function is from package COMMON-LISP, then it's implemented internally in CL.
<figurelisp> I want to know how it is implemented
<phoe> I see. How it is implemented will vary by implementation.
<phoe> You can use slime, like Shinmera described
<figurelisp> yes i used M- and it says (set-difference list1 list2 &key (test #'eql) test-not)
<phoe> figurelisp: M-.
<phoe> in non-emacs notation, move your point over the symbol in question, press alt, then hit period, release alt
<figurelisp> although i don't understand, is this how the code of set-difference is written in implementation of common lisp?
<Shinmera> <Alt>+<period>
<figurelisp> oh
<phoe> this is slime's key chord for "show this function's source"
<phoe> or rather, show its definition
JuanDaugherty has quit [Quit: Exeunt]
<figurelisp> Shinmera: phoe Thank you, got it. I misunderstood Shinmera's comment
<phoe> no problem
<phoe> note that this only works if you have your implementation's sources downloaded.
<mrottenkolber> Shinmera: amazing, thanks! might be able to drop the cl-xml2 dependency this way
<figurelisp> ok, i am getting the path so then the source is downloaded right?
<phoe> you shouldn't be getting the path
<phoe> M-. should open a new buffer with the point being on the definition of the function
orivej has quit [Quit: No Ping reply in 180 seconds.]
<phoe> you should see (defun set-difference (list1 list2 &key (test #'eql) test-not) ...)
<phoe> where ... is the actual implementation
<figurelisp> ok, i'll doenload the source
<Shinmera> mrottenkolber: Good luck!
xificurC has joined #lisp
orivej has joined #lisp
<phoe> figurelisp: what's your OS?
<figurelisp> ubuntu
<phoe> where did your get your Lisp implementation from?
<phoe> apt?
<figurelisp> phoe: TBH i don't remember. I followed some guide online which told to download sbcl and slime
<phoe> figurelisp: run `which sbcl` in terminal and tell me the output of that command
<figurelisp> /usr/bin/sbcl
<Shinmera> You may also be interested in https://portacle.github.io/ . It includes a reference page for keyboard shortcuts and Emacs explanations.
<phoe> figurelisp: it seems you have your SBCL installed from apt.
<phoe> `apt install sbcl-source` and you're good to go in that case
<phoe> Shinmera: does Portacle contain sources for SBCL?
<figurelisp> Shinmera: I looked into portacle but i wanted to install sbcl and slime by my own so I tried
<figurelisp> phoe: ok will do that
<Shinmera> phoe: yes
<phoe> (incf Shinmera)
<xificurC> phoe: minor nitpick, don't suggest which but `command -v`, the latter is faster and, more importantly, correct
<phoe> xificurC: TIL
orivej has quit [Quit: No Ping reply in 180 seconds.]
<xificurC> what's a correct way to "rethrow" in (handler-case (foo) (error (c) (bar) ???))
<figurelisp> xificurC: So the command would be sbcl --version?
<Shinmera> xificurC: Note that handler-case by necessity unwinds, and thus the original stack trace is lost.
<xificurC> figurelisp: no, there's a command called command :) Don't use `which sbcl` but `command -v sbcl`
<figurelisp> oh ok
<Shinmera> xificurC: You can simply SIGNAL a condition, though.
<phoe> xificurC: you want handler-bind
<xificurC> Shinmera: I know but thanks for the tip
orivej has joined #lisp
<phoe> (handler-bind ((error (lambda (e) (bar) (error e))) (foo))
<xificurC> this isn't a spot where I care too much if the stack unwinds, I just need to do something before resignaling
<phoe> oh, in that case, you can do another thing
<Shinmera> I already said
<phoe> you can do something and then decline handling it
<Shinmera> clhs signal
<phoe> (handler-bind ((error (lambda (e) (bar))) (foo))
<phoe> when E is signaled, this will cause BAR to be executed
<xificurC> phoe: ah, of course, thanks
<phoe> and then the handler will decline to handle the condition, at which point the execution will continue
<phoe> if the call was to SIGNAL, the program will continue
<phoe> if the call was to ERROR, then thou shalt enter the debugger
<xificurC> what I had to do was to not do
<phoe> the tao of lisp
<Shinmera> handler-bind and handler-case will have different semantics for the call to bar though
<xificurC> you mean by unwinding the stack e.g. specials might have changed? right now bar is just (format *error-output* ...)
<Shinmera> This can be important if BAR for instance assumes that cleanup or other actions have taken place that would happen during unwind.
<phoe> handler-case always accepts to handle the condition
<shka_> oh
<shka_> Shinmera: hi!
<Shinmera> Hello
<xificurC> yeah, both work fine for this simple case handler-bind seams cleaner
<phoe> handler-bind does not have to accept it, it may freely decline
<phoe> handler-bind is a construct useful when you need to execute code when a condition is signaled
<phoe> handler-case is a construct useful when you need to get the hell outta there when a condition is signaled
<phoe> in yet other words, handler-case always transfers control outside of the signaling form, where handler-bind doesn't necessarily do that
<trittweiler> Be aware that declining handling it means that another handler higher up the stack will be tried next. If you don't want that you need a continue or a muffle-condition restart and invoke that from the handler
<xificurC> in other words handler-case is for those who only know exceptions from other languages and handler-bind is for the brave :)
<phoe> more or less, yes
<phoe> handler-case is analogous to try-catch
<Shinmera> phoe: The important part is that handler-bind executes /on top of the stack/, while handler-case /unwinds the stack/
<phoe> Shinmera: yep, I'm describing the implications of that fact
<xificurC> having the option to *not* unwind the stack is pretty neat
<phoe> or rather
<phoe> handler-case is analogous to try-catch if all of your conditions are signaled via #'ERROR
<phoe> if you only use #'ERROR and HANDLER-CASE, then you have a dumb exception system like the one in Java or C++
zfree has joined #lisp
housel has quit [Read error: Connection reset by peer]
rumbler31 has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 272 seconds]
ym has joined #lisp
Bike has joined #lisp
Kevslinger has joined #lisp
edgar-rft has joined #lisp
igemnace has joined #lisp
LiamH has joined #lisp
gitfaf has joined #lisp
fikka has joined #lisp
<scymtym> well, you cannot do something like try {} catch ((error and (not runtime_error)) e) {} in Java or C++
<shka_> true
<shka_> lisp typesystem is quite flexible
Fare has joined #lisp
kajo has joined #lisp
Guest5800_ has joined #lisp
light2yellow has joined #lisp
dddddd has joined #lisp
heisig has quit [Quit: Leaving]
DGASAU has joined #lisp
warweasle has joined #lisp
mindCrime has joined #lisp
tfb has joined #lisp
<mrottenkolber> What are the current options wrt to library vendoring. qlot?
FreeBirdLjj has joined #lisp
JuanDaugherty has joined #lisp
FreeBirdLjj has quit [Ping timeout: 244 seconds]
rumbler31 has joined #lisp
<beach> figurelisp: Did you find the code you were looking for?
nopolitica has quit [Quit: WeeChat 2.2]
rumbler31 has quit [Ping timeout: 240 seconds]
equwal has quit [Ping timeout: 256 seconds]
jack_rabbit has quit [Ping timeout: 272 seconds]
figurelisp has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
scottj has quit [Quit: leaving]
quipa has joined #lisp
FreeBirdLjj has joined #lisp
quipa has quit [Remote host closed the connection]
tralala has joined #lisp
gitfaf has quit [Remote host closed the connection]
Inline has joined #lisp
ebrasca has quit [Remote host closed the connection]
robotoad has joined #lisp
ofi has quit [Quit: rcirc on GNU Emacs 26.1]
housel has joined #lisp
X-Scale has joined #lisp
mindCrime has quit [Ping timeout: 240 seconds]
housel has quit [Read error: Connection reset by peer]
housel has joined #lisp
kajo has quit [Remote host closed the connection]
robotoad has quit [Quit: robotoad]
LoicBSD has joined #lisp
nika has joined #lisp
kajo has joined #lisp
ceevusee has joined #lisp
LoicBSD has left #lisp ["Quitte"]
SaganMan has quit [Ping timeout: 248 seconds]
xristos has joined #lisp
ceevusee has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
mindCrime has joined #lisp
Denommus has joined #lisp
quipa has joined #lisp
quipa has quit [Remote host closed the connection]
SaganMan has joined #lisp
zfree has quit [Quit: zfree]
rumbler31 has joined #lisp
robotoad has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
DGASAU has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
DGASAU has joined #lisp
fikka has joined #lisp
LiamH has quit [Quit: Leaving.]
fikka has quit [Ping timeout: 268 seconds]
sjl has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
JuanDaugherty has quit [Quit: Exeunt]
kaun has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
Copenhagen_Bram has joined #lisp
quipa has joined #lisp
<quipa> "The Logo Programming Language, a dialect of Lisp" http://el.media.mit.edu/logo-foundation/what_is_logo/history.html
<quipa> does anyone know of an article that discusses logo as a lisp dialect?
<quipa> I noticed the first implementation of Logo for Apple II was written by Hal Abelson one of the authors of SICP
<aeth> So Logo was the first language to claim that it's secretly a Lisp for added prestige?
<quipa> hehe probably
<quipa> but beyond those references
<quipa> I can't find a more explicit discussion on this
<quipa> I work with NetLogo and I am learning a lot of Lisp/Scheme/RAcket
<quipa> so I found the relationship interesting
<quipa> I also noticed
<quipa> Brian Harvey wrote both the three volume Computer Science Logo Style and Simply Scheme (a "prequel" for SICP)
emacsomancer has quit [Ping timeout: 244 seconds]
emacsoma` has quit [Ping timeout: 244 seconds]
<aeth> The command followed by a number with ; as a comment makes it look a bit like Lisp, but it also makes it look a bit like ASM.
<Bike> http://web.sonoma.edu/users/l/luvisi/logo/logo.memos.html but ftp is down. they're probably around somewhere.
<quipa> I noticed he seems to he used a similar structure in the first volume of CSLS and Simply Scheme
<aeth> It looks like it does use " like Lisp uses '
<Bike> https://dspace.mit.edu/handle/1721.1/6220 yeah, that's probably better.
<quipa> cool :) thanks
<Bike> it's from that whole papert minsky bla bla bla mit group
<quipa> yeah it's funny I never realised these things were connected before
m00natic has quit [Remote host closed the connection]
<quipa> "[Misky] developed, with Seymour Papert, the first Logo "turtle". Minsky also built, in 1951, the first randomly wired neural network learning machine, SNARC. "
Fare has quit [Ping timeout: 248 seconds]
<quipa> hehe funny not coming from a CS background and knowing enough CS history I find these relationships really interesting
<aeth> How is neural network support in Logo these days?
<quipa> actually there is some basic exercises on implementing ANN in NetLogo
<quipa> it's a bit bonkers
<quipa> but :P
<quipa> have a bookmark I think
<quipa> it's only a proof of concept though
kushal has quit [Remote host closed the connection]
<quipa> hehe crazy no?
kushal has joined #lisp
<Bike> "You can also run this model in your browser, but we don't recommend it "well, okay.
<quipa> hehe yeah I wouldn't either, NetLogo on web is more a proof of concept then anything else I think
<quipa> it works with some simple examples like 100 boids
<quipa> I think
<quipa> anyways back to my reading thanks for the resources :)
underlifE has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
doubledup has joined #lisp
housel has quit [Read error: Connection reset by peer]
quipa has quit [Quit: Leaving]
housel has joined #lisp
Fare has joined #lisp
ntqz has quit []
kaun has quit []
rumbler31 has joined #lisp
schweers has quit [Ping timeout: 240 seconds]
graphene has joined #lisp
nika has quit [Quit: Leaving...]
rumbler31 has quit [Ping timeout: 248 seconds]
housel has quit [Read error: Connection reset by peer]
housel has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
milanj has quit [Quit: This computer has gone to sleep]
<Bike> obscure question time. say i have a gf with two methods: (defmethod foo ((x integer) &rest r) ...) and (defmethod foo ((x string) &key ...) ...). is the call (foo 4 19) valid? My impression is yes
<phoe> Bike: what's the GF lambda list?
sauvin has quit [Remote host closed the connection]
<Bike> say it's implicitly defined. or has &rest, i guess.
<phoe> so, (defgeneric foo (x &rest r)).
<Bike> sure
<phoe> I think it's valid
<phoe> the GF only cares for the required arguments for dispatching
<phoe> and the whole remainder is passed to the method as-is.
<Bike> the generic function also takes care of checking keyword argument validity, is why i'm asking.
<phoe> The GF doesn't know anything about keywords.
<Bike> it does
<phoe> It doesn't have a &KEY in its lambda list.
<phoe> All it has is a &REST, and it's always valid.
<phoe> The keyword checking is delegated to the method in that case
<Bike> No
<phoe> ...wait, it's not
<Bike> it's uh
<Bike> clhs 7.6.4
<specbot> Congruent Lambda-lists for all Methods of a Generic Function: http://www.lispworks.com/reference/HyperSpec/Body/07_fd.htm
<Bike> "The checking of the validity of keyword names is done in the generic function, not in each method."
<phoe> I was looking at
<phoe> clhs 3.4.3
<phoe> clhs 3.4.2
<specbot> Generic Function Lambda Lists: http://www.lispworks.com/reference/HyperSpec/Body/03_db.htm
<phoe> "3. If any lambda list mentions &rest or &key, each lambda list must mention one or both of them."
<phoe> this one is taken care of
<phoe> 4. doesn't apply because GF doesn't have &KEY
<phoe> From 4, "The checking of the validity of keyword names is done in the generic function, not in each method." but this doesn't apply because 4 doesn't apply
<phoe> It's literally "If the generic function lambda list mentions &key..."
<phoe> (defgeneric foo (x &rest r)) doesn't have &key
<phoe> But I'm surprised to see one thing
<Bike> So, you'd expect (defgeneric foo (x &rest r)) (defmethod foo (x &key a)) (defmethod foo ((x string) &key b)) (foo "hello" :a 1 :b 2) to be an error?
<phoe> I'm surprised that line 6 does not error
<phoe> There's a keyword :B that's not defined anywhere, and I passed it to the GF
bars0 has joined #lisp
<phoe> Your case also mentions it - in the method defined on a string, keyword A is not defined anywhere
<phoe> There's no &allow-other-keys anywhere
<phoe> ...unless for some obscure reason &rest counts as an &allow-other-keys
<phoe> That's an obscure question indeed
<Bike> What I'm getting at is that that point doesn't depend on whether the gf lambda list has &key.
<Bike> I'm reasonably confident about that.
<phoe> My question is why passing an unknown keyword doesn't error in that case.
<underlifE> I'm confused about when to use sharp quote: #'. for example, why do (funcall (lambda (x) (+ x x)) 1) and (funcall #'(lambda (x) (+ x x)) 1) both work?
<Bike> underlifE: (lambda (x) (+ x x)) is a macro form expanding to #'(lambda (x) (+ x x))
<Bike> beb
<Bike> brb*
<underlifE> oh..
<phoe> underlifE: #'foo == (function foo)
<phoe> the sharpquote is just notation
graphene has quit [Remote host closed the connection]
<phoe> and the macro (lambda ...) expands into (function (lambda ...)) which evaluates to a function object
<phoe> that is then funcallable
<underlifE> yes but why do I need to use (function ...) at all?
<underlifE> ok so a function is only callable once its been passed through (function ...) ?
graphene has joined #lisp
<phoe> underlifE: it's a little bit more complicated
<pjb> underlifE: function is the only operator that creates closure.
<pjb> underlifE: so you use function when you want to create a closure.
<phoe> basically, FUNCALL accepts one of two things - either a symbol that names a function, or a function object itself.
<phoe> if you (defun foo ...), then you can (funcall 'foo ...)
<phoe> because FOO is the symbol that names a function.
<pjb> And notice that symbols can only name global functions, not local functions!
<pjb> local functions have lexical bindings, so the symbol naming them is immaterial.
<phoe> But, if you don't have a symbol naming a function, then you need the function object itself.
meepdeew has joined #lisp
FreeBirdLjj has joined #lisp
<phoe> And you can fetch these objects in several ways.
<phoe> The one that's the most basic one is FUNCTION - it's a special operator.
<phoe> It accepts either a symbol, or a lambda form.
<phoe> A symbol is, well, a symbol.
<phoe> A lambda form is Lisp code that describes an anonymous function.
<phoe> And, when FUNCTION returns, it returns a function object - literally an object that corresponds to a Lisp function.
<phoe> And you can funcall that.
<pjb> in general function return closures, not just the function!
<underlifE> hmm okay. so I always want to end up "grabbing" the function object. If I don't use FUNCTION then I'm stuck with just a symbol or literal?
<pjb> (let ((x 42)) (defun f () x)) (funcall (function f)) #| --> 42 |#
<pjb> a closure!
<phoe> underlifE: a symbol or literal? What do you mean?
<pjb> If most global functions have empty closures, it's not the fault of the function special operator.
<pjb> underlifE: not necessarily. Sometimes you want to be able to redefine the function (ie. update the fbinding) and call the new function, not the old one.
<pjb> In these cases, you don't want to use function.
charh has quit [Ping timeout: 248 seconds]
<underlifE> ok thanks. don't understand it yet but I will keep reading
random-nick has quit [Read error: Connection reset by peer]
<aeth> If you use #'foo it can be stale if you recompile the DEFUN FOO, if you use 'foo it won't be. Most useful if you're passing in a data structure containing a bunch of functions, e.g. a bunch of actions to happen at key presses.
<aeth> If you use 'foo instead of #'foo you can recompile the definition of foo while the graphical application is running and it will use the new definition
<aeth> Lots of people put a lot of effort into hacking together hotloading for C or C++ so they can do something similar. In CL, it's just remove the "#"
fikka has joined #lisp
<aeth> e.g. the GUI code has (funcall (aref key-actions some-number-representing-the-key-W)) and if the array stores 'move-forward at that position in the array you can C-c C-c recompile the function move-forward and the next iteration what pressing W does will change.
fikka has quit [Ping timeout: 240 seconds]
charh has joined #lisp
doubledup has quit [Quit: Leaving]
<trittweiler> underlifE, Common Lisp is what is usually referred to as a Lisp2 (or LispN) meaning it has more than 1 namespace. A bit akin to Perl $,@,% etc. in case you're familiar with that. #' is the way to look up a function in the local or global environment. So in Common Lisp, you can have a variable called LIST and still invoke the function called LIST. Study the stuttering definition of (defun ensure-list (list) (if (listp list) list (list list))) for exam
<trittweiler> ple. (Note that "(F x y)" == "(funcall #'F x y)", so the last expression (list list) is actually (funcall #'list list))
<Bike> phoe: i'm also surprised that's not an error (on sbcl, anyway). mysteries abound
varjagg has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
asarch has joined #lisp
<White_Flame> underlifE: (defun foo ...) and (defvar foo ...) don't clash. Variable access (+ foo 1) vs function access (foo 1 2) are unambiguous, due to position in the form
<White_Flame> (setf myfun #'foo) access the function named FOO instead of the variable named FOO
fikka has joined #lisp
<White_Flame> *accesses
emaczen has joined #lisp
<aeth> trittweiler: I think (F x y) actually behaves like (funcall 'F x y) because you don't have to recompile the users of a function that's not inline
<aeth> (if I'm mistaken I'll probably be corrected in 5 minutes)
graphene has quit [Remote host closed the connection]
DGASAU has quit [Ping timeout: 248 seconds]
graphene has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<sjl> aeth: try (disassemble (lambda () (f 10))) versus (disassemble (lambda () (funcall #'f 10))) versus (disassemble (lambda () (funcall 'f 10)))
<phoe> Bike: well, we might ask #sbcl
<Bike> not i
<Bike> (f x y) certainly doesn't behave like (funcall 'f x y), given that local functions exist
<phoe> well, I did
<mrottenkolber> So when CFFI loads a foreign library, and I then save the lisp image (CCL in my case, but should be broadly applicable), on loading the lisp image the .so gets (re)opened again (as observed via strace). I wonder how CFFI faciliates that? Can anyone shed some light? Is it the lisp implementation that closes/reopens files for it?
random-nick has joined #lisp
<shka_> mrottenkolber: yes
<shka_> CFFI is compatibility layer over implementations
<mrottenkolber> Guess I should ask further in #ccl
<shka_> and at this moment de facto standard
<shka_> akin to BT
<trittweiler> aeth: Yeah what Bike said. (funcall 'foo x y) == (funcall (symbol-function 'foo) x y), i.e. a strictly-global lookup
<Bike> but (f x y) and (funcall #'f x y) are identical if f is a function. i can't comprehend the inlining comment.
<Bike> can be identical, i should say
fikka has joined #lisp
Jesin has quit [Remote host closed the connection]
kerrhau has joined #lisp
<mrottenkolber> (for anyone who wonders, the relevant call chain to my question in CCL are SAVE-IMAGE > RESTORE-LISP-POINTERS > REFRESH-EXTERNAL-ENTRYPOINTS > REVIVE-SHARED-LIBRARIES, long live slime-who-calls)
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<shka_> hmmmmmmm
Fare has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 256 seconds]
<shka_> hm
<shka_> ccl save-application does not sound nearly as bad ass as save-lisp-and-die
<mrottenkolber> shka_: matter of taste I guess, I always found save-lisp-and-die to be an unintuitive, weird name
<shka_> heh, i giggle a little bit each time i type it
<shka_> ;]
fikka has joined #lisp
bars0 has quit [Ping timeout: 272 seconds]
josemanuel has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
cpape has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
fikka has joined #lisp
<pjb> White_Flame: on the other hand, (defvar foo) and (let (foo) …) clash, if you expect (let (foo) …) to do a lexical binding!
<pjb> never write a defvar or defparameter without stars!
fikka has quit [Ping timeout: 244 seconds]
<pjb> shka_: however, save-application does kill the current lisp image.
<pjb> The only implementation that doesn't commit suicide AFAIK is clisp.
<shka_> why it is difficult to implement such functionality without killing yourself?
<shka_> phoe: yeah, i know
<shka_> sadly, won't work if more then one thread is running
<shka_> which is the case if you are using swank
<phoe> shka_: you can't save a core in general with multiple threads running
<shka_> that as well
<shka_> even if they are asleep
<shka_> needless to say, just a little bit awkward
<shka_> i assume it has to be like this
<shka_> it does not provide me any information
Jesin has joined #lisp
<Shinmera> Colleen: tell mrottenkolber look up deploy
<Colleen> mrottenkolber: About deploy https://shinmera.github.io/deploy#about_deploy
<pjb> phoe: actually, the problem is that those implementation use the unix VM ie. the C VM (eg. the thread stacks are C stacks). Implementations that use a more lispy VM such as clisp don't have this problem.
<Shinmera> mrottenkolber: Note that, in order to ensure that binaries still work on deployed systems, the libraries should be closed before dump and opened on boot, as otherwise absolute paths might get baked in.
<pjb> With a pure lispy stack for processes, you can easily free the processes and safe them to an file.
<phoe> pjb: oh!
<shka_> pjb: now that sounds cool
<pjb> Note that's not impossible either to save C threads, this is implemented in some extensions to linux to be able to migrate processes across nodes of clusters for example.
djeis has joined #lisp
<shka_> i actually looked into that
<pjb> (just paginate out the whole process, and copy the swap file ;-)
<shka_> but it was so hackish i decided to go for green threads instead
<pjb> But we're not talking of unix process images there, but of lisp images… Hence the difficulty.
<shka_> or fibers as they are called nowdays
<pjb> Of course, green threads is a solution when you don't care for digging deep into the layers under the lisp layer.
<shka_> yes, but they are not so trivial to implement anyway
<pjb> I would say that things like green threads also demonstrate that despite having been historically distributed as sources, the unix system also had its share of difficulties due to privative/proprietary software and kernels…
djeis has quit [Client Quit]
<pjb> While some (or most) of the kernel was "documented" in the BSD book, the kernel sources weren't widely available before Minix/Linux (and even long after, hence the success of Linux).
<pjb> So a lot of things that seem like black magic, would actually be rather trivial to implement in linux or on a lisp system (when we have all the sources).
FreeBirdLjj has joined #lisp
tralala has quit [Ping timeout: 260 seconds]
djeis97 has joined #lisp
<White_Flame> Shinmera: yeah, I've had that problem with quicklisp. If you want to load more libraries after deployment, it still has the old paths from the dev box
fikka has joined #lisp
<Shinmera> Yep. Deploy takes care of this (and other parts of the process) for you :)
<White_Flame> (different than FFI obv, but still one that I tend to hit)
<White_Flame> cool,l I hadn't seen it before
<Shinmera> Well, actually it doesn't take care of ASDF paths yet, but I want to make it do that
<Shinmera> It does take care of binary paths thoug
<Shinmera> h
<mrottenkolber> Shinmera: not sure this applies on CCL which seems to reopen shared objects by searching via the "so name", not its path.
<Shinmera> It might not!
<shka_> oh, one more thing
<White_Flame> Shinmera: to be very specific, it re-finds the quicklisp directory on the deployment box as well?
<shka_> or maybe some other time
<Shinmera> White_Flame: No, I misread your message the first time around, sorry. It doesn't do anything ASDF/QL specific at the moment.
<White_Flame> ah, k
<Shinmera> But I'd like to add that to allow things like hot patches and plugins
<Shinmera> Since it already takes care of precise path management for shared libraries that seems like it would be in the ballpark.
<White_Flame> though I think that particular feature should probably be in QL itself, like (quicklisp:drive-changed-from-under-you) or something
<mrottenkolber> White_Flame: note that what you ran into might have been different so versions. i.e., libfoo.2 on your dev box and libfoo.3 on the deploy box. In this case its arguable that it should fail.
fikka has quit [Ping timeout: 240 seconds]
<mrottenkolber> AFAIU this is a general unix issue, nix(os) can help in this case
<White_Flame> mrottenkolber: I'm not talking about FFI, I'm just talkign about plain lisp libs
<mrottenkolber> Ah ok
<White_Flame> separate but similar problems
m3tti has joined #lisp
m3tti has quit [Client Quit]
<pjb> note that open files in unix imply a reference to the library, so it's not garbage collected by the file system! (even if you unlink it from the directory structure).
shka_ has quit [Ping timeout: 244 seconds]
<pjb> what this implies, is that to do it right, you should probably take a copy of all open libraries and files when saving an image.
<pjb> Only in the case of sockets, there is an API for disconnections (SIGPIPE, etc).
<pjb> For other IPC, this has to be studied. shared memory, pipes, etc…
djeis97 has quit [Quit: ERC (IRC client for Emacs 25.3.50.2)]
m3tti has joined #lisp
djeis has joined #lisp
<pjb> In any case, the point here is that the unix VM implies a lot of assumptions and dependencies that are not made explicit (this is an environment problem), hence the difficulty.
<mrottenkolber> pjb: I don’t follow. The moment the lisp saves its image and the process exits all fds are closed by the OS. When the saved image is loaded it will try to open some .so files etc.
m3tti has quit [Remote host closed the connection]
<pjb> Making those dependencies explicit and configurable in an environment would make migration and freezing in images trivial. (cf. keykos, eros-os, etc).
<pjb> mrottenkolber: well, currently implementations don't try to save threads in the lisp image.
<pjb> mrottenkolber: so they only save the lisp heap and actually restart the lisp toplevel.
<pjb> new stacks.
djeis has quit [Client Quit]
<pjb> Notice that in the current situation, any C object obtained thru FFI is thrown away in the lisp image!
fikka has joined #lisp
nowhere_man has joined #lisp
Oddity has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
rocx has joined #lisp
Denommus has quit [Remote host closed the connection]
rumbler31 has joined #lisp
Denommus has joined #lisp
rumbler31 has quit [Remote host closed the connection]
Oddity has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
dented42 has joined #lisp
<mrottenkolber> Shinmera: right, so for example on Ubuntu libcrypto is installed as libcrypto.so and on Slackware its libcrypto.so.1. Lisp images saved on Slackware/CCL would look for a libcrypto.so.1 (the so name) and fail. Not sure if deploy can work around this (AFAIU loading i.e. lbcrypto.so.2 would be a bug.)
fikka has joined #lisp
<Shinmera> It's not a bug if your application only specifies libcrypto.so, and not libcrypto.so.1
<Shinmera> Picking the correct version requirements is the application writer's job
<mrottenkolber> I wonder how cl+ssl ended up picking .1
fikka has quit [Ping timeout: 256 seconds]
asarch has quit [Quit: Leaving]
<p_l> mrottenkolber: because just .so without number is a bug, iirc
<p_l> it got murkier with this-century's breakage with versioned symbols and the like, but traditionally the number specified ABI version
<p_l> and unversioned was just a symbolic link to versioned
<p_l> if you depend on unversioned name, you're on the hook when it inevitably goes wrong
<mrottenkolber> p_l: my thinking exactly, but in this case Ubuntu seems to only provide an unversioned .so path :D
<p_l> mrottenkolber: I'd check :)
<mrottenkolber> anyways I am in the process of writing app my dependency management solution for a pet CL application I have been hacking on that ran into all sorts of issues. I ended up with a Makefile, vendored quicklisp, and Nix :D
fikka has joined #lisp
<mrottenkolber> *writing up
<p_l> hmm, /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 <--- xenial (amd64)
pierpal has quit [Quit: Poof]
<mrottenkolber> Huh, my bad. No libcrypto.so.1 though.
pierpal has joined #lisp
kajo has joined #lisp
<mrottenkolber> /usr/lib/x86_64-linux-gnu/libcrypto.so -> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
<p_l> I don't think libcrypto.so.1 was in present for last decade or two
<p_l> would make sense for Slackware to still have .1 then ;)
<mrottenkolber> :D sure
<p_l> the joys of hacking symlinks to point 0.9.5 at 0.9.8 and the like
<p_l> it even worked, mostly
fikka has quit [Ping timeout: 268 seconds]
<no-defun-allowed> Good morning
<klltkr_> Morning no-defun-allowed
<mrottenkolber> So... CCL should know that libfoo.1 can be called libfoo.1.*?
bbokser has joined #lisp
emacsomancer has joined #lisp
fikka has joined #lisp
<p_l> mrottenkolber: there's a list of names (if not a function hook) to attempt different paths
<pjb> mrottenkolber: I doubt it. You would rather write code to reload the foreign libraries at image start up…
mindCrime has quit [Ping timeout: 244 seconds]
bbokser has quit [Ping timeout: 244 seconds]
<mrottenkolber> Well, I would write a default.nix and never look back (-:
Bike has quit [Ping timeout: 252 seconds]
<pjb> mrottenkolber: security bugs.
<pjb> updates, lead to upgrades, lead to incompatible libraries.
<pjb> Distributions don't care if you have to rewrite your app for lib incompatibility.
<pjb> They care not to lose popularity by providing always the latest fad and fashion of the quarter.
<MichaelRaskin> Well, with Nix you can pick which library you import from master and which from stable that tries to track patchlevel releases, not the feature releases
random-nick has quit [Read error: Connection reset by peer]
<pjb> Clearly, if your job was to write the system and application for a space station or a Moon (or Mars) bas that should last 100 years, you wouldn't proceed the same, or even use the same systems and (written in c!) libraries…
<pjb> I told you: don't use FFI: rewrite it in lisp!
<MichaelRaskin> If it is a space station on Mars, you don't care as much about security bugs…
<pjb> You bet!
FreeBirdLjj has joined #lisp
<pjb> Mars is in the IPN!
<mrottenkolber> MichaelRaskin: I got that default.nix for my CCL app working nicely btw, a bliss!
random-nick has joined #lisp
Fare has joined #lisp
<MichaelRaskin> Well, simple library injection is simple.
SaganMan has joined #lisp
<pjb> which means that you don't even need direct access to a powerful antena to pirate them, you can just hack on the internet…
<MichaelRaskin> pjb: when BGP starts doing anything remotely resembling proper sanity filtering, let alone security, I will believe Mars stations care about security
<MichaelRaskin> I guess with NAT any attack on Mars rovers would time out, and without NAT, the attacker will be more or less identifiable
<pjb> You would send worms and viruses.
<pjb> The eminently hackable police bodycam <https://boingboing.net/2018/08/12/vievu-patroleyes-firecam-di.html>
<MichaelRaskin> Well, sending requires a TCP connection, most of the time. Even if brief
<pjb> MichaelRaskin: IPN is a DTN, so it works more like UUCP than like the Internet…
<pjb> So thing Morris, more than DDOS.
<MichaelRaskin> Doesn't change irrelevance of rover-side security
<MichaelRaskin> You will need to take over enough of the Earth-side part, that you can just overwrite the next batch of commands sent to the rover
<pjb> MichaelRaskin: say that, until somebody on Earth sends messages tot he rover to run against your airlock!
<pjb> You can always set up your own antena.
bbokser has joined #lisp
<pjb> or hack some other node of the IPN.
<MichaelRaskin> Yes. And the nodes do not have proper security inside IPN. And one of the nodes has root access to rover by design
<MichaelRaskin> And you can spoof it because no real security
<MichaelRaskin> Tell me again how vulnerabilities in libraries on the rover side matter in this situation
<pjb> And the point here is that there is a much bigger computer systems that are life critical than on Earth. On Earth, when you hack a Pu factory, people can always run away. On Mars, if you hack an airlock, it's harder for people to survive.
<pjb> MichaelRaskin: you never know, any bug can help.
Denommus has quit [Remote host closed the connection]
<pjb> Software Security Is a Programming Languages Issue <http://www.pl-enthusiast.net/2018/08/13/security-programming-languages-issue/> !!!
<MichaelRaskin> When someone hacks a hydroelectric dam to open the maximum flow (which is expected to be fearsomely easy), death count will probably be larger than the optimistic plan for the Mars colony size in the next twenty years.
kajo has quit [Ping timeout: 244 seconds]
<pjb> (Here advocating for rust, but lisp existed for 60 years, imagine the infrastructure if it had been used instead of C!).
<zigpaw> we can only dream :/
kajo has joined #lisp
<pjb> MichaelRaskin: perhaps, but again, it's easier to run away from a tsunami on Earth than most kinds of problems in space.
vlatkoB has quit [Remote host closed the connection]
<MichaelRaskin> Washing away a city always tends to collect a large body count anyway
* p_l notes that safety features made for Ada make Rust look amateurish
pierpa has joined #lisp
maarhart has joined #lisp
maarhart has quit [Excess Flood]
maarhart has joined #lisp
maarhart has quit [Excess Flood]
maarhart has joined #lisp
maarhart has quit [Excess Flood]
maarhart has joined #lisp
maarhart has quit [Excess Flood]
maarhart has joined #lisp
maarhart has quit [Excess Flood]
<pjb> Indeed. [PR].* languages are clown languages.
<papachan> :)
<MichaelRaskin> Let me summon some Racket users
<MichaelRaskin> Rust seems to be an attempt to fix a class of concurrency bugs without killing performance at the lowest possible cognitive cost. The costturned out to be quite high, so they didn't even look into additionally having Ada-level non-concurrency related safety improvements
<p_l> umm, where does Rust tackle concurrency?
josemanuel has quit [Quit: leaving]
bbokser has quit [Ping timeout: 260 seconds]
<p_l> Pretty much the main thing they are crowing about is memory safety, and mostly by rebranding compile-time (BDSM-level) GC as "non GC" because marketing
sjl has quit [Ping timeout: 268 seconds]
<no-defun-allowed> rust can't do shit
<no-defun-allowed> it's got reference counting IIRC but that's about it
FreeBirdLjj has quit [Ping timeout: 256 seconds]
<no-defun-allowed> "memory leaks are safe, kids"
<p_l> it got some refcounting, but most of it is souped up not-so-new compile-time GC precomputation
<no-defun-allowed> indeed.
<pjb> Yeah, useless.
<pjb> clown language.
<no-defun-allowed> 12/10 shit language
<p_l> maybe, maybe not, but for the few places where I might consider it, it disqualifies itself by lacking codegen for the platforms involved
<no-defun-allowed> also rust macros suck
<no-defun-allowed> they avoid running compile time code by using pattern matching and templates. they might add syntax parsing but you'd have to do the AST yourself
varjagg has quit [Ping timeout: 256 seconds]
<no-defun-allowed> you have a compiler with a perfectly fine AST but you have to roll your own? "duh it's a small core compiler, just use crates"
Bike has joined #lisp
<no-defun-allowed> more related to CL, is SBCL often slow at compilation? i can definitely feel it with macsyma and a friend says part of his game compiles faster with CCL
<Bike> sbcl's compiler is slower than ccl, for sure
<p_l> no-defun-allowed: SBCL is *infamously* slow at compile time
random-nick has quit [Read error: Connection reset by peer]
<no-defun-allowed> does (optimize (compilation-speed n)) change that?
<p_l> not sure
<p_l> SBCL's afaik does simply more work per form than other
<no-defun-allowed> fair enough, sbcl is pretty fast at running the code afterwards
* no-defun-allowed reads more rust book
<no-defun-allowed> they don't have closures
sjl has joined #lisp
<no-defun-allowed> if you want to return one you have to put it in a box type, cause apparently fat pointers are too hard
sjl_ has joined #lisp
sjl has quit [Ping timeout: 260 seconds]
rocx has quit [Remote host closed the connection]
<White_Flame> Rust to me seems to be a different take than C++ at making a better C. But it's still at that low level.
angavrilov has quit [Remote host closed the connection]
<no-defun-allowed> C++ is an object oriented assembly language.
rumbler31 has joined #lisp
<p_l> no-defun-allowed: except it's not even close to the metal at all
robotoad has quit [Quit: robotoad]
rumbler31 has quit [Ping timeout: 268 seconds]
<no-defun-allowed> whoosh
<Bike> it's really nothing like assembly at all. it's just annoying in various ways because you have to be explicit about memory
<Bike> calling something "assembly" for that reason is silly, and it's not missing any point to say so
<no-defun-allowed> it's a joke. a terrible one maybe but don't take it so seriously please
Guest5800_ has quit [Quit: Connection closed for inactivity]
<p_l> Bike: it's funnier when you notice that C disallows direct memory manipulation
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 25.3.2)]
<p_l> it only defines access to "objects"
allcr has joined #lisp
<Bike> i guess you could hardly define any more semantics otherwise
<Bike> "and this object will be like X, unless something elsewhere decides to write garbage into random addresses"
<p_l> Well, you could describe a more global memory model
<p_l> ZetaLisp arguably had one
<p_l> (and all LispMachineLisps)
<Bike> i know not of the zeta
<p_l> the places mechanism in CL is partially descended from the locatives (kinda like pointers in C, kinda like raw addresses) in Zeta
<Bike> so, what you could do arithmetic on them?
<p_l> yes, unlike C pointers (which aren't actually supposed to support arithmetic) there were functions to modify locatives in all manner of ways
<p_l> (well, you needed some support to implement the language after all)
<Bike> my understanding of the C rules is you can do arithmetic as long as the answer isn't out of bounds of the object
<Bike> and also taking the type size into account. riiiight yes.
<Bike> probably not supposed to write things halfway into an int
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
robotoad has joined #lisp
kajo has joined #lisp
<p_l> Bike: technically the arithmetic is supported only for "arrays"
<Bike> you can't even use offsetof?
<p_l> this is kinda why Go separated array offsets to different set of operations
<p_l> Bike: well, the devil is in the details
<Bike> spose that's natural
<Bike> and c does have so many details
<p_l> (n.b., Go is something akin to "original family" C version 5 or something)
<White_Flame> the one thing that annoys me about doing bit manipulates in any HLL, coming from an 8-bit asm background, is that none of the languages that achieved any popularity ever expose the Carry flag in add/shift/roll operations
<White_Flame> *bit manipulations
<Bike> i remember baker complained about that in relation to lisp
<White_Flame> yep, it's not excluded
<White_Flame> however, arbitrary length integers mitigates it somewhat
fikka has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
Kaisyu has joined #lisp
Fare has quit [Ping timeout: 272 seconds]
Kaisyu7 has joined #lisp
charh has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Kundry_Wag has joined #lisp
Copenhagen_Bram has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
Copenhagen_Bram has joined #lisp
ebrasca has joined #lisp
FreeBirdLjj has quit [Ping timeout: 244 seconds]
ebrasca has quit [Remote host closed the connection]
ebrasca has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 272 seconds]