freenode/#lisp - IRC Chatlog
Search
2:15:05
akoana
I'm trying to run an external program on linux in sbcl with (uiop:run-program (list "/usr/bin/mpv" "http://stream.srg-ssr.ch/m/rsj/mp3_128") :output :interactive :input *standard-input*)
2:16:03
akoana
the mpv program accepts 'q' to terminate it, but I can't make that work if I start it in sbcl
2:17:42
akoana
I had that working in clisp with run-program, but sadly - on a raspberry pi clisp crashes with errno = 12 (:ENOMEM): Cannot allocate memory. :(
2:20:41
no-defun-allowed
Somehow I wonder if SBCL is doing something with the input stream, but it shouldn't be.
2:20:46
akoana
yeah, I tried that already, no chance sadly, even tried with "bash -c mpv url", the mpv program starts, but does not accept a keypress
2:21:45
no-defun-allowed
Also, I would not expect only the character q to close it, unless mpv has still set terminal(?) settings to not buffer input.
2:22:24
no-defun-allowed
(And if you use SLIME, :interactive input is the stream connected to *inferior-lisp*)
2:23:08
no-defun-allowed
Hey, (uiop:run-program "mpv foo.mp3" :input :interactive :output :interactive) closes with just q.
2:26:28
akoana
I have been struggling with this for hours - now it works with 1.4.16.debian on my raspi
2:35:31
no-defun-allowed
It also works with the "proper" way to specify the command to run, i.e. '("/usr/bin/mpv" "foo.mp3")
2:37:45
akoana
on my workstation it runs like a charm, but on the raspi I guess I've to install quicklisp ("Package UIOP does not exist".)
2:38:34
no-defun-allowed
I think UIOP comes with ASDF, but you can indeed get both quickly using Quicklisp.
2:39:25
akoana
although i installed the cl-asdf package, but maybe thats for clisp only, hmm, Raspian (Debian10)
2:40:39
no-defun-allowed
Right, I've never used Debian's CL packages, so I can't comment. (But it should be accessible by any implementation?)
2:42:02
akoana
yes, I thoght so, but usually I compile clisp and sbcl myself and don't use the distro packages (only clisp for the initial installation of sbcl)
2:43:54
no-defun-allowed
I would recommend Clozure on the 32-bit Pis (a superset of Pi 2), as it has mostly working threads.
2:44:12
akoana
the mpv thing is part of a small internet radio streaming program, with a small database of station
2:45:27
akoana
I have once compiled ccl on a Pi, and it did work well, but the build process on the Pi takes a long time :)
2:46:02
no-defun-allowed
Yeah, I think I just downloaded a bootstrap image and lived with that out of laziness.
2:53:29
akoana
I've replaced some of my old python and shell scripts with lisp programs, and I'm going to continue that :)
2:57:20
akoana
no-defun-allowed: installed quicklisp on the Pi - now I can listen to the music - wonderful!
3:00:59
akoana
It's a small program with a database of internet radio stations, it lets you select a station or add one on the command line or just lists all available stations (without an argument)
5:03:44
aeth
beach: you aren't in #lispcafe so you didn't see the conversation, but can you elaborate on this? https://irclog.tymoon.eu/freenode/%23lisp?around=1598677456#1598677456
5:04:15
aeth
In particular "But maybe this minimalism trend is due tot he fact that their tools are so complex that they can't do otherwise. ... The hypothesis was that, in order to simplify their work (design, first-time development, maintenance), since their main tool (i.e., the programming language) makes their task so hard, they need to cut down on the features. ...
5:20:43
beach
aeth: Today is Monday morning, and Monday mornings are chaotic around here. It may take some time.
5:22:26
beach
aeth: For the minimalist trend, I was just guessing. I don't know what is really going on.
5:23:39
beach
As for the last quote, The guy was just enumerating things that were surprising to him. He didn't have the words to express them necessarily, but one was what I call "uniform reference semantics". To him, it seemed like Python invented that idea, but Lisp had it in 1960.
5:25:07
beach
As for the "better" part, it is just about things that I repeat fairly frequently, namely that Common Lisp was designed by people who know about language design and compiler technology. Some quotations I have seen from the creator of Python seems to suggest that such knowledge is quite limited there.
5:27:38
aeth
beach: I guess it was almost more of a request for comment than a real conversation because we don't know what features you think Common Lisp has that other languages lack.
5:29:58
beach
Again, the guy was lamenting the complexity of C and C++ because they distinguish what he calls "values" from what he calls "pointers", and he seemed to think that Python invented what I call "uniform reference semantics".
5:30:43
beach
He was also talking about things like operator priority in C and C++, and claimed that Python has a much better solution. I claim that Lisp has had the best solution for 60 years.
5:32:07
beach
I wasn't so much comparing Common Lisp to other languages as I was comparing this person's idea about what Python supposedly invented, to what Lisp has had for a long time.
5:33:43
beach
Also, this guy seemed convinced that there must be a distinction between a general-purpose language and a scripting language. Again, he seemed totally ignorant of the fact that you can have the features of something like Python with the power of something like Common Lisp and the speed of a good Common Lisp implementation.
5:34:47
beach
I personally find it unacceptable to have people like that invited to a conference, or to have their papers accepted at one, if they are unaware of Common Lisp.
5:36:32
beach
I also don't see much mention of the main problem with this distinction between general-purpose and scripting, namely that it can be a nightmare to debug and maintain, especially if the semantics are different, and also the problem that users start writing complex code in the scripting language, thereby making the combination slower than if the entire applicatio had been written in Common Lisp.
5:38:14
beach
I am reminded of how a colleague of mine cleaned up the ICMC, the International Computer Music Conference, by taking on the chairmanship and rejecting all papers that didn't make a scientific argument. Maybe a Lisper should take on the chairmanship of a Python conference and do the same.
5:39:23
beach
I am saying that it is easier to maintain an application written in one language with sane and consistent semantics, than to maintain a mixture between a traditional static general-purpose language and a dynamic scripting language.
5:41:06
beach
But the guy was right that the semantics of C and C++, with the distinction between "values" and "pointers" is a horrible idea. And, as I often point out (and as Paul Wilson says), liveness is a global property, so if you don't have automatic memory management, you already either have a maintenance nightmare, or you have a slow application.
5:43:18
beach
I have explained the reason why several times. But basically, either you break the modularity so that you know what the module does with your objects (and you have a maintenance nightmare), or you copy objects, use smart pointers, or use reference counting (and you have a slow application).
5:46:29
beach
So, instead of taking a general-purpose dynamic language with sane semantics and good implementations, like Common Lisp, they combine a static language with horrible semantics that can't be made both fast and modular with a dynamic language with a slow implementation and totally different semantics. And they are proud of themselves, to the degree that they get to speak at conferences.
10:33:03
pve
so basically, anytime I use ensure-class I'm going to have to check that the symbol is not in CL?
10:34:57
phoe
in particular, (sb-mop:ensure-class 'let) should signal the same error that (defclass let () ()) does