Hi!
Did someone ever look at supporting InvokeDynamic for Clojure? I've read a
couple of blogs and it seemed interesting, would be cool to know if there
actually were any advantages in practice.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To po
Thank you all!
@Stuart Great to know that 0.2.1 is backwards compatible.
@Sean You are right about running it separately. But I am lazy and it is
easier to be able to just run (sdoc) from repl and get the ns browser up.
On the other hand, it is perhaps not so smart to pollute one's profile with
a
Hi Luca,
On Thursday, April 3, 2014 11:57:27 AM UTC+2, icamts wrote:
>
> Hi Christian,
> I think you are looking for this.
>
> http://en.wikipedia.org/wiki/Facade_pattern
>
> In clojure you can use a def for each private member of the facade.
> Alternatively you can write a function to instantiat
Hi, Hansen
Fogus (from here) and Nutter (from JRuby) wrote nice posts about it.
http://blog.fogus.me/2011/10/14/why-clojure-doesnt-need-invokedynamic-but-it-might-be-nice/
http://blog.headius.com/2011/10/why-clojure-doesnt-need-invokedynamic.html?m=1
Plinio Balduino
11 982 611 487
> On 04/04/
Yeah, those were the blog posts I've read, but I can't see that this is
actually being worked on for Clojure?
4. apr. 2014 kl. 11:43 skrev Plínio Balduino :
> Hi, Hansen
>
> Fogus (from here) and Nutter (from JRuby) wrote nice posts about it.
>
> http://blog.fogus.me/2011/10/14/why-clojure-do
The guys from core team will correct me if I say any bs, but I think it's not
possible to keep Clojure compatible with Java 6, as Clojure 1.6 is, and use
InvokeDynamic bytecode in the same binary. DynJS, for example, is not
compatible with Java 6.
Anyway, it would be nice to see any experiment
You may find this thread enlightening:
https://groups.google.com/d/msg/clojure-dev/PuV7XTps9vo/SkkNuiynKfUJ
/Ragnar
On Friday, 4 April 2014 10:44:42 UTC+1, Robin Heggelund Hansen wrote:
>
> Yeah, those were the blog posts I’ve read, but I can’t see that this is
> actually being worked on for Cl
Thank you!
4. apr. 2014 kl. 12:35 skrev Ragnar Dahlén :
> You may find this thread enlightening:
>
> https://groups.google.com/d/msg/clojure-dev/PuV7XTps9vo/SkkNuiynKfUJ
>
> /Ragnar
>
> On Friday, 4 April 2014 10:44:42 UTC+1, Robin Heggelund Hansen wrote:
> Yeah, those were the blog posts I've
I agree that we cannot (yet) cut support for Java 6 but we continue to
watch polls and usage closely. Java 6 has been EOL'ed for a while now and
usage continues to drop. However, there are a few minor JDK-specific bits
already in Clojure and it would be entirely possible to handle separate
pat
Great to hear, I'm looking forward to progress :)
4. apr. 2014 kl. 14:45 skrev Alex Miller :
> I agree that we cannot (yet) cut support for Java 6 but we continue to watch
> polls and usage closely. Java 6 has been EOL'ed for a while now and usage
> continues to drop. However, there are a few
Hi Christian,
I've been a bit too technical. What I mean is give your OO system a new
interface made of functions. Choose functions according to your needs and
develop a layer of functions that can create and access your objects
instances. It's my opinion this is the stateful bridge in your firs
Proposal:
For an *odd* number of forms a, x, b, ...
{a x b x c ...} => (x a b c ...)
{a x b y c ...} => (*nfx* a x b y c ...)
Reasoning:
Even after a lot of practice, prefix math is still harder (at least for
me...) to read than non-prefix math. The [], () and <> matching delimiters
are alrea
Hi,
I am trying to understand what the best course of action would be in the
following scenario:
I have a Java base class that I need to extend. The class is fundamental to
my application and will be running fairly hot compared to other bits of
code in the application. Therefore I want it to e
Christian Eitner <7enderh...@gmail.com> writes:
>>
>> Hi Christian,
>> I think you are looking for this.
>>
>> http://en.wikipedia.org/wiki/Facade_pattern
>>
>> In clojure you can use a def for each private member of the facade.
>> Alternatively you can write a function to instantiate and return
Anvar Karimson writes:
> I am trying to understand what the best course of action would be in the
> following scenario:
>
> I have a Java base class that I need to extend. The class is fundamental to
> my application and will be running fairly hot compared to other bits of
> code in the applica
The desire (and rejection) of infix notation for Lisp is as old as the hills.
"Therefore we expect future generations of Lisp programmers to continue to
reinvent Algol-style syntax for Lisp, over and over and over again, and we are
equally confident that they will continue, after an initial peri
Is that via gen-class? I have to admit that I am not very familiar with
gen-class, is it still possible to use the class from Clojure?
Yes, that is probably the most pragmatic choice, premature optimization and
all that.
On Friday, 4 April 2014 15:03:00 UTC+1, Phillip Lord wrote:
>
> Anvar Kari
Odd-entry-count maps would have corner cases: One would need to use an even
number of unary operators. If an odd number of unary operators were used,
what looked like a valid expression would become a map, and that might be
hard to figure out.
Also, since the order of entries in a map is not guar
Yeah, gen-class is the thing. Proxy, well, proxies, but genclass
produces a statically compiled ahead of time class. It's a real Java
class, so yes, you can use it from Clojure like any other Java class.
Genclass is a little more painful than proxy, but probably a little less
painful than having
Ok, thanks! I will have a look!
On Friday, 4 April 2014 16:43:20 UTC+1, Phillip Lord wrote:
>
>
> Yeah, gen-class is the thing. Proxy, well, proxies, but genclass
> produces a statically compiled ahead of time class. It's a real Java
> class, so yes, you can use it from Clojure like any other Ja
Hi there
I wrote this code expecting an error, but it worked:
(let [x 3
x (* valor 2)]
x)
; 6
Is It the expected behavior or, considering that a local binding could not
be modified, it should really raise an error?
Thank you
Plínio
--
You received this message because you are subscri
This is not modifying the value it's creating a new scope with a new
version of x. The binding above is shorthand for:
(let [x 3]
(let [x 42]
(println x))
(println x))
;; prints:
42
3
Timothy
On Fri, Apr 4, 2014 at 10:23 AM, Plínio Balduino wrote:
> Hi there
>
> I wrote this code ex
Thank you
I imagined something like that. Anyway, as the second binding is shadowing
the first, there's no way to access the first value, right?
Plínio
On Fri, Apr 4, 2014 at 1:26 PM, Timothy Baldridge wrote:
> This is not modifying the value it's creating a new scope with a new
> version of x
That's correct, and often clojure compilers (like ClojureScript) many
actually completely rename the variable to something else.
Timothy
On Fri, Apr 4, 2014 at 10:34 AM, Plínio Balduino wrote:
> Thank you
>
> I imagined something like that. Anyway, as the second binding is shadowing
> the first
Incanter supports this with the $= prefix:
($= 7 + 8 - 2 * 6 / 2)
http://data-sorcery.org/2010/05/14/infix-math/
Might be worth looking at...
On Thursday, April 3, 2014 11:17:32 PM UTC-5, Joshua Brulé wrote:
>
> Proposal:
>
> For an *odd* number of forms a, x, b, ...
>
> {a x b x c ...} => (x a
I strongly recommend to talk with dynjs guys about invokedynamic.
Dynjs is a ECMAScript engine written in Java 7 that was intended to use all
the power of invokedynamic. Again, they can correct me if I'm saying
bananas, but it looks lie Java 7 has some issues in
invokedynamic implementation and th
Hi folks,
I've got a very simple online viewer for Gorilla REPL worksheets going
here:
http://gorilla-repl.org/viewer.html
It's free, with no registration or other burdensome business. You use it by
uploading your worksheet to GitHub, either as part of a project, or to a
Gist, and then const
Ouch. Now I realized that it's exactly what happens when you do this to
debug a sequential binding.
(let [x 35
_ (println "x is" x)
y (* 35 3)
_ (println "y is" y)]
; some code
)
Thank you for the elucidation.
Plínio
On Fri, Apr 4, 2014 at 1:36 PM, Timothy Baldridge wrote:
Why bother with a reader macro, when you can use a normal macro?
(infix (2 * x1 * x2) / (x1 + x2))
IMO, the times when it makes sense to use infix notation are fairly few,
anyway. One could write the above as:
(/ (* 2 x1 x2)
(+ x1 x2))
Which to me actually seems more readable tha
I prefer Unfix --> http://fogus.me/fun/unfix/ ;-)
On Fri, Apr 4, 2014 at 12:45 PM, Alex Miller wrote:
> Incanter supports this with the $= prefix:
> ($= 7 + 8 - 2 * 6 / 2)
>
> http://data-sorcery.org/2010/05/14/infix-math/
>
> Might be worth looking at...
>
>
> On Thursday, April 3, 2014 11:17:32
I'd love to know the "correct" answer to this too, but in the meantime,
here's how I've been doing it:
I define the "release" version in some namespace. To use it, I require this
namespace. Eg release-namespace/func
Then I create a separate file for the debug build and I require the release
names
I knew there was another one out there, but couldn't remember whose... !
Thanks...
On Friday, April 4, 2014 2:36:59 PM UTC-5, Fogus wrote:
>
> I prefer Unfix --> http://fogus.me/fun/unfix/ ;-)
>
> On Fri, Apr 4, 2014 at 12:45 PM, Alex Miller
> >
> wrote:
> > Incanter supports this with the $
Is there some trick Clojure command to list all functions defined in a
namespace?
--
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
On Apr 4, 2014, at 7:53 PM, Christopher Howard wrote:
> Is there some trick Clojure command to list all functions defined in a
> namespace?
http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/ns-publics
is a good start.
--Steve
--
You received this message because you are su
FWIW, in Cursive, which is a big ball of mixed Clojure + Java, I've given
up trying to use gen-class and have started using Java shims for
everything. I like it a lot more than gen-class, which I always feel like
I'm fighting. With the new Java->Clojure API in 1.6 (or the equivalent
using RT.var()
My understanding is that invokedynamic was very problematic in Java 7, but
is quite a different design and works much better in Java 8. I'd expect it
to be much more heavily optimised in Java 8 since it's used by a core Java
feature (lambdas). Unfortunately targeting Java 8 only is probably not
fea
On Fri 4 Apr 2014 at 03:53:54PM -0800, Christopher Howard wrote:
> Is there some trick Clojure command to list all functions defined in a
> namespace?
I use these functions to create cheatsheets on the fly:
(defn fn-var? [v]
(let [f @v]
(or (contains? (meta v) :arglists)
(fn? f)
This may be a dumb question, but is there a way to set up something like
this on my own server, without github ? Or is the code for the github
viewer in the project itself ?
These notebooks look great! I'm really impressed by the work you've been
doing on this.
--
You received this message
I'm also in Santa Cruz, and interested.
--
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 unsubsc
(doc dir)
-
clojure.repl/dir
([nsname])
Macro
Prints a sorted directory of public vars in a namespace
On Friday, April 4, 2014 6:53:54 PM UTC-5, Christopher Howard wrote:
>
> Is there some trick Clojure command to list all functions defined in a
> namespace?
>
--
You
40 matches
Mail list logo