This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu2. debugging for embedded dll - no console at all...Quote from: "mikerudin39"
(define str->bytes (lambda (s) (unpack (dup "b" (length s)) s)))
(str->bytes "the real filename")
(str->bytes "the filename directory returns")
(thrush initial-expr [idx] expr [idx] expr [idx] expr)
(thrush "hello" 1 printf)
(thrush "hello" 1 reverse (printf " world.")
newy ypos sub newx xpos sub atan neg 90 add /orient exch def
(define pi (mul 4 (atan 1)))
(define (rad d) (mul d (div pi 180)))
(define (deg r) (mul r (div 180 pi)))
(module "postscript.lsp")
;; I work in inches as my base unit (72 points per inch), but scale things down
;; by scalefactor so they fit on a regular sheet of paper.
(define scalefactor 4)
(ps:scale (div 72 scalefactor) (div 72 scalefactor))
(define ¼ 0.25)
(define ½ 0.5)
(define origx (mul ½ 8.5 scalefactor))
(define origy (mul ½ 11 scalefactor))
(define my-goto (lambda (x y) (ps:goto (add x origx) (add y origy))))
(define my-drawto (lambda (x y) (ps:drawto (add x origx) (add y origy))))
;; https://math.stackexchange.com/questions/76099/polar-form-of-a-superellipse
;; answered Oct 26 2011 at 17:03 by Ross Millikan
;; polar coordinate form of a superellipse
;; r = ab/(|b cos theta|^n + |a sin theta|^n)^(1/n)
;; a is half the height
;; b is half the width
;; n is the exponent of the superellipse
(define super-ellipse-radius (lambda (a b n theta)
(div (mul a b)
(pow (add (pow (abs (mul b (cos theta))) n)
(pow (abs (mul a (sin theta))) n))
(div n)))))
(define draw-super-ellipse (lambda (a b n)
(letn (anglestep (rad 0.1)
ab (mul a b)
startr (super-ellipse-radius a b n 0)
startx (mul startr (cos 0))
starty (mul startr (sin 0)))
(my-goto startx starty)
(for (theta anglestep (mul 2 pi) anglestep)
(let (r (super-ellipse-radius a b n theta))
(my-drawto (mul r (cos theta)) (mul r (sin theta)))))
(my-drawto startx starty))))
(draw-super-ellipse (mul 7 (sqrt 2)) 7 2.718)
(ps:render "standing-desk2.ps")
(! "pstopdf standing-desk2.ps")
(exit)
%%[ Error: undefinedresult; OffendingCommand: atan; ErrorInfo: CharOffsets %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%
pstopdf failed on file standing-desk2.ps with error code -31000
I it dot'nt make ant difference still got nil. I ended up using (directory) followed with a do-list to remove everything I do not want.Quote from: "CaveGuy"
thanks for the reply .
ps I missed the definitive reply before I posted this the first time ... my bad
(directory "." "dovecot.*")
first problem I put (directory) in the search box an it tells me it is too common ?Quote from: "CaveGuy"
I change-dir to the directory with my log files and do a (directory) and get back a list of everything.
In this case I only want the dovecot logs so why does (directory "dovecot*") return nil ?
obviously too common a problem for search to be bothered responding with a hint.
Its late, I'm tired, what am I overlooking ?
(directory "dovecot.*")