On Dec 13, 5:24 am, ajay gopalakrishnan ajgop...@gmail.com wrote:
It tried the following in REPL and got no error. Personally, I feel that I
should get an error because calling square on strings is wrong in both
cases.
Is there a way out of this in Clojure?
I hope you don't mind me bumping
I was trying to build clojure clr.
As given in the instructions, I have unloaded the Tests project.
During compilation of the Coljure.Compile project, I see the following
error on the Output window
C:\sriram\work\clojure\clojure-clr\Clojure\Clojure.Compile\bin\Debug
\Clojure.Compile.exe
Hi,
Am 23.12.2009 um 18:59 schrieb Phil Hagelberg:
http://www.google.com/search?hl=enq=site:github.com+clojure
Also noteworthy: all Clojure projects on Github sorted by most recent
activity:
http://github.com/languages/Clojure/updated
That weeds out inactive projects.
Then you
Clojure solves this problem in a very simple way: Not at all.
Two Reasons:
There is no way to create a class with private members in clojure.
'private members' exist because of lexical scoping and don't require
special constructs like 'private' etc. (javascript has 'private
members' too because
I am also curious about this. Apologies, possibly naive question
ahead :)
My background is in C++. By choosing to work with immutable values
(i.e. with a lot of consts), I found that I was able to avoid most of
explicit memory management, pointers etc. Exceptions were:
(a) when interfacing
I'm having trouble with figuring out something. First, to get the
first element of a sequence so that (pred element) is false, you do
(first (drop-while pred sequence)). This is lazy, and stops
immediately when the element is found.
Now, I want to get the element *right before* the element
On Thu, Dec 24, 2009 at 1:24 PM, samppi rbysam...@gmail.com wrote:
I'm having trouble with figuring out something. First, to get the
first element of a sequence so that (pred element) is false, you do
(first (drop-while pred sequence)). This is lazy, and stops
immediately when the element is
We could define a fn called take-until
(defn take-until
[pred coll]
(take-while (complement pred) coll))
And get the last entry of that
user=(last (take-until odd? [2 4 6 8 9 10 11]))
8
It's based on take-while, so it's lazy.
Sean
On Dec 24, 1:34 pm, Chouser chou...@gmail.com wrote:
On
Well; this is a fun tradition after all and number of participants is
huge! (All failed of-course :) )
Is short idea is:
Having the choice of custom separators.
This has been done in Clojure to some extend for Vectors and Sets.
What if we could choose a custom separator in out macros? For
So If I look ridiculous, I apologize in advance.
Don't worry, you'd be in good company anyway :)
Why don't you implement it and try it? It should be fairly easy to create a
translator that would turn any of those proposals into regular clojure
before compiling. Try it out for a while, see if
On Thu, Dec 24, 2009 at 12:58 PM, kaveh_shahbazian
kaveh.shahbaz...@gmail.com wrote:
This has been done in Clojure to some extend for Vectors and Sets.
What if we could choose a custom separator in out macros? For example
`begin and `end? This way one can write code in more common flavors:
That's great too; I think I'll use this instead, since it doesn't
involve unpacking lists. Thanks a lot, both of you.
On Dec 24, 11:39 am, Sean Devlin francoisdev...@gmail.com wrote:
We could define a fn called take-until
(defn take-until
[pred coll]
(take-while (complement pred) coll))
On Dec 24, 7:08 am, Mike Douglas mike.doug...@gmail.com wrote:
Previously:
Caused by: java.lang.Exception: Assert failed: (= % x)
With your patch, assert does not include x in its message anymore in
case s is not given. Also, as a non-native speaker I find the phrase
failed when somewhat
Lisp syntax needs some fixing ?
It's not April 1st yet or did I hibernate through winter suddenly ?
I'll run to the window to see if my tulips
are out
:)))
Luc
Sent from my iPod
On Dec 24, 2009, at 1:58 PM, kaveh_shahbazian kaveh.shahbaz...@gmail.com
wrote:
Well; this is a fun
Thanks to all!
I think I should use another (more fun or irrelevant - based on one's
eye-line!) example for custom form separators; something like this:
(switch (choice)
{my-choice
(having-fun)
}
{(your-choice)
(being-pragmatic)
}
{(their-choice)
Wow, Google only gets nine hits on MSB3075. One, possibly relevant,
solved by moving to admin privilege. One, yours. Others, not
relevant. Thus ends my error-resolution attempt!
From the message, I'm assuming .net 3.5. What flavor of VS?
-David
On Dec 23, 9:21 pm, sriram p c
On a related note, can someone explain the following...
I can define a function 'p1':
user= (defn p1 [x] (+ 1 x))
#'user/p1
user= (p1 44)
45
and then shadow it within the binding construct:
user= (binding [p1 (fn [y] (+ 2 y))] (p1 44))
46
but, I can't seem to do this with the 'inc' function:
but, I can't seem to do this with the 'inc' function:
user= (binding [inc (fn [y] (+ 2 y))] (inc 44))
45
Why doesn't this work?
Because inc is inlined, and thus isn't mentioned when your binding
occurs.
(defn inc
Returns a number one greater than num.
{:inline (fn [x] `(.
On Dec 24, 6:01 pm, Richard Newman holyg...@gmail.com wrote:
but, I can't seem to do this with the 'inc' function:
user= (binding [inc (fn [y] (+ 2 y))] (inc 44))
45
Why doesn't this work?
Because inc is inlined, and thus isn't mentioned when your binding
occurs.
Thanks
Help-About says Microsoft Visual Studio 2008 Version 9.0.30729.1 SP
OS is Windows 7 Home Premium 6.1
There is a warning 'Project file contains ToolsVersion=4.0, which is
not supported by this version of MSBuild. Treating the project as if
it had ToolsVersion=3.5'.. I don't know if it has
A slight modification, which I think avoids counting each collection
twice:
(defn append-val [val colls]
(let [lengths (map count colls)
maxlen (apply max lengths)]
(map #(concat %1 (repeat (- maxlen %2) val)) colls lengths)
)
)
On Dec 23, 10:30 am, kyle smith
21 matches
Mail list logo