freenode/#lisp - IRC Chatlog
Search
3:49:20
fiddlerwoaroof
nij: my hope is to come up with a way to specify a set of git repositories to clone and generate an ASDF configuration from, all within lisp
3:53:50
fiddlerwoaroof
Something like line 75 here: https://git.fiddlerwoaroof.com/u/edwlan/git-systems.git/blob/master/git-systems.lisp#L75
3:54:54
nij
I hope so too, that'd be the first step without using hash. Emacs has this too - https://github.com/raxod502/straight.el
3:56:36
lukego
splittist: I hopefully pressed the right button to give you commit bit. welcome to push directly :)
3:56:50
pjb
fiddlerwoaroof: have a look at: https://github.com/informatimago/lisp/blob/master/tools/make-depends.lisp
4:00:50
nij
pjb: Would you mind explaining a bit how it reltaes? And if you think it makes sense to merge this into asdf?
4:04:11
pjb
nij: oh, you mean a configuration for asdf, not an asd file? I thought you meant the later. That code reads lisp sources (notably defpackage forms), and generate file dependencies. This could be used to generate asd files.
4:06:38
pjb
I thought you wanted com.informatimago.common-lisp.make-depends.make-depends:generate-asd
4:07:54
pjb
I still find that asdf:*central-registry* is perfectly good… https://github.com/informatimago/lisp/blob/master/tools/asdf-tools.lisp#L126
4:11:49
lukego
luis: If CLIM feels heavyweight maybe an alternative solution could be a slimmed down CLIM? Maybe it even already exists e.g. an ASDF system within McCLIM that loads what we need for Emacs but not other parts e.g. X11 and PDF backends. The more I play with McCLIM lately the more it feels like the core APIs don't require /that/ much machinery.
4:28:03
fiddlerwoaroof
pjb: the code I shared clones the specified git repositories and generates and ASDF configuration that makes them loadable with load-systems, I think it's slightly different from what you're sharing
4:28:31
fiddlerwoaroof
lukego: isn't part of the issue with SLIME just that it has to be careful about depending on libraries that might conflict with the user's projects?
4:29:30
fiddlerwoaroof
I wonder if there's some-way to use the mechanism it has for picking sbcl/ccl/lispworks backends to also allow us to use mcclim if it's already been loaded
4:36:13
engblom
Is it possible to compile a standalone binary? (asdf:make :my-project) is not standalone, as it still requires that all dependencies are installed.
4:38:18
pjb
engblom: you can save an executable image that contains all the dependencies, so standalone.
4:39:30
pjb
engblom: in the case of ecl, it's different, since it generate elf binaries. But you can do essentially the same, for lisp dependencies.
4:42:12
splittist
I seem to remember that refactoring the clim asd/loading mechanism was on a roadmap somewhere (possibly even as 'done'). If you don't need the font/CLX stuff then it's already pretty lightweight. And it's virtually nothing compared to the giant piles of js every tab in your browser is loading for no apparent reason.
4:44:06
engblom
fiddlerwoaroof: Lets say you have a project that got dependencies on a few library. When doing (ql:quickload :my-project), quickload will pull down all dependencines. If you then do (asdf:make) you get a binary, but it does not contain those libraries so if you move it to another computer it will not run
4:47:10
lukego
luis: current state of "nested presentations" in CLIME: Emacs sees just one image, but the mouse-sensitive presentation regions form a tree, with the innermost ones overriding the outer ones. for now those regions are all rectangles (bounding boxes) but Emacs can do polygons/circles too. if you (accept TYPE) then the non-matching presentations go away and don't occlude the acceptable ones
4:55:36
White_Flame
lukego: regarding heavyweight, GUIs really should be heavyweight. Good text support, complex layout, hardware acceleration, nice antialiasing, caching, etc can all be pretty large features that give good quality and offload work from the user. I think it's a resonable tradeoff
4:56:18
White_Flame
and IMO making a heavyweight GUI layer is the only way for complex things to run fast
4:56:57
White_Flame
(in a general programming sense, not a hpc/gaming sense which tends to seek fixed pipelines for everything)
4:58:54
lukego
White_Flame: Fine but in this context Lisp doesn't do that work anyway: it's outputting SVG and Emacs/imagemagick is doing that heavy lifting stuff.
5:08:25
lukego
more reuse potential would be to port the little bit of Elisp code to Javascript and then have browser-based CLIM too. but that's not really my wheelhouse.
5:09:48
fiddlerwoaroof
What you're probably running into is shared libraries not being present: there's workarounds here (e.g. bundling the .so files with your executable or providing a shell script to install them with apt or various static linking mechanisms) in most cases I find that I can just cut the problematic dependency (osicat is one thing I try to avoid depending on, for example)
5:28:28
White_Flame
lukego: yeah, I've been threatening to do something like that for a long time, although I'd likely not go clim
5:29:03
White_Flame
the browser languages have a ton of cruft, but also great features & quality of rendering
5:42:05
nij
fiddlerwoaroof: Oh yes that's quite neat. That would solved my issue for system fetching.
5:43:59
fiddlerwoaroof
But, the idea would be to define a specific commit with something like this: (:git "fwoar-lisputils" "https://github.com/fiddlerwoaroof/fwoar.lisputils.git" "751faf8a933f1a7a023945b544f0f1b563964391")
5:44:54
fiddlerwoaroof
the :git bit at the beginning lets you also pull down tarballs from an HTTP server or something, the next component is a directory name, then a source url and the commit hash
5:47:45
fiddlerwoaroof
I think it's basically a good idea to separate the system definition facility from the facility that resolves the systems to urls
5:48:30
fiddlerwoaroof
e.g. if I fork CFFI, I should just be able to change the system -> url mapping without having to mess with ASDs or anything
5:49:35
fiddlerwoaroof
So, all the code I have does is clone the git repositories to a project-specific directory and configures ASDF's source registry
5:50:55
fiddlerwoaroof
I haven't thought this through entirely, but I like how ASDF just specifies a list of system names as dependencies
5:52:08
fiddlerwoaroof
I also generally just dislike the idea of version pinning: my experience with NPM and Maven has basically convinced me that version pinning just sort of enables dependency churn
5:53:00
nij
If we can specify which dependency to use by the hash of the system, that would be a huge leap.
5:53:49
nij
fiddlerwoaroof: yeah, I agree too, so let's use this instead: 0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i-hello-2.10.
5:53:54
fiddlerwoaroof
If you're forced to upgrade to the most recent release of all your dependencies every time they update, you'll just stop using third party libraries that are inconsiderate about breaking changes
5:55:30
fiddlerwoaroof
The problem I have with version pinning is that it encourages you to not upgrade your code to the new version
5:55:41
nij
Another way is accretion, but that requires the whole community to acknowledge.. so I think hash pinning is one of the best practical ways so far.
5:56:35
fiddlerwoaroof
I just have a rule: if a library makes too many breaking changes, I either fork it or I write my own version of the library
5:57:56
fiddlerwoaroof
It makes it easier because they don't have to deal with a maintainer that is inconsiderate of the library's users
5:59:08
nij
With hash-pinning, a build either works or not works. If it works, people can rebuild it with confidence.
6:00:34
no-defun-allowed
I am mostly unaware of any dependency pinning techniques, as libraries I use don't make breaking changes apparently. But it seems like you would have to pin everything in the general case.
6:00:58
no-defun-allowed
Say, if a kernel changed the syscall interface, then code might not work. Or do you pin the kernel version?
6:03:49
fiddlerwoaroof
no-defun-allowed: a nice thing about Linux is that Linus is pretty adament of not breaking syscalls, iiuc
6:04:09
moon-child
most userspace libraries break all the time, making the kernel policy not _super_ useful
6:04:51
no-defun-allowed
fiddlerwoaroof: Yes, my argument rests on unlikely circumstances. Though using *BSD or some other weirdo not-macOS-or-Linux Unix clone is an unlikely circumstance that some #lisp participants take part in.
6:04:56
fiddlerwoaroof
but, the stable syscall API means that containers are usually sufficient as opposed to VMs
6:04:59
moon-child
java/npm practice is to pin major version, but allow updates to minor versions. The theory being that minor versions will not break compatibility but major versions may. From what I can tell this works out ~~alright in practice
6:05:38
fiddlerwoaroof
moon-child: however, everyone ends up using package-lock.json which forces dependencies to have the correct hash
6:06:17
fiddlerwoaroof
maven's version conflict resolution algorithm is "pick an arbitrary version and hope it works"
6:06:55
fiddlerwoaroof
Which works surprisingly well, until you run into something like a transitive dependency on five different incompatible versions of Guava
6:08:45
nij
no-defun-allowed: uh I think hash pinning can only guarantee reproducibility in terms of building.
6:08:49
fiddlerwoaroof
My experience with npm and java/clojure has lead me to think that _not_ pinning and just fixing breakage as it comes up ends up being better
6:09:52
nij
fiddlerwoaroof how do java/clojure community do? They explicitly ban any sort of pinning?
6:11:37
nij
I've heard of Hicky's idea on accretion. But I don't know how they force people to use that method.
6:12:19
fiddlerwoaroof
You end up with million-line codebases stuck on a 10 year old version of hibernate because it would take a week to upgrade
6:13:22
fiddlerwoaroof
And, the solution is generally to use CI tooling (e.g. Dependabot on Github) that automatically bumps the version whenever a new version of a dependency is released
6:14:42
fiddlerwoaroof
Clojure is a bit more like CL, though: most Clojure libraries I used are safe to upgrade and even go years without active maintenance because they're considered "done"
6:31:40
moon-child
the erlang creator once proposed--not entirely seriously--I think--but who knows-- a scheme where libraries would be obviated and functions would be identified exclusively by hash
6:35:15
fiddlerwoaroof
I have generally started to come around to a similar conclusion: https://gbracha.blogspot.com/2009/06/ban-on-imports.html
6:37:16
fiddlerwoaroof
Nix does this, a module is basically just a function (although you can use imports to specify default argument values), and I think this sort of parameterized module system solves a lot of problems
6:38:37
moon-child
I thought nix operates on the level of whole libraries, not individual functions?
6:39:00
moon-child
(and indeed, I don't know how you could do the latter unless the language were built for it, in the face of e.g. global variables)
6:39:47
fiddlerwoaroof
All the expression's dependencies get passed as arguments like this: https://github.com/coq/coq/blob/master/default.nix#L24-L33
6:40:41
engblom
I saw Clojure and libraries being mentioned and there is one thing I think Clojure does better: When creating a new project all dependencies are pulled into the project folder and you specify exactly what version of the libraries you want to use. Like that you can ensure your application will compile even if the upstream library would be completely rewritten. But of course it put some responsibility on the
6:44:15
beach
engblom: How does it handle the situation where two applications need different versions of the same library, and the two versions can't coexist in the same image?
6:44:58
fiddlerwoaroof
Unless you're doing fancy classloader stuff that few people actually does, Maven has a rule for resolving the conflict
6:46:33
beach
I can't see how you can simultaneously respect the exact version that has been specified, and resolve the conflict by picking a different version.
6:48:23
fiddlerwoaroof
The way modules work, a single module can be included multiple times with multiple versions
6:51:17
fiddlerwoaroof
I think Racket/various Schemes might also have a solution here, but I've never used them enough to find out
6:52:26
engblom
beach: You probably mean "one application need different versions of the same library". I have never tested that, so I do not know how that works. If two separate applications need the different versions that is no problem.
6:53:35
fiddlerwoaroof
engblom: I'm a bit surprised you haven't run into this. I've never worked on a substantial Clojure project that didn't have issues with version conflicts among the transitive dependencies
6:55:31
engblom
fiddlerwoaroof: The projects I have done in clojure are smaller, and often raspberry pi related, or some other small tools. I am the author of https://github.com/engblom/gpio which is a gpio library written in Clojure.
6:55:40
luis
lukego: slim-clim could work! re presentations, I have an optimisation that I want to commit (dropping overlays) that I might need to coordinate with you
6:56:29
engblom
fiddlerwoaroof: I have plans to make a gpio libary in CL, once I get time. The better startup time of CL is the motivation. Clojure takes a lot of time to start up on rpi.
6:57:08
luis
moon-child: if Linux didn't commit to not breaking user-space containers would be much less reliable wouldn't they since they share the host kernel
6:58:16
engblom
The Clojure library I wrote is using /sys for handing gpio. As it is on its way to get deprecated, I will make the CL library using some kind of ffi instead.
7:00:58
beach
engblom: The way I (and I assume many others) think of the Common Lisp image is that it replaces the operating system as a launcher of applications, so I want to have all my applications in one image, and I start them from the REPL.
7:01:57
beach
engblom: Otherwise, if you are doing individual Unix executables, you deprive yourself of the more closely collaborating applications you can have when you run them all in one image.
7:02:32
jdz
fiddlerwoaroof: What do you do when a library fixes critical security issues, but only in the maintained newer incompatible versions?
7:02:53
beach
engblom: In other words, you probably wouldn't want to do something that you just described in Common Lisp.
7:03:30
beach
... unless, of course, you are using first-class global environments and put each application in a separate first-class global environment.
7:04:04
fiddlerwoaroof
Oftentimes I just go the route of writing my own X, in which case there's no guarantee I'm affected. But, you can also backport/etc.
7:04:33
fiddlerwoaroof
beach: Java has classloaders (and more complicated things like OSGi) that are roughly in the same solution space as first-class global environments
7:04:54
jdz
fiddlerwoaroof: And any way you look at it, the "feature" of keeping and depending on exact versions of some libraries is not actually a feature, but a misfeature? And the real issue is breaking changes.
7:04:59
fiddlerwoaroof
There's a build tool for Clojure called "boot" that uses them to acheive the sort of isolation necessary
7:05:13
MichaelRaskin
I think there was a ELS talk that just renaming packages strategically works well enough in practice to load multiple versions of the same thing
7:05:28
fiddlerwoaroof
jdz: yeah, version pinning makes it easier for library maintainers to introduce breaking changes
7:05:57
beach
MichaelRaskin: I guess that would work. Was the talk this year? I guess I missed that aspect of it.
7:06:55
fiddlerwoaroof
And, IMO, you generally want to set up the incentives to shift the cost of a breaking change more towards the library's maintainer
7:07:25
jdz
fiddlerwoaroof: Of course everybody wants to do that, because the then don't have to pay.
7:08:38
fiddlerwoaroof
Breaking changes in most systems are externalized from the maintainer onto the end-developers
7:08:45
MichaelRaskin
Library -> users actually beneficial to the library is not always as obviously a one to many relation
7:09:38
fiddlerwoaroof
So, in terms of total cost, moving the cost of breaking changes away from the users lowers the total effort that goes into maintaining the language's ecosystem
7:10:14
fiddlerwoaroof
JS is sort of a nightmare here because there's so much churn that old libraries often just don't work
7:11:32
fiddlerwoaroof
jdz: also, dropping maintenance of a library and releasing a new library under a different name is acceptable to me
7:11:54
fiddlerwoaroof
it means that if someone steps up to maintain the old library, they aren't competing with the new version
7:12:55
jdz
fiddlerwoaroof: Sure. My argument (and experience) is that library version pinning is a double-edged sword.
7:13:32
fiddlerwoaroof
Yeah, I may have an overly negative view of it because of the issues I've encountered of being stuck with obsolete versions
7:14:20
fiddlerwoaroof
Ultimately, I don't like practices that favor short-term development speed over long-term maintenance cost
7:15:52
MichaelRaskin
To be fair, as underlying implementations have no explicit goal to break everything twice a year (unlike Chromium), Common Lisp packages are typically not too prone to breaking changes, unless they are FFI wrappers of something constantly-breaking
7:17:16
MichaelRaskin
beach: https://european-lisp-symposium.org/static/proceedings/2017.pdf#section.0.2
7:17:47
fiddlerwoaroof
The thing I appreciate about CL is that my code stays as broken as I left it, for the most part
7:21:07
MichaelRaskin
beach: notice that speaking of multiple applications, package name conflicts are not the only problem in practice, say, on SBCL
7:21:11
fiddlerwoaroof
I think identifiers being objects rather than strings makes a big difference here
7:22:26
MichaelRaskin
Well, if strings were patchable (like library references in ELF), it would also be not too bad to brute force…
7:23:59
MichaelRaskin
fiddlerwoaroof: re: churn — I guess people who value active maintenance regardless of presence of reported bugs or whatever are succesfully filtered out by the stuck standard (which could benefit from maintenance but there is no clear path to do it…)
7:25:07
fiddlerwoaroof
Interestingly, I think linux control groups enable you to namespace things like ports and other system resources on a thread-by-thread basis
7:25:35
fiddlerwoaroof
I wonder if that could be leveraged to eliminate othe issues with multiple applications in the same lisp image
7:32:13
MichaelRaskin
fiddlerwoaroof: I don't like that we do not have any surviving venue to centrally recognise something the definitive list of minor mistakes in the standard, or something like that
7:32:57
fiddlerwoaroof
MichaelRaskin: yeah, although I think the compatability-library route like bt and usocket is fairly successful
7:33:58
MichaelRaskin
beach: I think I have tried to run StumpWM as just another thread in an image with an interactive REPL; I remember StumpWM doing interesting things with error handling globally
7:35:20
fiddlerwoaroof
beach: one of these days I've been planning to look into your "virtualization" technique you've mentioned a couple times
7:35:49
moon-child
MichaelRaskin: hmm. I think your memory management structure looks a bit like a lattice in that case
7:35:50
Nilby
I run multiple applications in the image, but I try to avoid FFI except at the kernel level, and I try minimize dependencies.
7:36:03
moon-child
because you want both an environment-local and a thread-local cache, to optimize locality and reduce contention
7:36:11
MichaelRaskin
beach: well, depends on what happens when something tries to allocate too much…
7:36:57
lukego
I'd like to see a lisp that tried replacing threads with some proper way to do concurrency/parallelism :)
7:37:00
MichaelRaskin
fiddlerwoaroof: compatibility libraries are somewhat «worse than Javascript» in the sense of recognising just the implementation name and dispatching on that
7:37:44
MichaelRaskin
So, a new implementation needs to be mentioned everywhere even if it mimics one of the existing ones (but different ones for different things)
7:38:24
MichaelRaskin
And, a very low level change an implementation can leave a wrapper without a good response to support both versions (see hu.dwim.walker)
7:39:19
splittist
My vision for the spec would be: 1. an acknowledged starting point - dpANS (+ issues); 2. a community-developed and recognized 'notebook' (for replication) that transformed that source material into 3. a canonical object representation (with spec-specific objects like 'glossary reference', 'return value', 'chapter'); and 4. as many output formats as folks wanted to create from that object representation - a pretty PDF
7:39:19
splittist
for printing; a pretty PDF for reading on devices; my-kewl-html version; your-kewler-js version; etc. etc.
7:40:38
Nilby
I use thread pools with lparallel a lot, and run applications in threads from the repl.
7:41:41
lukego
Maybe I'm channeling Graydon Hoare but for me if there are threads and shared state on the bottom layer then I don't want to even try building something reliable. Just too many things that can go wrong in too many places. This is the main reason I wouldn't even want a Lisp Machine if there was a modern one.
7:42:21
no-defun-allowed
Hm, yes, Graydon Hoare. Famous for avoiding mutable state. And making a language which attempts to make mutable state safe.
7:42:26
MichaelRaskin
fiddlerwoaroof: trivial-features would need to grow a decimal order of magnitude to approach being an answer to anything
7:42:51
lukego
fiddlerwoaroof: okay, sure. but you can put in hard boundaries. Linux kernel-user barrier contains the threads there for example. Likewise BEAM. The application code is not exposed to the underlying shared memory threading at all.
7:43:04
no-defun-allowed
ACTION uploaded an image: (180KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/RCDSrrvjRDUZxoWjMgWVwjMt/hello-cringe-department.png >
7:43:35
fiddlerwoaroof
Lisps are all about not having that sort of hard boundary between the system-designer and the end developer
7:43:40
lukego
fiddlerwoaroof: Yeah. I am usually that guy too, enthusiastically embracing features that scare off other people, but not on threads. I just say no.
7:43:45
Nilby
I do think if there was a Lispy way to properly optionally isolate threads / resources, that would be good.
7:43:50
nij
With that I can just call any library I like out there, without worring its updateing, no?
7:44:15
lukego
fiddlerwoaroof: Yeah. And I appreciate that about Lisp. But it's also the reason I wouldn't want to do too much important work inside a Lisp image.
7:44:15
fiddlerwoaroof
The thing is, if you have the necessary primitives, I think it can be mostly safe?
7:44:26
no-defun-allowed
But even Haskell and Clojure people don't complain about software transactional memory.
7:45:37
nij
fiddlerwoaroof: Say my program depends on xad..aslkjd-hello-2.10, it it's updated I don't really have to care.
7:45:52
fiddlerwoaroof
That's a big part of the reason why, when I left Python, I didn't settle on Ocaml, Ruby, Node, etc...
7:46:00
no-defun-allowed
"When I said 'falliable shared state', the 'falliable' was in massive sarcasm quotes. I could take a bath in this stuff. Put it on cereal, rub it right into my eyes. Honestly, it's not deadly at all... to me."
7:46:09
lukego
fiddlerwoaroof: I have plenty of scars from production outages on "mostly safe" systems though. even BEAM we once spent a whole week chasing a production problem that turned out to be a C routine calling a non-reentrant libc function and this routine just happening to be exercised by more threads on this particular deployment. that was standard file I/O code in BEAM that had been written years before with the bug dormant
7:46:58
lukego
fiddlerwoaroof: but lparallel seems really awesome to me. I understand that it can coordinate a bunch of forked lisp images each producing partial results. that's that kind of stuff I like.
7:48:31
no-defun-allowed
In my opinion, you can try to do a supervisor tree-type thing with shared state by treating anything which touched that state as faulty and restarting it. But it is just an opinion as I haven't worked on my supervisor tree-type thing implementation for ages.
7:49:30
fiddlerwoaroof
lukego: I think the thing is I've tended to design around immutable state anyways
7:49:40
lukego
Nilby: but everyone is different. I don't write multithreaded applications and I don't write string processing code in C. beyond that I am game for most things :)
7:50:29
lukego
I only like immutability if it's real. Not just a quasi-immutable layer as a leaky abstraction. That's also why I'm not really interested in clojure.
7:51:00
lukego
but sorry I am sure that if we scrolled back 15 years in the channel log I would have said all of these things before ad naseum so I will put a sock in it now :)
7:51:06
no-defun-allowed
Perhaps you can rationalise that by saying "well, a shared mutable object is just a cheap poorly synchronised faux-process, so the same rule applies for when a process you need crashes".
7:51:55
MichaelRaskin
lukego: I also like false branches of if really not being executed and definitely not leaking data, but well…
7:52:40
fiddlerwoaroof
Yeah ever since Spectre, I've just assumed that computers are broken from bottom to top
7:54:16
Nilby
fiddlerwoaroof: They really are, especially when you consider all the crap hiddnen in firmware, and microcode.
7:54:17
engblom
And even without spectre, I consider OS broken. As any bigger OS is written in C/C++, I can not trust them.
7:54:28
MichaelRaskin
Rowhammer is just too much cost cutting with clear remedy that costs not too much
7:55:13
MichaelRaskin
Speculative execution is something people discussed making safe for a decade (always failing to find a convincing solution), Intel saying that nah it's all safe, then Meltdown
7:55:14
engblom
I can not trust anything that is written in a language not taking care of memory management. In any bigger project there are 100% sure bugs because of bad memory management.
7:55:17
no-defun-allowed
I usually don't mess up with shared mutable state (which is mostly immutable except for concurrent hash tables, queues, etc, sure). And, while I am never going to test it, my coping mechanism suggests that I would mess up synchronisation about as much with CSP or actors or whatever else.
7:56:17
moon-child
MichaelRaskin: rowhammer and spectre are both the result of side channels--that is, details which were not correctly modeled
7:56:51
fiddlerwoaroof
My impression, though, is that rowhammer isn't an issue in the design of memory, it's a result of memory manufacturers being cheap
7:57:11
lukego
splittist: I'm learning a lot of CLIM-fu from your examples! I had no idea about stuff like FORMATTING-TABLE as seen in https://snipboard.io/Z84UlJ.jpg. I must be reading the wrong parts of the manuals.
7:57:36
MichaelRaskin
Like, it is well known you need to refresh charges, it is well known if you do not do it enough you get noise…
7:58:09
moon-child
yes, but presumably they had sufficient refreshes to get sufficiently good reliability for non-pathalogical/malicious scenarious
7:58:41
moon-child
in many cases, to exploit rowhammer you needed to explicitly tell the cpu to flush a cache line to memory. Meaning that with normal cpu memory access patterns the flaw would not have been exploitable
7:59:03
moon-child
s/the flaw would not have been exploitable/bitflips would not have generally occurred/
8:01:38
nij
Hello! Is there a de facto way to compute a fingerprint of a CLOS object? I want to get the hash of an asdf system.
8:04:10
beach
nij: The term "CLOS object" is meaningless. Every Common Lisp datum is an object, and every object is an instance of some class, and all classes are part of CLOS.
8:05:33
nij
Hmmm I thought we went through this last time beach. I wasn't pretty convinced that the class named T as an object is an instance of some class in CLOS.
8:06:22
nij
no-defun-allowed I don't want a minor change in the source code to change the hash.. e.g. (1 2 3) and ( 1 2 3)
8:08:37
nij
system class n. a class that may be of type built-in-class in a conforming implementation and hence cannot be inherited by classes defined by conforming programs.
8:09:02
no-defun-allowed
That doesn't leave it open! Seriously, stop trying to sound smart with this.
8:09:36
nij
no-defun-allowed I'm not trying to sound smart. I've spent some hours really wanting to get this right. If it's not right, I'm always happy to learn.
8:10:27
no-defun-allowed
A further hint is that there are no exceptional situations for CLASS-OF. i.e. any object that is described by the standard has a class.
8:10:58
no-defun-allowed
Yes, we don't necessarily know which class #.(find-class 't) is an instance of, but it is an instance of SOME class.
8:12:32
no-defun-allowed
As I understand it, anything you could call CLASS-OF with is necessarily an object. And CLASS-OF does not signal errors. Ergo, every object is an instance of some class.
8:13:48
nij
(beach I'm not de-valuing your comment. I'm just interested in this and want to get it right.. Thanks for your comment!)
8:14:18
jdz
nij: Are you now convinced that the "class named T as an object is an instance of some class"?
8:17:18
no-defun-allowed
If we keep calling CLASS-OF with the class of the last object, we will invariably get to STANDARD-CLASS. Is STANDARD-CLASS "a part of CLOS"?
8:17:37
lukego
splittist: the new CLIME text stuff is all working great on my machine so far! awesome :-) actually it's at the point now where I think I'll write some real application code rather than just throw-away tests
8:18:17
lukego
I don't feel ready to attack the Commands / Command Tables stuff yet. have only glanced at that API. need to read and digest a bit.
8:18:22
nij
no-defun-allowed: hmmmmm makes more sense to me now. It seems that I was in the pitfall of thinking that a class must be well-defined in CLHS in order to be a CLOS class.
8:19:38
jdz
nij: So you've been told to not use the acronym. And you'll notice, that when you drop it, the intended meaning of your sentences does not chaneg.
8:20:32
nij
mfiano: in #clschool beach told me that AMOP might not be fully compatible with CLHS. So I'm afraid no..
8:21:19
nij
phoe: hmm what makes it special is that CLHS leaves system class as an implementation dependent thing? But it's still a class in CLHS.
8:21:54
nij
jdz: I mean I'm just a curious noob that tries to learn. I will keep updating my knowledge if there's a chance.
8:22:26
nij
phoe by that I mean it is still an instance of the class named CLASS, according to CLHS.
8:23:06
nij
jdz: How so? Err.. I'm sorry if I act differently than my word. That would be off-topic, but I'm open to talk about it in another place! I'd be grateful if you could point it out.
8:24:30
jdz
nij: If you were curious and wanted to learn, you'd just go and read AMOP, and then come back and ask more informed questions.
8:25:45
phoe
and since classes are an integral part of CLOS, it also teaches about how to make classes work
8:26:42
phoe
AMOP is a book that contains a description of how to implement CLOS and also has an example simple implementation of CLOS called Closette
8:28:22
nij
jdz: I see. I had the mis-impression that CLOS is the object system described by the common lisp standard.
8:28:33
mfiano
Here you can see all types graphically, which is a superset of all classes: https://sellout.github.io/media/CL-type-hierarchy.png
8:29:00
jdz
nij: Common Lisp standard describes the language Common Lisp, pretty sure you know that.
8:29:18
phoe
the standard describes the interfaces that the programmer can use to interface with CLOS as a part of ANSI CL
8:29:54
phoe
but it doesn't say anything about how the whole machinery works underneath - it actually refers to AMOP for a description of that.
8:30:51
jdz
nij: Are you convinced now that the acronym "CLOS" in "CLOS class" and "CLOS object" in the context of Common Lisp is redundant?
8:31:21
phoe
the standard and AMOP are both talking about the same CLOS, just from different points of view
8:32:49
phoe
nij: http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_m.htm#metaobject_protocol
8:35:06
nij
Indeed, a class given in CLHS doesn't have have to be implementation independent. I now did not know why I insisted on that.
8:35:08
phoe
the standard talks about the part of CLOS visible to an average CL programmer, whereas AMOP talks about the parts that make it work
8:41:49
nij
Thanks for your patience jdz phoe. My blindspot was that I falsely insisted on that a well-defined concept in CLHS must be implementation independent.
8:43:08
phoe
if CLHS defines that something must be true, then every implementation must follow this in order to conform to it
8:43:28
phoe
if CLHS defines that something *may* be true, then implementations are free to do whatever
8:45:15
nij
zacts nope. As a newbie too, I just recently found CLHS amazing. It provides a definition for CL, and it's never going to change.
8:51:48
fiddlerwoaroof
lukego / splittist: it all works right on 27.2/linux/gtk/cairo but I get weird results on 28/macos/cocoa/quartz
9:04:30
beach
lukego: Hey, you didn't have to leave #sicl. We could just quit discussing that particular topic.
9:07:47
Nilby
nij: simple naïve system checksum using ironclad: https://plaster.tymoon.eu/view/2438#2438
11:09:32
lukego
splittist: How do you judge that :HUGE is the appropriate text size for a short string inside a 100x100 square? text sizing is a bit of a mystery to me
11:09:54
lukego
ACTION realizes he has not read the relevant part of the CLIM docs and goes to do that
11:14:02
lukego
Seems that you can also provide a point size but what does that mean in terms of pixels and/or normal CLIM geometry?
11:14:44
lukego
Just now for example I'd like to draw a string centered in a circle and I'd like for ~ 10 characters to fit before spilling out of the sides. is there a good way to specify that?
11:14:44
jackdaniel
currently it means em on 72dpi (so if you have 144 dpi screen, then it will be twice as large as it should be)
11:15:21
lukego
or in splittist's example - what you care about is the size of the lambda relative to the size of the rectangle
11:16:14
jackdaniel
say you have text style size 10. then you call text-size on your string with that text style, that gives you metrics for the string
11:16:54
jackdaniel
otherwise you have things like kerning and different character widths/heights in a way
11:17:36
lukego
I'm not looking for exactness here though, I'd like to e.g. just say how wide an M should be in pixels or something. I'll draw a thousand circles, labelled with a string in the middle of each, and aesthetically I'd like them all to be the same size and "not too many" of them to spill out
11:18:57
jackdaniel
it returns couple of values, so it is possible to determine pixel-perfect bounding box of the particular text, or the size in font metrics (height = ascent+descent, width = left-bearing + text-width + right-bearing)
11:21:14
jackdaniel
since we are sharing lambdas: https://pbs.twimg.com/media/EYaTG60XgAMVNX1?format=jpg&name=4096x4096 :-) (an old picture)
11:21:18
lukego
ok. I was kind of hoping for a (with-font-height (10 :units :pixels) ...) or something but it sounds like such a beast could be written based on these apis
11:23:46
lukego
I'm tempted to use CLIM's nice utility functions for drawing tabular data but since this is CAD data I need to be careful e.g. about one unit == one millimeter and can't really rely on automatic sizing of anything but decorations like labels
11:25:29
jackdaniel
(draw-text* s "foo" 35 35 :align-x :center :align-y :center :transformation *scaling* :transform-glyphs t)
11:28:14
lukego
narrator: He had already made up his mind to hard-code a magic number because it sounded too complicated.
11:32:40
_death
apparently presentation translators are not invoked when typing something for accept? mouse battery died..
11:33:39
nij
I'm about to push a repo to quicklisp. It requires me to test it on at least to implementation. How should I do that? Or if anyone can help? Thanks :)
11:33:57
jackdaniel
_death: I think that you are right, translators are checked for the pointer input
11:34:38
jackdaniel
nij: by "test" it means that you ensure that it runs at least on two implementations
11:35:08
jackdaniel
so run it i.e on sbcl and on ccl, if it works on both then you should be good to go
11:35:38
splittist
nij: you can get a docker image with lots of implementations specifically for this purpose
11:39:01
nij
"Fourth, make sure it builds with ASDF.." What does it mean by "builds"? I've put my repo in local-projects, and loaded with (ql:quickload..) successfully. Does that count?
11:40:13
Xach
some projects require extra steps, like running ./configure or setting environment variables etc, and those are not compatible with quicklisp
11:40:35
nij
Yes, then I think that's fine. There's no ./configure or anything like that. Just a plain .asd file.
11:40:59
nij
I better learn the testing part carefully tomorrow. After that I'll try to raise an issue. :-)
12:09:29
edvardo_
Why is the standard way to perform recursion in the lambda calculus the Y combinator instead of Lf.Lx.f f x?
12:10:59
lukego
woo woo I'm starting to write real application code with CLIME now :) visualizing Xilinx BGA pinouts https://twitter.com/lukego/status/1392449057814196228/photo/1
12:16:04
lukego
Here's where I'll need good zoom support though. In each of those little circles I want to be able to write a label like "MGTVCCAUX_RS" and that will take some extra pixels :-) but I'm hoping that since this is vector graphics (SVG) that scaling can just be done locally by Emacs at arbitrary magnification without bothering Lisp for a new version.
12:16:34
lukego
Gonna also need a convenient way to toggle viewing the latest CLIM presentation in a full screen window
12:17:41
lukego
Maybe actually zooming could be done in such a dedicated buffer/window with a specialized keymap
12:18:31
Shinmera
Is there a relatively supported vector graphics format that's not insane like svg?
12:19:54
jackdaniel
I don't understand what's insane in embedding a programming language in the vector graphics format
12:25:35
White_Flame
does Cairo have some file format for graphics, or is it all function call based?
12:37:23
jackdaniel
White_Flame: it may be serialized to uchar* but there is no format specification
12:57:59
etimmons
nij fiddlerwoaroof : Both CLPM and Qlot can do version pinning, including of git repos.
12:58:44
etimmons
I think the best solution to version pinning encouraging not updating is to make a regular CI job that updates and runs tests for you. That's trivial with CLPM, I assume it is with Qlot as well
13:01:26
etimmons
nij: I'm not entirely sure about what you want regarding <hash>-hello-2.10. But presumably if you really want such a scheme to be reproducible, you need some service to distribute those hashes as well, no?