Re: more minimal clojurescript intro/app

2016-04-13 Thread 'Alan Forrester' via Clojure
On 13 Apr 2016, at 04:18, 'Lee' via Clojure  wrote:

> Thanks again to Alan, Pedro, and Colin for the input on this.
> 
> I found the modern-cljs tutorial most helpful, and was able to put the 
> compiled Hello World example on a server and then run it from my browser. 
> Victory!
> 
> It seems like I am very close to doing what I want, which is to put an 
> existing pure Clojure program (with no GUI or networking or database etc.) 
> online so that the small group of users  of this program (mathematicians 
> interested in a specific set of questions about finite algebras) can run some 
> computations in their browsers, without having to install anything on their 
> own machines. As I mentioned before, I'd like to do this, for now, without 
> having to learn a lot about Javascript or web programming.
> 
> I am still facing what I think are some small hurdles, however. I'll bet can 
> be overcome easily, but all of the tutorials I see require one to learn a lot 
> more to do this than I have time to learn right now.
> 
> Specifically: 1) I need my code to get some input (just parameters to the one 
> function that I will run), and 2) ideally the output would go to the browser 
> window rather than to the Javascript console.
> 
> Ignoring 2 for the moment, I see that the Javascript console provides a 
> Javascript REPL. If I can call a Clojurescript function there, and especially 
> if the Clojurescript read function read from this REPL, then I could have my 
> users work in the Javascript console. Not ideal, but it could work in a pinch.
> 
> Ideally, though, I would have either a single text field Clojurescript REPL 
> on the web page itself, or two text fields, one for input and one for output, 
> and a "Run" button to trigger the computation.
> 
> I don't much care what this all looks like. I just want some way to get text 
> input and print text output, preferably in the browser window.
> 
> I assume that the modern-cljs tutorials would get me there, but only after 
> substantial detours through several other topics. I'm sure this is all 
> important and useful stuff, which I'd love to study if I ever want to do more 
> substantial web programming. But for now I just want to make this existing 
> program available to my users in their browsers.
> 
> So: Can anyone point me to a minimal way to get text I/O and trigger a 
> function call (presumably with a button) in Clojurescript in the browser, 
> without relying on knowledge of Javascript or web programming? Alternatively, 
> if anyone can point me to a description of how to call Clojurescript 
> functions in the Javascript console, and also to read input from the console, 
> that would also help.

I think your easiest option might be to use Reagent:

http://reagent-project.github.io.

You would have to know some html, CSS and Javascript. I doubt there is any way 
around having some basic knowledge of them. Code Academy have some courses that 
cover the basics:

https://www.codecademy.com/learn/web

https://www.codecademy.com/learn/javascript.

There is a video on how to set up and use Reagent here:

https://www.youtube.com/watch?v=wq6ctyZBb0A.

Alan

-- 
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] clojure.java.jdbc 0.5.8 + what's coming in 0.6.0

2016-04-13 Thread Sean Corfield
What?
org.clojure/java.jdbc "0.5.8"
Clojure contrib wrapper for JDBC database operations

Where?
https://github.com/clojure/java.jdbc#change-log

Why?
The 0.5.x series of releases DEPRECATES all the variadic function calls 
in the library and adds new function signatures that are more consistent and 
more composable. Use of the variadic signatures will produce a DEPRECATED 
warning, printed to the console.

The 0.5.8 release is a bridge to the upcoming 0.6.0 release which will 
REMOVE all the DEPRECATED functionality in the library. Expect 0.6.0-alpha1 
later today.

Changes (in 0.5.5 through 0.5.8):

* Release 0.5.8 on 2016-04-12

  * db-do-commands now expects multiple commands to be be wrapped in a vector 
JDBC-122 . The single command form is 
unchanged (but may be wrapped in a vector). Calling db-do-commands with 
multiple commands (not wrapped in a single vector) will produce a "DEPRECATED" 
warning printed to the console.

  * db-do-prepared and db-do-prepared-return-keys now expect to receive a 
db-spec, an optional transaction?boolean, a sql-params argument, and an 
optional options map. sql-params is a vector containing a SQL string or 
PreparedStatement followed by parameters -- like other APIs in this library. In 
addition, like the :multi? trueversion of execute!, db-do-prepared can accept a 
vector that has parameter groups: multiple vectors containing groups of 
parameter values JDBC-122 . Calling 
db-do-prepared with unrolled arguments -- the SQL string / statement followed 
by parameter groups -- is deprecated and will produce "DEPRECATED" warnings 
printed to the console.

* Release 0.5.7 on 2016-04-10

  * (insert! db table [:col] ["val"] {}) syntax, introduced in 0.5.6, threw an 
exception JDBC-121 .

* Release 0.5.6 on 2016-04-10

  * create-table-ddl now expects the column specs to be wrapped in a single 
vector and no longer needs the :options delimiter to specify the options map 
JDBC-120 .

  * If column specs are not wrapped in a vector, you will get a "DEPRECATED" 
warning printed to the console.

  * insert! now supports only single row insertion; multi-row insertion is 
deprecated. insert-multi! has been added for multi-row insertion. :options is 
no longer needed as a delimiter for the options map JDBC-119 
.

  * If insert! is called with multiple rows, or :options is specified, you will 
get a "DEPRECATED" warning printed to the console.

  * NOTE: all deprecated functionality will go away in version 0.6.0!

* Release 0.5.5 on 2016-04-09

  * Allow options map in all calls that previously took optional keyword 
arguments JDBC-117 .

  * The unrolled keyword argument forms of call are deprecated -- and print a 
"DEPRECATED" message to the console! -- and will go away in 0.6.0.


Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)




-- 
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: Puzzle solving in Clojure

2016-04-13 Thread Ashish Negi
Thanks puzzler for the explanation.
I tried out your `unchunk` and its works nicely..

I then googled around about chunk and memory issues..

I found most issues about chunking and stack overflow.. 
here.. https://stuartsierra.com/2015/04/26/clojure-donts-concat   
[which is very good read for this question as well.. the diagram of 
lazy-seq's is great.]
with 
https://groups.google.com/forum/#!topic/clojure-dev/ewBuyloeiFs/discussion 
[Left recursion with concat as said in above article as well would stack 
overflow].

However, none talked about memory consumption.. Do anyone know about good 
practices with `chunking` and `memory consumption` ?
*Can i say that : as long tail of recursive calls are happening due to 
chunking.. all the memory of intermediate steps is present at the same 
time.. leading to heavy memory usage.. ?*  or is it something more subtle..

Some graphs that i found while profiling :



-- 
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] clojure.java.jdbc 0.6.0-alpha1 - breaking changes

2016-04-13 Thread Sean Corfield
As announced earlier today, 0.6.0-alpha1 is now available:

https://github.com/clojure/java.jdbc#change-log

This is a BREAKING RELEASE!

I recommend you test your applications with 0.5.8 and address any DEPRECATED 
warnings printed to the console first, then re-test your application with 
0.6.0-alpha1.

The most likely breakage you’ll hit is if you use :entities / :identifiers or 
:row-fn / :result-set-fn as those will need to be passed as part of a single 
options hash map argument instead of unrolled keyword / value arguments.

I have World Singles’ code base running on 0.6.0-alpha1 with relatively minor 
changes.

Happy to discuss issues here, in person (at Clojure/West this week!), or over 
on the java.jdbc mailing list:

https://groups.google.com/forum/#!forum/clojure-java-jdbc

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)




-- 
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] clojure.java.jdbc 0.5.8 + what's coming in 0.6.0

2016-04-13 Thread 676c7473
Would now be a good moment to bump the major version number to indicate
clearly to all clients ‘your software may break if you make the jump’?

Thank you,


-- 
David

-- 
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: Puzzle solving in Clojure

2016-04-13 Thread Olivier Scalbert
Thanks to all of you !
There are so much material in your answers that I need to wait this 
week-end to do some tests !

Clojure is cool !

-- 
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] clojure.java.jdbc 0.5.8 + what's coming in 0.6.0

2016-04-13 Thread Sean Corfield
On 4/13/16, 11:50 AM, "clojure@googlegroups.com on behalf of 
676c7...@gmail.com"  
wrote:
>Would now be a good moment to bump the major version number to indicate
>clearly to all clients ‘your software may break if you make the jump’?

It jumped from 0.5.x to 0.6.0 — that’s usually how contrib libraries indicate 
potential breakage.

Contrib libraries have a strict set of criteria to reach 1.0.0 and, last I 
asked the Clojure/core folks, very few of the contrib libraries are ready for 
that yet.

If you look at the java.jdbc change log you’ll see:

0.0.7 -> 0.1.0 — removed dependency on structmap, potentially breaking 
order-dependent code
0.1.4 -> 0.2.0 — merged namespaces, potentially breaking code that depended on 
the "internal" namespace
0.2.3 -> 0.3.0 — deprecated 0.2.x API (moved it to a different namespace, 
breaking code), introduced new API
0.3.7 -> 0.4.0 — dropped Clojure 1.2 support
0.4.2 -> 0.5.0 — dropped Clojure 1.3 support
0.5.0 -> 0.5.5 — deprecated variadic aspects of the API
0.5.8 -> 0.6.0 — removed deprecated features

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood




-- 
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.


core.reducers documentation issue

2016-04-13 Thread Camilo Roca

Hey guys,

I just wanted to mention some issue with the current documentation of 
core.reducers. I wanted to do it in github but it seems it is not possible 
there. Hopefully somebody from the language team can open an issue and 
correct (improve) it.

There are actually two issues that I would like to report

- There is a contradiction between the documentation mentioned here, 
with
 
respect to the one mentioned here . 
Specifically on the line that states 
  "(with a seed value obtained by calling (combinef) with no arguments)" on 
the former and 
  "The reducef function will be called with no arguments to produce an 
identity value *in each partition*." on the later.
   those two documentation references are contradictory. Either combinef is 
called with no arguments or reducef is called with no arguments.

- The second doc issue is regarding the arities of most functions in 
core.reducers. With the introduction of transducers in Clojure 1.7. The 
single arity in functions like r/map or r/filter gives the impression that 
they return a transducer, whereas they just return a curried version of 
them. Nothing in the docstrings or the reference page mentions what is the 
return value of those functions with a single argument.

I hope it helps,

-- 
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.


core.reducers documentation issue

2016-04-13 Thread Alex Miller
You can file tickets on these here:

http://dev.clojure.org/jira/browse/CLJ

-- 
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.


The API Banking Team at Silicon Valley Bank (San Francisco) is Looking For a Clojure Engineer

2016-04-13 Thread jmorse


The API Banking is a new Agile team being assembled to build a brand-new 
web, mobile and api digital banking platform from the ground up, using the 
latest cutting edge tools and technologies such as Clojure, Git, Jira, 
Angular.js, Node.js, micro-services, Java, Rest API’s, cloud and NoSql 
databases?

To view the job description go to 
http://docs.svbplatform.com/beta/jobs/clojure-engineer.html 

For nearly three decades, SVB Financial Group and its subsidiaries, 
including Silicon Valley Bank, have been dedicated to helping entrepreneurs 
succeed. SVB Financial Group is a financial holding company that serves 
companies in the technology, life science, cleantech, venture capital, 
private equity and premium wine industries. Offering diversified financial 
services through Silicon Valley Bank, SVB Analytics, SVB Capital, and SVB 
Private Bank, SVB Financial Group provides clients with commercial, 
investment, international and private banking services. The company also 
offers funds management, broker-dealer transactions and asset management, 
as well as the added value of its knowledge and networks worldwide. 
Headquartered in Santa Clara, Calif., SVB Financial Group (Nasdaq: SIVB) 
operates through innovation hubs around the world, with offices in the U.S. 
and international operations in China, \ Israel and the United Kingdom. 
More information on the company can be found at www.svb.com.

 For more information on this and other openings contact Jeff Morse 
jmo...@svb.com

 

-- 
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: more minimal clojurescript intro/app

2016-04-13 Thread William la Forge
I've never learned javascript and had hoped that clojurescript would make 
it easy. Much to my delight, I found that hoplon let me write everything in 
a single language and not have to worry about how html/js are joined.

Love Hoplon!

https://github.com/hoplon/hoplon

-- 
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] Loom 0.6.0

2016-04-13 Thread Aysylu Greenberg
Hi all,

I'm pleased to announce that Loom 0.6.0 has been released.

- Loom moved to Clojure 1.7 and uses its reader conditionals and .cljc 
format which paves the way for Clojurescript support 
 (danielcompton 
).

Graphs:
- loom.derived namespace: derives graphs from existing graphs using maps 
and filters (monora )

Graph Algorithms:
- dataflow analysis framework (aysylu )
- graph equality based on subgraph membership presence (monora 
)
- isomorphism: given a mapping phi between the vertices of two graphs, 
determine if the mapping is an isomorphism (monora 
)


Visualizations:
- dependency graph  of Loom's 
namespaces (danielcompton )

Testing:
- loom.compliance-tester: provides compliance tests for graph protocols (
mattrepl )

Links: full changelog 
, clojars 
, github 

Thanks to the contributors for their hard work!

Cheers,
Aysylu
@aysylu22

-- 
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.