7 ms·
SBCL is a great choice! It's a surprisingly dynamic system (so are other CL implementations). A while ago, I did some private work for someone, using SBCL, and
by agentkilo 2y ago
SBCL is a great choice! It's a surprisingly dynamic system (so are other CL implementations).
A while ago, I did some private work for someone, using SBCL, and sent her the native binary I built, then forgot about the whole thing.
The client came back with some new requirements much later, when the project was concluded, and the source code was already lost by that time.
I vaguely remembered how I did things, so I spawned a REPL from the old binary, went into the relevant CL package, wrote a new function that overrides the old behavior, and the client's problem was solved.
I did all those without the original source code. It was a small thing to fix, but I can't imagine making the same fix so swiftly with any other tech stack, when the source code is lost. I was deeply impressed.
- chikere232 2y agoThat's pretty cool, but also, get version control
- pizza 2y agoVersion control won't help if the repo itself has been lost to the sands of time
- chikere232 2y agoVery true. Get backups
- wodenokoto 2y agoWhich the client might be responsible for because the contractor might not be allowed to retain the IP
- crispyambulance 2y agoYou're "allowed". Just keep it to yourself.
- ska 2y agoYou often will not be, explicitly by contract. Honestly in this case it’s easier to keep things clean.
- crispyambulance 2y agoIf you do some work for someone one and decide to keep the source you wrote, so you can review it later in the privacy of your own thoughts, the only way you can get "caught" is if you release it some way that's recognizable.
- throw10920 2y agoI wouldn't want to hire anyone that thought like this, as it demonstrates a lack of morality and willingness to adhere to not just an informal agreement, but a legal contract that could expose me to liability or IP theft.
- ska 2y agoIf that's what you want to do, why would you ever sign a contract saying you won't do it?
- crispyambulance 2y agoIf the work is interesting and well-compensated, sure, I would sign that contract. I will also keep the source I write and, if I feel like it, take a look at it years later and no one will know except me. BFD!
- harperlee 2y agoIt has been ages since I worked with Common Lisp, so I wonder: Would it be possible / make sense to have version control into the lisp image?
- lispm 2y agoThat has been done in the past and was never widely supported. But the landscape is now slightly different. One approach might be to use ASDF (the most popular systems management tool), which then would need to be upgraded to use versions (and ideally have it integrated into a repository mechanism -> Git or similar... Also what are versions in a decentralized world?). ASDF operations then would need to be able deal with version numbers. A Lisp image would then know/track which versions of what code it has loaded/compiled/... Version information would be stored with the other source files.
- tiberious726 2y ago> That has been done in the past Could you share some examples of how the old systems did this?
- lispm 2y agoCan't say what and Interlisp did, but the MIT Lisp Machine and here the commercial variant Genera. Files are versioned. The Lisp machine file system has versions (same for DEC VMS and a few other file systems). Nowadays the file version is attached to the name&type. Thus editing a file and saving it creates a new file with the same name&type and an updated version number. I can edit/load/compile/open/... files by specifying its version number. If there is no version number specified, the newest file version is used. A site shared a namespace server with system registry and several file servers. Code, documentation, etc. is defined as a system, similar to what ASDF does. A system has major and minor version numbers and other attributes (like being experimental or being released). Each time one does a full compile on a system, its major version gets updated and it tracks which file versions it used for that compilation. Whenever one creates a patch (a change of the sources) to a system, the minor version gets updated. After 12 full compiles and 30 patches to the latest version we have system FOOBAR 12.30. This data is recorded in the system directory, thus outside of an image (called a World in Genera) in the file system. Now I can use that system FOOBAR in another Lisp and "Load System FOOBAR :version Newest" -> This will load system FOOBAR 12.30 into its runtime. Then new patches may appear in the system. I can then in a Lisp say "Load Patches FOOBAR" and it will look into the system directory for new patches to the current loaded major version and load those patches one by one. This changes the running Lisp. It then knows that it has loaded, say, FOOBAR 12.45, what files it has loaded and in which files the respective code (functions, ...) are located. If I want to ship a system to the customer or someone else, I might tag it as released and create a distribution (with sources, documentation or not). The distribution is a file (also possibly a tape, a bunch of floppy disks, a CDROM, or similar). A distribution can contain one or more systems and its files (in several versions). On another Lisp I can later restore the distribution or parts of it. The restored systems then can be loaded for a specific version. For example I can load a released system version and then load patches for it. A saved image knows which versions of what systems it includes. It also knows which functions sources are where. It may also have corresponding documentation versions loaded. Later a source versioning system (called VC) was added, but I haven't used that.
- huijzer 2y agoThen don’t lose your repo xD
- gigatexal 2y agoSomething something hindsight 20/20 etc etc ;-)
- f1shy 2y agoAgree, but I think in this case would not help. It was not that a version was lost, but all. Had they had VC, probably the repo would have been deleted.
- smokel 2y agoThis is something I really like about Common Lisp, but after ~30 years of progress, I am a bit disappointed with improvements in the field of interactive development. The process you describe is possible in JavaScript and many other languages as well. Updating a JAR is trivial, but doing it in a running system is uncomfortable. The first thing to start with is versioning at the function, class, package, or module level. Combine that with versioning of data, and you've got my interest :)
- pjmlp 2y agoJRebel, for those willing to pay.
- munchler 2y agoYou don’t deliver source code with the binary at the end of the project?
- coldtea 2y agoMany don't.
- lenkite 2y agoWhen will the next standard of Common Lisp be released ? 1994 is really showing is age.