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/>
pve has quit [Quit: leaving]
donleo has quit [Ping timeout: 260 seconds]
zetef has quit [Ping timeout: 264 seconds]
tyson2 has quit [Remote host closed the connection]
certainty has joined #commonlisp
certainty has quit [Ping timeout: 245 seconds]
X-Scale has joined #commonlisp
masinter has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
cinerion has quit [Quit: WeeChat 4.0.1]
cinerion has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
random-nick has quit [Ping timeout: 240 seconds]
Pixel_Outlaw has joined #commonlisp
contrapunctus has joined #commonlisp
tyson2 has joined #commonlisp
Oladon has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
rtypo has quit [Ping timeout: 255 seconds]
yitzi has quit [Remote host closed the connection]
certainty has joined #commonlisp
certainty has quit [Ping timeout: 264 seconds]
jeffrey has quit [Remote host closed the connection]
herjazz has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
certainty has joined #commonlisp
pfdietz has quit [Quit: Client closed]
certainty has quit [Ping timeout: 264 seconds]
smlck has quit [Changing host]
smlck has joined #commonlisp
X-Scale has quit [Quit: Client closed]
chrcav has quit [Quit: leaving]
smlck is now known as [smlckz]
chrcav has joined #commonlisp
[smlckz] is now known as |smlckz|
anticrisis has quit [Read error: Connection reset by peer]
anticrisis has joined #commonlisp
|smlckz| has quit [Quit: |smlckz|]
hide-difference1 has quit [Ping timeout: 240 seconds]
smlckz_ has joined #commonlisp
X-Scale has joined #commonlisp
Oladon has quit [Quit: Leaving.]
herjazz has quit [Quit: leaving]
tyson2 has quit [Read error: Connection reset by peer]
certainty has joined #commonlisp
Pixel_Outlaw has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 258 seconds]
bh34e5 has quit [Ping timeout: 245 seconds]
xlymian has joined #commonlisp
certainty has joined #commonlisp
X-Scale has quit [Quit: Client closed]
certainty has quit [Ping timeout: 240 seconds]
Lycurgus has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
Fare has joined #commonlisp
akoana has quit [Quit: leaving]
certainty has joined #commonlisp
certainty has quit [Ping timeout: 264 seconds]
X-Scale has joined #commonlisp
dnhester26 has joined #commonlisp
dnhester26 has quit [Ping timeout: 264 seconds]
Lycurgus has quit [Quit: leaving]
dcb has quit [Quit: MSN Messenger 4.1.1]
Lycurgus has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
X-Scale has quit [Quit: Client closed]
certainty has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
markb1 has joined #commonlisp
certainty has quit [Ping timeout: 258 seconds]
Lycurgus has quit [Quit: leaving]
certainty has joined #commonlisp
certainty has quit [Ping timeout: 240 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
certainty has joined #commonlisp
certainty has quit [Ping timeout: 258 seconds]
phantomics has quit [Remote host closed the connection]
phantomics has joined #commonlisp
zxcvz has joined #commonlisp
certainty has joined #commonlisp
certainty has quit [Ping timeout: 245 seconds]
Jach has quit [Remote host closed the connection]
Jach has joined #commonlisp
igemnace has joined #commonlisp
certainty has joined #commonlisp
habamax has joined #commonlisp
monospod has joined #commonlisp
monospod has quit [Client Quit]
monospod has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
Lycurgus has joined #commonlisp
thollief has joined #commonlisp
varjag has quit [Ping timeout: 240 seconds]
monospod has quit [Ping timeout: 240 seconds]
monospod has joined #commonlisp
alip has quit [Quit: The Way is limitless, so nature is limitless, so the world is limitless, and so I am limitless. For I am abstracted from the world, the world from nature, nature from the Way, and the Way from what is beneath abstraction.]
dnhester26 has joined #commonlisp
igemnace has quit [Remote host closed the connection]
alip has joined #commonlisp
Lycurgus has quit [Quit: leaving]
pve has joined #commonlisp
monospod has quit [Quit: Leaving]
rgherdt has joined #commonlisp
rtypo has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
donleo has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
gooba_ has joined #commonlisp
gooba has quit [Ping timeout: 255 seconds]
zephyr has quit [Quit: Ping timeout (120 seconds)]
zephyr has joined #commonlisp
herjazz has joined #commonlisp
dino_tutter has joined #commonlisp
cage has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Read error: Connection reset by peer]
random-nick has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
habamax has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
dnhester26 has joined #commonlisp
<dnhester26> Hi, given an input stream how can I tell the length of the stream? http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_i.htm#input
<ixelp> CLHS: Glossary-Section I
<dnhester26> I tried `(length stream)` but got an error because it's not a sequence...
<dnhester26> I can probably do `alexandria:read-stream-content-into-byte-vector` and then do `length` but I'm wondering if there's an official way to do it
<dnhester26> ok, doing `alexandria:read-stream-content-into-byte-vector` worked, but if anyone knows if there's a better or more normal way to do it I would appreciate the explanation
<cage> dnhester26: I do not think is possible to know the number of elements of a stream in advance, it could be infinite, think of a net socket, for example
<dnhester26> cage thanks, that's what I was just thinking now. It's just that for whatever reason I'm getting a file as a stream instead of as a byte sequence from some library I'm using, that's why I was thinking about it as a file, but right, it's just a stream
<dnhester26> Thanks
<dnhester26> @cage
<cage> you're welcome!
tyson2 has joined #commonlisp
Inline has quit [Quit: Leaving]
bike has quit [Remote host closed the connection]
<Shinmera> dnhester26: if it's a file-stream, you can use file-length.
<Shinmera> but otherwise, as has been pointed out, a stream does not have a length
<dnhester26> Shinmera thanks, will look that up. It was actually a flexi-stream input-vector I'm getting from a file upload in caveman2
<Shinmera> :shrug:
dnhester has joined #commonlisp
<Shinmera> one of my gripes with gray streams is that it does not expose a length function.
<dnhester26> What are gray streams?
<Shinmera> it's an API that lets users create their own stream types, like flexi streams does
<Shinmera> but it does not let you create bounded streams
Inline has joined #commonlisp
<Shinmera> or rather, it does not let you communicate the length to the user in a standardised way for bounded stremas
<dnhester26> ah got it
<Shinmera> which is rather annoying since things like in-memory vector streams definitely also have a bounded length
<Shinmera> heck even a string input stream would have a length, but you can't access that either.
<Shinmera> oh well, something for the next standard :v
<dnhester26> Shinmera Btw, since you are here, and I will eventually have to deploy a caveman mito app probably building an executable, I saw that you commented on an issue:
<dnhester26> "I'm not even gonna look at the code because I already know the issue: you cannot create variables or anything in foreign memory and expect them to stay sane after dumping an executable"
<dnhester26> "you have to create your database connection or whatever it is in the function that's run when the executable starts"
<dnhester26> Does that mean that if I declare the variable in my config.lisp file it's ok? What did you mean by foreign memory?
<Shinmera> foreign memory is memory managed by C, not lisp
<Shinmera> and I have no idea what a config.lisp file is or whatever
<Shinmera> so you're asking the wrong person
<dnhester26> ok, as long as I declare my variable in my lisp code I'm OK, that issue before was someone accessing some variable created in some external code not part of the lisp project
<dnhester26> Is that the right understanding?
<Shinmera> uh
<Shinmera> probably not?
<Shinmera> it's not about variables, but values
<Shinmera> if your code calls some C function that does some stuff with foreign memory, that memory will not be retained correctly across a dump
<Shinmera> so if you open a database connection, or a file, or create some C object, or whatever prior to dump
<Shinmera> it won't be valid afterwards
<dnhester26> I need to make sure that the executable will create a new database connection when it runs
<Shinmera> well, more than that, you need to ensure that it doesn't create one prior to running
<dnhester26> Ok, got it, thanks!
<Shinmera> sure
Lycurgus has joined #commonlisp
<Shinmera> as long as you, yourself, only call startup functions and initialisation stuff in a function that runs when the image resumes you should be fine
<Shinmera> but there are some libraries out there that try to do too much when they're loaded, rather than used for the first time
<Shinmera> so depending on that it could still be a problem even if you don't do anything wrong.
zxcvz has joined #commonlisp
<dnhester26> Does anyone know where the current documentation for alexandria is? I tried https://alexandria.common-lisp.dev/draft/alexandria.html but for example it doesn't include the function `assoc-value` mentioned in here https://lispcookbook.github.io/cl-cookbook/data-structures.html#access
<ixelp> alexandria Manual
<dnhester26> Shinmera: thanks, I'll keep that in mind because I'm using a library called mito which was included in the original question for which you wrote that answer
yitzi has joined #commonlisp
Lycurgus has quit [Quit: leaving]
msavoritias has joined #commonlisp
herjazz has quit [Quit: leaving]
Pirx has joined #commonlisp
<Pirx> hi
bike has joined #commonlisp
<gendl__> Hi, is it true that in an SMP CL, i have to put a process lock around any code which allocates or modifies C memory?
<cage> dnhester26: i found more useful to check the code, for alexandria
<gendl__> I find that if I don't put such locks, I get Segmentation Violations when the GC invokes my C finalizations which free the C memory.
<Inline> heh
<dnhester26> cage thanks, ok, I'll resort to that, was just hoping there were updated docs since I heard alexandria was stable and widely used
<dnhester26> cage do you usually do `M-.` or do you open the source code file in github?
<gendl__> Running the same code in a non-SMP CL without locks does not result in segmentation violations.
<gendl__> (of course in SMP i have to put a lock around the finalization function too)
<gendl__> Just wondered if there's any other way to deal with this other than ham-handed process locking
Fare has quit [Ping timeout: 245 seconds]
<cage> dnhester: sometimes i thought about sending a patch but i am just lazy :)
<cage> yes i use M-. a lot, not just for alexandria, i found it an useful tool :)
<cage> i have to go, bye!
cage has quit [Remote host closed the connection]
bh34e5 has joined #commonlisp
randomperson has joined #commonlisp
randomperson is now known as randomperson1823
<randomperson1823> Hello, I am currently going through the Practical Common Lisp book and I am struggling a bit how exactly macros work. In particular, I am a bit confused by ',:
<randomperson1823> (defmacro check (&body forms)
<randomperson1823>   `(combine-results
<randomperson1823>     ,@(loop for f in forms collect `(report-result ,f ',f))))
<randomperson1823> To my understanding, ',f means that we evaluate f (due to comma) and then don't evaluate it, which sounds a bit strange.
<randomperson1823> For example, if f is (+ 1 2), why doesn't ,f get evaluated to 3, resulting in ', just being '3?
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
<gendl__> ',f will result in '(+ 1 2) i.e. the literal expression.
<gendl__> evaluation doesn't happen until the macroexpansion is done.
<randomperson1823> Hmmm, I don't think I fully get it.
<gendl__> Try the idiom:
CO2 has quit [Quit: WeeChat 4.1.1]
<beach> randomperson1823: Macros manipulate expressions, so when you say "f is (+ 1 2)", that means that the value of the variable F is the list (+ 1 2).
<beach> randomperson1823: ... so you are indeed evaluating the variable F, and its value is the list (+ 1 2).
<gendl__> `(pprint (macroexpand-1 '(check ...)))`
<gendl__> and just see what you get.
<randomperson1823> gendl__: I know what I get; I am/was mainly confused on what the rules to get there are.
<beach> randomperson1823: Did what I said make sense?
<gendl__> well, try some experiments, and yiu can induce the rules.
<randomperson1823> It does make sense. Out of curiosity, is it possible to "force" the further evaluation of (+ 1 2)?
<beach> Sure, use EVAL.
<randomperson1823> gendl__: I see where you are coming from, but that doesn't satisfy the computer scientist in me :P
<Shinmera> kinda
<Shinmera> the lexical environment won't be the same, of course
<beach> randomperson1823: But that's not what you want to do in a macro, because the expression might be (+ 1 X) and X will have no value then.
<randomperson1823> Right, that makes sense. So in the macro above I have the choice of using f, which would just be the symbol f; ,f which would evaluate to the value it is bound to (e.g., (+ 1 2), which will get evaluated at run time), and ',f, which would result in '(+ 1 2). Is that correct?
<beach> randomperson1823: Well, your language is not precise enough, like "just be" and "result in". It is a question of when things happen.
pfdietz has joined #commonlisp
<beach> If, in the body of a macro, you have just F, outside of any ' or `, then the value of F will be computed at macro-expansion time.
<beach> If you have `(.... F ...) as the body of the macro then, F is quoted, because of the `, so you get the symbol F in the expansion.
dnhester26 has quit [Remote host closed the connection]
masinter has quit [Remote host closed the connection]
<beach> If you have `(... ,F ...) as the body fo the macro, then the expansion will contain the value of F, so in your case the list (+ 1 2), and the total expansion would be (... (+ 1 2) ...).
<beach> Finally, if you have `(... ',F ...) which is the same as `(... (quote ,F)...) you will get (... (quote (+ 1 2)) ...) which is the same as (... '(+ 1 2) ...).
<randomperson1823> Thank you very much for this breakdown!
<beach> Pleasure.
<randomperson1823> Are there any good resources that you can recommend where things like this are described (besides the CL specs)? Something along the lines of operational semantics maybe
<beach> The description of the semantics is usually informal.
<randomperson1823> I see. So I guess the CL spec is the best place to look then?
<beach> randomperson1823: But the rule is quite simple. If you have `(...) then what is in ... is quoted, unless preceded by a comma.
contrapunctus has left #commonlisp [#commonlisp]
<beach> randomperson1823: On Lisp is a book almost entirely about macros.
<beach> randomperson1823: It is freely available online, or at least it was.
<randomperson1823> Ah nice! I was planning to go through that one after finishing Practical Common Lisp
<randomperson1823> Thanks again for your help :)
<beach> Sure.
<beach> randomperson1823: Though, macros are not used that often. You would be better off studying CLOS first.
dnhester has quit [Ping timeout: 248 seconds]
<beach> randomperson1823: When macros are needed, they are essential of course. But most macros are quite simple. And newbies tend to use macros where functions are preferable.
<beach> randomperson1823: Classes and generic functions, on the other hand, are used everywhere in modern Common Lisp code.
<randomperson1823> Interesting. What are the resources you'd recommend for CLOS?
<beach> Sonja Keene's book is probably the first one to read.
<randomperson1823> beach: "Object-Oriented Programming in Common Lisp: A Programmer's Guide to CLOS" that one?
<beach> Yes.
Inline has quit [Ping timeout: 240 seconds]
<randomperson1823> I have to admit though, I am more interested in Lisp in regards to language design rather than actually using it.
<beach> randomperson1823: Macros are used to extend the syntax of the base language, not at the character level, but at the s-expression level. You can think of macros as creating new special operators.
Inline has joined #commonlisp
Lycurgus has joined #commonlisp
<beach> randomperson1823: Oh, excellent, then CLOS is perfect. Because it is totally beautiful in its compromise between flexibility/interactivity and performance.
<beach> Or, rather, they managed to make very few compromises, while still maintaining great performance, at least of implemented well.
<randomperson1823> One thing that has bothered me is the lack of static typing/verification. While I do understand why one would prefer something dynamic, I have to admit that I would love to be able to state invariants and have them statically checked.
<beach> randomperson1823: For that stuff, there is the AMOP book.
<beach> randomperson1823: The Art of MetaObject Programming.
<beach> randomperson1823: That's a common desire among people who come from statically typed languages.
<Lycurgus> randomperson1823: you wanna haskell
<randomperson1823> beach: The Art of the Metaobject Protocol?
<randomperson1823> Lycurgus: No, I really don't :P
<beach> That's what I said, yes.
<Lycurgus> hs and cl are opposites in that respect, classically
<randomperson1823> What is your opinion on Paradigms of Artificial Intelligence?
<beach> It's a great book. Probably the one to read after PCL.
<randomperson1823> Right now I have the following list:
<randomperson1823> * Practical Common Lisp (currently on)
<randomperson1823> * On Lisp
<randomperson1823> * Paradigms of AI
<randomperson1823> * Object-Oriented Programming in CL... by Sonja Keene
<randomperson1823> * The Art of the Metaobject Protocol
<randomperson1823> If you have any other books you can recommend, or have a recommendation for a reading order, I would be more than happy if you could share it with me.
<randomperson1823> As mentioned above, my interests mostly lie in learning about language design (always having types/formal verification in the back of my head), since this is the direction I am considering for my master thesis and maybe even a doctorate.
Lycurgus has quit [Quit: leaving]
CO2 has joined #commonlisp
Fare has joined #commonlisp
<beach> randomperson1823: I would do PAIP before On Lisp.
<beach> randomperson1823: There is also Lisp in Small Pieces for language design. It is mainly using Scheme, but there are comparisons with Common Lisp.
<beach> randomperson1823: The author uses denotational semantics for the basic semantics of Lisp.
<beach> randomperson1823: I hope you can find a good advisor. It looks to me like language design is dead as an academic discipline. I could be wrong, of course. I haven't looked into ti for a while.
<bjorkintosh> randomperson1823, EOPL should be on your list then.
<bjorkintosh> it's scheme based but as usual, it's worth checking out.
<randomperson1823> beach: Where would you put Lisp in Small Pieces in terms of order? Also, should I read something about Scheme before reading it?
<beach> randomperson1823: Well, the original reading list was about Common Lisp. LiSP is more general, so it depends on your priority between Common Lisp and language design. As I recall, there is a brief introduction to Scheme in it, so that should be enough I think.
<randomperson1823> bjorkintosh: Same here; where would you place it in terms of order and should I learn about Scheme before?
<bjorkintosh> you should definitely learn some scheme first. it won't take you very long.
<bjorkintosh> just read until you get stuck and figure out why :-)
<bjorkintosh> and experiment endlessly. EOPL inspired LiSP which I didn't know.
<randomperson1823> beach: I am mainly interested in Lisp overall; I just found recommendations for PCL everywhere when looking online where to start, hence CL.
gooba_ has quit [Quit: Leaving]
<randomperson1823> bjorkintosh: Any recommendations for Scheme?
<bjorkintosh> racket is great.
gooba has joined #commonlisp
<bjorkintosh> otherwise, MIT Scheme is what everyone used
<randomperson1823> If I know Racket, will I understand EOPL?
Fare has quit [Ping timeout: 272 seconds]
<bjorkintosh> yes.
<bjorkintosh> remember though, racket comes with a very fancy programming environment.
<bjorkintosh> you can do quite a lot more with it.
<bjorkintosh> scheme itself is tiny. this is pretty much all you need to get going with it: https://www.scheme.com/tspl4/
<ixelp> The Scheme Programming Language, 4th Edition
<gendl__> Note there is a #scheme channel here on libera.chat
<bjorkintosh> as well.
<bjorkintosh> but the concepts from any of the scheme books translate very well to commonlisp
<bjorkintosh> they're half siblings after all :-)
<randomperson1823> bjorkintosh: Thanks for the link. I only knew about SICP for Scheme, but that seems to be aimed at people without programming experience. (not doubting that it is still a great book for people with experience, though)
<randomperson1823> (The 800+ pages are a bit intimidating though)
<bjorkintosh> you're welcome. scheme, like early lisp came from an academic environment so there are numerous papers and books written about it.
<beach> randomperson1823: Yes, SICP is not about teaching language design. It is about teaching programming in general.
<bjorkintosh> randomperson1823, one more thing about racket and EOPL https://docs.racket-lang.org/eopl/index.html
<ixelp> Essentials of Programming Languages Language
<bjorkintosh> it's directly supported.
<randomperson1823> beach: I think you are right with your observation that language design isn't quite active in academia. At the very least, my university doesn't seem to have a lot in this direction. Instead, it's mostly verification, testing, performance and "hype" topics like blockchain, ML, etc.
<beach> I am not surprised.
<randomperson1823> bjorkintosh: Not entirely sure what I am looking at. Does that mean that learning Racket will be enough for me to understand and actually try out the examples in EOPL, i.e. I can skip TSPL for now?
mariari has quit [Quit: WeeChat 4.1.1]
cmack has quit [Remote host closed the connection]
Gleefre has quit [Ping timeout: 248 seconds]
<bjorkintosh> randomperson1823, tspl is just a reference for the language
mariari has joined #commonlisp
<randomperson1823> Ah I see. According to the preface of EOPL3:
<randomperson1823> > We assume background in data structures and experience both in a procedural language such as C, C++, or Java, and in Scheme, ML, Python, or Haskell.
<randomperson1823> The only languages on this list I haven't been exposed to (or tortured with in the case of C++) are ML and Scheme
<randomperson1823> + some experience in OCaml I guess.
X-Scale has joined #commonlisp
Gleefre has joined #commonlisp
dnhester26 has joined #commonlisp
shka has joined #commonlisp
dino_tutter has quit [Ping timeout: 264 seconds]
dnhester26 has quit [Ping timeout: 264 seconds]
<beach> randomperson1823: Now that I think about it, perhaps you should start with Lisp in Small Pieces.
<beach> randomperson1823: There is also an older book: The Anatomy of Lisp by John Allen.
<beach> Both those books are about language design and implementation.
dnhester26 has joined #commonlisp
<beach> And The Art of the Metaobject Protocol is also about language design, specifically about the CLOS style object orientation. This one uses metacircular reasoning to explain the semantics of CLOS. It develops CLOS as a CLOS program.
zetef has joined #commonlisp
contrapunctus has joined #commonlisp
waleee has joined #commonlisp
anticomputer_ has joined #commonlisp
anticomputer has quit [Ping timeout: 256 seconds]
zetef has quit [Ping timeout: 264 seconds]
<randomperson1823> beach: Is the reason for the newly suggested order the fact that I mentioned I prefer to learn about the design of Lisp, or is there something else?
<beach> Yes, that's the reason.
zetef has joined #commonlisp
<beach> The other books are about practicing programming with Lisp.
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
xlymian has quit [Ping timeout: 260 seconds]
contrapunctus has joined #commonlisp
zetef has quit [Ping timeout: 264 seconds]
Inline has quit [Ping timeout: 258 seconds]
zetef has joined #commonlisp
<randomperson1823> I see. I'll probably end up going with a mix, depending how much I enjoy programming in (Common) Lisp
zetef has quit [Ping timeout: 240 seconds]
zetef has joined #commonlisp
<beach> It is quite enjoyable. :)
CO2 has quit [Quit: WeeChat 4.1.1]
<beach> randomperson1823: Here is how I see the difference between a static and a dynamic programming language: If you must be very sure that there are absolutely no errors in your deployed program, like for instance if you stick it in some medical equipment or send it to outer space, you should probably use a static programming language, or perhaps even some software to prove it correct.
<beach> But doing so comes at a huge cost in terms of productivity, so the budget needs to be generous.
<beach> If your code is not mission critical, say if it is a something like a word processor, then you can get a significant increase in productivity with a dynamic programming language, where you can do incremental development. But there might then be some problem that was not caught statically.
<randomperson1823> Yeah, that's roughly what I thought as well.
<randomperson1823> Additionally, people say dynamic programming languages are great for prototyping. But seeing as (some) software is constantly changing, I would make the uneducated assertions that most software is stuck in a prototyping stage :P
<beach> randomperson1823: Of course, the static language people want you to think that there is no difference in productivity. Because that's how they justify the work that they need to do.
<zephyr> i question the kind of design appreciation one can acquire with only study and without use (i feel design is more an art than a science). maybe just me but my 0.02 nonetheless.. i encourage you to build something in one or more implementations
<beach> randomperson1823: And they get away with it because we have no good way of measuring productivity.
<jcowan> beach: +1. Of course, you can use a language that provides gradual typing and add types as you go, like (tada!) Common Lisp.
<beach> jcowan: Exactly.
<beach> randomperson1823: But there is an interesting paper by Hudak and Jones in which they push Haskell as a prototyping language, but there are other languages in the paper as comparison, and the Lisp language wins all the comparisons. But they keep quiet about that, of course.
<jcowan> I remember reading somewhere that until we got to the computer-on-every-desktop stage, the total contribution of computers to productivity was zero.
<randomperson1823> zephyr: That's a fair point. That's why my plan is to have a blend of CL, the books on language design + some projects with CL. Sadly the last point is where I always fail: Either the projects aren't interesting enough, or too ambitious for me to ever finish.
<jcowan> randomperson1823: A classic problem which affects everyone who is not lucky enough to be paid to learn.
<randomperson1823> jcowan: Common Lisp has gradual typing?
<randomperson1823> In my case it's even worse: I am paying to learn :P
dnhester26 has quit [Remote host closed the connection]
<bike> you can optionally put in type declarations to improve performance and, depending on implementation, do static type checks.
<randomperson1823> So something along the lines of mypy I guess?
<jcowan> Yes, in the form of optional declarations. What your compiler makes of them varies depending on settings and the kind of compiler it is.
<bike> as far as i understand from siek's conception, gradual typing is more about the latter, but hey.
<bike> i don't know what mypy is so i can't comment on that.
<jcowan> Python has optional declarations too. mypy is an outboard programm that statically types everything.
<jcowan> However, it is only a linter: the behavior of Python compilers (and therefore of Python programs) is not affected.
CO2 has joined #commonlisp
<randomperson1823> And in my experience it doesn't even do its job properly sometimes :/
<jcowan> Well, its behavior is underspecified, which is to say, that depends on what you think its job is.
Brucio-61 has quit [Quit: Application exit]
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
cage has joined #commonlisp
zetef has quit [Remote host closed the connection]
xlymian has joined #commonlisp
<jcowan> Adding types to Lisp programs is a bit of a black art as far as performance goes. (Perfomance is a black art in general). Sometimes a too-precise declaration can actually produce a deoptimized result. For example, if you declare a variable as being an integer in the range 1-6 (a die roll), then you may wind up using 8-bit arithmetic, which may be slower (depending on your CPU) than generic fixnum arithmetic.
<jcowan> beach: Economists have a suitable brutal way of defining "productivity": how much more output you get for the same input (in monetary value)
Inline has joined #commonlisp
<edgar-rft> so what do you expect when you pay nothing for the compilation?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
molson__ has quit [Remote host closed the connection]
<jcowan> There is no such thing as paying nothing. Time is money, and so are machines to compile on.
molson has joined #commonlisp
<beach> jcowan: That's fair, but the problem comes when you measure the output as number of lines of code or something as inappropriate.
dnhester26 has joined #commonlisp
dcb has joined #commonlisp
<NotThatRPG> I have found mypy pretty helpful, actually. SBCL does a lot of what I want, but since its type inference is CL-compliant, it doesn't have the capability to reason about things like lists of homogeneous type, or hash-tables with keys and values of fixed types, and some other things like that. Those don't help with optimization, but can be helpful for finding bugs
dino_tutter has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
monospod has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
xlymian has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
X-Scale has quit [Ping timeout: 248 seconds]
Gleefre has joined #commonlisp
X-Scale has joined #commonlisp
monospod has quit [Quit: Leaving]
monospod has joined #commonlisp
zetef has joined #commonlisp
Brucio-61 has joined #commonlisp
zetef_ has joined #commonlisp
zetef has quit [Ping timeout: 240 seconds]
Inline has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
monospod has quit [Quit: Leaving]
n1to has joined #commonlisp
n1to has quit [Remote host closed the connection]
zetef_ has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
zetef has joined #commonlisp
jonatack has quit [Ping timeout: 240 seconds]
zetef has quit [Ping timeout: 264 seconds]
Gleefre has quit [Ping timeout: 248 seconds]
Inline has joined #commonlisp
luis has quit [Ping timeout: 260 seconds]
semarie has quit [Quit: WeeChat 4.0.5]
semarie has joined #commonlisp
msavoritias has quit [Ping timeout: 240 seconds]
Gleefre has joined #commonlisp
<jcowan> NotThatRPG: Agreed
<jcowan> beach: No, you measure output as how much the firm you are working for can sell its products for.
<jcowan> And input as how much the firm has to pay for its employees and (pro rata) their computers.
varjag has joined #commonlisp
tyson2 has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
anticrisis has joined #commonlisp
thollief has quit [Quit: Leaving]
randomperson1823 has quit [Quit: Client closed]
ahc has joined #commonlisp
<NotThatRPG> The problem with building a mypy-style tool, iiuc, is that it would require writing (or at least using) a code-walker.
<NotThatRPG> ... and then an algebraic type checker.
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
ec_ has joined #commonlisp
ec_ is now known as ec
ec is now known as R
R has left #commonlisp [#commonlisp]
tyson2 has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 264 seconds]
Gleefre has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 264 seconds]
mariari has quit [Ping timeout: 240 seconds]
zxcvz has quit [Quit: zxcvz]
zetef has joined #commonlisp
kurfen has quit [Ping timeout: 245 seconds]
mariari has joined #commonlisp
kurfen has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Client Quit]
rogersm has joined #commonlisp
tyson2 has joined #commonlisp
X-Scale has quit [Quit: Client closed]
certainty has joined #commonlisp
X-Scale has joined #commonlisp
certainty has quit [Ping timeout: 248 seconds]
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
shka has quit [Ping timeout: 240 seconds]
zetef has quit [Ping timeout: 240 seconds]
Fare has joined #commonlisp
rogersm has quit [Remote host closed the connection]
habamax has joined #commonlisp
X-Scale has quit [Ping timeout: 248 seconds]
pve has quit [Quit: leaving]
X-Scale has joined #commonlisp
certainty has joined #commonlisp
certainty has quit [Ping timeout: 240 seconds]
dnhester26 has quit [Remote host closed the connection]
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
rogersm has joined #commonlisp
zetef has joined #commonlisp
Pirx has quit [Ping timeout: 240 seconds]
rgherdt_ has quit [Ping timeout: 264 seconds]
rogersm has quit [Ping timeout: 240 seconds]
prpldmn has joined #commonlisp
certainty has joined #commonlisp
certainty has quit [Ping timeout: 240 seconds]
zetef has quit [Ping timeout: 264 seconds]
rogersm has joined #commonlisp
zetef has joined #commonlisp
notzmv has joined #commonlisp
zetef has quit [Remote host closed the connection]
zetef has joined #commonlisp
zetef has quit [Read error: Connection reset by peer]
xlymian has joined #commonlisp
zetef has joined #commonlisp
zetef has quit [Remote host closed the connection]
zetef has joined #commonlisp
zetef has quit [Read error: Connection reset by peer]
dino_tutter has quit [Ping timeout: 264 seconds]
triffid has quit [Quit: triffid]
rogersm has quit [Ping timeout: 255 seconds]
dra has quit [Remote host closed the connection]
xlymian has quit [Read error: Connection reset by peer]
varjag has quit [Ping timeout: 264 seconds]
xlymian has joined #commonlisp
skyl4rk has quit [Quit: ZNC 1.8.2 - https://znc.in]
xlymian has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
tasty has quit [Quit: bye bye!]
hayley has joined #commonlisp
hayley has quit [Changing host]
hayley has joined #commonlisp
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
jonatack has joined #commonlisp
random-nick has quit [Ping timeout: 240 seconds]
CO2 has quit [Quit: WeeChat 4.1.1]