core.unify v0.5.2 Release Notes
===
core.unify is a Clojure contrib library providing the following
features:
* Factory functions for constructing unification binding, subst, and
unification functions, with or without occurs checking
* Packaged functions for unificati
Macro expansion time is not run time, is it? Thanks. :-)
On Jan 8, 2:59 pm, Michael Fogus wrote:
> The names in the first let only exist at compile time and do not exist when
> the expanded form eventually runs.
--
You received this message because you are subscribed to the Google
Groups "Clo
Cedric - thanks. I'm new to Clojure and after posting this realized that I
could/should use one of the do* approaches. I ended up using doseq and it
worked great.
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
Yes, seq? works. Thanks for the help!
On Sun, Jan 8, 2012 at 9:03 PM, Cedric Greevey wrote:
> On Sun, Jan 8, 2012 at 10:30 AM, Samuel Lê wrote:
> > Hi and Happy New Year to all the Clojure mailing list,
> >
> > I am am having some trouble with the two classes Cons and PersistentList:
> >
> > us
Apologies, there was a typo in my original email, what I meant to say
was that:
(js/alert (keyword? :foobar))
output result => false
was compiled to =>
alert.call(null,cljs.core.keyword_QMARK_.call(null," 'foobar"));
(js/alert (string? :foobar))
output result => true
was compiled to =>
alert.call
For some reason I never saw either my first post nor your answer to
it. It was my first post to the group, so I thought maybe it had been
swallowed up (maybe the moderators had to approve my membership before
I could post or something), so after waiting a day, I posted again.
And...not 5 minutes
For some reason I never saw either my first post nor your answer to it. It
was my first post to the group, so I thought maybe it had been swallowed up
(maybe the moderators had to approve my membership before I could post or
something), so after waiting a day, I posted again.
And...not 5 minutes
>Is this a bug in the conversion of the clojure keyword to the>JavaScript
>object?
I think there's probably an issue with string conversion in your
program. In ClojureScript keywords are not separate objects. Instead
they are simply strings that start with a bizarre unicode character.
Example fro
I want to generate rules with constant and/or functions producing parts of
the rules:
(defn rulemaker []
(str "SCOPE " global-constant ";" (some-global-function) ";"))
which could be called with
(with-super-closure model-in-file-reference
(rulemaker))
Is there a way to make some "tempora
On Sun, Jan 8, 2012 at 10:48 PM, Peter Taoussanis wrote:
> I also get the impression that Enlive itself seems to be quite widely
> misunderstood and consequently underrated.
>
> Haven't had a chance to take a serious look at this yet myself (I
> will!), but just wanted to throw my support behind t
On Sun, Jan 8, 2012 at 8:26 PM, jayvandal wrote:
> I have been able to access tables in mysql, but not able to add
> records. I look at the examples fo "fruit so I created a lein named
> fruitI made th project file as the mysql project file. I copied the
> database instructions as in mysql. I add
On Mon, Jan 9, 2012 at 8:00 AM, Fogus wrote:
> core.unify v0.5.2 Release Notes
> ===
>
> core.unify is a Clojure contrib library providing the following
> features:
>
> * Factory functions for constructing unification binding, subst, and
> unification functions, with or
On Sun, Jan 8, 2012 at 4:11 PM, Samuel Lê wrote:
> Yes, seq? works. Thanks for the help!
You're welcome.
--
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 a
On Mon, Jan 9, 2012 at 7:48 AM, Matthew Giannini
wrote:
> Cedric - thanks. I'm new to Clojure and after posting this realized that I
> could/should use one of the do* approaches. I ended up using doseq and it
> worked great.
>
> Thanks.
You're welcome.
--
You received this message because you a
On Mon, Jan 9, 2012 at 10:36 AM, Linus Ericsson
wrote:
> I want to generate rules with constant and/or functions producing parts of
> the rules:
>
> (defn rulemaker []
> (str "SCOPE " global-constant ";" (some-global-function) ";"))
>
> which could be called with
>
> (with-super-closure model-i
Hi Shantanu,
#1 is a bug.
#2 is not possible because `import` doesn't exist in ClojureScript: it
doesn't differentiate between host classes and ClojureScript code.
Protocols and types should be accessible with normal `require` in
ClojureScript.
#3 seems unlikely to be implemented. ClojureScri
On Mon, Jan 9, 2012 at 1:18 PM, Stuart Sierra
wrote:
> #3 seems unlikely to be implemented. ClojureScript doesn't have Vars, and it
> doesn't have threads, so there's not much for `binding` to do. I could see
> `with-redefs` being supported, however.
Actually, the lack of threads just simplifies
> Yes, but what exactly are these "unification binding, subst, and
> unification functions"?
This is information that seems a bit odd to include in a set of
release notes, but I suppose a link to where such information could be
found is warranted.
> In other words, I'm a developer. I have some co
Tassilo Horn writes:
> One thing that really made the programming extremely hard was that I
> don't get any backtraces if an exception occurs inside a `run'. For
> example, I get this in SLIME with M-x clojure-jack-in RET.
> (defn wrongo [a b] false) ;; intentionally broken
> ;=> #'
On Mon, Jan 9, 2012 at 1:45 PM, Michael Fogus wrote:
>> Yes, but what exactly are these "unification binding, subst, and
>> unification functions"?
>
> This is information that seems a bit odd to include in a set of
> release notes, but I suppose a link to where such information could be
> found i
On Mon, Jan 9, 2012 at 11:00 AM, Cedric Greevey wrote:
> On Mon, Jan 9, 2012 at 1:45 PM, Michael Fogus wrote:
>> Google also helps too. :-)
> Not really, not with a single fairly generic word like "unification".
#1 result: wikipedia, which has a disambiguation page with the second entry:
"Unifi
> Not really, not with a single fairly generic word like "unification".
In the amount of time that you spent lecturing me on good library
release note practices you could have learned what unification was,
read the code, and decided if it filled any of your needs.
Hint. My library has very littl
> #3 seems unlikely to be implemented. ClojureScript doesn't have Vars, and
> it doesn't have threads, so there's not much for `binding` to do. I could
> see `with-redefs` being supported, however.
Hi Stuart,
Thanks for the pointers. So, I am trying to understand what is the
canonical way to writ
First of all, thank you for your work!
But actually I agree with Cedric. He definitely has a point. I'd love to
try unify, but I have no idea where to begin! Having short description and
some simple use cases in announce would be great.
Please do not take this as a critisism, but rather as a w
On Mon, Jan 9, 2012 at 2:08 PM, Sean Corfield wrote:
> On Mon, Jan 9, 2012 at 11:00 AM, Cedric Greevey wrote:
>> On Mon, Jan 9, 2012 at 1:45 PM, Michael Fogus wrote:
>>> Google also helps too. :-)
>> Not really, not with a single fairly generic word like "unification".
>
> #1 result: wikipedia,
> unify, but I have no idea where to begin! Having short description and some
> simple use cases in announce would be great.
I do not disagree. Those elements will be in place by the 1.0.0
release (as listed in the "planned" section). In the meantime,
patches welcomed.
--
You received this mess
On Mon, Jan 9, 2012 at 2:16 PM, Michael Fogus wrote:
>> Not really, not with a single fairly generic word like "unification".
>
> In the amount of time that you spent lecturing me on good library
> release note practices you could have learned what unification was,
> read the code, and decided if
On Mon, Jan 9, 2012 at 2:20 PM, Shantanu Kumar wrote:
>> #3 seems unlikely to be implemented. ClojureScript doesn't have Vars, and
>> it doesn't have threads, so there's not much for `binding` to do. I could
>> see `with-redefs` being supported, however.
>
> Hi Stuart,
>
> Thanks for the pointers.
I would like to have NodeList be seqable. Please file a ticket with a
patch. Perhaps someone else can shed light on why Opera doesn't work.
-S
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.c
On Mon, Jan 9, 2012 at 3:20 PM, Cedric Greevey wrote:
> Talk about completely missing the point.
I had no idea what core.unify would be used for either. However, the
email included a link to the github page, and the Readme on the github
page included a link called "more information" and several
Phil Hagelberg writes:
Hi Phil,
>> One thing that really made the programming extremely hard was that I
>> don't get any backtraces if an exception occurs inside a `run'. For
>> example, I get this in SLIME with M-x clojure-jack-in RET.
>
>> (defn wrongo [a b] false) ;; intentionally
Hello,
I'm new to functional programming and Clojure and I'm trying to
translate a simple java program into Clojure. My program must build
from 2 input lists (stored in a vector) 2 output lists (also stored in
a vector) which have same number of elements as input lists for both
output lists. The e
Ok, I've got a couple thousand lines of Clojure under my belt, but
this has me stumped, unless it's a compiler etc. issue. If I'm
missing something dumb, what is it, please?
I have a function that is failing a not-nil precondition. Here are
four versions of the same test; only #3 works correctly
On Mon, Jan 9, 2012 at 3:43 PM, Jay Fields wrote:
> On Mon, Jan 9, 2012 at 3:20 PM, Cedric Greevey wrote:
>
>> Talk about completely missing the point.
>
> I had no idea what core.unify would be used for either. However, the
> email included a link to the github page, and the Readme on the github
On Mon, Jan 9, 2012 at 12:53 PM, Tom Chappell wrote:
> Ok, I've got a couple thousand lines of Clojure under my belt, but
> this has me stumped, unless it's a compiler etc. issue. If I'm
> missing something dumb, what is it, please?
>
> I have a function that is failing a not-nil precondition. H
> You have to pitch people on the potential benefits of downloading your
> library *before* they click the download link for it, or they mostly
> never will.
Sold. I've learned my lesson.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to th
Try to put your :pre entries in a vector, like so:
{:pre [(not= 0 (mp k 0))]}
--
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 pat
The precondition should be a vector of expressions.
(defn foo [x] {:pre [(not (nil? x))]} (* 3 x))
On Jan 9, 2012, at 12:53 PM, Tom Chappell wrote:
> Ok, I've got a couple thousand lines of Clojure under my belt, but
> this has me stumped, unless it's a compiler etc. issue. If I'm
> missing s
Beware that NodeList is often a live collection, so it is probably a good
idea to produce "eager" seq. I use this to convert it to seq:
(defn nodelist-to-seq
"Converts nodelist to (not lazy) seq."
[nl]
(let [result-seq (map #(.item nl %) (range (.length nl)))]
(doall result-seq)))
--
2012/1/9 Nicolas Garcin
> Hello,
>
> I'm new to functional programming and Clojure and I'm trying to
> translate a simple java program into Clojure. My program must build
> from 2 input lists (stored in a vector) 2 output lists (also stored in
> a vector) which have same number of elements as inp
I am running Win Vista.
I create a project with Lein new fruit in C:\projects
I cd to fruit in C:/projects/fruit
I copy code from the mysql project that runs when reading the book table.
This is the project code and the core code to access mysql.
I added code to create the table "fruit" in test
How do you instantiate a (non-static) inner class?
--
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.
binding works just fine in CLJS. That it doesn't work with required "vars"
sounds like a bug.
On Monday, January 9, 2012, Stuart Sierra
wrote:
> Hi Shantanu,
>
> #1 is a bug.
>
> #2 is not possible because `import` doesn't exist in ClojureScript: it
doesn't differentiate between host classes and
Do you see the same issue when working with lazy sequences? We definitely
don't eat exceptions.
On Monday, January 9, 2012, Tassilo Horn wrote:
> Phil Hagelberg writes:
>
> Hi Phil,
>
>>> One thing that really made the programming extremely hard was that I
>>> don't get any backtraces if an exce
The syntax for this is atrocious in Java and the mechanism is in
general rarely useful; I wouldn't be surprised if there's no non-hacky
way to do this in Clojure. fooInstance.new Bar() is the construct
you're talking about, right? My best guess would be that you just use
the inner class's "real" (J
On Mon, Jan 9, 2012 at 8:46 PM, Alan wrote:
> How do you instantiate a (non-static) inner class?
Something like the following?
foo.java:
public class foo
{
public class bar
{
public bar()
{
System.out.println("Made a bar");
}
}
}
and
(import 'foo)
On 1/9/12, Lars Nilsson wrote:
> (foo$bar. (foo.))
Thanks! That works.
Actually this is exactly what I had guessed. But when I tried it, it
wasn't working for me. But it turns out my problem was something
unrelated, and the error message I got wasn't enough to get me to see
where I was wrong.
I bind *print-fn* and it seems to work fine in my snapshot of master
pulled on 12/14.
On Mon, Jan 9, 2012 at 6:16 PM, David Nolen wrote:
> binding works just fine in CLJS. That it doesn't work with required "vars"
> sounds like a bug.
>
> On Monday, January 9, 2012, Stuart Sierra
> wrote:
>> Hi
On Mon, Jan 9, 2012 at 3:43 PM, wrote:
> I run lein repl
> I enter statement"(load "/fruit/core")
You can just do:
(require 'fruit.core)
> I enter statement "(fruit.core/create-fruit)
> I get error message
> ==
>
> user=> (fruit.core/insert-rows-fruit)
> Exception n
Hello there,
I'm writing some code, int my code it does following things (under
Windows):
1. create a sub-process by "(.exec (Runtime/getRuntime) "cmd")" named
"shell"
2. get input-stream, output-stream and err-stream from the shell
object
3. send commands to "shell" by dropping line into the outp
jaime writes:
> Later on I tried to add code that can make this possible but I found
> there's no way to detect if a command requires user's input and thus I
> have to find another way to make it work - but I didn't success and
> have been struggling for a workaround for a long while
>
> anyo
Sorry for all the mistakes I make, but am trying todo something in mysql. In
fruits example how is the mysql database called?
In mysql example the statement is used to call mysql everytime a defn is
called.
===
(sql/with-connection db.
==
Why is this s
On Tue, Jan 10, 2012 at 1:17 AM, Nicolas Garcin
wrote:
> I'm new to functional programming and Clojure and I'm trying to
> translate a simple java program into Clojure. My program must build
> from 2 input lists (stored in a vector) 2 output lists (also stored in
> a vector) which have same number
I guess I cange some things ecauseI don't know what the commands actually
do.
Icopied some ccode fromNakkaya "using mysql with clojure and for some reason
I go that code running. I got to study what I screwed up in your fruit code
and seeif I can understand that.
Thanks
- Original Message -
On Mon, Jan 9, 2012 at 1:56 PM, Linus Ericsson
wrote:
> the last one becomes something like this:
>
> (for [option modified-options action modified-actions]
> (if (= (:name option) (:name option))
> (let [sum (+ (:value action) (:value option))]
> [{:name (:name option) (Math/max
(defrecord Pos [name value]
Object
(toString [this]
(str "")))
(def actions [(Pos. "IBM", -50)
(Pos. "ACCOR", -30);
(Pos. "IBM", -10);
(Pos. "APPLE", -20);
(Pos. "AIRFRANCE", -20)])
(def options [(Pos. "IBM", 55)
(Pos. "ACCOR", 40
Oops.
A possible solution might look something like that...
--
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
fir
Macro expansion time is just before compile time.
--
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.
T
58 matches
Mail list logo