Has anyone done any work sharing OpenGL contexts in Clojure? I was
wondering the best way to create a GLCanvas if I want all of them to
share the same context.
Right now it seems calling (.getContext (new GLCanvas)) returns nil,
which may be a JOGL thing, but I was hoping to create one canvas wit
I want to map a dictionary and do different things depending on the
key. I was planning on using an if-clause, but I'm not sure how to
compare symbols to strings.
Something like
(map (fn [k v] (if (== k "hello") ... ...) {:hello 1 :goodbye 2})
How would I normally compare symbols and strings?
What's the function to call java code on multiple java components? If
I have a sequence of Java swing components and I want to go through
and set the same properties for each one, I would use a for loop in
Java. If I were using immutable structs in clojure, I'd just a map
and just change the keys
What's the best way to keep track of what kind of value something is?
For example, if I have a hash of floats and I want to go through each
one and see if a given key-value, which happens to be a float, if it's
a distance or a frequency? Or if something is a struct or a specific
struct? I'm somew
In the relatively short time of using clojure, I'm a little frustrated
with it's limited information the stack provides. I'm assuming
there's something I just don't know or am not doing. Many times when
I do something wrong, I have to read through the stack which sometimes
just says there's an er
Is this the common way to do it?
(def sister (assoc brother :name "Cindy"))
Reading up more on structs, it seems they have base keys that can't be
dissoc. Is that the main difference then between it and a hash?
On Mar 28, 2:48 pm, strattonbrazil wrote:
> I did a poor job
plications? Why wouldn't I just
use a hash if structs can hold new values anyway? When should I use
one over the other?
On Mar 28, 11:52 am, B Smith-Mannschott wrote:
> On Sun, Mar 28, 2010 at 18:29, strattonbrazil
> wrote:
> > This may be really basic. So much so that it&
This may be really basic. So much so that it's hard to find on the
internet, but is there something like a copy constructor in clojure,
where I can copy everything in a structure except one or two keys?
Maybe something like struct-map, but fills in the other variables not
supplied by another data
I have a function that I use for adding a JPanel to a ui atom. When I
call swap! that ui atom is sent to that function I call with the swap!
on and is dereferenced inside the function so I don't need to call @ui
on it. However, I want to add listeners to my JPanel that can affect
that atom, but I
I'd like to separate my ui Swing/JOGL from the content, so my code is
relatively unaware of the UI around it. For example, I create a
global context that holds on my content. I then make a UI that when
the user does some interaction like a mouse click or drag, the UI
creates a new context. My OO
efficient" access,
> thennamingthe struct with an uppercase first letter works, and isn't
> too uncommon; besides this is a special-case performance issue, right?
>
> On Mar 19, 4:36 pm, strattonbrazil wrote:
>
> > If am creating accessors to access structures, how should
If am creating accessors to access structures, how should they be
named?
(defstruct employer :employee)
(defstruct employee :employer)
(def employee-name (accessor employee :employer))
(def employer-name (accessor employer :employee))
In a situation where one struct is pointing to the other, is t
-amd64/lib/
nativewindow.all.jar clojure.main test.lsp
On Mar 12, 8:20 am, Michał Marczyk wrote:
> On 12 March 2010 17:09, strattonbrazil wrote:
>
> > java -cp -Djava.library.path=./jogl-2.0-linux-amd64/lib ~/clojure/
> > clojure-1.0.0.jar:./jogl-2.0-linux-amd64/lib/jogl.
ib/nativewindow/all/jar
I don't know if adding to the library path is causing the new error,
or if this is just the next error in getting the script to run. Am I
setting the library path incorrectly?
On Mar 11, 5:01 pm, strattonbrazil wrote:
> Hrmm, that's weird. Well thanks for tha
ting-started/16.
> Hopefully some variation on that should work for you.
>
> On Mar 11, 1:28 pm, strattonbrazil wrote:
>
> > I downloaded the new jogl 2.0 libs and can't get jogl to be recognized
> > in my classpath. It's stuck on the import.
>
> > (impo
I downloaded the new jogl 2.0 libs and can't get jogl to be recognized
in my classpath. It's stuck on the import.
(import '(javax.media.opengl.awt GLCanvas))
In my shell I have clojure aliased to 'java -jar clojure-1.0.0.jar'
I have my CLASSPATH as
echo $CLASSPATH
./jogl-2.0-linux-amd64/lib/jo
n Sun, Mar 7, 2010 at 6:44 PM, strattonbrazil
> wrote:
> > I am on Linux. I have a 6.6 and a 6.8 directory in my .netbeans
> > folder. 6.6 still runs. I have tried moving individual jars in and
> > out of that dir, but I still get the error. I even moved the entire
>
Mar 5, 2010 at 11:34 PM, strattonbrazil
>
> wrote:
> > Has anyone had problems with netbeans starting with the enclojure
> > alpha? I restarted my session and it died. Now when I try to run
> > netbeans, it throws a classpath exception. Can I remove this plugin
> >
Has anyone had problems with netbeans starting with the enclojure
alpha? I restarted my session and it died. Now when I try to run
netbeans, it throws a classpath exception. Can I remove this plugin
or am I missing something in my install?
Exception in thread "main" java.lang.NoClassDefFoundErr
I have implemented the half-edge data structure several times now for
mesh representation. Basically there are three main data structures
(vertex, edge, face). I'll explain them a bit, but I think this is a
more functional programming/Clojure question than actual geometry.
A vertex is a corner o
Object-oriented design has been frequently sourced as becoming
standard for simulations. Even on the clojure website, it states,
"[Object-oriented design is ] Born of simulation, now used for
everything, even when inappropriate". I've also heard GUIs are more
easily developed using object orienta
21 matches
Mail list logo