eddof13 has joined #commonlisp
random-nick has quit [Ping timeout: 265 seconds]
lucerne has quit [Remote host closed the connection]
wilfred has quit [Quit: Connection closed for inactivity]
silasfox has quit [Ping timeout: 265 seconds]
tyson2 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
unyu has joined #commonlisp
lucerne has joined #commonlisp
eddof13 has joined #commonlisp
taiju has quit [Remote host closed the connection]
taiju has joined #commonlisp
ilshad has quit [Ping timeout: 265 seconds]
igemnace has joined #commonlisp
igemnace has quit [Client Quit]
waleee has quit [Ping timeout: 265 seconds]
igemnace has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sabra has quit [Remote host closed the connection]
IAmRasputin has joined #commonlisp
Bike has joined #commonlisp
IAmRasputin has quit [Ping timeout: 265 seconds]
ilshad has joined #commonlisp
Bike has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
shka has joined #commonlisp
srhm has quit [Quit: Konversation terminated!]
taiju has quit [Ping timeout: 264 seconds]
ilshad has quit [Ping timeout: 265 seconds]
taiju has joined #commonlisp
Alfr has quit [Quit: Leaving]
dsk has joined #commonlisp
<beach> Good morning everyone! And happy solstice!
<beach> jcowan: Thanks!
<phantomics> Happy solstice beach
<phantomics> Here's a question that's kind of the opposite of yesterday's: when I have a dynamic variable with a definition assigned to it that's effective within a scope, is it possible to set the variable's top-level value from inside the scope? Here's an example:
<phantomics> (defvar ab 10) (funcall (lambda (a) (let ((ab ab)) (set-toplevel ab 20) (+ a ab))) 15) ab
<phantomics> The (set-toplevel) is a theoretical macro that sets the value of ab at its top level so the end result of this will be 20. If setf or (set (symbol-value ...)) is used in place of set-toplevel, the result is always 10
<beach> There is no standard way. But the implementation may have something. Most implementations would assign to the top-level binding if you create a new thread and do it in that thread.
<phantomics> Right, I ran into that problem with threads before
<beach> Problem?
<phantomics> I had a variable scoping issue when using threads
wanagnuj has joined #commonlisp
wanagnuj has quit [Client Quit]
<phantomics> Was confusing because the nesting looked right, realized I couldn't get the variable value I wanted because threads were being spawned inside one of the functions
<beach> I see.
wanagnuj has joined #commonlisp
<phantomics> That's a pain if the implementation can't be counted on though, I may have to find another way
wanagnuj has quit [Client Quit]
wanagnuj has joined #commonlisp
wanagnuj has quit [Client Quit]
<beach> I know of no implementation that does it differently.
<phantomics> In APL it's possible to assign both values that are scoped inside a function and the top-level dynamic variable outside a function using different syntax
<phantomics> Outside-scope assignment is a fairly obscure thing to do anyway, I can just implement it with a thread and see if there's ever a problem
<jcowan> beach: What I expected to find in the inlining paper was a discussion of inlining functional arguments, as when you want to inline a call (mapcar car list-of-pairs), where you could not just inline mapcar but also inline car within it.
<mfiano> Writing a macro that expands to two defvars?
<mfiano> I mean you are basically accessing for a dynamic variable to not be dynamic, so you'll have to use additional storage
<beach> Oh, right, DEFVAR or DEFPARAMETER may work.
<mfiano> s/accessing/asking/
<beach> jcowan: Sorry to have disappointed you. That's not the focus at all of that paper.
* beach goes to look at the definition of DEFVAR and DEFPARAMETER.
<phantomics> mfiano: yeah, I'd need two defvars, and I'd have to remember to reference the top-level variable in the (let) block of any function definition done at the top level
Lord_of_Life_ has joined #commonlisp
<beach> It is not clear to me whether those two affect the innermost binding or the top-level binding.
<jcowan> phantomics: If your macro expands to two defvars, it should instead map to (progn (defvar ...) (defvar ...))
<mfiano> beach: defparameter as a non toplevel form does not have to recognize that the variable should be special
<beach> What does that mean?
<beach> Where do you see that?
<jcowan> beach: Sure. I just thought it would be mentioned, that's all
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<beach> jcowan: Right, thanks.
<jcowan> I don't know if any Lisps actually implement it: Kottlin does
<beach> I see.
<mfiano> beach: "However, the compile-time side effects described below only take place when they appear as top level forms"
<mfiano> where the side-effects are that they be recognized to establish a special variable
<beach> mfiano: Right, but that's different from what binding is affected at run time.
x88x88x has joined #commonlisp
<beach> Just for kicks, let's see what SBCL does.
<beach> SBCL DEFPARAMETER affects the innermost binding.
<mfiano> Yes, it would be up to the impl I believe.
<beach> It looks that way, yes.
<beach> Note to self: In WSCL, specify which binding is affected by non-top-level DEFPARAMETER and DEFVAR.
<mfiano> That case is probably extremely rare, at least in the non-code-smell sense.
<beach> Indeed. But I see no reason not to specify it.
<mfiano> Yes
<beach> I mean, at least specify that the implementation has a choice.
<mfiano> Agreed
<moon-child> phantomics: you might consider not relying on cl's dynamic scoping, and instead using your own binding stack
<mfiano> ^
<mfiano> I second this. Then you can maintain pointers to the top and bottom
<moon-child> alternately, use some standard prefix for local variables (use a separator, like +; even if you allow rebinding +, you will never allow rebinding ++, so it avoids collisions)
<phantomics> moon-child: perhaps an ideal solution... but a lot of work
<beach> phantomics: Maybe. But it is often a bad idea to rely on the semantics of the implementation language matching the language being implemented.
<moon-child> I do not agree
<moon-child> first: there are certain things that it makes sense to rely on. Integer arithmetic, for instance
<moon-child> second: if you are designing a language that integrates closely with its target (as april seems to with cl), then it makes sense to try to express things idiomatically in terms of the target, where possible
<beach> Oh, I didn't mean the way certain functions work. I was referring to the overall semantics.
<moon-child> right. Second argument is more relevant, in that case
<beach> Right. If you want integration, that's a different story.
<phantomics> APL is orthogonal to CL in many ways, there are just a few hangups
<beach> "orthogonal"?
<moon-child> phantomics: here's an option: discard dynamic scoping in april entirely :)
<beach> That sounds bad.
<phantomics> Orthogonal in that many of the concepts are 1-1 mappings. a+⎕←b×c is the same as (+ a (print (* b c))) for example
<beach> That's not how I think about "orthogonal", but hey.
<phantomics> What does it mean to you? Going against the grain of CL?
<beach> "being totally unrelated"
<mfiano> phantomics: I think you mean the opposite
<beach> mfiano: No, the opposite to opposite.
<phantomics> April produces CL arrays you can easily interact with in CL, its workspace are CL packages. APLs implemented in other languages make special data structures that you can't process using the host language, especially since most are written in languages that don't support multidimensional arrays
ad_absurdum has joined #commonlisp
kakuhen_ has joined #commonlisp
<moon-child> well, depends on what you mean by 'process using the host language'. Dyalog apl (for instance) is written in c++; its arrays are implemented in terms of c++ structures and are surely manipulable from the (c++) implementation
<mfiano> Right. When I see "orthogonal" I think geometrically, as in, on an orthogonal axis, not even comparable.
<moon-child> you can even write plugins in c that manipulate those arrays
fiddlerwoaroof_ has joined #commonlisp
<beach> mfiano: Exactly. And I don't think that is what phantomics meant.
<phantomics> I remember hearing it used differently. I would say instead that APL parallels Lisp in many respects
ggoes_ has joined #commonlisp
derelict_ has joined #commonlisp
<moon-child> now I am thoroughly confused. I would say that apl parallels lisp in one respect (power derived through manipulation of a homogenous data structure) and almost no others
<moon-child> :)
<phantomics> Their history is kind of similar too: both are mainframe languages, both were used essentially as operating systems and frontend user interfaces on their host machines. Both fell out of favor when the microcomputer revolution happened due to needing a powerful computer to be useful
<moon-child> yes
<moon-child> (though lisp did a better job of surviving, I think because it was academic so there were free implementations)
<phantomics> Vector languages have traditionally been more proprietary than other language families, see k
dsk has quit [*.net *.split]
ad-absurdum has quit [*.net *.split]
kakuhen has quit [*.net *.split]
ggoes has quit [*.net *.split]
derelict has quit [*.net *.split]
eta has quit [*.net *.split]
fiddlerwoaroof has quit [*.net *.split]
<phantomics> Also, APL has historically mostly been an interpreted language, deploying it means you have to deploy interpreters. It also means there are a few APL features you can't implement with a compiler
<moon-child> yes. But I mean originally, lisp was used for ai at universities, and apl was used for finance at businesses, and this was in the era before commercial languages were generally opensource
<moon-child> there were a few historical apl compilers. One I was even able to dig up source for (though I couldn't get it running)
ggoes_ is now known as ggoes
CrashTestDummy2 has joined #commonlisp
lucerne has quit [Read error: Connection reset by peer]
<phantomics> The main APL compiler is called Apex: http://www.snakeisland.com/apexup.htm
<phantomics> It's been around since the 80s
<moon-child> ooh, that's a new one I didn't know about
CrashTestDummy3 has quit [Ping timeout: 265 seconds]
<phantomics> To me the main similiarities between the languages are their simple syntax and how they model arrays and functions. Working on them "feels" similar, even if the appearance of the code is very different. Especially because both are designed around a REPL.
ilshad has joined #commonlisp
x88x88x has quit [Ping timeout: 265 seconds]
jeosol has joined #commonlisp
lucerne has joined #commonlisp
ChanServ has quit [shutting down]
bilegeek has quit [Quit: Leaving]
x88x88x has joined #commonlisp
ilshad has quit [Ping timeout: 268 seconds]
taiju has quit [Remote host closed the connection]
ChanServ has joined #commonlisp
kakuhen_ has quit [Quit: Leaving...]
Lycurgus has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has quit [Changing host]
kakuhen has joined #commonlisp
ad_absurdum has quit [Quit: Leaving]
Oladon has quit [Quit: Leaving.]
cjb has quit []
dsk has joined #commonlisp
rgherdt has joined #commonlisp
x88x88x has quit [Ping timeout: 258 seconds]
IAmRasputin has joined #commonlisp
IAmRasputin has quit [Ping timeout: 265 seconds]
derwolf has joined #commonlisp
Cymew has joined #commonlisp
unyu has quit [Quit: WeeChat 3.2]
ilshad has joined #commonlisp
leeb_ has joined #commonlisp
lucerne has quit [Remote host closed the connection]
leeb has quit [Ping timeout: 258 seconds]
unyu has joined #commonlisp
unyu has quit [Client Quit]
<gigo> Why should we use with-standard-io-syntax when not using it also works fine. Code I wrote to test it out: https://plaster.tymoon.eu/view/2506
<mfiano> Consider the case when the user sets the default float read format
<kakuhen> bootstrapping ccl has got to be one of the most tedious things i've done lately
<phoe> kakuhen: which version did you download as the bootstrapper?
<kakuhen> my current working copy of 1.12
<phoe> gigo: (setf *print-length* 3) and then try writing the DB
<phoe> (and also say goodbye to all sequences longer than 3)
<kakuhen> phoe: i am trying to bootstrap 1.12.1 and I kept running into a bunch of mysterious compiler errors; so far i have managed to produce the 1.12.1 kernel and some bootstrapping binary from my existing ccl installation
<kakuhen> somehow (ccl:compile-ccl) immediately gave me some error about x8664arg something, but (ccl:compile-ccl t) went smoothly
<phoe> kakuhen: huh
<phoe> which platform are you on?
<kakuhen> freebsd/amd64
<kakuhen> latest release is 1.12 for it, and i am attempting to get 1.12.1 on it
<kakuhen> what i've done so far is merge my /usr/local/lib/ccl with the ccl-1.12.1 folders, but obviously not overwrite any overlapping files
<kakuhen> then i compiled the ccl kernel, and gave it my existing 1.12 heap image
<phoe> oh wait, does this work?
<kakuhen> no idea; this is my first time ever bootstrapping ccl lol
<phoe> mixing a heap image from 1.12 with a kernel from 1.12.1
<phoe> it might fail in mysterious ways
<kakuhen> well the ccl guys dont provide any heap image for freebsd
<phoe> the general procedure of bootstrapping CCL is, you use the existing CCL to build a new minimal heap image, and you compile the C kernel
<kakuhen> I tried running their little getbinaries script and using that heap image
<kakuhen> but ccl would immediately segfault
<phoe> the getbinaries script is ancient and should not be used
<kakuhen> i see
<phoe> I see that https://github.com/Clozure/ccl/releases has 1.12 for freebsd
<kakuhen> right, but no 1.12.1
<kakuhen> Anyway, I ran the 1.12.1 kernel with the 1.12 heap image, and then I ran (ccl:xload-level-0), which compiled all the newer lisp files without error and produced a bootstrapping image
<phoe> yes
<gigo> mfiano: phoe: So if I don't change the default IO settings, then not using (with-standard-io-syntax ...) would be okay?
<kakuhen> phoe: im assuming i should be using this bootstrapping image when I invoke (ccl:compile-ccl) and not my 1.12 heap image
<phoe> gigo: yes, but you can't tell anyone to not change the default settings
<phoe> kakuhen: I actually am not sure
<phoe> I think the bootstrapping image only contains enough facilities to be able to load FASLs
<gigo> phoe: makes sense. thanks. so I should keep the (with-standard-io-syntax ...) as a best practice.
<phoe> which contain the compiler and everything else
<phoe> gigo: yes
<kakuhen> anyway I am following the instruction given in their manual
CrashTestDummy3 has joined #commonlisp
<kakuhen> running (ccl:compile-ccl) gives me "Error: Unbound variable: $NUMX8664ARGREGS signaled during assembly-time evaluation of form (* $NUMX8664ARGREGS X8664::NODE-SIZE)" when its trying to compile x86-clos.lisp
<mfiano> gigo: if your code has (float x 1.0) and isn't wrapped in with-standard-io-syntax, the user could change that by dynamically binding the float read format around a call to your function
<phoe> kakuhen: there is some bootstrapping instructions on the releases page
<kakuhen> But what I find confusing is that running (ccl:compile-ccl t) gives zero errors whatsoever.
<phoe> kakuhen: ouch
<mfiano> This is why I specifically use 1f0 or 1d0 as appropriate
<kakuhen> i have all my fasls now
<kakuhen> and I'll see what happens soon
<phoe> most weird and deserving an issue on github
CrashTestDummy2 has quit [Ping timeout: 268 seconds]
<kakuhen> phoe: OK turns out my cursed method of merging folders worked and produced me a 1.12.1 binary
<kakuhen> you were right about the bootloader only being able to load fasls and do basic functions
<kakuhen> but I have a 1.12.1 binary now
<phoe> whew, at least that I still remember
<phoe> kakuhen: perfect
<kakuhen> s/bootloader/bootstrap image
<phoe> please make github issues for the compiling problems
<kakuhen> Yeah I will
<kakuhen> The manual makes me believe that calling "(ccl:compile-ccl)" should recompile updated lisp sources and generate fasls for them
<kakuhen> yet it has this strange error for x86-clos.lisp, unless you force compile EVERYTHING
silasfox has joined #commonlisp
<gigo> mfiano: Can you give an example of *read-default-float-format* that can make the writing and reading incompatible (provided I don't use with-standard-io-syntax)?
<mfiano> Sure
<phoe> gigo: I think (setf *print-length* 3) is a simpler example - you simply cannot read back lists that have been truncated like this, no need to play around with float formats
<gigo> phoe: Yes, I tried (setf *print-length* 3) and it indeed breaks the reading. This helped. Want to try out an example with *read-default-float-format* too.
<phoe> then see mfiano's example
<mfiano> minor edits
jgkamat has quit [Ping timeout: 265 seconds]
<mfiano> the user can *dynamically* change how float literals are read
igemnace has quit [Ping timeout: 265 seconds]
Krystof has joined #commonlisp
<mfiano> Ah I guess that example is bad, since it isn't reading at runtime
<mfiano> Replace that junk with read-from-string or something. i'm falling asleep :)
<gigo> I will make something out of that example to convince example. Thanks for the example. I am first writing some examples to understand the difference between single-float and double-float.
CrashTestDummy2 has joined #commonlisp
<gigo> *convince myself
<gigo> *convince myself
CrashTestDummy3 has quit [Ping timeout: 258 seconds]
pve has joined #commonlisp
<phoe> gigo: double floats have more precision but cannot be immediate values on 64-bit platforms
<phoe> and also take twice as much memory as single floats
<kakuhen> phoe: I am unable to reproduce the problem I mentioned earlier :x
<kakuhen> But I still get an error on (ccl:compile-ccl) as opposed to (ccl:compile-ccl t)
<kakuhen> I get "Error: The function X86-MEMORY-OPERAND-EA is predefined in Clozure CL."
<phoe> weird, why does it try to overwrite its own intrinsics?
ceblan` has joined #commonlisp
<kakuhen> Unsure
<kakuhen> Here is a full log of everything I did to bootstrap v1.12.1 from v1.12 https://bsd.to/wXwJ
<kakuhen> Before running this, I uninstalled ccl and then reinstalled ccl (1.12) from freebsd ports
ceblan has quit [Ping timeout: 265 seconds]
ilshad has quit [Ping timeout: 268 seconds]
derwolf_ has joined #commonlisp
lucerne has joined #commonlisp
derwolf has quit [Ping timeout: 265 seconds]
igemnace has joined #commonlisp
jgkamat has joined #commonlisp
derwolf has joined #commonlisp
derwolf__ has joined #commonlisp
derwolf_ has quit [Ping timeout: 268 seconds]
derwolf has quit [Ping timeout: 265 seconds]
derwolf has joined #commonlisp
derwolf__ has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Quit: Exeunt]
lucerne has quit [Remote host closed the connection]
elf_fortrez has joined #commonlisp
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 244 seconds]
IAmRasputin has joined #commonlisp
IAmRasputin has quit [Ping timeout: 268 seconds]
rogersm has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
x88x88x has joined #commonlisp
domovod has joined #commonlisp
azimut has quit [Remote host closed the connection]
hendursa1 has quit [Remote host closed the connection]
ilshad has joined #commonlisp
azimut has joined #commonlisp
hendursa1 has joined #commonlisp
<gigo> mfiano: phoe: In our discussion a little while back I learnt that if I don't use (with-standard-io-syntax ...) while writing to a file, reading it may become impossible. Is there an example where if I don't use (with-standard-io-syntax ...) while reading, it may cause problem?
elf_fortrez has quit [Quit: Client closed]
<phoe> a heavily customized readtable, I guess
<phoe> something that has custom behavior for standard reader macros
elf_fortrez has joined #commonlisp
<susam> phoe: so not something straightforward a beginner like me can reproduce easily? that's fine. I will keep it in mind and try it out later when I have learnt more CL.
<susam> phoe: this discussion has been most interesting. Unfortunately I have not learnt reader macros yet.
<phoe> oh wait
<phoe> floats will have issues, too
<phoe> reading floats will be an issue if the defaul read formt has been modified
<susam> In fact, it never occurred to me earlier that with-standard-io-syntax was important while reading and writing files. I guess because I mostly write them out in a custom format that I have to parse. But yes, after the few examples cited earlier today in this channel I see why it is important.
<gigo> phoe: Thanks!
<gigo> phoe: What should I do with floats to cause an issue?
<phoe> mismatch the format between writing and reading them, in general
tfb has joined #commonlisp
<gigo> phoe: https://plaster.tymoon.eu/view/2507#2507 - this works fine. what kind of mismatch should I make?
selwyn has joined #commonlisp
<phoe> (let* ((string (prin1-to-string 1.0f0)) (*read-default-float-format* 'double-float)) (read-from-string string))
elf_fortrez has quit [Quit: Client closed]
<phoe> this produces a double-float
eta has joined #commonlisp
d4ryus has quit [Quit: WeeChat 3.1]
<gigo> phoe: thanks!
kevingal has joined #commonlisp
<phoe> gigo: whence the many questions about this topic? just curious
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Alfr has joined #commonlisp
selwyn_ has joined #commonlisp
ilshad has quit [Ping timeout: 250 seconds]
d4ryus has joined #commonlisp
selwyn has quit [Ping timeout: 252 seconds]
ilshad has joined #commonlisp
ilshad has quit [Remote host closed the connection]
derwolf_ has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<gigo> phoe: learning CL and I had a nagging feeling since yesterday that I don't fully understand the need for with-standard-io-syntax. but now I do after reading the examples you gave. thanks!
derwolf has quit [Ping timeout: 268 seconds]
derwolf has joined #commonlisp
<beach> gigo: Remind us what project you are working on.
<susam> gigo: Where are you learning CL from?
<kakuhen> How many people actually read documentation slots in CLOS, let alone know how to access them?
<gigo> beach: no project. just learning out of curiosity
<beach> Got it.
<beach> kakuhen: What is a "documentation slot"?
derwolf_ has quit [Ping timeout: 252 seconds]
CrashTestDummy2 has quit [Ping timeout: 258 seconds]
CrashTestDummy has joined #commonlisp
derwolf_ has joined #commonlisp
<beach> kakuhen: Do you mean "slot documentation" maybe, i.e. documentation for a slot?
<susam> gigo: Okay. I have been writing my personal tools in Common Lisp for the past few years but I am still learning something new from your questions.
<kakuhen> beach: as in the documentation on a generic function
<kakuhen> (defgeneric ... :documentation "Nobody reads this lol")
derwolf__ has joined #commonlisp
<kakuhen> modulo some parens
<beach> kakuhen: The same people who read documentation for other functions, I presume.
<phoe> huh?
<phoe> (describe #'foo) shows this
<phoe> and I use that often
<kakuhen> it does?
<kakuhen> ive been going about it the wrong then x.x
<beach> Also (documentation 'foo 'function)
<kakuhen> if you open up these functions in slime/sly inspector then it's annoying to access
<phoe> on SBCL, yes
<kakuhen> and you also find funny things, like documentation slot FOR the documentation slot
derwolf has quit [Ping timeout: 250 seconds]
derwolf___ has joined #commonlisp
<susam> gigo: We had a PCL reading group sometime back where I used to take notes from the book and archive it for our group. I remember reading about with-standard-io-syntax but did not investigate it like you did, i.e., making test cases where not having it would lead to failure. I am planning to include these test cases given by phoe to our notes.
<beach> kakuhen: What is a "documentation slot"?
<beach> kakuhen: I think there is no such thing.
OlCe has quit [Remote host closed the connection]
<beach> kakuhen: Documentation for a slot is somewhat of an aberration, since slots are implementation details and do not merit any external client documentation, which is what documentation strings are for.
derwolf_ has quit [Ping timeout: 265 seconds]
<tfb> beach: It's not the language's job to decide that
<kakuhen> beach: I guess I am abusing terminology to denote what I said earlier then
<kakuhen> i.e. documentation for a generic function
derwolf__ has quit [Ping timeout: 252 seconds]
CrashTestDummy2 has joined #commonlisp
<beach> tfb: I was answering the question of who reads and writes such documentation, not whether it belongs in the language or not.
derwolf has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 250 seconds]
<tfb> beach: I think the statement that 'documentation strings are for external client documentation' is simply wrong: documentation strings are for whatever they are used for
derwolf___ has quit [Ping timeout: 250 seconds]
<tfb> It annoys me that deftrcuct does not allow them.
<tfb> *defstruct
<edgar-rft> tfb: there's (documentation (x structure-class) (doc-type (eql 'type))) -> http://www.lispworks.com/documentation/HyperSpec/Body/f_docume.htm
<tfb> edgar-rft: I mean documentation for the slot (field, whatever)
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
samebchase has quit [Ping timeout: 272 seconds]
OlCe has joined #commonlisp
samebchase has joined #commonlisp
random-nick has joined #commonlisp
Guest63 has joined #commonlisp
tfb has quit [Quit: died]
taiju has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
waleee has joined #commonlisp
tyson2 has joined #commonlisp
<Guest63> accessor functions for CLOS objects
<Guest63> can we re-use their names for multiple classes (e.g. two classes can have the same accessor name)?
<phoe> all objects are CLOS objects
<Guest63> i.e. is it built via defgeneric/defmethod
<phoe> if you mean those generated by DEFCLASS though - yes
<Guest63> yes
<Guest63> cool thanks
pranavats has left #commonlisp [Error from remote client]
IAmRasputin has joined #commonlisp
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
derelict_ is now known as derelict
IAmRasputin has quit [Ping timeout: 252 seconds]
Noisytoot has joined #commonlisp
jackdaniel has left #commonlisp [#commonlisp]
gigo has left #commonlisp [#commonlisp]
Quasus has joined #commonlisp
x88x88x has quit [Ping timeout: 250 seconds]
x88x88x has joined #commonlisp
<sm2n> yes because accessors are generic functions
susam has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
pranavats has joined #commonlisp
coat has joined #commonlisp
<coat> hello!
<phoe> hellooo
<coat> hello phoe
<coat> any bot in this channel to help with faq? like entry-level tutorials?
<phoe> I think the cookbook has a page for that
derwolf_ has joined #commonlisp
<phoe> oh wait, https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ is still a better resource
<phoe> coat: yes
derwolf__ has joined #commonlisp
derwolf has quit [Ping timeout: 252 seconds]
<coat> practical common lisp is freely available online so I will start with that one. will buy gentle intro to symbolic computation after I have worked thru practical common lisp
<phoe> an older edition of gentle is also available online
derwolf_ has quit [Ping timeout: 252 seconds]
<phoe> have you programmed before? if yes, maybe you won't need gentle
susam has joined #commonlisp
derwolf has joined #commonlisp
<coat> phoe: yes. I have programmed in c, java, python before
<Guest63> sm2n: thank you, that's what I thought
derwolf_ has joined #commonlisp
<phoe> coat: you should be good with just PCL then
<Guest63> coat: I would recommend ANSI Common Lisp over PCL
<coat> Guest63: why ansi cl over pcl?
<Guest63> somebody made it available recently https://github.com/lisp-books/lisp-books
<Guest63> coat: it's a bit easier to read IMO (but others like PCL, so this is just an opinion), PCL may be useful as a second book
derwolf__ has quit [Ping timeout: 265 seconds]
<Guest63> the author of ansi cl btw is the founder of ycombinator, and now a multi billionaire - never knew writing books was so lucrative!
derwolf has quit [Ping timeout: 258 seconds]
<Guest63> also a gentle introduction to symbolic computing is available for free online (i note you said "buy"):
prxq has joined #commonlisp
<Guest63> imo its a good read but too long winded. I find it good to read another book first to get some basics in your head - THEN read AGITC - THEN go back to your original book and everything will click better
<Guest63> but as a first read, it might be too slow and detract readers (its gentle pace is really helpful in explaining concepts, but IMO you don't realise why those concepts are important and need explaining until you get a bit of experience and then start asking the questions yourself)
clintm has joined #commonlisp
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #commonlisp
djuber` has quit [Read error: Connection reset by peer]
Bike has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
coat has left #commonlisp [leaving]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
Guest63 has quit [Ping timeout: 250 seconds]
amb007 has quit [Ping timeout: 252 seconds]
susam has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
amb007 has joined #commonlisp
<tyson2> I find the practical examples in PCL are more interesting to read, then I go back and check out the topics I don't understand (have been using scheme and elisp for a while)
Guest63 has joined #commonlisp
coat has joined #commonlisp
domovod has quit [Quit: WeeChat 3.1]
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
susam has joined #commonlisp
dim has quit [Remote host closed the connection]
<jcowan> On internal DEFPARAMETER, you can get very strange-looking things to happen: considere (progn (let ((gong 42)) (defparameter gong 50) gong) gong), where gong apparently escapes from the let-binding.
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
IAmRasputin has joined #commonlisp
knusbaum has joined #commonlisp
knusbaum has quit [Read error: Connection reset by peer]
knusbaum has joined #commonlisp
silasfox has quit [Ping timeout: 264 seconds]
<Guest63> looks ok to me
knusbaum has quit [Quit: Leaving...]
<phoe> hey wait a second
amb007 has quit [Ping timeout: 258 seconds]
<phoe> how does that work
amb007 has joined #commonlisp
<edgar-rft> the more interesting thing is that when I evaluate (let ((gong 42)) (defparameter gong 50) gong) for the first time, when no special var gong exists, it returns 42, while from the second time on it returns 50
<phoe> no, the second time it is expected
derwolf has joined #commonlisp
<phoe> because after the first time the variable has been proclaimed dynamic
<_death> phoe: if you expected a warning, it's not there because the form got interpeted..
<phoe> _death: I did not expect a warning
<phoe> ...oh wait a second
<phoe> I fully understand how this works now
<phoe> s/dynamic/special/
<edgar-rft> but shouldn't gong be declared special already after (defparameter gong 50) in the first evaluation, I mean the return value, not in the let binding
derwolf_ has quit [Ping timeout: 252 seconds]
<phoe> edgar-rft: the proclamation happens after the compiler infers that GONG refers to a lexical variable
waleee has quit [Ping timeout: 250 seconds]
<phoe> so GONG returns the lexical, non-dynamic variable
derwolf_ has joined #commonlisp
<phoe> the second time this code is compiled, the compiler knows that GONG is globally special
<Guest63> yep
<phoe> the confusion happens because there are actually two variables in play here: a lexical one named GONG and a dynamic one named GONG
<edgar-rft> but in (let ((gong 42)) (declare (special gong)) (defparameter gong 50) gong) the declaration also happens *after* the let binding and it returns 50 at the first try
derwolf__ has joined #commonlisp
<_death> edgar-rft: but then it's the same (dynamic) variable
derwolf has quit [Ping timeout: 265 seconds]
<edgar-rft> so (declare ...) is considered at an earlier time than (defparameter ...) in the compiler?
derwolf_ has quit [Ping timeout: 265 seconds]
<phoe> there is no DECLARE there
<phoe> if anything, it is some sort of PROCLAIM around EVAL-WHEN
<phoe> uh, in the other order
<edgar-rft> phoe: I'm talking about (let ((gong 42)) (declare (special gong)) (defparameter gong 50) gong)
<_death> edgar-rft: the declare says gong is a special variable..
<phoe> oh!
<phoe> sorry, mixed uthings up
<phoe> in your example, GONG refers to the same special binding
<edgar-rft> I think I have to read the chapter about compilation once again :-)
<_death> edgar-rft: the defparameter form is not a top-level form, so the compiler may not recognize it
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<edgar-rft> _death: that was what I was suspecting, too
<_death> there is an issue linked in the clhs
<edgar-rft> but I have to read the spec to make sure I understand what I am talking about :-)
silasfox has joined #commonlisp
<Guest63> "Constructs that use lexical scope effectively generate a new name for each established entity on each execution. Therefore dynamic shadowing cannot occur (though lexical shadowing may). This is of particular importance when dynamic extent is involved."
<_death> there was discussion about top-level bindings yesterday.. recently I looked at the chinual (for a reddit comment) and also noticed there was a LET-GLOBALLY operator
<_death> which may be similar to what people nowadays call LETF.. but maybe had some difference with regards to this specific case
Quasus has quit [Ping timeout: 265 seconds]
<scymtym> we worked a little bit on the process for creating WSCL (which beach mentioned above). in case anyone wants propose a clarification regarding non-toplevel DEF{VAR,PARAMETER}, a pull-request that fleshes out https://github.com/s-expressionists/wscl/blob/main/wscl-issues/proposed/DEFPARAMETER-NON-TOPLEVEL-SEMANTICS would be welcome
<_death> it has a defparameter form of length 2?
Lycurgus has joined #commonlisp
<scymtym> _death: yes that's wrong. the file is meant as a starting point which illustrates the format. to be honest, i didn't follow the discussion closely since i'm focusing on the infrastructure. it's just that having such as discussion without writing down any insights seems like a waste
<IAmRasputin> q
<IAmRasputin> wait, this isn't vim
derwolf__ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Jach has left #commonlisp [#commonlisp]
<_death> scymtym: well, I'd expect the first form to return (3 1) .. don't see how it could return (2 2) since there's no lexical binding there
Guest63 has quit [Ping timeout: 265 seconds]
<_death> (the first case)
<Bike> i could imagine (2 3), if defparameter only modifies the global binding
jackdaniel has joined #commonlisp
<scymtym> i think i wanted to write (2 3) but i rushed it a lot to have an example ready. the point is, why not write down different possible behaviors and the respective pros and cons as well as the behavior of existing implementations
<Bike> yeah, it makes sense.
Cymew has quit [Ping timeout: 258 seconds]
selwyn_ has quit [Read error: Connection reset by peer]
Lycurgus has quit [Quit: Exeunt]
gabc has joined #commonlisp
eddof13 has joined #commonlisp
tfb has joined #commonlisp
cage has joined #commonlisp
silasfox has quit [Ping timeout: 252 seconds]
srhm has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
silasfox has joined #commonlisp
amb007 has joined #commonlisp
<_death> I don't think I ever used non-toplevel defparameter/defvar.. are there any known uses in the wild
<jackdaniel> _death: LETF (at least in mcclim codebase) is a "let for places" - that of course breaks for multi-processing code, but it is ~ (let ,remember-old-vals (unwind-protect (progn (setf ,@store-new-vals) ,@body) ,@restore-old-vals)
elf_fortrez has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
<jackdaniel> i.e (letf (((slot-value foo 'a) 42))) …)
amb007 has joined #commonlisp
<_death> jackdaniel: right.. unlike letf, it was unaware of places.. but it did set variables.. re-reading its description, I guess it had more to do with stack groups
<jackdaniel> funny break scenario for climi::letf is trying to bind the unbound slot (something that could be worked around if really necessary)
amb007 has quit [Read error: Connection reset by peer]
<_death> jackdaniel: what about unbound variables?
<jackdaniel> let me see, probably same
<jackdaniel> yeah, unbound variable condition
amb007 has joined #commonlisp
<_death> there are other funny facts with LML.. e.g., it had defvar but its defparameter-like was called defconst.. the case-like operator used to be called selectq (the q meant the keys were not evaluated) and there was an evaluating case called select (and also selector, which let the programmer specify the comparison function).. sometimes it looks like CL has simplified operators that were gnarly in LML
<_death> (it also had a caseq operator, which was similar to selectq)
Guest63 has joined #commonlisp
<_death> well, an alias, but it existed for "maclisp compatibility", though it was different from maclisp's :)
x88x88x has quit [Quit: x88x88x]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
<jmercouris> Anyone know of something like setf if not nil ?
<jmercouris> Maybe in Alexandria or something
<Bike> you mean you want to do, like, (when place (setf place value))?
<jmercouris> (When value ...)
<jmercouris> (when value (setf place value))
<Bike> don't think i've seen that before, and i don't think it's in alexandria
amb007 has quit [Ping timeout: 252 seconds]
<jmercouris> Hm
<jmercouris> Seems like a common one
<jmercouris> Well, the example you gave, and the one I gave
elf_fortrez has quit [Quit: Client closed]
amb007 has joined #commonlisp
<Bike> i'd just write it yourself and if it turns out to be in a utility library all the better
<Bike> it's a simple definition
<_death> (orf foo 42) ?
<_death> oh, but jmercouris meant something else
<_death> reverse-orf :)
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
robin has quit [Ping timeout: 240 seconds]
amb007 has quit [Ping timeout: 258 seconds]
<jackdaniel> (defun wow (ding dong) (or dong ding)) (define-modify-macro wowf (value) wow)
amb007 has joined #commonlisp
<jackdaniel> otoh doing it that way may invoke unnecessary protocols (because it always modifies the place) - the same problem would apply to reverse-orf I think
<_death> right
<_death> a reverse-orf thing (there must be some proper word to describe the operation :) could also avoid evaluating parts of the place if the value is nil
<jackdaniel> ((orf :from-end t) ha ha ha)
* jackdaniel is sold, moving to scheme
<_death> but such an operator may be too surprising (evaluation-wise) to be worth it
amb007 has quit [Ping timeout: 252 seconds]
<_death> maybe less surprising if the order of evaluations is reversed, like in PUSH.. (stamp value place)
Guest49 has joined #commonlisp
amb007 has joined #commonlisp
<_death> *order of arguments
varjag has joined #commonlisp
Guest63 has quit [Quit: Connection closed]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
selwyn has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
silasfox has quit [Ping timeout: 244 seconds]
elf_fortrez has joined #commonlisp
Guest49 has quit [Quit: Client closed]
waleee has joined #commonlisp
rogersm has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
silasfox has joined #commonlisp
rogersm has quit [Quit: Leaving...]
Duuqnd has joined #commonlisp
selwyn has joined #commonlisp
unyu has joined #commonlisp
elf_fortrez has quit [Ping timeout: 246 seconds]
srhm has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 265 seconds]
srhm has joined #commonlisp
amb007 has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
Noisytoot has quit [Ping timeout: 252 seconds]
Quasus_ has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
Noisytoot has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
Fade has joined #commonlisp
<Fade> o/
amb007 has joined #commonlisp
raeda has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Quasus_ is now known as Quasus
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
dsk has quit [Ping timeout: 264 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Alfr has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
derelict has quit [Ping timeout: 258 seconds]
shka has quit [Ping timeout: 258 seconds]
tyson2 has quit [Ping timeout: 252 seconds]
silasfox has quit [Quit: WeeChat 3.2]
aleamb has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
killsushi has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pve has quit [Quit: leaving]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
tyson2 has joined #commonlisp
akoana has joined #commonlisp
srhm has quit [Quit: Konversation terminated!]
srhm has joined #commonlisp
derelict has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
sabra has joined #commonlisp
amb007 has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has quit [Changing host]
bilegeek has joined #commonlisp
IAmRasputin has quit [Ping timeout: 252 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
tfeb has joined #commonlisp
IAmRasputin has joined #commonlisp
tfeb has quit [Client Quit]
IAmRasputin has quit [Ping timeout: 265 seconds]
leo_song_ has joined #commonlisp
leo_song has quit [Ping timeout: 265 seconds]
rgherdt has quit [Ping timeout: 244 seconds]
<jmercouris> anyone know of any attempts to create a 'visual' programming interface for lisp?
<jmercouris> of course it would be a new language, but borrowing as many concepts from lisp as possible
<jmercouris> I'm imagining for example, someone has a defun block they can drop in
<jmercouris> and then they can nest in other operations in that defun block
<jmercouris> and instead of parens, things would just be indentation levels
<moon-child> fructure
<jmercouris> interesting
<jmercouris> I got some pretty awful images from the search engine assuming I meant fracture
<jmercouris> I see it
<jmercouris> yeah, this is pretty close to what I was imagining
<jmercouris> I want a really simple interface for users to make little subroutines
<jmercouris> without having to learn lisp
<jmercouris> this looks really intense, I think I could tone it down and provide some of the same concepts more approachable for beginners
<jmercouris> thanks for the link moon-child
Alfr has joined #commonlisp
Alfr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
sjl has quit [Quit: WeeChat 2.2-dev]
unyu has quit [Ping timeout: 265 seconds]
sjl has joined #commonlisp
unyu has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
frgo_ has quit [Remote host closed the connection]
frgo has joined #commonlisp
tfeb has joined #commonlisp
tfeb has quit [Client Quit]
Duuqnd has quit [Remote host closed the connection]
luis` has joined #commonlisp
<zephyr> jmercouris blockly is a related thing, web based but possibly informative
<hendursaga> jmercouris: blockly is pretty good, although you'd want to wrap it some, it's pretty old JS
Oladon has joined #commonlisp
<luis> There's one such library where you can switch between text and blocks seamlessly. I forget its name
taiju has quit [Ping timeout: 268 seconds]
taiju has joined #commonlisp
Alfr has quit [Killed (copper.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
cjb has joined #commonlisp
killsushi has quit [Read error: Connection reset by peer]
killsushi has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
kevingal has quit [Remote host closed the connection]
Quasus has quit [Ping timeout: 265 seconds]
<phantomics> Hey jmercouris, my Seed project kind of fits that bill
<phantomics> It's been on hold awaiting a rebuild of the interface generation system
aleamb has quit [Quit: bye]
random-nick has quit [Ping timeout: 250 seconds]
terpri has joined #commonlisp