If you want to improve then you will need to invest time understanding
core development concepts. You don't want to accidentally do the
right thing because your language pushes you in that direction.
Instead, you want to purposefully do the right thing by having a good
understanding of the fundam
> I am from java Background. We say Homoiconicity in Clojure (Lisp).
> Code is data and data is code. I read various blogs on it, still not
> clear, Can you give me some example?
Using macros it's possible to add "new syntax" to the language which
is extremely hard (if possible at all) to achieve
A blog post explaining the solution step by step
http://dosync.posterous.com/another-taste-of-ckanren.
On Mon, Oct 31, 2011 at 9:36 PM, David Nolen wrote:
> Here's a correct version that solves the puzzle in ~12ms,
> https://gist.github.com/1329580. A bit longer but it fun to combine
> constrain
A snapshot of lein-control 0.2.1 (which ships clojure-control 0.2.1) has
been pushed to clojars.
You can use these new features of clojure-control with your control file.
Add lein-control to your dev-dependencies like:
:dev-dependencies [[lein-control "0.2.1-SNAPSHOT"]]
For more information, pl
Here's a correct version that solves the puzzle in ~12ms,
https://gist.github.com/1329580. A bit longer but it fun to combine
constraints w/ search.
Will try to find some time to write a more detailed explanation.
On Sun, Oct 30, 2011 at 9:00 PM, David Nolen wrote:
> Heh, as someone pointed out
While Peter Norvig was discussing Python with John McCarthy
(inventor of lisp) in the audience:
John simply asked if Python could gracefully manipulate
Python code as data.
"No, John, it can't" was Peter's reply.
Create a list and call read on it.
Create a function, manipulate it as a list to mo
On Mon, Oct 31, 2011 at 4:57 PM, JMatt wrote:
> Everyone that I know who writes clojure professionally or on a daily basis
> uses lein to start. The simplest way to expose far more people to alphas and
> betas is to add the sonatype repo to the default-repos function in lein:
> https://github.com/
The problem you're having doesn't have anything to do with file
reads. Every time you call (take 5 data), you're calling it on the
same item 'data'; your variable 'data' doesn't change between each
call. The chief thing you have to understand about Clojure is that
variables never change. Never.
Those are great links Linus, thank you.
Also highly relevant and beginner friendly is the text adventure game
chapter from the, "Land of Lisp" book, of
which a free clojure translation is available online:
http://www.lisperati.com/clojure-spels/casting.html
Cheers,
Joshua
On Oct 31, 6:01 pm
"No one can be told what the matrix is."
Well, the best way to understand the macros is to try it out yourself. John
Lawrence Aspden published some really helpful tutorials om macros, and a
kata - try it! Links in the end.
There are some other code examples around, also look in the source-code of
I expect this discussion isn't what Rich had in mind so let's draw it
to a close. If any one else thinks there is merit in a vehicle that
provides the clojure team with access to many real life examples of
how clojure is being used in the wild and equally providing those
submitters with early feed
It can still be difficult to find the right repo and documentation for
alpha and betas. Especially for the new contrib. It really doesn't have
anything to do with the Core team or the actual documentation (when it's
finally found). To me the problem is sifting through the countless highly
ranke
On Mon, Oct 31, 2011 at 2:57 PM, Colin Yates wrote:
> Don't want to feed the trolls but can you justify "ridiculous"?
> Rather a strong term.or maybe your definition is "I don't
> understand the value".
The value of having people piece together ad-hoc test suites vs.
adding tests to Clojure (
Glad I could help! SICP is a wonderful book, and Clojure is a dream
come true in that it gives you a step from SICP into the real world.
Clojure would be just about perfect if it had general tail call
optimization and continuations, but I don't really miss those so far
(in any case they can't real
Don't want to feed the trolls but can you justify "ridiculous"?
Rather a strong term.or maybe your definition is "I don't
understand the value".
Maybe you are right, maybe we should provide an easy way to submit
test cases which are automatically run as part of a CI buildno
wait, that was
Hi everybody!
I'am experimenting with clojure and as an exercice I use the facebook
puzzles (http://www.facebook.com/careers/puzzles.php?puzzle_id=20)
Most puzzles require to read from a text file "efficiently". So I try
to not read the full file at a time, but process it lazily.
For that I made
the responses to rich here sort of read like "lets make an ad-hoc test
suite for clojure and everyone can run it" which is ridiculous.
tests should be contributed back to clojure.
if contributing tests is so difficult people instead create their own
test suites and report results then we need to
> No, I'm looking for a copy meta routine.
>
> The mysterious defmeta macro does this, in one call.
>
> (defmeta a map)
>
> (= (meta (var a)) (meta map))
This will do what you want, but I would not advise using it:
(defmacro def-with-meta [symbol init]
`(let [m# (meta ~init)]
(def ~symbol
Ahh. Yes, it is really, really hard. I may have misunderstood the nature
of the session.
Larry
On Mon, Oct 31, 2011 at 5:18 PM, Gary Trakhman wrote:
> I think we're just playing it, no? :-) Isn't it really really hard
> to solve go?
>
> On Mon, Oct 31, 2011 at 5:12 PM, Larry Johnson
> wrot
I think we're just playing it, no? :-) Isn't it really really hard
to solve go?
On Mon, Oct 31, 2011 at 5:12 PM, Larry Johnson
wrote:
> Damn, Damn, Damn. I'm very new to clojure, and joined this forum just a few
> weeks ago. The fact that there are sessions at Clojure Conj on two of my
> pa
Damn, Damn, Damn. I'm very new to clojure, and joined this forum just a
few weeks ago. The fact that there are sessions at Clojure Conj on two of
my passions (Go and Literate Programming), and that I'm unable to attend,
frustrates me to no end.
I assume that the session on Go refers to the Asia
Yes, the Sonatype repositories have every Clojure development snapshot
since 1.3.
-Stuart Sierra
clojure.com
--
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 membe
Managing Java/Clojure libraries is usually handled by a dedicated tool like
Maven or Leiningen.
Leiningen is an easy-to-use tool designed specifically for Clojure:
https://github.com/technomancy/leiningen
-Stuart Sierra
http://clojure.com/
--
You received this message because you are subscribe
Can someone add me (hunter.hutchinson) to:
* Clojurescript
* Go
* Pallet
* D3 & Clojurescript
* The web & Clojure
Thanks!
On Oct 31, 7:36 am, Fogus wrote:
> I've added everyone to this thread as an editor of the spreadsheet.
> Please feel free to add yourself and your sessions at your leisure.
Can anyone give me some basic example which contained nested quotes
and unquotes? with explanation at each step!
--
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 mem
I am from java Background. We say Homoiconicity in Clojure (Lisp).
Code is data and data is code. I read various blogs on it, still not
clear, Can you give me some example?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send em
Yes, I am interested. Wanna get some practical experience in clojure.
Cheers!
Vikrant Behal
+91 8884963403
P Please do not print this email unless it is absolutely necessary.
Spread environmental awareness.
On Mon, Oct 31, 2011 at 12:02 AM, Dennis Haupt wrote:
> -BEGIN PGP SIGNED MESSAG
Ok, I've installed clojure 1.3 without any problems...
So, to install any libraries, what are the step ???
Just download and put it in the path and in the dependence of the
project ???
I'm sorry for this so stupid question, but I can't find answer on
internet...
On Oct 30, 4:22 pm, Stuart Sierra
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
if you *really* make zero assumptions, every second call has to be a
protocol/interface call. *i know what i am, so no assumption* ->
*interface call* -> *repeat*
i think "no assumptions" should be "make no assumptions about the
internals of what you
No, I'm looking for a copy meta routine.
The mysterious defmeta macro does this, in one call.
(defmeta a map)
(= (meta (var a)) (meta map))
On Oct 31, 4:20 pm, Mark Rathwell wrote:
> def already adds metadata on the symbol as metadata on the var. Did
> you need more than this (below)?
>
> use
On Mon, Oct 31, 2011 at 8:06 AM, Timothy Baldridge wrote:
> I'd like to second what Bill said...I don't really have the time to
> setup a clojure build process to test out the 1.4 Alphas/Betas, but if
> there was a way for me to get to it via lein...I would just target 1.4
> for all my day-to-day
def already adds metadata on the symbol as metadata on the var. Did
you need more than this (below)?
user> (def ^{:doc "foo"} x [1 2 3])
#"user/x
user> (meta (var x))
{:ns #, :name x, :doc "foo", :line 1, :file "NO_SOURCE_FILE"}
user> (doc x)
-
user/x
foo
nil
user> (d
Okay, then I need a hand with something then. I'm trying to come up
with a macro that does the following:
(defmacro def-with-meta ...) -> You supply this
(def-with-meta symbol init)
(= (meta (var symbol)) (meta init)) -> True
Any suggestions folks?
Sean Devlin
On Oct 31, 2:59 pm, Mark Rathwe
On Oct 31, 2011, at 2:03 PM, Timothy Baldridge wrote:
> This is what Clojure excels at...de-coupling, or as Rich put it in his
> recent talk "Simple made Easy": don't assume things about your code.
> Don't assume that all models will always fit into the concept of a
> polygon...don't assume that y
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
this is my opinion as well:
adding a layer of abstraction at a later point in time is much more
difficult than removing one that is just delegating calls, so it often
pays off to add one in the beginning just in case. i decided to just
skip that becaus
> However I would recommend against
> "everything is a polygon" route. Once again, for a simple game, this
> may be fine, but you're now making an assumption: "everything is a
> polygon". What if you want a simple laser point-to-point entity? What
> if you want a planet that is represented by a cir
ClojureCLR survey closing tonight at midnight my time (Central
Daylight Time).
On Oct 26, 12:22 pm, dmiller wrote:
> Keep those cards and letters coming.
>
> Just a reminder that time is running out on participating in the
> ClojureCLRsurvey.
>
> I put in a BOF request for ClojureCLR at the conj
thanks for sharing, this looks extremely useful.
On Mon, Oct 31, 2011 at 11:43 AM, dennis wrote:
> Clojure-control is a clojure DSL for system admin and deployment with
> many remote machines via ssh/rsync.It is on github:
> https://github.com/killme2008/clojure-control
>
> 0.2.1 has been release
As far as the mutable state goes, yes, that's probably a better route,
at least for a simple game. However I would recommend against
"everything is a polygon" route. Once again, for a simple game, this
may be fine, but you're now making an assumption: "everything is a
polygon". What if you want a s
It uses (meta (var common/basic-logger)).
On Mon, Oct 31, 2011 at 2:28 PM, Sean Devlin wrote:
> I'm a bit confused by what the doc macro is doing. Doesn't it simply
> work of the metadata of what is passed to it?
>
> I try this at the REPL:
>
> user=> (doc common/basic-logger)
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
no need for "IRender" since everything has a java.awt.polygon. i just
draw it. in a sense, the polygon is my IRender and it's data is the
implementation.
i was thinking about using a simple type (:asteroid, :ship, :bullet)
for each entity and pick an
I'm a bit confused by what the doc macro is doing. Doesn't it simply
work of the metadata of what is passed to it?
I try this at the REPL:
user=> (doc common/basic-logger)
-
decorators.common/basic-logger
nil
nil
nil
For the following item:
user=> (meta common/basic-l
> In the OOP languages, entity systems seem to be all the rage. I
> suggest stealing ideas from there if you can.
In this same vein, I'd recommend thinking about the following approach:
First, read up on reify and protocols. Next, create protocols for the
main areas of your engine. Perhaps start
> for example, right now i have a record called gameentity which
> contains a position, the current health, speed, the polygon
> representation which should be rendered and a few more things - but
> haven't figured out yet where to put the logic and how to apply it so
> that everything is easily ex
On Sat, Oct 29, 2011 at 7:02 AM, David McNeil wrote:
> A couple of more thoughts on this.
>
> On Oct 28, 12:46 pm, Howard Lewis Ship wrote:
>> (extend-type cascade.Asset
>> ToAttributeValueString
>> (to-attribute-value-string [asset] (:client-url asset)))
>
> The reason this is probably not w
Thanks so much for your help!!! I'm so glad you had the time to
respond to my newbie question.
And as if you read my mind as I was going through the SICP lecture and
referencing chapter two in Manning's Joy of Clojure book I was
wondering how to turn this explicit recursive call taken from the
sch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
i'm not looking for people to split the work and get things done
faster, i'm looking for people to think about how and why things
should be done.
for example, right now i have a record called gameentity which
contains a position, the current health, s
Clojure-control is a clojure DSL for system admin and deployment with
many remote machines via ssh/rsync.It is on github:
https://github.com/killme2008/clojure-control
0.2.1 has been released,main highlights:
First,A shell command DSL by sunny87,for example:
(cd "/home/login"
(run "ls")
(
That is an side effect of changes that were made to naming/location of
the assemblies output from compilation.
Whether it's a feature or bug depends on how hard it is to change. :)
Issue posted.
-David
On Oct 29, 6:58 am, Ian wrote:
> Hi all,
>
> In Clojure 1.2.0, if I run a command like:
>
I'd like to second what Bill said...I don't really have the time to
setup a clojure build process to test out the 1.4 Alphas/Betas, but if
there was a way for me to get to it via lein...I would just target 1.4
for all my day-to-day development.
Timothy
On Mon, Oct 31, 2011 at 10:00 AM, Joel Gluth
Worth pointing out that the Clojure team don't have to do this
necessarily - a motivated person could set up a CI server that
monitors pre-release SNAPSHOTS on one side, and takes code
snippets/lein projects/gists/test-is packages on the other?
On Sun, Oct 30, 2011 at 4:04 PM, Colin Yates wrote:
> Unfortunately, I'm not sure a game as small as asteroids would
> work well to have multiple people working on it. Simply because each
> part of the game (graphics, physics, gui, etc.) are all so small, that
> multiple developers would just step on each other's toes.
What we need is a Clojure gam
I once wrote a test game engine that handled used a one-agent per
entity approach, and the idea was that it "should" be close to
linearly scale-able. It actually worked quite well. I think in the end
I tested it with more than 10,000 entities flying in a
flocking/following pattern, and the engine r
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
one agent per entity? i'd have done an agent for the whole world and
apply functions like "apply-collision" and "apply-shot-fired" to it
Am 31.10.2011 14:46, schrieb Timothy Baldridge:
> Haha! I forgot about Java2d... Yeah, that would work just fine.
On 10/28/2011 09:42 AM, AndyK wrote:
> I am setting up tests with clojure.test that are driven by a CSV where
> each line represents one test case. Right now, there is a single
> deftest function that runs all the assertions. That's ok but creates
> reporting like 1 test was run with 1000s of asser
Haha! I forgot about Java2d... Yeah, that would work just fine. No,
Clojure does not support remote agents. But agents can really help in
a system like this to express objects as distinct entities. That is,
you have one object per item on the screen, and then each object
basically can "live" on its
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
isn't openGL a bit of overkill (we can just use java2d), or do you
want to add a renderer doing all sorts of awesome stuff which totally
contradicts the white-polygon-on-black-background graphics? might give
the game a pretty unique look :)
Am 31.10.2
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
seems to be pretty similar to asteriods. we can just do an engine that
can do both. at the same time.
does clojure support remote agents?
Am 31.10.2011 12:41, schrieb Timothy Baldridge:
> I'd be up for something like this. I have a fair amount of cl
I'd be up for something like this. I have a fair amount of clojure
experience, and I've done quite allot of work with OpenGL in other
languages, so this actually sounds fun! Another option to consider, is
the old DOS version of SpaceWar!
http://www.youtube.com/watch?v=yY5qHe2VadA
I like the idea
I've added everyone to this thread as an editor of the spreadsheet.
Please feel free to add yourself and your sessions at your leisure.
--
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
Can someone add me (michael.campbell) to:
The web and Clojure and
Java Dependency Injection Using Clojure
Many thanks.
--
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
61 matches
Mail list logo