freenode/#lisp - IRC Chatlog
Search
11:36:50
Xach
I feel like I need to set things up on The Cloud instead of buying hardware to tinker with any more
11:38:34
Xach
flip214: possibly, though i have a keyboard and screen and do not have a serial console.
11:41:53
phoe
Xach: the recent discussions have made me think of setting up some sort of semi-public CI for Common Lisp projects, so one can get their code to build and run its tests on the major operating systems and a series of available implementations.
11:42:51
phoe
It would require a considerable amount of hacking, though, plus hardware expenses and licenses for the proprietary operating systems.
11:43:32
phoe
And either buying some Apple hardware or deciding to hackintosh in spite of Apple's licenses.
11:44:13
phoe
Summing all of that up, I think it would be a substantial investment to set up and then to get someone to maintain the hell out of this while accepting more and more projects to be built there.
11:44:42
phoe
Maybe the clnet foundation would be willing to help with that. I don't know, I haven't asked anyone or even shared that full thought with anyone before.
11:46:01
galdor
technically you already have multiple CI systems, e.g. Github Actions or CircleCI, depending on what you need
11:46:35
galdor
it's really easy to write CircleCI orbs to support multiple CL implementations in an easy way
11:47:06
phoe
correct, one other way would be to depend on another existing CI service for each project
11:48:02
galdor
commercial CL vendor could decide to support opensource by providing some kind of special CircleCI account for example, or a collaboration with Drew DeVault for sourcehut
11:48:21
phoe
I've already seen Travis configs that allow one to run tests against multiple CL implementations, too
11:49:20
galdor
personnally I do not care too much about CI, I can already do that easily, I'm more concerned by the absence of a rebar3-like tool to manage dependency source/versioning on a per-project basis
11:50:18
galdor
I'd love to include some non-critical CL tools at work, but the whole "go install quicklisp and run commands in a CL repl" is never going to fly
12:12:51
phoe
Xach: rebar3 is a module manager for erlang and other BEAM-based languages like elixir and LFE
12:14:58
flip214
Xach: "easier" as in "only one cable required", but if there's none available, the point is moot
13:58:15
p_l
Sourceforge in its heyday had a fleet of machines to make testing across different arches easier
14:02:23
easye
Neil Lindquist has made a good start to abstracting a generic need to test Lisp on a CI <https://github.com/neil-lindquist/ci-utils/>. I haven't evaluated this yet, but it looks promising.
14:03:43
easye
The CLF has long had the intention to "refactor" a given developer's common needs into something reusable and available under gitlab.common-lisp.net
14:04:38
easye
From ambiently following phoe's forays on the CI available from gitlab.common-lisp.net in the past week or so, I gather there is a fair amount of work to do.
14:05:34
phoe
easye: we'd basically need Windows/Linux/macOS VMs. Given that CI can run foreign code, we'd need some way do dispose of these VMs and create them on the fly - preferably via snapshotted VM states or something similar.
14:07:41
easye
One idea that the CLF tossed around was getting donations from commercial entities in the Common Lisp space to fund such a generalized CL CI by enticing them with versions that would easily allow a developer to test on a given commercial implementation as well.
14:11:08
easye
> we'd basically need Windows/Linux/macOS VMs : I'll bring this up at the monthly CLF meeting this Wednesday to see how we could possibly get such resources abundantly avaialable. One idea might be to approach AWS/Azure/GOOG with a request for donating such services.
14:14:17
boeg
Anyone here use sly for common lisp in emacs? How do I quit sly without manually killing the buffers? Like a quit command that brings things down and removes buffers and so on
14:17:40
boeg
beach: when I type , it shows a "command" with commands available like disconnect and clear, no quit though. Does ",quit" also clean up buffers or just close connections?
14:20:20
boeg
hmm, alright. I've tried the sayoonara command, the disconnect-all command and they just seems to close connectins to the underlying sbcl, but does clean up the compilation buffer and repl and so on
14:22:06
phoe
easye: note that this would allow to have a kinda-centralized CI for CL projects - Quicklisp could use it during its build process to build and run tests on multiple OSes/implementations, for example.
17:11:28
Josh_2
Can I convert an instance of a classes superclass into that class? I have a superclass called packet, can I instantiate that and then later convert it into an instance of class kill-packet which inherits from packet?
17:28:32
phoe
when you create any Lisp object, usually its type stays the same throughout its whole lifetime
17:39:33
phoe
(defvar *foo* (make-instance 'foo)) (assert (typep foo *foo*)) (change-class *foo* 'bar)
17:40:35
Shinmera
Obviously if you change instances you do not control that's bad, but that goes for changing slot values too, not just changing class.
17:40:46
phoe
basically, this is a way to defeat type safety in Lisp, since an object can stop being of a particular type because you executed some code on it
18:03:13
_death
the issue with change-class is that it can be slow, and sometimes it is a sign of unoptimal design.. it may also have issues with multithreading
18:10:32
_death
yeah, but there's more familiarity with using locks or atomics when it comes to modifying slots than when it comes to change-class..
18:15:16
jeosol
I have a question related to deployment and commercialization of lisp apps, e.g., protecting exe (?), do it as API calls. Or it's a lot of work.
18:17:00
jeosol
To give an example, imagine, applications that people spend time to assemble, and that requires deep domain expertise, and I want to package them as exes (simplest option) or expose some API for it
18:20:43
phoe
you have an array of some stuff and you want to apply a function on each element and get a new array?
18:31:09
mister_m
for context I have a list of directories I want to "map" to a list of files in those directories, then just flatten the nested list. I _think_ I can do that by reducing with #'append.
20:40:04
slyrus__
all of sudden some code that used to work started throwing an error about 12 being an invalid index for a (SIMPLE-VECTOR 12). I suppose I should have guessed what was going on right away.
20:40:47
_death
we should return to old times, where names meant something and december was the tenth month
20:45:02
_death
was the workaround to increase vector size by 1? or to change indices?.. if the former, hope there's no modular arithmetic
21:02:23
vsync
imagine if in our calendaring for some reason we kept the numbers associated with names like "tenth month" and indexed the rest chronologically
21:03:02
vsync
so one would actually write "2019-10-01" for today; july and august would end up as 11 and 12
21:05:51
Bike
"why isn't october the eighth month? i wish the guy who made it the tenth got stabbed" "Good news!"
21:06:52
pjb
slyrus__: In Pascal, you would define an enum january .. december, and use it to index the array. In CL, you could use keywrods and a hash-tableā¦
21:08:43
pjb
Bike: because the guy who named it was a Roman, and Romans started they year in March. But then Christians came and started it in January.
21:09:35
pjb
Bike: become world dictator, and set the start of the year to your birth month for fun!
21:19:05
vsync
stupid date/array tricks: (let ((year (make-array '(52 7) :initial-element nil))) (dotimes (month 12 year) (map-into (make-array 30 :displaced-to year :displaced-index-offset (* month 30)) (constantly (elt #(jan feb mar apr may jun jul aug sep oct nov dec) month)))))
21:28:35
_death
the whole purpose of moving the leap day around was so that people celebrate less and work more.. and your calendar adds FOUR nil days
21:34:04
aeth
Shinmera, _death: The problem with change-class here is that the one reference where you're changing the class might not be the only reference. Especially not related to _death's example where you're setf'ing x, not changing the value of 5 into -123. It'd be more like (setf (aref x) -123) there.
21:35:44
aeth
In particular, you could have objects that use the MOP to enforce constraints about the information that can be stored in the object. Obviously, the compiler won't trust that because of things like change-class, but the user might.
21:36:10
aeth
Imagine having a class that restricts x to plusp via a check on all sets to the slot, which is afaik bulletproof except for change-class.
21:55:24
aeth
_death: You can create a metaclass which enforces an ASSERT on a slot SETF based on some constraint defined in the DEFCLASS. e.g. https://gitlab.com/zombie-raptor/zombie-raptor/blob/d5771d8b78973e44aa98af8916dbed6fb49f5588/util/metaobject.lisp
21:56:17
aeth
I did this because more than half of my docstrings for slots were basically expressable as types, although since that apparently requires ASSERT instead of CHECK-TYPE (since the type isn't known at compile time) you could assert basically anything.
21:57:06
aeth
_death: Right. So let's say you enforce a PLUSP on slot x via the MOP. That enforcement can be completely broken by CHANGE-CLASS afaik. In another thread, too.
22:20:11
_death
but there is an issue.. if update-instance-for-different-class signals an error, what is the state of the object? it's already of the target class, and the discarded slots are nowhere to be found.. maybe a change-class wrapper would do.. this suggests a more elaborate protocol
22:28:19
Xach
cool, https://github.com/mare5x/LispQR does something I was thinking of making myself just a few days ago
22:38:25
Xach
I'd like to modify it to just return the 2d bitmap so I can draw it however I please, but that will have to wait for license info
22:50:04
_death
oh well, tried to read the QR code with google goggles, but apparently they disabled it with only a link to google lens.. the store page for it tells me it's not compatible with my device.. hooray. but at least I came up with a new Bruce Schneier fact: Bruce Schneier can not only decode QR codes with his eyes, but also encode them
23:28:26
akoana
Xach: seems a license (MIT) has just been added: https://github.com/mare5x/LispQR/blob/master/LICENSE.txt