freenode/#lisp - IRC Chatlog
Search
18:44:23
pfdietz
But the compiler is also allowed to recognize their failure and generate errors. So while a CL implementation doesn't have to use declarations to do good type checking, it's certainly allowed to.
18:45:28
trittweiler
If you have a code base that uses declarations a lot in internal functions, rather than just at a high-level ("API functions" above), yes that may result in a lot of unnecessary type-checks and a slow-down.
18:46:11
rpg
It's clear that some aspects of the type system (e.g., SATISFIES) were intended to support run-time type checks, instead of either optimization or static analysis.
18:46:52
trittweiler
So I'm with you that the implementation philosophy of declarations has an impact on how a code base can look like, and it may not be trivial to just switch
18:47:01
rpg
trittweiler: Or the compiler could trust those declarations and generate very efficient code that would have the weakness of blowing up in odd ways if I was wrong about the declarations.
18:48:00
Bike
if the type system is expected to at least know that (subtypep (satisfies x) (satisfies x)) => T, subtype on satisfies types can be used as a SAT solver. just a fun fact there
18:48:18
rpg
Note that this isn't meant to be a complaint about CL -- the CL spec antedates the kind of expressive compile time type checking that (I think) first really showed up with ML.
18:51:12
rpg
shka_: E.g., if the calling point can assure that the typing is correct, you can jump into the function, otherwise you need to check the arguments before doing so?
18:52:14
phoe
except FOO and %FOO are not two different functions but rather two entry points to a single function
19:08:27
gendl
ah, i guess not, since zacl does define the :allegro feature while it's loading aserve...
19:09:28
gendl
and nested reader conditionals aren't supported everywhere... #+allegro #+(version 10 1)
19:10:32
gendl
XachX: so, if we keep the weird reader conditionals as is (handled by zacl currently), but add :zacl to the :depends-on in aserve.asd, can it still not exist in Quicklisp?
19:10:49
White_Flame
hmm, the page on deftype sayd "If a deftype form appears as a top level form, ..." implying that it probably can be non-toplevel as well
19:11:10
gendl
that would allow aserve to load standalone, without the need to package zacl with it.
19:11:21
jackdaniel
White_Flame: (defun foo () (deftype foo '(or cons number)) is deftype being non-toplevel
19:11:45
White_Flame
but yeah, it probably does only affect the global namespace; there's nowhere else for it to go
19:12:40
White_Flame
one nasty way you could accomplish this via macro body is to gensym the typename in the local body
19:14:14
jackdaniel
then it would be (typelet ((snacks '(or cons number))) (typep bar '(lextype snacks 14)))
19:17:52
gendl
XachX: the only alternative I'm seeing is just to "punt" on ever trying to get to an identical version between franzinc and Quicklisp, and resign myself to maintaining a fork (which hopefully will end up tracking original aserve better than the first portableaserve did...)
19:20:33
rpg
gendl, XachX: #+(and allegro (version= 10 1)) 'foo gives FOO for me at an Allegro 10.1 REPL
19:21:34
gendl
these things don't seem to work as expected in the toplevel (at least not in slime repl)
19:22:01
gendl
in my experience i have to try it in a compiled function or at a simple command shell.
19:23:56
Bike
typelet would be hard since there's nothing to turn a type specifier into a type (or types as objects at all)
19:24:15
gendl
So apparently adding the (and allegro ..) at the front of all these things could be a solution
19:24:56
gendl
but i'll have to find something other than allegro which is unique to allegro, because it seems that zacl does make #+allegro be true while it's loading aserve...
19:25:22
jackdaniel
phoe: you are very liberal with using terms right now. you claim, that things which can't be defined lexically are not first class objects?
19:26:14
rpg
gendl: Putting on my Dr. Evil hat, I would suggest lexically binding *FEATURES* at some point so that :zacl can do whatever it does.
19:27:01
gendl
rpg: I think that's what zacl is doing now -- lexically binding *features* so it does have :allegro on it while processing aserve.
19:28:53
gendl
but it's getting mighty convoluted. This kind of thing is exactly what Xach has been complaining about. And why he's having second thoughts on allowing this current aserve into Quicklisp unless we purge the weird reader conditionals.
19:29:16
gendl
... in which case Franz is never going to accept a pull request, and we're stuck maintaining yet another fork into eternity...
19:30:01
gendl
I can't in good faith ask Franz to accept any changes which mess with their reader conditionals too much - they are going to great lengths to support their customers all the way back to Allegro 6, and this is how they do that.
19:31:14
rpg
gendl: OK, if I understand properly, what you're doing is pretending you have the latest allegro when you are running on a non-allegro platform, right?
19:33:00
gendl
which makes it look like (some version of) Allegro. then portable aserve gets compile/loaded on top of that.
19:33:20
gendl
well the old portableallegroserve has atrophied such that it's now based on an ancient AllegroServe version
19:34:18
White_Flame
phoe: what do you think about gensym-named types? as long as they're static, ie not reinstantiating a new type every execution, that would contain a completely private deftype within a lexical scope without leaking
19:34:26
gendl
so we decided to make a clean break and make a new compatibility layer, hopefully much thinner than :acl-compat, because it mostly just uses existing Quicklisp libraries like bordeaux-threads etc (the old :acl-compat has its own custom hacks for a lot of things because it predates Quicklisp by a long shot)
19:34:57
gendl
the new compatibility layer is :zacl, it lets us run up-to-date Allegroserve, but still with a few modifications
19:35:19
rpg
gendl: Oh, I see. Yes, it seems like checking for ZACL would be un-objectionable to Franz.
19:35:37
gendl
we're hoping those few modifications will be accepted back by Franz, so we don't have to maintain a fork, but that remains to be seen.
19:36:13
gendl
I hope it'll be un-objectionable to Xach as well - still having the weird conditionals after the (and (not zacl) ...)
19:39:49
rpg
gendl: I don't *know*, but I would guess that an implementation would be using the underlying lisp, so if you have (and (not zacl) ...) it would stop evaluating. One couldn't guarantee that it would stop reading the #+ condition, but isn't it benign to read it, as long as you don't interpret it?
19:40:29
Xach
zacl's design is along the lines of "make allegroserve code load and run even in the face of portability-hostile (or portability-apathetic) allegroserve code". I think it would be good in a global sense to encourage portability-friendly code in allegroserve, but in the local sense (make gendl work) I don't know what makes the most sense.
19:41:08
Bike
the eclector reader would try to validate feature expressions before executing them and would signal an error on version< conditions in asdf or somewhere
19:42:02
Xach
I think it would be much better globally to ignore allegroserve and portable allegroserve, as they are not really good examples of anything worth emulating as webservers or web clients.
19:43:31
gendl
Xach: the old portableallegroserve is already in Quicklisp, so that horse has already kind of left the barn.
19:43:55
Xach
gendl: Sure. I think it's a mistake to use it. But I don't pass judgement on what people ask for in quicklisp.
19:44:21
rpg
We haven't found any web server library that seemed so much better than allegroserve that it was worth the pain of rewriting our servers...
19:45:24
Xach
rpg: is it important for your stuff to run on sbcl and clozure cl? do you use portable allegorserve for that?
19:46:59
gendl
It's important for our stuff. We want folks to be able to play around with Gendl on the platform of their convenience. If they want a commercial and commercially supported version, we'll sell them Genworks GDL running on Allegro CL.
19:47:20
gendl
And we certainly don't want to be selling stuff on Allegro CL and not using the best webserver for Allegro CL, which is aserve.
19:48:17
gendl
rpg: would you consider using up-to-date Allegroserve (with zacl) if it's available in quickllisp?
19:48:52
rpg
gendl: Yes, I think so. At least I would talk to my colleague who uses it for his web-interface to graph database system.
19:49:59
gendl
Anyway, I'm going to make some light-as-possible changes to current AllegroServe - certainly this "will build" on CCL and SBCL - and submit a Quicklisp Project request -- and just see what happens.
19:50:43
gendl
I'm hearing a bit of mixed messages from Xach, but the bottom line seems to be "if it builds, it's in..." so that's what I'm going with.
19:53:03
Xach
I wish there was a way forward that didn't involve a brutish hack like zacl and didn't break portable allegroserve for anyone using it.
19:55:18
Xach
I don't find offers to fix what's broken for individual projects all that encouraging - I feel like there could be silent users with private code who will be affected in ways that aren't seen.
19:57:10
gendl
Well, a way forward could be to leave old portableaserve alone, call the new one zaserve, modify the code to get rid of <= >= conditionals, to eliminate the need for the most brutish of the hacks in zacl.
19:57:58
gendl
the only downside to that being that we now have a new fork to maintain, which runs the risk of atrophying vis-a-vis franzinc aserve, just like original portableaserve did.
19:58:40
gendl
But if that approach is what will serve the needs of the many, then I suppose I'm willing to go that way.
19:59:31
gendl
and strip the conditionals out of what will now be called zaserve (which will :depend-on (:zacl) )
20:00:17
gendl
All so support free people using our stuff, some tiny percentage of which might become paying customers some day... :|
20:01:37
scymtym
Bike: the change in eclector was to check feature expression incrementally as it evaluates (by default anyway, since clients can customize) so i wouldn't choke on e.g. #+(and allgero (version> …)) when running in e.g. SBCL
20:03:37
jcowan
does everybody interested in CL types know about Henry Baker's paper on efficient SUBTYPEP implementation (excluding SATISFIES)?
20:08:04
gendl
it turns out franzinc aserve already has a bunch of stuff like #+(and allegro version>= 6 3)
20:09:27
gendl
So now i'm reverting to going that route. And we'll keep the request to change names on old allegroserve for now.
20:10:52
gendl
That code hasn't been maintained in years. If some silent user depends on :aserve from quicklisp, they'll get a clear message from the new one: "This aserve isn't supported on <your-implementation>. The old one has been renamed :paserve. " It's not like they're going to be left completely in the dark.
20:23:11
slightlycyborg
Is there a way to redefine *standard-out* to be a stream that writes to 2 streams, one of which was the original *standard-out*
20:26:04
Bike
(let ((*standard-output* (make-broadcast-stream *standard-output* wherever-else))) (write ...))
20:28:16
phoe
slightlycyborg: nope, you need to make it yourself if you want to keep the original value of the stream while mutating the global binding for *STANDARD-OUTPUT*.
20:29:36
slightlycyborg
Ok. That makes me think of the time I traded away my Pikachu in pokemen yellow. Lose a handle on that and an entire game mechanic (pikachu following you in RPG explore mode) is lost forever
20:46:34
anamorphic
In my slime backtrace, I get " 0: ("bogus stack frame")" for the bottom most frame. Any ideas why I get a bogus stack frame? (using SBCL)
21:00:29
gendl
XachX: Thanks for the patience around all this aserve stuff, which I know doesn't suit your taste anyway.
21:01:27
gendl
I'll open a Project request for my fork of current aserve, whose system name I'll rename to :zaserve, at least for now.
21:03:27
gendl
I'm afraid I'm not going to be able to squash all the = and >= conditionals -- they're working as-is, with zacl's (admitedly ugly, but localized) reader table tricks -- and there's too much logic around them (which actually works, with the reader tricks), which i'm 99.9% sure I would break at some point if I mess about with them too much.
21:04:07
gendl
Even with the ADSF system name of :zaserve, Franz might still accept a merge -- because I don't think they use that ASDF file anyway (but that's a different issue from Quicklisp, so no need to dwell on it here).
21:09:02
anamorphic
Is there a defacto standard for docstring -> doc generation? Or even a naming practice like `'foo in Emacs?
21:14:56
dim
is there an easy way in loop collect to avoid nils? I can always wrap (remove nil (loop ... collect ...)) but I'd like to avoid it if possible...
21:46:31
anamorphic
@Shinmera well basically, a clear way to refer to params, return values, and maybe linking between things.
21:47:46
Shinmera
anamorphic: Staple has a very simple standard markup it scans for in docstrings for xrefs. You can extend it to handle markup of your choice though
21:54:55
antoszka
Shinmera: every time I want to recommend it to a friend I can *never* remember the bloody name
21:55:27
Shinmera
antoszka: sorry that you can't remember a name that's literally one letter from portable and has cl in it
21:56:05
antoszka
Shinmera: yeah, it's just that this somehow doesn't *hook* into my mnemotechniques
21:57:02
antoszka
Shinmera: Cool, if nobody else is reporting the problem, I'm happy working on my techniques to remember that better
22:05:05
Shinmera
spinning up vms with the correct environment, compiling, and gathering results isn't trivial to automate.
22:05:13
antoszka
But yeah, I can't jump in and help for myself I'm mostly using spacemacs and I have time restrictions.
22:05:20
jcowan
While people are whining at you, the first screenshot at the portacle home page is basically illegible.
22:33:19
russellw
given a pathname, as either a string or a pathname object, is there a standard way to tell whether it is absolute or relative?
22:59:52
russellw
for getting environment vars, is this as good as it gets? http://cl-cookbook.sourceforge.net/os.html#env
23:15:01
aeth
This is fun. Where in most languages I would resort to regular expressions to parse a line, I instead wrote a macro to iterate over a line separated by spaces, using #'position to provide start and end points on eitber side of the spaces.
23:23:13
jasom
jcowan: the first screenshot is exactly what portacle looks like on startup; most of the text on the screen is comments, which is dim-gray in the default theme that portacle used
2:40:38
Elronnd
is there a better way to turn an arbitrary thing into a string than (format nil "~A" thing)?
3:40:23
russellw
I want to save the values of some global variables, do some stuff that can mutate them, then restore the original values. This seems like a pattern that could be encapsulated in a with- kind of construct. I can try to write my own macro, but before I do that, is there anything that already exists that will do the job?
3:42:24
russellw
right, that – oh! wait, if you use it on global variables, it works like a stack, doesn't it? That actually sounds like what I need right now. Cool, thanks!
3:43:03
beach
There is no such thing as a "global variable" in Common Lisp. They are called "special variables" and can be bound by a LET.
3:57:37
loke
beach: it's not in the spec, of course, but most CL's have a distinction between special and global variables.
5:34:31
ThJ
no-defun-allowed: the idea that because lisp is so powerful, it encourages a fiercly independent roll-your-own approach and discourages collaboration, hampering any attempt at forming a large community around lisp.
5:35:48
|3b|
ACTION sees a problem where the community is small so it is harder to find people who want close enough to the same thing to collaborate :/
5:36:14
ThJ
from a business perspective, mediocre yet fungible programmers are desirable. unfortunately, some might say.
5:36:18
kristof
the truth is actually that less powerful programming languages are more prone to "roll-your-own" approaches because they fail to provide basic things taken for granted in other languages
5:36:18
|3b|
(specifically in #lispgames, we have a bunch of people working on things that are arguably the same at a high level, but disagree on details)
5:36:52
kristof
so "software architects" come up with arbitrary ways to string together their basic building blocks
5:36:59
|3b|
also smaller amount of people paid to actually finish things, encourages people to be less likely to reuse the unfinished things people did as a hobby
5:37:27
ThJ
i mean, a lot of lisp libraries do seem to suffer from the "80% of the way there" disease.
5:39:13
kristof
Ftr I have been dissatisfied with a great many open source libraries because this is a feature of quick projects in small communities, not programming languages.
5:39:38
ThJ
i have no trouble discussing overarching themes without needing to go into detail. good skill to have, i say.
5:39:43
oni-on-ion
"nothing quite unites a group of people quite like having a common enemy" social coherence
5:39:47
kristof
It does not actually take a long time to write whatever it is you think is missing unless the domain is very niche or could use very significant attention.
5:41:16
beach
ThJ: In the past, there have been people coming to #lisp, thinking that it is like other channels, where apparently people show up when they are bored and just want to waste time. They were surprised to find that #lisp is mainly about getting real work done.
5:41:28
ThJ
beach: i have something concrete to ask about, then: repeatedly on this channel, i've been told that various things are off limits. i'd like to have a concrete list of these things that i shouldn't be discussing.
5:42:05
kristof
Look, I think you'll find that a lot of people get annoyed by random pontification, that's all.
5:43:20
jasom
ThJ: anything directly related to developing in common lisp is fine. Tangents that are indirectly related may be fine.
5:44:12
beach
ThJ: I can give you a partial list of what is on topic, but it is not going to be exhaustive: Interpretation of the Common Lisp HyperSpec. Pointing out bugs in the Common Lisp HyperSpec. Applications written in Common Lisp. Libraries written in Common Lisp. Ideas for saving total work load for the Common Lisp community. Tools.
5:44:42
jackdaniel
although it is arguable that people always stay on topic here (and longer they are here less likely people will point it out), it is a fact, that it is more on-topic than some channels and it is a quality worth preserving :)
5:45:30
|3b|
ACTION takes the relative sizes of #lisp and #lispcafe as evidence that property is desired by #lisp
5:47:11
beach
ThJ: I can also give you a list of things that are definitely off topic, at least for lengthy discussions: What "Lisp" is. What languages other than Common Lisp are Lisp languages. Pointless discussions about terms that nobody cares to define.
5:49:38
jackdaniel
also this with "80% solution" claims seem like repeated from a "bipolar lisp programmer" verbatim without much thought put into it. appreciate your intelligence, do not act like a memo bot! ;-)
5:51:44
beach
ThJ: Then I have some discussions that I find extremely pointless myself, but that I am not willing to deem off-topic, in particular discussions about what the standard omitted and that someone thinks should have been included. Especially when such opinions come from people who have very little knowledge about programming language design, and compiler technology.
5:52:19
jackdaniel
well, it is a strawman argument, most open source ecosystems suffer from scratch-my-itch problems (in average)
5:53:23
ThJ
jackdaniel: i have plenty of counterarguments, but if i entered into this, we'd both be here for a few hours, spamming the channel.
5:54:32
jackdaniel
I've just pointed out, that repeating someone else opinions with only surface knowledge may be perceived silly from the 3rd person perspective (and I'm /off now :)
6:10:29
russellw
Is there any way to make the standard output stream behave like tee, so everything printed to standard output also gets logged to a file?
6:41:13
russellw
And my next question is sort of a follow on from the last one, but it needed a full test case, so I wrote it up on https://stackoverflow.com/questions/52868304/exit-without-losing-cached-output