freenode/#lisp - IRC Chatlog
Search
22:37:58
phoe
Bike: In this case, I have no idea. It could perhaps be possible to study CLtL1 and earlier Lisp manuals.
22:38:28
earl-ducaine
Thanks phoe just too lazy to qualify my example as being for illustritave purposes only! Bike: yes that's correct.
22:38:35
earl-ducaine
Just refered back to the Chinual and it seems even in Zeta Lisp (nil) was normative for 'do forever'
22:39:15
earl-ducaine
So, it must of been a syntax error that just happened to work in older implementations.
8:45:21
dmiles
ACTION adds (defun my-do-ansi () (do ((alfa 0.0)) (nil) (return (list alfa)))) to wam-cl
9:11:16
shka
beach: do you know about T lisp? It is said to be a remarkable implementation and it had first class envs akin to SICL.
9:15:04
pjb
T is in the scheme family: http://www.softwarepreservation.org/projects/LISP/scheme_family/#T_
9:15:30
pjb
(MacLisp) http://www.softwarepreservation.org/projects/LISP/maclisp_family/#NIL,_S-1_Lisp_
9:16:25
dmiles
help me out.. should it be possible to git a scheme fully compatible to common lisp ?
9:16:37
pjb
dmiles: Have a look at (intersection common-lisp emacs-lisp scheme) http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/
9:17:06
pjb
dmiles: you have to be careful to write your code to be meaningful in both lisp-1 and lisp-2.
9:17:39
pjb
dmiles: also, have a look at Butterfly CL (implemented in Butterfly Scheme), and at pseudo-scheme (implemented in CL), and a few others like that.
9:28:58
pjb
dmiles: also, for a practical approach, you could have a look at Common Music version 2.
9:29:57
beach
shka: Yes, I know about T. I have read the Orbit paper and some other stuff related to T.
9:30:11
pjb
The version 3 uses C++ to implement the applicative scheme, but the version 2 did that with Common Lisp. It implements a small scheme in Common Lisp, and use it to implement the application in scheme.
9:31:52
dmiles
version 2 sounds great then.. secretly i was worried i would have to rewrite wam-cl to be able to run scheme code (like adding some special whatnot)
9:32:40
dmiles
even if i have to add that whatnot to do scheme .. at least i have an inchworm starting from converting a CL verison of Scheme to prolog
9:32:55
beach
dmiles: In general, Common Lisp and Scheme are sufficiently different that one can not run programs in the other. Only if you use a very small subset of both of them, and if you are very careful how you write those programs will such a thing be possible.
9:34:33
pjb
dmiles: if the idea is to generaly mix and match languages in a common environment, you should definitely look at poplog.
9:35:29
pjb
or work with beach to provide a separate scheme compiler targetting the sicl backend ;-)
9:36:16
pjb
Better do that early while it's still time to add features to the backend if needed for scheme.
9:38:43
dmiles
from what i understand is that SICL does everyting right as far as it prevides a lisp that can be implmented with not one specific part that isnt writen in lisp
9:39:27
dmiles
meaning if you can impl at least these 100 or totallly a differnt 100 trampolines then you can get a full CL
9:53:02
dmiles
well trampoline is a littel too little.. what i really meant was at least some kind of REPL that does some lisp (not quite CL) and then by tramplines i mean at least some lisp functionality exists in the impl like #'EQ #'MAKE-VECTOR REPLACD
9:54:11
turkja
pjb: i'm now a bit confused.. to what it looks to me, Common Music 2 is a pure CL application, it just automatically ports some of the Scheme code (translated code looks horrible, but works). Anyways, you write the programs in CL. I'm using it with SBCL.
9:54:46
beach
dmiles: It is a common way of bootstrapping Common Lisp systems, and then the minimal system is written in something other than Common Lisp. I explicitly did not want to do it that way, because then I would have to write large parts of the system in a subset of Common Lisp and that turned out to be too painful.
9:56:21
beach
It is written using the full Common Lisp language. To create an executable, it requires that some of the code be executed by a host Common Lisp system.
9:56:34
jmercouris
I saw this article on reddit, and it got me thinking about clos: https://www.reddit.com/r/programming/comments/7h7ffc/implementation_inheritance_is_evil/
9:56:34
minion
jmercouris, memo from pjb: http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/index.html.in
9:56:34
minion
jmercouris, memo from pjb: have a look at: git clone http://git.informatimago.com/public/clang-ast
9:57:14
pjb
jmercouris: I don't agree that inheritance is evil. IMO a better formulation would be that inheritance is too complex for mosts human brains, it seems.
9:57:30
beach
dmiles: For example, the SICL LOOP macro uses standard classes to represent the clauses, so CLOS is required to expand the LOOP macro. And of course, CLOS uses LOOP a lot.
9:57:47
pjb
(there are books full of formal semantics of OOPL, so indeed, it may be too complex for most humans).
9:58:20
jmercouris
pjb: as far as I understand, interface inheritance = good, but implementation = bad, too much unexpected
9:58:38
dmiles
beach: ahah now i see.. that LOOP<->CLOS relation would happen in the immagined SICL i had
9:58:40
pjb
Well, in lisp we keep doing that. We call it "punning". Of course, it's done only at a small scale, eg. lists or trees are actually cons cells, so we may use car/cdr on them.
9:59:37
beach
dmiles: In SICL, I can also do things like (defclass symbol (t) ((%name ...) (%package ...)) (:metaclass built-in-class))
9:59:38
pjb
jmercouris: I'd tend to agree, once you follow strictly the lyskov substitution principle, with good pre/post conditions defined for each of your methods, you cannot randomly use inheritance just for implementation.
10:00:14
beach
dmiles: Most Common Lisp implementations must do something special for built-in classes, because most implementations start with a subset that does not contain CLOS.
10:01:20
jmercouris
it could also be my internet, I'm tethering as I have been moving these past few days... :\
10:02:08
turkja
This is how the translated code looks like: https://github.com/ormf/cm/blob/master/src/scales.lisp
10:03:06
pjb
Generated files cannot be maintained. This is why I started to write a C compiler targetting CL, to be able to run GNU emacs in a CL image.
10:03:35
turkja
pjb: originally yes, but it is somehow generated as Lisp, so it can be run on for example SBCL
10:05:39
beach
dmiles: By "the executable" I mean the SICL system itself, the one that gets executed when you type "sicl" to the shell prompt.
10:10:01
dmiles
beach: but it is for someone implementing lisp to borrow from so they dont need to maintain some copy?
10:11:33
beach
dmiles: Sure, it is free. But you can't use it to obtain a full Common Lisp system from a subset of Common Lisp. I have no defined dependency order. There are circular dependencies.
10:12:03
dmiles
beach: circular is jsut fine for me.. sinc ei jsut implenet whatever breaks your loop
10:12:51
jmercouris
pjb: It's okay, if you do try it though, please let me know, I would be very interested in feedback about the usability of it
10:13:46
beach
dmiles: Do you intend to implement LOOP to break the dependency of LOOP so that you can use SICL LOOP in your system?
10:13:46
dmiles
beach: i ended making a somewhat minimal loop i assume will be redified by XMLs loop.. in our case (SICL and I) I end up not using your loop if it ends up being an issue
10:17:27
dmiles
beach still i'll end up using ytour PACKAGE with my Less-Sub-CLOS jsut because my PACKAGE isnt all that brilliant
10:17:57
beach
jmercouris: That is a question that is too hard for me to answer, and if I tried, the answer would be misleading. I have lived in 5 countries on 4 continents.
10:20:41
turkja
beach: maybe you appear as australian because of your decent online times :) i'm at UTC+2 and log in usually around the same in the morning
10:21:47
jmercouris
Yep, sorry, didn't mean to derail the channel, I was just wondering because of the time discrepancies
10:22:09
dmiles
ACTION typing and grammar is so poor usualyl he is asked in English is his first language
10:23:39
dmiles
ACTION will probably do what ABCL did have sucky versions of lots of CL then let the .lisp libraries create the good versions
10:24:04
pjb
jmercouris: furthermore, beach originaly came from a country that doesn't exist anymore, and is living in a country that soon won't exist anymore either.
10:25:05
dmiles
(ABCL replaces the .java versions of MAKE-PACKAGE and HASH-TABLE with versions coded in lisp)
10:25:56
pjb
dmiles: the "replaces" part is only an artefact of the bootstrap process. You could more easily just generate a good lisp image eithout modifying the current one.
10:28:51
pjb
dmiles: I don't know precisely how sicl does it. In general, you can just build the future lisp image separately from the current process. Imagine you wrote it in C++!
10:30:03
dmiles
ah yes.. once the lisp is actualyl built on WAM CL.. and the entrie system is transpiled i suppose i never have to go back to my broken versions
10:30:14
jmercouris
pjb: How does the serialization process look? just like a memory dump? or does it have to be specialized and written?
10:31:08
pjb
jmercouris: it can be anything you want. The principle is to have an internal model of the new lisp image, and to save it to a file in the right format.
10:31:35
pjb
Since this file will contain the image loading part, you're free to do it however you want.
10:32:54
dmiles
(my package.trans.pl (which was made from package.lisp converting) replaces my https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/package.pl dump bpackage version )
10:33:27
jmercouris
So you are saying that the implementation of the image saving may change dramatically without the kernel changing? is that the idea?