Render Rails templates in Clojure?

2016-03-25 Thread Igor Bondarenko
Hi everyone!

We're planning on moving our Rails app to Clojure and would want to keep 
our Rails templates during the transition time. Is there a way to render 
Rails templates in Clojure (or Java)?

The reason we need this is because templates will probably change at the 
same time as transition happens and we don't want to update them in two 
different places/templating languages. Eventually we'll switch to Clojure 
templating library completely, of course.

Or it isn't worth the effort and we should just rewrite templates to 
Clojure from the beginning and deal with duplication?

Thanks for your thoughts.

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How manage this state problem The Clojure Way?

2016-03-25 Thread hiskennyness
*Background*
I am starting on a port of my Common Lisp Cells dataflow hack 
 (much akin to Javelin 
 in surface semantics) to Clojure and am 
struggling to wrap my head around Clojure state-handling, deftype, and 
defrecord.

Development will be in my Jellz repository 
, which for now just holds a "Cells 
Lite" common lisp 
 
hack similar to something I once tossed off without thinking during a 
presentation to Jay Sulzberger's Linux group.

*Question*
Cells uses a lot of state internally to keep track of dependencies and 
more, so I need state. Now how do I best do that The Clojure way?

I think I am in good shape, from what I have read so far, because any given 
state change at the higher abstraction of the application model (eg, "this 
text-edit widget keypress slot just got a new value" already works in a way 
amenable to STM, including The Restart Problem:

   1. We already have a global **pulse** value (serial integer) that 
   manages consistency during propagation of the *input cell* keypress 
   across the larger model. So *pulse* becomes one ref, yes?
   2. Within dosynch:
  1. Increment *pulse*
  2. Now all dependent values (mediated by *formula cells*) get 
  recalculated recursively. Anyone trying to mutate state need to do so 
only 
  to refs. (Updating state in a formula is weird, but on rare occasions I 
  close over a variable to see a bit of history.)
  3. Invoke any observers:
 1. If these guys mutate state, they better be refs
 2. These can also write to input cells (think "falling dominoes") 
 but are required to do so by enqueueing them for FIFO execution 
immediately 
 after this one pulse has been fully executed. 
  3. The above may restart, but as long as everything is a ref we are 
   good. Yes?
   4. Internally, the cell data structure must also be composed of refs. I 
   am thinking I will just make an array of refs. Is that fastest?
   5. Now each cell currently serves as the slot value of a CLOS object 
   wired with a few extra slots to support Cells. These too would be refs, I 
   am guessing, though instead of class objects these would just be maps. Yes?

How'm I doin'?

Thx, hk

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Render Rails templates in Clojure?

2016-03-25 Thread James Reeves
You don't mention the templating language you're using in Rails. Are you
just using erb?

- James

On 25 March 2016 at 11:41, Igor Bondarenko  wrote:

> Hi everyone!
>
> We're planning on moving our Rails app to Clojure and would want to keep
> our Rails templates during the transition time. Is there a way to render
> Rails templates in Clojure (or Java)?
>
> The reason we need this is because templates will probably change at the
> same time as transition happens and we don't want to update them in two
> different places/templating languages. Eventually we'll switch to Clojure
> templating library completely, of course.
>
> Or it isn't worth the effort and we should just rewrite templates to
> Clojure from the beginning and deal with duplication?
>
> Thanks for your thoughts.
>
> --
> 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 to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ANN: hasch 0.3.0

2016-03-25 Thread Christian Weilbach
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,

I am pleased to announce another major update for hasch, this time
with a finalized hashing scheme, so you can use it to store values.

- From the README :

A library to consistently crypto-hash
[edn](https://github.com/edn-format/edn) data structures on Clojure
and ClojureScript, e.g. with SHA-1. Commutative data structures like
maps, sets and records are not hashed in order as was the case with
e.g. hashing a simple printed edn string, but have the same hash value
independant of order (read: always and everywhere). UTF-8 is supported
for strings, symbols and keywords.
You can also create UUID5 (using SHA-1) from it. Alternatively you can
use your own hash function.

Underlying is also a new version of
https://github.com/replikativ/incognito

Happy hacking,
Christian
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJW9W9cAAoJEKel+aujRZMkRwgIAM1VPnT1DT57IHAANwzAMZNE
tLC078pNETqetN2KNRUQAj4FVXSNd5uECwOd1QsHKUp/egonGjpnSh8+D4FPqJj1
eoZmL11krFe0yVOsXUEag7+Y2SkbSZTaKEXQZcE6l+dkA3lQziR83GW8cZl14vHj
P4N6rSswmLsIOvAxB8FY/8laJ5+8erraIbpkiypq1m6hnsyvfh0fDwgt+lFAIy7v
Hkw8V1KpWNaiR3hbDq7WrGsr5JlsCYHukYCvldqEpbVRUx6bzQI4KaSIpEZd0WS1
qUyKGsiuYaJOT96QNXHG6Fs/Leb8RRx5aa8gw8rF6tVfmzvarGluirvKSFdVufs=
=kYY8
-END PGP SIGNATURE-

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] io.aviso/config 0.1.12

2016-03-25 Thread Howard Lewis Ship
io.aviso/config is a very small library used to handle configuration of a
server; it works as a complement to Stuart Sierra’s component library.

This release add support for special reader tags inside EDN configuration
files, to support access to environment variables.

https://github.com/AvisoNovate/config

-- 
Howard M. Lewis Ship

Senior Mobile Developer at Walmart Labs

Creator of Apache Tapestry

(971) 678-5210
http://howardlewisship.com
@hlship

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Quil 2.4.0 and improved live editor

2016-03-25 Thread Alan Moore
+1, yes thanks very much!

FYI: The quil.info site has a broken link. The "Quil Intro" links to:

http://nbeloglazov.com/2014/05/29/quil-intro.html

But that's 404.

Alan

On Thursday, March 24, 2016 at 6:26:45 PM UTC-7, Dragan Djuric wrote:
>
> Thank you for keeping this fantastic library alive :)
>
> On Thursday, March 24, 2016 at 9:03:42 PM UTC+1, Nikita Beloglazov wrote:
>>
>> Happy to announce Quil 2.4.0 release.
>>
>> Quil is a Clojure/ClojureScript library for creating interactive drawings 
>> and animations.
>>
>> The release available on clojars: https://clojars.org/quil. List of 
>> changes:
>>
>>- Updated cheatsheet 
>>
>> . 
>>Thanks to @SevereOverfl0w .
>>- Added support for some new processing functions: pixel-density, 
>>display-density, clip, no-clip, key-modifiers.
>>- Fixes: #170 , #179 
>>.
>>- Upgraded to ProcessingJS 1.4.16 and Processing 3.0.2.
>>- Drop support of Clojure 1.6.0.
>>- Migrated from cljx to cljc and various refactorings to make Quil 
>>compile with self-hosted cljs.
>>
>> Documentation on http://quil.info has been updated as well.
>>
>> *Live editor*
>>
>> Editor  on quil.info was revamped and 
>> migrated to self-hosted ClojureScript! That means that now you can evaluate 
>> code ~instantly in browser and even reevaluate parts of code. Editor 
>> provides following features:
>>
>>
>>- full client-side compilation including macros from quil.core;
>>- partial evaluation: use Ctrl+Enter to evaluate selected code or 
>>form under cursor
>>- warning and error messages;
>>- easy sketch sharing via URL;
>>
>> Feedback and bug reports are welcome! Feel free to reply to this thread 
>> or file a bug in Quil repo . 
>>
>>
>> Happy hacking!
>>
>> Nikita
>>
>

-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.