Re: Rusts Upgrades

2018-07-29 Thread Alan Moore
Has anyone looked for vulnerabilities exposed by pulling random libraries 
from github.com (or gitlab.com?) and building them? Macros come mind 
(mined?!) Solved problem? AFAIK the Rust compiler can't run arbitrary code.

Also instead of choosing "top-N projects on Github" I would begin with the 
"most used projects on clojars" (# downloads in the last 12 months?) as 
that might be a better metric/signal for prioritizing which libraries to 
include. #RememberLeftPad

Don't get me wrong, I like the idea. I'm just trying to think through the 
possible hazards.

Alan

On Friday, July 27, 2018 at 4:11:27 PM UTC-7, Nathan Fisher wrote:
>
> Hi Folks,
>
> Reading up the recent blog post “What is Rust 2018” and happened upon this;
>
> “We put in a lot of work to make upgrades painless; for example, we run a 
> tool (called “crater”) before each Rust release that downloads every 
> package on crates.io and attempts to build their code and run their 
> tests.” - https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html
>
> Seems an interesting idea and with Travis and other CI services providing 
> free builds for OSS it doesn’t need to put a heavy financial/operational 
> burden on a single entity. The main benefit for this is for people could 
> get a quick centralised overview of compatibility of various projects and 
> impending releases of Clojure.
>
> The main idea would be to have a grid view of the latest Clojure projects 
> and their status against HEAD of Clojure (are snapshots pushed to a maven 
> repo automatically as a result of a commit build?). Travis allows periodic 
> builds so that could be used to trigger verification even when changes 
> haven’t occurred.
>
> In terms of initial focus targeting the top-N projects on Github makes the 
> most sense to me. The bit I’m still thinking through is providing some form 
> of dashboard/aggregation without requiring a large investment in changes, 
> infrastructure, etc. Might fit in nicely with something like clojars? Was 
> thinking initially having a Github page with a table of projects and their 
> build badges and talking to maintainers about configuring periodic builds 
> with the latest Clojure snapshot.
>
> Thoughts?
>
> Cheers,
> Nathan
> -- 
> - sent from my mobile
>

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


Type hinting protocol functions

2018-07-29 Thread Mark Engelberg
I'm having trouble finding current documentation for type hinting protocol
functions.

Things like:
Do you type hint the protocol definition or the implementation?
Does type hinting primitives work?
What about for a return value?
What is the behavior if you type hint some of the parameters but not the
others?

Can someone point me in the right direction for this sort of info?

-- 
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: Using dynamically loaded namespaces like plug-ins

2018-07-29 Thread 'Daniel de Oliveira' via Clojure
Hi James,

thank you so much, that really gave me the right direction. 
I integrated your proposal and refactored until I got 

- config.clj

(ns aigympoc.config)

(def scenario "aigympoc.scenario2")


- gameloop.clj

(ns aigympoc.gameloop
  (:gen-class
:init init)

(defn -init
  []
  (require (symbol aigympoc.config/scenario)))
(defn scenario-success?
  []
  ((find-var (symbol aigympoc.config/scenario "success?"
(defn scenario-improve
  []
  ((find-var (symbol aigympoc.config/scenario "improve"


This now does what I wanted. I can configure and load the ns at runtime and 
use this as sort of an plug in interface.
Thank you very much!

PS:
What was important for me in the PoC was that it would work without aot'ing 
the scenario2.clj, which it does.










Am Sonntag, 29. Juli 2018 20:38:36 UTC+2 schrieb James Reeves:
>
> You could write it like this:
>
> (defn scenario-improve []
>   (let [ns (str "aigympoc." aigympoc.config/scenario)]
> (eval (read-string (str "(do (require '" ns ") (" ns "/improve)")
>
> So we require, then run the function. However, we don't need to use eval 
> here if we require the namespace and find the var directly:
>
> (defn scenario-improve []
>   (let [ns (symbol (str "aigympoc." aigympoc.config/scenario))]
> (require ns)
> (let [improve (find-var (symbol ns "improve"))]
>   (improve
>
> On Sun, 29 Jul 2018 at 18:50, 'Daniel de Oliveira' via Clojure <
> clo...@googlegroups.com > wrote:
>
>> Hi there,
>>
>> I wanted to use dynamic loading of namespaces to achieve sort of a plugin 
>> structure but got kind of struck.
>>
>> I have a leiningen project, with the following files:
>>
>> -- src/aigympoc/config.clj
>>
>> (ns aigympoc.config)
>>
>> (def scenario "aigympoc.scenario1")
>>
>>
>> - src/aigympoc/scenario1.clj
>>
>> (ns aigympoc.scenario1)
>>
>> (defn improve [] ...)
>> (defn success? [] ...)
>>
>>
>> - src/aigympoc/scenario2.clj
>>
>> (ns aigympoc.scenario2)
>>
>> (defn improve [] ...)
>> (defn success? [] ...)
>>
>>
>> - src/aigympoc/gameloop.clj
>>
>>
>> (ns aigympoc.gameloop
>>   (:require
>> aigympoc.config
>> ...
>> aigympoc.scenario1; <-- how to get 
>> aigympoc.scenario2))) ; <-- rid of these
>>
>> ...
>>
>>
>> (defn step
>>
>>   []
>>
>>...
>>   (do
>> (if (= (scenario-success?) \t)
>>   (prn "success")
>>   (do (scenario-improve)
>>
>>
>> (defn scenario-improve
>>   []
>>   (eval (read-string (str "(aigympoc." aigympoc.config/scenario 
>> "/improve)"
>>
>>
>> (defn scenario-success?
>>   []
>>   (eval (read-string (str "(aigympoc." aigympoc.config/scenario 
>> "/success?)"
>>
>>
>> I would really like to get rid of the requires to aigympoc.scenario1 and 
>> aigympoc.scenario1,
>>
>> so that scenarios can get loaded on the fly, by just putting a new file to a 
>> folder and setting the name in the config (or giving it on runtime). 
>>
>> I spent quite some time on it, but cannot figure it out.
>>
>>
>> I'm really new to clojure so I think I may be trying to use it 
>> non-idiomatically and there are better ways for doing it.
>> In any case I would be happy if someone more experienced could point me 
>> in the right direction.
>>
>>
>>
>>
>> -- 
>> 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.
>>
>
>
> -- 
> James Reeves
> booleanknot.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: Using dynamically loaded namespaces like plug-ins

2018-07-29 Thread James Reeves
You could write it like this:

(defn scenario-improve []
  (let [ns (str "aigympoc." aigympoc.config/scenario)]
(eval (read-string (str "(do (require '" ns ") (" ns "/improve)")

So we require, then run the function. However, we don't need to use eval
here if we require the namespace and find the var directly:

(defn scenario-improve []
  (let [ns (symbol (str "aigympoc." aigympoc.config/scenario))]
(require ns)
(let [improve (find-var (symbol ns "improve"))]
  (improve

On Sun, 29 Jul 2018 at 18:50, 'Daniel de Oliveira' via Clojure <
clojure@googlegroups.com> wrote:

> Hi there,
>
> I wanted to use dynamic loading of namespaces to achieve sort of a plugin
> structure but got kind of struck.
>
> I have a leiningen project, with the following files:
>
> -- src/aigympoc/config.clj
>
> (ns aigympoc.config)
>
> (def scenario "aigympoc.scenario1")
>
>
> - src/aigympoc/scenario1.clj
>
> (ns aigympoc.scenario1)
>
> (defn improve [] ...)
> (defn success? [] ...)
>
>
> - src/aigympoc/scenario2.clj
>
> (ns aigympoc.scenario2)
>
> (defn improve [] ...)
> (defn success? [] ...)
>
>
> - src/aigympoc/gameloop.clj
>
>
> (ns aigympoc.gameloop
>   (:require
> aigympoc.config
> ...
> aigympoc.scenario1; <-- how to get
> aigympoc.scenario2))) ; <-- rid of these
>
> ...
>
>
> (defn step
>
>   []
>
>...
>   (do
> (if (= (scenario-success?) \t)
>   (prn "success")
>   (do (scenario-improve)
>
>
> (defn scenario-improve
>   []
>   (eval (read-string (str "(aigympoc." aigympoc.config/scenario 
> "/improve)"
>
>
> (defn scenario-success?
>   []
>   (eval (read-string (str "(aigympoc." aigympoc.config/scenario 
> "/success?)"
>
>
> I would really like to get rid of the requires to aigympoc.scenario1 and 
> aigympoc.scenario1,
>
> so that scenarios can get loaded on the fly, by just putting a new file to a 
> folder and setting the name in the config (or giving it on runtime).
>
> I spent quite some time on it, but cannot figure it out.
>
>
> I'm really new to clojure so I think I may be trying to use it
> non-idiomatically and there are better ways for doing it.
> In any case I would be happy if someone more experienced could point me in
> the right direction.
>
>
>
>
> --
> 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.
>


-- 
James Reeves
booleanknot.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.


Using dynamically loaded namespaces like plug-ins

2018-07-29 Thread 'Daniel de Oliveira' via Clojure
Hi there,

I wanted to use dynamic loading of namespaces to achieve sort of a plugin 
structure but got kind of struck.

I have a leiningen project, with the following files:

-- src/aigympoc/config.clj

(ns aigympoc.config)

(def scenario "aigympoc.scenario1")


- src/aigympoc/scenario1.clj

(ns aigympoc.scenario1)

(defn improve [] ...)
(defn success? [] ...)


- src/aigympoc/scenario2.clj

(ns aigympoc.scenario2)

(defn improve [] ...)
(defn success? [] ...)


- src/aigympoc/gameloop.clj


(ns aigympoc.gameloop
  (:require
aigympoc.config
...
aigympoc.scenario1; <-- how to get 
aigympoc.scenario2))) ; <-- rid of these

...


(defn step

  []

   ...
  (do
(if (= (scenario-success?) \t)
  (prn "success")
  (do (scenario-improve)


(defn scenario-improve
  []
  (eval (read-string (str "(aigympoc." aigympoc.config/scenario "/improve)"


(defn scenario-success?
  []
  (eval (read-string (str "(aigympoc." aigympoc.config/scenario "/success?)"


I would really like to get rid of the requires to aigympoc.scenario1 and 
aigympoc.scenario1,

so that scenarios can get loaded on the fly, by just putting a new file to a 
folder and setting the name in the config (or giving it on runtime). 

I spent quite some time on it, but cannot figure it out.


I'm really new to clojure so I think I may be trying to use it 
non-idiomatically and there are better ways for doing it.
In any case I would be happy if someone more experienced could point me in 
the right direction.




-- 
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: Improving Library Status Visibility - was Re: Rusts Upgrades

2018-07-29 Thread Nathan Fisher
Hi Alex,

I don't think it would be necessary to scrape the Jenkins server too often.
I speculate daily would be enough, hourly at most.

Cheers,
Nathan

On Sun, 29 Jul 2018 at 03:42 Alex Miller  wrote:

> On contribs, I just added the emeddable build status plugin - that’s easy.
> Migrating to Travis or Circle is not really a viable option based on my
> last research on this. I’d be a little worried about adding a lot of
> traffic that parsed the feeds. The box running Jenkins is already
> underpowered and Is hate to add load just for that.
>
> --
> 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.
>
-- 
- sent from my mobile

-- 
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: Atom/Clojure N00b - dependency issue

2018-07-29 Thread Evgeny Igin
As Benoît Fleury mentioned, check double quotes around proto-repl version 
(see row #7 https://pastebin.com/aibpkYdN).

суббота, 28 июля 2018 г., 15:10:33 UTC+3 пользователь Bruce Hunter написал:
>
> I have installed Atom and Clojure in order to learn the language, however 
> I am having a problem getting proto-repl to work. Here is the error message 
> I am getting:
>
> Could not find artifact repo.clojars.org:proto-repl:jar:�0.3.1� in central 
> (https://repo1.maven.org/maven2/)
> Could not find artifact repo.clojars.org:proto-repl:jar:�0.3.1� in clojars 
> (https://repo.clojars.org/)
>
> According to some help I have found online, I need to add proto-repl to 
> the project dependencies. Understand that I am only just starting out in 
> the language, the advice wasn't very specific, so I am not sure I have got 
> this right. Here is my project.clj file:
>
> (defproject welcometoclojurebridge "0.1.0-SNAPSHOT"
>   :description "Welcome to ClojureBridge InstallFest app"
>   :license {:name "Eclipse Public License"
> :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :dependencies [[org.clojure/clojure "1.8.0"]
>  [quil "2.2.6"]
>  [proto-repl “0.3.1”]])
>
> Does that look right? Atom is telling me it isn't right. Any help getting 
> up and running would be much appreciated! Sorry for the braindead n00b 
> question!
>
> Bruce.
>

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


Improving Library Status Visibility - was Re: Rusts Upgrades

2018-07-29 Thread Alex Miller
On contribs, I just added the emeddable build status plugin - that’s easy. 
Migrating to Travis or Circle is not really a viable option based on my last 
research on this. I’d be a little worried about adding a lot of traffic that 
parsed the feeds. The box running Jenkins is already underpowered and Is hate 
to add load just for that.

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