shinohai has quit [Remote host closed the connection]
shinohai has joined #lisp
ebrasca has joined #lisp
cantstanya is now known as Oxford
Oxford is now known as frank
frank is now known as cartwright
cartwright is now known as cantstanya
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
Jeanne-Kamikaze has joined #lisp
vhost- has quit [Ping timeout: 265 seconds]
ahungry has joined #lisp
Kundry_Wag has joined #lisp
watkinsr has joined #lisp
smasta has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 256 seconds]
zaquest has joined #lisp
Kundry_Wag has joined #lisp
adam4567 has quit [Remote host closed the connection]
bitmapper has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 265 seconds]
efm has joined #lisp
Kundry_Wag has joined #lisp
karlosz has quit [Quit: karlosz]
smasta has joined #lisp
renzhi has joined #lisp
hdasch has quit [Ping timeout: 256 seconds]
hdasch has joined #lisp
hdasch has quit [Ping timeout: 265 seconds]
hdasch has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
peli has joined #lisp
<peli>
is there a good lightweight routing framework to do something like flask or sinatra in CL?
hdasch has quit [Ping timeout: 258 seconds]
hdasch has joined #lisp
ayuce has quit [Remote host closed the connection]
iAmDecim has joined #lisp
xkapastel has joined #lisp
terpri has quit [Quit: Leaving]
iAmDecim has quit [Ping timeout: 265 seconds]
ukari has joined #lisp
mono has joined #lisp
monokrom has quit [Ping timeout: 264 seconds]
smasta has quit [Ping timeout: 264 seconds]
karlosz has joined #lisp
Inline has quit [Ping timeout: 265 seconds]
Jeanne-Kamikaze has quit [Remote host closed the connection]
libertyprime has joined #lisp
libertyprime has quit [Read error: Connection reset by peer]
vhost- has joined #lisp
vhost- has joined #lisp
libertyprime has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
<beach>
Good morning everyone!
Codaraxis__ has joined #lisp
<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.
<peli>
beach: i thought they were common enough but
<peli>
lightweight web frameworks that basically just have routing
<peli>
they are rather unopinionated with regards to architecture
<beach>
See, I didn't even know it had to do with web stuff.
<no-defun-allowed>
Hunchentoot?
<peli>
well i guess you learned something today
<peli>
i also look forward to learning something
<aeth>
"like Flask" is actually a very good way to ask the question
<aeth>
Most such web frameworks do literally say that on their front page
<aeth>
I think the author of the alternative to Hunchentoot has one.
<aeth>
I forget the name.
<aeth>
(Of the author, the alternative, and the framework. It has been quite a few years)
<aeth>
yeah, it even copies the @foo in a reader macro
<peli>
no-defun-allowed: aeth: that looks good! thank you
<aeth>
That might be going a bit too far to be like Flask at least imo
<no-defun-allowed>
Enjoy your documentation with that.
<aeth>
I think it can run on both the web servers though
<aeth>
peli: There's an even more lightweight (but a bit lower level) one that caveman is based on: http://8arrow.org/ningle/
<aeth>
(hmm... I'm not sure if it's the lower level or just a fork)
<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)
<ahungry>
caveman2 has a 'start' command that supports booting up with woo, hunchentoot or wookie iirc, but thats again thanks to clack
pilne has quit [Quit: Never underestimate the power of stupid people in large groups.]
benjamin-l has joined #lisp
gko has joined #lisp
<benjamin-l>
I'm trying to make a class that extends the built-in array class like this: (defclass map-array (array) ())
<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
<no-defun-allowed>
Can't do that.
<benjamin-l>
is there any way to work around this
<no-defun-allowed>
You can't subclass classes with metaclass built-in-class.
<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."
<aeth>
it's the same PDF but the link in the SBCL manual is dead
vlatkoB has joined #lisp
<Bike>
this is what sbcl implements
<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.
<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
<aeth>
benjamin-l: you'll want to use the library Bike linked to instead of directly using SBCL's API
Kundry_Wag has joined #lisp
narimiran has joined #lisp
Bike has quit [Quit: leaving]
swflint has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 264 seconds]
swflint has joined #lisp
gko has quit [Ping timeout: 240 seconds]
lavaflow has quit [Ping timeout: 260 seconds]
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
shifty has joined #lisp
sauvin has joined #lisp
gravicappa has joined #lisp
revtintin has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
renzhi has quit [Ping timeout: 265 seconds]
revtintin has quit [Ping timeout: 256 seconds]
terpri has joined #lisp
revtintin has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
iAmDecim has joined #lisp
revtintin has quit [Ping timeout: 256 seconds]
iAmDecim has quit [Ping timeout: 256 seconds]
revtintin has joined #lisp
nwoob has joined #lisp
ahungry has quit [Ping timeout: 256 seconds]
<nwoob>
do you people here recommend going through SICP if I have almost none mathematical background?
<Shinmera>
aeth: what does that even mean
<aeth>
Shinmera: that if there's a portability library, odds are it's written by you
Kundry_Wag has joined #lisp
<Shinmera>
I don't have /that/ many
<aeth>
okay, you don't have the majority, but you may have the plurality, but https://portability.cl/ is probably a biased sample
<Shinmera>
I'm sure there's a few missing still.
<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
<Shinmera>
There is cl-unicode, though it's not as fast as sb-unicode and is missing a bunch of stuff.
<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.
<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.
<beach>
nwoob: Also, it depends on what kind of programming you have done in the past.
Kundry_Wag has quit [Ping timeout: 260 seconds]
ukari has quit [Remote host closed the connection]
revtintin has quit [Ping timeout: 265 seconds]
holycow has joined #lisp
<pjb>
nwoob: I would advise to acquire some mathematical background, this would help a lot to be a programmer, and anything else too, nowadays…
slyrus_ has joined #lisp
slyrus__ has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 264 seconds]
shifty has joined #lisp
holycow has quit [Quit: Lost terminal]
revtintin has joined #lisp
revtintin has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
jello_pudding has quit [Ping timeout: 265 seconds]
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 250 seconds]
revtintin has joined #lisp
mangul has joined #lisp
mangul has quit [Remote host closed the connection]
shangul has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
shangul has quit [Remote host closed the connection]
dilated_dinosaur has quit [Remote host closed the connection]
tiwEllien has joined #lisp
revtintin has joined #lisp
<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?
shangul has quit [Ping timeout: 258 seconds]
ggole has joined #lisp
<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?
<flip214>
thanks, got it already in 7 lines
<jackdaniel>
flip214: equalp works on hash tables
<White_Flame>
equalp is often wrong/unwanted due to ignoring string case
<aeth>
If EQUALP doesn't quite do what you want (e.g. it's case insensitive) just maphash
<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
<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.
madage has quit [Remote host closed the connection]
<aeth>
Actually, LOOP is better than MAPHASH here because you want short circuiting
<heisig>
You can also short-circuit MAPHASH, using GO or RETURN-FROM.
<aeth>
ah
<heisig>
Or you could use WITH-HASH-TABLE-ITERATOR, if you want your program to be particularly ugly :)
peli has left #lisp [#lisp]
xaotuk has quit [Quit: WeeChat 2.7.1]
dilated_dinosaur has joined #lisp
<White_Flame>
I made do-plist, do-alist, do-hash specifically with a surrounding (block nil ...) exactly for that
<aeth>
ah
<White_Flame>
I use them surprisingly often, even though it's not that big of a deal, it feels nice
madage has joined #lisp
<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.
<White_Flame>
return-from is annoyingly long for me, for some reason
<White_Flame>
even though I do use extremely long names in my own stuff
<no-defun-allowed>
I still need to think of a better name than DECENTRALISE-STANDARD-SYSTEM:UPDATE-SYSTEM-FOR-NEW-INTERESTING-OBJECT-PREDICATE
<flip214>
White_Flame: why not call the blocks 'do-plist, 'do-hash, etc.?
<White_Flame>
purely because I'd rather do (reutrn foo) than (return-from do-plist val)
Lord_of_Life has quit [Ping timeout: 265 seconds]
<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
<White_Flame>
or a block, if I want it to compile without typos
Lord_of_Life has joined #lisp
<White_Flame>
no-defun-allowed: seems like a fine name to me, assuming your tab key works
<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 :
<White_Flame>
no package local nickname for the first part?
<aeth>
Oh no, Gitlab has a new "smart" editor for its snippits that messes up the indentation.
<no-defun-allowed>
Someone would probably tell me decentralise-standard-system is too short and ambiguous.
<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
<White_Flame>
still shorter than real java code
<no-defun-allowed>
):
revtintin has quit [Ping timeout: 256 seconds]
<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
frgo_ has joined #lisp
<aeth>
Thanks for messing up your simple pastebin functionality by making your editor "smart", Gitlab.
frgo_ has quit [Client Quit]
iAmDecim has joined #lisp
<White_Flame>
also, thanks for showing empty pages when javascript is disabled, gitlab
<aeth>
There's actually a way around that because it has an API
Kundry_Wag has joined #lisp
<aeth>
But I generally disable JavaScript through umatrix because far too many things break without it running entirely
<aeth>
umatrix defaults to enabling first party JS, which works for pretty much every site that isn't a news site
<White_Flame>
everybody uses cloudflare & google js links though
<aeth>
You can whitelist more than just first party, but "everybody uses cloudflare" is part of what I mean by "except for news sites"
gxt has quit [Ping timeout: 240 seconds]
revtintin has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Ping timeout: 265 seconds]
<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
random-nick has quit [Quit: quit]
random-nick has joined #lisp
random-nick has quit [Ping timeout: 265 seconds]
ramHero has joined #lisp
ebrasca has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
amerigo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
random-nick has joined #lisp
ramHero93 has joined #lisp
ayuce has joined #lisp
Codaraxis_ has joined #lisp
Codaraxis__ has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
igemnace has quit [Remote host closed the connection]
<flip214>
aeth: your paste doesn't do recursive hash-table trees.
<flip214>
aeth: I've got hashtables with string keys, so I resorted to providing a "readable" (ha!) representation, and then do (equalp) of both.
<phoe>
you can pass information through the &environment that way.
frgo has joined #lisp
<White_Flame>
wow, that's pretty nasty
<White_Flame>
if I read flip214's question correctly, in your (defmacro foo (params) ...) the params will already be the original pre-macroexpansion form, if it contains any
dddddd has joined #lisp
<White_Flame>
because of the outside-in ordering
<flip214>
White_Flame: I'd like to annotate source forms for debugging purposes... so the macroexpanded things don't help that much
<MichaelRaskin>
White_Flame: my paper about code walking contains an actual nasty example
<MichaelRaskin>
flip214: you get original non-expanded forms
<MichaelRaskin>
White_Flame: the author here is being nice with inter-macro communication
<White_Flame>
are there compatibility libs to access environment objects in a standard way?
<Shinmera>
there's several cltl2 portability libraries in various states of... compatibility
<flip214>
I've got comments that I want to associate to the forms after them. but if a macro expands into some code, the CONSes or form tree won't match what I'm seeing at the form of the comment.
<flip214>
I'd like to be able to later on find the comment of the given form.
<Shinmera>
(defmacro with-comment (comment &body stuff) #| stash the stuff and comment somewhere to look up later #| `(progn ,@stuff))
<Shinmera>
err, |# at the end there but whatever
<White_Flame>
how do you have a reference to the form in order to try to find the comment?
<flip214>
yeah, but how would stuff find its comment again?
<Shinmera>
I have no damn idea what you want to begin with, so
<White_Flame>
if it's data, unevaluated, your macro won't run. if it's evaluated, the "form" is now in a compiled form and you don't have a reference to its bit in the machine code
<flip214>
White_Flame: some things have a compiler-macro that has "&whole form" to reference back into a hash-table for the comment
<White_Flame>
so you want an EQ reference to that form somehow from somewhere else?
<flip214>
I guess so... I got myself confused already ;/
<White_Flame>
as a key to the hashtable of comments or something
<flip214>
Might need to sleep over the whole concept
<White_Flame>
yeah, I don't know what your lookup key is
iAmDecim has quit [Ping timeout: 250 seconds]
z147 has joined #lisp
nwoob_ has joined #lisp
ayuce has quit [Remote host closed the connection]
nwoob has quit [Ping timeout: 250 seconds]
jonatack_ has quit [Ping timeout: 258 seconds]
ramHero has quit [Ping timeout: 265 seconds]
Steinberg2010 has joined #lisp
Kundry_Wag has joined #lisp
Bike has joined #lisp
moewe has joined #lisp
<moewe>
Hey folks, trying some LISPing. I cant find an answer to my question:
shka_ has joined #lisp
* Xach
leans forward in anticipation
<heisig>
42
<Josh_2>
^
<moewe>
When I'm inside a package -> (in-package), I obviously can't access outside symbols, especially (true). I can't find how to access that inside a package? I also tried to simply exit the package namespace and execute it there, but the internet said to simply use the lisp namespace. But at least in sbcl it doesn't exist.
<moewe>
In short: how to evaluate (true) inside a package?
<Xach>
moewe: the premise is wrong. you can access any symbol at any time.
<Xach>
moewe: to access it without a prefix requires some setup.
<Xach>
moewe: TRUE isn't a standard symbol - do you know its home package name?
xuxuru has joined #lisp
<moewe>
oh damn I this is a weird coindidence
<moewe>
I wanted to just let the script wait forever, so I did (sleep (true)), but apparently sbcl just crashed at that moment, and that doesnt even exist
<moewe>
huh
<moewe>
ok
<moewe>
let me rephrase the question
<Bike>
what is "true"?
<moewe>
Is there a way to not let a script exit on the end? I need to keep it alive so a thread can continue working
<Xach>
moewe: sure. (loop (sleep 1)) is one way.
<moewe>
aaah thanks!
<Xach>
(loop) is another but that will use CPU
<_death>
join-thread
<Xach>
that is a very nice way when a thread is involved!
Steinberg2010 has quit [Ping timeout: 246 seconds]
<Bike>
join-thread is probably the way to go if you are in fact wanting a thread to finish
<no-defun-allowed>
"arithmetic error FLOATING-POINT-INVALID-OPERATION signalled" time to report this bug in SBCL /s
<Xach>
moewe: out of curiosity, what is the thread doing?
<moewe>
I actually just sent you an E-Mail for inclusion about that :D I try to create a telegram bot, and that creates a thread in the background to listen for messages, so that thread never finishes
<Bike>
join-thread will never return, then. seems fine
<_death>
maybe it would be a good idea to have a way to signal the thread that it needs to die
<moewe>
Also thought about that
<moewe>
currently screening and CTRL+C
<moewe>
but that's in the future - I just want that thing to work
<moewe>
at least rn
<Xach>
Are there other threads running?
<moewe>
but since I want to liberate it as soon as it is, I need to rework that as later on ^^"
<moewe>
I don't know what that lib does, but at least I didn't start a different one
<Xach>
oh.
jprajzne has joined #lisp
smasta has joined #lisp
<Xach>
moewe: if you are able it is helpful for you to create a github issue
smasta has quit [Ping timeout: 240 seconds]
voidlily has quit [Ping timeout: 260 seconds]
pilne has joined #lisp
voidlily has joined #lisp
jonatack has joined #lisp
kslt1 has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 260 seconds]
rippa has joined #lisp
joast has joined #lisp
ayuce has joined #lisp
iAmDecim has joined #lisp
narimiran has quit [Quit: leaving]
smasta has joined #lisp
francogrex has joined #lisp
<francogrex>
Hi, does anyone know how to make a pointer executable in memory, using sb-posix? (sbcl)?
voidlily has quit [Ping timeout: 260 seconds]
<_death>
mprotect?
mrrevolt has quit [Quit: Connection closed for inactivity]
<francogrex>
on windows I used something like that (cffi:with-foreign-object (oldprotect 'dword) (VIRTUAL-PROTECT pointer 8 #x40 oldprotect))
<francogrex>
to make the pointer executable
<francogrex>
_death: mprotect yes but how?
smasta has quit [Ping timeout: 260 seconds]
<_death>
it's not the pointer that is made executable.. it's the memory pointed to
<_death>
man mprotect
<francogrex>
yes but from within sbcl. not man mprotect
<Bike>
you can probably call mprotect from within sbcl
<francogrex>
mprotect(code,pagesize,PROT_EXEC) I have a pointer with sb-alien:make-alien ...
revtintin has quit [Ping timeout: 264 seconds]
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
ramHero has joined #lisp
v88m has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #lisp
efm has quit [Ping timeout: 265 seconds]
hhdave has joined #lisp
ahungry has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Necktwi has quit [Ping timeout: 256 seconds]
lucasb has joined #lisp
grobe0ba has quit [Ping timeout: 258 seconds]
pilne has quit [Read error: Connection reset by peer]
pilne has joined #lisp
grobe0ba has joined #lisp
pilne has quit [Read error: Connection reset by peer]
libertyprime has quit [Read error: Connection reset by peer]
emys has joined #lisp
libertyprime has joined #lisp
smasta has joined #lisp
revtintin has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
francogrex has quit [Read error: Connection reset by peer]
moewe has quit [Quit: Leaving]
zaquest has quit [Quit: Leaving]
revtintin has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
trafaret1 has joined #lisp
random-nick has quit [Ping timeout: 256 seconds]
efm has joined #lisp
Yardanico has quit [Killed (Sigyn (Spam is off topic on freenode.))]
trafaret1 has left #lisp ["ERC (IRC client for Emacs 26.3)"]
gko has quit [Ping timeout: 265 seconds]
<flip214>
when using MACROEXPAND(-ALL), can I tell sbcl to use the environment it's currently running the form in, so that the currently active bindings are seen by the macros?
iAmDecim has quit [Ping timeout: 265 seconds]
shka_ has quit [Quit: Konversation terminated!]
<phoe>
yes, they accept the &environment arg
<phoe>
but you need a macro to access its value
wsinatra has joined #lisp
<flip214>
I tried to copy CAPTURE-ENV from the SBCL tests... but it seems to capture only local functions, and not special variables