libera/#commonlisp - IRC Chatlog
Search
6:31:36
White_Flame
phantomics: CLHS says that "a floating point approximation might result" for anything but (expt <rational> <integer>)
7:49:56
jackdaniel
n.b I'm not "a fan of stable things" - most notably I'm not that cool (a pun towards the word "fan"), but changing stable apis breaks existing code - mind that no common lisp implementation changed nth argument order to match elt, even if someone could have thought that it is a good idea :)
7:51:03
jackdaniel
or that changing the interface of with-output-to-presentation in a non-backward compatible way would break many preexisting clim applications
8:06:03
beach
jackdaniel: It would be much easier to parse what you wrote if you would capitalize NTH, ELT, API, and CLIM.
11:25:08
pjb
jackdaniel: beach: would I suggest to use instead 𝐧𝐭𝐡, 𝐞𝐥𝐭, 𝐀𝐏𝐈, 𝐂𝐋𝐈𝐌, given the flame you can get when using upper case?
13:16:29
pdietz
phantomics: in SBCL, expt will sometimes give different results on the same arguments depending on whether they appear as variables or constants in the form.
15:10:45
AndrewYu
Hey there- I'm here to ask: How feasible would it be to create a Lisp dialect that's as powerful as common lisp, but slightly more elegant (like towards Scheme). An example would be cleaning up the eq equal = eql mess. I'm pretty new, so I'm not sure how many of those pragmatic/syntax comprimises there are. I'd appreciate somehow a list of those weird comprimises. Thanks!
15:13:36
jackdaniel
AndrewYu: equality is a hard problem :) regarding question of how to make something as powerful as common lisp but more elegant (i.e more tailored for your taste), create a separate package that doesn't USE the package CL and define your own abstractions
15:14:48
frgo
I do have a question myself. Anybody have a readily running c2ffi (from https://github.com/rpav/c2ffi) on macOS Monterey? (I'm having issues with building it on Monterey and, well, yak shaving ...)
15:15:45
jackdaniel
AndrewYu: if you look for a different lisp somewhere between scheme and common lisp take a look at eulisp, afaik it has around three implementations, perhaps they even build
15:45:40
pjb
AndrewYu: it wouldn't be too difficult: it's already done. It's called ISO Lisp. There are several implementations. http://christian.jullien.free.fr http://www.islisp.org https://github.com/sasagawa888/eisl etc.
15:49:25
jcowan
"ISLISP" means "IS LISP". There never has been, and by McCarthy's will never will be, a standard or implementation called just "Lisp" (the Scheme community extends that to "Scheme")
15:53:54
jcowan
But that doesn't change the public world. It is no secret that many U.S. diplomats abroad are spies. But for the U.S. Government to announce "Many of our diplomats abroad are spies" would change the public world hugely. See also the jealous husbands who all shoot their wives on day N after a newcomer arrives, where N = number of jealous husbands.
15:57:30
jcowan
With every day that passes and no wife shot (that never happens without proof), public knowledge grows, and eventually each husband knows that his wife (and all others) have been adulterous, so they are all shot on the same day
15:58:13
jackdaniel
I don't understand, but I have a strong suspiction that it is (pick at least one) 1) nonsense, 2) offtopic
16:00:38
beach
AndrewYu: Your premise is wrong. The equality thing is not a mess. It exists pretty much by necessity, as the page by Kent Pitman explains. The fact that you recognize that you are new, should also perhaps indicate that what you consider "weird compromises" may in fact exit for good reasons.
16:04:26
Guest74
it seems any time I try and ask questions related to developing a stable api I get no feedback. I guess I might be weird in trying to develop a comfortable stable api first instead of not changing an api so that it remains stable.
16:05:01
jcowan
https://en.wikipedia.org/wiki/Induction_puzzles doesn't explain this particular puzzles, but the rest on that page are all of the same type.
16:05:37
jackdaniel
I'm not sure how many questions and where you have asked but I agree that starting with an API and only after then implementing is not a good idea unless you have specification
16:06:07
Guest74
I'm a big fan of not writing a specification until you have something that works nicely.
16:07:41
jcowan
I think almost the opposite: write a spec followed by tests and code, and be prepared to change any of them as you go. At the end they should all agree (modulo inevitable bugs).
16:09:04
jcowan
I always tell someone implementing one of my specs to complain if something is too hard or Just Wrong, because the fault is most likely in the spec.
16:10:46
Guest74
i would think the first part of writing a spec would be getting feedback from people in the field, as was done with the common lisp spec.
16:13:49
_death
you start with something instable and use it in diverse contexts, each time changing it to fit while keeping other desiderata.. with such use, it may become more stable.. writing documentation or tests help because these are very different contexts of "use"
16:15:30
beach
Guest74: I don't understand. Do you want feedback on something that has not yet been suggested?
16:16:01
jcowan
Oh, the puzzle I mentioned *is* on that page with genders reversed as "Josephine's Problem" with full details and the solution. Nuf sed.
16:18:14
beach
Guest74: I think you need to write down a fairly complete suggestion and then provide a link to it.
16:22:36
Guest74
keysyms map key codes, what you get from a keyboard, to a printable or non printable symbol, such as TAB or Keypad-1.
16:23:18
Guest74
you use them for binding keypress to functions or to get support for non standard characters.
16:23:51
frgo
Juist for the record: c2ffi problem solved. I now have a running c2ffi on macOS Monterey.
16:25:17
frgo
It was the fact that Apple decides to move the installation location of Clang and tools around and also that homebrew installs now in /opt/homebrew/... and no more under /usr/local/homebrew/...
16:26:25
beach
Guest74: Again, you should write things down on a page an provide a link to it. It should contain existing practice like CLX, CLIM, etc. Also several suggestions with comparisons and pros/cons. Otherwise, I am afraid "feedback" is not meaningful.
16:27:18
Guest74
beach: it's not ideal, and part of the difficulty in getting better keyboard support in clx.
16:27:53
jackdaniel
frgo: I see; if I had a penny each time I hear about some issue due to osx changes I'd be able to buy a lollipop :)
16:30:18
Guest74
for example, they use keywords for case dependent keysyms and so erroneously have :c_h eql to :C_H
16:37:38
etimmons
<https://github.com/cl-plus-ssl/cl-plus-ssl/issues/138> and the later comments on <https://github.com/cl-plus-ssl/cl-plus-ssl/issues/114>
16:39:57
etimmons
Apple decided that loading the unversioned libcrypto or libssl should abort the process. Then, Monterey introduced a change (seeems to be a bug, but who knows with Apple) such that calling dlopen on a non-existent absolute path will result in the OS "helpfully" searching some standard locations to try and find the lib
16:41:23
frgo
Ah! Hm. - I have my own way of dealing with things like this: Do not assume any "load paths" within a CFFI library definition. This *has* to be decided by the OS. So I always set my DYLD_LIBRARY_PATH accordingly and have no issues like that.
16:41:51
etimmons
cl-plus-ssl tries to load the library from a bunch of places to deal with macports/homebrew/fink/pick your poison. If the first one it tries doesn't exist, your process is aborted
16:43:03
etimmons
Yeah, it seems like the solution is going to be similar to what you want. cl-plus-ssl will likely try only the system provided libs. If you want anyother version you have to set it up some other way.
16:43:31
frgo
Using my approach just solves this kind of issue - putting the burden on the application user or a clever script around the application.
16:45:21
AndrewYu
beach: True. My problem is with the names---it'd be better to name eq something like 'pointer-equal?', instead of random abbreviations, if i'm right
16:47:00
jackdaniel
AndrewYu: generally you are right, some names may seem obscure, but in practice this is a superficial problem, they are not harder to memorize than pointer-equal
16:47:59
jackdaniel
t and nil are a different pair of shoes, because each have multitude of meanings depending on the context, so there is no /distinct/ false and true value
16:50:16
jackdaniel
Guest74: if the character case is the issue, you could represent them as keywords that have preserved case
16:53:15
Guest74
which is what my whole question was about, having inconsistency in some symbols having pipes and others not, or going to long form
16:53:43
_death
Guest74: what does "symbols having pipes" mean?.. the name of the symbol :|C-h| is "C-h"
16:56:23
_death
AndrewYu: Common Lisp is a compromise reached by various entities in the 1990s.. if you don't want compromises, write AndrewYuLisp
16:56:30
AndrewYu
I mean, yeah, people used DOS and Windows since long ago, OpenBSD and Linux only existed since the 1995s/1990s. SO switch to Windows... nah. But you're kinda right
16:57:57
random-nick
https://libera.ems.host/_matrix/media/r0/download/matrix.org/lOcqjVoqhLPYRUmpdZgtsZLt/Screenshot%20from%202021-11-28%2009-47-28.png
17:00:44
beach
AndrewYu: As _death pointed out, these are very old conventions. Are you trying to make Lisp more attractive to newbies who don't know these conventions? I am afraid what you are suggesting then won't work. EQ is not one of the reasons Common Lisp is not more widely used.
17:01:30
_death
Guest74: you could also use try readtable-case, modern mode, writing your own reader, etc. I'm not sure what will satisfy you
17:02:25
Guest74
which is what my whole question was about, having inconsistency in some symbols having pipes and others not, or going to long form
17:03:01
_death
you should also know that :C-|iota| is the same as :|C-iota| given the default readtable case