libera/#commonlisp - IRC Chatlog
Search
9:25:42
dnhester`
mfiano: have you used it? How does it compare to the julia package manager you were so happy about?
9:27:43
dnhester`
MommyDearest: Usually that means you have two versions of slime being loaded. If you are useing roswell, check your roswell directory where a slime folder should be available, and then you can delete the one emacs's package install downloaded...
9:30:15
mfiano
I have not as it didn't interest me, using alternative delimited file formats and, per project dependencies can't work with the image-based development workflow I and many others use.
9:56:49
dnhester`
mfiano: thanks for replying. I am just curious that's why I asked. I don't know anything about OCI so I didn't follow the docs. I read your critique praising the julia package manager and was wondering if this was similar. you spoke about how you ported some of your code to julia, would the opposite be easy as well? Would it take a lot of effort to port the julia package manager to CL to serve as an alternative to quicklisp?
10:03:03
mfiano
That praise was a long time ago and only really applies because it is a batch-compiled language at the end of the day.
10:06:13
mfiano
Lisp is an image-based language, and the package system prevents the same package name existing in the same image. Attempts to 80% this are usually by those coming from languages that haven't fully leveraged this ability yet, in my opinion.
10:08:18
mfiano
THose types of package systems make sense when programs development involves compiling files up front. In Lisp, we don't have to use LOAD or COMPILE-FILE to invoke the compiler even.
10:15:12
mfiano
Julia is an image-based language, with many similarities to CL, but it has to precompile everything with LLVM up front, and is designed to work with packages having the same name. Infact, some years ago, I dismissed Julia because the package (in the CL sense of the word, module for Julia) system was so buggy because of this. Live recompiling a function would, infact, define a new package with
10:15:14
mfiano
the same name for that new function, and the REPL would be in a same-name/different-identity package with no intuitive way to know what is what.
10:16:55
mfiano
Languages that try to mimick CL's features often do it poorly when the gestault of everything is put together, and Julia is no exception, despite it being my second choice, if I ever had to not use CL (at the time I "switched" to Julia, I was not in a very good state of mind. I am happily using CL)
10:17:59
mfiano
The beauty of CL is not its features, but how they all fit together seamlessly (mostly) and written out in stone for many years and many more to come.
10:25:45
dnhester`
mfiano: thanks for taking the time to write that. I've had issues myself with the versions of packages, and I very much dislike that quicklisp is not secure by default (https). I am using qlot, which has worked fine so far, but I wish quicklisp would support versions of packages, and that we didn't depend on a person to decide what get's in the registry or not.
10:27:16
dnhester`
Does anyone use the CL Critic? https://courses.cs.northwestern.edu/325/exercises/critic.html#critic Sorry I had accumulated a bunch of questions for a while. I noticed that there is no default linting discussed in the sources I've read. That's why I am asking. I know there are style guides, but it would definitely be useful to get style warnings as I'm compiling my functions into the repl...
10:29:46
dnhester`
looks like the last commit was two years ago, but that's not necessarily a bad thing if it works better than quicklisp https://gitlab.common-lisp.net/clpm/clpm
10:39:30
mfiano
So, I guess the tldr is, Julia has in a very good source code loading system for being a batch-compiled language, or any language, dynamic or not, that operates on file units. I had the fortune of nearly simultaneously picking up CL and Python when I started to get serious about learning to program, and I dropped Python after about a year. Not because of its speed or because it is interpreted,
10:39:32
mfiano
but because it is such a slow process to have to load files instead of modifying the code you want now. I was getting more practical, working applications done with less time spent learning Lisp, than I was with the addition year of Python experience and more time allocated to trying to bend it to my liking.
10:50:07
mfiano
At the end of the day, application performance doesn't matter if a program never gets completed. CL makes it easy to prototype and you have an array of choices for performance for your particular hardware/platform, in-language and implementation choice.
11:01:46
mfiano
A word of wisdom if you will: I find that most of programming is thinking about programming, rather than typing out source code. Take breaks from programming and let the subconscious think, and have a design plan to start. It is more efficient.
11:15:14
mm007emko
Since the vast majority of SW projects spend the vast majority of their time in "production" or "maintenance" phase (however you call it), even for longer projects, the coding speed is not that important. Maintainability and flexibility
11:18:36
mm007emko
A project, which never hits its market at least as a functioning prototype, is never created.
11:21:32
mm007emko
If you can't make the project reasonably performant, the costs of running it can make you go out of business. If you can't make new features, competitors can take over. If you can't fix bugs or change its behaviour, customers might be upset.
11:24:02
mm007emko
If your project breaks when a dependency is updated, it's a lost time. I have been spending the last 3 months updating a larger Python code because of breaking changes on dependencies. I wouldn't like to do that if I wasn't paid (I am so I don't care, using shite like Python at least provides a job security :) )
12:47:30
green_
dnhester`, be sure to check out ocicl: https://github.com/ocicl/ocicl -- it is https-always, and supports package versioning, among other things.
13:07:24
dnhester`
green_: yeah, that's how the conversation started: I asked mfiano if he used it and his thoughts
13:26:23
dnhester`
green_: I don't know much about kubernets so the readme page is not so easy to read. it feels like I need to know how OCI works to understand what's going on. I'm going to tinker with it when I finish a milesone in my current project and I have some time to explore. Does it work with qlot or is it meant to replace both quicklisp and qlot?
13:27:01
dnhester`
It would be nice if the docs had a simpler quickstart detailing usage, and change the title of the current quickstart to be "tutorial"
13:27:48
dnhester`
green_: out of curiosity: why did you have to make a fork of every repo instead of just adding links to the existing repositories?
13:28:16
green_
I just saw that, and mifano's comments now. re: mifano's comments ... ocicl doesn't force you into per-project dependencies, as you can use a global system collection. I'm not sure what the concern is with alternative delimited file formats. Perhaps he's referring to systems.csv. I'm not sure what the concern is really, as that's just an implementation detail. It does solve important problems with quicklisp,
13:28:17
green_
although I realize that if you aren't experiencing those problems there's little reason to switch.
13:30:23
green_
dnhester`, there's a repo for every project, but it just contains metadata. The nice thing about doing it this way is that you can leverage github actions to build and publish new versions on a project by project basis by just updating the metadata (git commit hash, release version, etc).
13:33:05
green_
dnhester`, you don't need to understand OCI. That's really just an implementation detail.
13:35:45
dnhester`
it looks like a cool project if it solves the issues, but it's just too confusing to be able to take it in in 5 or 10 minutes, which is what I would expect at most from a package manager
13:35:49
yitzi
green_: the number of repos in in oci is bit overwhelming and I don't find the "all-ocicl..." file to be useful to figure out if my systems are included. Perhaps a file dump of the git addresses?
13:37:20
dnhester`
is there a quickload access or it just downloads and then in ASDF I have to load the project?
13:38:49
green_
dnhester`, no it's not available from the repl, but that's a good idea. Once the ocicl-runtime package is loaded, ASDF can download and load systems in one go by setting ocicl-runtime:*download* to t
13:41:14
yitzi
green_: I manage a few CL packages in the Arch AUR. I can look into making one for ocicl if you want.
13:43:57
green_
For the OS package, I will leverage the system's oras package, and not use the bundled one. Does Arch has oras packaged?
13:54:38
dnhester`
green_: I re read the docs again, this is pretty cool. good job. it looks like quicklisp and qlot combined (not sure if I'm missing qlot functionality, but for the parts that I've been using at least). I will probably move from quicklisp to your project pretty soon, it's actually pretty cool. However I had to read the docs 3 times for it to sink in
13:55:17
dnhester`
I would write it with sections: global mode, per environment mode. I would make the --global option a setting you can just set once, that would be mfiano's use case
13:56:52
dnhester`
The last thing: is there a way to search for systems? You are loading with asdf based on providing asdf a list of available distros? so maybe there's an asdf search we can do from the repl? or is it only with `ocicl list` in the terminal
13:59:31
dnhester`
"I would write it with sections" meaning the usage part, skipping any implementation details for some other part of the docs, and have a sub sections under usage: global environment or multiple environments (instead of calling it per project), and have subsections for installing, downloading systems, finding systems, submitting a system, deleting systems, updating systems, fixing a version of a system, etc... it will make it much easier
13:59:53
dnhester`
I would offer to help, but I am swamped with other projects right now for the technical reference and others
14:01:58
yitzi
green_: the binary in the oras package is just called "oras". Is that gonna work with ocicl? I see that the makefile renames it to oras-ocicl
15:19:31
beach
I just love those TYPE-ERROR messages: "The value NIL is not of type CONS". Er, yes, I know that.
15:57:32
jmercouris
Is there some sort of succinct way to write "try this function until no condition is raised"?
15:58:44
beach
jmercouris: You mean you try it on different arguments each time? Otherwise, I would expect the same result each time.
15:59:53
jmercouris
basically I want to call: `iolib:with-open-socket` until the socket is actually openable
16:00:11
jmercouris
the socket is not managed by me in Lisp, it is another process that will open the socket
16:00:47
jmercouris
timeouts are a good idea, for now I just want to avoid sending data to the socket until I know it is ready
16:01:06
bike
does iolib not have a 'wait until this socket is openable' kind of function? seems like something it would have. you know, actual polling
16:02:43
beach
jmercouris: Otherwise you can use IGNORE-ERRORS, and check in a loop whether an error was signaled.
16:04:08
fe[nl]ix
the socket API doesn't have a way to poll for when the remote side becomes available
16:04:36
fe[nl]ix
and after you issue a connect() and you get an error, the socket must be closed and cannot be used for further operations
16:05:58
jmercouris
I had a feeling you were right, I've been grepping around in iolib, and yeah, nothing
16:56:02
beach
jmercouris: A loop isn't hard. Something like (loop for result = (ignore-errors <call>) while (null result) finally (return result))
16:59:10
jmercouris
I don't really care for the result actually, I just want to know the socket is ready
16:59:25
jmercouris
this is what I've got in the end: `(loop for probe = (ignore-errors (send-message-interface interface "0")) until (equalp "0" probe))`
16:59:48
jmercouris
send-message-interface attempts to open a socket, send some code, and if it returns "0", we're OK!