Hi David,
I can only comment on a subset of your post.
Records can be cumbersome to work with during early stages of development,
when
everything is rather volatile (when isn't it?).
You might like to try using maps instead. They are easier to work with when
you are
working out what properties y
Hi Pierre
This looks very cool, I'd love to try it.
The version on clojars is 0.1.0-SNAPSHOT, could you upload 0.1.0?
How do you build it from source? I can't locate a build script.
Thanks,
Ambrose
On Tue, May 3, 2011 at 9:26 PM, Pierre Allix <
pierre.allix.w...@googlemail.com> wrote:
> Hello
Beautiful solution, I got a lot out of it.
Thanks Juha!
--
Ambrose
On Thu, May 5, 2011 at 10:08 PM, Juha Arpiainen wrote:
> (defn add-path [h path]
> (let [dir (butlast path)
>entry (last path)]
>(update-in h dir (fn [x] (if x (conj x entry) [entry])
>
> (defn restore-hierarchy
nt> jark ns load /path/to.clj
>
> and so on ..
>
> The earlier version (0.2) of jark used nailgun as a proof-of-concept
>
> server and client. The current release (0.3) of jark uses Chas
>
> Emerick's nrepl protocol for communication. I hope to rewrite the
>
>
ost] [--port]
> > > client> jark repl
> > > ---
> > > client> jark vm stat
> > > client> jark cp list
> > > server> jark cp add
> > > client> jark package install -p PACKAGE -v VERSION
> > > client> jark ns load /
I just grepped the clojure source code and an interesting use is in walk.clj
https://github.com/clojure/clojure/blob/master/src/clj/clojure/walk.clj#L62
`walk` has flexibility with higher order functions, but identity helps with
the simple
case of just returning the forms elegantly.
I thought it
Thanks for letting us know Meikel. These are similar issues that we have
encountered
with the jark client.
We are planning to rewrite it in Haskell (currently Python), I'm sure there
will be similarities between a potential
VimClojure client.
I have tried to tinker with VimClojure but sadly never
Midje also works well with Maven. Just wrap them in clojure.test/deftest and
you're
good to go.
Some examples:
https://github.com/pallet/stevedore/blob/feature%2Fbatch-impl/test/pallet/stevedore/batch_test.clj
And here are almost identical tests, but with clojure.test/is instead of
Midje.
https:/
As a VimClojure user, the big problem I have with SLIME is the installation
process!
Great stuff, looking forward to trying it out.
Ambrose
--
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
Hi,
The ? is merely a convention used to name predicate functions
(ie. functions that return true or false).
It is not enforced, but clojure.core follows it. It's a good idea to follow
it.
I think ruby has a similar convention.
Thanks,
Ambrose
On Thu, May 19, 2011 at 9:09 PM, octopusgrabbus wro
Hi Maris,
`into` is a useful function for this case.
user>> (into #{} (for [ x (set (range 4))] (* 4 x)))
#{0 4 8 12}
You can use it for lists, maps, vectors.
user>> (into {} '([:a "a"] [:b "b"]))
{:a "a", :b "b"}
user>> (into [] '([:a "a"] [:b "b"]))
[[:a "a"] [:b "b"]]
Thanks,
Ambrose
On Tu
On Tue, May 24, 2011 at 6:40 PM, MarisO wrote:
> Is it possible to use list comprehension to generate a set ?
> For example in scala I can do:
>
> for (i <- (2 to 8).toSet[Int]) yield p(i)
>
>
Does this actually yield a set in Scala?
What is p()? A set constructor?
Thanks,
Ambrose
--
You rece
On Tue, May 24, 2011 at 8:36 PM, Michael Wood wrote:
> On 24 May 2011 10:43, David Jagoe wrote:
> > Are you in Nigeria?
> >
> > Anyone else on this list in Africa?
>
> Yes
>
>
> http://maps.google.com/maps/ms?ie=UTF8&oe=UTF8&msa=0&msid=202393302624302710321.00045972a1deb8de0d96b&ll=-19.47695,23.
On Wed, May 25, 2011 at 12:35 AM, Michael Wood wrote:
>
> I'm not entirely sure. I figured it out >2 years ago, but I've
> forgotten now. For me there's an Edit button on the top left. Do you
> have that? Does it allow you to add an entry if you click on it?
>
Ah I got it. You click Edit then
On Wed, May 25, 2011 at 12:20 AM, Mark Engelberg
wrote:
> Scala's approach to comprehensions is to automatically produce the
> same type of collection that is used first in your comprehension.
> Clojure's approach is to always produce a lazy sequence which can then
> be "poured" into the collectio
On Tue, May 24, 2011 at 8:37 PM, Ken Wesson wrote:
>
> Amazingly, one thing I didn't see suggested was any variation on the theme
> of
>
> (in occasionally-called function)
>
> (if (zero? (rand-int 100)) (System/exit 127) (whatever should go here))
>
> Nothing, and I mean NOTHING, is harder to
On Wed, May 25, 2011 at 12:55 AM, Alex Robbins <
alexander.j.robb...@gmail.com> wrote:
> What is the difference between
> (into #{} (for x..))
> and
> (set (for x ..))
> Is one preferred?
>
>
I don't think one is preferred over the other in general.
Personally I prefer into, I find it gen
Hi Zlaja,
I'm no maven expert but I'll try and point you in the right direction.
See the clojure-maven-plugin docs here:
https://github.com/talios/clojure-maven-plugin
You should be able to add source folders to the classpath by using the
element inside the plugin declaration:
com.theoryinp
On Wed, May 25, 2011 at 7:27 PM, Zlatko Josic wrote:
> Very good nose :) That was the problem. It works fine now.
>
> Thank you
>
>
Great, my pleasure.
Ambrose
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo
On Fri, May 27, 2011 at 6:31 PM, Wolodja Wentland wrote:
> On Thu, May 26, 2011 at 20:37 -0700, J.R. Garcia wrote:
> > I compiled a new version of emacs from source and started it up.
> > clojure-jack-in just worked flawlessly. This is stupid simple! Thanks
> > for your hard work! It's much appre
Hi Finn,
On Tue, May 31, 2011 at 4:19 PM, finbeu wrote:
> I would like to build a facade in clojure and
> provide a jar file so that this clojure facade can be easily used by
> java developers that do not know anything at all about clojure
> (they're scared to death when I show them clojure code
Hi,
I'm playing around with the latest commit on core.logic with Clojure 1.2.1.
There's a snippet of minikanren in the paper "Relational Programming in
miniKanren: Techniques, Applications, and Implementations"
that I'm having trouble translating.
(Page 13, http://pqdtopen.proquest.com/#abstract
Whoops, I forgot to translate the literal list syntax to [] vector syntax.
user=> (run 2 [q]
(exist [x y z]
(conde
((== [x y z x] q))
((== [z y x z] q)
([_.0 _.1 _.2 _.0] [_.0 _.1 _.2 _.0])
Still puzzled at the semantics
Hi Manoj,
On Wed, Jun 1, 2011 at 12:35 PM, mmwaikar wrote:
> Hi,
>
> I've to use clojure.contrib.sql's insert-records fn.
>
> Usage: (insert-records table & records)
>
> Inserts records into a table. records are maps from strings or
> keywords (identifying columns) to values.
>
> So, for ex. thi
Hi Mohan,
If you are exploring the Clojure landscape may I recommend Clojure Atlas.
http://www.clojureatlas.com/org.clojure:clojure:1.2.0?guest=t#ds/maps
The core functions provided with Clojure are grouped by concept. Just type
a new subject into the search box.
If you are trying to find a par
On Wed, Jun 1, 2011 at 7:50 PM, Ken Wesson wrote:
> On Wed, Jun 1, 2011 at 7:44 AM, Ambrose Bonnaire-Sergeant
> wrote:
> > Hi Mohan,
> > If you are exploring the Clojure landscape may I recommend Clojure Atlas.
> > http://www.clojureatlas.com/org.clojure:clojure:1.2.0
On Wed, Jun 1, 2011 at 9:09 PM, Ken Wesson wrote:
> On Wed, Jun 1, 2011 at 8:33 AM, Meikel Brandmeyer wrote:
> >
> > Am Mittwoch, 1. Juni 2011 13:50:15 UTC+2 schrieb Ken Wesson:
> >>
> >> Isn't that site behind a paywall?
> >
> > And?
>
> And, it's a bit of a bait-and-switch for someone to sugge
On Mon, Jun 6, 2011 at 3:46 AM, Bhinderwala, Shoeb <
sabhinderw...@wellington.com> wrote:
>
> Exception in thread "main" java.lang.IllegalArgumentException: No value
> supplied for key: 4005 (NO_SOURCE_FILE:1)
>
Might be a coincidence, isn't the swank port 4005?
Ambrose
--
You received this me
Hi David,
any? would be redundant and less general than some, if I am not mistaken.
Compare the docstrings for the hypothetical "any?".
(some p coll)
Returns the *first logical true value* of (pred x) for any x in coll,
else *nil*.
(any? p coll)
Returns *true* if (pred x) is logical true for a
Yes that is correct. These forms are equivalent:
(defn login-page [] ...)
(def login-page (fn [] ))
Thanks,
Ambrose
On Wed, Jun 15, 2011 at 1:51 AM, octopusgrabbus wrote:
> In the following code (from Brian Carper's cow-blog)
>
> (defn login-page
> "Page to let an admin log in."
> []
>
as the OP when reading through docs not too
> long ago.
>
> +1 for adding a pointer to "some" in the docstring of "not-any?"
>
> -kb
>
> On Tue, Jun 14, 2011 at 11:29 AM, Ambrose Bonnaire-Sergeant <
> abonnaireserge...@gmail.com> wrote:
>
>&g
`any?`s favor.
`some`
returns nil (falsy) on "failure"
else truthy
`any?`
returns false (falsy) on "failure"
else true (truthy)
.. defining "failure" as all (pred x) in coll being falsy.
Thanks,
Ambrose
-Patrick
>
> On Jun 14, 9:00 pm, Ken Wesson wro
Could someone add this as a Jira ticket or similar to be reviewed?
Ambrose
On Wed, Jun 15, 2011 at 2:43 AM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:
> Inspired by "seq"/"empty?" docstrings.
>
> not-any?
>
> Returns false if (
Hi cmn,
Cake manages your dependencies via maven, you
shouldn't need to worry about classpaths or local jars.
Do you have a project.clj file in your project root? Can you
post it here?
Thanks,
Ambrose
On Wed, Jun 15, 2011 at 10:57 PM, octopusgrabbus
wrote:
> I have clojure-1.2.1.jar. It is in
ependencies the maven repositories and then caches it
internally. This is usually simpler than manually downloading and managing
your
dependencies, possibly even for a "hello world".
>
> On Jun 15, 11:06 am, Ambrose Bonnaire-Sergeant
> wrote:
> > Hi cmn,
> >
> &
Where's the "Most Innovative of the last decade" button?
:)
--
Ambrose
On Thu, Jun 16, 2011 at 8:58 PM, Stuart Sierra
wrote:
> Do you think Clojure is the Most Innovative Java Technology of 2011?
>
> Vote here: http://vote.jax-awards.com/
>
> --
> You received this message because you are subs
What is the Java source for setting up the Window object?
Ambrose
On Fri, Jun 24, 2011 at 1:24 AM, Antonio Recio wrote:
> I have tried to translate an example of vaadin in java to clojure. But I
> get errors.
>
> This is the java code:
> Panel panel = new Panel("Split Panels Inside This Panel")
Does Window's add() method take multiple arguments? It looks like
you're passing 4 arguments to it.
Also (tree Tree. "Menu")
should be (tree (Tree. "Menu"))
Same with (vsplit VerticalSplitPanel.
(add (Label. "upper panel") (Button. "lower panel"
Could you post
I've never used it, but you would use amap instead of map in this situation,
because it is a Java array.
http://clojuredocs.org/clojure_core/clojure.core/amap
Ambrose
On Mon, Jun 27, 2011 at 1:08 PM, Linus Ericsson <
oscarlinuserics...@gmail.com> wrote:
> Maybe
>
> (map #(.addItem tree (.toStri
If you want to play around with it in a REPL, you need to "require" or "use"
the namespace
you want, and then you will have access to the functions in that namespace.
There is an example of this on the project page (see Synopsis):
https://github.com/mmcgrana/clj-json
Ambrose
On Mon, Jun 27, 201
I'm interested too. Just sent in my CA from Australia, so hopefully
shouldn't be too long.
I think I looked through the essays briefly when this was first posted,
I coincidentally
am working through the The Art of the Metaobject Protocol right now.
+1 on an update please :)
Ambrose
On Thu, Jul 7
I've found that (some of) Clojure's advanced features are best taught in
terms of simpler ideas
that most programmers would be familiar with.
For example, excuse the plug, I motivated multimethods by relating them to
simple conditionals
like "case". I think I succeeded in making MMs just look like
Hi,
On Wed, Jul 13, 2011 at 7:57 PM, Jonathan Fischer Friberg <
odysso...@gmail.com> wrote:
>
> multimethods - since close to every mention of multimethods also involves
> telling how slow they are, these are most often shunned.
>
>
I don't get that impression. MM's seem to be pushed as a "first c
This is a first for me, a Clojure IDE that "just works".
Big thumbs up!
Ambrose
--
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
(I'm frenchy64)
More cool stuff to come, watch this space http://twitter.com/#!/ambrosebs
Ambrose
On Tue, Jul 19, 2011 at 11:50 AM, Devin Walters wrote:
> Thanks David! (And French64 of course)
>
> --
> Devin Walters
>
>
> On Monday, July 18, 2011 at 10:33 PM, Brent Millare wrote:
>
> > Nice,
Hi Meikel,
Excellent feedback, exactly what I need. See replies inline.
On Tue, Jul 19, 2011 at 2:27 PM, Meikel Brandmeyer wrote:
> Hi Ambrose,
>
> I haven't been exposed to logic programming besides the examples David
> posted to the list. I found your tutorial very easy to follow and to read
On Wed, Jul 20, 2011 at 2:40 PM, Tassilo Horn wrote:
> David Nolen writes:
>
> Hi David,
>
> > Ambrose has submitted a patch which I need to go over. Even so, I
> > don't think docstrings are going to help you that much.
>
> It doesn't teach you logic programming, but at least it could explain
>
On Wed, Jul 20, 2011 at 3:34 PM, Tassilo Horn wrote:
>
> > Here's the relevant Jira issue, feel free to voice your opinion.
> >
> > http://dev.clojure.org/jira/browse/LOGIC-10
>
> I had a quick look at your patch but I'm not sure if all of them comply
> with the usual clojure conventions. For exam
Hi Meikel,
On Tue, Jul 19, 2011 at 2:27 PM, Meikel Brandmeyer wrote:
> Hi Ambrose,
>
> I haven't been exposed to logic programming besides the examples David
> posted to the list. I found your tutorial very easy to follow and to read. I
> have two minor nit-picks.
>
>
>1. I understand, that
>[['f :- Integer]]
>Integer)
> (== q true))
> ;=> ()
> The type association ['g :- Integer] does not occur in the environment
> [ ['f :- Integer] ], so geto succeeds.
>
> Read "so geto fails" instead? since the res
Hi Meikel,
On Thu, Jul 21, 2011 at 2:19 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am Mittwoch, 20. Juli 2011 15:28:58 UTC+2 schrieb Ambrose
> Bonnaire-Sergeant:
>
>> I also dropped the whole walkthrough with typedo, and replaced it with an
>> interesting (but much e
On Thu, Jul 21, 2011 at 9:54 PM, David Nolen wrote:
> On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer wrote:
>
>> Hi,
>>
>> Am Donnerstag, 21. Juli 2011 15:24:49 UTC+2 schrieb Ambrose
>> Bonnaire-Sergeant:
>>
>>
>> > Ah, but is mapsto?
On Thu, Jul 21, 2011 at 10:27 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am Donnerstag, 21. Juli 2011 16:06:23 UTC+2 schrieb Ambrose
> Bonnaire-Sergeant:
>
> >> You do not need to look at the surrounding code to know what (geto x y
> z) does.
> >> It establishe
On Mon, Jul 25, 2011 at 12:14 PM, Ken Wesson wrote:
>
> How about making the main suggestion be clooj instead, with emacs,
> eclipse, netbeans in the list of alternative options? :)
>
>
+1! I'd be embarrassed trying to sell clojure to a newbie with anything
else.
Clean and simple, and not a toy.
Yep, Github URLs suck like that.
FWIW this is probably close what you're looking for:
https://github.com/arthuredelstein/clooj/downloads
Ambrose
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroup
Sweet!
--
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 from this group, send email t
Hi Sam,
On Tue, Aug 9, 2011 at 3:50 PM, Sam Aaron wrote:
>
>
> Do you happen to have any simple descriptions/examples of where and how we
> might use this stuff in our daily programming repertoires?
Think of pattern matching sugar for nested conditionals.
For example
(match [x y]
[1 0
Hi BG,
On Tue, Aug 9, 2011 at 5:43 PM, Baishampayan Ghose wrote:
> A sample implementation of the `defm` macro used above could be
> something like this (UNTESTED!) -
> *snip*
`defm` is already at `match.core/defmatch`. Pretty neat :)
> I personally believe that David and Ambrose are doing so
For those browsing the source, I'll give a quick run through of what's going
on.
1. A "pattern matrix" is built using the given variables and pattern rows. A
Pattern row is a pair of matches and a result.
Example:
match.core=> (build-matrix [x y]
[1 0] 0
On Tue, Aug 9, 2011 at 7:39 PM, David Nolen wrote:
> Think about code for dealing with macros.
>
> (defmacro foo [& forms]
> (match [forms]
> [(a [x] :else & rest)] ...
> [(a [x b] :else & rest)] ...))
>
>
Wow, that is cool!
--
You received this message because you are subscribed to
Hi James,
On Wed, Aug 10, 2011 at 5:43 PM, James Sofra wrote:
>
> Just to clarify, you can extend the matching to new types but the match is
> 'closed' in the sense that unlike mutimethods you can't add additional
> cases? Is that correct?
>
>
For the 0.1 release, that is correct.
In future rele
The example for using (bean obj) should be `(bean java.awt.Color/black)`
ATM it is (bean [[http://java.awt.Color/black|java.awt.Color/black]])
http://clojure.org/java_interop#Java%20Interop-The%20Dot%20special%20form-(bean%20obj)
Thanks,
Ambrose
--
You received this message because you are sub
What an awesome idea! Nice work Jonas.
Ambrose
On Mon, Mar 5, 2012 at 3:23 AM, Jonas wrote:
> Kibit[1] is a simple code analysis tool (and leiningen plugin) which
> someone hopefully will find interesting or useful. The purpose of the
> tool is to tell its users that "Hey, There's already a fun
Thanks David, and Jonas!
Ambrose
On Fri, Mar 16, 2012 at 7:30 AM, David Nolen wrote:
> It's been a while since we cut a core.logic release. Some small
> enhancements as well as a bug fix which was affecting Kibit,
> https://github.com/jonase/kibit/
>
> Cheers,
> David
>
>
>
> Enhancments
>
Wow, nice work Nathan!
Ambrose
On Thu, Mar 15, 2012 at 5:08 AM, Nathan Sorenson wrote:
> I've modified the output of the ClojureScript compiler to emit Scheme
> code. At this point the core library is successfully compiled by Gambit
> Scheme. A nice advantage of this is that Gambit compiles cod
I'm a fan of #{foo bar baz}.
Ambrose
On Sat, Mar 24, 2012 at 11:44 AM, Cedric Greevey wrote:
> #{foo bar baz} is somewhat ugly. It occurs to me that one could modify
> the reader to additionally accept
>
> {{foo bar baz}}
>
> without breaking anything. It's not possible for it to be a valid map
On Mon, Mar 26, 2012 at 11:46 AM, Cedric Greevey wrote:
> So ... any further objections, other than "it's unlikely anyone cares
> enough to bother actually making such a change"? :)
It breaks the uniformity of Clojure syntax.
Almost all sugar is prefix: you can identify syntax by looking to th
On Mon, Mar 26, 2012 at 12:22 PM, Cedric Greevey wrote:
> On Sun, Mar 25, 2012 at 11:59 PM, Ambrose Bonnaire-Sergeant
> wrote:
> > On Mon, Mar 26, 2012 at 11:46 AM, Cedric Greevey
> wrote:
> >>
> >> So ... any further objections, other than "it's
place the blame on the other party for your own confusion,
> misstatement, or what-have-you is simply not very sporting.
>
>
I apologise, there's no excuse for my response.
I will continue the debate with more class.
On Mon, Mar 26, 2012 at 12:45 AM, Ambrose Bonnaire-Sergeant
>
Thanks for the notification David. Done!
Ambrose
On Tue, Mar 27, 2012 at 4:21 AM, David Nolen wrote:
> http://www.google-melange.com/gsoc/homepage/google/gsoc2012
>
> If you had submitted a proposal via Confluence or here on the mailing list
> please submit now using the real form so we have yo
Ha! Love it.
Ambrose
On Mon, Apr 2, 2012 at 1:58 PM, Robert Levy wrote:
> Errata: I mistakenly referred to The Trystero Furcula by its former
> work-in-progress name (the double furcula).
>
> Just to be clear, the arrows presently included in the swiss arrows
> collection are:
>
> -<> The Diam
Wow! This is awesome, nice work fogus!
Ambrose
On Sat, Apr 7, 2012 at 1:55 AM, Fogus wrote:
> What it is
> --
>
> Trammel is a [Clojure](http://clojure.org) providing contracts
> programming (sometimes called "[Design by Contract](
> http://en.wikipedia.org/wiki/Design_by_Contract)" or
analyze: Friendly interface to the Clojure compiler
Usage: http://clojars.org/analyze
*Release 0.1.3*
- Improved interface (`ast`, `ast-in-ns`)
- Finer grained literals
- Many small changes after testing with typed-clojure
- Multimethod implementation moved to protocols (thanks Bronsa)
*Example
Fixed a silly bug, released 0.1.4.
Enjoy!
Ambrose
On Tue, Apr 10, 2012 at 7:16 PM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:
> analyze: Friendly interface to the Clojure compiler
>
> Usage: http://clojars.org/analyze
>
> *Release 0.1.3*
>
>
Hi Sanel,
Testing the class of the :val entry will provide that information.
Thanks,
Ambrose
On Tue, Apr 10, 2012 at 8:36 PM, Sanel Zukan wrote:
> Congrats!
>
> I'm just curious: reading your example on gist, (ast [1 2]) will yield
> '{:op :constant, :env {:locals {}, :ns {:name analyze.core}}
gt; user=>
>
> This is intended (both will return LazySeq as type)?
>
> Greetings,
> Sanel
>
>
> On Tuesday, April 10, 2012 3:16:33 PM UTC+2, Ambrose Bonnaire-Sergeant
> wrote:
>>
>> Hi Sanel,
>>
>> Testing the class of the :val entry will provide tha
Just released 0.1.5, updated the examples, fixed that bug.
https://github.com/frenchy64/analyze
Thanks,
Ambrose
On Tue, Apr 10, 2012 at 11:02 PM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:
> No, that's a bug, thanks for the report.
>
> Ambrose
>
&g
This should do the trick:
(defmulti add-item (fn [i & other] (class i))
Thanks,
Ambrose
On Mon, Apr 16, 2012 at 5:33 AM, James Thornton wrote:
> How do you use defmulti to create a function with a variable number of
> args?
>
> For example, add-item is wrapping a Java method that can take a var
Compare the number of brackets in Cedric's example to yours.
Ambrose
On Tue, Apr 17, 2012 at 1:18 PM, larry wrote:
>
>
> On Monday, April 16, 2012 10:02:48 AM UTC-7, Cedric Greevey wrote:
>>
>> (-> 3 ((partial f 2))) should also work.
>>
>
>
> I just wrote that it DOESN'T WORK. That's the point
Hi,
I want to attach reader metadata to a var, in a similar fashion to the :tag
key.
(^{:a :b} float? 1)
My use case is manual instantiation of type arguments to polymorphic
functions. I need the compiler
to add a metadata map to the results of analysis. In the absence of reader
macros, this see
Did I do something wrong?
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein plugin install
jonase/eastwood 0.0.1
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein version
Leiningen 1.7.1 on Java 1.6.0_23 OpenJDK Client VM
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ le
day, April 19, 2012 4:30:19 PM UTC+3, Jonas wrote:
>>
>>
>>
>> On Thursday, April 19, 2012 4:24:16 PM UTC+3, Ambrose Bonnaire-Sergeant
>> wrote:
>>>
>>> Did I do something wrong?
>>>
>>
>> Sorry, I only tested in with lein2. I'll try
Hi,
I've been doing some thinking about the treatment of nil in a
statically typed version of Clojure.
It occurs to me that nil is significantly different to Java's null
reference, which
is almost a Bottom type.
Java's null is a subtype of any reference type.
Clojure's nil is just nil, subtype t
cool stuff.
I'm also eager to steal bounded polymorphism from Scala.
This discussion is oriented towards typing interop calls, which are just
normal Java Classes/primitives.
Thanks,
Ambrose
On Fri, Apr 20, 2012 at 7:06 AM, James Reeves wrote:
> On 19 April 2012 19:46, Ambrose Bonnaire
ggestions for
type hinting, and an editor could automatically fill in the types.
Thanks,
Ambrose
On Fri, Apr 20, 2012 at 8:48 AM, Mark Engelberg wrote:
> On Thu, Apr 19, 2012 at 4:38 PM, Ambrose Bonnaire-Sergeant <
> abonnaireserge...@gmail.com> wrote:
>
>> I am working on an opt
Hi,
I know there are a few people interested in trying Typed Clojure,
so I've cut an early alpha release to give a taste.
These are *very* early days, but looking through the readme will
give you some hints as to what works in this release. Don't
expect too much.
https://github.com/frenchy64/typ
Thanks to all that made this possible, and a big thanks to David for his
tireless effort!
If you are interested in following the development of Typed Clojure
Github: https://github.com/frenchy64/typed-clojure
Twitter: https://twitter.com/ambrosebs
I predict the project will either be an epic suc
On Wed, Apr 25, 2012 at 10:30 PM, Shantanu Kumar
wrote:
> 2. It is quite verbose to construct a Bar from a Foo. Knowing that
> there is an overlap of attributes, is there a less verbose way to do
> it?
>
>
Have you tried this?
user=> (map->B (merge (A. 1 2) {:c 1}))
#user.B{:a 1, :b 2, :c 1}
Tha
On Wed, May 9, 2012 at 2:08 PM, Alex Baranosky <
alexander.barano...@gmail.com> wrote:
>
> 3) read through core.clj, like a fine classic novel. You'll get all sorts
> of good stuff through this process. I can't express deeply enough how
> important this is. Just DO IT.
>
>
It's a fascinating rea
+1
On Wed, May 9, 2012 at 2:38 PM, Alex Baranosky <
alexander.barano...@gmail.com> wrote:
> Ambrose and Meikel,
>
> Those are excellent points, but IMO to really be a great clojure developer
> you really can't get away with not having read the classic goodness that is
> core.clj. :) And after th
On Thu, May 17, 2012 at 7:19 PM, Brent Millare wrote:
> I'm taking a more serious dive into logic programming and I have a
> question about facts.
>
> *Is it true that that goals and facts are the same in that you can use
> unification and conde to get the same effect? So querying a conde of
> mul
I really enjoyed that, thanks Dominikus :)
Ambrose
On Thu, May 24, 2012 at 5:57 PM, Dominikus wrote:
> Three weeks ago I stumbled across the Anti-If Campaign (
> http://www.antiifcampaign.com/).
>
> An instant later I realized that one could easily re-implement "if" in
> Clojure with maps. More
Or: (zipmap (map inc (range)) '(a b c))
Thanks,
Ambrose
On Tue, Jun 5, 2012 at 8:02 PM, Jay Fields wrote:
> (zipmap (range 1 4) ["a" "b" "c"])
>
>
> On Tue, Jun 5, 2012 at 7:59 AM, Christian Guimaraes <
> cguimaraes...@gmail.com> wrote:
>
>> Hello all,
>>
>> I'm studying a little bit of Clojure
Hi Andy,
Many collection functions call "seq" on their arguments, therefore
those expect a Seqable (or a String, Iterable, Array, java.util.Map etc.),
not an IPersistentCollection (which coll? tests for).
Working these things out can get subtle.
Thanks,
Ambrose
On Fri, Jun 8, 2012 at 7:54 AM, A
Hi Tim,
On Fri, Jun 8, 2012 at 12:11 PM, Tim Visher wrote:
>
> 2. While I would very much expect the type test (coll? seq?) to return
> false on a string, I would _not_ expect the capability test
> (sequential?) to return false, and it does for a String. Is this the
> expected behavior? I would
Hi Andy,
On Fri, Jun 8, 2012 at 1:44 PM, Andy L wrote:
> On 06/07/2012 09:22 PM, Ambrose Bonnaire-Sergeant wrote:
>
>> Every Seqable is not Sequential.
>>
>> (sequential? {:a 1}) => false
>>
>
> Is there a simple test for sequable?
No. I assume you m
On Tue, Jun 19, 2012 at 8:20 PM, Jim - FooBar(); wrote:
> On 19/06/12 13:06, Tassilo Horn wrote:
>
>> Well, if you memoize a fn of no args, it'll always return the same
>> value. If that's really what you want, I'd rather use
>>
>> (def the-map (expr-calculating-the-map))
>>
>
> It needs to be
This might possible in CLJS (?), but I don't think you can recover the
source in Clojure.
Thanks,
Ambrose
On Wed, Jun 20, 2012 at 11:13 PM, Rogier Peters wrote:
> Hi,
>
> With all the higher-order functions in the new reducers, I was
> wondering if it is possible to print a generated function, l
Hi Chris,
Many of your ideas are already implemented in Typed Racket.
For using the context of following the current branch to refine the type,
see occurrence typing (paper, "Logical Types For Untyped Languages").
Typed Racket combines static checks and runtime contracts in a very cool
way. You
This comment outlines everything clojure.test can do. It's a quick read,
see "thrown?" and "thrown-with-msg?".
https://github.com/clojure/clojure/blob/master/src/clj/clojure/test.clj#L22
Thanks,
Ambrose
On Mon, Jun 25, 2012 at 7:21 PM, Jim - FooBar(); wrote:
> Hey guys,
>
> the only thing I can
301 - 400 of 504 matches
Mail list logo