Very cool. Thanks for the update.
David
On Feb 8, 2013, at 3:25 PM, Jordan Berg wrote:
> Just got a chance to test it from clojurescript and seems to work (only
> tested the examples from the docstring). Guess that is the nice part of
> macros working from clojure.
>
> Cheers
>
>
> 2013/2
Just got a chance to test it from clojurescript and seems to work (only
tested the examples from the docstring). Guess that is the nice part of
macros working from clojure.
Cheers
2013/2/8 Jordan Berg
> That is pretty cool, hadn't seen that before.
>
>
> 2013/2/8 David Sargeant
>
>> The func
That is pretty cool, hadn't seen that before.
2013/2/8 David Sargeant
> The functionality is currently in core.incubator (
> https://github.com/clojure/core.incubator) as the << macro. One can
> always use that, I suppose (haven't tried with ClojureScript myself).
>
> On Feb 8, 2013, at 1:56 P
The functionality is currently in core.incubator
(https://github.com/clojure/core.incubator) as the << macro. One can always
use that, I suppose (haven't tried with ClojureScript myself).
On Feb 8, 2013, at 1:56 PM, Jordan Berg wrote:
> js* is used internally in cljs to implement some operato
js* is used internally in cljs to implement some operators and the
interpolation helps there. I don't think js* is really meant to be used
too much outside of core. Any reason to not just use str?
(def x "david")
(str "hello " x)
2013/2/8
> Why does ClojureScript support string interpolatio
2010/11/21 HiHeelHottie :
>
> I think ruby has nice string interpolation. You can put the following
> in a textfield that a user can modify
>
> This is a #{adjective} string.
>
> Then, you can take that string, put it in quotes and have ruby
> evaluate it as a string. What is the clojure way of d
Thanks Mike. This is what I was looking for.
On Nov 20, 8:31 pm, Mike K wrote:
> Check out the << macro from clojure.contrib.strint.
>
> http://clojure.github.com/clojure-contrib/strint-api.html
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To p
Check out the << macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
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
Wow, David, that's a nice little demonstration of cl-format. I hadn't
seen that before.
But as Mike points out, clojure.contrib.strint/<< is more precisely
what the poster is asking for: true ruby-style string interpolation.
It has occurred to me to extend cl-format to do real string
interpolatio
Check out the << macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
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
Check out the << macro from clojure.contrib.strint.
http://clojure.github.com/clojure-contrib/strint-api.html
--
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
The cool way is to use Tom Faulhaber's cl-format in clojure.pprint:
http://clojure.github.com/clojure/#clojure.pprint
(use '[clojure.contrib.pprint :only (cl-format)])
(cl-format true "This is a ~A string.~%" 'funky)
This is a funky string.
I have a mini-tutorial plus links here:
http://www.getti
you could use format or cl-format?
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/format
http://clojure.github.com/clojure-contrib/pprint-api.html#clojure.contrib.pprint/cl-format
On Sat, Nov 20, 2010 at 5:00 PM, HiHeelHottie wrote:
>
> I think ruby has nice string interpo
On Wed, Oct 29, 2008 at 1:27 PM, Kyle R. Burton <[EMAIL PROTECTED]> wrote:
>
>> Thanks for the macro. =)
>> The str function is really a good replacement for interpolation.
>
> Yes, thank you for the macro. I anticipate using this approach (I'm
> accustomed to it from Ruby, Perl and JScheme), but
> Thanks for the macro. =)
> The str function is really a good replacement for interpolation.
Yes, thank you for the macro. I anticipate using this approach (I'm
accustomed to it from Ruby, Perl and JScheme), but wanted to support a
way of stopping the parser (by backslashing the opening brace:
Thanks for the macro. =)
The str function is really a good replacement for interpolation.
On Oct 28, 8:29 pm, "Graham Fawcett" <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 28, 2008 at 7:27 PM, Graham Fawcett
>
> <[EMAIL PROTECTED]> wrote:
> > But for fun, here's an (i ...) macro, that will give you $
On Tue, Oct 28, 2008 at 7:27 PM, Graham Fawcett
<[EMAIL PROTECTED]> wrote:
> But for fun, here's an (i ...) macro, that will give you ${}
> interpolation in strings (if it works at all, I test it very
> thorougly!).
Haha, nor did I spell- or grammar-check very thoroughly!
I meant: I didn't test
On Mon, Oct 27, 2008 at 11:38 PM, Islon <[EMAIL PROTECTED]> wrote:
> Is there any chance closure will get string interpolation?
>
> Do things like (prn "Hi ${someone}, my name is ${myname}") is nice, not
> crucial of course, but nice.
I'm personally not fond of string interpolation either.
But f
I've always preferred a function like str to either of these options
anyway.
(str "Hi " someone ", my name is " myname)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send ema
Hi Islon,
On 28 Okt., 04:38, Islon <[EMAIL PROTECTED]> wrote:
> Is there any chance closure will get string interpolation?
>
> Do things like (prn "Hi ${someone}, my name is ${myname}") is nice, not
> crucial of course, but nice.
There is format.
user=> (def someone "World")
#=(var user/someone)
20 matches
Mail list logo