freenode/#lisp - IRC Chatlog
Search
5:15:39
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?
5:31:21
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
5:32:10
jackdaniel
fwiw that's one of things we did with log4cl: we've retyped issues from the original repository and merged dangling pull requests
6:53:15
beach
If you think you are dealing with decimals, you will be very confused when you try (+ 0.3 0.6)
6:54:05
no-defun-allowed
my personal favourite is 0.1 + 0.2 but i think it's double floats only or something
6:54:26
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.
6:55:14
lieven
what every computer scientist should know about floating point still isn't read widely enough :)
6:55:40
no-defun-allowed
beach: if you're not busy, could you please explain how SICL manages finding the GC roots in a program?
6:55:44
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' :-(
6:56:32
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
6:57:07
beach
no-defun-allowed: Well, the SICL GC has not been entirely implemented yet, but here is the plan...
6:57:35
beach
no-defun-allowed: For each value of the program counter, the compiler emits information about what is contained in which register.
6:58:32
no-defun-allowed
so the GC just looks up the program counter in your table and looks at what types exist in the registers?
7:00:26
beach
Anyway, you have the complete description in that document. As I wrote, the thing is complicated by callee-saves registers.
7:01:01
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)
7:02:08
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.
7:02:38
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
7:04:23
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
7:06:06
no-defun-allowed
i thought about doing a similar thing in CL but the visual heap viewer was too good to pass on.
7:10:05
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?
7:11:00
phoe
you theoretically could send stuff from the Lisp image for evaluation in emacs, but I haven't seen that used widely
7:11:50
ecraven
I'm getting to the point where I wish I could use emacs like a listener on the old lisp machines :-/
7:18:18
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)
8:13:56
no-defun-allowed
however, i don't think there's too much to change if you can do one but not the other.
8:15:57
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.
8:18:25
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)
8:18:53
dorothyw
Yes this looks to me much like computer code. I feel it could be converted to lisp.
8:19:12
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
8:19:38
dorothyw
If I parse left to right a represents the integer to multiply against the variable to n power.
8:19:47
no-defun-allowed
(so if you have (+ a b), then you'll need to integrate/differentiate a and b and substitute them back in)
8:23:21
no-defun-allowed
dorothyw: everything before x is the new coefficient, everything after is the power
8:23:46
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.
8:25:10
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.
8:25:35
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
8:27:43
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
8:32:46
no-defun-allowed
(setf (fdefinition 'pow) (fdefinition 'expt)) is always possible but probably not useful
8:33:02
dorothyw
jdz: if one presents itself. If one does not exist or I find one my query is terminated.
8:35:00
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
8:39:32
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?
9:40:37
shka_
razzy: idea was to basicly use vast address space of modern machines to establish access to data on so called persistant storage
9:46:46
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 :]
9:54:46
beach
razzy: I am not thinking of Linux much at all, other than as my current tool for most things.
10:00:23
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
10:01:22
no-defun-allowed
i want to add automatic syllable finding (which i think i have an algorithm for) and a better stretching mode
10:01:34
no-defun-allowed
it's in python right now but all the heavy stuff is done by sox and aubiopitch
10:24:28
razzy
if you build it, and you cannot say the difference from original, you can say you understand it
10:25:10
jackdaniel
you have ikea furniture with detailed instruction what goes where, you are able to build the furniture
10:25:25
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
10:25:41
jackdaniel
from atoms? from hardware? from assembly? from programming language? from framework? define scratch
10:28:08
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
10:28:50
no-defun-allowed
however this rosetta code entry looks like shit and uses lists for the analysed sample which doesn't help
10:53:25
no-defun-allowed
I'd probably use some kind of "step" to avoid more consing with a vector to make fft fast.
11:22:43
no-defun-allowed
*another large quantity of vectors which should have around the same total size as the original.
12:22:19
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!
12:57:22
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.
12:57:22
ogamita
Basically: ("OBJECT" "[-\\w]") should match "OBJECT" in "OBJECT FOO" but not in "OBJECT-FOO BAR".
12:57:22
ogamita
For this, I expand the parse-tree regexp as: (:alternation (:register "OBJECT" (:negative-lookahead (:char-class #\- :word-char-class))) …).