jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
tsandstr has quit [Remote host closed the connection]
tsandstr has joined #lisp
<aeth> Has anyone seen pillton? I just did a `tail -n 100000 '#lisp.log' | grep '\(pillton\)\|\(Day\)'` and it looks like he was last here 21 August
meepdeew has joined #lisp
holycow has joined #lisp
<Ober> yes, equinox
<aeth> I'm recompiling with my cache clear to verify it but I think I get problems with specialization-store and ECL and I always try to verify things like that over IRC first.
<no-defun-allowed> can you use cffi to run ecl in another cl?
<Bike> Maybe?
<Colleen> Bike: drmeister said 36 minutes, 42 seconds ago: (ql:quickload something :verbose t) provides lots of info - thank you.
meepdeew has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
kuwze has quit [Ping timeout: 256 seconds]
<aeth> Hmm, yeah, in ECL I get "* The macro form (VEC--INTO! TEMP-VECTOR-1 VEC2 VEC1) was not expanded successfully."
meepdeew has joined #lisp
anewuser has joined #lisp
<Jachy> minion: memo for nixfreak: https://github.com/t-sin/one (example of using CL with bash one liners)
<minion> Remembered. I'll tell nixfreak when he/she/it next speaks.
meepdeew has quit [Ping timeout: 252 seconds]
serichsen has quit [Ping timeout: 276 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
moei has quit [Read error: Connection reset by peer]
moei has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
asarch has joined #lisp
Petit_Dejeuner has joined #lisp
FreeBirdLjj has joined #lisp
dented42 has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
robotoad has quit [Quit: robotoad]
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #lisp
orivej has joined #lisp
mrSpec has quit [Ping timeout: 246 seconds]
FreeBird_ has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
Oladon has quit [Quit: Leaving.]
rtypo has quit [Ping timeout: 260 seconds]
ryan_vw has quit [Ping timeout: 268 seconds]
makomo has quit [Ping timeout: 250 seconds]
elfmacs has joined #lisp
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
slyrus1 has quit [Quit: slyrus1]
quazimodo has joined #lisp
astronavt_ is now known as astronavt
robotoad has joined #lisp
robotoad has quit [Quit: robotoad]
rumbler31 has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryan_vw has joined #lisp
robotoad has joined #lisp
terpri has joined #lisp
roshanavand has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
iomonad has quit [Ping timeout: 244 seconds]
slyrus1 has joined #lisp
gector has quit [Read error: Connection reset by peer]
zz2eggoo has joined #lisp
gector has joined #lisp
Copenhagen_Bram has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
eminhi has joined #lisp
holycow has quit [Quit: Lost terminal]
meepdeew has joined #lisp
ryan_vw has quit [Ping timeout: 246 seconds]
pjb has joined #lisp
jasmith has quit [Quit: Leaving]
arescorpio has joined #lisp
linack has joined #lisp
emaczen has joined #lisp
iomonad has joined #lisp
anewuser has quit [Quit: anewuser]
Bike has quit [Quit: Lost terminal]
elfmacs has quit [Ping timeout: 260 seconds]
arescorpio has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 252 seconds]
shka_ has joined #lisp
<shka_> good morning
<beach> Good morning everyone!
<beach> Hello shka_.
q-u-a-n has joined #lisp
astronavt_ has joined #lisp
astronavt has quit [Read error: Connection reset by peer]
eminhi has quit [Ping timeout: 245 seconds]
igemnace has joined #lisp
eminhi has joined #lisp
Roy_Fokker has quit [Read error: Connection reset by peer]
<nyingen_> So there's a CL lib on github I forked and made a minor patch to (to make it work in modern times). Last commit was 7 years ago. Should I still file an issue and/or make a PR?
<nyingen_> Etiquette question I guess.
<nyingen_> Also someone here said that the original author is in a state of apostasy
<PuercoPop> nyingen_: send the PR, little is lost that way
frodef has joined #lisp
quazimodo has quit [Ping timeout: 272 seconds]
quazimodo has joined #lisp
pjb has joined #lisp
<jackdaniel> nyingen_: one reason you should do that is a possibility, that someone takes a burden of maintaining this library in the future (not the original author). place he'll take the code and issues is the original repository, same goes for accepting pull requests
<jackdaniel> fwiw that's one of things we did with log4cl: we've retyped issues from the original repository and merged dangling pull requests
shifty has quit [Ping timeout: 268 seconds]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
shka_ has quit [Ping timeout: 252 seconds]
lavaflow has quit [Read error: No route to host]
lavaflow has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
_whitelogger has joined #lisp
makomo has joined #lisp
vlatkoB has joined #lisp
iomonad has quit [Ping timeout: 245 seconds]
linack has quit [Remote host closed the connection]
mhd2018 has joined #lisp
<nyingen_> jackdaniel, PuercoPop: ok, I'll do that. Thanks
flamebeard has joined #lisp
ravndal has quit [Quit: WeeChat 2.2]
argoneus has quit [Ping timeout: 252 seconds]
JohnMS_WORK has joined #lisp
ryan_vw has joined #lisp
argoneus has joined #lisp
rgr has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
elfmacs has joined #lisp
frgo has quit [Remote host closed the connection]
runejuhl has quit [Ping timeout: 252 seconds]
runejuhl has joined #lisp
<asarch> How can I get the decimal version?: (+ 1/4 1/4)
<beach> asarch: You are confused.
<beach> asarch: Decimal is just a way of printing.
<beach> Do you mean floating point?
<beach> clhs float
<asarch> I mean, 0.5
<beach> That's a floating point number that happens to be printed as a decimal.
<asarch> 1/4 <- Fractional, isn't it?
<asarch> 0.25 <- Floating?
<beach> ratio
<beach> Try (float 1/2)
<asarch> Bingo!
<asarch> Thank you!
<asarch> Thank you very much :-)
orivej has joined #lisp
* asarch re-write his notes
<beach> If you think you are dealing with decimals, you will be very confused when you try (+ 0.3 0.6)
<no-defun-allowed> my personal favourite is 0.1 + 0.2 but i think it's double floats only or something
<no-defun-allowed> sbcl gets it right
<beach> A large proportion of my students told me that SBCL had a bug, the first time they saw this behavior. Very interesting that they had never noticed it in any other language.
<no-defun-allowed> yep, (+ 0.1d0 0.2d0) /= 0.3d0
<lieven> what every computer scientist should know about floating point still isn't read widely enough :)
<beach> Indeed.
<no-defun-allowed> beach: if you're not busy, could you please explain how SICL manages finding the GC roots in a program?
<asarch> Well, I helped my younger brother to add fractions with just pen and paper and I couldn't find in my notes the way to get '0.5' :-(
<beach> no-defun-allowed: Sure.
<beach> no-defun-allowed: Give me a minute.
<no-defun-allowed> sbcl uses a conservative approach on x86 and x86_64 but i was wondering if you used specific registers or anything to distinguish unboxed and boxed values
<no-defun-allowed> of course (:
<beach> no-defun-allowed: Well, the SICL GC has not been entirely implemented yet, but here is the plan...
<asarch> Anyway, thank you guys. See you later. Have some rest :-)
asarch has quit [Quit: Leaving]
<beach> no-defun-allowed: For each value of the program counter, the compiler emits information about what is contained in which register.
<no-defun-allowed> that's very useful
<beach> no-defun-allowed: So there is no need to distinguish registers.
<no-defun-allowed> nice!
<no-defun-allowed> so the GC just looks up the program counter in your table and looks at what types exist in the registers?
<no-defun-allowed> that's a brilliant approach
<beach> Second page (page 120)
<beach> Yes.
<beach> I did not invent it. At least I hope I didn't.
<no-defun-allowed> i've never heard of that before so you may as well have.
<beach> I seriously doubt it.
<beach> Anyway, you have the complete description in that document. As I wrote, the thing is complicated by callee-saves registers.
<no-defun-allowed> (after reading about gothreads i thought about an OS which could manage thousands of threads in one memory space and uses GC and JIT threads and message passing and stuff)
<no-defun-allowed> thankyou very much
<beach> Anytime.
shka_ has joined #lisp
<beach> If it weren't for callee-saves registers, each stack frame could be processed independently according to the return address of the next frame.
<no-defun-allowed> racket's gc language provides the roots for the programmer which is good but i wanted to know how to find roots as well
<beach> I see.
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
nowhereman_ has joined #lisp
<no-defun-allowed> it's quite fun being able to debug it in something other than gdb, but the not real (loop across heap collecting garbage) is probably my favourite gc development tool :P
frgo has joined #lisp
<no-defun-allowed> i thought about doing a similar thing in CL but the visual heap viewer was too good to pass on.
rgr has quit [Ping timeout: 264 seconds]
igemnace has quit [Quit: WeeChat 2.2]
<ecraven> using slime, is there a way to influence how emacs displays things? can I send something over the wire that will change the fontification in emacs?
<phoe> ecraven: I think the fontification is client-side only
<phoe> you theoretically could send stuff from the Lisp image for evaluation in emacs, but I haven't seen that used widely
<ecraven> I'm getting to the point where I wish I could use emacs like a listener on the old lisp machines :-/
orivej has quit [Ping timeout: 264 seconds]
Elyis has joined #lisp
<Elyis> hi, i'm trying to set up slime-atom but each time i have the error "If this is your first time running atom-slime, this is normal. Try running slime:connect in a minute or so once it's finished compiling." without any changes (i'm on macos)
astronavt_ has quit [Ping timeout: 272 seconds]
<Shinmera> Elyis: better ask an its github issues page.
<Shinmera> *on
<Elyis> Shinmera: oh okay thanks for redirecting me ^^
astronavt has joined #lisp
rozenglass has quit [Remote host closed the connection]
meepdeew has quit [Remote host closed the connection]
beach has quit [Disconnected by services]
beach has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
iomonad has joined #lisp
themsay has joined #lisp
ryan_vw has quit [Ping timeout: 252 seconds]
ryan_vw has joined #lisp
themsay has quit [Ping timeout: 252 seconds]
Elyis has quit []
ryan_vw has quit [Ping timeout: 260 seconds]
iomonad has quit [Ping timeout: 245 seconds]
zz2eggoo has quit [Quit: Leaving]
angavrilov has joined #lisp
kajo has quit [Ping timeout: 240 seconds]
kajo has joined #lisp
stereosphere has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
pierpal has joined #lisp
dorothyw has joined #lisp
<dorothyw> Is there a book that will teach you calculus with lisp?
<no-defun-allowed> SICP does symbolic integration in section 2.3
<dorothyw> Is calculus the same as symbolic integration?
<no-defun-allowed> integration is one thing calculus does
<dorothyw> And derivation correct?
<no-defun-allowed> yes.
<no-defun-allowed> however, i don't think there's too much to change if you can do one but not the other.
<no-defun-allowed> do you know how to do either?
<dorothyw> No. I remember in class there was some very big equation and we learned some rules to take what I would call an expression (4x^2 + x + 3) and do it in our heads without needing the equation. And this had alot to do with acceleration which is meters per second per second.
<Shinmera> What does any of this have to do with lisp
pierpal has quit [Ping timeout: 268 seconds]
<dorothyw> The syntax to math is bad I just can't read it.
<dorothyw> I want to do calculus in lisp.
<dorothyw> So I can learn the tricks everyone brags about being able to do.
scymtym has joined #lisp
<no-defun-allowed> briefly, the rule for derivation of ax^n is anx^(n-1) and integration of ax^n is a/(n+1)*x^(n+1)
<dorothyw> Yes this looks to me much like computer code. I feel it could be converted to lisp.
pierpal has joined #lisp
themsay has joined #lisp
<no-defun-allowed> if you don't have something of that form, just try again with each part of the expression and keep the same operator
<dorothyw> If I parse left to right a represents the integer to multiply against the variable to n power.
<no-defun-allowed> (so if you have (+ a b), then you'll need to integrate/differentiate a and b and substitute them back in)
<no-defun-allowed> you might find it easier to read in s-expressions too
<dorothyw> (derive '(* 3 x x)) => '(* 3 x)
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
<dorothyw> The order of operations confuses me in the second example.
<jdz> dorothyw: Are you after something like Maxima?
<dorothyw> I want to learn what someone who can pass calculus 4 has learned.
<no-defun-allowed> dorothyw: everything before x is the new coefficient, everything after is the power
<dorothyw> a/((n+1)*^(n+1))
pierpal has quit [Read error: Connection reset by peer]
themsay has quit [Ping timeout: 272 seconds]
<no-defun-allowed> for example, integrating 2x will give you x^2
<splittist> dorothyw: you now know that 'symbolic differentiation' is the key term to search for. Looking for that plus 'lisp' gives a squillion hits, some with interesting urls including things like 'calc404' in them.
<dorothyw> s/*^/*x^/
<dorothyw> symbolic differentiation seems to be the same thing as deriving
pierpal has joined #lisp
<dorothyw> If I am correct that the first example is the only way to derive then I have done it. Though I am not sure that is the case.
<dorothyw> To me derivation seems to be pop.
<Jachy> If your physics is good you might be able to use SICM (Structure and Interpretation of Classical Mechanics) Example: https://mitpress.mit.edu/sites/default/files/titles/content/sicm_edition_2/chapter001.html#h1-5
<dorothyw> "4x^7" => (* x x x x x x x 4)
<dorothyw> (defun derive (x) (tail x))
igemnace has joined #lisp
<Shinmera> tail is not a standard lisp function
<no-defun-allowed> i'd frankly make up a *-and-expt "operator" in a program like that to save on some parsing while keeping it short
<dorothyw> s/tail/cdr/
<dorothyw> "4x^7" => '(7 'x 4)
<dorothyw> (defun derive (x) (push x (- (pop x)) 1))
<no-defun-allowed> (*-and-expt 4 x 7)
<no-defun-allowed> ew, push/pop
<dorothyw> hmm?
<no-defun-allowed> i'll take a look now
<dorothyw> You do not like mutability.
<no-defun-allowed> i don't think that's a good place for it
<Jachy> dorothyw: why wouldn't you encode "4x^7" as something like "(* 4 (expt 'x 7))"?
<dorothyw> Because I do not know the definition of expt.
<no-defun-allowed> (expt x n) = x^n
pierpal has quit [Read error: Connection reset by peer]
<dorothyw> What does (expt 5 5) compile to in sbcl?
<Jachy> You could call it pow if that's better
<Jachy> (need your own function of course)
<no-defun-allowed> probably gets compile-time folded
<jdz> dorothyw: You still looking for an answer to book about calculus in lisp?
<no-defun-allowed> (setf (fdefinition 'pow) (fdefinition 'expt)) is always possible but probably not useful
<dorothyw> jdz: if one presents itself. If one does not exist or I find one my query is terminated.
<jdz> I just don't see the point of these random sexps.
<dorothyw> <no-defun-allowed> briefly, the rule for derivation of ax^n is anx^(n-1) and
<dorothyw> integration of ax^n is a/(n+1)*x^(n+1) [08:
<dorothyw> I don't think this is truly a complete set of the rules.
<no-defun-allowed> "briefly"
<no-defun-allowed> no it's not
<dorothyw> This is only the simplest form of derivation.
<Shinmera> can you take this to #clschool or some other noob channel
<no-defun-allowed> dorothyw: just port [SICP's differentiator](https://sarabander.github.io/sicp/html/2_002e3.xhtml#g_t2_002e3_002e2) to CL thanks
<dorothyw> Well then the answer is just learn sicp. And then the answer is just learn pcbl.
<no-defun-allowed> PAIP also has a (macsyma|maxima) clone
<Jachy> dorothyw: Going back to the original question, is the request for some book/resource that combines teaching calculus from the ground up (e.g. no past familiarity) with Lisp as a backdrop? Or just doing calculus with lisp?
pierpal has joined #lisp
astronavt has quit [Ping timeout: 240 seconds]
<shka_> Jachy: first learn to do calculus on paper
<varjag> +1
<shka_> if you want simple book, calculus for dummies is really useful
<shka_> it saves students since late XIX century ;-)
Bronsa has joined #lisp
pierpal has quit [Ping timeout: 252 seconds]
pierpal has joined #lisp
pfdietz has quit [Remote host closed the connection]
pfdietz has joined #lisp
mhd2018 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dorothyw> It is just because I want to learn calculus but I don't like the syntax of math.
shrdlu68 has joined #lisp
asymptotically has joined #lisp
SenasOzys has joined #lisp
eMBee has quit [Ping timeout: 244 seconds]
<razzy> beach: hi :
zfree has quit [Quit: zfree]
dddddd has joined #lisp
<beach> Hello razzy.
<razzy> beach: hello, do you still think about flat filesystems?
<beach> razzy: Have I said that I think about flat filesystems?
<beach> I don't think about file systems at all, usually.
<razzy> i think so, it was clear from you manifest
<razzy> OS manifest
<beach> I don't think I mention files at all in there.
<beach> Other than complaining about them.
<razzy> ah :]
<shka_> razzy: no file system was the idea
<razzy> yes yes, that what i think
<beach> But yeah, I think hierarchical file systems are a bad idea.
<razzy> just files with tags
<beach> Not files.
<beach> Common Lisp objects.
<razzy> hmm hmm, files are next best thing
<beach> To me, a Unix-type file is just a vector of 8-bit bytes.
<no-defun-allowed> unix files don't have any meaning
<razzy> weirdly twisted together
<no-defun-allowed> hell, even character encoding is too hard for unix
<shka_> razzy: idea was to basicly use vast address space of modern machines to establish access to data on so called persistant storage
<razzy> yeah, unix is a swamp people wonder to die in
<beach> razzy: Why are you wondering about that?
<beach> razzy: About what I am thinking of, I mean.
<TMA> I wonder if razzy meant wander
<beach> I think razzy meant wander, yes.
<phoe> what's wander?
<razzy> they wander
<beach> But razzy was also wondering what I am thinking about.
<shka_> some wander by mistake
<shka_> ;-)
iomonad has joined #lisp
<razzy> beach: i need flat filesystem on linux. emacs elisp modul, preferably. so i want to ask you, if you ever try to wander flat-filesystem-on-linux way. emacs module would be good place to test ideas in the wild :]
<razzy> phoe: wander is by foot, wonder is by thinking. (partly joke)
<shka_> razzy: this is not releated to original manifesto in any way
<no-defun-allowed> yeah that's not really what was intended
beach has quit [Ping timeout: 276 seconds]
<shka_> and beach was like "fuck this shit i am out
<no-defun-allowed> great job
<razzy> uh
beach has joined #lisp
<razzy> it is not in original manifest, true. i want to ask advice
<beach> razzy: I am not thinking of Linux much at all, other than as my current tool for most things.
<razzy> flattened filesystem as emacs module would help me.
<razzy> soo, i am surprised nobody done that already
zfree has joined #lisp
<shka_> razzy: maybe people at #emacs would have better idea
<razzy> true, i also wanted to say hi to beach
tsandstr has quit [Ping timeout: 246 seconds]
<beach> Thanks! I am afraid I am not going to be able to help you.
<no-defun-allowed> maybe i should port my singing synth to CL
<beach> no-defun-allowed: Please do!
<no-defun-allowed> you give it a list of syllables which have length, pitch and phonemes and it puts together samples and adjusts their pitches
<razzy> no-defun-allowed: in what is it ported now?
<no-defun-allowed> i want to add automatic syllable finding (which i think i have an algorithm for) and a better stretching mode
<no-defun-allowed> it's in python right now but all the heavy stuff is done by sox and aubiopitch
<no-defun-allowed> i don't mind that it wraps those programs but it could be a bit faster
_whitelogger has joined #lisp
orivej has joined #lisp
<no-defun-allowed> well, i'm not too into frequency analysis and the like (:
asymptotically has quit [Quit: Leaving]
<razzy> my quote is about that if you build it, you can say you understand it
<jackdaniel> such claim is false
<razzy> and it should work of course
<jackdaniel> being able to build something does not imply you understand it
<razzy> if you build it, and you cannot say the difference from original, you can say you understand it
<jackdaniel> you have ikea furniture with detailed instruction what goes where, you are able to build the furniture
<razzy> from scratch
<jackdaniel> if it is complicated enough it is not given, that having same parts but no instruciton you'll be able to build it again
<jackdaniel> from atoms? from hardware? from assembly? from programming language? from framework? define scratch
<razzy> scratch is thing that previous builder build it from
<no-defun-allowed> damn, fft in CL is really short
<no-defun-allowed> also, any language with complex numbers halves the program size
<razzy> no-defun-allowed: i like frequency analysis :]
<jackdaniel> so "understanding" "something" is a mental state dependent on: object origin and knowledge of the previous person who built it? doesn't make much sense to me
<no-defun-allowed> however this rosetta code entry looks like shit and uses lists for the analysed sample which doesn't help
<razzy> jackdaniel: it is ok with me now.
pfdietz has quit [Ping timeout: 250 seconds]
igemnace has quit [Quit: WeeChat 2.2]
alandipert has quit [Ping timeout: 272 seconds]
pfdietz has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 252 seconds]
<no-defun-allowed> I'd probably use some kind of "step" to avoid more consing with a vector to make fft fast.
m00natic has joined #lisp
hhdave has joined #lisp
nowhereman_ has quit [Ping timeout: 252 seconds]
Bronsa has quit [Ping timeout: 244 seconds]
asymptotically has joined #lisp
ggole has joined #lisp
<razzy> or buy more hardware :]
<no-defun-allowed> razzy: I'm not making another vector like that.
<no-defun-allowed> *another large quantity of vectors which should have around the same total size as the original.
pierpal has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
shifty has joined #lisp
rumbler31 has joined #lisp
SenasOzys has quit [Ping timeout: 268 seconds]
Bronsa has joined #lisp
rumbler31 has quit [Remote host closed the connection]
razzy has quit [Ping timeout: 245 seconds]
asymptotically has quit [Quit: Leaving]
razzy has joined #lisp
<razzy> no-defun-allowed: there should be a way to make parael fft :]
Josh_2 has joined #lisp
Essadon has joined #lisp
siraben has joined #lisp
<shka_> parallel fft is trivial
frodef has quit [Ping timeout: 252 seconds]
<shka_> but don't bother
<razzy> than you have two problems in future
astronavt has joined #lisp
<razzy> fft and paraelism
pierpal has quit [Ping timeout: 244 seconds]
elfmacs has quit [Ping timeout: 260 seconds]
JohnMS has joined #lisp
emerson has quit [Quit: WeeChat 2.2]
JohnMS_WORK has quit [Ping timeout: 252 seconds]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
stardiviner has joined #lisp
drdo has quit [Quit: ...]
drdo has joined #lisp
frodef has joined #lisp
kajo has joined #lisp
emerson has joined #lisp
<adlai> no-defun-allowed: if you're talking about the code in https://rosettacode.org/wiki/Fast_Fourier_transform#Common_Lisp ... that is literally "Translation of: Python". they use nth in a loop for O(n^2) performance!
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
asymptotically has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
tsandstr has joined #lisp
stardiviner has quit [Ping timeout: 268 seconds]
Bronsa has quit [Remote host closed the connection]
<beach> This one might be a bit better: https://github.com/ahefner/bordeaux-fft
jcowan has joined #lisp
asymptotically has quit [Quit: Leaving]
Bike has joined #lisp
kajo has joined #lisp
ogamita has joined #lisp
<ogamita> Hi!
astronavt_ has joined #lisp
nowhereman_ has joined #lisp
astronavt has quit [Read error: Connection reset by peer]
jcowan has quit [Quit: This computer has gone to sleep]
<ogamita> So I'm trying to expand cl-lex so that it doesn't scans only prefixes of tokens (yeah, a major bug, but the point is that I'm using a library that is using cl-lex, I have my own lexers that work correctly thank you). So it uses cl-ppcre, and I extend it with a second regexp that should not be matched after the token regexp to validate it.
<ogamita> For this, I expand the parse-tree regexp as: (:alternation (:register "OBJECT" (:negative-lookahead (:char-class #\- :word-char-class))) …).
<ogamita> Basically: ("OBJECT" "[-\\w]") should match "OBJECT" in "OBJECT FOO" but not in "OBJECT-FOO BAR".
<ogamita> However it doesn't work. I tried also :positive-lookahead with same results.
<ogamita> How can cl-ppcre be used to do that?
tsandstr has quit [Read error: Connection reset by peer]
<adlai> beach: that's an actual library! but the rosetta code example triggered me
<adlai> the only thing worse than "something is wrong on the internet" is... "unidiomatic python is masquerading as common lisp on the internet"
<ogamita> (cl-ppcre:scan (cl-ppcre:create-scanner '(:alternation (:register "OBJECT" (:positive-lookahead (:char-class #\- :word-char-class))) (:register (:greedy-repetition 1 nil (:char-class :word-char-class #\-))))) " OBJECT-CLASS foo bar") #| --> 2 ; 8 ; #(2 nil) ; #(8 nil) |#
<ogamita> I'd want 2 ; 14.
<Shinmera> you, too, can edit rosetta code and can fix this supposed war crime
<ogamita> (cl-ppcre:scan (cl-ppcre:create-scanner '(:alternation (:register "OBJECT" (:negative-lookahead (:char-class #\- :word-char-class))) (:register (:greedy-repetition 1 nil (:char-class :word-char-class #\-))))) " OBJECT-CLASS foo bar") #| --> 2 ; 8 ; #(2 nil) ; #(8 nil) |#
<ogamita> adlai: that said, there's no idiomatic CL.
<adlai> sure... you arrived after the link to the offending code. i am almost loathe to link you to it, out of consideration for your retinae.
<ogamita> Note that I'm just asking for an obvious thing here: (:POSITIVE-LOOKAHEAD|:NEGATIVE-LOOKAHEAD|:POSITIVE-LOOKBEHIND|:NEGATIVE-LOOKBEHIND <parse-tree>) should be pretty obvious... (from cl-ppcre documentation).
<adlai> i'll link you to my replacement in two shakes of lisp's tree
igemnace has joined #lisp
<adlai> and if you are a true glutton for unidiomatic garbage, you can look in the edit history to find the offending sample
<jdz> ogamita: cl-ppcre has some restrictions on lookahead/lookbehind. I seem to remember at least something about being constant size.
<jdz> Not sure this affects you, though.
<ogamita> jdz: my regexp [-\w] should match a single character.
<ogamita> But from the doc of the var *look-ahead-for-suffix* I would infer that the meaning of looking ahead or behind for ppcre is not what was obvious to me…
<ogamita> Well, nope. Perl PCRE documents it as I understood it. cl-ppcre doesn't seem to work.
elfmacs has joined #lisp
pierpal has joined #lisp
orivej has joined #lisp
warweasle has joined #lisp
moei has quit [Read error: Connection reset by peer]
mhd2018 has joined #lisp
moei has joined #lisp
jcowan has joined #lisp
<jcowan> Are property lists used much nowadays, and if so, for what?
<Bike> &key
<ogamita> Well, they're at least as much used as old lisp code is still used.
<ogamita> jcowan: they're more user-friendly than a-lists.
pierpal has quit [Ping timeout: 252 seconds]
<ogamita> So you may use them in public API functions.
<jcowan> Sorry, I mean plists on symbols, not disembodied plists as data structures
<ogamita> As for symbol-plist, and getf they may be used as much as symbols are used.
zigpaw has quit [Remote host closed the connection]
zigpaw has joined #lisp
<Bike> symbol plists are prettymuch unused outsideof old code.
<jcowan> Is that primarily because they are global mutable state, or for some other reason?
<pfdietz> I have occasionally used the plists of symbols, but in many cases it's just better to use a structure or standard object instead of a symbol and store the data there.
<Bike> being global is a lot of it, yeah
<ogamita> jcowan: (let ((c 0) (p 0) (ss '())) (dolist (s (dolist (p (list-all-packages) (remove-duplicates ss)) (do-symbols (s p) (push s ss)))) (incf c) (when (symbol-plist s) (incf p))) (values c p (float (/ p c)))) #| --> 69919 ; 800 ; 0.011441811 |#
<ogamita> jcowan: it's purely a fashion.
<Bike> but even when i do want a new global mapping from symbols to values i like to just use a hash table or something
<jcowan> It would be interesting to see what the keys in those 800 plists are
<ogamita> 1- symbols cannot really be considered a global resource, since we have packages. 2- using symbol property lists even on global symbols (eg. keywords or library packages) doesn't generally lead to collision since you can use as keys symbols in your own package!
<Bike> can iterate over it and stuff
shifty has quit [Ping timeout: 250 seconds]
<ogamita> 3- plist are faster than hash-table and use way fewer memory1
<Bike> packages are global. don't be so sophistic
<ogamita> (as long as they're short).
<ogamita> package names are another global resource, but not package themselves!
<jcowan> Yes, symbol-plists look optimized for the case of fairly few properties for each symbol
<ogamita> Hence com.informatimago.i.own.this
<jcowan> Do any CLs have nonstandard ways of creating unregistered packages?
<ogamita> jcowan: I would say that the main change in programming style is the use of functional abstraction all the time.
russellw has quit []
<Bike> i am unaware of any implementation with an exported interface for unnamed packages
<ogamita> So the use of symbol-plist is not apparent in public interfaces, and you can implement them as you wish.
<ogamita> Bike: this is not the question. The point is that you can do (setf (getf 'cl:sin 'com.informatimago.i.own.this.there.is.no.collision.risk.ever) 'dont)
<Bike> it's what jcowan asked
<shka_> heh
<ogamita> I mean: (setf (getf 'cl:sin 'com.informatimago.i.own.this.there.is.no.collision.risk.ever:will-you) 'dont)
<jcowan> Oh,that's quite different
<ogamita> Sorry. I got a phone call in the middle of it…
<shka_> saying that packages are global is currently good enough approximation of the current status imho ;-)
astronavt_ has quit [Ping timeout: 244 seconds]
<jcowan> Well, they are global in the same sense that DNS names are global: literally true, but that doesn't constrain anyone from creating unique ones
<ogamita> Well, you could use a custom package implementation such as com.informatimago.common-lisp.lisp-reader.package and store your symbols in those structures instead of cl packages; this would give you "anonymous" packages :-)
<jcowan> though only by convention
<Bike> being able to come up with a new name doesn't mean the names aren't global :/
<jcowan> or no, a little more than convention in the case of DNS
* jcowan nods
<jcowan> I can't add a name to mit.edu without the cooperation of MIT admins
<ogamita> Also it may be clearer and easier to user clos objects with slots rather than symbols with plists.
<jcowan> still, Java manages okay with a convention
<ogamita> jcowan: that is, we have a number of modern techniques that seem to be often better than plists.
<jcowan> Sure
<jcowan> I have been thinking about writing a Scheme library that implements packages pretty much as in CL, but as purely runtime constructs (which is what Scheme symbols are).
<jcowan> Now I'm wondering if I'm not just doing retrocomputing
<ogamita> The uniqueness can be enforced legally on the basis of DNS. Can depend on the jurisdiction, but some accept it.
<Bike> what does "purely runtime constructs" mean
<jcowan> (which is something I like)
<ogamita> jcowan: translate com.informatimago.common-lisp.lisp-reader.package to scheme.
<ogamita> Bike: scheme doesn't have a compilation environment or a readtable that would allow you to use such packages at compilation time.
<jcowan> In Scheme, all variables are lexical, so there is no way (short of eval) to obtain the value of a variable from the symbol that names it.
<jcowan> There are imports and exports and all, but they are purely compile-time constructs.
<Bike> i thought that was more because scheme has a separate module system, unlike CL
<jcowan> Yes, exactly
luis has joined #lisp
<jcowan> But it has no runtime consequences, so symbols in Scheme exist purely as unique objects with one property, the name.
<Bike> do the modules have anything to do with symbols
<jcowan> (symbol->string 'foo) => "foo" and (eq? 'foo 'foo) => #t, and that's it
<Bike> i thought they were more like environments
<Bike> i.e. a binding of names to values
<jcowan> Just so
nowhereman_ has quit [Ping timeout: 264 seconds]
<jcowan> There are also runtime environments for the use of eval, but they are not really first-class yet
<ogamita> in scheme, symbols are just interned strings.
<jcowan> (ogamita: it's more than just legalities, you cannot set up foo.mit.edu because the mit.edu DNS servers won't know about it.)
<jcowan> ogamita: Exactly
<ogamita> jcowan: I mean that if somebody uses your domain name outside the DNS, you have a good legal case against them.
<pfdietz> CL has smashed together a number of different behaviors in its symbols. A lot of that is just tradition.
* jcowan nods
<ogamita> And actually, vice-versa. If you try to register a domain name from the name of an existing company or person that you're not entitled to legally, you may have problems keeping this domain name.
<ogamita> (not enforced by ICAN, but by the judges).
<jcowan> If I do make these packages for Scheme, the symbols won't have value/function cells, of course
<Bike> packages aren't strictly related to that either
<ogamita> But you can still implement symbol-value and symbol-function and symbol-plist.
<ogamita> Just use hash-tables.
<Bike> yeah
<jcowan> Oh yes
<ogamita> jcowan: this is the classic greenspunning. When you're not using Lisp, you're implementing lisp.
<jcowan> However, there is no point in a value cell because changing it can't affect the behavior of existing code (that doesn't call symbol-value, obvs)
<ogamita> There's (dynamic var) and dynamic-let in scheme.
<jcowan> Not in the standard
<jcowan> R7RS uses parameters, which are first-class dynamic variables
<ogamita> jcowan: perhaps it would be more productive to implement an application useful to users in Common Lisp, rather than implementing another half-assed lisp in scheme…?
<jcowan> (though admittedly most people don't use them in first-class ways)
<beach> I guess I should figure out what to use symbol plists for in SICL, since I have first-class global environments and the plist is not contained in the symbol.
steiner has joined #lisp
<jcowan> Yes, well, I am the chair of the Scheme revision committee: writing CL packages is not in my remit.
<Bike> beach: nothing sounds good to me
* jcowan chuckles
<beach> Bike: I might come to that conclusion, yes. :)
<Bike> in a fresh sbcl there's a couple hundred symbols with plists, news to me
<Bike> swank/backend apparently uses them
<pfdietz> Huh.
<Bike> as do sb-fasl and sb-x86-64-asm
<Bike> ah, the swank defimplementation thing is through symbol plists
<ogamita> jcowan: I would bet symbol plists are more used in unpublished (prototypal) lisp code than in published libraries :-)
<jcowan> Sounds likely.
<ogamita> jcowan: what's nice with lisp is that you have a lot of data structures and abstractiosn that you can quickly use at the repl to have fun (exploration programming), but that you would rewrite otherwise, more cleanly, for release.
<dlowe> and then sprinkle with declarations for performance
<adlai> is there a "hate on my code" version of the #RoastMe meme for CL? https://rosettacode.org/wiki/Fast_Fourier_transform#Common_Lisp
<jcowan> My work is basically to add things carefully and systematically to Scheme with regard to utility
<Bike> i don't think scheme needs packages. modules are probably a nicer way to go about things, though anything be compile time only is eh
cage_ has joined #lisp
r1b has joined #lisp
<jcowan> e.g. sets, immutable (not persistent) lists, deques, generators, boxes, ephemerons, etc.
<jcowan> to mention some that are already in
<dlowe> adlai: mapcan #'mapcar seems like over-lisping
<adlai> L:
<jcowan> Bike: Scheme macros are already compile-time only (where I am using "compile-time" in the CL sense, not necessarily implying a compiler)
<dlowe> as is `(,ffta ,ffta) instead of (list ffta ffta)
* jcowan chuckles
<jcowan> always modulo eval
<dlowe> adlai: I like the destructuring loop, though
<adlai> dlowe: yes yes... my annealing settled on (make-list 2 :initial-element (fft as)) (make-list 2 :initial-element (loop ...)) and that got rid of the let*
<adlai> but i decided that (make-list 2 :initial-element ..) is a cardinal sin, and must not be ever used for any reason whatsoever
<dlowe> (append (mapcar '+ a aux) (mapcar '- a aux)) seems sufficiently short and understandable not to be replaced
<shka_> adlai: it would be better to simply write recursive implementation, imho
vibs29 has quit [Ping timeout: 260 seconds]
<adlai> shka_: it is recursive!
<jcowan> Bike: So in practice no one uses packages as a simple data structure either.
<dlowe> it is recursive
<shka_> uh, right
* adlai leaves the golf bit... people looking for CL code deserve to have their expectations stretched a little
vibs29 has joined #lisp
<adlai> another little funecdote: before switching from EXP to CIS, there was a (* #C(0 -2) pi)
<jcowan> As part of this effort, I read the package chapter of the Chine Nual, and Zetalisp's package system was rather different, with single rather than multiple inheritance,
kuwze has joined #lisp
<adlai> my intermediate version used #C(0 #.pi)
<jcowan> the ability to say "foo:bar:baz" (symbol baz in package bar subsidary to top-level package foo)
<jcowan> and even 'foo:(bar baz zam) => (foo:bar foo:baz foo:zam)
<dlowe> adlai: yeah, I noticed that. Good find.
<Bike> eh? really? we're all extending things with package local nicknames and shit and it was in the chinual? golly.
<Bike> sbcl does have foo::(whatever ...) syntax as an extention
<jcowan> Yeah, Zetalisp is a direct predecessor of Common Lisp, but there are differences
<jcowan> some unavoidable (the Chine Nual describes an implementation, the CLHS prescribes a standard)
<jcowan> but it's interesting that the package name space was hierarchical
<adlai> dlowe: ty! ... but it's good to know that the complex toolkit is comprehensive enough to make tricks like that unnecessary
<jcowan> of course hierarchy wouldn't mean that use-package couldn't exist (although in fact it didn't until Zetalisp imported a lot of CL stuff in its last stage)
<jcowan> anyway, thanks for the input, all
jcowan has quit [Quit: This computer has gone to sleep]
<shka_> hierarchical packages should be have been incorporated into CL
<shka_> {/
* adlai wonders why https://rosettacode.org/wiki/Quaternion_type#Common_Lisp was done with a class rather than a 2-element array of complexes
<Shinmera> because type aliasing is bad
<Shinmera> and also I don't see why you'd use complexes
<adlai> quaternion operations can be expressed concisely as operations on an ordered pair of complex numbers (aka "cayley-dickson construction")
* adlai liked John Baez's explanation of this: http://math.ucr.edu/home/baez//week59.html
<Shinmera> Neat
<dlowe> That seems unambiguously better if you can use complexes because then you benefit from the compiler-level complex number optimizations
* adlai reminds himself to revisit his list of complaints about the CL type system once he has completed another year of school
<Shinmera> Are those optimised a lot in practise, though?
<Shinmera> And even then still, I'd not use an array and instead a struct.
<shka_> biginteger sbcl question
<adlai> the advantage of a struct (or class) is obvious in the later part of that example, with the method dispatch
<Shinmera> It's also better simply because you get a distinct type
<shka_> if i have biginteger and i attempt to setf ldb
<shka_> my assumption is that no implementation in such case would actually require extra memory allocated
<Bike> numbers are immutable.
<Bike> it might copy
<shka_> uh, ok
<shka_> is it possible to avoid making a copy?
<shka_> other then use bit-array
<dlowe> adlai: complaining about CL is a very popular exercise in futility
<Shinmera> (setf (ldb b o) n) is (almost) the same as (setf o (dpb n b o))
frgo has quit [Remote host closed the connection]
<shka_> Shinmera: yeah, i understand
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
<Bike> if the compiler doesn't optimize it i don't think there's much to be done
<shka_> i am just trying to figure out if there is any way to avoid actually making copy of potentially huge byte
frgo has joined #lisp
<adlai> dlowe: i'd say that it keeps people out of worse trouble, but in here, complaining about CL is the worst kind of trouble :)
<Shinmera> use libgmp :v
<Bike> i mean besides bit arrays
<Bike> which have explicitly in-place operations
<shka_> Bike: do you have any idea when compiler is actually able to optimize this?
<shka_> Shinmera: i don't wanna, though :(
<Shinmera> shka_: It was a joke anyway
<Bike> well it's able to when the old value isn't used afterward
<Bike> i don't know if any compiler actually checks
orivej has quit [Ping timeout: 268 seconds]
<shka_> ok, that does not help
<shka_> well, i will try bit-arrays
<shka_> if ONLY bit-arrays would work with ldb
<shka_> it would make life so much easier
FreeBirdLjj has joined #lisp
<shka_> actually, i will write my own ldb for bit-arrays
<shka_> this seems to be the right thing to do
frgo has quit [Ping timeout: 252 seconds]
vtomole has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
elfmacs has quit [Ping timeout: 252 seconds]
kuwze has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #lisp
jack_rabbit has quit [Ping timeout: 240 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
cl-arthur has joined #lisp
ogamita has quit [Ping timeout: 244 seconds]
dkrm has quit [Quit: WeeChat 2.2]
kajo has joined #lisp
asymptotically has joined #lisp
jcowan has joined #lisp
igemnace has quit [Ping timeout: 252 seconds]
<shrdlu68> What if the you ldb a setf'able place, like a vector.
<beach> shrdlu68: (setf ldb) takes a place.
<beach> Is that what you mean?
<shrdlu68> I mean would it avoid making a copy?
<beach> shrdlu68: As many people pointed out, numbers are immutable.
<beach> Luckily.
<beach> I guess you don't agree.
quazimodo has quit [Ping timeout: 268 seconds]
quazimodo has joined #lisp
<Bike> it would be nice if you could convert bit arrays to integers and back without consing, though
russellw has joined #lisp
lnostdal has joined #lisp
<beach> How would that work?
<Bike> something like (setf (bit-ldb byte vector) n) where it takes bits from n, i guess
rippa has joined #lisp
zfree has quit [Remote host closed the connection]
<beach> If there is no consing, you would effectively have mutable numbers.
<beach> In fact, you would have change-class on numbers.
<Bike> no, no, not that.
<Bike> immutable numbers would almost certainly be bad yeah.
<beach> mutable
<Bike> er. yes.
<Shinmera> he means mutating the bit-vector through the ldb interface
<beach> Ah.
<beach> That doesn't sound the same as "convert bit arrays to integers and back without consing".
<Bike> well, it's part of an integer into part of a vector
<beach> OK.
<Bike> i could have described it better though
eagleflo has joined #lisp
shrdlu68 has quit [Ping timeout: 252 seconds]
Josh_2 has quit [Read error: Connection reset by peer]
flamebeard has quit []
asymptotically has quit [Quit: Leaving]
varjag has joined #lisp
vtomole has quit [Quit: Page closed]
JohnMS has quit [Read error: Connection reset by peer]
Copenhagen_Bram has quit [Remote host closed the connection]
sjl has joined #lisp
Copenhagen_Bram has joined #lisp
LiamH has joined #lisp
igemnace has joined #lisp
kdas_ has joined #lisp
robotoad has quit [Ping timeout: 245 seconds]
kushal has quit [Ping timeout: 256 seconds]
robotoad has joined #lisp
zigpaw has quit [Remote host closed the connection]
steiner has left #lisp ["ERC (IRC client for Emacs 26.1)"]
jcowan has quit [Quit: This computer has gone to sleep]
pjb has joined #lisp
nirved has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
kajo has joined #lisp
siraben has quit [Ping timeout: 264 seconds]
ravndal has joined #lisp
frodef has quit [Ping timeout: 276 seconds]
hhdave has quit [Ping timeout: 272 seconds]
m3tti has joined #lisp
Sauvin has quit [Ping timeout: 246 seconds]
zigpaw has joined #lisp
FreeBirdLjj has quit [Read error: Connection timed out]
sauvin_ has joined #lisp
FreeBirdLjj has joined #lisp
cl-arthur has quit [Quit: Lost terminal]
m3tti has quit [Ping timeout: 252 seconds]
ggole has quit [Quit: ggole]
zfree has joined #lisp
siraben has joined #lisp
asymptotically has joined #lisp
roshanavand has joined #lisp
m00natic has quit [Read error: Connection reset by peer]
frodef has joined #lisp
rk[ghost] has joined #lisp
<rk[ghost]> hey all. i have a hunchentoot server that i run in sbcl (or ccl/armcl)
<rk[ghost]> typically, i have a wrapper script that creates a named gnuscreen, calls the interpreter, loads the program and then detaches
<rk[ghost]> the box this server is runnign on consistently now has poweroutages
sjl has quit [Ping timeout: 272 seconds]
<rk[ghost]> as such, i thought to openrc-i-fy my script
<rk[ghost]> which i presume i need to daemonize and log now? (any good libs for this)
<rk[ghost]> however, i want to be able to attach to the interpreter to make tweaks to the running program
<rk[ghost]> how do ya'll handle lisp-interpreter based server programs and such?
<Shinmera> why do that when you can load swank and connect via your local emacs
<rk[ghost]> any thoughts appreciated. even bully ones.
<rk[ghost]> luckily, i am too far for you to throw dung
<rk[ghost]> i don't emacs
<rk[ghost]> maybe it is time i ought to give in.
<rk[ghost]> anyhoot, unfamiliar with swank as well.
<rk[ghost]> i have a handful of wrapper scripts around tmux and screen
<rk[ghost]> so it is usual for me for any program i have, to create a named screen for it
<rk[ghost]> irssi, mutt, w3m, armcl, ect..
<rk[ghost]> (some ancient thoughts are coming)
<rk[ghost]> i think i made my own hacky swank like thing
<rk[ghost]> i once wrote a script for vim (/me hides) that copied a line
<rk[ghost]> and sent the keystrokes to a named screen
emaczen has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<pjb> can't you just call this script from /etc/rc.local ?
<pjb> This is what I do…
<LdBeth> Good morning
* |3b| just adds batteries if power is unreliable :p
m3tti has joined #lisp
<pjb> rk[ghost]: using a private irc server and irc clients to connect to your program may be a nice way to do it.
<rk[ghost]> |3b|: stop it with your nonsense logical solutions!
<pjb> rk[ghost]: however, if you prefer a directly connected REPL, you can either use slime/swank, or add a telnet server (or ssh server) in your CL programs.
<rk[ghost]> hmm^
<pjb> rk[ghost]: this is why I implemented the telnet protocol.
<rk[ghost]> i do prefer a directly connected REPL
<rk[ghost]> however, maybe that is just a habit thing
<LdBeth> Some VPS provider just forbids irc
<rk[ghost]> and i would like the other solutions more, after familiarizing myself
<rk[ghost]> pjb: ah, hmm.
<rk[ghost]> anyone else every manually IRC'd with telnet??
<rk[ghost]> ever*
<pjb> rk[ghost]: you can also provide a REPL directly on a socket, but telnet or irc provide better terminal interfaces.
<LdBeth> rk[ghost] (IRC): I did
<rk[ghost]> pjb: well, for one project, i just made an IRC bot that directly connects to a REPL
<pjb> rk[ghost]: you could do that, but you'd have to know the IRC protocol :-)
<rk[ghost]> so i can lisp over IRC
<rk[ghost]> pjb: oh i know. i have done it before
<pjb> irc clients are nice; there are several of them running in emacs.
<rk[ghost]> curious if anyone else was that sadistic.
<LdBeth> IRC protocol is easy
<rk[ghost]> pjb: my private irc server / client is running onthe same box as the hunchentoot server ;P
<pjb> This is nice.
<rk[ghost]> OK thanks for some ideas. my mind is only half in computers/lisp today
<rk[ghost]> it is soooo nice outside.
<rk[ghost]> so, i will think on these little thoguhts for now and be back after i poke around i nthe evening.
<rk[ghost]> THANK YOU ALL
sjl has joined #lisp
<rk[ghost]> i still don't understand why people don't lisp. such a helpful community...
<rk[ghost]> at this point, lisp has a robust set of libraries, an active and helpful community, and runs on just about any device
<rk[ghost]> oh
<rk[ghost]> and it has this funny advantage that 7 year old programs are still working just fine and dandy
<rk[ghost]> why come people don't lisp, eh!?
<rk[ghost]> pjb: thank you! i once wrote my own telnet like program in Erlang
<rk[ghost]> except mine had its own bs protocol i made up
<rk[ghost]> essentially a simple, send commands over a port
scymtym has quit [Ping timeout: 240 seconds]
<pjb> rk[ghost]: it could work better on mobile OSes.
<pjb> (iOS and Android).
<rk[ghost]> my main rig is a Novena
<rk[ghost]> it is a laptop, but it is armv7.. so it (for most purposes) acts like a mobile-OSy device
<rk[ghost]> web browsers tend to think i am a phone XD
<rk[ghost]> the difference with my telnet-like program i made for Erlang was, i used public/private keys
<rk[ghost]> and dropped messages that weren't signed by known users
<pjb> Yes. Currently I haven't implemented security options yet.
<LdBeth> Probably could solve by a TLS program
<rk[ghost]> pjb: security is something always at the bottom of my interests
<rk[ghost]> however, for that project i decided to give in to learn more about public/private keys and such and such
<pjb> For personal use. But as soon as you have customers, this is a subject, nowadays.
<rk[ghost]> i have a feeling, i could probably wrap your telnet script with my erlang script in some way
<rk[ghost]> pjb: aye. i design things for a world that doesn't exist
<rk[ghost]> the peaceful happy world of sharing and caring world hackers.
<rk[ghost]> @security options, is there already a robust library (CL) for public/private keys and md5s and such?
m3tti has quit [Remote host closed the connection]
m3tti has joined #lisp
nsrahmad has joined #lisp
<LdBeth> rk[ghost]: it’s a encryption library
<rk[ghost]> LdBeth: yaay, thanks
makomo has joined #lisp
<rk[ghost]> pjb: err, what exactly does rc.local suppose to do?
<rk[ghost]> (i like and run gentoo, but never spent much time to understand openrc beyond running the commands to add an init script to the boot order)
<rk[ghost]> if the question is inappropriate for this channel, lemme know
jack_rabbit has joined #lisp
<rk[ghost]> just trying to get armcl programs wrapped up as servers that are spawn / managed by openrc with terminal connectivity available and good logging
<rk[ghost]> and the system of my choice is Gentoo running on an armv7 device (for now)
<LdBeth> Basic people invented rc.local to avoid mess up the main rc file
<LdBeth> So it’s the same as append something to rc
<LdBeth> But what people supposed to do is write OpenRC scripts in init.d, so one can rc-service stop/start/restart them
m3tti has quit [Ping timeout: 252 seconds]
<pjb> rk[ghost]: usually the boot scripts will source rc.local at the end of the boot process, to let you start local daemons.
<pjb> rk[ghost]: of course, nowadays you have stuff like systemd and launchd, but nothing beats the simplicity and resilience of the simple rc.local script.
<pjb> I guess openrc is as dumb as systemd and launchd…
<LdBeth> Well, OpenRC is an add on to standard Unix rc script utility.
<pjb> So perhaps better than systemd.
<pjb> Unix system administration was so simple…
ebzzry has joined #lisp
<rk[ghost]> pjb: aye. systemd gives me troubles. my laptop has it and :|
<rk[ghost]> but for the raspberry-pi server i have.. i was smart and installed Gentoo / openrc
<rk[ghost]> wahooo!
<rk[ghost]> my laptop is running Debian
<rk[ghost]> once i save up enough money for another harddrive
nsrahmad has left #lisp ["Leaving"]
<rk[ghost]> i plan to do a MUCH overdue reformat of my system
<rk[ghost]> and apparently there is Devuan? which is systemdless Debian
<rk[ghost]> anyhoot, sorry to digress
<rk[ghost]> pjb: thanks for clarifying.
<rk[ghost]> my system seems to use multiple directories for rcs
<rk[ghost]> like how cron handles things.
<jasom> pjb: OpenRC is classic RC with a few new features; it also consists of a wrapper for the shell scripts (openrc-run) to simplify things a bit (e.g. no need to source a bunch of libraries in your init scripts)
<rk[ghost]> LdBeth: ah, that is the path i was attempting the other day. creating my script in init.d
<rk[ghost]> anyhoot, i realize i need to rework how my program works as it wasn't designed to be daemonized
<rk[ghost]> i mean, i sually run the screen wrapper script to boot the program, which loads everything up
<rk[ghost]> and then waits for me to type
frodef has quit [Ping timeout: 272 seconds]
<rk[ghost]> (server:boot)
<rk[ghost]> thso my step one of "daemonizing" was just to add that last line to my .lisp :P
<rk[ghost]> OK, thanks all. i will be back soon with more ?s. and maybe even an answer.
<rk[ghost]> pjb: at "unix system administration was so simple".. makes me think of Solaris
<rk[ghost]> gee did they make good sysadmin tools.
FreeBirdLjj has quit [Remote host closed the connection]
<jasom> rk[ghost]: there is a helper to daemonize programs and generate a pid file &c.
sauvin_ has quit [Read error: Connection reset by peer]
<jasom> I think it's called "daemonize"
<rk[ghost]> hmm, now i am curious. waht would be advantage of adding telnet server (or ssh prgram to CL program) vs. sshing to box and connecting to screen?
<jasom> rk[ghost]: I think screen/tmux/dtach are all better than adding a server since you get scrollback and other features already.
<rk[ghost]> aye, i would concur with this at first thoughts as well
<rk[ghost]> not sure if was missing something:P
<rk[ghost]> i wrote a couple cool wrapper scripts around tmux and screen to make something fun
<jasom> though I also strongly suggest having a logfile; there's a couple of decent logging libraries for lisp that will do things like log rotation for you.
<rk[ghost]> jasom: great point.
<rk[ghost]> i also concur that i should have gotten on that train long ago
<rk[ghost]> i once came across logstach? too. which was interesting as iirc it does like a ETL for log files
<rk[ghost]> to create master log files for cross comparison and reformats them all so that they match
<rk[ghost]> jasom: @daemonize, thanks. investigating.
<jasom> log4cl is easy to get setup with, but after using it I find it to be a bit janky on the implementation side; IIRC Shinmera has a logging library that I've been meaning to look into, but I haven't written a daemon since making that decision
scymtym has joined #lisp
<jasom> rk[ghost]: if you're going to have a REPL via screen then not really a need for daemonize
<rk[ghost]> is there also an error handling library people tend to use.. or is it just all custom jazz?
<jasom> rk[ghost]: though I do recommend writing out a PID file if you are using OpenRC; it makes it a lot happier.
<rk[ghost]> jasom: right right.
<jasom> rk[ghost]: define error handling
<rk[ghost]> i realized that daemonizing probably isn't want i want as it contradicts screenifying
<rk[ghost]> however, i need to set up something such taht there are init script that properly start my stuffs
<jasom> if you want to do things like log backtraces on unexpected conditions, dissect is good
<jasom> rk[ghost]: screen has a command line option to start in the background, that will be helpful
<rk[ghost]> aye. i also have wrapper scripts to send keystrokes to the background screens
<rk[ghost]> dissect, roger, thanks.
<jasom> rk[ghost]: I've done the send-keys trick before, but I recommend instead having a shell script that starts everything, and telling screen to run that from the command-line
<rk[ghost]> @writing out a pidfile.. err i understand this on the surface. but when i think about going about that, my mind becomes murky
<jasom> rk[ghost]: if you're using sbcl: (with-open-file (pidfile "/path/to/pidfile" :direction :output :if-exists :supersede)(format pidfile "~A~%"(sb-posix:getpid)))
space_otter has joined #lisp
<jasom> if not sbcl, figure out how to get the pid (a CFFI wrapper for getpid is relatively easy to write on the chance your implementation doesn't provide it).
<rk[ghost]> aye, for my irc bot i have something like :
<rk[ghost]> jasom: unfornately the folks of sbcl don't give a hoot about my 32bit arm system
<rk[ghost]> ;P
<rk[ghost]> so, i use CCL/armcl (they gots multithread support!!)
<jasom> rk[ghost]: ccl::getpid
<rk[ghost]> jasom: oi. thanks VERY much.
<rk[ghost]> :D
<rk[ghost]> doubly thanks
<rk[ghost]> gee, now i feel bad as ya'll are too helpful and i am being lazy here just asking questiosn and not programming
<jasom> some unix system calls are very hard to wrap, getpid is very easy to wrap, so most lisps have it somewhere internal, if not exported.
<rk[ghost]> anyhoot, very cool. this all gives me some things to play with. i think i may try multiple ones just to know for myself which seems to work more
<rk[ghost]> but learning to pidify/openrcify and log my programs correctly all seem worthwhile in the end
<rk[ghost]> and the telnet thing, i can see how to this could be handy for other things
<rk[ghost]> aye, the way i do things can be confusing to the system
<rk[ghost]> got lisp program running in the interpreter, which was spawned from a sh wrapped in rlwrap
<rk[ghost]> XD
Copenhagen_Bram has quit [Read error: Connection reset by peer]
<jasom> cool; ironically enough, even though I run gentoo I use daemontools for running my lisp daemons, because all you need to do for that is provide a script to run, and it will run it as a given user and log stdout/stderr to rotating timestamped logs for you. It will *not* work well with the screen trick though because it assumes a single pid for the daemon.
<jasom> I either don't provide a repl, or run a swank daemon on a unix socket for getting interactivity.
<jasom> does swank exist for armcl? You could ssh forward a port to connect remotely if it does.
shifty has joined #lisp
<rk[ghost]> hmm.
Copenhagen_Bram has joined #lisp
<rk[ghost]> i see if i am to move forward with lisping, i thnk it may finally be time to install emacs/evil + swank, eh?
didi has joined #lisp
didi has left #lisp ["O bella ciao bella ciao bella ciao, ciao, ciao."]
jcowan has joined #lisp
<jasom> rk[ghost]: I recommend it. Even if you only use swank as a REPL it's worth it (I used vim for editing lisp code and slime for REPL/debugging for years before moving to emacs/evil).
<rk[ghost]> ah, aye.
<rk[ghost]> my first use of emacs tainted it a bit for me
<rk[ghost]> i was aware that it wasn't emacs's fault, but i let it slide that way anyway
<rk[ghost]> (first use was in college. it was some old xemacs and no one taught me how to configure it)
<rk[ghost]> so it was just all default settigns
<rk[ghost]> and was an absurd beast to weild
<rk[ghost]> then someone showed me 'vi' and i instantly was hooked thinking all program should work like that
<rk[ghost]> and to this day, i have vi-like input on my terminals, in my irc client. i use pentadactyl in the browser, ect.
<rk[ghost]> imo, there is 100 keys on my keyboard. so if i do less than 100 tasks, i should never press more than a single button at a time to do anything
<rk[ghost]> OK, again, mostly useless but i apologize for disgression.
<rk[ghost]> thanks very very much jasom
<rk[ghost]> hmm, using emacs/evil+swank should nix my need for rlwrap
<jasom> rk[ghost]: indeed
aindilis has quit [Remote host closed the connection]
asymptotically has quit [Quit: Leaving]
<jasom> rk[ghost]: I have a few customizations to evil for ding lispy things; I'll see if I can dig them up and paste them. A big one is getting M-. (slime's jump to definition shortcut) to work in normal mode since I don't use the corresponding vim key combination ever.
aindilis has joined #lisp
myrmidon has joined #lisp
<russellw> I'm trying to do this: (loop for (a . more) on s with b = (car more) ...) but it's not working; b is always nil. What am I doing wrong?
orivej has joined #lisp
<|3b|> with is evaluated before for
space_otter has quit [Remote host closed the connection]
<Bike> maybe you mean for b = (car more)
m3tti has joined #lisp
<russellw> ah! thanks
<Bike> like 3b said, 'with' is more for one time outer bindings
<russellw> But not strictly? I did use 'with' in another loop for something that would be every time around the loop, and it worked
<russellw> (loop with c = (read-char) collect c until ..) ; this works
<rk[ghost]> jasom: ah very cool. i would appreciate your efforts.
<|3b|> shouldn't work, unless it triggers UNTIL on first iteration or has some other termination clause
<Bike> yeah, i basically don't believe you.
* |3b| gets an infinite loop when i tries
<|3b|> *tried
<|3b|> or maybe try. wording is hard
<russellw> ... oh wait. That section of code is the section that just handles block comments, and I haven't tested those yet. So I guess you're probably right and it actually doesn't work, I just don't know it yet
* russellw changes it to 'for'
Denommus has joined #lisp
cage_ has quit [Quit: Leaving]
knicklux has joined #lisp
ACE_Recliner_ has joined #lisp
ACE_Recliner_ has quit [Client Quit]
ACE_Recliner has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
ACE_Recliner_ has joined #lisp
m3tti has quit [Remote host closed the connection]
<jcowan> I have in fact been thinking about integers-as-bits vs. bitvectors-as-bits. There is a substantial library of integers-as-bits functions, similar to CL's but more extensive.
m3tti has joined #lisp
<jcowan> There is as yet no corresponding lib for bit operations backed by bitvectors.
<jcowan> I am trying to decide whether I should propose a bitvector function for every integer function (indeed two, one non-destructive and one destructive),
ACE_Recliner has quit [Ping timeout: 244 seconds]
ACE_Recliner_ is now known as ACE_Recliner
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jcowan> or if there is some principled way of reducing the library.
pierpal has joined #lisp
<|3b|> clhs bit-and
<|3b|> ^ and subseq cover a lot of them
<|3b|> and subseq is an accessor like LDB, so you can SETF it
<|3b|> though a bit harder since you need to match the size
<|3b|> easy/fast translation between bitvectors/ints would be nice though
<jcowan> I don't see how it can be fast without incurring mutable numbers, unless you are talking about immutable bit vectors (in which case they might as well be numbers)
<|3b|> hmm, those work on arbitrary dimensions, hadn't realized that
<|3b|> no, i just mean being able to (setf (subseq bit-vector 10 20) (bits-from-int 3)) or similar
<|3b|> instead of (setf (subseq bit-vector 10 20) #b000000011) or however many 0 that should be, and even worse if it is a variable
<jcowan> I agree that packaging int->bitvector and bitvector->int make sense, but you have to accept the memory allocation penalty
<|3b|> sure
<jcowan> Because they are purely bitwise, there is no reason why they should be limited to 1d bitvectors
<|3b|> i guess bit-* is missing destructive versions
<jasom> it should be pretty easy to write a setf expander that lets you use a bytespec on a bit-vector; then you can do (setf (bit-ldb bit-vector (byte 10 10)) (ldb (integer 10 10)))
<jasom> you can use the subseq format alternatively, but I would personally prefer the ldb format for things as that makes both sides of the assignment consistent for a common use-case.
<|3b|> yeah, that's probably better, wouldn't have to cons a bitvector
<|3b|> ldb style taking int as input i mean
<jasom> by subseq format I mean start/end vs size/position
<|3b|> and since you are writing the expander it could even recognize some special cases and copy bits directly without an intermediate bignum
<jasom> most uses of ldb won't make a bignum just because you usually don't have larger than word bitfields
<jasom> and you also don't have word ldb since that would usually be a nop
<jasom> but that is a good point; you could special case any value-form that starts with ldb
<jasom> and then just loop with logbitp
angavrilov has quit [Remote host closed the connection]
* jcowan examines SRFI 151 (integers as bits) to see which operations are strictly bitwise
<jcowan> There are some that plainly make sense even though they are not bit-for-bit, like population count
<|3b|> (count 1 bitvector) :)
<jcowan> true, although that is probably inefficient on x86, as it's hardly likely to use POPCNT
* |3b| thought sbcl optimizes it
<|3b|> yeah, looks like it does logcount on backing buffer a word at a time, which uses popcnt
m3tti has quit [Ping timeout: 272 seconds]
kdas_ is now known as kushal
<jasom> |3b|: you can't avoid creating a bignum in the case that the byte would be a bignum, becuase SETF needs to return the value assigned
m3tti has joined #lisp
<|3b|> ah, true :/
<|3b|> so maybe a separate function
m3tti has quit [Remote host closed the connection]
m3tti has joined #lisp
* |3b| isn't sure how common that case would be though
<jcowan> dammit, it looks like all 30 integers-as-bit ops make some kind of sense in bitvectors except arithmetic-shift, and that would be replaced by logical-shift
aindilis has quit [Ping timeout: 244 seconds]
eminhi has quit [Ping timeout: 252 seconds]
<jcowan> that means writing a lot of finicky error-prone code
<aeth> jasom: Actually, you *can* avoid creating a bignum
frgo has joined #lisp
<aeth> jasom: SETF needs to return the value assigned, but SBCL can ignore that value if SETF isn't in a position where its return value is used.
<aeth> (And setf can be inline)
<jasom> aeth: so if I only create the bignum at the very end of the storing form, then sbcl may be smart enough to remove it?
<Shinmera> jasom: Yes, I quite like Verbose ;)
<aeth> jasom: if an inline function (including an inline defun (setf foo)) or a macro (including defsetf?)
<Bike> i don't think sbcl is smart enough for this
<Bike> or rather they probably naven't specifically handled the case
<jasom> aeth: in this case define-setf-expander, but that will be macroexpanded
frgo has quit [Ping timeout: 246 seconds]
<jasom> I'll run a test later, but right now just working on naieve version
<aeth> jasom: (defun foo (a) (declare ((simple-array double-float (1)) a)) (setf (aref a 0) 42d0) a) ; no allocation because it doesn't need to return 42d0
<aeth> jasom: (defun foo (a) (declare ((simple-array double-float (1)) a)) (setf (aref a 0) 42d0)) ; allocation because it does need to return 42d0
<aeth> jasom: So SBCL can in the case of double-float and (unsigned-byte 64) and (signed-byte 64) certainly remove the unused allocations of the return values of SETFs under certain (inline) circumstances.
<aeth> jasom: whether or not it handles your specific case (or could be patched to do so) is unknown
<Bike> this isn't just removing an allocation though, it's turning an allocation into a mutation.
<jasom> right, setf expanders have no introspection into the right-side of the assignment
<aeth> I suspect it would work for a constant RHS
<jasom> so no way to know if its (setf X (ldb ..)) vs (setf X (anything-else ...))
orivej has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
<Bike> i don't think it would be the setf macroexpansion doing the optimization, either
<Bike> it doesn't even have enough information
<aeth> right
rumbler31 has quit [Remote host closed the connection]
Copenhagen_Bram has quit [Read error: Connection reset by peer]
edgar-rft has joined #lisp
orivej has joined #lisp
m3tti has quit [Remote host closed the connection]
m3tti has joined #lisp
Copenhagen_Bram has joined #lisp
stereosphere has joined #lisp
vlatkoB has quit [Remote host closed the connection]
nirved has quit [Quit: Leaving]
igemnace has quit [Quit: WeeChat 2.2]
Bike has quit [Ping timeout: 256 seconds]
dented42 has joined #lisp
meepdeew has joined #lisp
<jasom> naive implementation (only lightly tested): https://gist.github.com/jasom/037465e21c0908489428704a01777550
<jasom> (let (( x (make-array 32 :element-type 'bit :initial-element 1))) (setf (bit-ldb x (byte 4 0)) #xa) x) ;; => #*11111111111111111111111111111010
<|3b|> Shinmera: https://github.com/3b/cl-spidev/blob/master/low-level.lisp#L140-L214 is what i ended up with for non-consing ioctl-based read API so far
<|3b|> (or at least mostly non-consing, might still make some 32bit bignums)
<Shinmera> Ho boy
<|3b|> probably needs a bit more range checking still
swflint has quit [Ping timeout: 244 seconds]
<Shinmera> Especiall needs additions to documentation.lisp ;)
<|3b|> yeah, that too :)
m3tti has quit [Remote host closed the connection]
m3tti has joined #lisp
<|3b|> also might clean up the API a bit, ended up trying 2 different ways, so might remove the one i ended up not using (once i decide which that is, since i think i currently have a bit of both still)
<Shinmera> Adding stuff to call this with the wrapper intefrace would also be good
<Shinmera> Christ I'm making typoes like nobody's business again, aren't I
<|3b|> one was a big destination buffer, with an xfer struct per range in the buffer, then switched to a smaller set of xfer buffers that i slide across the big buffer
ACE_Recliner has quit [Ping timeout: 244 seconds]
<|3b|> but now i'm back to only using a fairly small read buffer, so might go back to fixed buffer of xferss
<|3b|> yeah, not wrapped or exported yet while i figured out what i'm doing :)
<Shinmera> Anyway, this is really cool. Wonder if I'm going to use it myself for some Pi stuff
<|3b|> but i checked in code that uses it, so made a fork for it too so both can be pushed somewhere at same time
* |3b| might also rewrite the commits to get rid of tabs, so that fork might get reset at some point
<Shinmera> I can squash merge
<Shinmera> Reminds me again to see if I can make an official build of Portacle for the Pi
swflint has joined #lisp
<Shinmera> Just really wish ARM64 Pi distros were the norm
<|3b|> https://github.com/3b/3b-lepton/blob/master/capture.lisp is the code that uses it, still fairly ugly (and made more so trying to avoid consing bignums without restricting sizes too much)
<|3b|> yeah :/
<|3b|> threaded sbcl and 64bit words would simplify things
<|3b|> could just start a thread, and not worry nearly as much about consing intermediate values
* |3b| tried moving some work around in hopes of getting it fast enough to stream to ffmpeg without threads, not quite gotten far enough to test yet though
<Shinmera> There's an OpenSuse ARM64 for the Pi
<Shinmera> but I haven't tried it yet
<|3b|> i think there are is a debian fork too, and ubuntu server if you hack boot setup a bit
<Shinmera> yea sure but those are all deemed "experimental, unofficial"
<|3b|> true :/
<Shinmera> whereas the suse one I think has an official release
<Shinmera> been meaning to try it for like half a year now
<|3b|> maybe i should try that soon
<|3b|> was hoping to get this fast enough to run on pi zero, don't think it will be able to encode at same time though, even if it can display (which is probably iffy)
* |3b| wonders if i can do async texture uploads on pi 0
<Shinmera> if you can get something to render an RGB framebuffer you should be good
<Shinmera> I'd hope
<|3b|> more that just waiting on SPI for capture doesn't leave much time for doing anything else
<|3b|> especially if display is going to be on spi too
<Shinmera> could mmap with sharing and fork to render
m3tti has quit [Ping timeout: 260 seconds]
<|3b|> possibly
<Shinmera> but now we're getting real weird
<|3b|> well, better than trying to run callbacks on another thread in unthreaded sbcl, which so far doesn't seem to be going to work :p
swflint has quit [Ping timeout: 260 seconds]
<|3b|> cffi:defcallback callbacks, that is
<Shinmera> Also, a good hook for
<Shinmera> Colleen: look up mmap
<|3b|> cool
Roy_Fokker has joined #lisp
ACE_Recliner has joined #lisp
swflint has joined #lisp
<|3b|> currently i can just capture to memory and encode later, which is probably good enough for now
<|3b|> not like i'm setting up a permanent surveillance system or something with it
<Shinmera> Wait until you want to record the ten hour rave party at your home
<|3b|> it encodes quick, i can just have gaps every once in a while :)
mkolenda has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<|3b|> https://youtu.be/53FwuNlwSew was recorded that way, capture for 1 min then encode
mkolenda has joined #lisp
<Shinmera> what's the temperature range on that?
<|3b|> that video? "room temperature" to "soldering iron"
<Shinmera> looks like it has a pretty hard distance cap
<|3b|> not sure if the camera was configured for 0-655K or 0-6555K range, or not set for calibrated at all
<|3b|> nah, just nothing interesting behind it, and bad color ramp
<Shinmera> I see
<|3b|> it returns 14 bits, and i just grabbed ranges of bits for R,G,B
<Shinmera> ah, yea, ouch
<|3b|> but should be able to do better with a 14bit LUT than they do with "gain control -> 8 bits -> 8bit LUT"
<Shinmera> just map the range to hue and do a hsv->rgb conversion
<|3b|> well, with calibrated mode, most of the 'interesting' range is fairly narrow band (say freezing to a bit above body temp), so would want most of the variation there
<Shinmera> hmmh
alandipert has joined #lisp
<|3b|> so maybe the hue rainbow there, and a blue->white ramp (with some added banding or cycling of value) for colder, and red->yellow->white for hotter
<|3b|> or maybe a more complicated waveform in middle, will have to think about actual # of values, and how fast they change
<|3b|> but that will be something to play with once i have live display (which is probably next task)
jcowan has quit [Quit: This computer has gone to sleep]
<Shinmera> right.
<|3b|> can upload raw 16bit data to GPU, and a LUT texture, and remap it on display, then write various functions to generate new LUTs
<|3b|> and for that don't losing sync for a second isn't too horrible, so don't need to worry about fancy threading or mmaping stuff like extended encoding capture
<|3b|> but first is lunch i think :)
mhd2018 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<|3b|> also need to try hooking up small display soon, so i can make it portable, HDMI output to 24" monitor isn't too good for that :)
<Shinmera> And I'm off to bed
rumbler31 has joined #lisp
iskander has quit [Ping timeout: 250 seconds]
iskander has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
dddddd has quit [Read error: Connection reset by peer]
mhd2018 has joined #lisp
tsandstr has joined #lisp
Bike has joined #lisp
<jasom> is there a predefined type for a valid array index?
<|3b|> fixnum?
<|3b|> actually i guess positive fixnum
<|3b|> non-negative
<jasom> is that guaranteed?
<Bike> technically you'd need array-dimension-limit
<whartung> You get your fixnum back if not delighted.
<jasom> (integer 0 array-dimension limit) is correct
<|3b|> yeah, i guess it could be less than fixnum
<jasom> or more than fixnum
<whartung> does CL support negative dimensions?
<whartung> I never tried it
<whartung> can I have an array of -5 to 5?
<whartung> like in Fortran?
<jasom> A positive fixnum, the exact magnitude of which is implementation-dependent, but which is not less than 1024. <-- it is guaranteed to fit within a fixnum
<|3b|> array indices are specified to be fixnums
<|3b|> right
<Bike> whartung: no
<|3b|> i think they are allowed to be larger than array-dimension-limit too
<whartung> yea, just never though about — wouldn’t surprise me either way
<whartung> array-dimension-limit is the number of dimensions, not the magnitude of a single dimension I think
<|3b|> (satisfies (lambda (a) (array-in-bounds-p array a))), for some specific array ARRAY :p
<jasom> so that means fixnums must be at least 10 bits. There go my plans for an 8008 common lisp implementation :P
<Bike> they have to be at least sixteen, in fact
<whartung> heh
<whartung> lo
<whartung> lol
<|3b|> ah, it was array-total-size-limit which is only a lower bound on upper bounds
<|3b|> (if max size depends on element type, a-t-s-l is smallest max size)
moei has quit [Quit: Leaving...]
Essadon has quit [Quit: Qutting]
robotoad has quit [Quit: robotoad]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pjb> Actually (deftype array-index () `(integer 0 ,(1- array-dimension-limit)))
<pjb> But be careful that (expt array-dimension-limit array-rank-limit) is usuall less than array-total-size-limit.
<pjb> You must stay within array-total-size-limit.
SenasOzys has joined #lisp
<aeth> whartung: You write your own fooref, which isn't a big deal in CL
<whartung> sure
<whartung> like I said, wouldn’t have surprised me if it actually supported it.
<aeth> wouldn't have surprised me either since it does support a lot
<whartung> si
<aeth> but notice that what it does support is a flexible *end* index, for e.g. stacks. it doesn't support a flexible start index
<aeth> (and it doesn't have queues)
<aeth> It's very similar to the whole ND array thing, though. Actually even simpler to implement.
<whartung> I don’t know what the “ND array thing” is.
<aeth> I guess the issue is (aref foo 1 2) is unambiguously a 2D array, but (aref foo 1) isn't unambiguously the 1st element in a 1D array if it has a flexible start point for the index. So you'd make every aref slower for a rare feature unless you fully type declared everything.
<aeth> whartung: 0D, 1D, 2D, 3D, 4D, ...
<whartung> ah
<aeth> whartung: I didn't have enough time to write them all
<whartung> “there’s only 4?” :)
<aeth> in SBCL array-dimension-limit is 4611686018427387901
<aeth> we'd be here all day
<whartung> ticky ticky
<aeth> oh that's for each individual dimension
<aeth> I'd want array-rank-limit
<aeth> That's only 65529
<aeth> (portably, it has to be at least 8)
frgo has joined #lisp
LiamH has quit [Quit: Leaving.]
frgo has quit [Ping timeout: 252 seconds]
SenasOzys has quit [Read error: Connection reset by peer]
SenasOzys has joined #lisp
robotoad has joined #lisp
<jasom> It has to be at least call-arguments-limit as well in order for aref to work, right?
LiamH has joined #lisp
<jasom> s/at least/no more than
LiamH has quit [Client Quit]
<jasom> wow sbcl's call-arguments-limit appears to be most-positive-fixnum. I don't think I'm going to exceed that any time soon
<whartung> test it and see!
<sjl> (defun function-with-one-hundred-thousand-arguments #.(loop :repeat 100000 :collect (gensym)) nil)
<Colleen> sjl: PuercoPop said 22 hours, 5 minutes ago: Have you tried the command refresh-heads when StumpWM does recognize the new heads? https://stumpwm.github.io/git/stumpwm-git_9.html#External-Monitors
<whartung> how big of a 2 element, N D array can you make before your computer ejects your swap partion through the case.
<sjl> PuercoPop: oh hmm, I'll give that a shot later, thanks!
<pjb> warweasle: (min (expt 2 array-rank-limit) array-total-size-limit)
myrmidon has quit [Ping timeout: 260 seconds]
<|3b|> hmm... for i of-type (unsigned-byte ,',(- (integer-length most-positive-fixnum) (integ\
<|3b|> er-length (1- samples))))
<|3b|> i've been writing such pretty code for this project :p
<|3b|> for i of-type (pixel-index-type ,',samples) ;; much better :p
siraben has quit [Ping timeout: 260 seconds]
<aeth> I think you'll run into 64 bit RAM size limitations before you run into 63 bit fixnum limitations in most cases
<whartung> si
* |3b| only has 29 bit fixnums :(
<whartung> “ZFS supports 128 bits, why can’t I swap??”
<aeth> you might be able to construct something with bit arrays... of course, then you do need more RAM than you normally get
<|3b|> and 30 or so bits of ram (addresses)
<jasom> aeth: 62 bit fixnum on amd64 I think
<aeth> |3b|: I thought Pis were 64-bit?
<jasom> aeth: 63 bit fixnum but 62-bit positive fixnums
<|3b|> pi OSes aren't
<|3b|> (and only newer pi have 64bit cpu)
<aeth> jasom: yes, so it's 1/4 what you'd expect. So you'd basically need bit arrays
<aeth> jasom: bit arrays and the theoretical maximum of RAM :-p
Kaisyu has joined #lisp
<jasom> I think max address is only 48 bits on amd64, so SoL there
<aeth> |3b|: The official raspberry pi OS? I'd think you'd be able to just install the ARM64 fedora/etc. distros on it, idk
<aeth> |3b|: looks like only gen 3 is 32/64 bit
<|3b|> yeah, you can, but i didn't :/
<aeth> |3b|: Lisps are made for 36+ bit machines
<aeth> you're going to cons like mad (or have to do painful workarounds) in 32 bit
* |3b| tried a few other options and failed to get a good setup, will probably try some of the other options at some point
<jasom> aeth: I'd argue they're made for 18+ bit machines, but *shrug*
* |3b| wants to be able to run on the pi 0 too though, which is 32bit CPU
<jasom> PDPs had 18 bit pointers anyways
<aeth> |3b|: next gen will probably be 32
<aeth> jasom: perhaps I should say Common Lisp instead
<aeth> jasom: the minimums in the hyperspec do seem aimed with 16-18 bit in mind
<aeth> but practical minimums really require 32-bit or 64-bit, and 64-bit is a lot more convenient (e.g. unboxed single-float)
fortitude has quit [Remote host closed the connection]
<aeth> s/will probably be 32/probably won't be 32/
<jasom> aeth: surely you mean unboxed double-float?
<aeth> jasom: double-float *is* boxed
<aeth> jasom: has to have a type tag
<jasom> it's only boxed on function-call boundaries, but I see what you mean now.
<aeth> jasom: In SBCL double-float and (unsigned-byte 64) and (signed-byte 64) all heap allocate unless they're used in restrictive ways (within a function, saved to typed struct slots or specialized arrays)
<jasom> what sorts of things are single-floats better than 64-bit integers for?
<aeth> In 32-bit ([un]signed-byte 64) are bignums in SBCL and their specialized arrays aren't there (just T arrays)
<aeth> So you can't even work around the boxing