freenode/#lisp - IRC Chatlog
Search
22:29:41
tetrachlorides
i play with it sometimes but hard to make sense of the whole thing. lisp800 helps
22:35:03
dmiles
it be a nice project to have a lisp500/800/5000 that used ideal setf expanders and real CLOS (like from PCL)
22:35:12
phoe
borei: specifically, if you already have methods on a GF, you can't change the GF's arity.
22:35:41
phoe
(defgeneric foo (bar baz)) (defmethod foo (bar baz) 3) ;; at this point (defgeneric foo (bar baz quux)) is an error.
22:37:19
dmiles
though by the time i am done is sorta expect to have that but it'll be a hodgepodge of ECL,SBCL,ABCL,GCL,SICL etc
22:39:44
aeth
dmiles: The ones that appear to be alive (ish) are SBCL, CCL, ECL, ABCL, Clasp, CLISP, CMUCL, MKCL
22:40:17
dmiles
tetrachlorides: setf expanders is sort of a institionalized hack to ease the use of trampolines (host C functions) on places
22:45:41
dmiles
but yes a poor choice to do anything other than cherry pick a handfull of functiuons
22:45:46
aeth
dmiles: loop is just so convenient for "loop ... collect ..." or "loop ... append ..." when generating lists
22:46:06
aeth
You can go without using loop, but you're probably going to get something that's both slower and less readable
22:47:11
dmiles
*nod* well my thing agaist loop is when sometimes it was totally done by someone who looks for every reason to use loop
22:49:31
dmiles
but also of course my avoidance is sometimes it makes it harder to decompile my code afterwards.. since prolog vars and not be written more than once i have to make lots of helpers
22:49:34
tetrachlorides
i was researching lisp500 history earlier, i can't find when it was first shared (on irc?) your name comes up as interested in it
22:50:47
dmiles
"avoidance is sometimes it makes it harder to decompile my code afterwards.." / "sinc eprolog variables once a value is stored cannot be changed"
22:52:21
dmiles
tetrachlorides: yeah every once i a while i ask if there is a minimalist primordial CL someplace other than lisp500 :P
22:54:16
dmiles
SICL is is close to that at least according to everyone, though as beach once explained its a bit over circular to be considered that
22:56:11
dmiles
yeah i wish that there was some 185 or some 387 or so trampolines that get us all the way to the level of doing what SBCL does
22:57:57
aeth
You could build CL from a subset of CL, ignoring loop and CLOS and format and other things that seem mostly added on
22:58:22
aeth
(Although ignoring loop in macros would make it harder to generate lists because, as I said, collect is pretty much it)
22:59:30
tetrachlorides
should NIL be a NULL pointer, or a symbol, or a special cons cell with both halves pointing to self?
23:01:10
aeth
CLOS offers a lot of nice things, of course. And format is more concise than alternatives.
23:01:26
aeth
You could probably come up with a macro that just does the subset of loop that's hard to do elsewhere (e.g. collect)
23:01:49
phoe
CLHS somewhere has a list of all symbols exported from the CL package. Does anyone know where exactly to find it?
23:01:55
dmiles
tetrachlorides: historically everyone jsut loves to comendeer NIL to mean lots of things.. NULL,0,:FALSE .. about 70% of their way in they decide it was a bad idea
23:02:26
rme
But there are tons of CL implementations to build on. What's the benefit of implementing a limited subset of CL for bootstrapping given that you could use an existing CL for bootstrapping?
23:02:44
aeth
Shinmera: I don't use format, I use CLOS in ways that make things simpler but could be avoided if I had to, and I only use loop when alternatives are much uglier (primarily loop collect)
23:02:50
Colleen
phoe: Clhs: section 1.9 http://www.lispworks.com/documentation/HyperSpec/Body/01_i.htm
23:03:34
pjb
You just use full C to write C compilers. Even perhaps you implement them in C++ or in Common Lisp!
23:03:41
aeth
Shinmera: I don't think a game engine is easier than a language implementation because a game engine has to implement half of a language, several times over, in order to be efficient.
23:05:28
Xach
ACTION has said multiple times that there are 976 symbols, though he should have remembered it as 978 because it is massachusetts's second area code
23:11:54
aeth
Only problem is that by treaty the US or the Soviet Union have the right to claim parts of Antarctica, so if you build a town there the US or Russia might try to claim it.
23:12:16
dmiles
rme: the reason i am not using an existing CL impl to bootstrap is that i dont compile to x86
23:13:13
aeth
If #lisp officially backs Catalonian independence, can Common Lisp be the official programming language of Catalonia? And does that mean we'd need to do the whole Lisp localization thing where Catalan words are used instead of English words in symbols?
23:13:38
flip214
aeth: top-level-domains can be bought nowadays, so I guess that a (now unused) phone prefix should be available too
23:13:45
dmiles
rme: i sorta wish that there was a compiler that translated lisp to say javascript and had no missing parts
23:14:31
dmiles
rme: (i mentioning that since even with existing lisp systems that still cannot be done)
23:17:04
dmiles
i am not sure if in the end i will have actualyl acomplished things without totally cheating as much as possible
23:18:41
rme
dmiles: Your new implementation (written using CL running in the bootstrapping implementation) can generate whatever code it wants. It doesn't matter if the bootstrapping CL generates x86 or 68000 code.
23:19:51
dmiles
though technically the source of the wam_cl could be able to be translated from prolog to lisp.. meaning i could then gernate my system on SBCL
23:24:49
dmiles
oh, the benefit of implementing a limited subset of CL for bootstrapping is that you your initial subset (say hosted as python) would allow the rest of CL to be a translation of that python code
23:25:58
aeth
dmiles: the disadvantage of implementing a small subset for portability in targeting very different platforms is that the way to write efficient code varies wildly depending on the platforms, especially if the platforms are so different (like source-to-source compilation between languages)
23:27:21
aeth
Almost all of my CL code is "portable", but it's not really portable if it's unusably slow in many environments where it could theoretically run
23:27:55
dmiles
aeth: yeah anohte rexample of what you are saying.. is actualy i run collector loops must slower than i run compleetly recursive function spiting out (values .. ) as a collector
23:28:18
jmercouris
how do you guys feel about (defparameter) setting performing calculations in a top-level form?
23:29:09
aeth
defparameter and defvar might not behave as you think they should when threads are involved
23:31:01
rme
why write a few lines of code when you can import a library? it's the modern programming way!
23:31:08
jmercouris
aeth: It is a constant, but I'd like the user to be able to change it, so it's kind of not a constant...
23:31:36
aeth
rme: some libraries don't count because you probably are indirectly using them even if you have just one dependency
23:32:59
jmercouris
aeth: Anyways, do you think I will still encounter issues with threads if it is as I described?
23:33:20
jmercouris
aeth: The value is used anywhere a function requires access to a configuration file
23:33:30
aeth
jmercouris: and, yes, I wouldn't rely on a user setting *foo* to actually be realized in another thread
23:34:51
jmercouris
here's the function: https://github.com/AeroNotix/lispkit/blob/master/user.lisp#L4
23:35:01
jmercouris
and here's the top level form defparameter: https://github.com/AeroNotix/lispkit/blob/master/settings.lisp#L3
23:36:32
aeth
Personally, I'd put them in a struct or object and would not directly expose them, so you can check that the proposed new value is valid
23:37:15
aeth
That has the added advantage that if defparameter doesn't work, you can change where they're stored
23:37:38
jmercouris
hmm, sure, but I'd like to give my users the opportunity to mess things up, it is an emacsy like program after all
23:38:23
jmercouris
I mean we are not at even version 1.0 yet, so people should not expect their configs to work forever
23:39:24
aeth
jmercouris: If you just expose an accessor (calling it returns the value, setf'ing it changes the value) then you have a lot more flexibility with the API and can change it to be pretty much anything
23:39:56
aeth
jmercouris: but I would personally test modifying it at runtime in another thread, if your browser runs in a background thread from SLIME like a lot of graphical CL apps do
23:40:20
jmercouris
when that time comes, that will be a big change, and the UI will live in its own thread
0:02:29
fiddlerwoaroof_
jmercouris: you might consider making one object for all your parameters and storing it in *config*
0:03:59
jmercouris
fiddlerwoaroof_: That might be useful for a sort of config-tool that I'll develop later for people who don't wish to write lisp, thank you for the link!
0:04:19
jmercouris
I can definitely see the value add, but I don't want to stray too much from the emacs way
2:21:42
aeth
jmercouris: I don't think Emacs is a good model for how to do something in a configurable way.
2:22:15
aeth
It's old so it pre-dates pretty much every good idea. (Well, sometimes it didn't pre-date those ideas and RMS was just too stubborn to implement them in Emacs.)
2:23:16
aeth
I mean, ideas relating to configuring large applications, which for the most part didn't really exist until the late 80s and 90s
3:27:48
Bike
asarch: the compiler hasn't been told the variable is special, so accessing its value is undefined behavior that can differ between implementations.
3:28:18
Bike
clhs examples sometimes act as if it is defined behavior and that it will work like clisp. but examples aren't normative. it's a bit confusing, unfortunately.
3:29:19
Bike
let doesn't set variables, it binds them. these bindings are only in effect within the body forms.
3:31:09
Bike
it's because you can bind more than one thing, like (let ((a 4) (b 7)) ...), as loli said.
3:32:29
asarch
So, a "binding" is what a variable would be in other languages, right? And a "binding form" would be the assignation statement, right?
3:33:19
loli
well you are letting a variable, it just has limited scope, much like how {int i; return i + 1;} is only in scope within the {}'s
3:34:14
Bike
it's like if you were to say "let x be the number of cats in this house. then the number of cats in the other house is twice x." x is bound to some number, but only temporarily, and doesn't mean anything in particular outside of the scope of the sentence.
3:34:21
asarch
"The skeleton of a LET form looks like this: (let (variable*) body-form*)" <- From PCl, chapter six
3:39:02
Bike
these are terms that are originally derived from the particularly boring kind of philosophy that eventually became programming
3:39:38
Bike
don't overthink too much, they're like, nearly english a normal person could understand
3:48:59
asarch
So, if LET was C, then it would be something like: {int foo = 10; funtion() { /* You can now use 'foo' as you wish */}}; /* Here, 'foo' doesn't exist */
3:52:12
Bike
the major difference with C is that C requires the programmer to understand when things are allocated. space for an automatic variable, like foo in your example, is allocated at entry to the block (iirc) and deallocated on exit. lisp is not this strict.
6:13:22
rme
I suppose you could write an s-expression-based .ffi file by hand and process it with parse-ffi. But I don't know if that's really practical.
6:13:37
rme
There's actually some work going on in https://github.com/Clozure/ccl/issues/13 about updated ffigen, btw.
6:15:40
jmercouris
the other day he was suggesting to me that I simply implement an entire web engine in common lisp, like it was some trivial task
6:16:57
jmercouris
rme: thanks for the link, I'll see if I can contribute anything, probably not since this is not my area of expertise, but I'll try
6:18:55
rme
When things are in the interface db, you can sometimes use objc-message-send by hand. For example, (objc:objc-message-send data #/base64Encoding)
6:20:40
jmercouris
I did try the objc-message-send approach, maybe at the time my syntax was wrong, or something, I could try it again
6:23:20
rme
I just made a note to try to build new headers. Probably I won't do it until Monday. You want updated webkit headers in particular, or all of Cocoa?
7:47:44
beach
It is not a great idea though, because when there is a problem and you look at the backtrace, you no longer see the original argument, only the modified one.
8:47:27
flip214
you should then see the new value as local variable, and the original function argument in the backtrace.
9:41:43
beach
phoe: We plan to stay in Madrid or some other intermediate place for a night or two, just to break up the trip.
9:49:47
Shinmera
While taking a bus is slower than the train, it is significantly cheaper and can take as little as 45 minutes to arrive in Marbella. All Malaga to Marbella buses are run by Avanza. All buses are direct, depart from Malaga Estación de Autobuses bus station and arrive at Marbella Estación De Autobuses.
9:52:40
Shinmera
Uugh why would any website write things in AM/PM. I don't know if "12:55PM" is "0:55" or actually "12:55"
9:58:41
Shinmera
Looks like the cheapest flight I can get is like 220Chf. Cursory look at hotels nearby would clock in at around 150Chf. Definitely isn't going to be as cheap as it was in Krakow.
9:58:44
beach
Actually, we might take a flight from Bordeaux to Malaga (change in Madrid) and stay in Malaga for a night or two.
10:10:25
beach
Careful, someone might take you up on that, and you'll find yourself being the local organizer.
10:11:45
phoe
beach: I think I can manage. I know enough people on the Jagiellonian University to do most of the heavy lifting for me.
10:13:25
phoe
Depends. JU is really all around Cracow. Has four different campuses and multiple buildings that are placed elsewhere.
10:13:33
jackdaniel
` "X86-64" cannot be printed readably.` – does it ring a bell to somebody? this is docker image in travis CI with somewhate old SBCL (nothing I can do about it) – here is a full log: https://api.travis-ci.org/v3/job/328525197/log.txt
10:13:49
beach
Shinmera: It's a very expensive place. You might need some subsidies to keep the fee low.
10:14:23
Shinmera
beach: Well yeah, asking Google or ETH would've been the thing to do. I just don't think I have the time and connections yet to do so