freenode/#lisp - IRC Chatlog
Search
19:59:27
Alfr
Should it be there in the first place? From iterate's manual section 2.3: "However, when there is a conflict with Common Lisp, only the present-participle form may be used (e.g. unioning). This is to prevent iterate clauses from clashing with Common Lisp functions."
20:02:45
mfiano
It should not. There was an SO answer about this question recently that suggested reporting a bug to either update the documentation, or deleting the synonym. I'm unsure if that was ever realized though.
20:05:14
Alfr
Getting rid of that in the docs would be bad, that would then also make reduce harder to access and maybe also other things.
20:07:26
mfiano
Here it is: https://stackoverflow.com/questions/59261705/how-can-i-use-the-function-count-inside-an-iterate-form
20:08:16
mfiano
"I've sent a bug repot to the mailing list and cc'd you. Thanks for explaining this to me!". So it has been reported, but you know how it goes with a lot of Lisp libraries. Bus factor of 1 or less.
20:11:11
mrcom
flip214: (setf (symbol-function 'foo-cnt) #'cl:count) (iterate (for i below 4) (sum (foo-cnt 1 '(1 2 1 0)))) ;; => 8
20:17:11
Alfr
mfiano, it's not that lispers don't know how to fix it, but more that it's (at least to me) unclear whether it's still actively maintained. Of course, apart from this and the documented limitations which boils down to the need of a better code walker, I've never noticed it to break, i.e. not much maintenance required.
20:19:29
Alfr
mfiano, we wouldn't lose the ability to maintain it, if he/she got hit by a bus ... were we to know that fact.
20:19:35
phoe
I guess that us lispers kinda grew used to life with the fact that we live on big piles of Heisenberg-abandoned code that gets unburied and refreshed now and then when it's necessary
20:20:56
phoe
this isn't strictly about Lisp, but it's definitely visible in the Lisp community because there's few people in the community in general compared to languages considered mainstream nowadays
20:21:28
mfiano
A blessing, because Lisp being as flexible and expressive as it is, allows a single developer to mold the language to their domain. After all, code is just a projection of ones' own mind.
20:22:05
Alfr
phoe, some libraries also are at some point "finished" as in having implemented all they purport to do.
20:22:06
mfiano
So it's no wonder why Lispers don't work together that well. It's often easier to express ideas suitable for themself rather than conform to someone elses'.
20:26:09
Alfr
phoe, fork locally and change it should I really need that change, but usually I'll just work around it; especially when it's something as commonly used as iterate.
20:27:46
Alfr
mfiano, I'd be also quite reluctant to publicly fork a repo just for what I deem to be a bug.
20:27:53
mfiano
Software is finished when it does what it intends to do correctly, and without any bugs. But the number of bugs is proportional to the number of users, and their funny input and use-cases. If you ever think you're "finished", just (incf *users*).
20:28:24
aeth
ITERATE is commonly used? I haven't really seen it in use and I've tried to use it before, but it has this sort of uncanny valley effect where it's close enough to LOOP that I come to it with my LOOP expectations, but different enough that few of those LOOP expectations work, making it a library that's not very easy to use ime.
20:29:09
phoe
if you do this instinctively then I can imagine there's other people who do the same because it's impossible to effectively update an upstream project that has no maintainer
20:30:19
Alfr
phoe, if I can establish contact w/ maintainers and they say that they'll accept changes, I do.
20:31:07
phoe
see several fukamachiware projects which have had open PRs and issues for months if not years; even though the author is active and the projects are commonly used, they are effectively abandoned because no one maintains them
20:31:51
phoe
I use them as examples because they're both prominent in their popularity and notorious for their almost-working-ness and impenetrable code
20:32:12
mrcom
Iterate also has some issues with type declarations, and it would be nice to get rid of the reader macros (messes up source-code location tracking in SLY--general SBCL issue?).
20:34:56
Alfr
aeth, maybe it's just me using it all over the place, I guess I really like iterate for having less ordering requirements for its clauses.
20:35:33
mfiano
I have years-old issues there. I couple years ago I just decided to refuse to use any of them because of it. They simply do not work as intended for my use-cases, and the coding style is painful for me to patch myself without taking too much time away from problems higher up on my list.
20:37:28
mfiano
clack, sxql, datafly, cl-dbi, to name a few. Show-stopper bugs that made me write my own things, though I do not do much web development these days anymore, anyway.
20:37:38
aeth
(And if I was more consistent about using issues in my game engine, I'd probably have several dozen issues dating back 4 years.)
20:42:26
mfiano
I don't mean to sound so critical of other peoples' work. It's just that one of the major reasons I use CL is because it's easier to sculpt things myself with regard for my particular domain.
20:42:41
phoe
do we lack the people to fix that state of matters? do we lack the organization? do we lack discipline or money or what
20:43:53
aeth
e.g. the popular web libraries in other languages are usually well-maintained because people use them professionally
20:43:53
mfiano
I think we lack the desire, because of the ease of rolling your own and bending the language to your own thought processes.
20:46:38
phoe
aeth: I don't think it's the issue with money, I don't think the average or median of wealth and/or incomes is on the poor side when it comes to lispers
20:49:01
phoe
then again mfiano's answer is not really an answer in my opinion, because it's more than possible to write software collectively in Lisp and there's dozens of examples of that, and it's possible to write software that is maintainable even after being abandoned by its original authors and then successive maintainers
20:49:08
mfiano
I don't speak for everyone of course, but I think that in addition to the low bus factor, there is also a very low er count for the majority of Lisp software.
20:50:28
aeth
money more as money flowing to people through the project (probably indirectly) is what I had meant
20:51:02
phoe
but if new languages and paradigms appear from the level of zero professional adoption, then in theory it's also a question why Lisp with its strengths doesn't manage to do that
20:51:54
phoe
I was thinking if it's some sort of a question of bringing the software that we have from its current diaspora into one collective place
20:51:56
mfiano
Yes professional use is another factor, and Eric Normand and others have talked about the reasons extensively.
20:53:44
mfiano
Convince companies that they don't need to hire Java boilerplate data entry specialists in drones because they are cheap and expendable?
20:55:46
phoe
I wonder if we could listen to Eric Normand and learn something from the world of Clojure that grew really nice and well
20:57:41
mfiano
Java's success is mostly because developers can sneak modules into existing Java codebases seamlessly.
20:59:03
dlowe
Java's success is mostly from billions of dollars of research and marketing on Sun's part
20:59:09
mfiano
I think performance and the lack of backing by a company such as Cognitect is the biggest concern there
21:00:23
dlowe
anyway, if you want people to use something like a programming language, you have to put it between them and something they want
21:03:51
aeth
dlowe: If by "put it between them and something they want", you mean "require the usage of that language to enter some ecosystem", that definitely works, e.g. JavaScript, C#, or any language by Apple
21:04:42
aeth
dlowe: Perl failed because Perl 6 was even more of a failure than Python 3 in driving away existing users and not offering a clear upgrade path (Python eventually recovered, but was probably set back 5 years)
21:06:09
aeth
phoe: Some are just for one library (in the case of Ruby, Rails) and some are for quite a few libraries (Python), but for the most part, people use a new language when the choice has been made for them (even Emacs Lisp's popularity to some extent)
21:06:46
aeth
Arguably Python's shifting more in this direction because of machine learning libraries like Tensorflow
21:10:31
aeth
phoe: I wouldn't call it "dirty tactics", either. I mean, when Microsoft or Apple or Google does it, they're trying to push for more control, but it's a concept that works in general and includes e.g. JavaScript or even C++. Some domains just force you to use the language, generally to be involved in some ecosystem.
21:11:13
phoe
aeth: agreed. (though the domain of programming for corporate ecosystem X or Y or Z is still dirty gatekeeping in my opinion)
21:12:23
aeth
phoe: To be fair, though, Microsoft did try some language-agnostic approaches like COM.
21:14:45
phoe
aeth: I think that we shouldn't go into this alley because we have no big ecosystem of Lisp software or Lisp-related domain that might act as a reason for people to learn Lisp for
21:15:24
phoe
and the last somewhat successful Lisp-based OS died shortly after hardware it was designed for
21:16:10
aeth
phoe: I think that this is the only "alley" one can go down. The secondary and tertiary libraries aren't going to really take off without primary libraries/frameworks/applications/whatevers that drive people to the language.
21:16:11
phoe
MetaYan: oh? there was something after OpenGenera that achieved some commercial success?
21:17:03
aeth
phoe: I personally think that the main place where any language can attract lots of new programmers is probably games. People will learn any language (Java, Lua, C#, custom proprietary languages, etc.) to mod their favorite games and they're usually too young to know better (i.e. too young to focus just on the most marketable language)
21:17:34
mfiano
phoe: I think one of the best things we as Lispers can do to improve onboarding, is to have better tooling, starting first with SLIME/Sly equivalent for other editors, but in addition, extending asdf to allow versioned/package-renamed dependencies (however possible that may be) for more reproducible builds outside of the near-bleeding edge Quicklisp dist, etc
21:18:32
White_Flame
sure anyone can start a company. Getting a market & customer base is another thing
21:18:55
phoe
MetaYan: that's technically correct advice that I consider to be of little practicality
21:19:53
mfiano
Lisp has a pretty high learning curve even if you discount the learning of a [probably] new editor, configuring it, etc. Emacs is nice and all, but C++ doesn't require MSVC for effectiveness
21:21:00
aeth
I think tooling follows adoption, not the other way around, and some decently popular languages (like Lua) have terrible tooling, but people still use it because the games they want to script use it.
21:21:37
mrcom
I think perhaps Lisp is not as well suited for the niches filled by more mainstream languages.
21:21:50
mfiano
That is true, however I can't even count the number of newcomers to the language that gave up during the learning of Emacs
21:22:18
MetaYan
I can compare the joy of getting Mezzano running on hardware the other day with the aversion to even touching the computer at my last programming gig - which was digging in someone else's spaghetti code in VB.
21:23:41
Gnuxie[m]
There isn't much of an 🆑 ecosystem relative to other languages, that includes both libraries and a labour pool and other than supposed efficiency, the perceived (gains?) of taking CL (as a corperation) doesn't out weigh the risks
21:24:23
mfiano
Then you get the ocassional newcomer that uses Notepad++ complete with dangling parens (usually a student that was improperly introduced)
21:25:17
mfiano
and quickly give up because they aren't utilizing the interactive and introspective workflow Lisp was designed around
21:25:22
Gnuxie[m]
plus, you would also have to fight all the educational institutions too if you went with 🆑, since they are churning out people to write glue in Java, everything is against you
21:25:32
mrcom
Large corporate code bases tend to be structurally.. not complex, but very wide. Lots of elements with specific business-logic, but not as complex algorithms.
21:27:04
MetaYan
Even if I'm far from profocoent in Lisp, I'm tinkering with my own webserver in pure Lisp and even if it's a slow process, I find great joy (and of course occasional frustration followed by even greater joy) of using Common Lisp interactively.
21:27:32
mrcom
Corporate code needs fairly rigid APIs. It takes a lot of effort to make Lisp code rigid. Great for small teams or single developers, but not so much for large groups of teams.
21:29:58
aeth
You can enforce rigidity by requiring the use of certain custom macros, while also requiring any new DEFMACRO to be justified.
21:30:08
MetaYan
Could this be one of the reasons why people don't find Lisp to light up their programming ways? https://www.perl.org/ https://www.python.org/ https://clojure.org/ https://lisp.org/
21:30:25
mrcom
For example, even the simple concept of 'no value specified' is a big deal in the corporate world.
21:31:13
Gnuxie[m]
Does it really 'take a lot of effort'? It takes 'effort' to enforce consistency and expectation in APIs in every other language
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.