jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
varjag has quit [Read error: Connection reset by peer]
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
<Bike> if you find a trinary float implementation, do share
* no-defun-allowed stares in ENIAC
notzmv has joined #lisp
jeosol has quit [Ping timeout: 245 seconds]
mbomba has joined #lisp
v3ga has quit [Quit: WeeChat 2.8]
defunkydrummer has joined #lisp
frost-lab has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
Oladon has joined #lisp
jibanes has quit [Ping timeout: 264 seconds]
luckless has quit [Quit: luckless]
jibanes has joined #lisp
kaftejiman has quit [Remote host closed the connection]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
nij has joined #lisp
<nij> Is it possible to interfere a local variable within a loop?
gzj has joined #lisp
<defunkydrummer> nij: what's interfere?
<defunkydrummer> nij: you can use local variables of the same scope where the loop is
<nij> (let ((..)) (loop blah blah))?
<defunkydrummer> nij yes those vars are available and can be SETF as well
<nij> (let ((belief 'nil)) (loop (progn (live-on) (dream-on))))
<nij> Yeah.. how to SETF BELIEF, after the loop has begun?
<defunkydrummer> nij: don't quote NIl
<defunkydrummer> nij: nil is a value
<nij> oh oh yes!! sorry..
<no-defun-allowed> You can still set it..
<nij> (let ((belief nil)) (loop (progn (live-on) (dream-on))))
<defunkydrummer> nij: yes, you just set it
<no-defun-allowed> Loosely, nil = boolean, 'nil = the symbol NIL, '() = empty list, () = weird
<defunkydrummer> (let ((donations 1)) (loop repeat do (incf donations)))
<nij> How to alter BELIEF after the loop has begun?
<no-defun-allowed> (let ((belief ...)) (loop ... (setf belief ...)))
<defunkydrummer> nij: sorry if my example wasn't so good. INCF also alters the value of a variable.
<no-defun-allowed> Unless you explicitly do so, no control flow construct interferes with how you modify variable bindings.
<nij> Oh! I cannot even detach the loop......
<nij> I was thinking of letting a loop running in a background, and alter BELIEF from the outside.
<nij> So.. how to even run a detachable loop? Is it possible in cl?
jibanes has quit [Ping timeout: 246 seconds]
catchme has quit [Quit: Connection closed for inactivity]
<no-defun-allowed> You could create a thread to do that, and the function will close over any* variables referenced. (*Excluding special variables, which includes DEFVAR-ed and DEFPARAMETER-ed variables. Bind them again.)
<no-defun-allowed> But if you do that, you probably would have to deal with concurrent access, and either make sure to use a mutex while reading and writing, or use compare-and-swap to set BELIEF from another thread (and read as normal).
jibanes has joined #lisp
<nij> Uh it sounds very advanced. Lemme search the keywords.
notzmv has quit [Remote host closed the connection]
<no-defun-allowed> Threads are annoying, yes. What I did was to make a "locked box" which gives a thread exclusive access to some variable.
nij has quit [Remote host closed the connection]
nij has joined #lisp
<no-defun-allowed> It looks something like https://gitlab.com/cal-coop/netfarm/cl-decentralise2/-/blob/master/Code/Utilities/thread-box.lisp; you would write (let ((belief (box nil))) (bt:make-thread (lambda () ... use (box-value belief))) belief)
<nij> I'm kicked out.. might have missed message.
<no-defun-allowed> Then another thread could use (setf (box-value belief) ...) or (with-unlocked-box (value belief) ... use value ...) to modify the value.
<nij> But the missing concept of mine was indeed "thread". I will read more on that and ask questions.
<no-defun-allowed> I don't think you missed anything.
<no-defun-allowed> A thread runs some action, and starting a thread allows you to run multiple actions concurrently.
<nij> Indeed.
<nij> I thought a life is a loop. But it's actually a thread.
<thmprover> Because it terminates/
<thmprover> Bad-um bum
<nij> lolllolll
<no-defun-allowed> However, when you share data between threads, you have to make sure they don't trample over each other. There are a few techniques for doing that, and using locks is one of them.
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
notzmv has joined #lisp
<defunkydrummer> nij: another alternative is to use channels. See the ChanL library.
<nij> Nice! Will learn!
<defunkydrummer> nij: When you use channels, you don't share variables; you send information (or messages, or events) through a channel to the other thread
<nij> This seems to be a better way.
notzmv has quit [Remote host closed the connection]
notzmv has joined #lisp
<defunkydrummer> nij: there's no "better" way except for the way that is more suitable to your problem
<defunkydrummer> another way is software transactional memory. See the STMX library
<nij> I feel like sharing variables is very dangerous.
<defunkydrummer> i haven't used stmx yet
<defunkydrummer> nij: not if only one thread acceses it at a given time
<nij> What happens when it's accessed by multiple instances?!
todun has joined #lisp
<no-defun-allowed> Multiple reads are fine, but multiple writes and one writer with non-zero readers are bad.
<no-defun-allowed> Another option is to use atomics and have the writer repeatedly compare-and-swap in the new value. It is admittedly pretty low-level; you might use that to implement mutexes (and then channels), or you might just use them straight.
<nij> I feel the most comfortable with "signal sending".. will check out chanl :)
<defunkydrummer> i tbink it's easy to learn
<defunkydrummer> there's some tutorial out there i think; you can google it
pve has quit [Quit: leaving]
<nij> thanks :D
nij has quit [Quit: ERC (IRC client for Emacs 27.1)]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
v3ga has joined #lisp
jibanes has quit [Ping timeout: 240 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
astronavt has joined #lisp
jibanes has joined #lisp
todun has quit [Quit: todun]
defunkydrummer has quit [Quit: (save-lisp-and-die)]
gzj has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
EvW has quit [Ping timeout: 258 seconds]
lottaquestions has quit [Remote host closed the connection]
lottaquestions has joined #lisp
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
_atomik has joined #lisp
Oddity has joined #lisp
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
jibanes has quit [Ping timeout: 256 seconds]
<thmprover> Out of curiosity, has anyone really gotten into literate programming here?
Demosthenex has quit [Ping timeout: 246 seconds]
jibanes has joined #lisp
Demosthenex has joined #lisp
pfdietz has joined #lisp
semz has quit [Ping timeout: 260 seconds]
abhixec has joined #lisp
jibanes has quit [Ping timeout: 264 seconds]
bren has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
Demosthenex has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
Demosthenex has joined #lisp
<oni-on-ion> thmprover, i've tried it a little. but i am more of an engineer than a scholar
semz has joined #lisp
bren has quit [Remote host closed the connection]
Demosthenex has quit [Ping timeout: 265 seconds]
mbomba has quit [Quit: WeeChat 3.0]
<thmprover> oni-on-ion: So you probably don't have any pointers about the best way to organize the presentation of material in a Cweb program?
Demosthenex has joined #lisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
<thmprover> Like, I'm trying it out now, and I'm getting to the point where I'm writing chunks of code on quarter-slips of paper, so I can see what's easier to read (as a reader, rather than as a programmer).
jeosol has joined #lisp
aartaka has joined #lisp
froggey has quit [Ping timeout: 260 seconds]
froggey has joined #lisp
skapata has joined #lisp
oxum has joined #lisp
<badcfe> with two operands, IF and AND are equivalent right?
FreeBirdLjj has joined #lisp
<aeth> iirc (if c a b) is (or (and c a) b)
<aeth> so if b's implicitly nil that seems to be the case
<lotuseater> badcfe: did you already recognize AND & OR are macros? :)
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<lotuseater> and I'll bet in a few minutes beach appears with a good morning ^^
<ck_> how many parentheses are you betting
<lotuseater> all of them?
<ck_> all right, keep your riches! :) have a good monday too.
<lotuseater> I should sleep first :D you too
Alfr has joined #lisp
<badcfe> lotuseater: yes .. so they wont evaluate that second operand iff first is nil
<badcfe> alright, so with two operands they're equivalent in all ways, thanks
Alfr_ has quit [Ping timeout: 258 seconds]
<lotuseater> yeah can be seen as some kind of lazy evaluation ^^
a0 has joined #lisp
nwoob has joined #lisp
<beach> Good morning everyone!
Iolo has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
abhixec has quit [Quit: leaving]
<lotuseater> morning beach :)
Iolo has joined #lisp
<lotuseater> i learned a word today. do you know what banana-software is?
<badcfe> parentheses can look like bananas, maybe?
sgibber2018 has joined #lisp
<sgibber2018> scheme
<lotuseater> hehe yes that could be
<lotuseater> No, it's a word for software that matures with customer
<sgibber2018> whoops sorry didn't mean to type "scheme" in there. Hit enter on accident
<sgibber2018> Or wrong window rather
notzmv has quit [Remote host closed the connection]
<lotuseater> ah no problem, i did it some days myself, german sentence in an english speaking channel
notzmv has joined #lisp
slyrus has quit [Quit: Leaving]
<ck_> lotuseater: and did you read it or not?
<lotuseater> ehm what do you mean exactly? I'm a bit confused
euandreh has joined #lisp
Stanley00 has joined #lisp
<ck_> if I remember correctly the sentence you just referenced read something like "could read the Weltenalmanach"
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
<lotuseater> no i didn't mean anything like that
<lotuseater> have so many books to read ._.
jpli has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
akoana has quit [Quit: leaving]
<ck_> Kompendium, not Almanach, I misremembered. But I know the feeling
saganman has joined #lisp
a0 has quit [Ping timeout: 240 seconds]
<badcfe> if i insist on not using the comma-at notation, and thus have (defmacro lm (&rest x) (cons 'list x)), but i want the operands to not get evaluated, can i accomplish this?
skapata has quit [Ping timeout: 272 seconds]
<beach> badcfe: There is nothing special with ,@.
<beach> badcfe: ` is just a reader macro that turns the expression into APPEND, etc.
<beach> badcfe: So you can always express the same thing without ,@.
<beach> badcfe: The main difference being that if you don't use ` and , then your code will be fairly hard to read.
drl has quit [Quit: Leaving]
<lotuseater> and even harder to get right :)
<badcfe> beach: when i evaluate a form with the above macro, the operands get evaluated, but as a newb i dont know how to prevent that, to mimick the comma-at
<beach> lotuseater: Indeed.
<badcfe> beach: so the context is that i am a newb fiddling and exploring
<beach> badcfe: You can't mimic ,@ if you are inside `
<badcfe> beach: you see i didn
<badcfe> t enter the `
<beach> So tell us what expression with ` and , works and we can tell you the equivalent expression without them.
<lotuseater> badcfe: but imagine when writing macros that write macros
skapata has joined #lisp
<badcfe> (defmacro listm (&rest x) `(list ,@x))
<beach> Let's see...
<beach> (append '(list) x) maybe.
<beach> Something like that.
<badcfe> but x would be evaluated wouldnt it
<beach> It would be in the first case too.
mingus has joined #lisp
<badcfe> the behavior of the macro i wrote above using back-tick, is to not evaluate it
<beach> ?
<beach> Anything after , is evaluated. That's the idea.
<badcfe> i'm sorry. stand by.
<beach> Try typing `(hello ,*standard-output*) to the REPL.
<lotuseater> badcfe: imagine using , as having a little bit of runtime in macroexpansion
<badcfe> here is the one with the behavior i want
<badcfe> (defmacro listm (&rest x) `(list ',@x))
<beach> That's a bit trickier.
<beach> (append '(list) (list 'quote x)) something like that.
narimiran has joined #lisp
<beach> Let me verify...
<badcfe> seems to werk. i am mentally chewing on it now
<badcfe> my computer was happy with it
<beach> OK, good.
<beach> I think rather (append '(list) (append '(quote) x))
<beach> But you get the idea.
<beach> You can try doing (defparameter *x* '(a b c)) and then try the two with *x* replacing x. No need for a macro. Just try it at the REPL.
aartaka_d has joined #lisp
waleee-cl has quit [Quit: Connection closed for inactivity]
<badcfe> good technique. thanks
<beach> (append '(list) (list (append '(quote) x))) is the best I can do.
<beach> As you can see, it is always possible, but the code is unreadable. And as lotuseater pointed out, incredibly hard to write as well.
<beach> ... which is of course why they invented the backquote reader macro.
thmprover has quit [Quit: ...and miles to go before I sleep.]
aartaka has quit [Ping timeout: 240 seconds]
ex_nihilo has joined #lisp
<badcfe> beach: i think the initial '(list) should go away
<badcfe> i tried the following which seems to do it
<badcfe> (defmacro lm (&rest x) (list 'quote x))
uniminin has joined #lisp
<beach> I don't think that is the same as your original form.
<beach> In fact I am sure it is not.
<beach> Again, try the 2 (or 3) at the REPL.
<beach> In your original form, the top-level result is (list ...).
<beach> But in the latest one, there is no LIST.
<badcfe> yes i am sorry in my confusion i have shown forms that may not be what i targetted, which is a macro that lists its operands unevaluated, i.e (m 1 (+ 1 1)) gives (1 (+ 1 1)) when expanded and evaluated
<beach> Again, the equivalence is independent of whether it is a macro or not.
<lotuseater> beach: can you tell me in short the technical differences between &BODY and &REST? i recognize &REST more used on functions and &BODY in macros
<beach> And I can't guess your intentions. I can only follow what you tell me.
<beach> lotuseater: That's the only difference.
<beach> Is &REST even allowed in a macro lambda list? Let me check...
<beach> Yes it is.
<lotuseater> ha ok :) but of course in eg AND &REST is used for it has no "body"
<beach> Ah but &BODY is not allowed in ordinary lambda lists.
<beach> They have different "moral" meaning.
<beach> AND does not have a "body".
<beach> Only an arbitrary number of arguments.
<beach> Plus, how AND is implemented is not specified in the standard.
<lotuseater> yes i remember. and &WHOLE just in macros? i did get it when experimenting with compiler macros
<lotuseater> yes i mean that, did just express it weird
<beach> clhs 3.4
<lotuseater> and how is it in SICL?
<badcfe> i would like to write (defmacro lm (&rest x) (list 'quote x)) using the conventional syntax for macros having back-tick and comma-at
<beach> lotuseater: Making great progress lately. Thanks.
<beach> badcfe: Why do you insist on the macro context.
<beach> ?
<lotuseater> good, but the question was in connection with how you implement AND
<badcfe> beach: it
<beach> lotuseater: Oh, I don't remember. Let me check...
<beach> badcfe: (list 'quote x) is likely ',x
<badcfe> s my way of learning. i found a wall and therefore i hit my head against it
<badcfe> or rather, your head against it. sorry about that
<badcfe> beach: yes, thats it. thank you. so skipping the @ will leave it a list
<beach> lotuseater: Look in Code/Conditionals/support.lisp for AND-EXPANDER.
<lotuseater> ok thx
<beach> lotuseater: I am currently separating the macro itself from its expander function, but that will likely change.
<beach> I did that so that the expander function could be executed by the host during bootstrapping, which is faster.
<beach> But now I have a bootstrapping technique for which the difference in performance won't matter much, so I will likely stick the expander code in the macro again.
<lotuseater> i see, good idea
mingus has quit [Ping timeout: 256 seconds]
<beach> Thanks.
<lotuseater> but i still must get it right to boot SICL :/
<lotuseater> that's just my general incompetence
<beach> It is broken most of the time. But currently, you should be able to do (asdf:load-system '#:sicl-boot) then (in-package #:sicl-boot) and then (boot).
<lotuseater> yay
<beach> The you can do (repl *e5*) and you have a repl, but one that is very brittle.
<beach> And the printer is not yet there, so many values will just show up as <HEADER>.
<lotuseater> no problem, it's a big project
<semz> Okay, so according to clhs 4.3.6, updates to an instance of a redefined class may happen as late as when one of its slots is accessed. Let's assume the implementation does that and the class is redefined twice. Assume also that the relevant methods on update-instance-for-redefined-class are different during the two redefinitions.
<semz> It's possible that there will be instances that only get to see the second definition of update-instance-for-redefined-class, right?
<badcfe> at last. to conclude, i find the following seems equivalent
<badcfe> (defmacro lm (&rest x) (list 'quote x))
<badcfe> (defmacro ln (&rest x) `(list ',x))
<beach> lotuseater: I have had a lot of help with several modules such as Cleavir (compiler framework), Clostrum (global environments), Trucler (lexical environments), Eclector (reader), Incless (printer), and probably several that I forgot.
<beach> badcfe: They are not.
<beach> badcfe: As a simple experiment at the REPL will show.
<beach> The first one expands to '<the-value-of-x> and the second one to (list '<the-value-of-x>).
<badcfe> oh i see, ln has one more parenthesis, there. not a trained eye here
<beach> badcfe: Look, anything inside ` but not inside , will appear in the result, so the LIST symbol will be in the result of the second one.
<beach> badcfe: I am not sure why you refuse to try this out at the REPL.
<badcfe> beach: i am trying it, and i missed that extra parenthesis
<badcfe> beach: i have the delusion that just by removing something from ln i will peal off that wrapping list there, but i seem too unfamiliar with this to be able to do it yet
<beach> badcfe: It is more than an extra parenthesis. The symbol LIST will appear in one expansion and not in the other.
<badcfe> beach: no, i dont see the symbol LIST in neither
Khisanth has quit [Ping timeout: 256 seconds]
<badcfe> * (ln 1 (+ 1 1))
<badcfe> ((1 (+ 1 1)))
<badcfe> (1 (+ 1 1))
<badcfe> * (lm 1 (+ 1 1))
<beach> badcfe: That's because you typed a form using the macro as opposed to macroexpanding it, or trying it out at the REPL as I have suggested several times.
<White_Flame> `(list ,@(mapcar (lambda (y) `(quote y)) x) :-P
<beach> badcfe: Evaluating a form with the macro as the operator means one more evaluation.
<beach> badcfe: I am trying to teach you about the equivalence between a form with ` and one without.
<beach> badcfe: And as I have also suggested several times, the backquote reader macro is independent of macros.
<badcfe> beach: yes i get the macro expansion part, and am looking at above ln and lm and imagining i can easily make ln skip that extra wraping, in what i pasted from my repl above
<beach> Whatever.
<badcfe> beach: i see. yes, i can try out the parts in this, one by one
<lotuseater> beach: i respect the good modularity of SICL
<beach> badcfe: If you continue thinking in terms of parentheses, it will all be magic to you. I suggest you start thinking in terms of data structures in the form of (nested) lists.
<beach> lotuseater: Thanks.
<lotuseater> but seems tricky not to have circular dependencies between the projects :)
<beach> lotuseater: Over time, we have learned a lot about how to write implementation-independent modules.
<lotuseater> i saw once your talk about ANSI LOOP on YT
<lotuseater> sounds good
<beach> lotuseater: SICL is full of circular dependencies.
<beach> LOOP uses a lot of CLOS and so does FORMAT. And CLOS definitely uses LOOP.
<badcfe> beach: thanks for that guidance for me on how to look at this
<badcfe> (defmacro ln (&rest x) `',x)
<lotuseater> uii hm
<beach> lotuseater: And CLOS is written using a lot of CLOS.
<badcfe> this ones seems to do it tho
<lotuseater> hehe
<White_Flame> badcfe: the conversion of LM into backquote form would simply be `(quote ,x)
<White_Flame> which of course is equivalent to `',x but IMO a bit more readable
<beach> lotuseater: For instance (defclass t () () (:metaclass built-in-class))
<lotuseater> CLOS is so deep in CL it's difficult to program without it
<beach> lotuseater: I found that my brain is too small to imagine a subset of Common Lisp that I am allowed to use for each module, so I am using the full language for every such module.
<beach> lotuseater: Exactly.
<lotuseater> yours too small?! o_O
<beach> lotuseater: So instead I invented a bootstrapping technique that makes all those circular dependencies operational.
<beach> lotuseater: I am not as smart as some people might think. But I compensate by being thorough and take the time the task requires.
<lotuseater> i think experience outweighs smartness sometimes
<beach> That's what I am hoping. :)
<lotuseater> oh yes i see
Khisanth has joined #lisp
<beach> But it means VERY SLOW progress with SICL.
<beach> I just finished rewriting the bootstrapping procedure a second time, so now it's version 3.
<beach> Simply because I was unable to see the negative consequences of versions 1 and 2.
<beach> Oh well.
<lotuseater> nice. beside your other dozen of nontrivial and big projects
<beach> Yeah. :(
badcfe has quit [Quit: Lost terminal]
<lotuseater> hehe i tried (defclass sorted-list (list) ()) but CLOS complains :)
a0 has joined #lisp
<no-defun-allowed> clhs built-in-class
<no-defun-allowed> Oh, is LIST even a class?
<no-defun-allowed> clhs list
<no-defun-allowed> It is indeed a system class, so it cannot be subclassed.
<lotuseater> oki :)
<lotuseater> CONS and NULL are listed as subclasses
orivej has quit [Ping timeout: 260 seconds]
<entre-parenteses> beach: As someone trying to learn to write (and very intersted in specifically writing) well-designed software in Common Lisp, is this the SICL of which you speak?
<entre-parenteses> Or should I look for it somewhere else?
<beach> That looks old.
<entre-parenteses> Yes, I see that it's about 9-10 years old.
<entre-parenteses> Ah, very much appreciated!
<beach> Pleasure.
<beach> lotuseater: (defclass sorted-list (list) ()) works in SICL. :)
<lotuseater> cool!
gaqwas has joined #lisp
gaqwas has joined #lisp
<lotuseater> so i would do (make-instance 'sorted-list ...)?
<beach> Yes.
<beach> It doesn't have any slots, since LIST is a built-in class with no slots.
<jackdaniel> I gather that such sorted list would not be built from conses, so it would violate the list class protocol ("for each elemnt of a list there is a /cons/.", and "type cons and null form an exhaustive partition of the type list"
<jackdaniel> or do I miss something?
<beach> I am pretty sure it won't be useful.
<lotuseater> okok
<jackdaniel> right, I imagine that someone writes a method specialized on a list, and passing a sorted-list would indeed work in the dispatch mechanism, but not adhering to the list protocol will probably lead to a broken code
<no-defun-allowed> Is allowing subclasses of built-in-class legal behaviour?
<beach> no-defun-allowed: STANDARD-OBJECT is a subclass if T, so yes.
<lotuseater> i just tried when thinking about dependent types
<jackdaniel> "Attempting to use defclass to define subclasses of a built-in class signals an error of type error"
<beach> no-defun-allowed: In SICL, all combinations are valid except a built-in class can not be a subclass of a standard class.
<no-defun-allowed> I see.
<beach> jackdaniel: Oh, so I have to disable that once the system is built.
<jackdaniel> the page with built-in-class mandates some other errors too (i.e change-class is not allowed, redefinition etc)
<beach> But clearly standard classes must be possible as subclasses of built-in classes.
<jackdaniel> isn't a standard-class a subclass of class?
Khisanth has quit [Ping timeout: 240 seconds]
<beach> "a standard-class" is different from STANDARD-CLASS.
<beach> The former is an instance of the latter.
<beach> Like STANDARD-OBJECT is "a standard class" and it is a subclass of T.
<jackdaniel> (ecl disables subclassing the built-in-class as the last step during compilation)
<beach> Yes, that's what I plan to do too.
<jackdaniel> you are right, my mistake
nwoob has quit [Ping timeout: 272 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
andreyorst has joined #lisp
saturn2 has quit [Ping timeout: 256 seconds]
Khisanth has joined #lisp
ex_nihilo_ has joined #lisp
ex_nihilo has quit [Ping timeout: 260 seconds]
hiroaki has joined #lisp
<beach> It would be silly not to use the possibility of using DEFCLASS to define subclasses of built-in classes during system bootstrapping, but sure, at the end, this feature has to be disabled in a conforming implementation.
andreyorst` has joined #lisp
andreyorst` has quit [Remote host closed the connection]
andreyorst` has joined #lisp
vutral is now known as webkiller
nwoob has joined #lisp
webkiller is now known as vutral
<beach> Oh, but could LIST be a standard class?
<beach> I mean, it isn't in SICL, because CONS is not a standard class.
<beach> But could it be?
andreyorst has quit [Ping timeout: 256 seconds]
ksixty has quit [Ping timeout: 260 seconds]
flazh has quit [Ping timeout: 265 seconds]
Oladon has quit [Quit: Leaving.]
saturn2 has joined #lisp
jprajzne1 has joined #lisp
<jackdaniel> sure, system class is a class that *may* be of type but-in-class in a conforming implementation (...)
<jackdaniel> it is not mandated
<jackdaniel> built-in*
<jackdaniel> not but :)
<jackdaniel> it is in the glossary under "system class"
<jackdaniel> beach: ^
<phadthai> if I understand not allowing it as part of the standard was also so that the implementation of standard ones can be more efficient (and more limited) than clos permits, i.e. changing a struct would normally require all dependent code to be recompiled
<beach> Yeah, I am just thinking that it probably could not be a subclass of STANDARD-OBJECT.
gzj has joined #lisp
<beach> Because that would violate the class precedence list in the specification.
<beach> phadthai: I assume by "not allowing it" you mean "not requiring it", yes?
<jackdaniel> beach: what do you mean that it would violate the class precedence list?
<phadthai> I'm not sure, sorry
<beach> clhs list
<jackdaniel> sequence is also a /system class/
<beach> Yes, but is it allowed to stick in standard-object in the class precedence list?
<beach> I know it is allowed to stick in implementation-specific classes, but specified ones?
harlchen has joined #lisp
<jackdaniel> I don't think that it is a problem, but I don't have anything to back that up
<beach> It's an interesting question.
<jackdaniel> phadthai: it is also to enable implementers to use some less obvious constructs for built-in-classes, i.e to directly map to underlying java class, or c++ class (if the runtime is shared)
<jackdaniel> then you don't have control over said class (i.e its layout etc)
<beach> phadthai: So the question is interesting in the context of the BOCL (BOotstrap Common Lisp) the goal of which is a system that is a simple and maintainable as possible, without many performance constraints at all.
<beach> The fewer special cases requiring specific code, the better.
<beach> the BOCL (...) idea, ...
shka_ has joined #lisp
<phadthai> yes I can certainly see the convenience
<beach> In fact, it would be a fun project for someone to work on.
<beach> It has to be written in C.
Cymew has joined #lisp
<phadthai> jackdaniel: thanks
gaqwas has quit [Remote host closed the connection]
<beach> Fun, because it has totally different goals from any Common Lisp implementation meant for production.
<beach> I know it has been suggested that ECL kind of *is* a BOCL, but ECL has completely different goals, and performance is one of them.
imode has quit [Ping timeout: 256 seconds]
<no-defun-allowed> I have never managed to build it myself, but what about CLISP?
hiroaki has quit [Ping timeout: 256 seconds]
<beach> It is also a Common Lisp implementation meant for "production" use, so there must be compromises in there for reasons of performance. And such compromises can make maintenance more complicated.
<beach> Also, to take but one example, BOCL probably does not have to signal an error for the DEFCLASS example above. As long as it has conforming behavior for conforming code, that should be enough.
<no-defun-allowed> I see, but I have read that CLISP is/was considered the most portable implementation around. There is still a bytecode compiler which could be tossed out for BOCL.
<beach> Sure.
<beach> Bytecodes would probably be a requirement since native code would be way to complicated.
<beach> too
<no-defun-allowed> As opposed to directly interpreting Common Lisp code?
<beach> Sure, that would be possible too. Maybe even better. I didn't think of that.
<flip214> well, the CL forms could be scheduled like forth as well...
<beach> "scheduled?
<beach> "scheduled"? I mean.
<no-defun-allowed> To be fair though, I would rather write a bytecode interpreter instead of a tree-walking interpreter in C. But then you have to write the bytecode compiler.
<beach> Indeed. Hard to tell a priori what gives the best code.
<beach> Maybe the interpreter would not be too bad.
flazh has joined #lisp
<no-defun-allowed> One thing I recall is that precise GC gets tedious without virtual machine registers placed somewhere convenient, but it wouldn't be a problem if you use Boehm (or decide that leaking is a feature of a BOCL).
<beach> Yes, either Boehm or leaking is fine. Though the latter may make it run out of memory, so I would go for Boehm.
<flip214> beach: AFAIK the technical term for Forth code is "scheduling", yes.
<beach> flip214: I see. I guess I don't know what it means then,
<no-defun-allowed> I recall some batch compilers would just allocate without freeing, because they wouldn't live very long and would generate significant garbage. That wouldn't work for Common Lisp, as we don't run one process per file, of course.
<beach> Yeah, bootstrapping SICL would very likely run out of memory.
<beach> So here is an example of what BOCL could do that no production Common Lisp system would: Function calls are all in the form of (APPLY <fn> <list of arguments>).
<no-defun-allowed> You mean to tell me that I bought more primary memory to bootstrap HIR-to-CL SICL with a 10GB heap and without swapping, then you reduce the memory consumption of SICL, and now I can't even utilise it for BOCL? (Kidding...)
<beach> Heh!
<beach> I'll reimburse you if you like.
gzj has quit [Remote host closed the connection]
uniminin has quit [Ping timeout: 240 seconds]
gzj has joined #lisp
uniminin has joined #lisp
<no-defun-allowed> Well, that was one influence, but I got it for cheap, and I also needed it to run modded (read: extended with third-party mechanics) Minecraft on a real-time GC with a sufficiently large heap. So I don't actually mind at all.
<phoe> good morning
<beach> Hello phoe.
<no-defun-allowed> Hello phoe.
<phoe> hey hi
<beach> no-defun-allowed: The more I think about it, the more I am convinced that a straight interpreter is the best solution.
<White_Flame> implement a bootstrap CL in a Forth, as the native code required for forth is tiny
<beach> That might be a possibility. I'll let someone else think about that one, though. I don't have much experience writing Forth.
<phoe> hmmmm, isn't the ECL interpreter kinda forthesque?
<phoe> or the bytecode compiler?
<no-defun-allowed> It also convinced me that space-time tradeoffs exist in plenty of places, which was a point I failed to make in one writeup once.
<phoe> I don't remember, plus I'm sleepy so I might be speaking nonsense
<no-defun-allowed> Well, a lot of bytecode machines use stack machines.
<no-defun-allowed> At least the Smalltalk, Self, Java, CLISP, CPython, and Netfarm machines are stack oriented for temporaries, but have some environment register too.
liberliver has joined #lisp
<no-defun-allowed> Notable exceptions are the Lua and Erlang (BEAM) machines, which use some number of registers.
<beach> Maybe you are talking about something different now, but all such systems have performance as a significant goal, I would think. That makes BOCL unique, and more fun, too. :)
<no-defun-allowed> Perhaps, but I meant to say that, if you look at it that way, "most" bytecodes look like Forth.
<beach> Oh, I see.
<no-defun-allowed> I still think they look more like the SECD machine <https://en.wikipedia.org/wiki/SECD_machine> than a Forth call stack-data stack machine.
ex_nihilo__ has joined #lisp
<beach> So, imagine writing only cons_car in C, and then write CAR by doing read_from_string("(defun car (x) (if (null x) x (cons-car x)))");
<no-defun-allowed> But most performance-oriented implementations of those languages achieve their performance by abandoning the bytecode machine, and generating machine code instead. I see the point, though.
<beach> ... and EVAL-ing that of course
ex_nihilo_ has quit [Ping timeout: 258 seconds]
loke[m] has quit [Ping timeout: 260 seconds]
<beach> ... or, I guess loading it from file.
<srandon111> guys any resource on netowrk programming with common lisp?
MrFantastik has joined #lisp
<no-defun-allowed> You can use usocket for programming sockets.
<beach> srandon111: Are you excluding the women here, or are you using "guys" as a gender-neutral term?
Cymew has quit [*.net *.split]
hvxgr has quit [*.net *.split]
jonatack has quit [*.net *.split]
X-Scale has quit [*.net *.split]
loke has quit [*.net *.split]
OlCe has quit [*.net *.split]
norserob has quit [*.net *.split]
Krystof has quit [*.net *.split]
Necktwi has quit [*.net *.split]
quazimodo has quit [*.net *.split]
lad has quit [*.net *.split]
Firedancer_ has quit [*.net *.split]
ineiros has quit [*.net *.split]
Colleen has quit [*.net *.split]
APic has quit [*.net *.split]
bacterio has quit [*.net *.split]
tychoish has quit [*.net *.split]
Robdgreat has quit [*.net *.split]
cyberlard has quit [*.net *.split]
lavaflow has quit [*.net *.split]
alandipert has quit [*.net *.split]
ck_ has quit [*.net *.split]
loke[m] has joined #lisp
<srandon111> beach, damn of course i am using "guys" as a gender-neutral term, let's not start a discussion on this please...
<phoe> what kind of network programming guide are you looking for?
<no-defun-allowed> Would you ever consider dating a "guy"?
<phoe> if it's just sockets, then usocket, as no-defun-allowed mentioned
<srandon111> no-defun-allowed, if i ever would be attracted to a guy why not
<srandon111> thank no-defun-allowed
* phoe gently nudges the dating topic aside
<no-defun-allowed> Okay, fair enough.
andreyorst has joined #lisp
<phoe> is it anything broader than that though? like writing whole servers or something?
<srandon111> phoe, i would like to write a gopher server
<srandon111> so is usocket the right place to go?
<phoe> I think so, yes, you can use it
<srandon111> beach, could you suggest a more gender-neutral greeting? (I am serious, english is not my mother tongue)
<no-defun-allowed> "Good morning everyone!"
<srandon111> phoe, are there more high level network programming libraries?
<phoe> srandon111: folks, everyone, people, lispers
<srandon111> no-defun-allowed, ok thanks
<srandon111> phoe, thanks
amk has quit [Ping timeout: 246 seconds]
<easye> srandon111: "folks" works, but is perhaps a little homespun.
aartaka_d has quit [Ping timeout: 264 seconds]
<srandon111> easye, homespun?
thecoffemaker has quit [Ping timeout: 264 seconds]
<no-defun-allowed> Well, usocket is at the level that programming sockets looks like programming normal file or console I/O, because you can get streams and use the normal Common Lisp stream functions with them.
andreyorst has quit [Client Quit]
<easye> Well, folk-sy.
<srandon111> folks, i am careful to these kind of things, i also renamed my default branches on git from "master" to "main"
andreyorst has joined #lisp
<phoe> srandon111: I'm not aware of any; networking is a broad topic so higher-level libraries might be specializations rather than generalizations - and therefore not work for the majority of all cases.
amk has joined #lisp
<phoe> like, of any higher-level libraries.
<phoe> but I think that if you're implementing a simple protocol like gopher, then usocket should work just fine
<srandon111> ok thank phoe
<srandon111> *thanks
<phoe> I'd write a single-threaded version of the server first and then optionally generalize to multiple threads.
<srandon111> any good tutorial/examples on how to use it outside the common lisp cookbook
Cymew has joined #lisp
X-Scale has joined #lisp
loke has joined #lisp
jonatack has joined #lisp
hvxgr has joined #lisp
Krystof has joined #lisp
OlCe has joined #lisp
Necktwi has joined #lisp
Firedancer_ has joined #lisp
lad has joined #lisp
ineiros has joined #lisp
APic has joined #lisp
cyberlard has joined #lisp
Robdgreat has joined #lisp
lavaflow has joined #lisp
alandipert has joined #lisp
quazimodo has joined #lisp
ck_ has joined #lisp
tychoish has joined #lisp
bacterio has joined #lisp
Colleen has joined #lisp
norserob has joined #lisp
thecoffemaker has joined #lisp
OlCe has quit [Max SendQ exceeded]
<phoe> I think you can get inspired by a server for a similar protocol, one sec...
<srandon111> ok thanks phoe i'll wait
<phoe> this one is for Gemini. GPLv3 code.
bitmapper has quit [Quit: Connection closed for inactivity]
andreyorst has quit [Remote host closed the connection]
andreyorst has joined #lisp
mbrumlow has quit [Ping timeout: 246 seconds]
mbrumlow has joined #lisp
gzj has quit [Remote host closed the connection]
<srandon111> phoe, what is gemini?
gzj has joined #lisp
<no-defun-allowed> A protocol that looks roughly like Gopher.
<phoe> srandon111: a pretty new protocol that aims to be Gopher, except with better encryption by default and some other nice tweaks. It is slowly but steadily gains popularity.
<no-defun-allowed> "new"
<phoe> s/gains/gaining/
<no-defun-allowed> The introduction says it's explicitly not a substitute for Gopher (or HTTP).
random-nick has joined #lisp
andreyorst has quit [Ping timeout: 260 seconds]
kenran has joined #lisp
<no-defun-allowed> But it looks sufficiently like Gopher, that you could glean off how to implement a Gopher server.
<srandon111> ook thanks no-defun-allowed
<srandon111> the thing is always, will it be available through lynx
<srandon111> i hope so
<phoe> if lynx gets support for this new protocol, possibly! terminal browsers for gemini also exist by now.
<phoe> but that's no longer a strictly #lisp discussion
galex-713 has joined #lisp
<entre-parenteses> srandon111: From the "Gopher (protocol)" wikipedia page (I had to look up what Gopher was), I came across this repo that may be an interesting resource for you: https://github.com/heddwch/geomyid
andreyorst has joined #lisp
<phoe> oooooh
<entre-parenteses> It's a bit old but written in CL so it may be helpful
<phoe> entre-parenteses: nice! I wasn't aware of that
<entre-parenteses> It was just chance that I came upon it. Hopefully it helps.
villanella has joined #lisp
atomik_dog has joined #lisp
<harlchen> i get 'The function QUUX-HUNCHENTOOT::WRAPPED-ERROR-P is undefined. ' if i try to connect to a running acceptor , what is a :good way to start and debug it ? emacs/sly/sbcl
<srandon111> thanks entre-parenteses
<harlchen> from looking through the debugger/inspector i don't even see what tries to call it
<srandon111> phoe, what's this git service ? https://git.carcosa.net/
<srandon111> i mean is it something commonly used by lispers ?
<phoe> srandon111: seems like a random Gitea instance.
<phoe> nope, not really. lots of lispers use github, some use the official gitlab, some use gitlab.common-lisp.net, some use other services.
<phoe> git is decentralized, after all.
nostoi has joined #lisp
<phoe> harlchen: what's the backtrace?
_atomik has quit [Ping timeout: 258 seconds]
<phoe> what's the HTTP-THREAD package?
andreyorst has quit [Ping timeout: 246 seconds]
<harlchen> ah sorry, my local-nickname for quux-hunchentoot
pve has joined #lisp
<phoe> where does the symbol QUUX-HUNCHENTOOT::WRAPPED-ERROR-P even come from? it does not exist in https://gitlab.common-lisp.net/qitab/quux-hunchentoot/-/blob/master/thread-pooling.lisp
<phoe> where did you get quux-hunchentoot from? how old is it?
<harlchen> and it came from ql:quickload
<phoe> no, this is the wrong package
<phoe> 1) this is package LPARALLEL.KERNEL, not QUUX-HUNCHENTOOT
<phoe> 2) this symbol is named WRAPPED-ERROR, not WRAPPED-ERROR-P
entre-parenteses has quit [Ping timeout: 260 seconds]
OlCe has joined #lisp
<phoe> yes, but this symbol once again comes from LPARALLEL, not from QUUX-HUNCHENTOOT.
<harlchen> yep
<phoe> so, no idea.
<harlchen> :)
lspr[m] has quit [Quit: Idle for 30+ days]
<harlchen> the symbol also doesn't appear anywhere in my quicklisp directory
<phoe> wtf then
<phoe> (ql:update-all-dists) or something?
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
nostoi has quit [Quit: Verlassend]
datajerk has quit [Ping timeout: 264 seconds]
olle has joined #lisp
orivej has joined #lisp
ljavorsk has joined #lisp
sgibber2018 has quit [Quit: WeeChat 2.9]
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
datajerk has joined #lisp
hugh_marera has quit [Quit: Connection closed]
iskander- has joined #lisp
iskander has quit [Ping timeout: 272 seconds]
dim has quit [Ping timeout: 256 seconds]
<harlchen> if a (let ((p package) is :use'ing a (s system) would it then be reported as a missing symbol from p ?
<phoe> wait a second
<phoe> this sentence doesn't really make sense.
<phoe> a package cannot use a system.
<phoe> there's nothing about symbols there, anyway.
<phoe> could you show us the code in question?
<phoe> it only uses the exported symbols of lparallel.
hugh_marera has joined #lisp
<harlchen> hmm, k.
<harlchen> thanks
<phoe> one second though
<phoe> hidden behind macrology, there is a symbol named LPARALLEL.KERNEL::WRAPPED-ERROR-P
<phoe> and it is fbound!
<phoe> this expands into DEFSTRUCT WRAPPED-ERROR that defines the predicate WRAPPED-ERROR-P
<phoe> so that's the definition.
<phoe> but where does QUUX-HUNCHENTOOT::WRAPPED-ERROR-P come from?
toorevitimirp has joined #lisp
saganman has quit [Ping timeout: 265 seconds]
Nilby has joined #lisp
jonathanschlink has quit [Quit: fBNC - https://bnc4free.com]
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
ebrasca has joined #lisp
<phoe> I am starting to suspect Trivia
<phoe> hmmm
<phoe> (trivia:ematch x ((structure trivia::adasdsd-) 42)) macroexpands into something that uses a symbol named ADASDSD-P
<phoe> highly suspicious
<harlchen> interesting
<phoe> please feel free to take this further from here; I'll pass on it now
<harlchen> sure, thanks for the hint, that would have taken me a while of looking at the call from quux-hunchentoot (structure lparallel.kernel::wrapped-error-)) to follow the ematch and suspect (an expansion in ?) trivia
<phoe> that would take me a while too
<phoe> try going to the file thread-pooling.lisp and try to manually compile DEFMETHOD RUN-DISPATCHER-THREAD
uniminin has quit [Quit: Leaving]
<phoe> let's see if this pops up a compilation warning.
<phoe> with the symbol in question, too.
<harlchen> k
hiroaki has joined #lisp
frost-lab has joined #lisp
aartaka has joined #lisp
villanella has quit [Ping timeout: 260 seconds]
<splittist> I'm always amazed at how a couple of minutes scribbling a note and a diagram can replace hours of typing and staring at a screen. And how a couple of minutes typing and looking at a screen can replace hours of scribbling notes and diagrams. If only I knew which would help when (:
<phoe> :D
Madvax has joined #lisp
skapata has quit [Remote host closed the connection]
srandon111 is now known as sookablyat
rumbler31 has quit [Ping timeout: 260 seconds]
Stanley00 has quit [Remote host closed the connection]
<_death> (let ((p (lp:promise))) (mapc (lambda (action) (lp:future (sleep (random 10)) (lp:fulfill p action))) '(code scribble)) (lp:force p))
<Nilby> One hand code, one hand scrible.
<phoe> Head smash keyboard to produce IRC messages.
surabax has joined #lisp
<Nilby> But the whatever the hands do, solution sems to be skulking obsucred in the back of my mind.
olle has quit [Ping timeout: 272 seconds]
<_death> after minutes of code, lp:por presents itself
orivej has quit [Ping timeout: 265 seconds]
* adlai wonders whether there's a quickway to revert a project fetched by quicklisp
<phoe> revert? what do you mean?
<phoe> you mean local-projects or a QL-downloaded one?
<jackdaniel> probably downgrade the dist
Codaraxis has quit [Remote host closed the connection]
<adlai> a ql-downloaded
Codaraxis has joined #lisp
* adlai has a bad habit of M-. to read, then making edits
<jackdaniel> ah, that's what you mean
iskander has joined #lisp
<jackdaniel> just remove ~/quicklisp/software/dists/quicklisp/library-name
gzj has quit [Remote host closed the connection]
aartaka_d has joined #lisp
<jackdaniel> ql will then "re-download it" when needed
gzj has joined #lisp
<adlai> there's a #'ql:uninstall , I was wondering whether there's an idiomatic way to only reset an existing system to the downloaded state
iskander- has quit [Ping timeout: 264 seconds]
<adlai> it looks like the dists/quicklisp/archives/ directory has the tarballs
kaftejiman has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
* Nilby thinks fixing things, even with M-. , is good habit.
<Nilby> But maybe there should be an emacs command to move it to a properly checked out repo.
<phoe> the issue is that quicklisp works on tarballs, not git repos
vegansbane6 has quit [Quit: The Lounge - https://thelounge.chat]
<phoe> some quicklisp projects don't even have git repos
<adlai> what I want is (find-method #'ql::install () '(ql-dist:release))
<adlai> s/want/$1ed/ , and now I wonder whether this is a Bad Idea because what I wanted is neither in an exported symbol, and is only one specific method out of a generic function that is usually called on the system rather than the release.
* adlai didn't quite complete that "neither... nor", although the confusion should be perfectly clear
<adlai> Nilby: welllll yes, in principle
<oni-on-ion> (not "either ... or")
<adlai> in practice, what might best suit my current workflow, without changing the way quicklisp works, is to `git init` in the dists/<dist>/software directory, and automatically `git commit` after each update of the dist
Codaraxis has quit [Ping timeout: 246 seconds]
* Nilby likes to imagine a world of principled and integrated CL software.
<adlai> then if I edit things, even in a few different projects, I can easily revert; and perhaps output patches, if things are worth sending upstream.
<adlai> quicklisp's upstream projects aren't all using the same version control system, and my local preference shouldn't care what the upstream projects are using
* adlai likes to imagine some future day when the CL implementation's pathnames include native support for common version control systems
Codaraxis has joined #lisp
<flip214> adlai: well, package-local-nicknames are already done, so next step is surely non-local-pathnames, right? (webdav, git, sftp, ...)
<adlai> e.g., the standard allows pathname-version to be any non-negative integer; the ANSI committee may not have had (unsigned-byte 256) in mind, although that is iirc the actual output space of git tree IDs.
Codaraxis has quit [Ping timeout: 256 seconds]
<harlchen> i have mito/sxql in my .asd mito/sxql -> optima ; in my loaded system run-dispatcher expands into http://paste.debian.net/1176847/ (by redefining) it only sees optima:ematch from the namespace quux-hunchentoot it also only sees optimas ematch even tough it is never used or referenced in any way, as far as i can see.
<adlai> flip214: I'm content limiting myself to dealing with version control hell within my own local computer, and leave those who care about retconning standardized access to non-local files to their own devices...
Codaraxis has joined #lisp
* adlai goes back to poking at cl-pdf , wondering how well it'll deal with 15 years of new standards
kaftejiman_ has joined #lisp
<oni-on-ion> good thing CL is standardised
<adlai> if I now waste the next two weeks on updating its parser to support linearized documents, instead of just submitting paperwork right away, and have patches to the upstream library by the end of the year, then maybe at least one good thing happened in 2020
kaftejiman has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
<Nilby> Adobe intentionally made conforming exactly to the PDF standard basically impossible.
kaftejiman__ has joined #lisp
* adlai refuses to print, scribble, and scan; and fortunately now has an indefinite deadline, so it is permissible to get sidetracked
<adlai> cl-pdf does not only support writing documents! it does actually have pdf-parser.lisp hiding in pdf-parser.asd
<adlai> the author's homepage seems down, though.
kaftejiman_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<adlai> it is a wonderful example of lazy CL programming... defines a root condition class, pdf-parse-error; and then all "other" conditions are just functions that give it a different :message arg
* phoe reads the above, becomes somewhat angry
vegansbane6 has joined #lisp
gxt has joined #lisp
gxt has quit [Remote host closed the connection]
gzj has quit [Quit: Leaving]
<_death> anger2patch phoe >cl-pdf
Bike has joined #lisp
<phoe> _death: for now I've only made a https://github.com/mbattyani/cl-pdf/issues/18
luckless has joined #lisp
nij has joined #lisp
<nij> I'm having problem with the notion of thread.. as the cl cookbook seems to be too involving.
<phoe> nij: you mean "thread" in the multiprocessing context?
<semz> Are there "best practices" about how to describe error conditions through the condition system in CL? The whole "one condition with ten million messages" thing strikes a little too close to home, both for my own code and for code I've used in the past.
<nij> Is there a minimal working example? I hope to create a thread that has one local variable, initially at 0, which increases by 1 each second.
<nij> The thread should terminate itself after it reaches 60. User can query the value, and send signals for the value to change.
<nij> phoe: Yes, in multiprocessing context.
<phoe> semz: just create subtypes wherever applicable, especially when you'd like to pass new arguments to them.
<phoe> nij: a thread is something that is capable of executing code on its own, independently of everything else.
<phoe> (bt:make-thread (lambda () (let ((x 0)) (loop (print x) (incf x) (sleep 1)))))
<phoe> that's a thread that will loop forever and print an increasing counter.
villanella has joined #lisp
<phoe> it will print to the *inferior-lisp* buffer most likely unless you rebind its special variables.
<nij> Without asking it printing, can one access to its X?
<beach> Luckily, no.
<beach> If one could, then the compiler could make no optimizations.
<phoe> not really; you'd need some mailbox sort of logic to be able to request the value of X and so the thread can send it back.
<phoe> that is doable, just requires more code.
<nij> Oh.. no wonder it's more involving than I thought.
<nij> Or is there other thing that helps achieve the same thing?
<phoe> achieve what exactly?
<beach> I don't think #lisp is the best place to learn about threads.
<phoe> you can define *x* as a global variable and have one thread increase it while the other threads get its value.
<nij> I just want to create a friend in cl, and ask/change the value of its local variable by sending signals.
<nij> beach: #clschool?
<phoe> oh, something like that
<beach> nij: I was thinking of CS-101.
<phoe> you could try to look at cl-actors for such sort of behavior
<_death> nij: you can create a queue where you pass commands like (:set-x 123)
<phoe> actors, by definition, are entities that can send, receive, and react to messages.
<nij> beach: there's no one in #cs-101
<phoe> it's a course name
<semz> lol
<nij> lol cs-101 teaches common-lisp? I will enroll in that University.
<phoe> beach meant the basics of computer science - that's where the notion of a thread is usually introduced
<nij> Yeah but I want it in cl..
<nij> I know what a thread is (roughly), but I want a working example in cl.
<nij> cl-actor seems legit. I will look into that :) thanks!
aartaka has joined #lisp
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
semz has quit [Ping timeout: 258 seconds]
aartaka_d has quit [Ping timeout: 272 seconds]
semz has joined #lisp
yitzi has joined #lisp
EvW has joined #lisp
rogersm has joined #lisp
semz has quit [Ping timeout: 258 seconds]
saganman has joined #lisp
frost-lab has quit [Quit: Connection closed]
cosimone has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
dim has joined #lisp
orivej has joined #lisp
fanta1 has joined #lisp
EvW has joined #lisp
Codaraxis has quit [Remote host closed the connection]
Codaraxis has joined #lisp
Codaraxis has quit [Remote host closed the connection]
Codaraxis has joined #lisp
Codaraxis has quit [Remote host closed the connection]
jonathan| has joined #lisp
Codaraxis has joined #lisp
<harlchen> deleted all old .fasl and it works , i guess some link went stale
wsinatra has joined #lisp
<harlchen> but an interesting debugging excursus
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
Codaraxis has quit [Remote host closed the connection]
Codaraxis has joined #lisp
<kenran> dang, I can't decide which language to use for a "recreational" terminal emulator... It seems like lisp has the most mature libraries to use, that is, seemingly a good freetype wrapper, and nice graphics stuff as well as good c ffi in general. but I'm a little turned off by how large the executables seem to become.
<kenran> do you think it's worth trying different compilers? So far I've only given sbcl a try.
<phoe> did you use core compression with SBCL?
orivej_ has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
<phoe> if not, try to use it, and then compare the sizes.
<jackdaniel> kenran: ecl produces small binaries and levereges shared library model (the implementation is a shared library itself) if you are that much concerned about size
<kenran> phoe: that's on my list to try. there's no terminal yet, so it's not much use only looking at my hello world stuff :D
<jackdaniel> that said, given we have 1tb drives practically for free nowday
<jackdaniel> having a binary taking 100mb is like a binary taking 1mb on back-then 1gb drives
<jackdaniel> s/100mb/1gb/
<jackdaniel> so come on, don't be that cheap! ;-)
<kenran> I'm actually not much concerned about executables being 30mb+ in size, as you said, that's not much of a problem at all nowadays (I haven't checked how big those electron-based things even are)
EvW has quit [Ping timeout: 258 seconds]
<kenran> I think I'm just subconsciously looking for reasons to switch languages all the time and never doing the hard work...
<jackdaniel> ah
<jackdaniel> either way, I wouldn't bother with how much executables take produced by sbcl (and if you are i.e because you have 128mb nand flash on the embedded device, switch to i.e ecl)
<kenran> I'm really interested in CL though, as I like the interactive way of development via REPL very much. I've only recently begun doing functional programming at my job
<jackdaniel> common lisp does not encourage functional programming in any particular way
<Nilby> I guarantee the executable size of a terminal emulator in C/C++ is the same or bigger if you include the shared libraries and development system.
<kenran> ah yeah ofc, but I learned FP via racket and haskell, and then used clojure a bit. so I learned to love LISPs :)
<jackdaniel> (there are a few common lisp libraries which embrace that particular kind of the programming style, but they are in minority given sheer volume of different libraries in the ecosystem)
<kenran> but I'm still not hating on OOP, so CL seems like a great language to do "what fits the problems"
galex-713 has quit [Ping timeout: 272 seconds]
<kenran> the idea would be to learn a bit about: low-level and POSIX stuff, graphics stuff via opengl, maybe vulkan later? performance would be a small concern, but learning is the main goal. It feels like CL is just a great language (on paper, as I haven't done enough with it yet) to do all that and learn a lot.
dmiles has quit [Ping timeout: 260 seconds]
<kenran> my boss is a scheme/racket guy though, so he's hating on CL a bit :D no reason not to learn it for me in any way
dmiles has joined #lisp
<jackdaniel> usually people I've met who use scheme/recket are not really hating cl, they just love their language (and vice versa)
<kenran> 'hating' was a rough term, yes, but there were a couple of 'derogatory' comments (in good humour though)
<jackdaniel> I think that language-wars were a thing in the past, but I have not witnessed any (escept for trolling and innocent jokes)
<jackdaniel> and somewhat biased framing of concepts: hygienic macros vs non-higienic macros (from my perspective they are sterile macros vs organic macros :)
<kenran> ha, I have to write that down :) a colleague of mine is often talking about this and he'd surely love to hear this perspective
gaqwas has joined #lisp
gaqwas has joined #lisp
<jackdaniel> be my guest ,)
bitmapper has joined #lisp
olle has joined #lisp
lucasb has joined #lisp
<Nilby> jackdaniel: ^ Comma not inside a backquote.
<jackdaniel> that's how I invoke commands at top-level
hal99999 has joined #lisp
<Nilby> sorry I got syntax triggered. I guess I should sya ,sayonara
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
nij has joined #lisp
aartaka_d has quit [Ping timeout: 260 seconds]
aartaka has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` is now known as X-Scale
ex_nihilo has joined #lisp
ex_nihilo__ has quit [Ping timeout: 260 seconds]
hal99999 has quit [Ping timeout: 260 seconds]
dbotton has joined #lisp
hal99999 has joined #lisp
Stanley00 has joined #lisp
waleee-cl has joined #lisp
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
skapata has joined #lisp
yitzi has quit [Quit: yitzi]
luckless has quit [Remote host closed the connection]
luckless has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
Codaraxis has quit [Ping timeout: 256 seconds]
Codaraxis has joined #lisp
gko_ has joined #lisp
Codaraxis has quit [Ping timeout: 260 seconds]
Codaraxis has joined #lisp
sjl has joined #lisp
kapil_ has quit [Quit: ZNC 1.7.5 - https://znc.in]
kapil_ has joined #lisp
reis_r has joined #lisp
entre-parenteses has joined #lisp
galex-713 has joined #lisp
sjl has quit [Quit: WeeChat 2.3-dev]
Aurora_v_kosmose has quit [Quit: Пока, мир.]
andreyorst` has quit [Quit: andreyorst`]
dbotton has quit [Quit: This computer has gone to sleep]
jibanes has quit [Ping timeout: 272 seconds]
andreyorst has joined #lisp
jibanes has joined #lisp
hnOsmium0001 has joined #lisp
Aurora_v_kosmose has joined #lisp
sjl has joined #lisp
a0 has quit [Ping timeout: 240 seconds]
dbotton has joined #lisp
Codaraxis has quit [Ping timeout: 260 seconds]
terrorjack has joined #lisp
igemnace has quit [Remote host closed the connection]
Codaraxis has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
yonkunas has joined #lisp
madand_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
jibanes has quit [Ping timeout: 256 seconds]
madand has joined #lisp
Codaraxis has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
Codaraxis has joined #lisp
dbotton has quit [Quit: This computer has gone to sleep]
jibanes has quit [Ping timeout: 256 seconds]
OptimusMKD has joined #lisp
jibanes has joined #lisp
rogersm_ has joined #lisp
rogersm_ has quit [Client Quit]
rogersm has quit [Ping timeout: 258 seconds]
reis_r has quit [Quit: Leaving]
Steeve has joined #lisp
ljavorsk has quit [Ping timeout: 260 seconds]
nij has joined #lisp
<nij> I have written a print-function for my structure DATE. https://bpa.st/U7IQ
<nij> How do I transform an instance of DATE into a string, as printed?
dbotton has joined #lisp
<phoe> clhs prin1-to-string
<nij> This is the cleanest way?
jibanes has quit [Ping timeout: 260 seconds]
<phoe> yes
<phoe> but beware, this format is not going to be readable back into Lisp.
<phoe> I'd try using print-unreadable-object to get something like #<DATE 2020-12-24> instead.
jibanes has joined #lisp
luckless_ has joined #lisp
<nij> Readable?
<aeth> my guess is something like (read-from-string "#<DATE 2020-12-24>")
<lotuseater> phoe means like having #S for reading in structs
<aeth> or, of course, just literally using it in source
<phoe> readable, as in, understandable by CL:READ
gko_ has quit [Ping timeout: 260 seconds]
<sookablyat> guys is there anything similar to racket universe libraries to make games in a functional way?
<nij> Oh yeah.. I want to print that into a text file :) so I think I'm fine.
jibanes has quit [Ping timeout: 240 seconds]
<nij> sookablyat: #racket?
luckless has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
<sookablyat> nij, i think that in order to search something in lisp i should ask in #lisp
dbotton_ has joined #lisp
<beach> nij: I think sookablyat is asking all male #lisp participants who also know Racket about a library for Common Lisp that is described by a Racket library.
ex_nihilo has quit [Quit: Leaving]
dbotton has quit [Ping timeout: 260 seconds]
<nij> oh!
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #lisp
<easye> nij: #lisp is (mostly) Common Lisp specific. Maybe you can help those of us who don't know Racket that well what the set "racket universe libraries" contains?
<beach> easye: Aww, you don't know that one?
<easye> heh
jibanes has quit [Ping timeout: 260 seconds]
<beach> #lisp participants are supposed to know not only Racket, but also Clojure, Java, JavaScript, Python, C, and C++.
<aeth> sookablyat: Common Lisp is about doing things efficiently in whichever paradigm is suitable for the task, and for games, that's certainly *not* a pure functional style with lots of immutable data structures being created and destroyed 30+ times a second.
<easye> I try, but struggle in forgetting all the stuff I remember.
jibanes has joined #lisp
<lotuseater> oh i must learn Java and JS? :D
<Nilby> Of course we know every blub language: blub.blub(blub+blub());
<nij> How did people make games in haskell then? Eg. https://soupi.github.io/rfc/pfgames/
<olle> nij: the game engine is probably in C
<olle> the rendering parts
<aeth> nij: Three points. One, people there care about optimizing something that's inherently the suboptimal way to do it (not just pure FP, also lazy evaluation). Two, the compiler helps out by optimizing immutable data structures (while CL doesn't even really let you declare anything as immutable). Three, almost certainly 2D games. You can do things the "wrong" way in 2D because computers today are so much faster than 80s computers.
<lotuseater> nij: maybe with lenses? :)
<aeth> And, yeah, the rendering parts either have to be in C/C++ (probably the latter) or they have to be written in a heavily mutable, non-idiomatic style and wrapped. (Even CL engines do the latter, even though mutability itself isn't non-idiomatic in CL.)
<shka_> why would you write game in a functional style?
<lotuseater> see this: https://github.com/rainbyte/frag
<shka_> there is little benefits to it
<shka_> unless you are doing something weird
<olle> aeth: the language Clean allow for destructive update, by opt-in ownership system.
<olle> So in such a language, maybe.
<aeth> Writing a game in a *declarative* style has many benefits, but functional is a poor fit for the domain imo.
<davros> quite a lot of a game can look good in FP, its just the low level side of rendering (filling command buffers etc) that looks ugly there
<aeth> Alternatively, you can write an entire language implementation around it.
<aeth> There is a 3D engine in Haskell, though, afaik.
<davros> shaders are pretty much pure functional, and physics update looks good too
<aeth> Yeah, I was about to bring up shaders.
<aeth> Writing a pure FP shader language is totally doable.
<davros> next_frame_state = pure_fundction(inputs, previous_frame_state)
madage has quit [Remote host closed the connection]
<aeth> C is a really poor fit for shaders, and stuff like GLSL are unnecessarily confusing because of it.
<aeth> The model isn't anything close to C, it's just what people are familiar with.
<davros> i've grown up around C so it looks good to me but i know what you're saying
andreyorst has quit [Quit: andreyorst]
<davros> shader language is "C-inspired" rathat than really being C with all the pointer stuff
<nij> I have no idea what you folks are saying.. nevermind :'(
<lotuseater> yeah it's quite about using functional programming concepts at the right parts
andreyorst has joined #lisp
<aeth> davros: Yeah, GLSL has no pointers, but is otherwise very C-style, with a bunch of implicit, hidden global variables that you set.
<davros> john carmack pointed out.. a game state is really a few mb out of gigabytes of RAM these days. there'd be no harm in keeping the whole previous frame gamestate around immutable, read only, for update to generate the next frame
<davros> aeth yeah thats ugly
<aeth> In reality, you can think of shaders as function-like objects (instead of tiny programs with hidden globals), where the "globals" are now the inputs and the outputs
<aeth> And that means put all of the inputs and outputs at the top imo.
<davros> i really think of that as a hack for getting multiple values out
<shka_> davros: the point is: why bother?
<davros> its really like "writing to those is the return values"
<shka_> what are you even getting out of it
<shka_> ?
jibanes has quit [Ping timeout: 246 seconds]
<davros> shka_, massive parallelism
<shka_> in a game state?
<shka_> :P
<davros> and the solidity of FP generally
<davros> yes, a game state is a lot of objects that can update in parallel
<shka_> IN A GAME STATE?
<shka_> i am not buying this
<davros> game update can get quite intensive if you want huge physics and AI
<aeth> davros: you do keep the previous state around in any networked game since you need to compensate for the finite speed of light introducing latency that's usually much larger than any frame is. Unless your ping is < 20 ms, of course.
<davros> the ambition is there to do it massively parallel
<aeth> (But even then, most of your frame time would be eaten by the lag.)
<shka_> i mean, FP is good fit for a lot of things, but for games?
<shka_> nah
<shka_> unless you need something weird
<shka_> for instance you need reservable game state
<shka_> or something like that
jibanes has joined #lisp
<davros> shka_ it's a good fit for large parts of games . i agree trying to do rendering code gets ugly in haskell though, that's where I stalled. (haskel gl bindings are just horrible)
<aeth> shka_: FP can work in places, like shaders.
<davros> it can work in game update too with previous immutable frame :)
<aeth> But asking for a fully immutable game engine would be like asking for a fully immutable database or something.
<aeth> Clearly, a database is all about state, so you're going to have to break that fiction somewhere.
<davros> Rust is a really nice sweetspot, imperative with a good pure subset (more solid than C/C++ with const, because rust immutable realyl does mean immutable)
<shka_> davros: i want to point out, that this immutable game state means that every update will cons
<shka_> which may or may not be a problem
<davros> every update will consturct a new frame - yes , thats no problem really
<shka_> anyway, i don't buy functional video game concept
<davros> 4gb of game state typically - double buffering it for parallel update is probably needed anyway
<shka_> for stuff like aviation software?
<shka_> sure, FP and formal validation is really compelling
<aeth> davros: Written naively, it's not that every update cycle will cons, it's that every single update operation will cons, which is... probably several tens of thousands of times more consing at a minimum.
<shka_> video games? nah
<davros> aeth / shka_ are you talking about a specific way of doing it in lisp ("cons") ??
<shka_> davros: cons has two meaning in lisp world
<davros> just blasting out a new gamestate from reading an old one should not be a problem
<shka_> or even three actually
<shka_> there is CONS data type, there is a CONS function, and there is general verb consing
<aeth> davros: "cons" = allocate new things on the garbage collected heap, potentially triggering a new GC pause which will stop the world for potentially longer than the time you have to do a frame's worth of calculations
<davros> 4mb, even copying the unchanging parts, out of 4+gigs of ram is not a problem
<shka_> that translates to allocation for normal people
madage has joined #lisp
<davros> i'm pretty sure GC could be given usful per-frame hints or something
<aeth> It's called consing because the easiest way to cons is to just (cons :foo whatever) and add a tag in front of whatever
<aeth> I'm guessing.
<shka_> aeth: i suspect that this comes from waaaay back LISP 1.0
<shka_> but it stucked
<aeth> davros: as for giving the GC hints... that's... kind of what I said something along the lines of "you could probably write a whole language implementation around it"
<aeth> It's too niche to be supported in a mainstream implementation, though
<davros> ok
<davros> realtime interactice is pretty important these days eg phone UI's are all animated, and AR/VR might get more popular
<shka_> anyway, the cool thing about the common lisp is that it does not force you in a specific direction
<davros> ah this conversation is happeningin #lisp sorry i thought i was talknig in #gamedev lmao. hence the lispy focus
<aeth> Languages like Haskell are superior for immutable FP over languages like Common Lisp because the Haskell compiler will optimize away a lot of the "consing", while the CL one won't since there's no guaranteed immutability except for literals that don't leave the scope of a function (since literals aren't tagged and are thus only immutable by convention because they'll cause issues if you mutate them)
<shka_> this has some drawbacks
<shka_> but most of the time it is beyond useful
X-Scale` has joined #lisp
<aeth> However, Haskell isn't optimized for real time or gamedev, so it won't necessarily make the correct decisions if you wanted to write a full FP game engine.
<aeth> So if you wanted to write a full FP game engine, the first step would probably be to write a full language.
<shka_> ... or use CL and isolate mutable parts manually
<aeth> Or at least e.g. a CL implementation that makes the right tradeoffs for GC and adds the right immutability/pure declarations
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` is now known as X-Scale
<shka_> CL allows you to do evil things, like for instance have a memory pool for game states
<aeth> shka_: Fully pure FP can only be done if the mutability is outsourced to the language implementation level, since you're going to have to cheat at some point. I guess you could also do it at the hardware level, of course, but that would be the most C CISC ever so it's not a popular idea in the era of RISCs.
<lotuseater> aeth: as i said above, don't forget about lenses
<shka_> aeth: sure, but my point is that you don't even have to be 100% pure FP to have 99% benefits of FP
<shka_> so that's why i prefer hybrid approach
<aeth> Yes, but these days, most people talk about "FP" as in immutable data structures while in CL game engines, you're probably doing "FP" as in pure functions being used purely for their return values, which will ultimately end up in mutable data structures for efficiency.
<aeth> The most trivial example, of course, is +
<shka_> sure
<shka_> and as long interfaces are done right, it is fine
<shka_> stop worry, embrace the mutation! :P
jprajzne has quit [Quit: jprajzne]
<shka_> boycott the purity!
<jackdaniel> and don't eat the yellow snow
<shka_> yeah, that as well
<lotuseater> and dynamic strong typing even fits game writing better imo
jibanes has quit [Ping timeout: 240 seconds]
<aeth> As for types... It really depends on the part of the engine you're writing. You want to precompute as much as possible, which means writing tons of macros, and there, the type doesn't really matter since most of the time you only really care if it's a list or not.
<aeth> But the part that most people would probably write in C or C++... that's probably very C-like. Including full type declarations, using structs with slots with :type in them, using arrays of single-float or some optimized finite integer size, etc.
<aeth> And most places are somewhere in between. CL, of course, lets you do it all.
<davros> i do prefer to qualify "pureFP"
jibanes has joined #lisp
jprajzne has joined #lisp
olle has quit [Ping timeout: 260 seconds]
slyrus has joined #lisp
<shka_> davros: well, i can't convince you
<davros> what can i say .. i code in c++ and i'm always trying to increase the amout of read-onlyness to increase parallelisability ..
<davros> i was convinced of the potential for pure FP when the xbox360 and PS3 hit us some years ago
<davros> "write efficient code for modern parallel machiens" = "make as much of it as pure-functional as you can"
<adlai> some sorta compromise: keep a fixed number of state, and compute as much as possible of your algorithms in-place; the leftover bits of consing, in the actual, might be small enough that you can afford the default GC
<davros> doing explicit double-buffering in c++ is an option
Steeve has quit [Quit: end]
<adlai> fixed number of frames
<jackdaniel> wasn't it rather mutate in a map-reduce fashion though?
ebrasca has quit [Read error: No route to host]
<jasom> davros: the problem is allocations are expensive and a simulation (like a game) involves generating sequences of rapidly changing world states; doing that with mutation reduces allocations greatly
ebrasca has joined #lisp
dvdmuckle has quit [Quit: Bouncer Surgery]
<davros> there's a middle ground if the data is well organise ,e.g. 'generate a new versino of a collection' (array = 1 allocation for many things)
<White_Flame> davros: modern parallel machines also all compete for the same memory bus
toorevitimirp has quit [Quit: Konversation terminated!]
<davros> and the optino of explicitly doublebuffering (previous and next)
dvdmuckle has joined #lisp
<White_Flame> as well as shared cache pools
<davros> update in place is ok but precludes the abiltiy to read anything from the other objects, so you need to have seperated out quite a bit of functionality for that to work in parallel
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
<jasom> davros: pipelining is one solution to this (perhaps that's what you mean by double-buffering?)
<aeth> davros: Well-written games have two timers going simultaneously. The logic is probably going at 100 FPS (10 ms) or 50 FPS (20 ms) while the rendering is probably going somewhere between 30 FPS (33.3 ms) and 144 FPS (6.9 ms)
<jmercouris> P I P E L I N I N G
ebrasca has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
<aeth> davros: It doesn't sound like a lot, but computers are fast, so you can do an incredible amount of stuff in a few ms
<jmercouris> and they are also usually two different threads, not just timers
<aeth> But... that's assuming you write it in an optimized, mutable way.
<jmercouris> though I should say, OFTEN enough, theree is a single thread...
<davros> if you want a seperate render thraed, stratigh away you need to make some sort of immutable copy (or generate some output) for the rendering to be reading. double buffering could come into this in many ways sure
<aeth> jmercouris: If it runs on a single thread, and most things you'd want to do will, then multithreading it will just slow it down.
toorevitimirp has joined #lisp
<davros> i need to draw a timeline to explain clearly
Inline has joined #lisp
<jmercouris> aeth: I don't think we can say that with certainty
<aeth> Most game simulations don't really do that much. You'll only have a few moving objects.
<jmercouris> lots of collision bounding checks depending on the genre
<aeth> jmercouris: Yes, certainly. Unless your architecture was bad in the first place. It'll add overhead.
<davros> depends on the game, games can get insanely complex
<jmercouris> ah the good old days when I was writing game engines
<jmercouris> so glad those days are behind me
ebrasca has quit [Read error: Connection reset by peer]
<jackdaniel> how many did you write?
ebrasca has joined #lisp
<jmercouris> 2
jibanes has quit [Ping timeout: 272 seconds]
<aeth> davros: Genres that require complicated CPU computations aren't really popular because they can only run on desktops/laptops, which is just a fraction of the market. A huge fraction, but still a fraction. https://i.redd.it/7e4t7o4irk161.jpg
EvW has joined #lisp
<davros> aeth consoles
<aeth> Graphics quality can be scaled up/down based on the platform, so games are far more likely to push the graphics to the limit.
<davros> consoles are quite powerful,and theyre all multicore
<beach> Maybe there are more game engines than games not only in Common Lisp, but in general?
pfdietz has quit [Remote host closed the connection]
dbotton__ has joined #lisp
<davros> sure there's more game engines in rust than games in rust
jibanes has joined #lisp
<jmercouris> different cores are used for general I/O mostly I believe
<jmercouris> one core to load assets, one for networking, etc
<aeth> davros: All of the consoles were quite weak in the CPU department relative to comparable PCs. Or if not necessarily weak, then at least too weird to be worth learning (e.g. PS3)
<jmercouris> the game loads themselves are still typically not utilizing multiple threads well
<davros> the fact that consoles went multicore a few gens ago forced the games industry to write parallelisable code
<davros> xbox 360/ps3 was the transition (3, cores and the weird spus on the ps3) ps4/xbox-one were 8 core, and now we're onto the ps5
<aeth> davros: Sure, the Xbox One has an "8-core" CPU, but it's an "8-core" CPU from an architecture family so bad that it almost killed AMD... And I put "8-core" in quotes because AMD lost a lawsuit... They're sort of 8 and sort of 4 cores; they're only 4 cores relative to the FPU, which games absolutely use.
<aeth> PS4 is identical.
<davros> 4 cores with 2 threads whatever it is - 8 threads
<nij> Are there functions or macros that turn a list into an ascii spread sheet? https://bpa.st/UOYA
<aeth> So, they were 8* cores (* actually 4 for the part that's important for games, and a contemporary Intel quad core would demolish it)
<davros> point is this is the situation for over 10 years.. cutting edge games went multicore long ago
<aeth> davros: No, it wasn't even SMT. It was 8 integer units and 4 FPUs. Games use floats way more than ints.
<phoe> nij: you want to format tables or some sort
<phoe> hmmmmm
<aeth> It was a really weird, failure of an architecture.
<aeth> This new generation is the first generation where powerful PC CPUs are actually in the "basically just PC" consoles.
<davros> even if its 4 cores.. thats a need for 4 threads
* phoe gently nudges console talk towards #lispcafe
<nij> phoe: Oh the term I missed is "table"..
dbotton_ has quit [Ping timeout: 260 seconds]
<aeth> davros: The thing is, with quad cores you can have a main thread and some helper threads. It's only since 2017 that we're starting to approach manycore, forcing people to actually have a properly-designed 2-to-infinity threading architecture.
<nij> FANTASTIC.
<nij> I kept searching term like ascii columns, ascii spread sheets..
<aeth> (The main thread in a designed-for-quad-cores program is a bottleneck that bottlenecks things by the per-core performance.)
<davros> aeth quad core is enough for "real" threaded architecture to work well and people (admittedly not everyone) have been doing that since the xbox 360 (with 3=6 threads)
<nij> Ascii anything is duper lovely.
* phoe gently nudges aeth and davros towards #lispcafe
<aeth> Yes, you can have a real threaded architecture on a quad core, but it's harder than having a main thread bottleneck, so what we're seeing is that people didn't start caring about doing things properly until 2017, even though a real architecture can scale down to 4 (or 2) cores and an improper architecture can't really scale up well.
<davros> we are in #gamedev - we can continue this discussion there
<phoe> that also works!
<aeth> davros: well, more #lispgames than anything else
wsinatra has quit [Read error: Connection reset by peer]
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
jprajzne has quit [Quit: jprajzne]
aartaka_d has joined #lisp
wsinatra has joined #lisp
jprajzne has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
jprajzne has quit [Quit: jprajzne]
defunkydrummer has joined #lisp
jprajzne has joined #lisp
greisean has joined #lisp
housel has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
pfdietz has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
jonatack has quit [Quit: jonatack]
Aurora_v_kosmose has quit [Quit: Пока, мир.]
eden has joined #lisp
<dbotton__> I started work on my first common list system - CLOG - The Common Lisp Omnificent GUI - For local and web apps. https://github.com/rabbibotton/clog
<dbotton__> So far it is just the round trip websocket communications. I was hoping that maybe someone would look at it and give me some feedback for Lispiness. I’ve only spent so far a couple of days on it, so before investing a lot more time..
<dbotton__> I wrote a similar library for Ada called gnoga which is used in tons of apps. (Commercial and not)
Aurora_v_kosmose has joined #lisp
jprajzne has quit [Quit: jprajzne]
<shka_> dbotton__: weeeeeeee docstrings
<shka_> <3
jonatack has joined #lisp
<shka_> having said that, nobody does formatting like you do in the line 194
<shka_> actually, maybe i will comment on the github
rogersm has joined #lisp
<shka_> eh, i can't do that
Codaraxis has quit [Read error: Connection reset by peer]
<shka_> dbotton__: anyway, usually, CL programmers prefer to use defgeneric and defmethod instead of hook style
<shka_> nowadays at least
<jackdaniel> they are orthogonal
<jackdaniel> hooks allow you to register any number of functions for the same kind of object
<jackdaniel> while generic functions allow you to distinguish different kinds of objects
<shka_> something in this ilk
rogersm has quit [Ping timeout: 240 seconds]
<phoe> I implemented hooks in terms of methods once, by abusing a multiple-value-or method combination with distinct qualifiers
jonatack has quit [Ping timeout: 264 seconds]
hendursaga has quit [Remote host closed the connection]
<jackdaniel> how do you add two hooks for the object integer?
jonatack has joined #lisp
<phoe> (defmethod my-hook :foo ((object integer)) ...)
<phoe> (defmethod my-hook :bar ((object integer)) ...)
<shka_> however, in this specific example, hook is launched on connection id, user can then find connection by id...
<jackdaniel> uhm
jibanes has quit [Ping timeout: 264 seconds]
hendursaga has joined #lisp
<shka_> jackdaniel: or you can use multimethod with eql specializer
<shka_> kinda overkill though
<jackdaniel> multimethod with eql specializer?
<shka_> ((a integer) (mode (eql 'something))
<shka_> like this
<shka_> anyway
<jackdaniel> and how do I call all hooks?
<jackdaniel> (foo 42 'something-or-something-else) ;?
jibanes has joined #lisp
<shka_> or just define everything as :after
<shka_> anyway!
<jackdaniel> but you can't because then you have only one method
<jackdaniel> phoe's solution seems plausible
Codaraxis has joined #lisp
<White_Flame> dbotton__: cool, that is exactly the type of large project I've been mumbling about starting for a long time :)
<jackdaniel> but adding after method for integer, and then another after method -- the latter will overwrite the former
<phoe> in this case, method-combination chained-or executes methods until one of them returns non-nil
<White_Flame> dbotton__: oh, does this just expose HTML, or is it a generalized UI that happens to have an HTML backend?
oni-on-ion has quit [Remote host closed the connection]
<shka_> i was mentioning this, because passing id to hook, then you can query connections for that id seems to be awkward ways of doing it
* jackdaniel still doesn't understand, but let's leave it at that
<shka_> why not simply pass whole connection object to the handler?
mbomba has joined #lisp
liberliver has quit [Ping timeout: 256 seconds]
liberliver1 has joined #lisp
<dbotton__> Sorry had to run out back and reading
<shka_> jackdaniel: notice that in the said project, connect-handler is just a singular function
<Nilby> I think hooks are still good for some use cases. Mostly when you don't want or need you potential extender to care about what classes you're using. And especially zero arg functions.
<shka_> jackdaniel: not a list
<shka_> context matters
<shka_> in general, i feel like there is a little bit to much, of global variables in the project
<shka_> this can be a matter of my personal preferences though
Blukunfando has joined #lisp
<dbotton__> White_Flame it will first bind generalized html and then the focus will be on a more Widget style GUI using that binding
<shka_> as for minor tricks
jibanes has quit [Ping timeout: 260 seconds]
liberliver has joined #lisp
<shka_> one thing that probably could be global are logging streams
jibanes has joined #lisp
Codaraxis_ has joined #lisp
<shka_> instead of logging to the *standard-output*
<shka_> you can define your own *logging-output*
<dbotton__> The GUI that will sit on top of this (including the HTML bindings will be more CLOS oriented
liberliver1 has quit [Ping timeout: 265 seconds]
<shka_> and by default bind it to the *standard-output*
<shka_> but this will allow you to redirect output to file, excluding other output to the standard-output
<shka_> that's how trace works for instance
<shka_> there is actually *trace-output* in CL standard
<dbotton__> ahka_ the truth is this entire piece will not be used by the user and will sit behind the actual GUI widgets etc
<shka_> and it occasionally quite useful to redirect trace to the file
<dbotton__> I'll take a look at logging is there any libraries currently used for logging?
Codaraxis has quit [Ping timeout: 265 seconds]
<ck_> there is log4cl
<shka_> dbotton__: anyway, i love how you put docstrings on everything
liberliver has quit [Quit: liberliver]
<shka_> and i don't have all that much to add other then i would rather pack most of this into some kind of objects
<dbotton__> One of my favorite parts of CL
<shka_> but this is based
Steeve has joined #lisp
<White_Flame> heh, this is my typical form of websocket JS stuff. Eval whatever message comes in ;)
<dbotton__> The mgl-pax packages is nice also as it generates DOCs
<dbotton__> There is work that needs to be done to "secure" things a bit for sure
<dbotton__> Eval is always a flag
<dbotton__> Any language
harlchen has quit [Quit: WeeChat 2.9]
<dbotton__> But it works
<White_Flame> I'm not knocking it
<dbotton__> I am going to start now working on the user land layer about this, I'll try and clean up more with everyones suggestions
<White_Flame> what's your plan for actually issuing HTML-level changes from the user perspective?
<White_Flame> eg, change lisp-side objects and trigger a sync to the client?
<dbotton__> More that it offers an imperative programming model
<dbotton__> yes
<dbotton__> And events etc on the lisp side
todun has joined #lisp
todun has quit [Client Quit]
<dbotton__> So you can say create a few inputs for a from and a button - click the bottom first an event , use the result start something else etc
<dbotton__> My first app on the ada version was a snake game using the canvas etc
<dbotton__> http://gnoga.com/ everything is done in ada code even the site - the lisp version will be I think nicer and easier to use
<luis> Does any of the URI libraries (PURI, QURI, ?) support converting a pathname into a file:// URI?
<dbotton__> Here is the source of the snake game - http://www.gnoga.com:8889/source
<dbotton__> Actually running in an online editor
<dbotton__> Controlled by the code
<dbotton__> Snake-connection.adb is the main logic
rogersm has joined #lisp
<dbotton__> My point is just to get idea of what will be
<adlai> the bad news is that cl-pdf-parser is unable to parse the PDF 1.7 specification document; the good news is that my refactored conditions are working properly
Jesin has quit [Remote host closed the connection]
zacts has joined #lisp
<aeth> is there a verbose print?
Jesin has joined #lisp
zacts has quit [Client Quit]
<jasom> adlai: not sure what the context is, but for simple tasks on PDFs, I wrote this: https://github.com/jasom/pdfparse because cl-pdf-parser wasn't able to handle the PDFs I wanted to parse and when a library doesn't do what you want, writing your own 20% solution from scratch rather than fixing the existing library is the Common Lisp Way(TM)
EvW has quit [Ping timeout: 260 seconds]
<Nilby> You know that they threw public key cryptography, javascript, and audio and video playing and 3d rendering into PDF.
andreyorst has quit [Ping timeout: 240 seconds]
<Nilby> Even the viewers in web browsers can't do all the things.
a0 has joined #lisp
eden has quit [Ping timeout: 240 seconds]
rogersm has quit [Quit: Leaving...]
<Nilby> But that said, it's still very cool to use base PDFs from Lisp.
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
<defunkydrummer> Nilby: well, postscript (ps) was already a quasi-fully fledged execution environment... able to do almost anything...
<aeth> jasom: If you wanted a 100% solution, you'd have to write your own solution from scratch because you'd basically have to bring in a whole web browser style environment.
<aeth> However, if you did have a web browser, it probably wouldn't be too hard to extend your support to PDF stuff.
<aeth> It'd basically just take a web browser (full browser, including the rendering engine), a game engine, and a database to handle most of the CL application needs.
<jasom> aeth: I just wanted something that wouldn't OOM on some PDFs
<Nilby> defunkydrummer: Right, but PDFs were supposed to be easier than PostScript. PostScript is quite hard to get right. Oh, and also PDFs can include PostScript too.
<aeth> fonts can include postscript, too, can't they?
<aeth> So by the time you're done with your application suite, you'll have had to implement JS, Postscript, and probably a bunch of other stuff, too, like sh and Lua.
<Nilby> Yes, the JS PDF viewers in the like 2-3 browswers engines are quite fairly capable for reading now.
<Nilby> I'm just mad that there's a ubiquitous important archive format that nearly impossible to fully support.
nwoob has quit [Ping timeout: 258 seconds]
greisean has quit [Quit: greisean]
<aeth> I mean, Adobe used to have two uibiquitous and important formats that were nearly impossible to fully support: Flash and PDF.
<aeth> must be part of their business model...
<Nilby> It's a weird kind of file format battle tragedy.
rogersm has joined #lisp
<aeth> Technically, Adobe would actually have three (counting Photoshop's internal PSD file format), but artists rarely post their sources.
<aeth> (But when they do, it's a Photoshop file)
jeosol has quit [Remote host closed the connection]
<jackdaniel> shka_: context matters, but the term "hooks" has a well estabilished meaning
<Nilby> Yeah. Between Adobe and Microsoft much of the worlds base content is nearly impossible to manipulate well.
<aeth> Microsoft Office is worse. Technically, I should add "office suite" to the list of things that are large enough projects that their dependencies handle most other entire projects (browser engine, game engine, database), but that's just so painful (basically *only* about compatability with arcane formats) that I doubt anyone will ever attempt it.
<aeth> Other projects that interest people like Emacs clone or a terminal emulator or whatever are trivial by comparison (although still hard)
greisean has joined #lisp
<Nilby> Indeed.
rogersm has quit [Ping timeout: 260 seconds]
<aeth> Maybe I could throw a CAS on the list as well, but Maxima is written in such a way that its internals aren't very useful for other CL projects afaik. Mainly because it's really, really old, though.
<Nilby> It's true I wish I could easily use Maxima's stuff. wxMaxima is so cool, but I wish it was all in Lisp.
<aeth> It doesn't help that iirc a huge chunk of Maxima is written in (probably ancient) Fortran and then compiled (in a poorly optimized way) to CL
<aeth> The way you'd want to do it if you started from scratch is probably to write a BLAS in CL, which is mostly just porting a permissive licensed BLAS (if there is one) to use CL inline asm on implementations that support it, and using the slow path for the rest of the implementation x architecture grid.
guanohhh has quit [Read error: Connection reset by peer]
alanz has quit [Ping timeout: 258 seconds]
guanohhh has joined #lisp
jerme_ has quit [Read error: Connection reset by peer]
alanz has joined #lisp
<Nilby> And written in mathematicians and physicists coding styles.
jerme_ has joined #lisp
<lotuseater> Nilby: in one talk of Robert Smith about maths with CL he says "don't look at maxima source" :D
<Nilby> Yes. I like to, but it's not for the faint of heart.
<lotuseater> maybe the same goes for ROOT, but it seems to work well
<lotuseater> I don't like the not expressive names in maxima, it could improve doing that like Mathematica (just imo)
<lotuseater> but then no maxima code written will work
guanohhh has quit [Ping timeout: 240 seconds]
<Nilby> One of my favorite *old* Lisp code is SHRDLU. It's sometimes written almost in a Haskell style. When I first read it I was like "WT-holy-F is this??" Total nonsense. Now I can read it and see it's fairly brilliant.
jibanes has quit [Ping timeout: 256 seconds]
<lotuseater> oooh yes i like the dialogue in gödel escher bach with SHRDLU
<lotuseater> do you have a link?
<White_Flame> it really helps to read the phd thesis along with the shrdlu source code, at least to begin understanding it
<lotuseater> maybe i'll finally get then how to do ai in CL ._.
<White_Flame> shrdlu is not really extensible
<lotuseater> what was the original dialect?
jibanes has joined #lisp
<White_Flame> old
gareppa has joined #lisp
Steeve has quit [Quit: end]
<White_Flame> maclisp according to that github link
<White_Flame> enjoy your fexprs
noobineer1 has joined #lisp
<lotuseater> hmm
narimiran has quit [Ping timeout: 256 seconds]
* Nilby is looking for his shrdlu that works in CL.
noobineer has quit [Ping timeout: 256 seconds]
<adlai> jasom: you just made me read CL code that has defmethod with self as an argument name
jibanes has quit [Ping timeout: 260 seconds]
<White_Flame> the original source is almost like assembly code. I'm sure it could be rewritten to less than 1/10th the size in modern style
* adlai is angered
jibanes has joined #lisp
<lotuseater> yes it reads not very condense
scymtym_ has joined #lisp
<White_Flame> old CL code is extremely mutating to avoid blowing memory on 70s hardware
<White_Flame> erm, 1960s :-P
guanohhh has joined #lisp
daphnis has joined #lisp
scymtym has quit [Ping timeout: 264 seconds]
<White_Flame> s/CL/Lisp/
<waleee-cl> is there anyone using parinfer-rust-mode in emacs?
villanella has quit [Read error: Connection reset by peer]
<daphnis> what do you do when emacs indents badly; just correct it manually and avoid auto-indenting? e.g. the first form in Practical p. 330 is illogically indented by emacs.
<phoe> daphnis: which chapter is that?
villanella has joined #lisp
<daphnis> parsing binary files
<phoe> defun read-u2?
<dbotton__> (First thing I do is assume I am wrong not emacs :)
<White_Flame> indentation can also change if for instance the code uses a macro, but the macro hasn't been loaded in yet
<daphnis> (define-binary-type iso-88 .....
<phoe> which form do you mean?
<phoe> oh! have you called DEFMACRO DEFINE-BINARY-TYPE?
<daphnis> hm, no
noobineer1 has quit [Ping timeout: 256 seconds]
<White_Flame> SLIME knows about the &body field in macros and indents them as code instead of data
<daphnis> now i have, indentation is unchanged
<daphnis> the (let in the third line is aligned with the (in in the 2nd
<Nilby> Yes, I just correct it and avoid. Emacs can never duplicate the indenting artistry you can achive with multiple-cursor mode.
<phoe> oh, like that!
<phoe> yes, I see
<White_Flame> daphnis: yep, there's no way for slime to know the intent here
<White_Flame> so it makes some guesses
<Nilby> but, yeah, always use &body when you want that.
<White_Flame> this is nested underneat macro parameters, though
villanella has quit [Ping timeout: 256 seconds]
<phoe> let me check if trivial-indent can fix this
<White_Flame> nested forms inside "&body spec)"
<_death> there is some broken indentation in default slime.. try for example (incf place RET
jprajzne has joined #lisp
<phoe> !
<phoe> (trivial-indent:define-indentation define-binary-type (4 4 &rest (&whole 2 4 4 &body)))
<phoe> this thing seems to kinda work
fanta1 has quit [Quit: fanta1]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
PuercoPop has joined #lisp
<daphnis> phoe: thanks!
jw4 has quit [Read error: Connection reset by peer]
<phoe> trivial-indentation needs to get a proper manual someday
imode has joined #lisp
jw4 has joined #lisp
stzsch has joined #lisp
jprajzne has quit [Quit: jprajzne]
varjag has joined #lisp
jprajzne has joined #lisp
tomaw has quit [Ping timeout: 606 seconds]
tomaw_ has joined #lisp
tomaw_ is now known as tomaw
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
gareppa has quit [Quit: Leaving]
<White_Flame> Nilby: ever find your CL SHRDLU?
rogersm has joined #lisp
euandreh has quit [Remote host closed the connection]
orivej_ has quit [Ping timeout: 240 seconds]
a0 has quit [Ping timeout: 240 seconds]
euandreh has joined #lisp
<Nilby> I did. But it failed to load, and I'm trying to avoid getting lost for days in the past again. I should post it someday. I think I started with this: https://github.com/tsgouros/www-shrdlu.git
<White_Flame> yeah, I found that one
jibanes has quit [Ping timeout: 272 seconds]
<White_Flame> if I were to throw my hand into Yet Another SHRDLU Resurrection, I'd just start from first principles from the thesis and not from the code
rogersm has quit [Ping timeout: 246 seconds]
jibanes has joined #lisp
<Nilby> Yes. My interest was mostly historical not so much as practical.
gaqwas has quit [Ping timeout: 260 seconds]
<Nilby> Someday I'll feel the clock ticking slowly enough to finish it.
Stanley|00 has joined #lisp
Stanley00 has quit [Ping timeout: 240 seconds]
<Nilby> It's like museum code.
jibanes has quit [Ping timeout: 264 seconds]
jibanes has joined #lisp
orivej has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
jibanes has quit [Ping timeout: 256 seconds]
pfdietz has quit [Remote host closed the connection]
Jesin has quit [Quit: Leaving]
daphnis has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
Jesin has joined #lisp
jprajzne has quit [Quit: jprajzne]
dbotton__ has quit [Quit: Leaving]
jprajzne has joined #lisp
aartaka_d has quit [Ping timeout: 260 seconds]
jeosol has joined #lisp
luckless has joined #lisp
luckless_ has quit [Ping timeout: 240 seconds]
wsinatra has quit [Quit: WeeChat 3.0]
Stanley|00 has quit [Remote host closed the connection]
OptimusMKD has quit [Read error: Connection reset by peer]
shka_ has quit [Ping timeout: 240 seconds]
greisean has quit [Quit: greisean]
aartaka has joined #lisp
hiroaki has quit [Ping timeout: 272 seconds]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
EvW has joined #lisp
jprajzne has quit [Quit: jprajzne]
rogersm has joined #lisp
mbomba has quit [Quit: WeeChat 3.0]
<jasom> adlai: you're welcome :D
jprajzne has joined #lisp
rogersm has quit [Ping timeout: 240 seconds]
grumble has quit [Quit: Well, would you look at the time. I've almost missed my ambiguous, non-existent appointment that I have scheduled just when I start to lose interest in my current conversation.]
<jasom> It also has a tagbody inside of a block, so it was written before I knew that prog has an implicit tagbody
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
euandreh has quit [Remote host closed the connection]
<Xach> jasom: i just learned that lesson today!
greisean has joined #lisp
<Xach> what a coincidence
jprajzne has quit [Client Quit]
gareppa has joined #lisp
dbotton has joined #lisp
grumble has joined #lisp
dim has quit [Ping timeout: 256 seconds]
euandreh has joined #lisp
gareppa has quit [Remote host closed the connection]
villanella has joined #lisp
pve has quit [Quit: leaving]
fivo has joined #lisp
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #lisp
dbotton has quit [Ping timeout: 260 seconds]
luni has joined #lisp
nij has joined #lisp
<nij> Is using data as config a common practice among LISPers?
<jasom> nij: configuration is data, can you clarify what you mean?
<nij> Hmm.. instead of using formats like .YAML, why not just use .LISP?
<jasom> ah, as in use a source-file as configuration? It's definitely a thing.
<nij> Something like this: '("Monday" "Upper" ("Push-ups 15" "Pull-up 1" "Push-ups 15" "Pull-up 1"))
<nij> jasom: anything
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
<jasom> nij: I've seen it like (defparameter *some-config-option* some-value) and the configuration file loaded with cl:load and I've also seen it like ((:some-config-option . some-value)) and the configuration file loaded with cl:read
<nij> I wonder why it isn't common practice. Like.. is it error-prone?
mbomba has joined #lisp
<jasom> nij: there's probably other was its done as well.
<jasom> I do it that way unless someone else is going to configure the file; people unused to lisp are more likely to be comfortable editing a .yaml or .json file (and their editor is more likely to be configured to help them do so)
luni has left #lisp [#lisp]
orivej has quit [Ping timeout: 256 seconds]
badcfe has joined #lisp
<badcfe> is there an "international standard" for lisp? maybe X3J13/94-101R equals CLT2 but is ansi only. is ISLISP the thing, but there's no "public domain" implementations?
mbomba has quit [Quit: WeeChat 3.0]
jibanes has quit [Ping timeout: 256 seconds]
<no-defun-allowed> Well, ISLISP isn't Common Lisp.
dim has joined #lisp
<badcfe> no-defun-allowed: but is it the closest one, with an international standard?
<jasom> I don't think X3.226 was ever ISO standardized
<no-defun-allowed> I don't know how close ISLISP is to Common Lisp, but my guess is it is quite different.
jibanes has joined #lisp
bilegeek has joined #lisp
<badcfe> i came across this which seems really nice
<badcfe> but thats ansi common lisp i see
<jasom> ISLISP is pretty close to a subset of common lisp
<badcfe> oh, that sounds good then.
<edgar-rft> The original idea of the ANSI folks was to include Europe and Japan into the specification process but the ARPA-net was too slow for that, so I think the ANSI spec ist the only official specification until today.
<jasom> though I can't for the life of me remember if it's lisp-1 or lisp2
<badcfe> i mean, as a newb i could learn it, and then be fine in CL as well
<jasom> badcfe: I would recommend learning common lisp instead; islisp is a smaller community than CL, and it's not like the CL community is large
<badcfe> "arpa net was too slow for that" ?
<edgar-rft> badcfe: the email communication took too long, Kent Pitman wrote up the details somewhere in his homepage
<badcfe> is CL community small because learning to think in it you become a compiler writer for other languages to get away from the parenths and then resulting in popularity and bringing in nice ideas to those other languages?
kenran has quit [Remote host closed the connection]
<no-defun-allowed> What the fuck?
<Xach> badcfe: no
<badcfe> why does not ieee iso or anyone raise ansi spec up to international standard instead of this ISLISP thing?
<jasom> badcfe: who will pay for it?
<no-defun-allowed> Does it really matter if it's an ANSI standard or an ISO standard?
<Xach> badcfe: ANSI Common Lisp exists because a big customer demanded it. there is no big customer in sight to do it these days.
<White_Flame> besides, we're in a post-standards world for the most part (love it or hate it)
<badcfe> they can just trust ansi and fetch the pdf and stamp it
quazimodo has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
<White_Flame> regarding size of the community, a lot of that has to do with commercializing the community as well
<Alfr> badcfe, why are you looking for a lisp w/ international standard?
<badcfe> i am trying to understand why lisp is not more 'endoursed' (or term like that)
<White_Flame> lisp really offers developer empowerment directly, so you don't have the "support groups" of people trying to get around limitations as much as other langs do, and that activity drives engagement
<Xach> badcfe: many reasons
quazimodo has joined #lisp
<badcfe> White_Flame: right, maybe 'popular' languages as measured by frusts in stackoverflow is not the best measure
<badcfe> and maybe to have an ansi spec should be good enough.
<White_Flame> having a spec at all is heads and shoulders above many other languages
<White_Flame> even disregarding standards bodies
FreeBirdLjj has joined #lisp
<badcfe> White_Flame: "commercializing teh community" ?
<White_Flame> and again, good enough for what?
jprajzne has joined #lisp
<edgar-rft> languages are only popular when they are used by the pope
<White_Flame> sure, running businesses around supporting language dev groups, with websites, instruction, libraries, etc
<badcfe> good enough for having similar compiler implementations around, for the language to be practical and valuable to know
random-nick has quit [Ping timeout: 260 seconds]
<badcfe> edgar-rft: hence pope-ular
<Nilby> I think the Lisp community and programming communties in general are wise emough not to get stupid semi-political organizations involved in designing languages. And even though Common Lisp is a great achievement, designing by committee isn't so good.
<White_Flame> well, I think it already met that criteria
<jasom> badcfe: I mean Python lacks even an ANSI standard, which probably explains why nobody uses it
sjl has quit [Ping timeout: 240 seconds]
jibanes has quit [Ping timeout: 246 seconds]
<White_Flame> does python not even have a written standard, besides a reference implementation?
<phoe> not really, AFAIR
<badcfe> jasom: you proove having standard is not important. okay.
<jasom> White_Flame: it has reference documentation; whether or not that is sufficient to be called a "standard" is an open question.
<Nilby> e.g. ECMAscript seem rather pointless and isn't defacto Javascript
<jasom> White_Flame: anything not mentioned in the reference documentation is de-facto decided by the reference implementation, so if you were to write a novel implementation that conforms to the reference documentation, but differs from the reference implementation, would it be a Python implementation?
<White_Flame> badcfe: having a standard is beneficial. but most people seem to skip that, as is common with programmers and anything prose :-P
jibanes has joined #lisp
nij has quit [Quit: ERC (IRC client for Emacs 27.1)]
<badcfe> if you write something in lisp teh thing is generally going to be faster than if you do the thing in python right? even pypy, cython, or whatever
<White_Flame> (comments, documentation, actually reading up on things, etc)
FreeBirdLjj has quit [Ping timeout: 264 seconds]
<White_Flame> python is generally a slow-to-execute language
<badcfe> White_Flame: yeah, except .. programming is prose right
<White_Flame> no
<no-defun-allowed> There are a few things that are hard to compile in Python, but usually PyPy does pretty well at compiling it.
<jasom> conversely there was a 6 year period in which there was an ALGOL 68 standard, but no conforming implementations
<no-defun-allowed> However, I think PyPy uses type information gathered at runtime, but (all?) Common Lisp implementations rely on the programmer to provide type declarations if they need to specialize.
<badcfe> jasom: you have another good point about standard ther.
srandon111 has joined #lisp
srandon111 is now known as sukablyat
<Nilby> or programming is functioning poetry ? or incomprehensible scratches ?
<jasom> no-defun-allowed: sbcl definitely does type-inference based optimizations, particularly around numeric functions
<White_Flame> it's closer to mathematical representation
<White_Flame> it's a formal representation, not a human language
rogersm has joined #lisp
<no-defun-allowed> jasom: Yes, but that is still determined at compile-time. Compare to Smalltalk or Self (or Java even), where code is specialized at runtime.
<jasom> no-defun-allowed: IIRC There was some experimenting of donig that with method-invocations in sbcl, not sure if it's in the current release or not
<edgar-rft> Nilby: "programming is like incomprehensible poetry" will become my favourite idiom of the day :-)
<Nilby> :D
<jasom> but it was fairly straightforward caching of method lookups, nothing fancy like JIT specialization IIRC
<no-defun-allowed> Ah yes.
sukablyat has quit [Client Quit]
sookablyat has quit [Ping timeout: 256 seconds]
jprajzne has quit [Quit: jprajzne]
fivo has quit [Quit: WeeChat 1.9.1]
jprajzne has joined #lisp
hal99999 has quit [Quit: hal99999]
rogersm has quit [Ping timeout: 260 seconds]
<defunkydrummer> no-defun-allowed: in many cases PyPy doesn't really do a dramatic speedup, Python still ends up being a slow platform
<no-defun-allowed> defunkydrummer: I recall a decent speedup on a few programs. Not quite close to Lisp (or C even), but still a large speedup nonetheless.
<defunkydrummer> no-defun-allowed: only Cython brings real speed to Python, but Cython isn't really 100% python language, and there is no compatibility with the popular libraries
<edgar-rft> badcfe: The good thing of having a standard is that the language doesn't change every other year. In physics or medicine I have maintainance contracts over ten or twenty years and I wouldn't want to maintain C code over such a long time.
<edgar-rft> The disadvantage of having a "non-changing" language is that it oftenn needs some work to deal with more modern things like threads or distributed network computing.
jibanes has quit [Ping timeout: 260 seconds]
<badcfe> edgar-rft: but i would guess lisp (you mention network) is quite good for a io event loop with protocol handlers doing some kinds of continuations
jibanes has joined #lisp
<jasom> edgar-rft: I've seen 99 year support contracts based on C; the compiler in question will support the version C it was based upon for that long.
<badcfe> White_Flame: 'it's a formal representation, not a human language' refers to lisp?
jprajzne has quit [Quit: jprajzne]
<edgar-rft> jasom: of course *you* are free to do whatever you want, but maybe *I* wouldn't do the same :-)
<edgar-rft> jasom: what if your old C compiler doesn't work anymore after an OS update?
<jasom> edgar-rft: pretty sure the compiler vendor was included in the contract
<Nilby> Eventually I think Common Lisp will have enough defacto extensions, like unicode, PLN, getenv, run-program, etc. which every implementation already supports, that it'll just be useful write them all up.
<jasom> plus I have code I wrote that is older than the C ANSI standard that most compilers will still compile with the correct flags.
jibanes has quit [Ping timeout: 260 seconds]
<edgar-rft> jasom: I din't mean that it's impossible, I only said that *I* wouldn't want to do it, maybe for just the simple reasom that I'm a complete idiot.
jibanes has joined #lisp
<jasom> I get your point; I just think C was a poor example given that Python is actually this terrible. I have a build-system that some components won't work with anything newer than 2.3 and other components require 2.7; it's terrible.
oni-on-ion has joined #lisp
<edgar-rft> I agree that there are things in life that are even more terrible than C :-)
<oni-on-ion> i like C =)
<oni-on-ion> but grew up on it; mother tongue.
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #lisp
surabax has quit [Quit: Leaving]
villanella has quit [Ping timeout: 258 seconds]
jprajzne has joined #lisp
<edgar-rft> jasom: Python made Adam and Eve getting banned from paradise.
<edgar-rft> okay, this definitely going -> #lispcafe :-)
jibanes has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
ebrasca has quit [Remote host closed the connection]
<adlai> badcfe: there are a few hidden assumptions at play when you try to answer a question like that
defunkydrummer has left #lisp ["Leaving"]
greisean has quit [Quit: greisean]
Oladon has joined #lisp
imode has quit [Quit: WeeChat 2.9]
jibanes has quit [Ping timeout: 264 seconds]
jibanes has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
igemnace has joined #lisp