freenode/#lisp - IRC Chatlog
Search
14:32:36
Shinmera
Wish I could use freetype in my engine, but unfortunately it pulls in too deep a dependency tree.
14:33:53
Shinmera
I do have a font rendering library that I wrote myself based on stb_truetype, but it has some, uh, things left to be desired
14:42:46
smokeink
I am willing but I don't think I am able to do it, yet. As soon as I'll have some free time to dedicate to clim or to other such lisp projects, I'll do it happily
16:00:45
clintm
Did I just forget how to use parenscript or was there something changed in the past month or so that's up on QL now? (ps:ps (@ a (b) c)) -> "at(a, b(), c);"
19:42:32
jasom
clintm: functions, on the other hand, are translated to js names, which are namespace-free
19:43:56
jasom
so the parenscript form (foo bar baz) will be expanded to foo(bar baz) if the symbol FOO is not bound to a PS macro.
20:02:08
drunk_foxx[m]
Are there any good places to practice using common lisp except books and websites with some usual (mostly stupid) excercises? Like, libraries that may need routine work, which can be handled by a person who has just started Lisp a couple of months ago or something like that? Any active projects to work on?
20:02:58
pmetzger
drunk_foxx[m]: There probably are a bunch of such things, but you may have to learn a bit more about the community to find them.
20:09:29
Shinmera
Adding a test suite for Plump would be good since that's something people actually do use.
20:14:45
pmetzger
I disagree. I think anything people use and plan to use for more than a trivial amount of time needs tests. Otherwise fixing bugs and refactoring code is too dangerous and unpleasant.
20:15:34
pmetzger
Earlier today I merged a bunch of changes from someone else's branch of some code I've been hacking on into mine and pushed out the merge, and the only reason it worked right was there was a test suite I could run to shake out any issues.
20:15:56
pmetzger
Any code that never needs to be changed ever again doesn't need tests. When you find me such code, let me know. :)
20:17:32
drunk_foxx[m]
Even if it is bug free, there may exist plenty of reasons fot changing the code in the future
20:19:16
jackdaniel
on the other hand, even if it has bugs it doesn't necessarily mean they must be fixed
20:26:00
verisimilitude
Look at any working implementation of basic mathematical functions, pmetzger.
20:27:01
verisimilitude
Now, it's clear that code can and is perfectly bug free or else we wouldn't be able to do much of anything.
20:27:07
pmetzger
verisimilitude: Famously, Xavier Leroy had the implementation of basic math functions in OCaml broken for the first six months it was in use. Tests would have caught that.
20:28:31
Shinmera
writing useful tests is a lot of effort. Effort and time I usually don't have to offer.
20:28:39
pmetzger
Anyway, these days I prefer for things to be more than simply tested but actually formally verified, but tests are at least required. I fire programmers who don't want to put tests in their code and who don't want to document their code. OTOH, one doesn't need to operate to please _me_ unless you work for me.
20:30:07
verisimilitude
I'm also inclined to believe the way tests are done nowadays is a fad, like so many other things in programming nowadays.
20:30:31
pmetzger
verisimilitude: But again, you don't need to do as I suggest. That said, I fire people for refusing, and won't collaborate with people who refuse to. I have no tolerance for cowboys. But your milage may vary. Live as you wish, not to please me.
20:32:05
fouric
is someone really a "cowboy" if they would rather not write tests at all than write flawed tests
20:33:19
pmetzger
TDD has you test the tests by first running the test without having the feature implemented. It's crude but works.
20:33:25
jackdaniel
invalid tests happen sometimes and they waste time, but in general it pays off well
20:34:04
pmetzger
it gives you such pleasant agility. you aren't scared to make big changes any more because you can check if your changes worked.
20:35:58
drunk_foxx[m]
> Anyway, these days I prefer for things to be more than simply tested but actually formally verified, but tests are at least required. I fire programmers who don't want to put tests in their code and who don't want to document their code.
20:35:59
drunk_foxx[m]
Somewhat related to the discussion: what do you think about literate programming compared to the standard process of documenting/commenting the code?
20:36:03
pmetzger
Anyone who thinks they will always write the correct code the first time out isn't to be trusted.
20:36:34
pmetzger
Literate programming is really great for manuals and teaching. It seems to not work for writing real software though.
20:36:49
pmetzger
Knuth did well with it for writing TeX but it doesn't seem to work really well in practice.
20:37:05
pmetzger
That said, solid comments are also useful, but one needs to know what one is commenting.
20:37:27
pmetzger
I have seen amazing examples of the use of literate programming for creating textbooks and manuals though.
20:39:01
verisimilitude
I always write documentation strings, drunk_foxx[m], which I believe is roughly halfway to full literate programming.
20:39:48
pmetzger
I agree. Docstrings are documentation for users of an interface, not documentation of code itself.
20:39:56
verisimilitude
I'm inclined to believe the interactivity of Lisp trumps literate programming.
20:40:28
Shinmera
pmetzger: It's not just that, it's that literate programming is a description of how to organise documentation whereas docstrings are a way of attaching documentation to definitions.
20:40:44
verisimilitude
So, literate programming is effectively preparing to make the program as if a book.
20:41:55
verisimilitude
Greater documentation, such as the reason for the overall structure of the system, isn't encompassed by this, however.
20:42:05
pmetzger
jackdaniel: A real manual is better, but these days the equivalent of docstrings in other languages (like javadoc and the like) are often all you get. :(
20:42:39
jasom
jackdaniel: docstrings are just strings; you could put an entire man page in a doc string, and it would be API documentation. You could put the text for the wikipedia page for a mongoose, and it's not documentation.
20:42:45
drunk_foxx[m]
In my humble opinion, it's quite essential what the concept of literate programming whas inspired by - Knuth was a user of such languages like Pascal, Java, C and C++, and they lack in readability a lot, unlike Lisp with its AST structure, for instance; that basically means LP is much less useful for Lispers just due to the features of the language itself
20:43:48
jackdaniel
jasom: sure, but are we talking about theoretical possibilities or what people usually mean by doscstrings?
20:43:51
jasom
fwiw, Here's an example of what CWEB looks like (a C literate programming tool) https://www.imperialviolet.org/binary/critbit.pdf
20:44:04
Shinmera
I hate literate programming just as much as docstrings next to the definitions. It's distracting me from the code. Put the documentation elsewhere.
20:45:48
drunk_foxx[m]
Wikipedia disagrees on that, but I didn't dive into much detail about the history of CWEB, so not sure
20:46:05
pmetzger
I like having docstrings in code. Before such things existed, comments before functions explaining their interfaces were common. They're still common in other languages.
20:46:33
pmetzger
WEB and TANGLE were built by Knuth. TeX was ported to C after TeX's initial completion.
20:46:49
drunk_foxx[m]
That's undoubtable, I just think some are more "naturally readable" than others. Again, biased
20:47:57
verisimilitude
It makes me think of how C programmers go ``gee wiz'' with their grep and their lint and their memory leak detectors, where all of that is terrible and also effectively useless with a decent programming language.
20:48:05
jasom
pmetzger: the question Shinmera is raising (I think) isn't docstrings v. no docstrings, but docstrings next to the function definition vs. docstrings elsewhere. Without some way of attaching comments to a function, you must put them in the source adjacent to the function. With a lisp system, you can query the function's documentation through your IDE.
20:49:11
Shinmera
Yes. I put the docstrings in a separate file because I hate lots of vertical space that's spent on stuff other than code.
20:49:21
jasom
verisimilitude: linting tools are useful in most programming language; they are particularly useful in untyped language like lisp (style warnings are a type of linter, for example).
20:49:26
pmetzger
You can always manipulate docstrings in lisp away from the definition, but I think it's bad style. While reading the code you want to read the same information.
20:50:29
pmetzger
C and Lisp are at different parts of the stack. The fact that even (say) SBCL has C code in the implementation kind of tells you something there.
20:50:33
verisimilitude
Something else that separates a Lisp style warning and UNIX lint is how the system already has the code; it doesn't need to parse the code separately.
20:51:00
verisimilitude
This entirely eliminates idiocy like C++ syntax being understood differently by different compilers, because it only has to be understood once and then disregarded.
20:51:16
pmetzger
C is, as it happens, pretty bad at what it does, but part of that was what was possible in 1970 vs what you can do now (see Rust for example.)
20:52:50
pmetzger
verisimilitude: I think I read the Unix Haters Handbook stuff before it was published (it mostly came from posts to a mailing list) but I haven't looked at it since. A lot of it was bitter comments from random ITS types etc.
20:54:10
pmetzger
verisimilitude: so you think there's something wrong with being effeminate? are you a homophobe?
20:55:36
pmetzger
verisimilitude: you do get that if you said that IRL it might not be physically safe for you, yes?
20:56:17
verisimilitude
I've noticed that's a common response, an implied threat; of course, Shinmera.
20:57:07
theemacsshibe[m]
> verisimilitude: so you think there's something wrong with being effeminate? are you a homophobe?
20:58:22
theemacsshibe[m]
That's quite rude to gay people. My datefriend is much better than any Rust user.
21:05:28
theemacsshibe[m]
I like LP, it's like reading a maths textbook where the author walks you through the problem very verbosely.
21:08:14
theemacsshibe[m]
I'm pretty sure most LP programs have splitting functions which isolate the code and the documentation so you can just use either.
21:11:58
verisimilitude
Yes, Josh_2; say, has anyone else had issues with CCL being unable to find its queer little database it uses; I've been unable to do some work under it and, using GuixSD, am reluctant to directly modify anything related to it.
21:13:11
verisimilitude
I'm also having issues conditionally loading this code, because CLISP whines about the #$ reader macro.
21:15:05
phoe
Yes, it is over - though people are staying for longer since Marbella is just that pretty
21:15:53
jcowan
Am I right to think that whereas block names have both lexical scope and dynamic extent, catch tags have indefinite scope and dynamic extent?
21:16:32
rme
ccl expects to find the interface db (darwin-x86-headers64/ or whatever) in the #p"ccl:" directory. By default, that's the same directory as the heap image file. You should be able to set the environment variable CCL_DEFAULT_DIRECTORY if that is not right.
21:17:13
jackdaniel
trying to call return-from from to non-existing block (i.e from escaped function) signals a condition
21:19:09
Xof
and I didn't even manage to tell didier that I have a fix for all his method-combination issues
21:20:19
theemacsshibe[m]
Are there any interesting lisp shows in Melbourne Australia? Not the Florida one.
21:26:35
verisimilitude
There's a /lib/ there, but no x86-headers/, no libc/, and not a single cdb file.