freenode/#lisp - IRC Chatlog
Search
21:32:25
mrcom
That's good for some things, especially the flexible problems we like to throw Lisp at.
21:34:39
aeth
mrcom: List? Easy since you just write your own cons. Vector? Now that's much harder because :element-type is almost certainly only going to work on simple, immutable types like numbers and characters.
21:36:18
aeth
mrcom: but you can write your own custom sequence consisting of a custom cons-like object that can only contain foos.
21:36:38
aeth
mrcom: You cannot do that for vectors/arrays... I mean, I guess you could, but it's much more complicated.
21:37:05
mrcom
Lisp is much happier with problems where 'most of the time it's a foo, but once in a while we really need a bar in there.'
21:38:21
bitmapper
yeah, i was about to say you can represent 'most of the time it's a foo, but once in a while we really need a bar in there.' with algebraic data types
21:38:26
mrcom
aeth: yes, with rigid types. Rigidity makes it easier for large groups to work together.
21:39:09
aeth
mrcom: CL's type system is better, you can restrict things *at the type system level* to e.g. be (integer 5 32)
21:39:46
aeth
And implementations like SBCL often treat types as just performance declarations, meaning (integer 5 31) might be treated as (integer 0 31)
21:39:53
mrcom
Corporate hates quirks. *I* hated quirks when I was managing those kinds of projects.
21:41:43
mrcom
I've been working on a Quixote project for the last couple of years. Complex graphs, fairly simple nodes, lots of complex transformations.
21:42:33
mrcom
But it's very, very much a research project. Not suitable for development by a group of people.
21:43:59
MetaYan
Aha, you mean like the windmill guy. I went off searching for some documentation about a system called Quixote.. :)
21:44:15
mrcom
bitmapper: What I mean, is that object-orientated languages do have polymorphic types, but the philosophy is get more and more grumpy as the objects become for homogeneous.
21:46:14
stylewarning
algebraic data types ARE what the corporate world runs on, it’s just not obvious from the ludicrous tangle of abstract Java classes or void pointers in C
21:47:14
mrcom
Yes, correct from an implementation standpoint, but that's like saying binary numbers are what they run on.
21:48:11
mrcom
To a very large extent, proper architecture of large systems is dedicated to seeking out and destroying differences.
21:48:15
stylewarning
It’s the opposite, it’s like they’re working with and juggling binary numbers and me saying “well actually they’re working with integers if you can See The Matrix”
21:52:13
mrcom
stylewarning: Yes, you see a sequence, but commercial projects want an array. Or maybe, if you can't avoid it any other way, a linked list. But not both.
21:53:12
phoe
mrcom: nah, some of them just want a c++ iterable, which might be a sequence or a hash table or whatever other data structure
21:53:43
MetaYan
I'm asking, and trying to stay on topic here in the Lisp channel, because Lisp is somehow very different to what the "corporate world" is, at least for me. And there's no reason to bend Lisp into that, but just keep Lisp on the right track, and the "corporate world" will eventually change its ways. From rigidity to flexibility, and all that.
21:53:45
phoe
and it's possible to iterate over a Lisp sequence, even more so that the order of iteration is known
21:54:03
stylewarning
mrcom: Lisp isn’t popular for much simpler and prosaic reasons than type system choices
21:54:24
mrcom
phoe: Yes, in Lisp. Which is the point I was trying to make. In Java it's a pain in the keister.
21:55:53
stylewarning
phoe: my opinion is kind of boring, but I think there are two reasons: the tooling isn’t in the style people want it to be, and there’s no consistent education around Lisp to fuel a job ecosystem
21:56:25
mrcom
And the reason it is a pain is because Java-friendly problems don't want special cases. A zero-length iterable is fine. A 'not there' value is a trouble spot.
21:56:26
stylewarning
Having to (in practice) use emacs and paredit and separately download a Lisp is a huge roadblock and nobody is excited about it
21:56:38
phoe
stylewarning: the latter project could be solvable by something beach has been thinking of as of late
21:57:19
stylewarning
and love opening it up and seeing all the options for configuration in front of their eyes
21:58:15
stylewarning
Even clojure people have managed to come out with 3 (or more?!) dedicated IDEs
21:59:45
stylewarning
Of course, there’s another meta-discussion about what people prioritize and “what matters in life”, but these are my observations
22:00:41
mrcom
Developing in Emacs is, at heart, text editing. Maybe expression editing. Not a lot of semantics. (For example, 'rename this variable everywhere' is awkward.)
22:01:53
aeth
it doesn't help that paredit doesn't even work unless you (setq paredit-space-for-delimiter-predicates '((lambda (endp delimiter) nil))) because of the incorrect personal tastes of whoever happens to maintain paredit
22:01:59
mfiano
stylewarning's real world opinions are shared by me for sure. It's nice he was able to describe so concisely what I have been trying to for such a long time
22:02:16
aeth
defaults being trash isn't just a thing in the Lisp ecosystem, it's a thing in the entire Unix one
22:05:12
stylewarning
The meager good news is that this is a solvable problem and has been solved many times in history. The only thing stopping it from happening is the existence of exactly one motivated and talented hacker.
22:05:45
mrcom
Emacs UX is... jaw-droppingly bad. Common things are not simple. Obscure things are short key sequences (^h ^o -- Why do I need a key sequence bound to "describe distribution"?)
22:06:34
bitmapper
and when you do, it's a version of java that they made a little more enjoyable to write
22:08:49
fsmunoz
For a moment I was thinking of a Java editor based on Lévi-Strauss and Lancan. And it sort of made sense tbh.
22:08:52
aeth
Emacs's C-h isn't too different from Alt+h in, say, Firefox, except there, you're bringing up the menu bar so you can actually see what your options are if you don't know them ahead of time without having to C-h ?
22:09:27
aeth
It would be interesting to have a visual exploration of keyboard shortcuts throughout the entire system in a CL Emacs
22:10:23
aeth
Emacs Lisp is close enough to Common Lisp that Common Lispers don't mind writing it as much as, say, Java or Perl
22:11:21
MetaYan
One thing that speaks against using Emacs for Common Lisp is that it's referring to the latter as "Inferior Lisp". Just that should be a warning.
22:11:56
Harag
I dont think its just editor and tooling, last year or the year before when I did some react-native work the installation and ide support was so bad I ended up setting up emacs to with linter etc to be able to work
22:15:41
MetaYan
Josh_2: At least a bit better. Because i's something that's visible from the start and influencing on a subtle level.
22:17:51
aeth
Even a CL Emacs would have to have an inferior-lisp because (1) you might be developing in a different CL than you are using for the editor, (2) the editor might be under /usr/bin/ or /usr/local/bin/ instead of $HOME, and (3) sometimes you just mess things up so badly that M-x slime-restart-inferior-lisp is the fastest solution and it's nice not to have to restart the editor, too
22:18:23
aeth
And I personally try to remember to always restart the inferior Lisp before pushing commits just in case there's a weird stale state bug, like e.g. renaming a function, but still calling the old name somewhere in my code
22:22:40
aeth
(I guess #2 is just #1, but using different versions of the same CL implementation instead of different distinct CL implementations)
23:15:54
scymtym
Josh_2: for updating a pane periodically, look at the examples/graph-toy.lisp demo. for a non-timing based source of updates (potentially in a different thread), define a custom event type, submit events from the other thread and handle them by redisplaying or repaint (whichever is appropriate in your case)
1:01:16
mfiano
Hello all. Someone knowledgeable enough with the spec relating to simple-array's care to answer some questions. I'm digging myself a hole here. :)
1:17:45
kinope
I think personal bias is a stronger reason for the popularity of some languages over others. Technical merits, or perceived subjective lack of, are just what one uses to convince themselves that what they feel is correct. We are all subject to this to some degree.
1:25:26
kinope
For instance, younger developers age 10-25? are more interested in new and exiting developments, it plays into their stronger need at that age to be a part of something big and impactful. There is no excitement in technology that was born decades and decades ago.
1:31:16
kinope
Combine that with a disregard for philosophy, history and it's not hard to see why things are the way they are.
1:37:38
Blukunfando
But if you force people to study philosophy and history, they’ll despise them even more.
1:45:27
kinope
The value of it needs to be seen, not given. That takes life experience; maturity, and time.
1:48:36
Bike
mfiano: you should just ask your questions so someone knowledgeable can see them (possibly forty some minutes later) (hypothetically). assuming you haven't worked it out by now.
1:50:55
mfiano
Yes, sorry, it turns out I rubber ducked my way out of it while typing out my questions.
3:15:46
drmeister
Hi - are there any common lisp pretty printers for source code outside of the one in slime?
3:16:34
drmeister
We need to indent code in jupyter notebooks - so we need a source formatter implemented in Common Lisp.
3:24:45
mfiano
drmeister: Only thing I'm aware of is the ident module of the Lem editor, but I have no idea if it will meet your needs.
3:57:11
beach
stylewarning: I think your point about education is the more significant one, but some of us are working to fix the tooling problem. We have several components, but some crucial ones are missing and some are incomplete. And we don't have a strategy for integrating everything yet. If you want to know more, let me know.
4:05:58
beach
stylewarning: My motivation for working on the tooling problem is not to attract more people of the kind that would be attracted by something like Cursive, though. My motivation is that our tooling is not great for experienced developers.
4:29:27
beach
What SLIME does is just indentation. It does not introduce line breaks, the way a pretty printer would.
7:35:38
SebastianM
Hey guys is there a way see the list of all symbols available in eg sbcl from within the repl?
7:41:32
White_Flame
hitting Tab twice in slime can also bring up whatever it thinks is visible/possible
7:42:27
beach
SebastianM: Every time you type a variable, like x in your code, a new symbol is created.
7:45:01
beach
Then, you do the same thing, but you check whether each symbol has an FDEFINITION. And don't forget to check `(SETF ,symbol) as well.
7:45:40
phoe
(let (x) (do-external-symbols (s :cl) (when (fboundp s) (pushnew s x))) x) ;=> list of length 752
7:46:48
phoe
otherwise it's going to be just as unmanageable as the list of all symbols, even if somewhat smaller
7:47:05
phoe
(length (let (x) (do-all-symbols (s :cl) (when (fboundp s) (pushnew s x))) x)) ;=> 13557
7:56:23
flip214
phoe: mfiano: Alfr_: thanks for the additional discussion... I'd vote for keeping the documentation and fixing ITERATE to _not_ overload COUNT.
7:56:43
flip214
Or is it possible to just switch to dwim.hu.iterate? Ain't that a clean(er) rewrite with the same features?
7:59:32
flip214
well, perhaps we need some annotation for libraries which symbols could be removed on tree-shaking, ie. when an image is built that has no need for further compilation (so no macros etc.)
8:16:35
markasoftware
In `(,(form-with-side-effects) ,(more-side-effects)) are the forms guaranteed to execute in order?
8:18:26
beach
That one should reduce to (list (form-with-side-effects) (more-side-effects)) or something similar.