Re: Game development in Clojure

2010-08-13 Thread BerlinBrown
I played it, it was pretty fun. I have UI recommendations. I couldn't tell the difference between the enemy and my units. I wish maybe you had some quick tips and recommended next actions so I could get used to how the game works. On Aug 13, 9:51 am, Mike Anderson mike.r.anderson...@gmail.com

Re: Clojure on the tiobe index

2010-06-04 Thread BerlinBrown
is an atrocity, by the way. Just because they all have paren's doesn't make them the same. Anyway, I'm sure Tiobe measures something. But I'm not sure it's anything useful. On Jun 4, 10:11 am, BerlinBrown berlin.br...@gmail.com wrote: Nice. http://www.tiobe.com/index.php/content/paperinfo/tpci

Embedded Clojure

2010-06-04 Thread BerlinBrown
I am working on a simple DSL and wanted to some form of embedded Clojure to where I can invoke Clojure scripts and have those scripts not effect the bootloader/my main application code. It seems there are two approaches that sound doable. (A) - With the dynamically loaded clojure scripts, the

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-30 Thread BerlinBrown
I am not knocking all of these +1 Swing posts. But I would love to see one good public application built in Swing (besides Netbeans) On May 28, 9:10 am, laseray lase...@gmail.com wrote: +1 Swing If I had my druthers I would go with QtJambi, but since Nokia dropped development for that it has

Re: Any issues with launching in clojure, calling Java code, Java code calling clojure

2010-05-28 Thread BerlinBrown
/source/browse/maven-clojure-plugin/ trunk/clojure-commons/src/main/java/sandflea/clojure/scripting/ ClojureScripting.java). On May 27, 3:46 pm, BerlinBrown berlin.br...@gmail.com wrote: I enjoyclojureand I think I am breaking all the rules.  I have an app that I originally created inclojure

Re: Any issues with launching in clojure, calling Java code, Java code calling clojure

2010-05-28 Thread BerlinBrown
/cl... (http://code.google.com/p/sandflea/source/browse/maven-clojure-plugin/ trunk/clojure-commons/src/main/java/sandflea/clojure/scripting/ ClojureScripting.java). On May 27, 3:46 pm, BerlinBrown berlin.br...@gmail.com wrote: I enjoyclojureand I think I am breaking all the rules.  I have

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-27 Thread BerlinBrown
There are really only two mainstream options SWT and Swing. Both will suffice. I preferred SWT just because I like the Eclipse project. As you know SWT is the core GUI library behind SWT. I just feel that SWT has more large applications developed, Eclipse, azureus Swing can be frustrating for

Any issues with launching in clojure, calling Java code, Java code calling clojure

2010-05-27 Thread BerlinBrown
I enjoy clojure and I think I am breaking all the rules. I have an app that I originally created in clojure. It has been a year off and on. And I merged that code with some existing java database code. The clojure code invokes the java code. Now, I want to have a script environment where

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-27 Thread BerlinBrown
Swing seems like a proof of concept UI toolkit. SWT just seems a bit more polished and easier to develop, working apps. That is just an opinion and I like that Swing is built-in. On May 27, 8:13 pm, Antony Blakey antony.bla...@gmail.com wrote: On 28/05/2010, at 9:21 AM, Armando Blancas wrote:

Re: Funding Clojure 2010

2009-12-14 Thread BerlinBrown
On Dec 14, 9:33 am, Rich Hickey richhic...@gmail.com wrote: Funding Clojure 2010 Background -- It is important when using open source software that you consider who is paying for it, because someone is. There is no such thing as free software. Sometimes open source software is

Clojure performance tests and clojure a little slower than Java

2009-07-27 Thread BerlinBrown
I was coming up with some performance tests for Clojure, going back and forth between different JVM languages (JRuby, Scala) and mainly looking at pure Java code. So far I have found that clojure is about 5-10 times as slow as comparable code in Clojure. Of course this is before any

Function overriding? Way to do it, similar to in Java

2009-07-24 Thread BerlinBrown
Are there ways to override functions so that if you have different parameters, you get different logic? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Text log viewer in clojure updates

2009-07-17 Thread BerlinBrown
Here is an update to my log viewer in clojure. It mostly works on win32 and I hope to get it past an alpha release., but if you are interested in gui applications in clojure, all source is provided. http://code.google.com/p/lighttexteditor/wiki/LightLogViewer If you run it, I will be happy.

Return nil/null or empty object

2009-07-02 Thread BerlinBrown
I posted a thread about side-effects. Some one replied that your clojure functions should return a value. This is good advice, but I have code that sometimes return nil. Is it better to return 'nil' or an object with no data. I guess a simple example, if you have a function that returns a

NoClassDef Issue, possibly my fault with the classloaders

2009-06-30 Thread BerlinBrown
Pre Notes: I put most of the code for my unit testing here: http://groups.google.com/group/clojure/web/MostCodeIssue.java http://groups.google.com/group/clojure/web/NoClassDefIssue.zip http://clojure.googlegroups.com/web/MostCodeIssue.java?gsc=XGm71ws6-FUP8n2vUln2lQc9yyLJ This is

General Lisp Comment: side effects with Lisp oriented languages

2009-06-26 Thread BerlinBrown
One small issue I see with Lisp languages over something like Haskell where side effects are greatly minimized. I tend to write code in this style: - (when-let [seco-files (.getMergeFilesPrimary *main-global-state*)] (merge-memory-handler-primary prim-files)) Or something similar, you

Differences between 'compiled', 'clojure interpreted', 'clojure in a jar in classpath' and 'load'

2009-06-25 Thread BerlinBrown
I have a clojure application where each file has its own namespace (ns blah)...I generally let the files sit in a classpath directory, so I am assuming the clojure code is loaded at startup time. What are the differences between clojure code which is: 1. Compiled 2. Clojure code that is

Solving memory problems with Clojure code

2009-06-22 Thread BerlinBrown
I want to make it clear, that it probably isn't Clojure's memory problem but something with my code. Anyway, I was trying to figure out my heap memory goes up so much on various operations in my application. Sure, it could be anything but I know I am doing something wrong. Here is the

Memory usage in Clojure, hprof

2009-06-19 Thread BerlinBrown
This may be a throw a comment, but I was running hprof against this SWT gui application that I have. I have about 10,000 lines of clojure code, so I don't know where to reduce my memory. But I thought these stats were interesting on the number of Clojure objects created. Right now, the apps is

Type hints on primities

2009-06-19 Thread BerlinBrown
What are the type hints on primitives. For example, long abc = 3 is the type hint #^long or #^Long I also saw use of the java assembly? syntax before: #^[[L? or neither. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Simple idiom in clojure, mutate a value

2009-06-11 Thread BerlinBrown
I do this a lot but can't figure out to change the UPDATEABLE_VALUE, I am using some pseudo code because I don't have a clojure solution yet. SET UPDATEABLE_VALUE = 0 (loop [line (.readLine reader)] (if (or (empty? line) ( line-num max-num)) SET UPDATEABLE_VALUE = UPDATEABLE_VALUE

Lazy load of imports

2009-06-11 Thread BerlinBrown
I have a Clojure applications with different files, different namespaces and I have imports of classes within those files/ namespaces. lets say (import java.io File) (import thepackage SomeClass) Is it possible to lazy load the imports of the class. For example, if I start my app, I will get

Olabani says google testing Clojure for appengine

2009-04-07 Thread BerlinBrown
http://olabini.com/blog/tag/gae/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to

Every function is a thread in Clojure?

2009-04-03 Thread BerlinBrown
Someone correct me if I go wrong here. But, from my understanding, every defined function in Clojure is an implementation of a thread? What is the goal in implementing in this fashion? For example, if I am writing in imperative style: (println First line) (println Second line) (println Third

Java code example for loading clojure code

2009-03-29 Thread BerlinBrown
Here is an example for loading clojure code. I had trouble with this before. I believe that once the script is loaded, it is loaded per JVM instance. http://clojure.googlegroups.com/web/TestLoadClojureFromJava.java?gsc=PMri4QsAAABqmMyUtnF_kwfBAZY6oRfS Also, any suggestions are welcome.

Running multiple scripts from the Java realm

2009-03-25 Thread BerlinBrown
I know it isn't advised but I have my various reasons. What are some of the best ways to invoke clojure scripts from Java but still maintain the state of the current session. For example, if I run a script from Java, is there a way to ensure that script has already been run...say if I run

Suggestion for Java Clojure code, use of checkstyle or code formatter

2009-03-23 Thread BerlinBrown
I was curious about how some of the clojure code worked and observed that the coding style is a little bit non idiomatic from typical Java coding conventions. E.g. there aren't any javadoc comments on methods or classes, non standard indents. Something like checkstyle might prove useful.

Clojure in Atlanta, Meetup event on

2009-03-10 Thread BerlinBrown
http://leafhopper.github.com/clojure.html 1. Step through the Programming Clojure book. 2. Reinforce above by creating a draft of an online course mimicking the style of Ruby Learning. * read material * review a list of important points * do (create) a few

First Clojure Application, Light Text Editor in Clojure/SWT

2009-03-05 Thread BerlinBrown
http://code.google.com/p/lighttexteditor/ * Simple text editor. * Simple File Manager for accessing important files quickly. * Search tools using Linux or Win32 applications (unxutils). * Built on Java 1.5 and the Clojure programming language. It is a simple text editor and one critical feature

Example JUnit 4.4 use with Clojure

2009-02-28 Thread BerlinBrown
If you want to use junit with clojure, this is what I ended up doing. Yes, I know there are many clojure test frameworks. But if you are stuck with a junit mind, then here is an example approach. http://clojure.googlegroups.com/web/junit_example_clojure.clj?gsc=rSQdQgsBq71IhmeUYhS87PjFY2mX

General Question Clojure(Lisp) Idiom, cross cutting? What is the terminology

2009-02-20 Thread BerlinBrown
This is a general termingology question. What is this idiom, called where you pass a function as an argument to another function and then use that function with in a loop. I thought it reminded me of that aspect oriented programming? cross cutting of concerns? For example, I do that a lot,

Example use of agent with macro

2009-02-19 Thread BerlinBrown
I am working with this SWT application. For most calls with SWT, if you want to request data from a widget, then you must do so through the syncExec or asynExec. These methods require an implementation of runnable as an argument. This works fine for 'setting' a value, but I have trouble when

Re: how to learn clojure ?

2009-02-19 Thread BerlinBrown
On Feb 19, 11:39 am, Stuart Halloway stuart.hallo...@gmail.com wrote: Thanks for the kind words, David. I hope many people will like Programming Clojure and find it useful. Clojure has a *ton* of goodness in it. I think many of the chapters in Programming Clojure book could usefully be

Re: Example use of agent with macro

2009-02-19 Thread BerlinBrown
On Feb 19, 11:58 am, BerlinBrown berlin.br...@gmail.com wrote: I am working with this SWT application. For most calls with SWT, if you want to request data from a widget, then you must do so through the syncExec or asynExec. These methods require an implementation of runnable

Static member and classes

2009-02-18 Thread BerlinBrown
I was trying to access a public inner class and a field within that field. For example: fc.map(FileChannel.MapMode.READ_ONLY, 0, sz); public abstract class FileChannel public static class MapMode { public static final MapMode READ_ONLY = new MapMode(READ_ONLY); .

Re: Clojure Off-topic IRC channel

2009-02-17 Thread BerlinBrown
On Feb 17, 8:23 am, Rayne disciplera...@gmail.com wrote: A week or 2 ago, Lau_Of_DK asked me very nicely to stop talking so off- topic in #Clojure. I mentioned that we should have an Off-topic channel for people who would just like to talk, because just about every other language's channel

Re: Junit and Clojure and the new gen-class

2009-02-11 Thread BerlinBrown
On Feb 11, 11:56 am, .Bill Smith william.m.sm...@gmail.com wrote: Is it fair to say you really want to use Junit rather than the test framework in clojure-contrib? I can think of reasons why you might want to use Junit but I don't want to put words in your mouth. Bill I am trying to use

'ls.c'/csv fixed space style directory listing, figure out the formatting to issues

2009-01-26 Thread BerlinBrown
I want to output a directory with a similar listing (see below), but only a fixed number of spaces. Is there a clojure approach to already do this. -rw 13290 1216183460872 LispExample_Flow.png -rw 3211 1217537516267 PDFReport.java I think in Common Lisp, the powerful 'format' could make this

Re: 'ls.c'/csv fixed space style directory listing, figure out the formatting to issues

2009-01-26 Thread BerlinBrown
On Jan 26, 4:47 pm, Stephen C. Gilardi squee...@mac.com wrote: On Jan 26, 2009, at 4:31 PM, BerlinBrown wrote: I want to output a directory with a similar listing (see below), but only a fixed number of spaces. Is there a clojure approach to already do this. -rw 13290 1216183460872

Not nil and 'true' with conditional functions

2009-01-23 Thread BerlinBrown
Here is some code, my question relates to '(not (nil?...': (if (not (nil? (regex-search-keyword (regex-get-text) line))) (add-select-style styles-vec all-bold) (add-select-style styles-vec light))) Could I have done the following or is (not (nil? ... a better approach.

Simple lisp like idiom in clojure, call function and keep the result

2009-01-23 Thread BerlinBrown
What is an idiom to call a function and also retain the result. For example, I see myself doing this a lot, but it seems to more code than would be needed. (let [a (some-func)] (when a (println (a dosomething - I wish I could avoid having to use the 'let' in this case I guess

Re: Clojure style question, mutable global data structures using Java?

2009-01-16 Thread BerlinBrown
On Jan 16, 11:10 am, BerlinBrown berlin.br...@gmail.com wrote: I am working on this GUI tool and want to keep 'global' data structures in memory. For example, lets say I have a checkbox and want to be able to keep and access the state of that checkbox at any time. Right now, I am thinking

Re: Clojure style question, mutable global data structures using Java?

2009-01-16 Thread BerlinBrown
On Jan 16, 11:49 am, Christophe Grand christo...@cgrand.net wrote: BerlinBrown a écrit : On Jan 16, 11:10 am, BerlinBrown berlin.br...@gmail.com wrote: I am working on this GUI tool and want to keep 'global' data structures in memory. For example, lets say I have a checkbox and want

Re: Clojure style question, mutable global data structures using Java?

2009-01-16 Thread BerlinBrown
On Jan 16, 12:47 pm, Christophe Grand christo...@cgrand.net wrote: BerlinBrown a écrit : Thanks all, this is what I ended up with: For noobs like myself, I am using this code to monitor files and refresh it when the file gets modified. I used 'ref' and 'agent'. (def file-monitor

Example Java oriented SWT GUI application in Clojure

2009-01-12 Thread BerlinBrown
Here is an example SWT application. It is a 'search' tool. Open a file and the search term is highlighted. It has a java oriented approach because I copied the java code verbatim. This might be useful if you are still used to imperative programming. Main source:

Creating classes/Sub classes in clojure

2009-01-09 Thread BerlinBrown
Is it better style to use the 'proxy'ing to create a class or to use the gen-class approach. - (ns net.n01se.MyThread (:gen-class :extends java.lang.Thread :constructors {[] [String]} :init my-init :state myState :exposes-methods {getId getIdSuper})) (defn

Strange 'new' constructor error

2009-01-09 Thread BerlinBrown
Does anyone see what I am doing here. I am creating some SWT code. (import '(org.eclipse.swt.widgets Display Shell Text Widget)) (import '(org.eclipse.swt.widgets Label Menu MenuItem Control)) (import '(org.eclipse.swt.widgets FileDialog MessageBox)) (defn create-menu-bar [sh] (let

Clojure for configuration files like with emacs

2009-01-06 Thread BerlinBrown
I want to build a clojure application that has config files like with emacs (not that complex but close). I am guessing I need to call the eval and load script to load a configuration file, but I was trying to avoid having the configuration file effect the state of the main running application.

General question, what are using for clojure?

2008-11-18 Thread BerlinBrown
What projects have you used clojure for? Have you completed them? Are they one-off projects. Small big? Is it web based, a GUI? I am working on this, haven't made much progress but at least I started. http://code.google.com/p/botnodetoolkit/ And if you are interested, post your project

Clojure and introspection/reflection analysis?

2008-10-23 Thread BerlinBrown
I asked this on common lisp thread but I want to work with clojure as well: With clojure and I am assuming the introspection properties. How can I add code to clojure code that will tell me when a function is called and when has finished executing. I want to take any lisp code and this

Re: Clojure and introspection/reflection analysis?

2008-10-23 Thread BerlinBrown
On Oct 23, 6:42 pm, BerlinBrown [EMAIL PROTECTED] wrote: I asked this on common lisp thread but I want to work with clojure as well: With clojure and I am assuming the introspection properties.  How can I add code to clojure code that will tell me when a function is called and when has