Re: First post: how to mimic a Java List with types?

2020-08-13 Thread Alexandre Almosni
Maybe your objects could be defined by a map containing functions and objects.

So exampleAndList = {:fn and, :coll [a b c]}


And then eval goes through your objects recursively, using

(def eval [o]
(apply (:fn o) (map eval (:coll o 

- with a special case that if o is not a map but say a Boolean you just return 
itself



> On 14 Aug 2020, at 02:24, Jack Park  wrote:
> 
> 
> The problem:
> 
> In Java, I have an interface IInferrable which is basically  boolean eval();
> 
> Any Java object which extends IInferrable, no matter what it is, will answer 
> to eval() and return a boolean.
> The idea lies at the heart of an inference engine.
> 
> But, I also define a class AndList which implements IInferrable and extends 
> java.util.ArrayList
> 
> So, AndList, and its sibling OrList behave just like a List object, but also 
> will answer to eval() by running the collection and dealing with what each 
> element returns when it, too, is eval()'d.
> 
> I'd really love to discover how to pull that off in Clojure.
> 
> Many thanks in advance. -Jack
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/clojure/3e2ffc86-0e4f-4c0c-92c3-58e0848d5ba7o%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/4D1E5BB6-F34A-4379-A534-2B4F7B68CE18%40gmail.com.


Re: Clojure tools-deps Docker image versions & stable releases

2020-08-13 Thread 'Alex Miller' via Clojure


On Thursday, August 13, 2020 at 10:32:45 AM UTC-5 cap10...@gmail.com wrote:

> I was recently made aware in a separate thread in this group* that, until 
> very recently, the tools-deps versions that were being installed via the 
> main Homebrew tap's clojure installer included some versions considered 
> unstable. As of the day I'm writing this, the latest stable version is 
> 1.10.1.561.
>
> I had been updating the official clojure:tools-deps (& :latest since it 
> includes all three build tools we support) Docker image when that Homebrew 
> build updated, but am now planning to take steps to revert back to stable 
> versions only.
>
> So, I have a couple of questions:
>
> 1. For Alex Miller or other Cognitect folks: What's the best place to 
> monitor for new stable tools-deps releases (to trigger Docker image 
> updates)? Are updates to Cognitect's clojure/tools/clojure Homebrew tap 
> sufficient?
>

To answer the last question first, no - we update prerelease versions there 
all the time and those generally shouldn't be used to build new images (and 
sometimes there are manual changes too).

For current stable version, you can watch either:

https://github.com/clojure/homebrew-tools/blob/master/Formula/clojure.rb 
(the actual formula) or
https://github.com/clojure/brew-install/blob/1.10.1/stable.properties (the 
data file)
 

> 2. Does anyone have a need for Docker images with unstable tools-deps 
> versions? I'm not planning on building them unless the community has a need 
> for them. If I do build them, they would be available under 
> version-specific tags (e.g. clojure:tools-deps-1.10.1.619) but the 
> clojure:tools-deps tag would get you the latest stable release.
>

I don't think it's relevant to have every one of them for sure. I sometimes 
release multiple per day even. People might occasionally need a prerelease 
version, don't know. I'm hoping not to make the gaps too large between 
stable versions. The goal of the prereleases is really tire kicking and 
feedback on imminent stuff, but don't I expect it to get too for off of 
stable.
 

> It's also worth pointing out that the unstable versions we've already 
> released won't disappear, so if you're using them, feel free to continue. 
> If you want to ensure you stay on that version, be sure to specify it in 
> your image tag (e.g. in the FROM line of your Dockerfile).
>
> * Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main 
> 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/0d4cd4e0-e246-442f-82a4-490e5c0567b2n%40googlegroups.com.


First post: how to mimic a Java List with types?

2020-08-13 Thread Jack Park
The problem:

In Java, I have an interface *IInferrable* which is basically  boolean 
eval();

Any Java object which extends IInferrable, no matter what it is, will 
answer to eval() and return a boolean.
The idea lies at the heart of an inference engine.

But, I also define a class *AndList* which implements IInferrable and 
extends java.util.ArrayList

So, AndList, and its sibling OrList behave just like a List object, but 
also will answer to eval() by running the collection and dealing with what 
each element returns when it, too, is eval()'d.

I'd really love to discover how to pull that off in Clojure.

Many thanks in advance. -Jack

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/3e2ffc86-0e4f-4c0c-92c3-58e0848d5ba7o%40googlegroups.com.


Re: Clojure tools-deps Docker image versions & stable releases

2020-08-13 Thread Hadil Sabbagh
I have a Docker image for 1.10.1.600 in Docker Hub: 
hadils/cci-openjdk-8-tools-deps-1.10.1.600

> On Aug 13, 2020, at 2:13 PM, Wes Morgan  wrote:
> 
> I just realized I inadvertently skipped right over 1.10.1.561, so there is no 
> such Docker image tag available currently. I just issued this pull request to 
> fix that: https://github.com/docker-library/official-images/pull/8549
> 
> Moving forward that will be updated to stable releases only (unless there is 
> a strong desire for unstable release images too).
> 
> On Thursday, August 13, 2020 at 9:32:45 AM UTC-6 Wes Morgan wrote:
> I was recently made aware in a separate thread in this group* that, until 
> very recently, the tools-deps versions that were being installed via the main 
> Homebrew tap's clojure installer included some versions considered unstable. 
> As of the day I'm writing this, the latest stable version is 1.10.1.561.
> 
> I had been updating the official clojure:tools-deps (& :latest since it 
> includes all three build tools we support) Docker image when that Homebrew 
> build updated, but am now planning to take steps to revert back to stable 
> versions only.
> 
> So, I have a couple of questions:
> 
> 1. For Alex Miller or other Cognitect folks: What's the best place to monitor 
> for new stable tools-deps releases (to trigger Docker image updates)? Are 
> updates to Cognitect's clojure/tools/clojure Homebrew tap sufficient?
> 
> 2. Does anyone have a need for Docker images with unstable tools-deps 
> versions? I'm not planning on building them unless the community has a need 
> for them. If I do build them, they would be available under version-specific 
> tags (e.g. clojure:tools-deps-1.10.1.619) but the clojure:tools-deps tag 
> would get you the latest stable release.
> 
> It's also worth pointing out that the unstable versions we've already 
> released won't disappear, so if you're using them, feel free to continue. If 
> you want to ensure you stay on that version, be sure to specify it in your 
> image tag (e.g. in the FROM line of your Dockerfile).
> 
> * Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main 
> 
> 
> -- 
> 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 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/clojure/df3f1e35-3a78-4eb5-9265-0ad510f5e1d4n%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/C79733A0-576F-4EE2-ABC6-E73D97B21A37%40gmail.com.


Re: Clojure tools-deps Docker image versions & stable releases

2020-08-13 Thread Wes Morgan
I just realized I inadvertently skipped right over 1.10.1.561, so there is 
no such Docker image tag available currently. I just issued this pull 
request to fix 
that: https://github.com/docker-library/official-images/pull/8549

Moving forward that will be updated to stable releases only (unless there 
is a strong desire for unstable release images too).

On Thursday, August 13, 2020 at 9:32:45 AM UTC-6 Wes Morgan wrote:

> I was recently made aware in a separate thread in this group* that, until 
> very recently, the tools-deps versions that were being installed via the 
> main Homebrew tap's clojure installer included some versions considered 
> unstable. As of the day I'm writing this, the latest stable version is 
> 1.10.1.561.
>
> I had been updating the official clojure:tools-deps (& :latest since it 
> includes all three build tools we support) Docker image when that Homebrew 
> build updated, but am now planning to take steps to revert back to stable 
> versions only.
>
> So, I have a couple of questions:
>
> 1. For Alex Miller or other Cognitect folks: What's the best place to 
> monitor for new stable tools-deps releases (to trigger Docker image 
> updates)? Are updates to Cognitect's clojure/tools/clojure Homebrew tap 
> sufficient?
>
> 2. Does anyone have a need for Docker images with unstable tools-deps 
> versions? I'm not planning on building them unless the community has a need 
> for them. If I do build them, they would be available under 
> version-specific tags (e.g. clojure:tools-deps-1.10.1.619) but the 
> clojure:tools-deps tag would get you the latest stable release.
>
> It's also worth pointing out that the unstable versions we've already 
> released won't disappear, so if you're using them, feel free to continue. 
> If you want to ensure you stay on that version, be sure to specify it in 
> your image tag (e.g. in the FROM line of your Dockerfile).
>
> * Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main 
> 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/df3f1e35-3a78-4eb5-9265-0ad510f5e1d4n%40googlegroups.com.


Clojure tools-deps Docker image versions & stable releases

2020-08-13 Thread Wes Morgan
I was recently made aware in a separate thread in this group* that, until 
very recently, the tools-deps versions that were being installed via the 
main Homebrew tap's clojure installer included some versions considered 
unstable. As of the day I'm writing this, the latest stable version is 
1.10.1.561.

I had been updating the official clojure:tools-deps (& :latest since it 
includes all three build tools we support) Docker image when that Homebrew 
build updated, but am now planning to take steps to revert back to stable 
versions only.

So, I have a couple of questions:

1. For Alex Miller or other Cognitect folks: What's the best place to 
monitor for new stable tools-deps releases (to trigger Docker image 
updates)? Are updates to Cognitect's clojure/tools/clojure Homebrew tap 
sufficient?

2. Does anyone have a need for Docker images with unstable tools-deps 
versions? I'm not planning on building them unless the community has a need 
for them. If I do build them, they would be available under 
version-specific tags (e.g. clojure:tools-deps-1.10.1.619) but the 
clojure:tools-deps tag would get you the latest stable release.

It's also worth pointing out that the unstable versions we've already 
released won't disappear, so if you're using them, feel free to continue. 
If you want to ensure you stay on that version, be sure to specify it in 
your image tag (e.g. in the FROM line of your Dockerfile).

* Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main 


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/3630ccb6-7d31-4f23-ab67-1b86da187cebn%40googlegroups.com.