> I failed to mention that both the files are in a directory named
> mybot
I could be wrong but I think they have to be in the root of the zip
file, i.e. no directories.
I just zip up ants.clj and MyBot.clj into a file and it works.
HTH,
U
--
You received this message because you are subscrib
Hi!
Pattern matching is fine for sequence or vector destruction.
Is is possible to destruct map and make pattern machting?
For example I would like to make constraint for to some query service.
It would be done as map for example: { :name "Tom" :surname "Jakarta"
:birthDate (Date.) } or { :pers
jayvandal:
If you don't use Leiningen, make sure that the pathname for
clojure.java.jdbc jar file exists in classpath.
On Oct 25, 1:39 pm, Sean Corfield wrote:
> On Mon, Oct 24, 2011 at 8:36 PM, jayvandal wrote:
> > I am running Vista. I installed Clojure as c:\clojure.
>
> You don't need to "i
Alan Malloy writes:
> It seems to me that it would be nice to have macros automatically
> include, on their result forms, the metadata from their input
> &form. Of course, macros may wish to add metadata as well, so the two
> maps should probably be merged. However, there are certainly some
> pro
On Tue, Oct 25, 2011 at 11:20, Michael Jaaka
wrote:
> Hi!
> Pattern matching is fine for sequence or vector destruction.
> Is is possible to destruct map and make pattern machting?
> For example I would like to make constraint for to some query service.
> It would be done as map for example: { :n
Something is simple as long as your mental model is simple to
track. Something which doesn't cause you headache.
If you can't build mental model in your head, then its definitely not
simple.
Every time you think I have mental model which works like this, but before
this I must remember about thi
2011/10/25 Michael Jaaka :
> Something is simple as long as your mental model is simple to
> track. Something which doesn't cause you headache.
Disagree. The whole point of Rich's talk is to have people not
conflate "simple" and "easy", or it seems to me that this is what
you're doing here.
"simpl
I was wondering if there was a common protocol to get a string
representation of an object yet. Also, are there common protocols for
ints, doubles, chars, etc? Having just spent a lot of time writing
Python, having an int function that worked on both Strings and Ints
was great. I'd love to be ab
Thanks! That was it!
Blake
On Oct 23, 10:24 pm, Sean Corfield wrote:
> On Fri, Oct 21, 2011 at 4:12 PM, rugby_road wrote:
> > The bit-or arity seems to be limited to 2, rather than more, which
> > seems to disagree with the documentation. I get "Wrong number of args
> > (3) passed to: core$bit
it's better to use https://github.com/clojure/core.match
On Tue, Oct 25, 2011 at 11:32 AM, Ben Smith-Mannschott
wrote:
> On Tue, Oct 25, 2011 at 11:20, Michael Jaaka
> wrote:
>> Hi!
>> Pattern matching is fine for sequence or vector destruction.
>> Is is possible to destruct map and make pattern
On Tue, Oct 25, 2011 at 15:33, Alex Ott wrote:
> it's better to use https://github.com/clojure/core.match
Thanks, I'd forgotten about core.match.
// ben
> On Tue, Oct 25, 2011 at 11:32 AM, Ben Smith-Mannschott
> wrote:
>> On Tue, Oct 25, 2011 at 11:20, Michael Jaaka
>> wrote:
>>> Hi!
>>> Patt
Right Rich, Thanks. But that was a simplified reduction of real usage.
Typically the declare is found in a nested structure:
(describe "something"
(context "fooey"
(with bar 42) ; declare comes from this macro
(it "works"
(should=
Interesting discussion of this talk, including comments from Rich (or
at least someone claiming to be Rich):
http://www.reddit.com/r/programming/comments/lirke/simple_made_easy_by_rich_hickey_video/
On Oct 25, 7:00 am, Laurent PETIT wrote:
> 2011/10/25 Michael Jaaka :
>
> > Something is simple a
I need to read WAV files, and don't have time to recode the reader in
Clojure. It's Java, and it's got side effects. I can read a number
of frames from the WAV file with this code:
(defn read-frames [wav-file num-frames]
(let [num-samples (* num-frames (.getNumChannels wav-file))
buffe
Thx, this is exactly what I need.
--
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 fr
It appears I'm not understanding how something works in the REPL (or
maybe deeper). For instance:
(def big (range 1000))
; memory is small now
(count big) => 1000
; memory is huge now
(System/gc)
; memory is still huge now
(def big nil)
(System/gc)
; memory is small again
So somehow when
For those in fresh need of having their minds blown, this is always a good
detonator:
http://www.paulgraham.com/rootsoflisp.html
Sam
---
http://sam.aaron.name
On 25 Oct 2011, at 04:58, finbeu wrote:
> John McCarthy, the father of Lisp, died last night at the age of 84.
>
> --
> You received
This code probably will not make a whole lotta sense since I reduced
it down to show only the problem at hand, but I'm hoping someone can
explain why this doesn't work the way I expected it would:
=> (def data (atom {:k1 "v1" :k2 "v2" :k3 "v3"}))
#'user/data
=> (def flag (atom nil))
#'user/flag
Range is lazy.
First you define a range, which is just a "promise" that the variable will
be rendering a seq with 10M when asked for the elements.
When you count the sequence you realize it and it takes up much space. When
you let go if it it's of course GCed.
The problem is that you hold on to
All,
We talked about the possibility of getting some ideas about
extracurricular activities during the Conj days (and possibly training
days). I've created a spreadsheet at the link below to collect
ideas. It is not my intention to be the organizer of these
activities. Instead, if you have an i
Tim Robinson writes:
> => (defn oops! []
> (let [x1 (atom (hash-map))
> v1 (filter
> #(let [xv1 (@data %)]
>(if (= xv1 "v1")
>(swap! x1 assoc :k1 "other")))
>(keys @data))
> rxv (rese
Please note that nothing is too humble! If you have a cool piece of
code or technique that you'd like to show off for 10 minutes then by
all means put it on the spreadsheet.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send
On Tuesday, October 25, 2011 12:00:04 PM UTC-4, Tim Robinson wrote:
>
> This code probably will not make a whole lotta sense since I reduced
> it down to show only the problem at hand, but I'm hoping someone can
> explain why this doesn't work the way I expected it would:
>
> => (def data (atom
ClojureScript Birds of a Feather (I'm not going to lead this one though, but
it seems like an obvious add)
miniKanren / core.logic Birds of a Feather (I'm open to leading this one)
David
On Tue, Oct 25, 2011 at 12:16 PM, Fogus wrote:
> Please note that nothing is too humble! If you have a cool
Yes, that does.
Thanks to both of you.
Tim
On Oct 25, 10:16 am, Chris Perkins wrote:
> On Tuesday, October 25, 2011 12:00:04 PM UTC-4, Tim Robinson wrote:
>
> > This code probably will not make a whole lotta sense since I reduced
> > it down to show only the problem at hand, but I'm hoping some
BTW, is this meant to be editable by anyone else? Or are you going to
collect the ideas off this thread and enter them?
David
On Tue, Oct 25, 2011 at 12:11 PM, Fogus wrote:
> All,
>
> We talked about the possibility of getting some ideas about
> extracurricular activities during the Conj days (
> BTW, is this meant to be editable by anyone else? Or are you going to
> collect the ideas off this thread and enter them?
It should be editable by anyone with a Google account. Please let me
know if that's not the case.
--
You received this message because you are subscribed to the Google
Gro
Good question.
Also, I wonder if there are any existing realize type functions?
i.e.
(realize (filter ...))
or how would I realize without printing?
Tim
On Oct 25, 10:12 am, "Marshall T. Vandegrift"
wrote:
> Tim Robinson writes:
> > => (defn oops! []
> > (let [x1 (atom (hash-map))
> >
Never mind... I just used 'count'.
And sorry to spam the group.
On Oct 25, 10:44 am, Tim Robinson wrote:
> Good question.
>
> Also, I wonder if there are any existing realize type functions?
> i.e.
> (realize (filter ...))
>
> or how would I realize without printing?
> Tim
>
> On Oct 25, 10:12 am
> Also, I wonder if there are any existing realize type functions?
> i.e.
> (realize (filter ...))
This is what doseq, dorun, and doall are for.
jack.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
I'm going to add a column for people to add themselves (either by name or
handle) as "planning to attend". Even an inaccurate count would help the
organizer ensure a proper space is found for the session/workshop/talk/whatever.
- Chas
On Oct 25, 2011, at 12:11 PM, Fogus wrote:
> All,
>
> We
java.lang.Object.toString
On Oct 25, 5:45 am, Sean Devlin wrote:
> I was wondering if there was a common protocol to get a string
> representation of an object yet. Also, are there common protocols for
> ints, doubles, chars, etc? Having just spent a lot of time writing
> Python, having an int
One idea would be to organize something for people wanting to set up local
clojure meetups. I don't think this needs to be a BOF, but I don't know the
best
way to promote the idea.
Anyone coming with family and/or spouse-dates? If so, let us locals know so
we can suggest some local activities.
This is not coding-related, but do we have any musicians in the
group? I'm going to have a violin with me and would love to jam or
sight-read. Maybe the Overtone guys would be interested in this?
If there's any interest I'll set up a doodle poll to see what
instruments people might play or have.
You could just add the "session", and ask that attendees indicate their
instrument in the "attending" column?
- Chas
On Oct 25, 2011, at 3:17 PM, nchurch wrote:
> This is not coding-related, but do we have any musicians in the
> group? I'm going to have a violin with me and would love to jam o
2011/10/25 Micah Martin :
> Right Rich, Thanks. But that was a simplified reduction of real usage.
> Typically the declare is found in a nested structure:
>
> (describe "something"
> (context "fooey"
> (with bar 42) ; declare comes from this macro
> (it "wor
Yes, Easy to track.
Nevertheless this definition passes Rich's list.
--
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
I get the subject error when trying to deserialize a big map (70kb)
using load-file.
Is this by design?
There was an advice in the old thread to "use smaller methods". But
while small methods are good, breaking continuous data into smaller
pieces looks like a hack.
Should I use some other functi
On Tue, Oct 25, 2011 at 22:28, Sergey Didenko wrote:
> I get the subject error when trying to deserialize a big map (70kb)
> using load-file.
>
> Is this by design?
>
> There was an advice in the old thread to "use smaller methods". But
> while small methods are good, breaking continuous data into
Indeed. Thanks for the answer!
> If it's really just data (not containing function or macro calls you
> are expecting to be evaluated), just use (read ...). That will parse
> the file, returning a Clojure data structure without evaluating it.
>
> // ben
--
You received this message because you a
On Tue, Oct 25, 2011 at 14:45, Sean Devlin wrote:
> I was wondering if there was a common protocol to get a string
> representation of an object yet. Also, are there common protocols for
> ints, doubles, chars, etc? Having just spent a lot of time writing
> Python, having an int function that wo
Hello,
Are there any tutorials or examples of setting up pprint dispatch
functions? I know the docs suggest looking at the source, but I find
it a bit cryptic. In particular I would like to see if it's possible
to dispatch on meta-data, record types or more arbitrary values in a
map etc.
thanks
The Consumer Electronics Customer Experience Team is looking for a
senior level passionate software engineer to build a complete e-
commerce solution for shopping for electronics. A successful candidate
will be an experienced and talented engineer who is excited to work
with a team of smart develop
https://gist.github.com/1314616
On Tue, Oct 25, 2011 at 6:33 AM, Alasdair MacLeod
wrote:
> Hello,
>
> Are there any tutorials or examples of setting up pprint dispatch
> functions? I know the docs suggest looking at the source, but I find
> it a bit cryptic. In particular I would like to see if
I have a function without arguments which returns a big,complex object
repeatedly until it returns nil. That is to say that the function
will produce a sequence of objects, but I don't know how many. I want
to call the generator as a lazy sequence but how do I make such a
thing?
Currently I am d
(take-while (complement nil?) (repeatedly myfunc))
On Oct 25, 4:07 pm, rugby_road wrote:
> I have a function without arguments which returns a big,complex object
> repeatedly until it returns nil. That is to say that the function
> will produce a sequence of objects, but I don't know how many.
I recently read the article
http://www.colourcoding.net/blog/archive/2011/10/25/clojure-is-a-get-stuff-done-language.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ColourCoding+%28Colour+Coding%29
and it mentions in the "Better than a better java" section, that "Compojure
define
So I'm catching up with the 1.3 defrecord additions (best docs here
afaik: http://dev.clojure.org/display/design/defrecord+improvements -
will http://clojure.org/datatypes be updated?)
In 1.2, records were constructed only with the positional Java
constructor:
(defrecord Person [first last])
(
In the thread about Rich Hickey's talk on simplicity, people bring up the
point that Rich suggests to *finally*, learn SQL. The idea is to use
declarations to describe your solution, decoupling implementation details.
However, its arguable that SQL itself is hard. For example, programmers can
o
I'm new to clojure but I find the approach [1]Arel takes to SQL very useful.
It uses relational algebra to make complex SQL statements composed by
smaller structures that represent simple SQL statements.
On my current project, we use it as a way to provide the staff will a
flexible query builder.
+1
A further argument in favor of your choices is that p3 and m2 both work
great with higher-order fns, which I didn't immediately find a way to do
with any of the others:
user=> (map (partial apply ->Person) [["bob" "loblaw"] ["stan" "sitwell"]])
(#user.Person{:first "bob", :last "loblaw"} #us
We built quite a large list before the internet graffiti started
taking over, so if you have an addition then please post it here and
it'll be added.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegr
I'd suggest adding a header row (in large, bold type, perhaps) that indicates
the desired process.
- Chas
On Oct 25, 2011, at 10:25 PM, Michael Fogus wrote:
> We built quite a large list before the internet graffiti started
> taking over, so if you have an addition then please post it here and
Like to attend the Go and Literate Programing sessions.
On Oct 25, 10:25 pm, Michael Fogus wrote:
> We built quite a large list before the internet graffiti started
> taking over, so if you have an addition then please post it here and
> it'll be added.
--
You received this message because you
Please add me to "Clojure and the web",
Luc P.
On Tue, 25 Oct 2011 22:25:41 -0400
Michael Fogus wrote:
> We built quite a large list before the internet graffiti started
> taking over, so if you have an addition then please post it here and
> it'll be added.
>
--
Luc P.
Very nice collection of Clojure goodness. The Conj is shaping up to be
great!
On Oct 25, 2011 11:26 PM, "Luc Prefontaine"
wrote:
>
> Please add me to "Clojure and the web",
>
> Luc P.
>
> On Tue, 25 Oct 2011 22:25:41 -0400
> Michael Fogus wrote:
>
> > We built quite a large list before the inter
On Tue, Oct 25, 2011 at 8:26 PM, Luc Prefontaine
wrote:
> Please add me to "Clojure and the web",
Me too please. I already added myself to Clojure Tooling before the
document got locked down :)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -
me too! :)
On Tue, Oct 25, 2011 at 11:38 PM, Sean Corfield wrote:
> On Tue, Oct 25, 2011 at 8:26 PM, Luc Prefontaine
> wrote:
> > Please add me to "Clojure and the web",
>
> Me too please. I already added myself to Clojure Tooling before the
> document got locked down :)
> --
> Sean A Corfield -
Fogus,
Please add me to ClojureScript, MiniKanren, Go and the Heroku drinkup.
Regards,
BG
---
Sent from phone, please excuse brevity.
On Oct 26, 2011 10:03 AM, "Robert Levy" wrote:
> me too! :)
>
> On Tue, Oct 25, 2011 at 11:38 PM, Sean Corfield wrote:
>
>> On Tue, Oct 25, 2011 at 8:26 PM, Luc
You should definitely take a look at ClojureQL: http://www.clojureql.org/
Regarding simplicity, I'd simply suggest being wary of how you handle
associations. If you can deal with your data and relationships at top
level, you can probably keep things simple, but if you start pushing
relationship ha
60 matches
Mail list logo