[ANN] Chestnut 0.15.0

2017-05-29 Thread Arne Brasseur


After almost a year I'm pleased to announce the next major version of 
Chestnut.


Component 

The biggest change in this version is the use of Stuart Sierra's Component 
library, both on the frontend and on the backend, in combination with 
reloaded.repl and System.

This makes this release a bit less minimalist than previous versions, but 
it's in line with Chestnut's goal to provide a solid default structure to 
build upon. It also allowed us to simplify some of the code around 
starting/stopping/reloading of the application, and should all in all 
provide a better REPL experience. It also makes it easier for Chestnut to 
support more features in the future in a way that is modular and 
maintainable.


New features and changes 

Command line flags now start with a + (e.g. +http-kit) instead of --. This 
is more in line with what other templates are doing, and it works better 
with the way Leiningen deals with command line flags. The old flags are 
still supported as well.

Three new UI frameworks are supported: +re-frame, +rum, and +om-next.

A code_of_conduct.md is no longer included by default, instead it needs to 
be requested explicitly with +code-of-conduct. While we strongly encourage 
people to adopt a CoC, this is something that should be a deliberate 
choice, because it has implications on how a project is managed.

(run) has been renamed to (go), to be more in line with reloaded.repl, and 
browser-repl has been renamed to (cljs-repl) to follow the Figwheel API. 
The old versions are still available as aliases, they will be removed in 
Chestnut 1.0.

All dependencies have been upgraded to their latest versions, including

   - clojurescript 1.9.562
   - compojure 1.6.0
   - doo 0.1.7
   - environ 1.1.0
   - figwheel 0.5.10
   - http-kit 2.2.0
   - lein-cljsbuild 1.1.5
   - lein-environ 1.1.0
   - om 1.0.0-alpha48
   - org.clojure/tools.nrepl 0.2.13
   - reagent 0.6.0
   - ring 1.6.1
   - ring-defaults 0.3.0
   - transit-clj 0.8.300

Popularity poll 

By default a lein new chestnut will "phone home", reporting the Chestnut 
version and command line flags being used. It is possible to opt-out with 
the +no-poll flag.

No other information is stored, any logging for these requests is disabled. 
In particular there is no logging of the name given to the application, or 
of IP addresses or other identifiable information.

The reason for collecting this information is to help us decide which 
features to focus on, and to get a sense of how many people are opting in 
to the snapshot releases for early feedback.


Contributors 

Many thanks to the 41 people who have contributed to Chestnut since its 
inception in 2014. For this release I'd like to thank Jeff Wong in 
particular for pushing the Component integration forward.

As the Clojure landscape keeps evolving, so must Chestnut evolve with it. 
Contributions big and small are highly appreciated, whether it's code, 
documentation, or testing. If you are interested in working on a feature 
then get in touch, I would be more than happy to provide mentoring and help 
you along the way. This applies to beginners and experienced developers 
equally.

-- 
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: regarding writing unit tests in clojure for existing java code

2017-05-29 Thread manas . marthi
Hi Daniel
  Thank you!


On Monday, May 29, 2017 at 2:40:08 AM UTC+1, Daniel Compton wrote:
>
> Hi Manas
>
> I haven't used it, and it's quite old, but this may help for writing JUnit 
> tests in Clojure: 
> https://github.com/clojurebook/ClojureProgramming/tree/master/ch09-annotations.
>  
> It shows how to add JUnit annotations in Clojure, and how to run those 
> tests with Maven.
>
> On Sat, May 27, 2017 at 9:46 AM > wrote:
>
>> Hello All,.
>>
>>   We have a large java code base. Junits are not keeping in pace with the 
>> code base changes and quite a number are outdated.
>>   I was wondering if I can use clojure to write unit tests and run them 
>> using Junit Runner so that the unit tests pass inside eclipse as part of 
>> compilation of Junit test suite execution.
>>   Please can someone advise if there is any library already for achieving 
>> this 
>>
>> regards
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>
> Daniel
>

-- 
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] flights-pro, "Real" air traffic control system + flight simulator

2017-05-29 Thread ru
Hi,

1. Added GUI to control airplane dynamics of your own flights (manual and 
scheduled).
2. Increased visual distance of other airplanes.
3. Fixed some bugs.

Regards,
  Ru

воскресенье, 7 мая 2017 г., 16:47:01 UTC+3 пользователь ru написал:
>
> Hi,
>
> *flights-pro*, substantially revised version of:
>
> Air traffic control system and flight simulator - a test example for the 
> *rete4frames* (http://github.com/rururu/rete4frames) expert system shell.
> It uses *Flightradar24* (http://www.flightradar24.com) web service, 
> *Leaflet* (http://leafletjs.com) JavaScript library, *Cesium* (
> https://cesiumjs.org/) WebGL virtual globe and map engine, *geonames* (
> http://www.geonames.org) geographical data web service and *Protege-3.5* (
> http://protege.stanford.edu) ontology editor as server-side GUI and 
> Clojure/ClojureScript IDE.
>
> Site: https://github.com/rururu/flights-pro
>
> New features:
>
> 1. IDE and server-side GUI based on Protege-3.5.
> 2. Unified codebase for Clojure and ClojureScript.
> 3. Online development and debugging of Clojure, ClojureScript, HTML and 
> CSS.
> 4. Question-answering system based on Expert system.
> 5. Cumulative data base of airports and Wikipedia articles based on 
> Protege-3.5 knowledge representation system.
> 6. GUI for adjustment of scheduled flight's plan.
> 7. Educational screencasts.
>
> and more...
>
> Enjoy flying!
>
> Sincerely,
>   Ru
>

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


Real world Clojure (video).

2017-05-29 Thread Derek Troy-West
I talked recently at the Melbourne Distributed meet-up about my experience 
building HA distributed systems in Clojure, feel free to heckle me about 
the difference between a partition and a token-range:

https://www.troywest.com/blog/2017/5/16/scaling-the-event-stream

To me, Clojure is just leverage. When the problem is broadly one of 
streaming, chopping, stretching, slicing, dicing, and storing data, I have 
never been more effective at providing value to my clients as when I'm at 
the REPL. I'm an unapologetic Java recidivist, I don't know what a monad 
is, and I'll tell you a secret - I don't care.

All the best,
 Derek

p.s. come see us:

https://www.meetup.com/melbourne-distributed/
https://www.meetup.com/clj-melb/

-- 
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: slackpocalypse? next steps?

2017-05-29 Thread 'Adrian A.' via Clojure
> We’re almost certainly not going to find a *replacement* for Slack (or 
any other communications medium) 

Have you tried Mattermost? 
 - https://about.mattermost.com/
 - https://github.com/mattermost/platform


regards.

-- 
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] Chestnut 0.15.0

2017-05-29 Thread Timothy Baldridge
Might be good to provide a quick overview of what Chestnut is. It's been a
year, so I either missed the last announcement, or have forgotten in that
time. Also I see a link that would take me to the project page.

On Mon, May 29, 2017 at 5:03 AM, Arne Brasseur 
wrote:

> After almost a year I'm pleased to announce the next major version of
> Chestnut.
>
>
> Component
>
> The biggest change in this version is the use of Stuart Sierra's Component
> library, both on the frontend and on the backend, in combination with
> reloaded.repl and System.
>
> This makes this release a bit less minimalist than previous versions, but
> it's in line with Chestnut's goal to provide a solid default structure to
> build upon. It also allowed us to simplify some of the code around
> starting/stopping/reloading of the application, and should all in all
> provide a better REPL experience. It also makes it easier for Chestnut to
> support more features in the future in a way that is modular and
> maintainable.
>
>
> New features and changes
>
> Command line flags now start with a + (e.g. +http-kit) instead of --.
> This is more in line with what other templates are doing, and it works
> better with the way Leiningen deals with command line flags. The old flags
> are still supported as well.
>
> Three new UI frameworks are supported: +re-frame, +rum, and +om-next.
>
> A code_of_conduct.md is no longer included by default, instead it needs
> to be requested explicitly with +code-of-conduct. While we strongly
> encourage people to adopt a CoC, this is something that should be a
> deliberate choice, because it has implications on how a project is managed.
>
> (run) has been renamed to (go), to be more in line with reloaded.repl,
> and browser-repl has been renamed to (cljs-repl) to follow the Figwheel
> API. The old versions are still available as aliases, they will be removed
> in Chestnut 1.0.
>
> All dependencies have been upgraded to their latest versions, including
>
>- clojurescript 1.9.562
>- compojure 1.6.0
>- doo 0.1.7
>- environ 1.1.0
>- figwheel 0.5.10
>- http-kit 2.2.0
>- lein-cljsbuild 1.1.5
>- lein-environ 1.1.0
>- om 1.0.0-alpha48
>- org.clojure/tools.nrepl 0.2.13
>- reagent 0.6.0
>- ring 1.6.1
>- ring-defaults 0.3.0
>- transit-clj 0.8.300
>
> Popularity poll
>
> By default a lein new chestnut will "phone home", reporting the Chestnut
> version and command line flags being used. It is possible to opt-out with
> the +no-poll flag.
>
> No other information is stored, any logging for these requests is
> disabled. In particular there is no logging of the name given to the
> application, or of IP addresses or other identifiable information.
>
> The reason for collecting this information is to help us decide which
> features to focus on, and to get a sense of how many people are opting in
> to the snapshot releases for early feedback.
>
>
> Contributors
>
> Many thanks to the 41 people who have contributed to Chestnut since its
> inception in 2014. For this release I'd like to thank Jeff Wong in
> particular for pushing the Component integration forward.
>
> As the Clojure landscape keeps evolving, so must Chestnut evolve with it.
> Contributions big and small are highly appreciated, whether it's code,
> documentation, or testing. If you are interested in working on a feature
> then get in touch, I would be more than happy to provide mentoring and help
> you along the way. This applies to beginners and experienced developers
> equally.
>
> --
> 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.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

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

Re: slackpocalypse? next steps?

2017-05-29 Thread Sean Corfield
Yes.

 

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

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

 

On 5/29/17, 5:46 AM, "'Adrian A.' via Clojure"  wrote:

 

> We’re almost certainly not going to find a replacement for Slack (or any 
> other communications medium) 

Have you tried Mattermost? 
 - https://about.mattermost.com/
 - https://github.com/mattermost/platform




 

-- 
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] Chestnut 0.15.0

2017-05-29 Thread Nando Breiter
I'm seeing a discrepancy in version numbers.

On github -> https://github.com/plexus/chestnut, the latest commit says "Bump
to v0.15.1 and release
"
and that matches the lein coordinates given.

On the documentation -> https://plexus.github.io/chestnut/ on the changelog
page, it seems to indicate Chestnut 0.9.0 is the latest version. Perhaps
that documentation is out of date?



Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamedia

On Mon, May 29, 2017 at 5:40 PM, Timothy Baldridge 
wrote:

> Might be good to provide a quick overview of what Chestnut is. It's been a
> year, so I either missed the last announcement, or have forgotten in that
> time. Also I see a link that would take me to the project page.
>
> On Mon, May 29, 2017 at 5:03 AM, Arne Brasseur 
> wrote:
>
>> After almost a year I'm pleased to announce the next major version of
>> Chestnut.
>>
>>
>> Component
>>
>> The biggest change in this version is the use of Stuart Sierra's
>> Component library, both on the frontend and on the backend, in combination
>> with reloaded.repl and System.
>>
>> This makes this release a bit less minimalist than previous versions, but
>> it's in line with Chestnut's goal to provide a solid default structure to
>> build upon. It also allowed us to simplify some of the code around
>> starting/stopping/reloading of the application, and should all in all
>> provide a better REPL experience. It also makes it easier for Chestnut to
>> support more features in the future in a way that is modular and
>> maintainable.
>>
>>
>> New features and changes
>>
>> Command line flags now start with a + (e.g. +http-kit) instead of --.
>> This is more in line with what other templates are doing, and it works
>> better with the way Leiningen deals with command line flags. The old flags
>> are still supported as well.
>>
>> Three new UI frameworks are supported: +re-frame, +rum, and +om-next.
>>
>> A code_of_conduct.md is no longer included by default, instead it needs
>> to be requested explicitly with +code-of-conduct. While we strongly
>> encourage people to adopt a CoC, this is something that should be a
>> deliberate choice, because it has implications on how a project is managed.
>>
>> (run) has been renamed to (go), to be more in line with reloaded.repl,
>> and browser-repl has been renamed to (cljs-repl) to follow the Figwheel
>> API. The old versions are still available as aliases, they will be removed
>> in Chestnut 1.0.
>>
>> All dependencies have been upgraded to their latest versions, including
>>
>>- clojurescript 1.9.562
>>- compojure 1.6.0
>>- doo 0.1.7
>>- environ 1.1.0
>>- figwheel 0.5.10
>>- http-kit 2.2.0
>>- lein-cljsbuild 1.1.5
>>- lein-environ 1.1.0
>>- om 1.0.0-alpha48
>>- org.clojure/tools.nrepl 0.2.13
>>- reagent 0.6.0
>>- ring 1.6.1
>>- ring-defaults 0.3.0
>>- transit-clj 0.8.300
>>
>> Popularity poll
>>
>> By default a lein new chestnut will "phone home", reporting the Chestnut
>> version and command line flags being used. It is possible to opt-out with
>> the +no-poll flag.
>>
>> No other information is stored, any logging for these requests is
>> disabled. In particular there is no logging of the name given to the
>> application, or of IP addresses or other identifiable information.
>>
>> The reason for collecting this information is to help us decide which
>> features to focus on, and to get a sense of how many people are opting in
>> to the snapshot releases for early feedback.
>>
>>
>> Contributors
>>
>> Many thanks to the 41 people who have contributed to Chestnut since its
>> inception in 2014. For this release I'd like to thank Jeff Wong in
>> particular for pushing the Component integration forward.
>>
>> As the Clojure landscape keeps evolving, so must Chestnut evolve with it.
>> Contributions big and small are highly appreciated, whether it's code,
>> documentation, or testing. If you are interested in working on a feature
>> then get in touch, I would be more than happy to provide mentoring and help
>> you along the way. This applies to beginners and experienced developers
>> equally.
>>
>> --
>> 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.
>>
>
>
>
> --
> “One of the main causes of th

Re: [ANN] Chestnut 0.15.0

2017-05-29 Thread Arne Brasseur
Refer to the README on https://github.com/plexus/chestnut. The Github pages
site is no longer in use, I've deleted it.

We'll maintain the docs in the doc directory on the master tree, although
admittedly they could use a refresh.

Chestnut is a Clojure/ClojureScript application template. It was originally
conceived as an attempt to take the pain out of getting a working
ClojureScript setup with live reloading plus a browser connected REPL.

It provides a solid default configuration for a REPL driven workflow, a
ClojureScript setup with separate dev/prod/test builds, Figwheel
integration, and a basic setup for running CLJ and CLJS unit tests. It
provides a basic web backend setup with Compojure, and a frontend based on
one of the React wrappers (your choice of Om, Reagent, Rum, re-frame, or
Vanilla JS). It works out of the box on popular cloud providers like Heroku.

So while it's quite "complete" in a sense, it also tries to be minimal.
Boilerplate code is kept to a minimum, and there is only just enough
structure to get you started. How you build and structure your app from
there is up to you.

Chestnut should appeal to beginners because it allows you to get started
quickly and with minimal baggage, it should appeal to more seasoned
developers because it provides all the "obvious" configuration for a
comfortable setup, without being so opinionated that it becomes a straight
jacket.

I hope that clears things up! There is a low volume but friendly mailing
list at http://clojureverse.org/c/chestnut , where people will be happy to
answer any questions. Bug reports and feature requests can go on Github (
https://github.com/plexus/chestnut), support questions or discussions about
the direction the project should take should go on the mailing list.

Thanks,
Arne



On 29 May 2017 at 18:47, Nando Breiter  wrote:

> I'm seeing a discrepancy in version numbers.
>
> On github -> https://github.com/plexus/chestnut, the latest commit says "Bump
> to v0.15.1 and release
> "
> and that matches the lein coordinates given.
>
> On the documentation -> https://plexus.github.io/chestnut/ on the
> changelog page, it seems to indicate Chestnut 0.9.0 is the latest version.
> Perhaps that documentation is out of date?
>
>
>
> Aria Media Sagl
> +41 (0)76 303 4477 <+41%2076%20303%2044%2077> cell
> skype: ariamedia
>
> On Mon, May 29, 2017 at 5:40 PM, Timothy Baldridge 
> wrote:
>
>> Might be good to provide a quick overview of what Chestnut is. It's been
>> a year, so I either missed the last announcement, or have forgotten in that
>> time. Also I see a link that would take me to the project page.
>>
>> On Mon, May 29, 2017 at 5:03 AM, Arne Brasseur 
>> wrote:
>>
>>> After almost a year I'm pleased to announce the next major version of
>>> Chestnut.
>>>
>>>
>>> Component
>>>
>>> The biggest change in this version is the use of Stuart Sierra's
>>> Component library, both on the frontend and on the backend, in combination
>>> with reloaded.repl and System.
>>>
>>> This makes this release a bit less minimalist than previous versions,
>>> but it's in line with Chestnut's goal to provide a solid default structure
>>> to build upon. It also allowed us to simplify some of the code around
>>> starting/stopping/reloading of the application, and should all in all
>>> provide a better REPL experience. It also makes it easier for Chestnut to
>>> support more features in the future in a way that is modular and
>>> maintainable.
>>>
>>>
>>> New features and changes
>>>
>>> Command line flags now start with a + (e.g. +http-kit) instead of --.
>>> This is more in line with what other templates are doing, and it works
>>> better with the way Leiningen deals with command line flags. The old flags
>>> are still supported as well.
>>>
>>> Three new UI frameworks are supported: +re-frame, +rum, and +om-next.
>>>
>>> A code_of_conduct.md is no longer included by default, instead it needs
>>> to be requested explicitly with +code-of-conduct. While we strongly
>>> encourage people to adopt a CoC, this is something that should be a
>>> deliberate choice, because it has implications on how a project is managed.
>>>
>>> (run) has been renamed to (go), to be more in line with reloaded.repl,
>>> and browser-repl has been renamed to (cljs-repl) to follow the Figwheel
>>> API. The old versions are still available as aliases, they will be removed
>>> in Chestnut 1.0.
>>>
>>> All dependencies have been upgraded to their latest versions, including
>>>
>>>- clojurescript 1.9.562
>>>- compojure 1.6.0
>>>- doo 0.1.7
>>>- environ 1.1.0
>>>- figwheel 0.5.10
>>>- http-kit 2.2.0
>>>- lein-cljsbuild 1.1.5
>>>- lein-environ 1.1.0
>>>- om 1.0.0-alpha48
>>>- org.clojure/tools.nrepl 0.2.13
>>>- reagent 0.6.0
>>>- ring 1.6.1
>>>- ring-defaults 0.3.0
>>>- transit-clj 0.8.300
>>>
>>> Popularity poll
>>>
>>> By default a lein new chestnut w

'get' behaviors

2017-05-29 Thread reborgml
I was wondering if the following 'get' behaviors are worth a chat. 
Apologies if this is known issue, but they don't seem impossible corner 
cases to me.

#1

This one looks read-only access to me and I'm not sure why a suitable 
comparator should be in place.

(get (sorted-map :a 1 :b 2) "a" "not found");; ClassCastException

#2

'get' is happy with other transients (namely vectors and maps) but fails 
silently on sets:

(get (transient #{0 1 2}) 1);; nil

#3 (.intValue x) can throw away bits with precision loss. Sufficiently large 
keys produce the following:

(get ["a" "b" "c"] 4294967296) ;; "a"


Thanks
Renzo

-- 
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: 'get' behaviors

2017-05-29 Thread Nicola Mometto
Issue #1 had been logged in CLJ-1242, but it was later decided to just 
focus on making equality not throw as contains/get throwing is 
consistent with java behaviour, see comments from Stu and Alex here 
https://dev.clojure.org/jira/browse/CLJ-1242?focusedCommentId=40612&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-40612


Issue #2 is logged as CLJ-700 and is currently on the roadmap for 1.9 
(altho it's been postponed for a few releases already so it might happen 
again)


I'm not aware of any previous discussion on Issue #3 but IMO this is 
consistent with clojure's GIGO behaviour


On 29/05/17 19:15, rebor...@gmail.com wrote:
I was wondering if the following 'get' behaviors are worth a chat. 
Apologies if this is known issue, but they don't seem impossible 
corner cases to me.


#1

This one looks read-only access to me and I'm not sure why a suitable 
comparator should be in place.


(get(sorted-map:a1:b2)"a""not found");; ClassCastException
#2
'get' is happy with other transients (namely vectors and maps) but 
fails silently on sets:

(get(transient#{012})1);; nil
#3 (.intValue x) can throw away bits with precision loss. Sufficiently 
large keys produce the following:

(get["a""b""c"]4294967296);; "a"
Thanks
Renzo
--
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.


Re: 'get' behaviors

2017-05-29 Thread reborgml


On Monday, 29 May 2017 18:45:20 UTC+1, Nicola Mometto wrote:
>
> Issue #1 had been logged in CLJ-1242, but it was later decided to just 
> focus on making equality not throw as contains/get throwing is consistent 
> with java behaviour, see comments from Stu and Alex here 
> https://dev.clojure.org/jira/browse/CLJ-1242?focusedCommentId=40612&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-40612
>

Mmmh, I see. I've also seen now that by forcing compare semantic the tree 
search can stay O(logN) average. Removing the compare constraint would make 
the search O(n/2) avg. So there is a point I guess.

Issue #2 is logged as CLJ-700 and is currently on the roadmap for 1.9 
> (altho it's been postponed for a few releases already so it might happen 
> again)
>

Noted, thanks.
 

>
> I'm not aware of any previous discussion on Issue #3 but IMO this is 
> consistent with clojure's GIGO behaviour
>

It's kind of border line, because the doc refers to "map" and "key" as 
arguments but then it can also handle other associative things like 
vectors. nth correctly handles the outofbound. Perhaps get should do the 
same.

My 2C
Thanks
 

>
> On 29/05/17 19:15, rebo...@gmail.com  wrote:
>
> I was wondering if the following 'get' behaviors are worth a chat. 
> Apologies if this is known issue, but they don't seem impossible corner 
> cases to me.
>
> #1
>
> This one looks read-only access to me and I'm not sure why a suitable 
> comparator should be in place.
>
> (get (sorted-map :a 1 :b 2) "a" "not found");; ClassCastException
>
> #2
>
> 'get' is happy with other transients (namely vectors and maps) but fails 
> silently on sets:
>
> (get (transient #{0 1 2}) 1);; nil
>
> #3 (.intValue x) can throw away bits with precision loss. Sufficiently large 
> keys produce the following:
>
> (get ["a" "b" "c"] 4294967296) ;; "a"
>
> Thanks
> Renzo
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@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+u...@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.


Re: 'get' behaviors

2017-05-29 Thread Andy Fingerhut
On Mon, May 29, 2017 at 1:20 PM,  wrote:
>
> On Monday, 29 May 2017 18:45:20 UTC+1, Nicola Mometto wrote:
>>
>> Issue #1 had been logged in CLJ-1242, but it was later decided to just
>> focus on making equality not throw as contains/get throwing is consistent
>> with java behaviour, see comments from Stu and Alex here
>> https://dev.clojure.org/jira/browse/CLJ-1242?focusedCommentI
>> d=40612&page=com.atlassian.jira.plugin.system.
>> issuetabpanels:comment-tabpanel#comment-40612
>>
>
> Mmmh, I see. I've also seen now that by forcing compare semantic the tree
> search can stay O(logN) average. Removing the compare constraint would make
> the search O(n/2) avg. So there is a point I guess.
>

I believe it is O(log N) worst case, as well as average case, via a
balanced binary tree implementation.


>> I'm not aware of any previous discussion on Issue #3 but IMO this is
>> consistent with clojure's GIGO behaviour
>>
>
> It's kind of border line, because the doc refers to "map" and "key" as
> arguments but then it can also handle other associative things like
> vectors. nth correctly handles the outofbound. Perhaps get should do the
> same.
>

I have noticed this behavior before, but not brought it up in the group,
since my guess is that a programming mistake leading to an actual bug here
seems unlikely (i.e. you wouldn't accidentally get there from sequentially
walking through a list starting at 0 and incrementing by 1, because you'd
pretty much always hit the end of the vector/list/etc. first).  That and
the GIGO behavior that Nicola refers, and a focus on performance, combine
to mean it is unlikely that any change would be made to Clojure that leads
to a longer execution time for get when the index is in range (unlikely is
my guess -- I am not a person who makes these decisions, but have seen
several made in this direction before over the years).

It may be more likely that the Clojure core team would be willing to accept
a change to clojure.spec that would check for such erroneous inputs to
get.  If you are interested, you could try creating a JIRA ticket for a
change like that.  You could mention in the ticket that a change to
clojure.core/get might be interesting, if someone can think of a way that
has no performance impact in the non-error case.

Andy



> My 2C
> Thanks
>
>
>>
>> On 29/05/17 19:15, rebo...@gmail.com wrote:
>>
>> I was wondering if the following 'get' behaviors are worth a chat.
>> Apologies if this is known issue, but they don't seem impossible corner
>> cases to me.
>>
>> #1
>>
>> This one looks read-only access to me and I'm not sure why a suitable
>> comparator should be in place.
>>
>> (get (sorted-map :a 1 :b 2) "a" "not found");; ClassCastException
>>
>> #2
>>
>> 'get' is happy with other transients (namely vectors and maps) but fails 
>> silently on sets:
>>
>> (get (transient #{0 1 2}) 1);; nil
>>
>> #3 (.intValue x) can throw away bits with precision loss. Sufficiently large 
>> keys produce the following:
>>
>> (get ["a" "b" "c"] 4294967296) ;; "a"
>>
>> Thanks
>> Renzo
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@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.
>

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