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
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 {
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 seancorfi...@gmail.com wrote:
On Mon, Oct 24, 2011 at 8:36 PM, jayvandal s...@ida.net wrote:
I am running Vista. I installed Clojure as
Alan Malloy a...@malloys.org 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
On Tue, Oct 25, 2011 at 11:20, Michael Jaaka
michael.ja...@googlemail.com 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
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
2011/10/25 Michael Jaaka michael.ja...@googlemail.com:
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
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
Thanks! That was it!
Blake
On Oct 23, 10:24 pm, Sean Corfield seancorfi...@gmail.com wrote:
On Fri, Oct 21, 2011 at 4:12 PM, rugby_road cabjh...@embarqmail.com wrote:
The bit-or arity seems to be limited to 2, rather than more, which
seems to disagree with the documentation. I get Wrong
it's better to use https://github.com/clojure/core.match
On Tue, Oct 25, 2011 at 11:32 AM, Ben Smith-Mannschott
bsmith.o...@gmail.com wrote:
On Tue, Oct 25, 2011 at 11:20, Michael Jaaka
michael.ja...@googlemail.com wrote:
Hi!
Pattern matching is fine for sequence or vector destruction.
Is is
On Tue, Oct 25, 2011 at 15:33, Alex Ott alex...@gmail.com 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
bsmith.o...@gmail.com wrote:
On Tue, Oct 25, 2011 at 11:20, Michael
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= 42
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 laurent.pe...@gmail.com wrote:
2011/10/25 Michael Jaaka
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))
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
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
= (defn
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
Tim Robinson tim.blacks...@gmail.com writes:
= (defn oops! []
(let [x1 (atom (hash-map))
v1 (filter
#(let [xv1 (@data %)]
(if (= xv1 v1)
(swap! x1 assoc :k1 other)))
(keys @data))
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 {:k1
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 mefo...@gmail.com wrote:
Please note that nothing is too humble!
Yes, that does.
Thanks to both of you.
Tim
On Oct 25, 10:16 am, Chris Perkins chrisperkin...@gmail.com 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,
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 mefo...@gmail.com wrote:
All,
We talked about the possibility of getting some ideas about
extracurricular activities during
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
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 llas...@gmail.com
wrote:
Tim Robinson tim.blacks...@gmail.com writes:
= (defn oops! []
Never mind... I just used 'count'.
And sorry to spam the group.
On Oct 25, 10:44 am, Tim Robinson tim.blacks...@gmail.com 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
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
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 francoisdev...@gmail.com 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
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
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
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 or
2011/10/25 Micah Martin micahmar...@gmail.com:
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
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
On Tue, Oct 25, 2011 at 22:28, Sergey Didenko sergey.dide...@gmail.com 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
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 are
On Tue, Oct 25, 2011 at 14:45, Sean Devlin francoisdev...@gmail.com 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
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.
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
https://gist.github.com/1314616
On Tue, Oct 25, 2011 at 6:33 AM, Alasdair MacLeod
alasdair.clj@gmail.com 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 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
(take-while (complement nil?) (repeatedly myfunc))
On Oct 25, 4:07 pm, rugby_road cabjh...@embarqmail.com 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
I recently read the article
http://www.colourcoding.net/blog/archive/2011/10/25/clojure-is-a-get-stuff-done-language.aspx?utm_source=feedburnerutm_medium=feedutm_campaign=Feed%3A+ColourCoding+%28Colour+Coding%29
and it mentions in the Better than a better java section, that Compojure
defines a
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
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}
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
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 mefo...@gmail.com 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
Please add me to Clojure and the web,
Luc P.
On Tue, 25 Oct 2011 22:25:41 -0400
Michael Fogus mefo...@gmail.com 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 lprefonta...@softaddicts.ca
wrote:
Please add me to Clojure and the web,
Luc P.
On Tue, 25 Oct 2011 22:25:41 -0400
Michael Fogus mefo...@gmail.com wrote:
We built
On Tue, Oct 25, 2011 at 8:26 PM, Luc Prefontaine
lprefonta...@softaddicts.ca 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 --
me too! :)
On Tue, Oct 25, 2011 at 11:38 PM, Sean Corfield seancorfi...@gmail.comwrote:
On Tue, Oct 25, 2011 at 8:26 PM, Luc Prefontaine
lprefonta...@softaddicts.ca wrote:
Please add me to Clojure and the web,
Me too please. I already added myself to Clojure Tooling before the
document
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 r.p.l...@gmail.com wrote:
me too! :)
On Tue, Oct 25, 2011 at 11:38 PM, Sean Corfield seancorfi...@gmail.comwrote:
On
59 matches
Mail list logo