27;swank.swank)
(swank.swank/ignore-protocol-version "2008-07-05")
(swank.swank/start-server "C:\\DOCUME~1\\tzach\\LOCALS~1\\Temp\\slime.
8120" :encoding "binary")
Clojure
user=> nil
user=> nil
user=> "2008-07-05"
user
1. How to can I return a solution via the recursive stack with out
throwing an exception? I understand there is no "return-from"
facility.
2. Can this function be implemented as tail recursive (using loop?
recur?)
Naturally, any other inputs are welcome.
Thanks
Tzach
---
Ful
Thanks Konrad
A very elegant solution.
40 years of laziness, and I finally realize what a great feature the
lazy evaluation is ;)
Tzach
On Jan 9, 3:30 pm, Konrad Hinsen wrote:
> On Jan 9, 2009, at 13:18, Tzach wrote:
>
>
>
> > The main functionsudokuis recursive:
> >
[8 6 0] [0 3 2]]
[[0 0 6] [9 3 0] [0 0 0]]
[[0 0 4] [6 0 0] [0 7 3]]
[[0 5 0] [4 9 3] [0 1 0]]
[[3 6 0] [0 0 8] [9 0 0]]
[[0 0 0] [0 8 5] [3 0 0]]
[[8 3 0] [0 1 6] [0 0 5]]
[[6 7 0] [0 0 9] [0 0 0]]])
(print-board (sudoku *sudoku-problem*))
On Jan 10, 10:22 pm, Tzach wrote:
> Thank
I'm working a Sudoku GUI interface using swing, and I notice something
strange.
I have a JPanel r, with 9 JTextField added to it.
I created a small function to return the text filed of a panel:
(defn components [container]
(for [i (range (.getComponentCount container))]
(.getComponent conta
Thanks Konrad
I do not understand the benefit of storing the map-board result.
The map-board function it self is using lazy for loop.
Why isn't the laziness transitive automatically?
On Jan 11, 12:05 pm, Konrad Hinsen wrote:
> On 11.01.2009, at 08:56,Tzachwrote:
>
> > Following your good advice,
Hi all
As my first Clojure project, I decided to finally solve one of
humanity major problems - Sudoku!
Here is the source
http://code.google.com/p/sudoku-solver/source/browse/trunk/sudoku-solver.clj
I would appreciate your comments.
Thanks Konrad for useful tips.
What is the simplest way to ma
Thanks Keith, I update the version with your inputs, should have test
it first.
Laurent, is it consider a bad practice to use hyphen on general, or
just as ns / file names?
Tzach
On Feb 7, 1:36 am, Laurent PETIT wrote:
> Hello, not related to your question, but you should consider renam
I try to use the following example
(ns clojure.examples.hello
(:gen-class))
(defn -main
[greetee]
(println (str "Hello " greetee "!")))
(compile 'clojure.examples.hello)
I got "error in process filter: Wrong number of arguments: nil, 3".
What am I missing here?
Thanks
--~--~-~
Thanks for the response
Yes, I'm using Emacs SLIM.
what should be the relation between the file (hello.clj) path to the
classpath?
Is the compile work on the file name, or on the function? in other
word, should I evaluate the function on the REPL before compile?
Thanks
Tzach
On Feb 10,
ache* (list ~...@args) ret#))
ret#) )))
usage:
(cache-call + 1 2)
This works fine, but pretty messy.
I would like to scope the hash-map inside the macro and have a hash-
map per function.
How can I do it?
Any style, idioms or personal comments are more than welcome.
Thanks
Tzach
P.S.
://code.google.com/p/sudoku-solver/downloads/list
For most problems, the solver return an answer in a few seconds, but
for some of the hard problems, it may take much longer. I'm still not
sure why.
Any idea is welcome.
Tzach
--~--~-~--~~~---~--~~
You received this me
Hello all
I’m writing a small facility which get vector of vectors of names
(strings) and print them in a special format.
Something like (foo [[“aname” “a-different-name”] [ “oneMoreName”]])
This works fine, but make it hard to write all the quotations when
many parameters are used.
What is the s
-str)))
>
> This let you write foo* to handle strings. Anyway, the key thing to
> note in both examples is that the heavy lifting is delegated to
> another function. This is an element of good macro design.
>
> Just my $.02
>
> On Oct 22, 10:29 am, Meikel Brandmeye
Hello
What is the idiomatic way to implement the classic collide-with
function in Clojure?
I would like to implement something similar to the following (pseudo
code ahead):
(defmulti collide-with foo)
(defmethod collide-with ["asteroid" "spaceship"] (print "Boom"))
(defmethod collide-with ["aster
ec 7, 10:21 am, Tzach wrote:
>
> > (defmulti collide-with foo)
>
> > (defmethod collide-with ["asteroid" "spaceship"] (print "Boom"))
> > (defmethod collide-with ["asteroid" any] (print " Wiiissh"))
> > (defmethod collid
suggestions
or any other input.
Regards
Tzach
--
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
Note that posts from new members are moderated - please be patient with your
firs
Thanks Newman
Useful link!
I'm doing a lot of SIP as well, and I even have a (not so) secret plan
to extend this to create a simple SIP UA simulation.
On Dec 21, 8:57 pm, Richard Newman wrote:
> > I would appreciate your feedback on the code, improvement suggestions
> > or any other input.
>
> T
Thanks, look very interesting!
On what SIP server did you try it, only Sailfin?
I'm working mostly with Oracle OCCAS (formerly WebLogic Sip Server).
BTW, I added a minor feature, which make the actor specify optional.
On Dec 22, 2:54 am, Richard Newman wrote:
> > Thanks Newman
> > Useful link!
>
K. Rowling
2006
29.99
clojure.contrib.zip-filter.xml is getting me close to this, but I
still do not see how can I use it (or other library) to modify values.
What would be the idiomatic (and easiest) way to do that?
I apologize in advance if this is too trivial.
Thanks
Tzach
--
You
Thanks Sean
This is very helpful.
Tzach
On Jan 8, 5:44 am, Sean Devlin wrote:
> Tzach,
> I'd start will clojure.xml. At a very high level, my program would
> look like this
>
> 1. Load the xml file with clojure.xml/parse
> 2. Apply your filtering code with something
Hi all
I made a naïve attempt to implement the minimax algorithm in Clojure.
I would appreciate any comment on style, wrong (or right) use of
idioms etc.
Specifically, can I create a “contract” for the function I use, like
heuristic, to formalize minimax requirement from it?
Thanks
Tzach
I'm trying to work with Gloss binary encoder/decoder, and need some help to
kick start.
My first task is simple(not for me ;)
I have the following binary buffer to read/write:
- 4 byte (32 bit) - code (uint)
- 8 bit - misc flags
- 3 byte (24 bit) - the entire buffer length
- 4 byte (
Hi Zach
Thanks for the detailed response
On Wednesday, January 7, 2015 at 7:28:06 AM UTC+2, Zach Tellman wrote:
>
> Hey Tzach,
>
> If I understand what you're trying to do, you want something like this:
>
> [ :uint32
> :ubyte ;; or bit-seq, depending
> (delimited
rapper lib?)
Regards
Tzach
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe f
Thanks Ryan
I update the game to use similar loop as you have, and add some minor
graphics.
Result Jar and code are here
https://sites.google.com/site/tzachlivyatan/tron-clone-in-clojure
Next step: move to 3d with Clj3D!
Tzach
On Apr 5, 9:46 am, Ryan Sattler wrote:
> Here's a 2D game
here is no escape from my own silliness, but could I have
avoided this mistake to begin with?
Any best practice I broke?
Thanks
Tzach
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@google
erException java.lang.RuntimeException: No such
namespace: comp, compiling:(NO_SOURCE_PATH:3)
Any idea?
Thanks
Tzach
On Jul 23, 9:38 am, Sean Corfield wrote:
> On Fri, Jul 22, 2011 at 7:34 PM, Sean Corfield wrote:
> > I may just switch to the Sun, er, Oracle JVM since I've a feeling one
> >
28 matches
Mail list logo