Re: clj deps.edn :git overture rejected by ssh server, citing dss

2018-12-30 Thread skuro
I previously had some issues 
 with SSH 
negotiation and clj, maybe adding something like

Host your.git.server.com # <--- adapt this one to your needs
  HostKeyAlgorithms ssh-rsa  # <--- or whatever algo works for your server, 
`ssh -Q key ...` is your friend


to your ~/.ssh/config can help?


Il giorno domenica 30 dicembre 2018 22:21:36 UTC+1, Matching Socks ha 
scritto:
>
> The git command can clone, push, pull, etc.; so I think that the git url 
> and the key pair are OK.  
>
> But clj throws an exception when using that git url:
>
> ...
> Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail
> at com.jcraft.jsch.Session.receive_kexinit(Session.java:590)
>
>
> The git server administrator checked the logs and found this clue:
>
> Unable to negotiate with xx.xxx.xx.xxx port 34746: no matching host key 
> type found. Their offer: +ssh-dss [preauth]
>
> The server administrator is disinclined to override the supposedly secure 
> defaults and enable dss.  To work around this problem, can clj use rsa 
> instead of dss?
>
>

-- 
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: Destructing lists using -> Difference between '(:opt1 true) and [:opt1 true]

2017-01-03 Thread skuro
It all boils down to the fact that vectors are not seqs. If you macroexpand:

user> > (macroexpand '(let [{:keys [opt1]}  [:opt1 true]] [opt1]))
(let* [map__22659 [:opt1 true] 
   map__22659 (if (clojure.core/seq? map__22659) 
(clojure.lang.PersistentHashMap/create 
(clojure.core/seq map__22659))  ;; <--- here!
map__22659) 
   opt1 (clojure.core/get map__22659 :opt1)] 
  [opt1])

so if you :keys destructure something which is not a seq it will be passed 
directly to clojure.core/get, otherwise it's used to create a 
PersistentHashMap (notably, PersistentHashMap cannot be created from a 
vector since it's not an ISeq 

).

Cheers,
c.

Il giorno lunedì 2 gennaio 2017 19:03:50 UTC+1, Nicola Mometto ha scritto:
>
> AFAIK treating kv lists as maps in destructuring was only introduced to 
> support kwargs destructuring, hence why it's not supported for vectors.
>
> On 02/01/17 18:00, Sean Corfield wrote:
>
> This one had me scratching my head a bit too… here’s what I _*think*_ is 
> going on:
>
>  
>
> First off, note that the most usual way to use the :keys destructuring is 
> with a map:
>
>  
>
> (let [{:keys [opt1]}  {:opt1 true}] [opt1]) ==> [true]
>
>  
>
> As you noted, the guide explicitly calls out “lists” and in this case you 
> are passing a literal list:
>
>  
>
> (let [{:keys [opt1]} '(:opt1 true)] [opt1]) ==> [true]
>
>  
>
> You’d also get the same answer with:
>
>  
>
> (let [{:keys [opt1]} (list :opt1 true)] [opt1]) ==> [true]
>
>  
>
> But in this code, you have a vector, not a list:
>
>  
>
> (let [{:keys [opt1]}  [:opt1 true]] [opt1]) ==> [nil]
>
>  
>
> If you turn your vector into a sequence, it _*does*_ work:
>
> 
>
> (let [{:keys [opt1]}  (seq [:opt1 true])] [opt1]) ==> 
> [true]
>
>  
>
> So it allows lists and sequences but not vectors here. 
>
>  
>
> I’d be interested to know why vector isn’t treated the same as list / 
> sequence here...?
>
>  
>
> 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 1/2/17, 2:41 AM, "mattias w"  behalf of matt...@gmail.com > wrote:
>
>  
>
> Could someone explain why the first doesn't work and the 2nd does?
>
>  
>
> (let [{:keys [opt1]}  [:opt1 true]] [opt1]) ==> [nil]
>
>  
>
> (let [{:keys [opt1]} '(:opt1 true)] [opt1]) ==> [true]
>
>  
>
> According to http://clojure.org/guides/destructuring
>
>  
>
> "Associative destructuring also works with lists of key-value pairs for 
> keyword-arg parsing."
>
>  
>
> If I read the definition literally, I see, it says "lists" and not 
> "sequences", so the behaviour is correct, so maybe a better question is why 
> the definitions isn't
>
>  
>
> "Associative destructuring also works with sequences of key-value pairs 
> for keyword-arg parsing."
>
>  
>
> It this specific case, when you destructor the args, it looks like a 
> vector, but internally it is a list, so it works. 
>
>  
>
> Happy New Year!
>
> -- 
> 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 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

Re: How to include ... in project.clj

2015-06-05 Thread skuro
There's something fishy going on with that dependency: the SHA1 hash of the 
artifact doesn't match with the expected one coming from the repo. Try 
adding a 

:checksum :ignore


to shapshots-repo in project.clj, it should solve your issue. 

HTH,
c.

Il giorno giovedì 4 giugno 2015 18:07:58 UTC+2, Jacob Goodson ha scritto:

 Thanks, one last question(hopefully)... I have gotten it to pull down the 
 sphinx4-core but for some reason it will not pull down the data.

 :dependencies [[org.clojure/clojure 1.6.0]
[edu.cmu.sphinx/sphinx4-data 1.0-SNAPSHOT]
[edu.cmu.sphinx/sphinx4-core 1.0-SNAPSHOT]]

 :repositories [[snapshots-repo {:url 
 https://oss.sonatype.org/content/repositories/snapshots}]])


 This is the way it looks on the website:

 dependency
   groupIdedu.cmu.sphinx/groupId
   artifactIdsphinx4-data/artifactId
   version1.0-SNAPSHOT/version/dependency

 Finally, here is the url itself:

 http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4

 Thanks!


 On Thursday, June 4, 2015 at 7:31:12 AM UTC-4, skuro wrote:

 Have a look at the sample-project.clj 
 https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L78,
  
 as you can read:

 ;; Repositories named snapshots and releases automatically 
 ;; have their :snapshots and :releases disabled as appropriate.

 hence, you should do this way:

   :dependencies [...  [edu.cmu.sphinx/sphinx4-core 1.0-SNAPSHOT]]
   :repositories [[snapshots {:url 
 https://oss.sonatype.org/content/repositories/snapshots}]]


 c.

 Il giorno mercoledì 3 giugno 2015 18:12:44 UTC+2, Jacob Goodson ha 
 scritto:

 How would I get this to work?

 project
 ...
 repositories
 repository
 idsnapshots-repo/id
 urlhttps://oss.sonatype.org/content/repositories/snapshots 
 https://www.google.com/url?q=https%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshotssa=Dsntz=1usg=AFQjCNH1ZZwCQETyq4eyLn7b7QP-ypp-lA/url
 releasesenabledfalse/enabled/releases
 snapshotsenabledtrue/enabled/snapshots
 /repository
 /repositories
 .../project

 Then add sphinx4-core to the project dependencies:

 dependency
   groupIdedu.cmu.sphinx/groupId
   artifactIdsphinx4-core/artifactId
   version1.0-SNAPSHOT/version/dependency



-- 
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: How to include ... in project.clj

2015-06-04 Thread skuro
Have a look at the sample-project.clj 
https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L78, 
as you can read:

;; Repositories named snapshots and releases automatically 
;; have their :snapshots and :releases disabled as appropriate.

hence, you should do this way:

  :dependencies [...  [edu.cmu.sphinx/sphinx4-core 1.0-SNAPSHOT]]
  :repositories [[snapshots {:url 
https://oss.sonatype.org/content/repositories/snapshots}]]


c.

Il giorno mercoledì 3 giugno 2015 18:12:44 UTC+2, Jacob Goodson ha scritto:

 How would I get this to work?

 project
 ...
 repositories
 repository
 idsnapshots-repo/id
 urlhttps://oss.sonatype.org/content/repositories/snapshots 
 https://www.google.com/url?q=https%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshotssa=Dsntz=1usg=AFQjCNH1ZZwCQETyq4eyLn7b7QP-ypp-lA/url
 releasesenabledfalse/enabled/releases
 snapshotsenabledtrue/enabled/snapshots
 /repository
 /repositories
 .../project

 Then add sphinx4-core to the project dependencies:

 dependency
   groupIdedu.cmu.sphinx/groupId
   artifactIdsphinx4-core/artifactId
   version1.0-SNAPSHOT/version/dependency



-- 
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: a record that implements the iFn protocol can itself be called as a function?

2015-05-15 Thread skuro
Why not trying it right away in the REPL?

user= (defrecord Bar [state]) ; - not implementing IFn
 user.Bar
 user= ((-Bar foo)) 


 ClassCastException user.Bar cannot be cast to clojure.lang.IFn 
  user/eval15532 (form-init5689008917050406381.clj:1)
 user= (defrecord Foo [state] clojure.lang.IFn (invoke [this] (println my 
 state is state)))
 user.Foo
 user= ((-Foo foo))
 my state is foo
 nil

user= ((-Foo foo bar))
 ArityException Wrong number of args (2) passed to: 
 user/eval15486/-Foo--15498  clojure.lang.AFn.throwArity (AFn.java:429) 


Here you have it: implementing IFn is enough to use a record as a function. 
You can then implement just the arities you're interested into.

Cheers,
c.

Il giorno giovedì 14 maggio 2015 21:32:37 UTC+2, piast...@gmail.com ha 
scritto:

 The docs offer this example: 

 https://clojuredocs.org/clojure.core/defrecord

 user= (defrecord Someone [nick-name preffered-drink] Fun-Time (drinky-drinky 
 [_] (str nick-name (having  preffered-drink ): uuumm)))
 user.Someone

 user= (def dude (-Someone belun daiquiri))
 #'user/dude

 user= (drinky-drinky dude)
 belun(having daiquiri): uuumm

 But if a record implements clojure.lang.IFn it can be called directly? Do I 
 understand this correctly? When I run macroexpand-all on defrecord-ifn, as 
 defined here: 

 https://github.com/overtone/overtone/blob/e200075da27375727db1f5ce342e2e1c22ea1dbd/src/overtone/helpers/lib.clj

 I see that it extends clojure.lang.IFn as in: 

 clojure.lang.IFn 
 (invoke [this__1446__auto__] 
   ((fn [this  args] 
 (apply synth-player sdef params this [:tail instance-group] args)) 
 this__1446__auto__)) 
 (invoke [this__1447__auto__ arg0] 
   ((fn [this  args] 
 (apply synth-player sdef params this [:tail instance-group] args)) 
 this__1447__auto__ arg0)) 
 // etc, all 20 arities are defined

 So, that means I could call the record as a function? 




-- 
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: avian vm or robovm for desktop binary executables?..anyone has tried??

2015-03-15 Thread skuro
Hi coco,

I tried with Avian, and unfortunately there's quite a big part of the 
standard classes that Clojure needs that Avian still doesn't implement. 
Clojure fails to bootstrap altogether.

c.

Il giorno sabato 14 marzo 2015 00:59:01 UTC+1, coco ha scritto:

 Hi guys, I'm curiouss if its possible use avian or robovm for distribute 
 binary desktop executables for linux,mac or windows...seems to be possible 
 https://news.ycombinator.com/item?id=7579737 , 
 http://labb.zafena.se/?p=673

 but I've not found so much information about it :S..
 I think than it would be a great big step for java , dont depend of VM 
 which consume a lot of memory and slow app startups caused by JIT 
 compiler...the jvm is great for web apps but obviously it's not the better 
 choice for desktop apps and considering than clojure is great language for 
 scripts and sys admin but the jvm is not, would be great use an alternative 
 for command line apps too... what do you think?
 anyone has experience using avian or robovm?..what disadvantages has 
 found? any problem or issue?...thanks!!


-- 
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: [CFP] October Amsterdam Clojure -- Saturday October 27

2012-10-07 Thread skuro
Hi all,

The final schedule is finally online and registrations are open (the event 
is completely FREE to attend, but seating is limited). A full day of 
Clojure fun, with speakers coming from all over Europe. Check out the 
details at:

http://amsclj.nl/october.html
http://lanyrd.com/2012/octamsclj/

Book your seat at:

http://www.meetup.com/The-Amsterdam-Clojure-Meetup-Group/events/74036402/

Thanks,
c.

Il giorno giovedì 19 luglio 2012 19:12:31 UTC+2, skuro ha scritto:

 Dear Clojurians,

 as it already happened the past two https://vimeo.com/15046335 
 yearshttps://github.com/ams-clj/ams-clj.github.com/raw/master/FlyerCarlo.png,
  
 the Dutch Clojure community will organize the October Amsterdam Clojure 
 2012, to be held on Saturday, October 27th.
 We're now opening the Call For Presentations, we will give the stage to 
 the best 10 tracks to be voted by the end of September by all the Meetup 
 members.

 You can find more info on the (free!) event http://bit.ly/octamsclj12, 
 the meetup http://www.meetup.com/The-Amsterdam-Clojure-Meetup-Group/ or 
 go straight to the presentation submission 
 formhttps://docs.google.com/spreadsheet/embeddedform?formkey=dHRXdkM0UTZMTXVuSUl0TDE3QU5nTWc6MQ.
  
 We will close the CFP on September 12th.

 Looking forward to seeing your proposals and meeting you in October in 
 Amsterdam!
 Thanks,
 c.


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

[CFP] October Amsterdam Clojure -- Saturday October 27

2012-07-19 Thread skuro
Dear Clojurians,

as it already happened the past two https://vimeo.com/15046335 
yearshttps://github.com/ams-clj/ams-clj.github.com/raw/master/FlyerCarlo.png, 
the Dutch Clojure community will organize the October Amsterdam Clojure 
2012, to be held on Saturday, October 27th.
We're now opening the Call For Presentations, we will give the stage to the 
best 10 tracks to be voted by the end of September by all the Meetup 
members.

You can find more info on the (free!) event http://bit.ly/octamsclj12, 
the meetup http://www.meetup.com/The-Amsterdam-Clojure-Meetup-Group/ or 
go straight to the presentation submission 
formhttps://docs.google.com/spreadsheet/embeddedform?formkey=dHRXdkM0UTZMTXVuSUl0TDE3QU5nTWc6MQ.
 
We will close the CFP on September 12th.

Looking forward to seeing your proposals and meeting you in October in 
Amsterdam!
Thanks,
c.

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