<White_Flame>
and 2 equations, one where y ends up -10 to +10, and another where y ends up 70 to 670
<White_Flame>
(or, x = 0 to 1, even easier)
<White_Flame>
y = 20*x - 10 would be the 1st line. You can see that 20 is the range, and 0 is the midpoint
<White_Flame>
it's the very basics of algebra
mindCrime has quit [Ping timeout: 264 seconds]
theothor` has quit [Ping timeout: 272 seconds]
<aeth>
I'd caution against using the basics of algebra in numerical stuff because floats only approximate reals.
<aeth>
alexandria:lerp already exists, though
<White_Flame>
ah, cool
luni has joined #lisp
<White_Flame>
well, these basics of algebra can be expressed with rationals, assuming starting from integers as pixel values
pranavats has joined #lisp
<aeth>
there is quite a debate over which algebraically-equivalent way to LERP to use, which is why alexandria:lerp has a huge comment
<aeth>
for a one liner
dbotton has joined #lisp
<White_Flame>
but all graphical stuff that use matrices are all floats anyway
<White_Flame>
and the precision is fine for the limited number of transformations that happen in most visualizations
<aeth>
White_Flame: alexandria:lerp uses 1.0, not 1.0f0, so you can just use 'RATIONAL as your *read-default-float-format* before loading alexandria if you want rationals :-)
<Josh_2>
There is no :thonk: emote, but that is basically my reaction
akoana has joined #lisp
<White_Flame>
TIL
<aeth>
This is actually fairly problematic. I didn't notice the 1.0 before. Maybe it's new.
<aeth>
It means that whichever float that returns is a side effect of a compile time global variable.
<White_Flame>
ah, alexandria doesn't do the scaling between 2 ranges
<White_Flame>
only the forward lerp
<Josh_2>
¯\_(ツ)_/¯
<Josh_2>
I appreciate your explanation White_Flame but I still dont understand
<White_Flame>
Josh_2: if you have the number 3, what percent is it on the -10 to +10 scale?
<White_Flame>
where 0% is -10, and 100% is +10?
<Josh_2>
65?
<White_Flame>
the result of that percentage is then plugged into lerp
<White_Flame>
to get that % of the way from 70 to 670
<White_Flame>
and how did you calculate 65%? plug that into a function
<White_Flame>
3 out of -10 to +10, get the minimum to zero, so 13 out of 0 to +20
<White_Flame>
get the maximum to 1 (or 100%), so 0.65 out of 0 to 1
dbotton has quit [Quit: This computer has gone to sleep]
mrcom has joined #lisp
theothor` has quit [Ping timeout: 264 seconds]
<pfdietz>
Ok. I now have COVER doing coverage checkpoint and rollback. Next step: automatic generation of minimized coverage-increasing test inputs.
pfdietz has quit [Quit: Ping timeout (120 seconds)]
jeosol has quit [Quit: Ping timeout (120 seconds)]
dbotton has joined #lisp
pfdietz has joined #lisp
jeosol has joined #lisp
mrcom has quit [Ping timeout: 265 seconds]
dbotton_ has joined #lisp
dbotton has quit [Ping timeout: 260 seconds]
edgar-rft has joined #lisp
theothor` has joined #lisp
Nilby has joined #lisp
mrios22` has quit [Remote host closed the connection]
phireh has quit [Remote host closed the connection]
theothor` has quit [Ping timeout: 246 seconds]
dbotton_ has quit [Quit: Leaving]
<PlusEffect>
I'm having trouble with SBCL 2.1.x on my Lenovo IdeaPad 3 Chromebook; sb-posix compilation unit failures
karlosz has quit [Quit: karlosz]
edgar-rft has quit [Quit: Leaving]
Wezl has quit [Ping timeout: 272 seconds]
mrcom has joined #lisp
edgar-rft has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
``Erik has joined #lisp
mathrick_ is now known as mathrick
theothor` has joined #lisp
mrcom has quit [Ping timeout: 265 seconds]
logand`` has joined #lisp
theothor` has quit [Ping timeout: 246 seconds]
logand` has quit [Ping timeout: 240 seconds]
PlusEffect has quit [Read error: Connection reset by peer]
wsinatra has joined #lisp
luckless_ has quit [Quit: luckless_]
theothor` has joined #lisp
wsinatra has quit [Quit: WeeChat 3.0]
Wezl has joined #lisp
theothor` has quit [Ping timeout: 264 seconds]
Josh_2 has quit [Remote host closed the connection]
pankajsg has quit [Ping timeout: 265 seconds]
luckless has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
theothor` has joined #lisp
Codaraxis_ has joined #lisp
theothor` has quit [Ping timeout: 246 seconds]
Codaraxis__ has quit [Ping timeout: 240 seconds]
Wezl has quit [Ping timeout: 264 seconds]
zacts has quit [Quit: leaving]
dbotton has joined #lisp
theothor` has joined #lisp
dbotton has quit [Client Quit]
zulu-inuoe has quit [Read error: Connection reset by peer]
theothor` has quit [Ping timeout: 264 seconds]
dbotton has joined #lisp
emacsomancer has joined #lisp
casual_friday has joined #lisp
dbotton has quit [Client Quit]
mmmattyx has quit [Quit: Connection closed for inactivity]
casual_friday has quit [Quit: Connection closed]
catt has joined #lisp
theothor` has joined #lisp
Alfr_ has joined #lisp
KREYREEN has quit [Remote host closed the connection]
KREYREEN has joined #lisp
<beach>
Good morning everyone!
Alfr has quit [Ping timeout: 240 seconds]
<beach>
francogrex: I will probably leave most platforms up to people who have access to them and who would like to see SICL run on those platforms.
<beach>
jmercouris: The platforms that SBCL runs on have no impact on the SICL code generator.
theothor` has quit [Ping timeout: 264 seconds]
<beach>
jmercouris: SBCL will no longer be present when the SICL binary runs.
<beach>
jmercouris: And SICL does not depend on SBCL in any way whatsoever. It can use any ANSI conforming Common Lisp implementation that can also run CLOSER-MOP.
<beach>
jmercouris: SICL is meant to be a clean-slate implementation, so I want my own version of the garbage collector, of generic dispatch, of the optimization techniques we have designed, etc. I don't want to depend on any other implementation.
<beach>
I guess most of what I just said was already said several hours ago.
* beach
should read up more before answering.
theothor` has joined #lisp
<Bike>
it's more authoritative coming from you anyway.
<beach>
Maybe. But y'all did a good job explaining how a compiler works.
theothor` has quit [Ping timeout: 246 seconds]
<Bike>
thank you
<beach>
I can't help wondering why jmercouris is interested in the subject, yet hasn't watched my presentations "Creating a Common Lisp implementation". :)
orivej has joined #lisp
<beach>
phoe's description of a compiler is not quite true for Common Lisp, as I explain in those videos. A C compiler starts with an empty global environment (which is why there are all those #include things) whereas a Common Lisp compiler essentially needs a running Common Lisp system.
<beach>
Er, it needs the existing global environment of a running Common Lisp system, I mean.
dbotton has joined #lisp
pilne has joined #lisp
PlusEffect has joined #lisp
dbotton has quit [Client Quit]
<PlusEffect>
I think I figured out how to compile SBCL on my Chromebook! Just had to comment out some tests that were not relevant on my platform.
<aeth>
A lot of general compiler stuff doesn't quite fit with CL. Especially the huge focus in most compilers on parsing.
<aeth>
PlusEffect: so it fails some tests?
<no-defun-allowed>
Is it?
aartaka has joined #lisp
<Bike>
old "compiler theory" is mostly parsing, yeah.
<beach>
Yes, most compiler books have a large part about parsing. That's why I use Muchnick's book most of the time.
<Bike>
modern (since, i don't know, several decades) optimizing compilers have lots of their own theory of course
theothor` has joined #lisp
<aeth>
afaik, undergrads mostly still focus on the parsers, though.
<no-defun-allowed>
I thought most of the compiler complexity was in IR, and only crappy interpreter tutorials take far too long on parsing -- oh, okay.
<aeth>
I didn't take a compiler class, though.
<PlusEffect>
It fails stat.2 and stat.4, I think, because I'm probably using those security modules that are mentioned in the comments. The root directory appearing writable to others somehow?
<Bike>
no, i mean, the actual complexity of an optimizing compiler is definitely the optimizing part, yes.
aartaka_d has joined #lisp
<no-defun-allowed>
My favourite coauthor had to write a "compiler" from whatever language (call this one Foo) to JS, and it was very much Foo source -> Foo AST -> JavaScript source
<Nilby>
It will be a fun day when I have to start adding #+sicl
<aeth>
no-defun-allowed: An introduction to compilers, e.g. online or in a book, could be 50% or more about parsing... but obviously the optimization part is how you turn a 5 week compiler project into an infinite week compiler project.
<beach>
Nilby: I'll let you know. :)
<Nilby>
beach: Thanks. I appreciate your diligence.
<beach>
It used to be the case that parsing was a large part of the time a compiler took, probably because not many optimizations were performed. So parsing technology became a big deal.
dbotton has joined #lisp
<no-defun-allowed>
I wish they'd just provide e.g a YACC file, and get the damn thing over with, but there's also the tendency to stretch the material out by introducing one construct, then the grammar, then the evaluation rules, etc. But I'm not bored enough to rant about random stuff I read on the Internet again.
toorevitimirp has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
aartaka has quit [Ping timeout: 272 seconds]
aartaka_d has quit [Ping timeout: 240 seconds]
theothor` has quit [Ping timeout: 246 seconds]
<aeth>
I really don't know how any individuals get past the parser part. It's time consuming. Even Scheme-in-CL took me a while and it's Scheme. In CL.
<aeth>
If I wrote a C++ compiler (in CL of course) I don't think I'd ever get past parsing
<aeth>
More languages need s-expressions. Not worth the effort to do other things.
aartaka has joined #lisp
<no-defun-allowed>
I was going to say that someone actually wrote 41 thousand words on writing an interpreter without an evaluator, but they had in fact written an interpreter, and it was hidden by all the crap on parsing.
<Bike>
did you use a parser generator
mrcom has joined #lisp
<aeth>
Bike: the parser generator was myself
<no-defun-allowed>
aeth: Depending on your definition of parsing, doesn't C++ parsing range between annoying and not context free and outright undecidable? I got away with writing a few dispatch characters to fake Scheme syntax ([, ], #t and #f) though.
<Bike>
there's your problem
<aeth>
only 1000 lines though
<aeth>
it was just hard to get the number syntax right
<Bike>
you might as well be translating the scheme into assembly yourself too
<Bike>
and yeah, C++ parsing is bad.
<Bike>
C parsing is bad too but not as off the wall about it
<no-defun-allowed>
There was a lot of bikeshedding there on writing the parser without a generator, yes.
<aeth>
Well, in CL it's actually fine, although the style is bad. Just |foo bar|
<no-defun-allowed>
OpenCL gives you ulong (in place of unsigned long) and friends, possibly so they don't have to write unsigned long4 for the vector type.
<dbotton>
Why does (merge-pathnames #P"/Users/dbotton/common-lisp/clog/static-files/" "/tutorial/tut-11.html") results in the tutorial portion of the path disappearing ie => #P"/Users/dbotton/common-lisp/clog/static-files/tut-11.html"
<dbotton>
(Sorry for interrupting)
mmohammadi9812 has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #lisp
<no-defun-allowed>
merge-pathnames doesn't really join paths together, from my reading of the CLHS: "Constructs a pathname from pathname by filling in any unsupplied components with the corresponding values from default-pathname and default-version."
<no-defun-allowed>
This begs the question of what function joins paths together, but in this case, you might be better served by ASDF:SYSTEM-RELATIVE-PATHNAME.
<dbotton>
Is there a way to make that work? Or should just switch to string?
mindCrime has quit [Ping timeout: 264 seconds]
<no-defun-allowed>
e.g (asdf:system-relative-pathname :netfarm "bunnies.asc") on my system returns #P"/home/hayley/netfarm-projects/netfarm/Code/bunnies.asc". You could use something like (asdf:system-relative-pathname :clog "static-files/tutorial/tut-11.html") perhaps.
mmohammadi9812 has quit [Ping timeout: 256 seconds]
<dbotton>
This example is within clog but most would be arbitrary places in the system
davd33 has quit [Read error: Connection reset by peer]
gzj has quit [Remote host closed the connection]
andreyorst has quit [Ping timeout: 240 seconds]
skapata has joined #lisp
imode has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 264 seconds]
vegansbane696 has joined #lisp
andreyorst has joined #lisp
glz has joined #lisp
glz has quit [Client Quit]
theothornhill has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
lotuseater has quit [Remote host closed the connection]
lotuseater has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
hylisper has joined #lisp
orivej has joined #lisp
hylisper has quit [Client Quit]
liberliver has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 264 seconds]
stoneglass has joined #lisp
random-nick has joined #lisp
VincentVega has joined #lisp
<VincentVega>
Just got meself (gensym) to return two #:G0's nearly in a row. Thinking it has something to do with that reproducability rationale that I read about in one of the sbcl bugs. Currently working out a minimal example (which is proving to be a tad tricky), any insights would be appreciated...
<VincentVega>
well, it was in a let g (gensym) at first, does it make a difference?
<VincentVega>
let me read that
<phoe>
not really, it's just the gensym name
gzj has joined #lisp
<VincentVega>
Interesting. Can't say I really understand this bug to say for sure that this is the same one at this point, but yeah, it does look like it got the same roots. Thanks for the link.
<phoe>
well, you could try going to #sbcl and post your problem, maybe also link this issue if it's related
<VincentVega>
Sure, sounds like a good idea, will get this mve done now.
<phoe>
don't know if it will get you anywhere, but might be worth a try
<phoe>
oh boy it's been a while since the last meeting
<beach>
Yes, loke was supposed to do one.
<phoe>
I got a few offers, but none of them fully materialized yet
<beach>
... about Climaxima.
gzj has quit [Ping timeout: 240 seconds]
VincentVega has quit [Quit: Ping timeout (120 seconds)]
VincentVega has joined #lisp
<jmercouris>
Well so far you’ve convinced me not to do it in C lol
<beach>
That's the point. :)
enzuru has quit [Ping timeout: 240 seconds]
iskander has joined #lisp
iskander| has joined #lisp
perrier-jouet has joined #lisp
<jmercouris>
I had been asking about the unique set of basic operators about a year ago i think
iskander- has quit [Ping timeout: 240 seconds]
<beach>
Yes, and there is no unique set.
<jmercouris>
At the time I couldn’t articulate what I was trying to describe, but that is it!
pfdietz has joined #lisp
<jmercouris>
That’s rather unfortunate
<beach>
The paper by Baker is good. He explains various ways of implementing Common Lisp special operators using other Common Lisp special operators, and often the other way around too.
rgherdt has joined #lisp
madage has quit [Ping timeout: 268 seconds]
<jmercouris>
I’ll put that on my list
<jmercouris>
One thing that I think about a lot is maybe it would have been better if the default was doubly linked lists in lisp
iskander has quit [Ping timeout: 264 seconds]
<jmercouris>
I think it would improve performance for so many operations
<nij>
yeah. why isn't that the default?
<beach>
Instead of the existing lists?
<heisig>
jmercouris: Noooo!
<beach>
jmercouris: That would break almost every aspect of the semantics of large parts of Common Lisp.
<heisig>
If you are smart, every operation on lists is already O(1). And singly-linked lists help create beautiful recursive programs.
<jmercouris>
If you are smart?
<jmercouris>
I think there are some algorithms that would be simpler to write with doubly linked lists
<jmercouris>
Perhaps I am not smart enough. :-D
<beach>
jmercouris: If you have (defparameter *l0* (list 'a 'b 'c ...)) then (defparameter *l1* (cons 1 *l0*)) and (defparameter *l2* (cons 2 *l0*)), would then (rest *l1*) and (rest *l2*) be EQ with doubly linked lists?
andreyorst has quit [Ping timeout: 246 seconds]
<jmercouris>
Ambiguous :-D
<heisig>
jmercouris: Insertion at the front is O(1). Removal from the front is O(1). All you have to do is turn the list the right way round.
<heisig>
That works 95% of the time.
<jmercouris>
Sometimes you want to look back without remembering stuff behind you
<jmercouris>
beach: I see the problem, yes
<nij>
Has anyone thought of making "notes" on discussion on #lisp, as the conversation here has been logged.
<jmercouris>
We are a tribal pre writing community
<jmercouris>
We store everything in the oral traditions of our elders
<nij>
Namely, now we are discussing why singly-linked list is the default. Maybe there could be a way to add a summary quickly that refers to this part of conversation?
<jmercouris>
You may consult with the oracle minion for answers to your deepest questions
<nij>
As time goes on, we can make a referrable and usable lisp knowledge database.
theothornhill has quit [Ping timeout: 265 seconds]
<beach>
nij: While there are a few subjects with recurring questions, singly-linked vs doubly-linked lists as the default in Lisp is not one of them.
<heisig>
jmercouris: As for looking behind - if you only need to look a fixed number of list elements behind you, you an scan the list and keep track of the last K elements you just visited.
<jmercouris>
Yeah, I know, but that require another data structure
<jmercouris>
Im just brainstorming here
<jmercouris>
It could and probably is a bad idea
ebrasca has joined #lisp
<jmercouris>
beach: very nice video, I learned a lot
<jmercouris>
It answered quite some questions I’ve had for a while
<jmercouris>
Thanks for taking the time to make it
krkini has quit [Remote host closed the connection]
kini has joined #lisp
<beach>
jmercouris: Sure.
<beach>
Glad you liked it.
<nij>
beach: yeah, but it'd be nice if we can make summaries and annotations easily..
<nij>
and, as time goes on, a compilation of summaries.
Bike has joined #lisp
<beach>
It's a big task, but feel free to start it if you like.
jeosol has joined #lisp
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #lisp
saganman has quit [Ping timeout: 272 seconds]
aartaka has quit [Read error: Connection reset by peer]
madage has joined #lisp
villanella has joined #lisp
zacts has quit [Quit: leaving]
nij` has joined #lisp
Josh_2 has joined #lisp
nij` has quit [Client Quit]
nij` has joined #lisp
<Josh_2>
When using formatter, what do I pass as the stream arg to have it output as a string?
<Nilby>
You don't pass it to formatter, you pass it when you call the result of formatter.
<Josh_2>
use a stream and stream to string it?
<phoe>
(with-output-to-string (s) (funcall (formatter "~A ~A") s 42 24)) ;=> "42 24"
<Xach>
SBCL will translate constant format strings into formatter automagically
<Xach>
(or equivalent)
<Josh_2>
ah right
<pfdietz>
I had a situation that looked like (format nil (if <form> <string1> <string2>) ...), which I think runs faster if the IF parts were strength reduced with calls to formatter.
gutter has joined #lisp
gutter has quit [Read error: Connection reset by peer]
toorevitimirp has quit [Remote host closed the connection]
gutter has joined #lisp
orivej has joined #lisp
Wezl has joined #lisp
pfdietz has quit [Ping timeout: 248 seconds]
Guest7312 has joined #lisp
andreyorst has joined #lisp
krid has joined #lisp
jprajzne has joined #lisp
<Posterdati>
hi
<Posterdati>
so cffi + gsll are broken agai under OpenBSD + SBCL :) fine!
frodef has joined #lisp
Guest7312 has quit [Quit: Leaving]
gzj has joined #lisp
ym has quit [Quit: Leaving]
gzj has quit [Ping timeout: 240 seconds]
h4ck3r9696 has left #lisp [#lisp]
abhixec has joined #lisp
stoneglass has quit [Quit: stoneglass]
<[d]>
<agumonkey#6435> jmercouris how is the browser going
<phoe>
agumonkey: where is this discord bot bridged to?
zaquest has quit [Quit: Leaving]
Wezl has quit [Ping timeout: 258 seconds]
jprajzne has quit [Quit: Leaving.]
Guest7312 has joined #lisp
rogersm has joined #lisp
Gromboli has joined #lisp
frodef has quit [Remote host closed the connection]
frodef has joined #lisp
imode has joined #lisp
frodef has quit [Remote host closed the connection]
<rogersm>
Is there any portable advise implementation
<nij>
s/that's another layer/that requires another layer, thought standard,/
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<phoe>
hmmm
<phoe>
I have no idea
<phoe>
in theory there could be a sbcl-specific way that starts a socket that accepts netcat connections and spawns a new thread with a new REPL for each client
<phoe>
but I don't know how to achieve that, maybe #sbcl would have a hack for that
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
mindCrime has joined #lisp
<nij>
Hmm.. ok. I cannot figure out what M-x slime-connect really does.. but guess that's the only clean way so far to do it.
<nij>
I'd need a nice repl anyway at the end, so using slime/sly makes sense.
<phoe>
exactly
<nij>
I'm just overthinking that maybe in the future, I'd need to do this remotely.
<nij>
And having emacs running by root remotely sounds like a dangerous idea.
<_death>
emacs running by root?
<nij>
But anyway.. I'm one more step closer to replacing my shell with a cl-repl ;D
<nij>
_death: Uh, I mean, to run emacs as root.
<_death>
why would you need to do that?
<nij>
I have a curfew daemon that will curfew my computer usage.
<nij>
It needs to be run by root.
pfdietz has joined #lisp
<nij>
(curfew daemon is written in common lisp, and is supposed to be run as a cl thread)
luni has quit [Quit: Connection closed]
<nij>
I might want to query the daemon or send signals to it
<nij>
Does that make sense @@?
<_death>
if I understand you correctly, the daemon runs as root, and the daemon would have a swank server.. emacs (the client) needs not run as root, though if it connected to a swank server running as root that would indeed be a problem
<nij>
yeah..
<_death>
if you run the daemon as root want to communicate with it, the protocol should likely be very constrained, so you wouldn't send lisp forms to evaluate as-is
<nij>
i see
<SpaceIgor2075>
Hello! Is there a way to setup clojure on windows without powershell?
<_death>
so swank is not a good solution for that and you'd want to write your own mechanism
<nij>
OH no :(
<phoe>
SpaceIgor2075: #clojure might be better
<phoe>
you wandered into a lair of Common Lisp programmers
<nij>
Yeah.. if root runs sbcl with a swank port open, anyone that connects to that port has access to the repl, and in practice, the root's privileg.
<nij>
SpaceIgor2075: #lisp is a channel for common-lisp. General lisp questions go to ##lisp, and clojure questions go to #clojure :)
<SpaceIgor2075>
okay
attila_lendvai has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<shinohai>
The thought of Windows + Clojure sounds like better emetic than syrup of ipecac.
amb007 has joined #lisp
<nij>
_death: Wait.. isn't that weird? If connecting to an sbcl repl means access to the user' (who ran it) privilege, why wouldn't connecting to a swank server require a user password?
<nij>
Otherwise, openning a swank server in local network means anyone here can mess with my machine!
dbotton has quit [Quit: This computer has gone to sleep]
<_death>
nij: you have a firewall for that.. and on a local network everyone trusts everyone anyway
theothornhill has quit [Ping timeout: 256 seconds]
<_death>
nij: if you want to let only authorized clients connect, you can then set up an ssh tunnel, like you may do on the internet
frodef` has joined #lisp
frodef has quit [Ping timeout: 264 seconds]
rogersm has joined #lisp
Wezl has joined #lisp
TMA has quit [Ping timeout: 264 seconds]
<nij>
_death: Do you mean this? 1. setup a localhost swank server. 2. let others connect to localhost via ssh?
<nij>
(I'm still developing my networking knowledge from scratch.. so i might miss some basic stuff.)
TMA has joined #lisp
<phoe>
bind the socket to 127.0.0.1 - this way it won't get exposed to the wider network and the only way of connecting will be local connections, e.g. a SSH tunnel
<nij>
I see.
<nij>
It's handy. OK.
<_death>
nij: yes, and the port can be filtered so only local access is allowed.. the ssh tunnel can deal with that..
<nij>
But it's still not too handy if I want to allow my running repl *PARTIALLY* to someone else.
<nij>
Hmm.. I'm thinking that every commands sent from that inferior user will be first wrapped with the user's identity.
<phoe>
sandboxing CL is a very hard thing to do
<nij>
And then the command with the identity will be taken care separately.
<phoe>
a basic assumption is that, if someone owns a REPL, they own the whole image.
<nij>
MMmm what does sandboxing here means?
<phoe>
only allowing a user to execute some subset of available commands
<nij>
I see.
<phoe>
basically allowing a possibly hostile user to access your CL image
<nij>
that's not good :(
<_death>
nij: there is no widespread solution.. there are things like cl-evalbot, and a real sandbox could be a virtual machine
<nij>
I want my root launches a repl that can be accessed by root later.
<phoe>
oh, that works
<nij>
phoe: how?
<phoe>
if you want to allow root to access the REPL, then root already has root permissions
<phoe>
the only issue is ensuring that only root has access to it, somehow.
<nij>
rephrase: I want root to open a repl at boot, which can be later accessed by root.
<nij>
Is that possible?
<phoe>
hmmmmm, maybe you could force swank to connect via a unix local socket that is only accessible by root
<_death>
nij: I think there is also a slime pull request that sets up a connection using unix domain sockets.. but I've not looked into it
<phoe>
oh yes, this
<phoe>
ensure that the socket is owned by root:root and has permissions 600 - should be enough
<_death>
also, slime has something with a slime-secret file that may work?
<phoe>
hm
<phoe>
maybe that, too
<rogersm>
In general, there's not a lot of benefits with local unix sockets and some downsides
<rogersm>
and why do you want root to access the REPL?
<nij>
to debug, to inspect, to change local state .. etc
<nij>
I just adore the idea that you are able to inspect all running instances at any time
<rogersm>
the lisp image?
<nij>
including scripts that are run by root
<rogersm>
ah! ok
<nij>
yeah..
<nij>
I can get rid of systemd even with this.
<rogersm>
if you need root access, that's ok
<nij>
(which seems to be hard to debug)
<nij>
and it will be portable.
<rogersm>
if you want to get rid of systemd
<nij>
cuz sbcl takes care of the mess for me
<rogersm>
use a unix-like system without systemd
<nij>
no that's not the only objective
<rogersm>
(they work great)
<nij>
rogersm: i will eventually move to guix+shepherd
<rogersm>
but re-inventing the wheel is extremely difficult
<nij>
but im noobie.. it will take me some time
<nij>
rogersm: yeah im aware of. But that's just one of the objectives.
<rogersm>
my recommendation is to start with some straightforward setup
<rogersm>
easy
<rogersm>
and grow from there
<_death>
basically if you have a ~/.slime-secret file containing something (e.g., a uuid) only those who can read it can respond to swank's challenge
<nij>
The grand goal (of mine) is still to be able to talk to any instance at any time.
<_death>
correctly
<Nilby>
I used to telnet to the lisp machines repl. It wouldn't let me change anything and many functions were restricted, until you authenticated as a user. There was no such thing as root.
<_death>
or rather, know its contents..
<nij>
I think I will try phoe's method first, namely to secure the socket swank creates.
<nij>
By making sure it's at mod 600 and owned by root:root
__jrjsmrtn__ has quit [Quit: Bye !]
Wezl has quit [Ping timeout: 258 seconds]
theothornhill has joined #lisp
__jrjsmrtn__ has joined #lisp
theruran has quit [Quit: Connection closed for inactivity]
<nij>
------
<nij>
Hmm.. I cannot find where the socket is created by (swank:create-server :port 2718).. any idea?
Aurora_v_kosmose has quit [Remote host closed the connection]
Aurora_v_kosmose has joined #lisp
Guest7312 has quit [Quit: Leaving]
<Josh_2>
is there a library around that allows me to implement something like <command> <various flags> <different options based on flags> ?
vhost- has quit [Quit: WeeChat 2.8]
<Josh_2>
I can implement myself but cba
<Xach>
cba?
<Josh_2>
cant be asked
<Josh_2>
it might actually cant be arsed :think:
vhost- has joined #lisp
<Josh_2>
I will implement with a nice hash table if one does not exist already
surabax has quit [Quit: Leaving]
gioyik has quit [Quit: WeeChat 3.0]
<aeth>
it definitely has to exist because it's a common problem
<aeth>
(odds are it only does 80% of what you want to do, though)
<Josh_2>
ha yeh
<Xach>
Josh_2: wait, do you mean like a command-line command, not a lisp "command"?
adam4567 has joined #lisp
adam4567 has quit [Client Quit]
<Josh_2>
lisp, basically getting a string like "compass -x 5 -y 5" that would return results higher than x 5 and y 5 etc
adam4567 has joined #lisp
<aeth>
oh, not command line, then
<Xach>
approximately command-line though.
<Josh_2>
this is in lisp and the arguments are not sent from the command line but from a user
<Josh_2>
yes basically the same
<Josh_2>
from a user over the network
<Xach>
Josh_2: there are one hundred thousand command-line parsing libraries. if you can split your command by whitespace, maybe some of them could help.