libera/commonlisp - IRC Chatlog
Search
12:04:51
ns12
kathe: So what OS do Common Lisp programmers use? Linux? Some Linux distributions use NetBSD's ports tree (pkgsrc). There are zero Common Lisp libraries in pkgsrc.
12:11:09
phoe
they are a constant source of anguish and conflicts to anyone who has them installed and wants to use e.g. Quicklisp
12:14:15
ns12
Isn't that ASDF's fault for not allowing users to arbitrarily add/remove/reorder the directories where libraries are found?
12:16:48
ns12
AFAIK, it is not possible to make ASDF ignore a single directory such as /usr/share/common-lisp/cl-asdf/
12:19:20
ns12
Suppose I have installed many Common Lisp libraries using APT. The libraries get installed in /usr/share/common-lisp/ (e.g. /usr/share/common-lisp/cl-lib1/, /usr/share/common-lisp/cl-lib2, etc.).
12:19:20
ns12
How do I make ASDF completely ignore the existence of /usr/share/common-lisp/cl-lib1/ only?
12:20:14
phoe
(let ((asdf:*central-registry* (remove #p"/usr/share/common-lisp/cl-lib1/" asdf:*central-registry* :test #'equalp))) ...) ?
12:21:32
ns12
asdf:*central-registry* is NIL by default, so there is really nothing to remove from it.
12:22:15
ns12
"I'd simply clone cl-lib1 into my local-projects and have this one provide cl-lib1.asd" - Yes, but then ASDF will complain/warn that there are two different versions of the same library ...
12:23:42
phoe
I do not have a lot of practical ASDF experience, I use it for simple cases most of the time
12:23:45
ns12
"I have no idea how to exclude it the "proper" way" - I actually have no idea whether or not it is possible. I'll read the docs again (for the fourth time...).
12:25:19
ns12
Me too, I use it for simple cases most of the time. I just have not figured out how to make ASDF ignore one single library at a specified filepath.
12:35:01
_death
maybe something like putting (:source-registry (:exclude "cl-lib1")) in ~/.config/common-lisp/source-registry.conf (I've not tried it.. check the manual for more info)
12:56:41
phoe
minion: memo for marcoxa: a CDR idea would be to make DESCRIBE for symbols configurable, so e.g. if I create some custom namespace mapping from symbols to my custom objects, I can have this reflected in (describe 'foo); the portable DESCRIBE-OBJECT mechanism doesn't allow for that.
13:04:20
phoe
_death: I'm looking at LISP-NAMESPACE and the horrible hack it uses for actually adding things to DESCRIBE output
13:04:45
phoe
and the worst thing is that it seems to work, and that LISP-NAMESPACE is the 51st most popular Quicklisp system
13:06:58
_death
just because someone wrote something doesn't mean it's a good idea?.. and just because it's been downloaded many times doesn't mean it's popular (= used by many)
13:09:50
beach
Perhaps it is best to supply something entirely different both for DESCRIBE and DOCUMENTATION. I mean, no other module depends on them, so we might as well design a new mechanism for them.
13:10:28
beach
That way, we could plan for internationalization, for instance, but also for something other than raw text for DOCUMENTATION.
13:12:35
phoe
I assume we could use a client technique to pass additional arguments to DESCRIBE or DOCUMENTATION, just like Eclector does with READ
13:14:13
Shinmera
Granted, I never had the time to actually make use of it. But I hoped it would find some use when the Radiance documentation was translated into Japanese. Sadly it never got beyond the primary documentation file (so no docstrings were localised)
13:14:46
beach
Anyway, I was also thinking of structured documentation that can contain links, and that can be presented in different ways.
13:15:40
Shinmera
I think someone here used my documentation-utils package with an extension of their own to provide structured docstrings that are then just compiled down to a plaintext version for backwards compat.
13:25:11
phoe
...the elephant in the room that is here is that none of the implementations seem to define an :AFTER (SYMBOL T) method on DESCRIBE-OBJECT
13:35:03
_death
so there's a semantic network project called sneps.. sneps3 is from 2012 and seems to use ltk/common-graphics or a java gui.. it also has allegro-specific code for loading (no asdf), wonder how much effort would be needed to get it to work portably.. and it seems they decided to rewrite in clojure :o
13:41:38
_death
with some gamedev toolkit (trial) maybe an interface like http://www.wikiwebapp.com/ can be written for introspecting the lisp image
13:56:46
_death
I did just try some alloy examples, and seems to mostly work.. menu-bar items appear to have wrong widths (maybe has something to do with stumpwm?)
13:57:43
Shinmera
fwiw we just released a jam game written using Trial that's fully open source: https://github.com/Shinmera/vpetjam with binaries / screenshots here: https://shinmera.itch.io/vegetablemash
13:59:03
Shinmera
_death: The glfw backend uses the fond text renderer, which is abandoned. The maintained backend is the msdf renderer, but that one requires precompiling texture atlases for fonts using an external tool. |3b| has been working on the pure-lisp version of that for some time, and hopefully it'll be ready for use this year so I can switch to that and purge the fond one.
14:07:55
morganw
Could I ask, was there ever a working prototype or theory about how to run a Common Lisp game on Android or iOS?
14:25:30
foxfromabyss
Is there a better way of searching for a library, than querying this? https://www.quicklisp.org/beta/releases.html
14:27:13
phoe
is there anything in the spec that guarantees that (let ((x 1) (x 2)) x) will signal an error?
14:29:27
foxfromabyss
Is it also possible to find the source code for a quicklisp library? specifically looking for a readme or smth similar
14:29:45
phoe
foxfromabyss: https://github.com/quicklisp/quicklisp-projects/tree/master/projects/zpb-ttf
14:30:00
foxfromabyss
yes but .. i am *searching* for a library and not sure if the one i found is the one I am looking for
14:53:04
epolanski
hey all, pretty new to common lisp. I wanted to ask if there's some library to write html front ends in pure common lisp. I don't really need much js interop I can implement all I need on my own
14:56:49
epolanski
interesting I want to give it a spin, I have recently released a pet project and since I have already all E2E tests setup I thought it would be nice to create an experimental branch and TDD the same application in a different language, possibly common lisp
15:18:38
epolanski
ok but generating templates is one of the issues, what about interacting with dom APIs?
15:19:57
epolanski
e.g. making SPAs in scala, elm, haskell, ocaml is possible, wonder if that's true for common lisp as well
15:22:24
epolanski
can I use something like https://github.com/cxxxr/valtan to implement some bindings to JS apis?
15:23:17
Shinmera
You can use stuff like Parenscript to pretend like you're writing CL which is then spit out as JS
15:24:07
Shinmera
There is currently no full implementation that can compile to JS, and it is unlikely it would be worth it anyway, due to the runtime size imposed by the CL standard.
15:26:17
Shinmera
Common Lisp is a big standard, with a lot of stuff that is needed to make an implementation compliant. For instance, the entire compiler needs to be available at runtime. By necessity this makes the runtime large.
15:26:20
epolanski
I'm new to CL but I've read that many CL functions are not implemented in CL itself but, e.g. in C
15:29:13
Shinmera
epolanski: To preempt things, how functions are implemented is an implementation detail. However, all implementations that are in serious use implement most of their library in CL. C is only really used to interface with the operating system or to implement very hairy things like the GC.
15:29:14
epolanski
I'm not ultra fond of the book to be honest, not as much as I was in SICP when I've first read it
15:31:23
minion
epolanski: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
15:32:57
epolanski
Shinmera: then I guess that it's similar to how JS node makes syscalls implemented in a different language.
15:33:34
beach
epolanski: And you can remove Land of Lisp from your list. It contains so many errors that it is embarrassing, and it is likely to give the reader many incorrect ideas.
15:34:55
aeth
iirc, Land of Lisp has a whole chapter that only works in CLISP, which hasn't had a stable release in over 10 years (July 2010)
15:34:56
Shinmera
Snide comment: "don't trust hacker news" seems like a generally applicable recommendation :)
15:35:22
aeth
and imo CLISP was never that good of an implementation unless you needed low RAM (because it's bytecode interpreted, not native compiled)
15:36:41
pve
Clearly there should exist a "html templating library construction kit", that makes the user answer questions like "Name of library?", "Use CLOS? Y/N", "Single or multiple packages?", "Coding style? [80's, 90's, ...]" etc and then output the library. This way people could get the feeling of rolling their own, without wasting a bunch of time ;)
15:37:12
Xach
There are a few users who post good/interesting Lisp info on HN. I follow lispm, mikelevins, reikonomusha and a few others directly via https://hnrss.github.io rather than going to the site.
15:38:06
aeth
HN was always about startups... Lisp and programming-in-general content has gone down and complaining-about-housing-costs-in-SF has gone up as the bull market rallies for over a decade now.
15:49:45
_death
I found land of lisp entertaining, but I was not a newbie at the time, and I wouldn't recommend it to newbies
15:54:33
aeth
tyson2: well, my impression at the time, and it has been years, is that it seemed oudated.
15:56:25
aeth
my impression of PCL is that it doesn't seem... linear? I definitely read the chapters out of order as needed
15:57:48
tyson2
I decided not to try using PCL on windows, will install it in WSL (probably using Docker image), and develop from emacs on windows, which I'm comfortable with
16:11:15
etimmons
qhong: Since you referenced the discussion a few days ago, I'm guessing you're also interested in loading multiple versions of the same system into the same image? Perhaps even as part of the dependency tree of a single project?
16:11:27
etimmons
If so, I think your rename-package hack will also likely make generic functions way less useful.
16:11:50
etimmons
Let's assume there's a system (and package) FOO. It defines the class BAR and has a generic function BAZ with a method specialized on BAR.
16:12:05
etimmons
Then I have a system qux that somehow pulls in two different versions of FOO in its dependency tree. Let's say they're renamed to FOO@1 and FOO@2.
16:12:16
etimmons
Under the current practice, it'd be completely fine to share instances of BAR across different branches of the dependency tree.
16:12:32
etimmons
But if that happens with the rename-package hack, you'll likely end up calling FOO@2:BAZ on a FOO@1:BAR instance. No such method exists for that: boom.
16:15:08
etimmons
beach: I really need to read your paper on that. It's very interesting to me, but so far I've been inferring capabilities based on what other people are saying
16:16:10
beach
The only invention is the cell thing to make function calls as fast as in typical Common Lisp implementations.
16:16:17
qhong
etimmons: I'm still thinking about what reproducible mean under CL context. I think the problem stems from the absence of distinction between "software" and "config" in Lisp system. Different version of "software" should be definitely isolated, but maybe not so config. We may heuristically count all special variables and generic functions as configs.
16:16:44
etimmons
I guess my biggest question is how can different environments interact (if at all). That's not something I've been able to glean from listening to others
16:17:38
phoe
EdLangley[m]: the main issue with GENERIC-{FLET,LABELS} is the special operator CL:FUNCTION - we want it to return the GF itself, rather than some intermediate function that wraps over it (as would be the case with FBIND)
16:19:19
phoe
_death: https://www.reddit.com/r/lisp/comments/s1itqi/the_common_lisp_omnificent_gui_online_lisp/
16:19:39
phoe
tyson2: https://www.reddit.com/r/lisp/comments/s1itqi/the_common_lisp_omnificent_gui_online_lisp/
16:22:22
phoe
EdLangley[m]: it seems that a real GENERIC-FBIND trying to bind a function named FOO would need to bind a generic function object as some lexical variable #:FOO, then walk the body form and rewrite it in order to replace (FOO ...) calls with (FUNCALL #:FOO ...) and value occurrences of #'FOO with just #:FOO
16:22:49
phoe
and that's ugly but necessary if we want CL:FUNCTION to work correctly in that context
16:23:44
phoe
either that, or get an implementation-defined FBIND, or use some kind of DEFGENERIC-with-an-anonymous-name trickeries like that post mentioned
16:41:49
Bike
i wonder if an fbind could be useful for other things. if not generic functions, some other kinds of funcallable instances.
16:45:29
phoe
but there isn't such a thing, AFAIK, and won't be because FBIND requires evaluation before a function is bound
16:45:53
phoe
the best there is is SERAPEUM:FBIND which does macrology and binding intermediate functions to work around this
16:47:14
phoe
OK, let me clarify: "won't be" as in "I have no idea if any implementer actually considers it worthy enough to implement it as a true special form"
16:50:39
Bike
guess it could be slightly complicated since now #'foo can mean something other than a known function or global lookup. probably not a huge deal though.
16:51:29
phoe
the whole point of it being a special form is it interacting with CL:FUNCTION the same way that CL:FLET and CL:LABELS do
16:51:58
phoe
how exactly its semantics are implemented is a bit more complex I guess, because you need to grab a function as a value and stuff it back into the function namespace
16:52:26
phoe
and unlike with FLET/LABELS you have no idea what kind of function object it is, you don't know its lambda list or type
16:52:51
phoe
I guess that can complicate a FBIND implementation, unless the programmer provides appropriate FTYPE declarations
16:53:43
phoe
like, (defun foo (fn) (fbind ((fn fn)) ...)) - inside the body we have no idea what #'FN is like or how to optimize it
16:56:48
phoe
like, a naïve version would be to rewrite FBIND into LET, FUNCTION of FBIND'd functions into variable references, and calls
16:59:05
Bike
oh i'm just thinking of how to do it as an implementor. if i wanted to try a userspace thing i'd probably just shadow cl:function and #' and call it good
16:59:34
phoe
I'd call it sorta ugly and actually rewrite the body instead, so I can keep the original cl:function and #'
17:02:15
Bike
i figure it would be fine since if you're using fbind you're already doing an extension thing, and also it's lexical, so the fbind user is also the one using the shadow #'
17:02:38
Bike
fbind would toss some information into symbol-macrolet, which the function macro would then use, and if there wasn't any fbind to the name it would just expand into cl:function
17:32:53
phoe
I supplied it as a dependency for a MIT library, and that's not a good thing licensing-wise
17:35:55
pl
qhong: people have issues understanding what GPL means for /C/, Lisp is probably exposing it even more :/
17:36:45
phoe
I guess it's same as elsewhere, you need to share source code for everything in your Lisp image when you deliver binaries containing GPL code, plus anti-tivoization clauses in case of GPLv3
17:39:43
phoe
I have no idea :D it probably uses the same mechanism that allows you to deliver GPLv3 code using proprietary compilers, e.g. MSVC or Intel for C/C++
17:40:37
phoe
yes, the main exercise here is that there's no good way to tell apart the code and the platform in image-based environments
17:42:12
foxfromabyss
I am trying to use https://github.com/fukamachi/websocket-driver, specifically the client part
17:42:12
foxfromabyss
But it fails with HTTP 400 being unexpected, regardless whether I target a remote, known-to-work, server, or the local server, done like the example in the repo suggests
17:44:16
random-nick
I think GPL has a section about system libraries, which is what allows you to compile with proprietary C compilers but I don't know if something like the entirety of lispworks counts as a system library for the GPL
17:45:16
dbotton
phoe I added a link in a comment on the lisp meeting to a small follow up video with a fully fleshed out builder including events, etc https://www.reddit.com/r/lisp/comments/sd9wf1/clog_builder_cl_web_3_awesome_lang_awesome_tool/
17:45:25
random-nick
I think it's more about the system libraries being interchangeable with free ones
17:45:53
phoe
random-nick: well, you can grab SBCL instead of LispWorks and deliver with that I guess
17:46:12
phoe
and you can grab the free implementations of these extensions too :D or write them if they don't exist
17:53:01
EdLangley[m]
Why wouldn't (let ((#1=#:foo (make-funcallable))) (flet ((foo (&rest args) (apply #1# args))) ....)) work?
18:07:42
Bike
EdLangley[m]: what i'm envisioning here is situations in which you want to do something with the instance other than call it.
18:09:52
White_Flame
dbotton: your URL included "web_3" and I was about to rail against that phrase ;)
18:11:41
Bike
that said, while i've probably defined more classes of functional instances than 99.9% of lispers, i've never really needed to lexically bind them.
18:14:02
Bike
partly that's probably because i'm using them within an implementation, though. people writing software software probably have different patterns
18:22:07
dbotton
White_Flame lol well nothing has changed on the web in a very long time, including people trying to hi jack names with version numbers
18:50:04
dbotton
shinmera as we I use to say in my corporate days - but it worked on my machine - ie don[t blame for human error ;)
18:53:20
Shinmera
Anyway, sure wish I had the money to hire another programmer so I could concentrate on, you know, actually designing stuff instead of fixing the myriad of bugs in my tower of yaks
19:11:37
dbotton
If I had the money I would hire a programmer to add the robustness needed that I get in other languages like Ada that don't come for free but you are forced to address from the start
19:18:39
Shinmera
For the scale of the kind of game I'm building I'm definitely way under-budgeted and under-staffed :/
19:53:49
lagash
foxfromabyss: make a sacrifice to the Goddess Fortuna, where you'll find the answer through a series of lightning bolts striking your house
22:53:45
phantomics
For all who are interested: I will be hosting a webinar on the April APL compiler (compiles APL into Common Lisp) tomorrow at 16:00 UTC. You can see the webinar at https://zoom.us/j/858532665, the passcode is 391680 It may be early for American viewers; that's 8am on the US west coast
22:54:43
phantomics
This webinar is hosted by the British APL Association, so it'll offer a look at April from the perspective of APL users, as opposed to my last presentation which was directed at Lisp users