p_l 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/> | ASDF 3.3.4
nopolitica has joined #lisp
markoong has quit [Ping timeout: 256 seconds]
nopolitica has quit [Quit: WeeChat 2.6]
<|3b|> ok, possibly figured out the docker stuff enough to send a pr https://github.com/icfpcontest2020/dockerfiles/pull/44 :)
<|3b|> let me know if anyone sees anything obviously wrong, or suggestions for other C/CL libs worth including by default (went ahead and added some common ones to reduce build time, but people can overwrite parts of the ql dir with one in their submission for full control)
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
sjl has quit [Ping timeout: 272 seconds]
EvW has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
bitmapper has quit [Ping timeout: 256 seconds]
PuercoPop has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
mindCrime has quit [Quit: Konversation terminated!]
gjulio__ has joined #lisp
terpri_ has joined #lisp
terpri has quit [Ping timeout: 260 seconds]
cranes has joined #lisp
freshpassport has joined #lisp
lansiir has quit [Ping timeout: 256 seconds]
oldtopman has joined #lisp
karlosz has quit [Quit: karlosz]
Bike has quit [Quit: leaving]
Oladon has joined #lisp
edgar-rft has joined #lisp
ahungry has joined #lisp
ckonstanski has joined #lisp
catern has quit [Excess Flood]
catern has joined #lisp
jesse1010 has quit [Ping timeout: 256 seconds]
dyelar has quit [Quit: Leaving.]
dominic34 has joined #lisp
<Oladon> I find myself needing to write a new combination Markdown (probably Commonmark?) + BBCode parser. What's the best approach, architecture/organization-wise, to ensure maximum utility for others while still attaining my aim of a combination parser?
<beach> Good morning everyone!
<Oladon> Morning, beach!
karlosz has joined #lisp
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
akoana has quit [Quit: leaving]
orivej has quit [Ping timeout: 272 seconds]
orivej_ has joined #lisp
madage has quit [Ping timeout: 240 seconds]
madage has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
orivej_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
JohnTalent has quit [Ping timeout: 246 seconds]
dominic34 has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 272 seconds]
<gjulio__> morning beach
<gjulio__> Hey is anyone willing to share a snippet of a .gitattributes file for handling control-m line endings in a *.lisp file? I've been trying a million tactics and I can't seem to resolve the problem.
ebrasca has joined #lisp
cyberbanjo_ has joined #lisp
gravicappa has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<beach> gjulio__: I suspect few people here have that problem.
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
<gjulio__> i solved it. added *.lisp text eol=crlf to .gitattributes. then added (add-hook 'before-save-hook 'delete-trailing-whitespace) to .emacs and then created new files, moved my lisp file to the new file, added the new file to my git repo, and now it's working. it seems like the *.lisp text eol=crlf stuff isn't retroactive. maybe i'm wrong?
bhartrihari has joined #lisp
<fe[nl]ix> I conform it's not retroactive
<fe[nl]ix> are you using Windows ?
<gjulio__> linux
<fe[nl]ix> then what do you need that for ?
<gjulio__> what do i need what for?
dvdmuckle has quit [Quit: Bouncer Surgery]
<beach> Why do you have CR characters in your files?
<gjulio__> not sure. i did edit parts of the file on a different computer that was windows, maybe it's from that?
dvdmuckle has joined #lisp
<beach> Very likely.
Oladon has quit [Quit: Leaving.]
narimiran has joined #lisp
ebrasca has quit [Remote host closed the connection]
froggey has quit [Ping timeout: 260 seconds]
shangul has joined #lisp
froggey has joined #lisp
Oladon has joined #lisp
bocaneri has joined #lisp
Oladon has quit [Client Quit]
shangul has quit [Remote host closed the connection]
shangul has joined #lisp
<fe[nl]ix> gjulio__: convert all CRLF line endings to LF and configure your Windows editors to use LF as well
<gjulio__> thanks. i'm usually using linux, but i'll keep that in mind if i need to switch back.
JohnMS_WORK has joined #lisp
shka_ has joined #lisp
shka_ has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
shka_ has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
polaris has joined #lisp
shka_ has quit [Client Quit]
easye has quit [Quit: rebooting]
easye has joined #lisp
PuercoPop has quit [Quit: WeeChat 1.9.1]
shka_ has joined #lisp
rgherdt has joined #lisp
bsd4me has quit [Quit: Leaving]
kleptoflora has joined #lisp
anatrope has quit [Ping timeout: 264 seconds]
refpga has joined #lisp
rogersm has joined #lisp
freshpassport has quit [Quit: Textual IRC Client: www.textualapp.com]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
ahungry has quit [Remote host closed the connection]
refpga has quit [Ping timeout: 260 seconds]
pve has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
refpga has joined #lisp
bhartrihari has joined #lisp
gjulio__ has quit [Ping timeout: 256 seconds]
easye has quit [Quit: ERC (IRC client for Emacs 27.0.91)]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
easye has joined #lisp
bhartrihari has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
polaris has quit [Remote host closed the connection]
ljavorsk has joined #lisp
ljavorsk has quit [Remote host closed the connection]
ljavorsk has joined #lisp
Cymew has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
orivej has joined #lisp
cosimone has joined #lisp
gigetoo has quit [Read error: Connection reset by peer]
gigetoo has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
tich has joined #lisp
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
ayuce has joined #lisp
fanta1 has joined #lisp
toorevitimirp has quit [Ping timeout: 256 seconds]
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
refpga has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 272 seconds]
gaqwas has quit [Remote host closed the connection]
bhartrihari has joined #lisp
karlosz has quit [Quit: karlosz]
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
jonatack has quit [Quit: jonatack]
scymtym has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
TMA has quit [Ping timeout: 256 seconds]
rogersm has quit [Ping timeout: 244 seconds]
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
rogersm has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
msk has joined #lisp
knuckles has quit [Ping timeout: 272 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
shangul has quit [Ping timeout: 272 seconds]
TMA has joined #lisp
knuckles has joined #lisp
shangul has joined #lisp
jeosol has joined #lisp
clintm has joined #lisp
<clintm> Xach: in case it hasn't been reported, xach.com/clhs is broken. :(
anatrope has joined #lisp
kleptoflora has quit [Ping timeout: 272 seconds]
jesse1010 has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
random-nick has joined #lisp
jonatack has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
jonatack has quit [Ping timeout: 256 seconds]
jonatack has joined #lisp
shangul has quit [Ping timeout: 246 seconds]
bhartrihari has joined #lisp
terpri has joined #lisp
terpri_ has quit [Ping timeout: 260 seconds]
shangul has joined #lisp
markoong has joined #lisp
<vegai> i
_whitelogger has joined #lisp
rgherdt has joined #lisp
cosimone has quit [Quit: Quit.]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Lycurgus has joined #lisp
nikkal has joined #lisp
shangul has quit [Ping timeout: 264 seconds]
stepnem has quit [Read error: Connection reset by peer]
stepnem has joined #lisp
fanta1 has quit [Quit: fanta1]
Lycurgus has quit [Remote host closed the connection]
JohnTalent has joined #lisp
JohnTalent has quit [Ping timeout: 246 seconds]
stepnem has quit [Ping timeout: 258 seconds]
<phoe> aeth: boop
<phoe> have you managed to upload your typechecked slots somewhere?
freshpassport has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
devrtz_ has quit [Quit: ZNC - http://znc.in]
devrtz has joined #lisp
knuckles has quit [Ping timeout: 272 seconds]
shangul has joined #lisp
jasom has joined #lisp
Bourne has joined #lisp
jmercouris has joined #lisp
kleptoflora has joined #lisp
anatrope has quit [Ping timeout: 264 seconds]
ljavorsk has quit [Ping timeout: 246 seconds]
knuckles has joined #lisp
mankaev has quit [Ping timeout: 272 seconds]
stepnem has joined #lisp
mankaev has joined #lisp
wsinatra has joined #lisp
knuckles has quit [Ping timeout: 272 seconds]
knuckles has joined #lisp
anatrope has joined #lisp
kleptoflora has quit [Ping timeout: 256 seconds]
ayuce has quit [Remote host closed the connection]
<Xach> clintm: yoinks
<Xach> ha
sjl has joined #lisp
kmeow has joined #lisp
jeosol has quit [Remote host closed the connection]
freshpassport has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> phoe: Not yet
<aeth> hopefully at some point this week
Bourne has quit [Ping timeout: 240 seconds]
jonatack has quit [Ping timeout: 256 seconds]
jmercouris has quit [Remote host closed the connection]
dominic34 has joined #lisp
pve has quit [Ping timeout: 272 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
dominic35 has joined #lisp
rogersm has quit [Quit: Leaving...]
dominic34 has quit [Ping timeout: 246 seconds]
dominic35 is now known as dominic34
jcowan has joined #lisp
pfdietz has joined #lisp
<jcowan> What are the most common use cases for the syntaxes #n= and #n#, as opposed to the data structures they represent? Is it genuinely common to serialize such things as S-exprssions?
<beach> I use it all the time.
<jackdaniel> jcowan: (if (foobar xxx) (some-obsucring-macro-boo #1=(actual-form)) #1#)
<beach> For example, if I have an application with some internal structured data, I use it as a format on disk.
<jcowan> beach: thanks. jackdaniel: I didn't mean in code, but that usage is new to me, so I'm glad to see it.
<beach> jcowan: Recently, the ASTs produced by the SICL compiler are saved like that, thereby producing FASL files .
<jackdaniel> heh
FreeBirdLjj has joined #lisp
<pfdietz> I usually just do that with flet.
davsebamse has quit [Ping timeout: 256 seconds]
<pfdietz> I usually just do that with flet.
<pfdietz> oops
<phoe> #1=I usually just do that with flet.
<phoe> #1#
<phoe> should have looked like that I guess
<jackdaniel> (flet ((do-it () "I usually just do that with flet")) (do-it) (do-it))
<pfdietz> Totally intentional! #save
<beach> jcowan: Here is an example. It is the AST for (defclass t () (:metaclass built-in-class)): http://metamodular.com/SICL/t-defclass.fasl.
<beach> As you can see the vector for the source code is shared as #2= for instance.
orivej has joined #lisp
pfdietz has quit [Remote host closed the connection]
<beach> http://metamodular.com/bach262.gsh is an example of a score saved from Gsharp.
<beach> As you can see, the staves are shared by many objects, like notes.
<beach> In both cases, I use the character `[' as a reader macro. It takes a name of a class and a bunch of initargs, just like the protocol dictates.
<phoe> but all that's just a fancy pretty-printed S-expression with *print-circle* being true
<phoe> very nice!
<beach> Thanks. Yes, very simple.
ayuce has joined #lisp
<phoe> I assume [ makes instances at read-time
<beach> Yes, [ is (apply #'make-instance (read-delimited-list....))
<beach> It creates a structure that is entirely isomorphic to the original one that was saved.
orivej has quit [Ping timeout: 256 seconds]
voidlily_ has joined #lisp
ayuce has quit [Remote host closed the connection]
voidlily has quit [Ping timeout: 256 seconds]
joels has joined #lisp
<beach> Notice that no slots are mentioned. Only protocol elements.
<phoe> you mean initargs, right?
<beach> And the class name, yes.
<phoe> how do you map concrete classes to protocol classes? I assume that GSHARP-BUFFER:BUFFER is a protocol class
<beach> It's a concrete class.
<phoe> oh! okay then, that solves one problem
X-Scale` has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
X-Scale has quit [Ping timeout: 246 seconds]
<_death> how does it deal with cyclic graphs?
<beach> With #n= and #n# which was the original question.
X-Scale` is now known as X-Scale
<_death> beach: these can't create forward references
<beach> ?
<beach> The first time an object is printed, it is printed normally, preceded by #n=.
<phoe> you don't need forward references
<_death> for example, (defstruct link parent child) the parent link has to refer to the child
<phoe> #1=[LINK :parent nil :child [LINK :parent #1# :child nil]]
<_death> you do need forward references for cyclic graphs.. this is the same issue that CL designers solved in make-load-form by having it return a creation form and an initialization form
<phoe> oh, like *that*
<phoe> clhs make-load-form
joels has quit [Ping timeout: 246 seconds]
Bike has joined #lisp
<phoe> I guess that this is because multiple MAKE-LOAD-FORMs do not necessarily depend on the slots of one another, whereas the above is just one big ball of cyclic references printed as a whole
<beach> _death: I am not sure I follow. Try '#1=(a .#1#) at the REPL.
<phoe> and also because the above utilizes the reader
<phoe> whereas MAKE-LOAD-FORM must return a Lisp form, which is already post-READ
<beach> _death: The reader patches the graph after it has been read.
pve has joined #lisp
<beach> So when it sees #1#, it sticks in some unique temporary object, and enters the correspondence in a table. Then when the entire expression (in this case a single CONS cell) has been read, the graph is traversed, and the temporary object is replaced by what was returned as #1=.
<beach> _death: Hello? Did you faint?
<aeth> jcowan: One use is when *print-circle*. A useless example: https://gitlab.com/snippets/1761668
<_death> I'm just thinking it through
<beach> Ah, OK.
<_death> I know about the reader syntax.. but as you say it needs to patch things
<beach> Absolutely.
<beach> And it does.
pfdietz has joined #lisp
<_death> so while the form looks like it supplies initargs, it's actually patching the slots?
<beach> I guess this feature (and its power) is little known, hence the question from jcowan. I think it is fantastic and, like I said, I use it all the time.
<phoe> not the slots I guess
<phoe> the lists that are being read
bsd4me has joined #lisp
<phoe> and once the list is fully read and patched, APPLY #'MAKE-INSTANCE is called on it
<phoe> that's how I understand it
<beach> _death: In my examples, if it sees :some-initarg #n#, it is replaced by :some-initarg <unique>
<beach> _death: Then, if it turns out that :some-initarg stores <unique> in a slot, then it is patched later.
<_death> I see
<phoe> and I assume that all of this patching is done by the reader on the lists, before any MAKE-INSTANCE is even called
<TMA> unless #n# is encountered before #n=, there is no need to patch if you can construct the object in some incomplete state (the state between allocate-instance and initialize-instance)
<beach> phoe: Why do you assume that?
<Bike> TMA: but the reader doesn't know how to do that.
bhartrihari has joined #lisp
<jackdaniel> had there been instances to be serialized, then the reader macro [ wouldn't make sense
<phoe> beach: you said, "[ is (apply #'make-instance (read-delimited-list....))"
<jackdaniel> and there is no need to define a method on make-load-form on simple objects, like 3 or :staff
<phoe> this means that READ-DELIMITED-LIST must finish operating before MAKE-INSTANCE is called
<beach> phoe: Yes, and the patching is done on the created instance.
kmeow has quit [Ping timeout: 260 seconds]
<beach> Oh, sure.
<beach> But no patching takes place then.
<phoe> which means that the reading (including the patching!) must be complete before MAKE-INSTANCE is called
<beach> Why do you make that conclusion?
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
EvW1 has joined #lisp
ebrasca has joined #lisp
<jcowan> beach: _death is correct, 2.4.8.16 explicitly forbids forward references with #n#, so no patching is necessary.
<Bike> reading a standard-object with circular references in it isn't much different from reading a vector with em
<phoe> because #1= must happen before #1# - if the reader stores the EQ references in some sort of read-time hash table, it can then directly look up the object and insert it there
<phoe> clhs 2.4.8.16
<beach> phoe: Suppose I have #1=[MY-CLASS :stuff #1#]
<phoe> oooh. that's no list.
<phoe> that's a standard object with an initarg.
<phoe> you can't have an instance before calling MAKE-INSTANCE so there is nothing to insert there.
<phoe> right, I see it now.
<beach> phoe: First (my-class :stuff #1#) is read, but since we don't know #1#, we replace it with <mumble> and then we call (make-instance 'my-class :stuff <mumble>)
<beach> phoe: Then the result of that creation is assigned to #1=.
<beach> Finally, we traverse the graph, find that some instance of my-class has <mumble> in it.
<beach> So we replace that occurrence with the intance.
<beach> instance.
<beach> phoe: Is that clear now?
FreeBirdLjj has quit [Remote host closed the connection]
<jcowan> I'm talking only about what has to happen at read time.
<beach> jcowan: That is precisely what we have been showing in detail.
<phoe> beach: yes, that's clear now. Thanks.
<jcowan> #1=[MY-CLASS :stuff #1#] is not readable.
<beach> Sure it is.
<beach> That's how I read it.
<beach> Like I said, [ is a reader macro that does (apply #'make-instance (read-delimited-list ...))
<_death> beach: but why use make-instance and not allocate-instance then?
ayuce has joined #lisp
<beach> Why would I do that?
<jcowan> Sorry, I missed that about [
FreeBirdLjj has joined #lisp
<_death> beach: well, what is <mumble>? if the slot has a :type integer it must be an integer or a special value indicated that the slot is unbound
<_death> *indicating
ayuce has quit [Read error: Connection reset by peer]
<beach> _death: I am sure that type checking is disabled during reading.
<beach> Or maybe it uses an instance of the type that the slot has, if it is a slot.
<beach> If the slot is unbound, then obviously it does not need patching.
<Bike> this same problem comes up with the #s reader, which is standard.
<_death> beach: ok.. an alternative design would be to use the two forms from make-load-form..
<beach> _death: An alternative design for what?
<_death> for the external format exemplified by the .gsh file
<beach> Why would I make life harder for myself? The reader can already do this.
<beach> I would have to traverse the graph myself then.
<beach> Now, I just do (PRINT ...)
<_death> but do you just READ?.. you said that the slots need patching afterwards
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<Bike> that's the standard ## macro stuff, beach doesn't have to write it
<beach> READ patches automatically.
<beach> _death: I just do (READ).
catern has quit [Excess Flood]
<_death> I guess because you defined the #\[ reader macro
catern has joined #lisp
<beach> That's so that I can print standard objects.
<_death> right.. in a readable way
<beach> Yes, it would be foolish to do otherwise. :)
nikkal has quit [Remote host closed the connection]
<beach> For each class, I also have to give pairs :initarg reader corresponding to the protocol that the class respects.
<_death> the analogue of make-load-form-saving-slots?
<beach> Probably not quite. There are no slots mentioned here.
<beach> I can have a class with a slot AGE but produce initargs :DATE-OF-BIRTH DATE-OF-BIRTH.
ayuce has joined #lisp
<_death> right, so you do that on the level of initargs
<beach> And, also, if I were to use make-load-form... I would have to LOAD the file, right?
<_death> yes, you'd need to evaluate the forms
<beach> That's very dangerous.
<_death> READing is also dangerous :)
<beach> Why?
<beach> I obviously disable #.
<phoe> _death: so is loading FASLs
<Bike> make-instance has arbitrary behavior, so it's going ot be dangerous
FreeBirdLjj has joined #lisp
<beach> _death: The initarg and the reader are part of the protocol and I want the saved file to create a graph using the protocol. That way, I can change the physical structure between save and load.
<_death> I guess READing is dangerous because you don't have that much control over the reader
<Bike> you don't have much control over the loader either. i don't understand the debate here
<Bike> you can easily get arbitrary code evaluated either way
<Bike> i mean there's no way to allocate an instance without calling allocate-instance, which can have whatever user methods
<beach> Bike: How would you do that with make-instance?
<beach> Bike: If I don't allow external code to be loaded, how do those method come into existence?
JohnTalent has joined #lisp
<Bike> well that sounds more like you can't execute arbitrary code either way
<_death> I mean dangerous in that it there are arbitrary limits you can't control when invoking the reader
<beach> Whatever. I think I am too tired for this.
<_death> for example the length and depth of lists, symbol names, magnitudes of numbers, etc.
<beach> Yeah, I should have used make-load-form instead. My bad. Sorry.
<_death> no
rgherdt has quit [Quit: Leaving]
<phoe> _death: I assume that the FASL files are trusted and don't contain hostile data
<beach> This kind of exchange makes me upset, so I'll quit now.
<phoe> such as a class name that is ten gigabytes long
FreeBirdLjj has quit [Remote host closed the connection]
joels has joined #lisp
<Bike> you're arguing about which of two standard mechanisms to use and both of thos emechanisms are chock full of hooks to do arbitrary things at arbitrary times, so you have to control what files are being loaded or something. both can deal with circular structures and custom object definitions.
<_death> beach: this is unrelated to the make-load-form remarks.. I'm just saying READ is "dangerous" too :).. I did not mean to say that the make-load-form design is better or anything, just tried to understand this format
<beach> I don't care anymore.
rgherdt has joined #lisp
FreeBirdLjj has joined #lisp
tich has quit [Remote host closed the connection]
theseb has joined #lisp
<theseb> What is easiest way to implement *global variables* in a common lisp like implementation I wrote?
FreeBirdLjj has quit [Ping timeout: 246 seconds]
<theseb> What I mean is....I want to set x in a function and then have value OUTSIDE the function be modified
<theseb> possible?
<theseb> e.g. x = 3 ; set x = 4 in f(x) ; print x outside of f and get 4
knuckles has quit [Ping timeout: 246 seconds]
<beach> theseb: Most existing Common Lisp implementations have a slot in the symbol.
<phoe> alternatively you can make some sort of global hashtable whose keys are symbols and whose values are variable values
<beach> theseb: Not that I know how your implementation works. I am just telling you what is usually done.
gjulio__ has joined #lisp
<beach> theseb: The advantage of the symbol slot is that the symbol becomes available to the program at read time, so it is just an indirection to set the value.
<beach> theseb: The hash table solution is slower, because you need, well, a hash-table access for each operation.
<theseb> phoe: if a global table sets variable x to equal variable y...what do you do next? i'm intrigued
<beach> theseb: Common Lisp doesn't work the way you may think.
JohnTalent has quit [Ping timeout: 256 seconds]
<beach> Assigning doesn't create a link between variables.
<beach> The value of one is accessed and then given to the other.
<beach> Just like any programming language.
rgherdt has quit [Remote host closed the connection]
<phoe> theseb: (defvar *x* 42) (defvar *y* *x*)
<phoe> *y* is 42
<theseb> phoe: yes
<phoe> don't know what you expect
<phoe> (setf *x* 24)
<phoe> *x* is 24, *y* is 42
<theseb> phoe: right
<phoe> same if you use a hash table
jcowan has quit [Remote host closed the connection]
<Bike> so what does your "I'm intrigued" comment mean.
<Bike> what is intriguing
<theseb> phoe: i understand all that but how will that help me modify *x* or *y* in a function f?
rgherdt has joined #lisp
<Bike> the function modifies the hash table.
<phoe> you grab the symbol itself and use it as a key to the hash table
<theseb> Bike: intriguing because slots sounded complicated but variable setting is something i can do and understand
<phoe> that's how you can modify the hash table
<Bike> i don't think any of these implementations of global variables is very complicated. neither is the sicl one
nikkal has joined #lisp
<Bike> it does get complicated when you start having local specials and thread locality, but for globals, whatever
nicktick has quit [Quit: Leaving.]
<beach> I am guessing that theseb doesn't know how to get the symbol into the executable code.
<phoe> just quote it
<beach> phoe: This is not Common Lisp.
<phoe> ...if your language has a quote
<theseb> Bike: to give you context.....the reason this came up is i'm implementing a print function by appending to a global variable called output
<theseb> i.e. when you "print" you store strings in a list called the output list
<beach> But then, it all depends on the implementation, and I suspect it is very different from the way Common Lisp and indeed other languages as well, are implemented.
<theseb> I was having trouble modifying this output list in some places
<theseb> errr i could modify it anywhere I wanted but the changes would disappear once I left a scope ;)
ArthurStrong has quit [Ping timeout: 240 seconds]
<Bike> i don't think the context matters. it's pretty simple. you have a persistent hash table and you modify that table
edgar-rft has quit [Quit: Leaving]
<Bike> i have no idea what your language targets or anything. maybe it's not image based. in that case you'd be really far off topic for this channel
<beach> theseb: Your questions are essentially about how to implement a programming language. That is really too general for #lisp. If you want to know how to implement Common Lisp, we can help you with that, but it is nearly impossible for us to debug a problem in your own implementation of a language that is not Common Lisp.
<beach> And a very special implementation too, it seems.
<theseb> my language is basically what SICP says
pfdietz has quit [Remote host closed the connection]
<phoe> then you could use the knowledge SICP provides about environments
<beach> theseb: Do you have READ?
<Bike> sicp probably uses alists. same principle.
<theseb> What do you think of this...I'm going to open source a project called "Program To Processor"....you start with a minimal Python variant called Snake and convert to AST...then convert the AST to a minimal intermediate Lisp code...then to a simple virtual processor...All the parts are written in python for easy reading
nicktick has joined #lisp
<theseb> So basically the entire stack and all code in all layers will be accessible and understandable in python
<Bike> i mean i like lisp better than python, which is why i'm in the lisp channel and not the python channel.
<theseb> so my little lisp thing is the executable intermediate code layer
nikkal has quit [Remote host closed the connection]
<theseb> I need to have it as simple as possible so students can grok whole thing
<beach> It sounds complicated already.
<theseb> Bike: i see part of this project as a way to introduce Lisp as well
<jackdaniel> python with all its arbitrary syntactic rules (and oh my god spaces) is not easy to read, at most it is easy to evangelise as easy to read :)
<Bike> you can teach in lisp. that's what sicp is, after all.
<theseb> Bike: "Oh wow that intermediate language is really cool and elegant!"
<theseb> "i want to learn more about this lisp thing"
<theseb> "Is is like a lean slimmed down python!"
Bike has left #lisp [#lisp]
narimiran has quit [Ping timeout: 272 seconds]
<jackdaniel> I think that this is as far from Common Lisp as one could get having parenthesis involved
<theseb> jackdaniel: ;)
FreeBirdLjj has joined #lisp
<joels> There's always value in spreading some lisp in areas where there is none
<jackdaniel> and by saying taht I meant that this is offtopic on this channel
<theseb> jackdaniel: i guess i'm becoming the black sheep of the channel
<beach> theseb: You are asking impossible questions, and you don't understand the recommendations, so it is very frustrating.
<theseb> beach: sorry i'm slow....i think i understand why a hashtable is the answer now....if you modify e.g. x=4 in a function those changes will disappear when you leave scope but if x = more complex object like a hash table then changes will survive when you leave scope....is that it?
<phoe> wait a second
<phoe> X is a global variable
<phoe> so it will never go out of scope
<phoe> so scopes are totally irrelevant
<beach> theseb: x is not a hash table. It is a symbol, and it is used as a key in a hash table.
dddddd has quit [Ping timeout: 258 seconds]
<beach> That's an example of what I was just saying.
<theseb> beach: oh you pass in the *key* to the function
<phoe> yes, that's what I said twenty minutes ago
<phoe> 17:13 < phoe> you grab the symbol itself and use it as a key to the hash table
<theseb> not sure why i'm so slow to "get" this stuff
<beach> x = 4 becomes (setf (gethash 'x *global-hash-table-containing-global-values*) 4)
<beach> theseb: My hypothesis is that it is time for you to read about compiler design as opposed to guessing how it might be done.
rogersm has joined #lisp
duuqnd has joined #lisp
<_death> beach: I wrote a bit of code and I think I understand what happens where/when better now.. e.g., https://plaster.tymoon.eu/view/1946#1946
<beach> Great!
gjulio__ has quit [Ping timeout: 272 seconds]
marusich has quit [Ping timeout: 244 seconds]
clintm` has joined #lisp
clintm has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
bitmapper has joined #lisp
jonatack has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
nikkal has joined #lisp
nikkal has quit [Remote host closed the connection]
nikkal has joined #lisp
nikkal has quit [Read error: Connection reset by peer]
nikkal has joined #lisp
knuckles has joined #lisp
nikkal has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 256 seconds]
terpri_ has joined #lisp
random-nick has joined #lisp
terpri has quit [Ping timeout: 260 seconds]
bhartrihari has left #lisp ["Disconnected: Broken pipe"]
_whitelogger has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
bhartrihari has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
rogersm has quit [Quit: Leaving...]
orivej has joined #lisp
terpri__ has joined #lisp
jw4 has quit [Ping timeout: 260 seconds]
jw4 has joined #lisp
terpri_ has quit [Ping timeout: 256 seconds]
JohnTalent has joined #lisp
rippa has joined #lisp
efm has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
brown121407 has joined #lisp
kalogik has quit [Ping timeout: 256 seconds]
narimiran has joined #lisp
Bike has joined #lisp
markong has joined #lisp
<|3b|> ok, CL(sbcl) should be supported for icfp programminng contest :) if anyone intends to participate with CL, might check https://github.com/icfpcontest2020/dockerfiles/tree/master/dockerfiles/commonlisp and (the pull request on) https://github.com/icfpcontest2020/starterkit-commonlisp for anything you think should be improved
markoong has quit [Ping timeout: 265 seconds]
ArthurStrong has joined #lisp
bhartrihari has joined #lisp
akoana has joined #lisp
efm has quit [Ping timeout: 260 seconds]
ArthurStrong has left #lisp [#lisp]
nitrosun has joined #lisp
nitrosun has left #lisp [#lisp]
JohnTalent has quit [Changing host]
JohnTalent has joined #lisp
hiroaki has joined #lisp
aaaaaa has joined #lisp
dddddd has joined #lisp
bocaneri has quit [Remote host closed the connection]
stepnem has quit [Read error: Connection reset by peer]
stepnem has joined #lisp
PuercoPop has joined #lisp
Christ0pher has joined #lisp
Christ0pher has quit [Ping timeout: 272 seconds]
JohnTalent has quit [Quit: leaving]
Christ0pher has joined #lisp
_paul0 has joined #lisp
paul0 has quit [Ping timeout: 272 seconds]
akoana has left #lisp ["Leaving"]
JohnTalent has joined #lisp
zigpaw has quit [Ping timeout: 264 seconds]
rogersm has joined #lisp
rogersm has quit [Client Quit]
zigpaw has joined #lisp
Josh_2 has joined #lisp
Jesin has quit [Quit: Leaving]
lnostdal has joined #lisp
entel has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
gendl has joined #lisp
Christ0pher has quit [Quit: leaving]
Balooga has joined #lisp
scymtym has quit [Ping timeout: 244 seconds]
chewbranca has joined #lisp
selwyn has joined #lisp
l1x has joined #lisp
gxt has quit [Quit: WeeChat 2.8]
ebrasca has quit [Remote host closed the connection]
Jesin has joined #lisp
dominic34 has quit [Ping timeout: 258 seconds]
fowlduck has joined #lisp
stylewarning has joined #lisp
mgsk has joined #lisp
boeg has joined #lisp
palter has joined #lisp
palter has quit [Client Quit]
ffwacom has joined #lisp
asedeno has joined #lisp
palter has joined #lisp
drmeister has joined #lisp
brown121407 has quit [Remote host closed the connection]
kmeow has joined #lisp
palter has quit [Client Quit]
palter has joined #lisp
palter has quit [Client Quit]
pent has joined #lisp
jsatk has joined #lisp
travv0 has joined #lisp
avicenna has joined #lisp
wsinatra has quit [Quit: WeeChat 2.8]
shangul has joined #lisp
jesse1010 has quit [Ping timeout: 256 seconds]
gaze__ has joined #lisp
hydan has joined #lisp
p_l has joined #lisp
jesse1010 has joined #lisp
efm has joined #lisp
banjiewen has joined #lisp
narimiran has quit [Ping timeout: 272 seconds]
shangul has quit [Ping timeout: 265 seconds]
terrorjack has joined #lisp
dnm has joined #lisp
billstclair has joined #lisp
conjunctive has joined #lisp
rme has joined #lisp
jmercouris has joined #lisp
parisienne___ has joined #lisp
mathrick has quit [Ping timeout: 260 seconds]
XachX has joined #lisp
rvirding has joined #lisp
ssd532 has joined #lisp
sgithens has joined #lisp
mpontillo has joined #lisp
johs has joined #lisp
terpri_ has joined #lisp
gjulio has joined #lisp
Inline has joined #lisp
kilimanjaro has joined #lisp
jhei has joined #lisp
mathrick has joined #lisp
terpri__ has quit [Ping timeout: 260 seconds]
bytesighs has joined #lisp
joels has quit [Ping timeout: 272 seconds]
scymtym has joined #lisp
gjnoonan has joined #lisp
lukego has joined #lisp
jerme_ has joined #lisp
jlpeters has joined #lisp
mjl has joined #lisp
vutral has joined #lisp
tfb has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
scymtym has quit [Remote host closed the connection]
lispyone_ has joined #lisp
physpi has joined #lisp
splittist has joined #lisp
RagnarDanneskjol has joined #lisp
Inline has quit [Remote host closed the connection]
CEnnis91 has joined #lisp
Inline has joined #lisp
PuercoPop has quit [Quit: WeeChat 1.9.1]
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 258 seconds]
X-Scale` is now known as X-Scale
cyberbanjo has quit [Quit: Leaving]
phadthai has quit [Ping timeout: 256 seconds]
Fare has joined #lisp
phadthai has joined #lisp
gravicappa has quit [Ping timeout: 272 seconds]
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
ayuce has quit [Remote host closed the connection]
xrash has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
JohnTalent has quit [Ping timeout: 260 seconds]
gaqwas has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 272 seconds]
Inline has quit [Ping timeout: 264 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
JohnTalent has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
Oladon has joined #lisp
Fare has quit [Ping timeout: 260 seconds]
terpri_ has quit [Quit: Leaving]
Fare has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
markoong has joined #lisp
bhartrihari has joined #lisp
markong has quit [Ping timeout: 256 seconds]
efm has quit [Ping timeout: 256 seconds]
sjl has quit [Ping timeout: 260 seconds]
pve has quit [Quit: leaving]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
Archenoth has quit [Quit: Leaving]
bhartrihari has joined #lisp
JohnTalent has quit [Changing host]
JohnTalent has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
scymtym has joined #lisp
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
Harag has quit [Ping timeout: 272 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
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
dominic34 has joined #lisp
random-nick has quit [Ping timeout: 258 seconds]
rixard has quit []
rixard has joined #lisp
Oladon has quit [Quit: Leaving.]
clintm`` has joined #lisp
rgherdt has quit [Quit: Leaving]
clintm` has quit [Ping timeout: 244 seconds]
nicktick has quit [Ping timeout: 256 seconds]
Harag has joined #lisp
efm has joined #lisp
Oladon has joined #lisp
jeosol has joined #lisp
markong has joined #lisp
markoong has quit [Ping timeout: 264 seconds]
Harag has quit [Quit: ERC (IRC client for Emacs 26.3)]
markong has quit [Ping timeout: 256 seconds]
EvW1 has quit [Ping timeout: 244 seconds]
libertyprime has joined #lisp
knuckles has quit [Ping timeout: 272 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
hineios730393479 has joined #lisp
hineios730393479 has quit [Remote host closed the connection]
duuqnd has quit [Remote host closed the connection]
efm has quit [Remote host closed the connection]
efm has joined #lisp