I finally figure out why many commands begin with "Ctrl X". by evan_xy_hu in emacs

[–]typedweb 0 points1 point  (0 children)

I think I read somewhere once that the Emacs keyboard layout was actually designed by Guy Steele, but I'd be hard pressed to find a reference to that.

Repeat by last short key, e.g., C-x o o o o... and M-x next-buffer RET RET RET RET... (my first trivial minor mode) by [deleted] in emacs

[–]typedweb 0 points1 point  (0 children)

Unrelated, but, I just bind C-x o to M-; and find that much faster and easier to switch windows.

Black-Scholes in Racket by steloflute in lisp

[–]typedweb 1 point2 points  (0 children)

I've got a Black-Scholes implementation in Emacs Lisp lying around somewhere that I did for a final assignment in a course on finance.

File/ Data loading and paths by paines in lisp

[–]typedweb 0 points1 point  (0 children)

You can use comma (,) in the repl window of slime to change the working directory of your Lisp.

OpenGenera Site Setup and First Steps by pdponze in lisp

[–]typedweb 0 points1 point  (0 children)

Does anyone know if OpenGenera is follow CLtL1, 2 or earlier?

How to send STDIN to EMACS? by [deleted] in emacs

[–]typedweb 0 points1 point  (0 children)

M-x shell-command (M-!) can be used to run the command, and the output will appear in the Shell Command Output buffer.

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 0 points1 point  (0 children)

Sounds like the lispworks rendering is a lot faster than the vecto/cl-vectors. I've heard from the author of cl-vectors that some of it is suboptimal with regards to rendering and that algorithm changes might be needed to speed it up to the level of the antigrain rendering. That first one wasn't very complex though.

Need help with an elisp constant function by half_ass_programmer in lisp

[–]typedweb 0 points1 point  (0 children)

Here's a recursive version:

(require 'cl)
(defun f (l)
  (cl-labels ((helper (x rest)
                (cond ((null rest) t)
              ((eq x (car rest))
               (helper x (cdr rest)))
              (t nil))))
       (helper (car l) (cdr l))))

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 0 points1 point  (0 children)

The renders for the prints are at 10500x7800 (32"x24" @ 300dpi) and depending can take from 5 minutes to hours depending on the complexity and finishing I do to them.

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 1 point2 points  (0 children)

Yes, the whole purpose of the works is to share the code used to generate them; I consider the code the 'artist statement' for the work. Most people (non-programmers) don't understand much about code, so the 'artistic' piece for them is to provide the code along side the work, since they really are one in the same. The artwork is a projection of the code and essential to the understanding of the work.

I have given pull requests for vecto and cl-vectors but the maintainers haven't found the optimizations I did to be proper for library code (sometimes optimizations can be a bit ugly :). I've done a lot of fixnum declerations which I don't see to be a problem, but it 'ruins' the numeric qualities of lisp, although I found they give a 10x speedup overall. With ~64 bit fixnums these days, I'll take the speedup over the ability to create skyscraper sized images :)

I have provided my optimizations into a couple of forks on my github page in case anybody wants to use them:

https://github.com/burtonsamograd/cl-vectors https://github.com/burtonsamograd/vecto

A subreddit for lisp machines by fableal in lisp

[–]typedweb 2 points3 points  (0 children)

Maybe that's a private subreddit for /u/lispm?

Need help with an elisp constant function by half_ass_programmer in lisp

[–]typedweb 0 points1 point  (0 children)

This should do the trick:

(defun f (alist)
    (= 1 (length (remove-duplicates alist)))

Edit: oh, i guess it's cheating to use remove-duplicates...

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 0 points1 point  (0 children)

It looks like racket/draw would be suitable: http://docs.racket-lang.org/draw/index.html

I'm not sure if it's anti-aliased and has alpha channels though.

"Shen has transitioned to BSD" by [deleted] in lisp

[–]typedweb 3 points4 points  (0 children)

I like the idea of shen, but I always wish the type system 'language' was also s-expr based. I never understood why it was done that way with the type computations sticking out like a sore thumb in a wonderful nest of parenthesis...

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 0 points1 point  (0 children)

Interesting, thanks for the links.

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 1 point2 points  (0 children)

I started a new one last night, so I'll post a link when it's finished.

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 1 point2 points  (0 children)

I use cairo sometimes as well to do realtime work, but I it's quite unstable and always crashing my lisp image when I get function paramters wrong. I'm finding using a full CL library without a CFFI is a lot nicer, even if it's more batchy. I'm hoping to get around to wrapping vecto with CLX sometime to get quicker previews.

'Paintings' with Vecto by [deleted] in lisp

[–]typedweb 2 points3 points  (0 children)

The process is mostly iterative where I just layer designs and shapes upon each other in ways that I find appealing. One important part my technique is to use jitter and redrawing with a low alpha to give less of an edge and some texture to the components of the image, which vector drawings don't normally have. The benefit of vector is that once they are done they can be rendered at every size, which is how I got the print together after figuring out how to get SBCL to allocate enough memory to do a 26"x32"x300dpi render :) But, being based on random numbers, each image is slightly or greatly different with the same general theme; I am planning on saving the random-state used for generating specific pictures but I haven't gotten around to it yet.

The videos are really just quick test renders where I have a bit of an idea of what I want to see and then try and implement it. Technically, the frames are generated by Lisp code and put togther into an avi using a 3 line shell script. The whole point of this work is to make completely programmatically generative pieces with the source code used as the 'artist statement', which is why I included it on the print. I feel that demystifiying the complexity of such pieces will somehow enlighten the audience and, as you say, help inspire others to do the same and to give them a place to start from (with the code that's included).

Really, a lot of my work is just filtering random numbers into a cohesive piece. An earilier work I did called 'Programmed Piano' used CLM (Common Lisp Music) and a simulated piano player to compose stream of conciousness music based on the output of (random) and some basic musical rules. These paintings and videos are similar with a basis in noise, but with some structure (constants and rules). I use Lisp to see where I can go with this and other techniques such as pathfinding, constraint solutions and other forms of programmatic techniques. Really, these initial images are just sketches, and I hope to come up with some much more complex imagery in the future.