freenode/#lisp - IRC Chatlog
Search
23:43:55
Bike
"also exports the following symbols" is an error that suggests a defpackage was being reevaluated
23:44:30
aeth
jack-thomas: it looks like what your code is doing is something like (run-program ... :output :string ...)
23:51:31
aeth
On the other subject, is there a way to *get* the compilation to fail when there are warnings? I want to use something like that for my CI
23:52:11
aeth
I even set sb-ext:*derive-function-types* to T in SBCL so it will generate more type warnings.
23:52:16
Xach
aeth: trivia does something special that inhibits the normal warning-is-fatal behavior.
23:52:35
Xach
aeth: i don't know what, but whatever it does made the warning slip through into the latest quicklisp dist.
0:00:07
jack-thomas
aeth: Is the 'argument' to :output supposed to be a variable to hold the string? I'm confused because the documentation seems to show that by specifying both those keywords it returns a string.
0:02:00
aeth
jack-thomas: iirc, it's a stream, and if you want it to be a string you have to make one with WITH-OUTPUT-TO-STRING like (with-output-to-string (output-stream) (run-program ... :output output-stream ...))
0:02:31
aeth
jack-thomas: uiop:launch-program has more options with streams, iirc. I had to wind up using launch-program.
0:03:35
oni-on-ion
ok so i googled "common lisp run-program" anyway and got this : https://lispcookbook.github.io/cl-cookbook/os.html
0:04:09
aeth
oni-on-ion: those aren't the official documentation, but they're probably better than the official documentation
0:04:15
oni-on-ion
its generally easier to google textbox than to irc textbox , i understand when there is no info anywhere and needing human intervention tho
0:11:34
oni-on-ion
so i am currently bent on this circus act of looking at macros completely differently
0:12:56
jack-thomas
aeth: aeth: oni-on-ion: "E.g., using :OUTPUT :STRING will have it return the entire output stream as a string. And using :OUTPUT '(:STRING :STRIPPED T) will have it return the same string
0:13:03
oni-on-ion
i've just got to play around with them a bit more, but i've a question; it is not lengthy or complex but it will take me a minute to formulate
0:13:22
jack-thomas
whoops sorry for formatting. Maybe it is because I have no stream experience, but this (source documentation) really makes me think it should return a string
0:13:48
aeth
jack-thomas: okay, so it does have string as a custom option, but it doesn't accept it?
0:14:56
aeth
jack-thomas: Did you (ql:quickload :uiop) first? You always have it, but by default it's outdated and it does this weird upgrade thing when quickloaded.
0:15:57
jack-thomas
Haven't done anything. I just heard it was included is asfl (? not sure if that's right. not sure how the dependency systems work in general), and sounded like I was good to go. I will try some of those things
0:39:22
jack-thomas
Yeah, so I tried quickloading again to no avail. I have asdf version 3.2.1 where it appears that the newest version is 3.3.3. However, it looks like nobody has modified the run-program documentation for at least a few years. Regardless, if anyone knows off the top of their head how to update asdf, let me know. Otherwise I will find a way.
0:47:06
jack-thomas
And by 'modify run-program docs' I should say 'modify run-program' (including the docstring)
0:54:47
aeth
jack-thomas: when testing this sort of thing (in any language, actually) I always use dc first because I can just use "1 1 + p q" as the input and it should print 2 and quit.
0:55:33
aeth
jack-thomas: Once I quickload UIOP with (ql:quickload :uiop :silent t) I can then do (with-input-from-string (in "1 1 + p q") (uiop:run-program "dc" :input in :output :string)) and I do get the output of a string of two characters, 2 and the newline.
0:56:08
aeth
Interestingly, *I* am getting my own issue here, where DC has the return value 1 so UIOP is erroring about that (I can just continue, though).
0:56:46
aeth
This does work for me, though. (with-input-from-string (in "1 1 + p q") (uiop:run-program "dc" :input in :output :string :ignore-error-status t))
1:17:40
moldybits
(with-input-from-string (in "1 1 + n") (uiop:run-program "dc" :input in :output :string)) works for me
1:22:14
aeth
Why does p give me an error code but not n? That's probably more of a dc question than a run-program question. I guess n is what I'd want for this test, anyway.
1:27:00
aeth
Actually, it looks like "q" always gives it a return of 1 and C-d (and reaching EOF of a UIOP input stream) a return of 0.
1:50:40
jack-thomas
aeth: well, thanks again. Hopefully some day I can give back to you and/or others in this room.
3:20:39
beach
Elronnd: In the Cleavir compiler, we represent source programs using "Concrete Syntax Trees", or CSTs: https://github.com/robert-strandh/Concrete-Syntax-Tree
3:21:07
beach
Elronnd: The main purpose is to keep source information that we can propagate through the various steps of compilation.
3:26:48
LdBeth
beach: if it's allowed for a CL compiler to reject code that will produce a runtime error
3:30:23
beach
Good question. I don't recall having seen anything about that in the Common Lisp HyperSpec.
3:31:10
pjb
LdBeth: Not really. Because you can call the function that produces the run-time error with a handler-case, and expect the condition.
3:32:11
pjb
LdBeth: on the other hand, if the compiler can determine at compilation-time that an error would always be produced at run-time, it can generate only the code that signals the error.
3:33:04
beach
That's how it is typically done, but I don't know that the Common Lisp HyperSpec has anything to say about it.
3:37:06
LdBeth
What I'm thinking is I can implement the readtable to accept only functions produce meaningful result
3:45:58
LdBeth
Rmm, it's a language behaves different to typical lisps but conforms ANSI CL in trivial cases
4:00:11
Xach
sjl: i have some time this week to fuss with more polish and finish on openpgp-enabled quicklisp stuff. i'll keep you posted wrt testing.
5:29:52
aeth
Xach: What do you use to fail on warnings in your Quicklisp tests? asdf:*compile-file-warnings-behaviour*? How do you handle packages that conflict with each other? Do you have to build each project one at a time, restarting between each build?