freenode/#lisp - IRC Chatlog
Search
6:55:55
makomo
beach: hmm, regarding your comments about FFI. wouldn't it be wasted effort to just recreate a C library in CL and then have to maintain it (i.e. backport stuff that the original implements later on)?
6:57:43
makomo
well, it would take quite a lot of time to port all of those useful C libraries to CL, no?
6:58:09
beach
Then we have to try to estimate how much effort is saved with a Common Lisp version of the library with debugging etc, compared to the wasted effort of having people use libraries written in unsafe languages for unsafe operating systems.
6:59:08
beach
Exactly my point. As long as we look at it as individual efforts trying to solve little problems, we won't make progress.
6:59:35
beach
Only if we can somehow redirect all that wasted effort into improving the infrastructure will things get better.
6:59:51
makomo
do you think standardizing on a language is one of the key points to efficient cooperation?
7:00:35
beach
The discussion started with ltk vs CLIM, and I think McCLIM is an excellent example of people trying to improve the infrastructure for the common good. Many other such efforts could be created.
7:01:52
jackdaniel
and McCLIM has now margins on streams ;-) http://hellsgate.pl/files/4b608de4-margins.gif
7:02:11
beach
I am not in favor of forcing stuff on people. They can use what they want. But, I think we should try to move away from all the unsafe 1960s languages and their "band aid" scripting languages to something safer and faster. I have chosen to do it with Common Lisp. Others my make different choices.
7:05:52
jackdaniel
it is hard to joke with people who take words literally, I'll remain serious then and ignore "CL is a silver bullet" thread like I usually do
7:05:59
beach
verisimilitude: The problem I have is with the idea that we try to emulate a physical machine in one of our processes, so we have this linear address space with access to the stack, and with the requirement that everything be linked into a monolith "executable".
7:07:18
no-defun-allowed
LISP 1 wasn't a normal 60s language though. I doubt anyone cared about symbols and conses, and maybe recursion if I can stretch our imagination a bit.
7:07:27
jackdaniel
I'm pretty sure I get some jokes over the medium (and I did include ";-)", so I'd blame unwillingness here
7:07:51
no-defun-allowed
bash.org/?top is a good counterexample to "IRC doesn't lend itself so much to jokes" though.
7:10:13
jackdaniel
so from serious remarks, lisp is a good language imho (I wouldn't use it otherwise) but treating it as an ultimate abstraction sounds too much like a self-congratulation to me (and I'm sure I'd hear the same from "hooked" forth programmers about forth, and from "hooked" erlang programmers about erlang etc)
7:11:23
verisimilitude
Trying to force a single language is the same issue as with Unicode I mentioned earlier.
7:12:00
verisimilitude
C is garbage though and it's unacceptable to have memory errors for doing trivial things just because they've been written in C first.
7:22:46
no-defun-allowed
What was that library that made pretty-looking ASCII equation printouts with the two dimensional fractions named?
7:23:35
verisimilitude
Are you referring to that Maxima or whatever it was called, no-defun-allowed?
7:24:39
no-defun-allowed
Not Maxima, no. There was a separate library that typeset equations into ASCII art.
7:29:10
aeth
verisimilitude: Unicode is the only solution for multilingual documents. As in, there's literally no other solution that has any kind of real support (well, at least for arbitrary multilingual documents... some languages coincidentally can work together). Sometimes you want one standard for interoperability, like IP. Having Unicode as the standard *helps* languages interoperate.
7:29:28
aeth
If there were 10 different ways to do things, 9 of them would only be available in C and Java and Python libraries.
7:32:33
verisimilitude
Being perfectly clear, I don't give a damn about the minor edge case of multilingual documents and even then I think Unicode handles it poorly with its approach.
7:33:12
verisimilitude
But, a real solution wouldn't have worked well with cat and UNIX and other stupid bullshit, so it wasn't used.
7:34:12
verisimilitude
Text is the universal interface, aeth. ASCII, I mean EBCDIC, I mean Shift-JIS, I mean UTF-16, I mean UTF-8 is the universal interface, aeth.
7:35:21
aeth
UTF-8 at the interface, UTF-32 internally in memory when working on a string like an array. Pretty close to universal.
7:36:57
aeth
It seems like you want a perfect way to handle text in an ideal world where you can create a system from complete scratch. That's not how you get a Lisp system that people use. You need ways to interface with the outside world's formats. Lisp machines even had C compilers!
7:40:26
aeth
Well, personally, I like that text is basically the one place that solved https://xkcd.com/927/
7:41:14
verisimilitude
I've been designing a program for a short while, a first step of sorts towards this goal, aeth. Anyway, the first target of this program was a machine that has no need to interface with the outside world and has no notion of text; when I was designing my metadata format for this, I could've very easily used ASCII for storing some things, but I didn't. Instead, I created my own character set just for this purpose; I much prefer it,
7:44:30
fiddlerwoaroof
aeth: the biggest problem with unicode, imo, is the inclusion of emoji and random little pictures
7:45:52
aeth
fiddlerwoaroof: Emoji is its Trojan horse. Don't support Unicode and you don't support Emoji so even monolingual Americans complain, even though what really matters is not supporting é and ə and ° etc.
7:46:06
aeth
Emoji is the hardest part so if you support that you probably support a good chunk of Unicode.
7:47:13
verisimilitude
But, yes, the inclusion of dead languages, emojis including piles of feces, and other superfluous things is just another reason to dislike Unicode.
7:48:43
fiddlerwoaroof
I, for one, am glad that there are code points for me, should I ever decide to learn Linear B
7:48:43
verisimilitude
I really care about the ability to mix English and Mayan in my filenames, yeah.
7:50:05
fiddlerwoaroof
the problem with specialized software is that it disappears and then your data is all locked away in a format no one can deal with anymore
7:50:33
aeth
The problem with specialized software is it's $1999 just because it's rare, not because it has any quality software engineering behind it
7:50:58
fiddlerwoaroof
I've actually worked with people who transcribe manuscripts, and this is a huge issue: they have transcriptions from the 80s that used some random piece of software they had and now they have to re-type 800 pages of manuscripts
7:52:38
verisimilitude
I have my own ideas about computing and I won't be compelled by those who insist their ideas are great, it's only the entire world needs to adopt it.
7:54:50
aeth
Except such documents at this point are probably only mostly ASCII because they might have a random é or ‽ thrown in.
7:55:02
verisimilitude
Remember kids: The best way to make a new standard is to make it backwards compatible with the most common standard and then boast about how many users you have.
7:56:10
aeth
The future trends of text storage are very clearly UTF-8 thanks to the Internet, though
7:58:05
aeth
As for ASCII being smaller, that just means it can only handle 99% of English user uses. Lots of edge cases. And the problem is that that 1% is different for everyone.
8:00:03
verisimilitude
Well, I submitted an article containing some of my thoughts on this earlier; feel free to read it if you want. I'm now busy with something else.
8:01:03
fiddlerwoaroof
aeth: of course we could always insist that non-English languages just use romanizations /s
8:02:16
aeth
(And multilingual documents are apparently too much of an edge case to have encodings, since the combinations would quickly become quite large.)
8:45:53
LdBeth
Thanks for his consideration, vanilla TeX can just handle many CJK encodings well while troff requires to link against iconv to just accept UTF-8
11:32:16
Josh_2
hmm so I have a question about a problem I don't know how to solve. I have an input from a 720p screen and I need to convert the input (which is a coord on the screen) to the same relative position on a 1080p screen or a 4k. This is CL related as I'm using CL for my program :)
11:46:24
Josh_2
beach: worked like a charm thanks :) now if only I didn't have a curved screen on my phone...
11:48:12
shka__
_death: it is a smartphone, not a standalone screen, plain old iron should be enough
13:49:29
flip214
looks like a colliding business appointment won't be colliding now (proposed for Thu/Fri instead of Mon/Tue), so I guess I'll be there as well!
16:34:12
makomo
what's the usual solution to "i would like to establish a binding within a COND clause"?
16:35:21
beach
I used it as an example when I taught "embedded languages" at the engineering school.
16:36:38
dlowe
another option that I use occasionally is (let (val) (cond ((setf val (get-val)) ...))
16:36:47
makomo
but sometimes you need to bind certain stuff before evaluating the condition, in order to avoid recomputing the condition within the clause's body
16:37:38
makomo
in this case i have 2 subexpressions within the condition that i want to save/cache and reuse within the clause's body
16:37:52
beach
trafaret1: The question is strange because you are in a channel dedicated to Common Lisp.
16:38:52
beach
https://common-lisp.net/project/bdb/qbook/mycl-util/api/macro_005FMYCL-UTIL_003A_003ACONDLET.html
16:40:14
makomo
beach: hmm, that's the reverse of what i'm looking for. the bindings are established only after the clause has been selected (i.e. *after* the condition has been evaluated)
16:46:18
makomo
ah also, i just realized, CONDLET's clauses don't have bodies of their own. there's one main body in which the established bindings (acccording to the predicates) are available
16:54:19
makomo
sjl_: now that i wrote out the usage i had in mind, i'm not sure whether it's more clear or not*
17:03:42
Duns_Scrotus
Hi, I am apparently failing to understand global variables. Can someone explain to me why this doesn't work? https://www.irccloud.com/pastebin/iBDphxFw/huh.lisp
17:06:37
Duns_Scrotus
ok, I am apparently failing to understand function bindings in the global environment
17:07:27
pjb
Duns_Scrotus: lisp has a notion of global variables. But it doesn't have a notion of "work" or "doesn't work".
17:22:38
pjb
(let ((x 42)) (flet ((f () x) (g () (declare (special x)) (if (boundp 'x) x :unbound))) (list (f) (g) (let ((x 33)) (declare (special x)) (list (f) (g)))))) #| --> (42 :unbound (42 33)) |#
17:47:14
Josh_2
Can I use CLX to determine the number of physical displays connected to my computer?
17:47:30
sukaeto
I figure it's because CL programmers are being pragmatic, and binding an existing lib is less work than reimplementing the whole thing
17:47:44
Josh_2
I can get the combined resolution of the created display but not the resolutions of each individual physical device
17:48:27
sukaeto
and I think binding to C libraries is common in non-scripting languages where the users know that their language is as efficient as C for the same reason
17:49:34
sukaeto
also, and this is just a dumb anecdote, recently I needed to build a RabbitMQ client in Lisp. I saw there's cl-rabbit (FFI) and cl-bunny (native).
17:49:54
sukaeto
I wanted to try the native one, I really did. But in the install docs I saw it required a third party library installed on the system.
17:50:14
sukaeto
and it had a note saying "the version packaged with Debian is broken and doesn't work with this library, don't use it."
17:52:37
sukaeto
(sorry if that's entirely unhelpful - it's the only thing I remember about doing this myself, and I'm not at home so I can't just look in my StumpWM configs to figure it out)