freenode/#lisp - IRC Chatlog
Search
18:02:10
anamorphic
Hmm how would I ensure a text file I write to always produces Unix-style line endings, even on Windows?
18:05:39
jcowan
anamorphic: https://bugs.launchpad.net/sbcl/+bug/310185 suggests that sbcl always writes LF only, even on Windows, though this may have been fixed and not recorded there
19:24:56
solene
hello, is it possible to use a pipe command like echo foo | wc using uiop:run-program?
19:54:13
mrblack
what would be a good lisp project (that is not too hard) for the Linux environment that would solve things lispers need?
19:59:32
aeth
solene: you might want launch-program instead because it has a :stream option for :input and :output (but it's harder to work with because it's async).
20:00:30
solene
aeth: I'm quite happy with run-program, I just wanted to use a list because it prevents errors in passing parameters
20:05:04
mrblack
solene, I had this idea of implementing some of the gnu coreutils because hackability... but I don't know if that makes sense.
20:05:43
aeth
(defun uiop-pipe () (let* ((echo (uiop:launch-program "echo foo" :input :stream :output :stream)) (echo-output (uiop:process-info-output echo)) (wc (uiop:launch-program "wc" :input echo-output :output :stream)) (wc-output (uiop:process-info-output wc))) (loop :for line := (read-line wc-output nil :eof) :until (eql line :eof) :do (write-line line))))
20:19:33
aeth
Even though launch-program is technically async, this sort of resyncs it and makes it basically the same as run-program. run-program doesn't have :stream for some reason, possibly because :stream could hang.
20:26:09
aeth
It looks like these are the potential errors: https://github.com/fare/asdf/blob/b6d2f9b44c047a5e65520692159cab7d3e9e072e/uiop/launch-program.lisp#L507-L532
21:18:36
gendl
but i'm seeing old code where it looks like they expected this kind of thing to work.
21:19:27
gendl
Is anyone familiar with the "metabang.bind" system? I'm looking at code in cl-markdown, which uses metabang.bind:bind, and it's doing this kind of thing and failing
21:21:47
gendl
it's doing (metabang.bind:bind (((a b c nil) (list 1 2 3 4)) ...) ... ) which I assume bubbles down into some kind of multipe-value-bind thing -- and it fails similarly as with mutiple-value-bind but with a slightly different error message.
21:27:26
phoe
"This seems to be what the standard mandates, so conforming code should not be affected."
21:29:31
gendl
Well SBCL is doing its job - non-conforming code should be shaken out of the ecosystem. And that's exactly what's happening right now.
21:30:02
gendl
i'm just not sure whether metabang.bind aims to smooth over this kind of thing or not
21:30:39
gendl
(the thing is, I know how to fix it in cl-markdown, but not in metabang.bind, so my only real option is the former)
21:30:56
phoe
I suggest you open an issue on metabang-bind asking them to clarify and define that behavior.
21:32:22
gendl
I'd like it to work for everyone, not just for my application (in this case the application is the clnet site generator)
21:32:51
phoe
gendl: I think the proper way to make it work for everyone is to ask BIND authors for clarification, and to do what they say.
21:33:18
gendl
I'm gonna do the following: 1. lodge a merge request against cl-markdown, which they can feel free to reject if they can fix it in metabang.bind instead (it happens to be the same author).
21:33:39
gendl
2. Make a local patch in my application with a flag to remove it if/when the issue is fixed in Quicklisp.
21:35:53
gendl
Bike: thanks for tracking down the change in sbcl which explains why it was working before.
21:47:36
montxero
phoe: lol if you mean actually looking in there, I already do that. I just figured there ought to be a way to do it without leaving a the repl
23:32:58
gendl
or better: `(directory (merge-pathnames "dists/quicklisp/installed/systems/" ql:*quicklisp-home*))`
0:54:26
gendl
I just spent 15 minutes wondering why files I had just committed were not showing up on my repository listing on the website
1:06:59
gendl
I've been thinking it would be a good idea to have all gitlab.common-lisp.net projects mirrored on github as well, since it seems a lot of statistics reporting assumes everything is just on github and only mines that for their stats.
1:08:09
aeth
Well, CL projects can be (and probably should be) at one of three locations, generally: github, gitlab.com, and gitlab.common-lisp.net
1:09:00
aeth
Probably best to mirror at all three, though, so you have an authoritative copy on them. Especially a github mirror.
1:09:31
aeth
gendl: If someone wants to make the argument that C/C++/Java/etc. is dead and JS is the new big language, they'll use Github stats.
1:10:31
gendl
aeth: In principle I agree with mirroring things around, but is there a danger of it causing confusion?
1:11:49
gendl
aeth: I agree with mirroring things around, but how to avoid confusion - e.g. what if someone sees a CL repo on github, but the active one is actually on gitlab, and they open a Pull Request etc.
1:13:00
gendl
i mean the active one is actually on gitlab.common-lisp.net... I mean, how to avoid a chaos of Issues, Pull Requests or Merge Requests on other mirrors
1:13:22
gendl
are they identified as mirrors, and point to the place where Issues and Pull Requests should go?
1:14:12
aeth
I'm not sure if there is a way to disable pull requests. I think you can disable the rest, e.g. issues/wiki/etc.
1:14:36
aeth
I don't think you can disable pull requests because... https://github.com/torvalds/linux/pulls
1:14:36
gendl
like right now I'm seeing this: https://github.com/gwkkwg/cl-markdown and this: https://gitlab.common-lisp.net/cl-markdown/cl-markdown
1:16:06
gendl
I just did a different Merge Request on the common-lisp.net one, and trying to figure out how to transfer the ancient github Pull Request over to the common-lisp.net one
1:17:29
gendl
By the way, this is jumping the gun a bit, but what kind of CL-specific services would people like to see from common-lisp.net?
1:18:13
gendl
I've been thinking that it would be nice if common-lisp.net could maintain a continuous integration thingie with several up-to-date CL implementations
1:18:59
gendl
such that projects hosted at gitlab.common-lisp.net could press a button and get a report of their build and/or test pipeline run through a bunch of CL implementations
1:21:02
gendl
I have confidence that there's a female out there who can bring back the flower better, faster, stronger than it was...
1:21:35
Josh_2
I remember I once met her on some now defunct social media site because I had some lisp in my name xD
1:26:05
gendl
I know only a bit about her story and her whereabouts. But I don't want to talk about other people here when they're not here.
1:26:48
gendl
I do encourage anyone here to reach out to her and let her know that her past efforts were appreciated and she'd be welcome back to contribute to the new site.
1:27:32
gendl
For various (personal) reasons I ought not do that myself. Whoever wants to reach out, direct-message me here and I'll give you what contact info I have.
1:28:33
gendl
Back to my previous idea -- something like a customized, managed cl-test-grid running at gitlab.common-lisp.net
1:28:56
gendl
Could we leverage off of existing stuff to make that happen? I saw there's a CL-TRAVIS project..
1:29:39
gendl
Also what about private repos at gitlab.common-lisp.net (I'm also trying to think of ways the site can generate some revenue to sustain and expand itself better, without going cyberbegging through fundraisers all the time)
1:30:30
gendl
Speaking for my own employer, I know we would gladly pay a couple hundred $$ per month for private repos and access to patched, updated, tested CL implementations and customized runnings of our test pipelines through those implementations.
1:31:25
gendl
I'm pretty sure Franz and probably LW would be on board for donating licenses for use in a test suite.
1:32:37
gendl
Josh_2: we already have an "ad" -- see the "sponsored link" of Allegro CL on the Downloads page.
1:34:44
gendl
Who else would be good for ads? I wouldn't think we should have random unrelated ads on there.
1:37:07
gendl
We also are supposed to be a general CL promotional thing - so we have to be careful about appearing to play favorites among implementations, libraries, etc. But I don't suppose clearly marked and transparent "sponsored links" or sponsored logos should be a problem.
1:39:41
gendl
But to me, ads and sponsored links are just one fraction of what CLF and common-lisp.net can be doing. But I'll move any more detailed discussion of this into #common-lisp.net or #clo-devel, since they indeed have their own channels...
1:44:53
gendl
no-defun-allowed: https://gitlab.common-lisp.net/clo/site/blob/master/content/static/imgs/lotusflower.png
1:47:01
gendl
I think you can sign in with github credentials as well (i'm not sure if that gives you a full-blown account or not)
1:49:07
gendl
Interesting... you can peruse https://gitlab.common-lisp.net/clo/cl-site without logging in
1:49:53
gendl
I'm not gonna unilaterally change those permissions without talking to the other site maintainers, as I'm guessing there is a reason for the permissions the way they are.
1:50:51
gendl
The old site is a bit of an embarrassment on a number of levels (even more of an embarrassment than the new one, I should say). So maybe it should stay a bit buried.
1:53:13
gendl
Note i'm not saying the basic design was an embarrassment - just the way the site was allowed to atrophy was one.
1:56:32
gendl
Josh_2: noted... may I suggest we bring any further discussion of this to the #common-lisp.net channel?
2:00:01
gendl
Josh_2: And if you have or get an account on common-lisp.net then you can of course lodge an Issue at https://gitlab.common-lisp.net/clo/cl-site/issues
2:00:57
gendl
suggestions mentioned here casually are at risk of washing away like so many tears in the rain.
2:02:00
gendl
and posted as Issues even more likely (keeping in mind a "rule of reason" with adding too many Issues, of course).
2:04:02
gendl
and if you feel like taking something into your own hands, with a gitlab.common-lisp.net account you can always fork the site repository, do some enhancements yourself, and lodge a Merge Request.
2:23:58
gendl
Josh_2: of course, it'd be a good idea to share your intentions with the maintainers, before spending tons of time modifying a fork then surprising with a huge Merge Request out of the blue...
3:14:03
gendl
and I mentioned "meanwhile, gitlab.common-lisp.net continues to hum along, just saying..."
3:15:10
gendl
if you move, there's a link up there somewhere talking about how you can keep an automatic mirror back at github.
3:16:11
gendl
the only concern as far I see now being possible confusion with pull requests going to different places...
3:17:00
gendl
but if the number of mirrors is kept to a reasonable number, like two or three, should be manageable.
3:18:10
gendl
I think it will be nice to have a critical mass of CL repositories on gitlab.common-lisp.net, for ease of Merge Requests among them, and for the eventual possibility of common-lisp.net offering more in terms of continuous-integration services integrated with the local gitlab.common-lisp.net repo.
3:19:28
gendl
... as well as archival services, escrow services - all with special regard for the Lisp based nature of the things.
3:20:50
gendl
No. All that would need funding, either self-generated from the services, or injected ahead of time in order to help get things rolling.
3:21:25
gendl
Anyway, I was also saying that continued talk about such details should probably bump itself over to #common-lisp.net channel.
3:22:03
gendl
both to avoid irritating folks here, and better to catch the eyes of the site maintainers.
3:58:56
Elronnd
if I can't understand how to make so simple a macro as that, how can I hope to make something interesting?
4:05:32
emaczen
Elronnd: A good macro example is to make one that implements the basic SQL query statements select from where group-by having order-by ...
4:05:50
beach
Elronnd: For macrology, I recommend the book "On Lisp" by Paul Graham. It is available online for free.
4:07:01
jcowan
(Another use case for a macro is when you need to force inlining and the compiler is refusing to do it.)
4:08:13
emaczen
Elronnd: Then it can be really cool if you have any tabular data in a program you are writing to use your implementation of a small SQL query language
4:09:00
beach
emaczen: That might be a tad too complicated for someone who only recently successfully finished the IFNOT macro.
4:10:07
jcowan
beach: that assumes that the compiler always knows better than the programmer. But if that were the case, there would be no need for the INLINE and NOTINLINE declarations, especially the latter.
4:10:28
emaczen
Elronnd: I made a bunch of really small macros too when I started, and then a few months later I implemented a small SQL language
4:11:46
didi
How do I construct a struct for which there is no constructor function? Say (defstruct (foo (:constructor nil)))
4:14:14
emaczen
Elronnd: A great class of macros to learn about and implement are "anaphoric" macros
4:27:27
emaczen
pillton: Why? I implemented aif, really liked it and then implemented acond, acase and atypecase
4:29:14
beach
jcowan: The use for NOTINLINE is so that the client can be sure that it is not necessary to recompile callers when the function changes.
4:29:25
pillton
emaczen: It is contentious as the macro determines the binding rather than the user.