Skip to content

Example file attic.clj doesn't work #1

Open

Description

@hlolli

I'm interested in this Patterning Library after seeing lecture in FARM.

But I have to say the tutorial is quite hard to understand.

Anyway in attic.clj file there is

(:require [patterning.geometry :refer :all])

and

(:require [patterning.complex_elements :refer :all])

geometry.clj and complex_elements.clj are not included on this github project.

And also, the files don't include defsketch, as I'm using emacs and lighttable, I can't use lein run. So it would be very nice if you could include defsketch so it would be possible to run the sketches trough the editor. Anyway, I'll try to find some solutions and maybe sumbit to the project it if it's good.

Activity

  1. interstar commented on Nov 26, 2014

    @interstar
    Owner

    Hi hlolli, thanks for the comment and your interest.

    just to be clear the "attic" file isn't meant to be run. It's just a place where I've been dumping some code I cut out of the main code-base but didn't want to throw away. The references to geometry.clj and complex_elements.clj are probably broken because these files have been moved / reorganized.

    Can you run the core.clj file? That ought to be up-to-date and executable.

    Note that most of the code is in cljx files. Cljx is a pre-processor taking cljx files and generating the clj and cljs (clojurescript) files from them. The Leiningen project.clj specifies that the pre-processor and the Clojurescript compiler are called automatically during compilation (eg. via lein compile or lein run.) If you AREN'T using lein, you will need to make sure you are doing these steps too.

    I've not used Lighttable so I'm not familiar with it. If you have any tips for how to run with it I'd be very grateful. When I demoed at Farm I was just using Cider from Emacs. But I'm not sure I was doing it the right or clever way. (And note that at Farm, I wasn't working on any of the cljx files so these didn't need or get recompiled.)

    One other thing to warn you. I'm actually in the process of a quite serious reorganization of the code-base. Basically, I'm splitting it into a number of (probably separate) projects :

    1. There'll be a Patterning core which is purely the functions to generate the patterns. However all reference to and dependency on Quil / Processing are going to be removed from it. This code is pretty much all of the cljx tree. And it can be compiled to run as both Clojure or ClojureScript. (And used in both JVM and browser based projects)

    2. There'll be a Patterning Quil project which is the light-weight Quil wrapper around the library.

    3. There'll be a Processing library. This is a wrapper which exposes the important functions to Java and is intended to be used as a JAR within an ordinary Processing project. (I'm using this in a workshop in a couple of weeks, so it's the driving motivation for the reorganization.)

    4. Other Javascript / ClojureScript projects that will work in the browser.

    regards

    Phil

  2. hlolli commented on Nov 27, 2014

    @hlolli
    Author

    Thank you for this reply. Yes the core.clj file works fine. But since you are making these changes I think I will wait for a stable version. But the results with this program is to me very cool and I'd love to learn to create patterns like this in quil/processing. But I'll check this out in close future again.

  3. interstar commented on Dec 3, 2014

    @interstar
    Owner

    The Patterning Core repository has now been created : https://github.com/interstar/Patterning-Core

    I'm not suggesting that anyone tries to use it yet. It doesn't really do anything unless you write some other code to call into it. But that's the place to keep your eye on.

  4. interstar commented on Dec 12, 2014

    @interstar
    Owner

    Hi @hlolli

    Patterning is now split into 3 projects. A Patterning Core. An example using Quil. And a new Java project to make a jar suitable for use in Processing. See the README of this project for links.

    I'll be doing some documentation in the next couple of days, so if you have any questions / things that you think could be clearer, I'd welcome them.

    cheers

    Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions