freenode/#lisp - IRC Chatlog
Search
3:20:48
stylewarning
fiddlerwoaroof: no way except to access the slot directly. That'll change in due time of course.
3:22:34
stylewarning
(Supposing that I don't replace it with structs, I'll probably make each one its own slot. But it's a detail I'm not so concerned with at the moment.)
3:23:00
stylewarning
(in Coalton, of course, the way to extract values will be through pattern matching, which also isn't implemented)
3:25:04
jcowan
I've actually been wearing my ISLisp implementor's hat today, thinking about how to implement ISLisp in CL. I'm realizing that it's going to be *very* expensive to use only portable CL rather than being able to depend on SBCL
3:25:58
jcowan
For example, (+ 'x) only should raise an error per CLHS, but SBCL guarantees to return an error. So either I wrap + with a safe version that always raises an error (and not by a type declaration either, but by actual code), or I just say "Use SBCL".
3:26:19
stylewarning
fiddlerwoaroof: yes, I'd add it here: https://github.com/tarballs-are-good/coalton/blob/master/src/coalton.lisp#L264
3:26:31
jcowan
Kent Pitman has an implementation, but he can't/won't open source it. There is OpenLisp, which is not open, and a bunch of broken implementations.
3:27:11
fiddlerwoaroof
Anyways, I have a suspicion that that type of thing always _will_ raise an error in implementations people user
3:32:44
fiddlerwoaroof
I only know about it because it's been adapted to work with a racket-module like system
3:49:56
fiddlerwoaroof
Anyways, I think your implementation of Hindley-Milner might be my best chance of my understanding how the algorithm works: it looks a lot cleaner than most of the other places I've looked
3:50:56
fiddlerwoaroof
This might be because I'm really bad at reading ML-style languages or my eyes glaze over when people write page after page of type judgments
4:05:04
fiddlerwoaroof
I'm kinda interested to what degree a lisp would benefit from something like the smalltalk "IDE"
4:05:56
oni-on-ion
yeap =) opengenera was closest; lisp experiments were precursor to smalltalk environment afaik. current attempts are mezzano and mcclim
4:09:06
jcowan
Interlisp (of which Genera is the only surviving implementation) and Smalltalk came out of the same hacker culture, and they shared a great deal, especially the image-based rather than file-based representation.
4:09:50
fiddlerwoaroof
jcowan: yeah, one of my many overly ambitious projects is to implement a fully-image based modern CL system
4:10:40
fiddlerwoaroof
I've been thinking of using sqlite's appendvfs to append a relational database to an image, and stuff all the source in there with arbitrary metadaya
4:11:22
fiddlerwoaroof
And then define a suite of functions that can generate temporary buffers from the database that contain a projection of your source-code
4:11:41
jcowan
There are bits in the Squeak image that were set by hand before 1980 and have no representation in the source file.
4:12:01
fiddlerwoaroof
i.e. something like (buffer-with-methods generic-function &rest specializers) that would give you a temp file with all the relevant methods
4:12:42
fiddlerwoaroof
jcowan: I thought that at some point they went back and reimplemented the vm from scratch so that that was no longer the case?
4:15:36
jcowan
Xerox sent out the image and a bunch of docs to various outside organizations and asked them to implement VMs according to their own notions, and the result was a lot of Smalltalks and the book _Bits of History, Words of Advice_
5:45:48
stylewarning
fiddlerwoaroof: I updated the README. I also just made a good number of fixes/improvements. All of this still here works: https://github.com/tarballs-are-good/coalton/blob/master/src/library.lisp
6:01:12
fiddlerwoaroof
I was just thinking it might be interesting to implement a unification-only mode that does success typing
6:03:33
fiddlerwoaroof
And, it works by leaning really heavily on the type system to generate a bunch of the boilerplate necessary to serve an api
6:05:52
fiddlerwoaroof
So, my thought is that if you declare assumed-good types for a bunch of functions and use those in a server spec and if you had a type-only checker, you could get the code generation "a la carte"
6:27:36
fiddlerwoaroof
stylewarning: one thing that occurs to me is that your coalton-toplevel macro return an "environment constructor"
6:28:01
fiddlerwoaroof
that is, a function that, given some object that represents an environment, updates it to have the definitions contained inside the macro form
6:29:41
fiddlerwoaroof
I thought the way j-bob (the theorem prover from The Little Prover) handles this was quite eleagant
6:31:01
fiddlerwoaroof
Although, the downside would be that host/coalton interop becomes a little more complicated.
7:41:36
beach
So it looks like it3ration was here mostly to tell us how nice Clojure is an how ugly Common Lisp is, and not so much to get information about Common Lisp.
7:43:44
elderK
I don't get the bad rap people give CL. I was reading some blog posts today, by Fare, who linked to other such posts, about people banging on CL.
7:43:53
beach
Somehow, I can't see myself going to #clojure and ranting about how I like mutable data structures, lisp-2, etc.
7:44:09
elderK
I mean, I've never found anything in CL all that horrible. Maybe that's just because I'm used to C and C++ but like, nothing stands out as being outright @!#$ing crap.
7:44:54
elderK
As for namespaces, I like that functions live in their own namespace. It makes some things much clearer. Like, how many times have you seen Scheme code with "lis" as a parameter?
7:45:07
beach
Well, you can like it or not. That's not my point. My point is that it is kind of weird to show up in a forum dedicated to language X and spend most of the time ranting about how great language Y is and how bad language X is.
7:46:27
beach
"The names of things seem super antiquated compared to Clojure (aka, remove-if-not instead of filter"
7:46:34
no-defun-allowed
to be honest, neither is better and both have places where they look awkward
7:46:56
no-defun-allowed
which is why i propose a new system: lisp1.5 (not to be confused with the 1960's implementation)
7:47:17
no-defun-allowed
interpret/compile/whatever the syntax both ways and use which one handles the most test cases correctly
7:47:27
beach
Again, that's not my point. My point is that it's strange to come to #lisp and rant about how bad it is and how good Clojure is.
7:47:43
elderK
It's like, sure, I prefer a general "define" like in Scheme vs. defun, etc, etc. But so what? It's not like it's a major issue. You use defun a few times, and you learn and no problem.
7:47:57
shrdlu68
Perhaps it's time "Comparative PL design" became a thing? Clearly people enjoy comparing languages.
7:52:38
no-defun-allowed
(defun filter (pred list) (loop with in-pan = nil with in-bowl = nil for item in list do (if (funcall pred item) (push item in-bowl) (push item in-pan)) finally (return (values (nreverse in-bowl) (nreverse in-pan)))))
7:52:49
elderK
Someone who isn't a functional person can se eit, and understand what it is doing. But if you see filter? Like beach said: Is it removing? Is it keeping things? What?
7:54:23
no-defun-allowed
although the model should probably be the other way around since you're looking down onto your bench, the pan's contents are first
7:54:40
shrdlu68
Can't say I've never been tempted to go on a vitriolic diatribe against some languages, just never done it.
7:57:11
no-defun-allowed
(eg: new rust macros give you a stream of tokens instead of an AST. the response i got from "what the hell is this nonsense, the compiler has a full parser!" was "just include a parser crate it's less stuff they have to put in the core")
7:59:42
jackdaniel
people coming here and "proving" that their language of choice is better is a defensive stance
8:00:22
jackdaniel
if I had to guess such people hear from somewhere, that CL is better because of *something* and feel compelled to defend themself
8:01:21
shrdlu68
There you go - an opportunity to write a damaging polemic, like Chomsky's review of Skinner's Verbal Behavior.
8:01:22
jackdaniel
but it is rude indeed to barge in to say: your choice sucks (because I truly believe despite what I've heard that my language is better)
8:04:04
shrdlu68
But I doubt one can write something like that in this field and not be accused of malice.
8:07:35
shrdlu68
Hypothesis: no critique of a programming language can ever be taken seriously as a scholarly work.
8:37:04
shka_
shrdlu68: well, this is how it is, but I even named my blog "for more humane computing"
9:54:47
zigpaw
Speaking about language choice, yesterday I was looking at a live stream of someone who wrote a GUI application using Power Shell script, and kept data in CSV files. One of my first thoughts was - how much pain can we cause to ourselves. On the other hand he wasn't working as software developer so as far as I am concerned I was quite happy he was d
9:58:20
jackdaniel
I've seen far worse solutions for data storage than storing it in csv (and some of them required quite a sophisticated knowledge)
10:03:06
jackdaniel
so I think that csv is a sane choice for really small projects, then comes sqlite and then database which is more suited for bigger quantities of data
10:06:25
heisig
My preferred choice of storage is objects in Lisp images. The reasoning is that life is too short to spend it with data serialization and deserialization.
12:44:08
dim
having 2GB of data in main memory is easy nowadays, even on a laptop, so that's not any problem for an application to solve, what's complex is accessing the single/shared data set in read and write operations from concurrent activities, and that's when transactions and ACID and whatnot get to be meaningful
12:45:07
dim
as soon as you support more than one client doing even an INSERT concurrently, then you need to think in terms of transactions and serialisation, and then database, even if that's for a 2kb of data
13:11:53
pfdietz
If you want to treat lisp programs as objects, an image based system becomes more convenient. Reader hacking in Common Lisp, like the preprocessor in C, makes it hard to represent the program.
13:12:14
pfdietz
I suppose ordinary macros do too to some extent, although not at the level of character-based syntax.
13:13:22
pfdietz
One thing I had to get used to moving from Interlisp to Common Lisp was comments were no longer sexprs.
14:28:05
pfdietz
The interesting (to me) question: what are the things that are done to programs? Compiling and running them, for sure, but what else? These would affect language design.