freenode/#lisp - IRC Chatlog
Search
2:06:14
peli
is there a good lightweight routing framework to do something like flask or sinatra in CL?
3:36:27
beach
peli: You get more answers if you tell us what those things do. Not everybody knows, and not everybody is willing to read the documentation of those things in order to answer you.
3:42:30
aeth
cliki says caveman, but cliki is also notorious for being like 10 years out of date. https://cliki.net/web%20framework
3:44:59
aeth
peli: There's an even more lightweight (but a bit lower level) one that caveman is based on: http://8arrow.org/ningle/
3:46:02
aeth
And the web server I was thinking of is Woo, but all of these web frameworks are based on clack, which runs on both Woo and Hunchentoot (and some other things)
3:47:00
ahungry
caveman2 has a 'start' command that supports booting up with woo, hunchentoot or wookie iirc, but thats again thanks to clack
4:02:19
benjamin-l
I'm trying to make a class that extends the built-in array class like this: (defclass map-array (array) ())
4:02:48
benjamin-l
sbcl doesn't like this, and says that the metaclasses for common-lisp:built-in-class and common-lisp:standard-class are incompatible
4:04:07
no-defun-allowed
The CLHS page for BUILT-IN-CLASS explains why this is not possible in portable Common Lisp: "A built-in class is a class whose instances have [...] special representations."
4:09:27
aeth
There's probably a portability library that can implement extensible sequences on any implementation. You would just need to import those sequence functions instead of CL and extend a class other than sequence outside of implementations that don't permit extensible sequences.
4:09:42
aeth
But then the user would also have to do so, and it won't work for free with every sequence-generic function in every library
4:13:10
Bike
yes, shinmera wrote it https://github.com/Shinmera/trivial-extensible-sequences/tree/master
4:15:18
aeth
benjamin-l: you'll want to use the library Bike linked to instead of directly using SBCL's API
6:11:28
nwoob
do you people here recommend going through SICP if I have almost none mathematical background?
6:23:27
aeth
okay, you don't have the majority, but you may have the plurality, but https://portability.cl/ is probably a biased sample
6:26:11
aeth
If you mean missing altogether, the most noticably missing thing is no portability layer over sb-unicode afaik, so no portable unicode-enabled alternative to sb-unicode:whitespace-p among other, harder-to-implement things like sb-unicode:casefold
6:27:20
Shinmera
There is cl-unicode, though it's not as fast as sb-unicode and is missing a bunch of stuff.
6:28:18
aeth
It doesn't look like it has either of my examples (whitespace or casefold/foldcase). It's in my history, but that might be one reason why I don't use it.
6:29:36
beach
nwoob: It depends on your objectives. If you want to write pragmatic Common Lisp code as opposed to understanding the basic ideas of recursion, encapsulation, etc. you are probably better off with PCL.
6:58:16
pjb
nwoob: I would advise to acquire some mathematical background, this would help a lot to be a programmer, and anything else too, nowadays…
9:13:44
White_Flame
hmm, so if I have a lexer/parser that takes a character stream, how best to integrate it into the lisp reader for a non-string sublanguage?
9:16:28
flip214
Is there an easy way to compare two hash-table trees for EQUALity? Apart from using ALEXANDRIA:HASH-TABLE-ALIST recursively, then sorting, or so?
9:20:11
aeth
the only potentially tricky part is that you need to know if you didn't cover any values in the hash table not being mapped over
9:21:16
aeth
The laziest programmer way to avoid this issue is to have a counter since you can easily take the size of a hash table at the end. Or even just do a size comparison first. If the sizes aren't equal, they can't be equal.
9:25:30
heisig
Or you could use WITH-HASH-TABLE-ITERATOR, if you want your program to be particularly ugly :)
9:28:47
White_Flame
I made do-plist, do-alist, do-hash specifically with a surrounding (block nil ...) exactly for that
9:30:24
White_Flame
I use them surprisingly often, even though it's not that big of a deal, it feels nice
9:32:26
heisig
I prefer non-nil block names. I tend to forget which macros add an implicit block named nil, so an occurring RETURN can be quite confusing.
9:35:52
no-defun-allowed
I still need to think of a better name than DECENTRALISE-STANDARD-SYSTEM:UPDATE-SYSTEM-FOR-NEW-INTERESTING-OBJECT-PREDICATE
9:37:32
White_Flame
if I need to return deeper (which is exremely rarely; plain early exit is rare enough), then I'll manually use a lbock
9:39:16
no-defun-allowed
White_Flame: Then I get lazy and write d-s-s:u-s-f and SLIME gets confused as it doesn't like expanding both sides of a package :
9:40:02
aeth
Oh no, Gitlab has a new "smart" editor for its snippits that messes up the indentation.
9:40:36
no-defun-allowed
Someone would probably tell me decentralise-standard-system is too short and ambiguous.
9:42:42
no-defun-allowed
To be safe, I should use reverse domain name notation and call it org.cooperative-of-applied-language.decentralise2.standard-system:update-system-for-new-interesting-object-predicate
9:47:02
aeth
Well, I hope I didn't mess this up when I manually indented the code like... well, I don't think I've ever manually indented Common Lisp before. https://gitlab.com/snippets/1964967
9:47:27
aeth
Thanks for messing up your simple pastebin functionality by making your editor "smart", Gitlab.
9:53:47
aeth
But I generally disable JavaScript through umatrix because far too many things break without it running entirely
9:54:06
aeth
umatrix defaults to enabling first party JS, which works for pretty much every site that isn't a news site
9:55:29
aeth
You can whitelist more than just first party, but "everybody uses cloudflare" is part of what I mean by "except for news sites"
9:58:30
aeth
but anyway, my points are (1) wow that was unexpectedly hard because hash tables are kind of the worst case for this sort of thing (maybe I should put it in my util library) and (2) the last thing that needs a "smart" JS editor that messes with indentation is a pastebin for source code
10:34:37
flip214
aeth: I've got hashtables with string keys, so I resorted to providing a "readable" (ha!) representation, and then do (equalp) of both.