Support BCI in Clojure –- Help us bring Brain Pong to reClojure!

2025-04-11 Thread Melody
Hi Clojurians, I am trying to build Brain Pong — a game controlled entirely by brainwaves using OpenBCI and Clojure/Script. Yep, no hands — just thoughts. This project is more than a demo - it's the beginning of an open Clojure-based BCI (brain-computer interface) API for the whole community

Let us help each other prepare conference talks

2025-02-04 Thread Daniel Slutsky
As we have done in the past, Scicloj will be running sessions and 1-1 meetings to help Clojurians prepare data-related talks: https://clojureverse.org/t/let-us-help-each-other-prepare-conference-talks/ Please reach out soon of you are considering some of the coming conferences. -- You received

Opportunity to help students contribute to your open source projects

2020-05-11 Thread learner-forever
Hello All, Check this https://fellowship.mlh.io/maintainers. Since no Clojure projects applied for GSOC or Outreachy this year, check out MLH fellowship where you can mentor students to contribute to your own open-source projects. cheers! Noor Afshan Fathima -- You received this message because

Re: Help test the new Clojars server

2020-03-16 Thread Matching Socks
I can tell by the beet-colored theme that beta.clojars.org is a wholesome replica. -- 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 b

Help test the new Clojars server

2020-03-15 Thread Toby Crawley
Howdy folks! We have set up a new Clojars server, and we would love help testing it. Interested? Read on for details! ## How to test it The server is available at https://beta.clojars.org. It shares the same database and repository as the existing server. You can test it by using it for

Re: Macro help/strategy for writing a tiny DSL for circuit-model quantum computing?

2019-05-16 Thread Vic Putz
Alex-- The reason I'm starting with macros is that they're the high-risk/less-understood part of this; the rest is more or less straightforward, so I want to get a vertical slice working as soon as possible and expand from there. 1. Start with data - what are the entities (bits? gates?), and h

Re: Macro help/strategy for writing a tiny DSL for circuit-model quantum computing?

2019-05-15 Thread Alex Miller
My general advice would be not to start with macros. 1. Start with data - what are the entities (bits? gates?), and how do you represent them? It's ok (actually better) for these to be verbose. Plan for extension (maps are open, which is why they're so common in representing data in Clojure).

Macro help/strategy for writing a tiny DSL for circuit-model quantum computing?

2019-05-15 Thread Vic Putz
...which sounds a LOT more complex than it is. I don't care about simulation--there are great Python-based packages for that. I don't even care about verification or optimization yet; I just want to generate a data structure that's exportable in, say, EDN that I can write a parser for in Pyth

Thread-local with-redefs: Help with reviewing the implementation

2019-04-01 Thread Mourjo Sen
Hi every one, I wrote this tiny utility as an alternative to with-redefs such that the redefinition is done only on that thread and not others (ie, the global definition remains the same and redefinitions are per-thread). This is a fork from @gfredericks’s original solution https://gist.githu

Re: Help API

2018-02-13 Thread Mortimer Cladwell
JavaHelp will work. Details here <http://www.stihie.net/lnsDFoKytr/2018/02/12/jhelpintro/> On Wednesday, December 27, 2017 at 8:17:09 AM UTC-5, Mortimer Cladwell wrote: > > I am looking for a help api for my clojure application, something that > will pop up when the user sele

Re: Help please: New to clojure development

2018-02-07 Thread Nadeen Kurz
This is intended as a quick-start to a common way of problem-solving with > Clojure. > > The README explains more, and should help you decide if it's for you. > > (Shameless plug, because I think it's going to be useful in your > particular case.) > > Further, in c

Re: Help please: New to clojure development

2018-02-06 Thread Aditya Athalye
and should help you decide if it's for you. (Shameless plug, because I think it's going to be useful in your particular case.) Further, in case you have not come across it yet, the official Clojure website also links to many resources, under the "Getting Started" pa

Re: Help please: New to clojure development

2018-02-06 Thread Andy Fingerhut
don't know what I was thinking. > > Thanks everyone for your help, really appreciate it. > > On Feb 6, 2018 10:32 AM, "Simon Luetzelschwab" wrote: > >> Hi Nadeen, >> >> Welcome to Clojure! >> >> I'd recommend incorporating Cloju

Re: Help please: New to clojure development

2018-02-06 Thread Nadeen Kurz
Thanks Simon, I am using the repl and I am sorry, I should have click share to make it easier, don't know what I was thinking. Thanks everyone for your help, really appreciate it. On Feb 6, 2018 10:32 AM, "Simon Luetzelschwab" wrote: > Hi Nadeen, > > Welcome to Cl

Re: Help please: New to clojure development

2018-02-06 Thread Simon Luetzelschwab
> > (defn state-desc2 [input-file] > (let [desc2 (:st_abbrev input-file)] > (case desc2 > "AZ" (assoc input-file :state "Arizona") > "FL" (assoc input-file :state "Florida") > "OH" (assoc

Re: Help please: New to clojure development

2018-02-06 Thread Nadeen Kurz
"OH" (assoc input-file :state "Ohio") "default"))) You could also write it as: (def state-names {"AZ" "Arizona", "FL" "Florida", "OH" "Ohio"}) (defn state-desc3 [input-file] (assoc input-file

Re: Help please: New to clojure development

2018-02-05 Thread James Reeves
ult"))) You could also write it as: (def state-names {"AZ" "Arizona", "FL" "Florida", "OH" "Ohio"}) (defn state-desc3 [input-file] (assoc input-file :state (state-names (:st_abbrev input-file On 6 February 2

Help please: New to clojure development

2018-02-05 Thread Nadeen Kurz
Can someone help me with the following please: I am new to clojure and i haven't developed in 4 years, previous was mainframe. See questions in blue ; Task is to add full state name based on st_abbr (def input-file [{:st_abbrev "AZ", :firstname "joh

Help API

2017-12-27 Thread Mortimer Cladwell
I am looking for a help api for my clojure application, something that will pop up when the user selects "Help" from the main menu bar. Something supporting context sensitive help would be desirable. Something like javahelp, but I don't see clojure support for javahelp, oth

Re: Help with strange test output when deftest used inside a macro

2017-10-10 Thread Matt Grimm
Excellent, thanks! The actual macro is indeed a little more complicated, but the test assertions are limited to (is (= ...)), so replacing = with ~'= works perfectly. On Tuesday, October 10, 2017 at 3:10:37 AM UTC-6, Gary Verhaegen wrote: > > is is looking for specific patterns and, if it can't

Re: Help with strange test output when deftest used inside a macro

2017-10-10 Thread Gary Verhaegen
is is looking for specific patterns and, if it can't find a known one, defaults to assuming its argument is a random predicate and prints that. So what's happening here is the syntax quote expands (resolves) = to clojure.core/= and thus it doesn't match the pattern for = anymore. So you'd need

Re: Help with strange test output when deftest used inside a macro

2017-10-09 Thread Timothy Baldridge
The problem isn't the macro, it's your use of syntax quoting. `(= x y) gets expanded at read-time into `(clojure.core/= x y)`. Not much you can do about that. Although I'd suggest perhaps changing your code a bit to not require macros. deftest mostly just creates a defn with some extra metadata an

Help with strange test output when deftest used inside a macro

2017-10-09 Thread Matt Grimm
Hello, I'm generating deftest's using a helper macro that takes a variety of test parameters and though the tests function correctly, the output of a failed test is not exactly right. The expect value is shown as the un-evaluated test form, and the actual value is shown as the result of evaluat

Re: Help ship Clojure 1.9!

2017-10-06 Thread Alan Thompson
Before Clojure 1.9 is shipped, I would like to reiterate the appeal from many in the community to stop the terrible, permanent mistake that is *clojure.core/any?* For those who have not seen past emails on this topic, you may view the main threads here: - https://groups.google.com/forum/#!

Re: Help ship Clojure 1.9!

2017-10-04 Thread Michał Marczyk
I've run into a behaviour change that was actually already present in alpha20 – with the CLJ-99 patch in place, {min,max}-key now return the first argument with the minimum/maximum key, whereas previously they returned the last such argument. The new behaviour seems like the more natural one, but

Re: Help ship Clojure 1.9!

2017-10-03 Thread Beau Fabry
We've been using 1.9 in a small app for a while with no issues. After upgrading schema to the latest version (with the PR above) I've also successfully run our larger codebase with 1.9. On Tuesday, October 3, 2017 at 4:41:14 AM UTC-7, stuart@gmail.com wrote: > > Hi Mark, > > I think this app

Re: Help ship Clojure 1.9!

2017-10-03 Thread Stuart Halloway
Hi Mark, I think this approach totally makes sense, and the alpha naming exists to inform this kind of decision-making. For libraries where the use of spec does not have to be user-facing, I am putting specs in separate (Clojure) namespaces, and loading them in such a way that they can coexist wi

Re: Help ship Clojure 1.9!

2017-10-02 Thread Alex Miller
On Monday, October 2, 2017 at 3:16:55 PM UTC-5, Rob Nikander wrote: > > I get this when I switch from 1.8 to 1.9 beta, but maybe it's an issue > with the `core.match` library? > > WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: > clojure.tools.analyzer.utils, being rep

Re: Help ship Clojure 1.9!

2017-10-02 Thread Rob Nikander
I get this when I switch from 1.8 to 1.9 beta, but maybe it's an issue with the `core.match` library? WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/boolean? Rob On Thursday, September

Re: Help ship Clojure 1.9!

2017-10-02 Thread Mark Engelberg
On Mon, Oct 2, 2017 at 7:55 AM, Stuart Halloway wrote: > Hi David, > > Spec will be in alpha for a while. That is part of the point of it being a > separate library. Can you say more about what problems this is causing? > > Stu > > As a library maintainer, I am forced to upgrade and release my li

Re: Help ship Clojure 1.9!

2017-10-02 Thread David Bürgin
Hello Stu, On 02/10/17 16:55, Stuart Halloway wrote: > Spec will be in alpha for a while. That is part of the point of it being > a separate library. Can you say more about what problems this is causing? I don’t have any stakes in this so it’s better if I withdraw my question. I was (still am) a

RE: Help ship Clojure 1.9!

2017-10-02 Thread Sean Corfield
" -- Margaret Atwood From: clojure@googlegroups.com on behalf of David Bürgin Sent: Saturday, September 30, 2017 1:52:47 AM To: clojure@googlegroups.com Subject: Re: Help ship Clojure 1.9! On 28/09/17 16:00, Stuart Halloway wrote: > Clojure 1.9 has been quite stable throughout the alpha

Re: Help ship Clojure 1.9!

2017-10-02 Thread Leon Grapenthin
Since spec is mainly a dependency of 1.9. to improve error reporting over 1.8 (correct me if I'm wrong), I'd like to point out this ticket again: https://dev.clojure.org/jira/browse/CLJ-2013 It solves what I determined the root cause of this report https://groups.google.com/d/msg/clojure/mIlKaO

Re: Help ship Clojure 1.9!

2017-10-02 Thread Stuart Halloway
Hi David, Spec will be in alpha for a while. That is part of the point of it being a separate library. Can you say more about what problems this is causing? Stu On Sat, Sep 30, 2017 at 4:52 AM, David Bürgin wrote: > On 28/09/17 16:00, Stuart Halloway wrote: > > Clojure 1.9 has been quite stabl

Re: Help ship Clojure 1.9!

2017-09-30 Thread Borkdude
Other than spotting an issue with yada which involved upgrading aleph (https://github.com/juxt/yada/issues/199) and an issue with ClojureScript with was fixed on master I haven't encountered any problems. All our integration tests pass. Good luck with bringing Clojure 1.9.0 out the door! On Thu

Re: Help ship Clojure 1.9!

2017-09-30 Thread David Bürgin
On 28/09/17 16:00, Stuart Halloway wrote: > Clojure 1.9 has been quite stable throughout the alpha period, and we > now hope to release after a very short beta. Please test your existing > programs on the latest beta (see below), and respond on this thread ASAP > if you discover anything you believ

Re: Help ship Clojure 1.9!

2017-09-29 Thread Nicola Mometto
Yes, clojurescript makes use of a previous experimental feature of tools.reader that allowed Infinity and -Infinity to be read as Double/POSITIVE_INFINITY and Double/NEGATIVE_INFINITY, without special casing how the compiler emitted infinity literals, as clojure previously printed them as "Infi

Re: Help ship Clojure 1.9!

2017-09-29 Thread Stuart Halloway
And to maybe answer my own question, I guess it is https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L988-L990 . On Fri, Sep 29, 2017 at 1:45 PM, Stuart Halloway wrote: > To be clear: we can certainly cut a new release of CLJS, I just want to > understand other op

Re: Help ship Clojure 1.9!

2017-09-29 Thread Stuart Halloway
To be clear: we can certainly cut a new release of CLJS, I just want to understand other options, if any. On Fri, Sep 29, 2017 at 1:38 PM, Stuart Halloway wrote: > Hi Aleš, Mark, > > Thanks for the reports! It isn't clear to me how a change to tools.reader > can fix a problem with the core hash

Re: Help ship Clojure 1.9!

2017-09-29 Thread Stuart Halloway
Hi Aleš, Mark, Thanks for the reports! It isn't clear to me how a change to tools.reader can fix a problem with the core hash function. Can somebody point me to the place in the Clojurescript code where this happens? Stu On Fri, Sep 29, 2017 at 11:13 AM, Aleš Roubíček wrote: > The Cljs problem

Re: Help ship Clojure 1.9!

2017-09-29 Thread Aleš Roubíček
The Cljs problem is easily solvable by referencing latest tools.reader: [org.clojure/clojurescript "1.9.908" :exclusions [org.clojure/tools.reader]] [org.clojure/tools.reader "1.1.0"] On Thursday, September 28, 2017 at 8:37:11 PM UTC+2, puzzler wrote: > > And to be clear, it doesn't only aff

Re: Help ship Clojure 1.9!

2017-09-28 Thread Mark Engelberg
And to be clear, it doesn't only affect people who try to use ##Inf or ##NaN in their Clojurescript code. It affects all existing Clojurescript code, because running the Clojurescript compiler in a new version of Clojure causes all Clojurescript code to emit these ## characters directly into the j

Re: Help ship Clojure 1.9!

2017-09-28 Thread Mark Engelberg
On Thu, Sep 28, 2017 at 11:02 AM, Jeaye wrote: > This has been the only issue we've run into with 1.9.0-beta1 ( ticket is > here https://dev.clojure.org/jira/browse/CLJS-2352 ). On our back-end, > all tests are good, but we can't currently use beta1 (or alpha20) on the > front-end, since this iss

Re: Help ship Clojure 1.9!

2017-09-28 Thread Ghadi Shayban
Clojure 1.9 has been great for me so far. I think it's worth considering the problem Luke brought up regarding the REPL caught handler [1], especially since the compiler now checks macro specs. Having a slightly better knob for that might be nice, since it's an integration point. (This is not

Re: Help ship Clojure 1.9!

2017-09-28 Thread Jeaye
This has been the only issue we've run into with 1.9.0-beta1 ( ticket is here https://dev.clojure.org/jira/browse/CLJS-2352 ). On our back-end, all tests are good, but we can't currently use beta1 (or alpha20) on the front-end, since this issue causes CLJS to choke. I'm hoping that a new version

Re: Help ship Clojure 1.9!

2017-09-28 Thread Stuart Halloway
Thanks Beau! On Thu, Sep 28, 2017 at 1:06 PM, Beau Fabry wrote: > Identified an issue with prismatic/schema https:// > github.com/plumatic/schema/pull/399 > > On Thursday, September 28, 2017 at 9:18:52 AM UTC-7, Nathan Fisher wrote: >> >> Hi Stuart, >> >> Looks like any project using lein-cljsbu

Re: Help ship Clojure 1.9!

2017-09-28 Thread Beau Fabry
Identified an issue with prismatic/schema https://github.com/plumatic/schema/pull/399 On Thursday, September 28, 2017 at 9:18:52 AM UTC-7, Nathan Fisher wrote: > > Hi Stuart, > > Looks like any project using lein-cljsbuild will be affected. > > I forked and bumped the Clojure and ClojureScript ve

Re: Help ship Clojure 1.9!

2017-09-28 Thread Nathan Fisher
Hi Stuart, Looks like any project using lein-cljsbuild will be affected. I forked and bumped the Clojure and ClojureScript version to latest and got the same error with their simple project: See Commit: https://github.com/nfisher/lein-cljsbuild/commit/5df5d3c5bb447b51a75abbbccdc72447814883a0 ST

Re: Help ship Clojure 1.9!

2017-09-28 Thread Stuart Halloway
Hi Nathan, I suspect that is the same as https://github.com/clojure/clojurescript/commit/89914d2ead964122f99e638edda0cd96d330cb66. I don't have a sense of how many CLJS project this is going to cascade into, or what all will be needed. Anyone? Stu On Thu, Sep 28, 2017 at 10:44 AM, Nathan Fisher

Re: Help ship Clojure 1.9!

2017-09-28 Thread Nathan Fisher
Hi Stuart, Working to create a minimal test case but upgrading from alpha19 to beta1 seems to have broken lein-cljsbuild. I get the following error: >> snip >> *SEVERE: /Users/nathanfisher/workspace/mklpq/target/cljsbuild-compiler-0/cljs/core.js:3579: ERROR - Parse error. primary expres

Help ship Clojure 1.9!

2017-09-28 Thread Stuart Halloway
Clojure 1.9 has been quite stable throughout the alpha period, and we now hope to release after a very short beta. Please test your existing programs on the latest beta (see below), and respond on this thread ASAP if you discover anything you believe to be a regression. Thanks! Stu ;; Clojure dep

Re: need help on json format extraction multiple deep

2017-09-06 Thread dinesh bhardwaj
Thanks Andy. I love you man :) . I am new to start a project in clojure. Thanks for the help. Now, I need not go to Node.js. Regards Dinesh On Wednesday, 6 September 2017 17:06:46 UTC+5:30, Andy Fingerhut wrote: > > I don't know if this is the issue, but the JSON data has

Re: need help on json format extraction multiple deep

2017-09-06 Thread Andy Fingerhut
ned debug print statements or logging, to print out the contents of intermediate values like from your expression (get-in (json-body-request request {:keywords? true :bigdecimals true}) [:body :result]) :resolvedQuerry), can help debug these kinds of things. Andy On Wed, Sep 6, 2017 at 3:42 AM, dinesh

need help on json format extraction multiple deep

2017-09-06 Thread dinesh bhardwaj
:bigdecimals true}) [:body :lang]) But I am not able to extract :resolvedQuerry. Although I am able to extract :result. I used following code , but I know i am missing something. Please help me out? (get (get-in (json-body-request request {:keywords? true :bigdecimals true}) [:body :resu

Re: :gen-class method signature help

2017-08-07 Thread Sir Robert Burbridge
Success! I've included the final solution here for completeness and community contribution. 1. Thanks, Didier-- your last bit got me on the right path. 2. Thanks, Gregg-- it turns out gen-class does recognize that syntax, if quoted, like so: #^{:static true} [score ["[Ljava.l

Re: :gen-class method signature help

2017-08-07 Thread Didier
Arrays in Clojure are different to Lists, and its probably why when you pass arrays to the score fn, that things don't work 100%. If you can coerce those arrays to a java list it would probably work. You can do that in js, but if that doesn't work or seem easy, you could have your -score wrappe

Re: :gen-class method signature help

2017-08-07 Thread Gregg Reynolds
Never mind, I see you tried that in your original code. ;) On Mon, Aug 7, 2017 at 1:03 PM, Gregg Reynolds wrote: > > > On Mon, Aug 7, 2017 at 10:56 AM, Sir Robert Burbridge > wrote: > >> Didier, thanks for the reply! >> >> >>1. I created a wrapper function like this: (defn -score [data >>

Re: :gen-class method signature help

2017-08-07 Thread Gregg Reynolds
On Mon, Aug 7, 2017 at 10:56 AM, Sir Robert Burbridge wrote: > Didier, thanks for the reply! > > >1. I created a wrapper function like this: (defn -score [data >context] (score data context)) >2. I tried your suggestion but got an error. Here's the current state: > > The JS calling

Re: :gen-class method signature help

2017-08-07 Thread Sir Robert Burbridge
Didier, thanks for the reply! 1. I created a wrapper function like this: (defn -score [data context] (score data context)) 2. I tried your suggestion but got an error. Here's the current state: The JS calling code: function genFixture () { return new Array(12).fill(parseFloat(Math

:gen-class method signature help

2017-08-06 Thread Didier
Also, you need to change the name of the "score" function in clojure to "-score". Yes, that's a dash prefixed to it. Unless you have configured gen-class to do differently using ":prefix". -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

:gen-class method signature help

2017-08-06 Thread Didier
Can you try: :methods [#^{:static true} [score [java.util.List java.util.List] java.util.List]] This says your score function takes two List arguments and returns a list. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

:gen-class method signature help

2017-08-05 Thread Sir Robert Burbridge
a the node-java <https://github.com/joeferner/node-java> module. I need help because the translation of types is a bit too arcane for me (as I'm new to both Clojure and Java). *Details* The node-java module needs to access a java class. I already figured out how to export a class

Re: Looking for help creating this function/macro

2017-05-18 Thread david swift
ing the following library >> https://github.com/metosin/spec-tools; where you see (st-ds/spec) calls >> is the use of that library. >> >> >> On Thursday, 18 May 2017 17:21:45 UTC+1, david swift wrote: >>> >>> Hey Guys, >>> >>> I am loo

Re: Looking for help creating this function/macro

2017-05-18 Thread James Reeves
18 May 2017 at 17:23, david swift wrote: > I forgot to mention I am using the following library https://github.com/ > metosin/spec-tools; where you see (st-ds/spec) calls is the use of that > library. > > > On Thursday, 18 May 2017 17:21:45 UTC+1, david swift wrote: >&

Re: Looking for help creating this function/macro

2017-05-18 Thread david swift
I forgot to mention I am using the following library https://github.com/metosin/spec-tools; where you see (st-ds/spec) calls is the use of that library. On Thursday, 18 May 2017 17:21:45 UTC+1, david swift wrote: > > Hey Guys, > > I am looking for help creating a particular fu

Looking for help creating this function/macro

2017-05-18 Thread david swift
Hey Guys, I am looking for help creating a particular function/macro, right now I've no experience using macro's and I'm under the impression it might be the right solution to my problem, that produces a spec output but a very specific spec output. My goal here is to redu

Re: [beginner] help understand this function

2017-03-20 Thread Luis P. Mendes
Thanks Walter! sábado, 18 de Março de 2017 às 21:19:10 UTC, Walter van der Laan escreveu: > > The value of 'maps' can be, for example; [{:lat 1 :lng 4} {:lat 2 :lng 3}]. > > If you enter (min [{:lat 1 :lng 4} {:lat 2 :lng 3}]) in the repl the > result will be {:lat 1 :lng 3} > > If you replace 'm

Re: [beginner] help understand this function

2017-03-18 Thread Walter van der Laan
The value of 'maps' can be, for example; [{:lat 1 :lng 4} {:lat 2 :lng 3}]. If you enter (min [{:lat 1 :lng 4} {:lat 2 :lng 3}]) in the repl the result will be {:lat 1 :lng 3} If you replace 'min' by its definition you get; (min [{:lat 1 :lng 4} {:lat 2 :lng 3}]) => (zipmap [:lat :lng] (

[beginner] help understand this function

2017-03-18 Thread Luis P. Mendes
Hi, I'm reading `Clojure for the Brave and True` book, at chapter 6 . I don't completely understand this function: (defn comparator-over-maps [comparison-fn ks] (fn [maps] (zipmap ks (map (fn [k] (apply compariso

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-24 Thread Alex Miller
That seems like a decent list. Also sounds like most of the Clojure Alioth contributions. :) -- 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

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-24 Thread Didier
s between my code and theirs are: > >- Lack of a Point struct, I'm just using a vector. >- They use a mutable set, I don't. >- They overrode Hashing for their point struct, as well as equality. I >rely on Clojure's default hashing, and vector equality

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-22 Thread Didier
heirs are: > >- Lack of a Point struct, I'm just using a vector. >- They use a mutable set, I don't. >- They overrode Hashing for their point struct, as well as equality. I >rely on Clojure's default hashing, and vector equality. > > I'm not

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-22 Thread Andy Fingerhut
code and theirs are: >> >>- Lack of a Point struct, I'm just using a vector. >>- They use a mutable set, I don't. >>- They overrode Hashing for their point struct, as well as equality. >>I rely on Clojure's default hashing, and vector

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-22 Thread Steve Miner
> On Nov 21, 2016, at 8:03 PM, Didier wrote: > > @miner: Doesn't using the flag (set! *unchecked-math* :warn-on-boxed) gives > me unchecked math automatically? I was under the impression that +, -, /, * > etc. would all now perform in an equal way to unchecked-add, etc. If not, > what is the

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-21 Thread Michał Marczyk
eq [p s1] (iterNeighbors add p)) >>>(recur (dec n) @s0 s1)) >>> >>> #_(printf "result is %d" (count (time (nth* 2000 [0 0] >>> >>> And here's the F# code: https://github.com/c-cube/hash >>> set_benchs/blob/mas

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-21 Thread Michał Marczyk
t; >>- Lack of a Point struct, I'm just using a vector. >>- They use a mutable set, I don't. >>- They overrode Hashing for their point struct, as well as equality. >>I rely on Clojure's default hashing, and vector equality. >> >> I&

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-21 Thread Didier
ct, as well as equality. I >rely on Clojure's default hashing, and vector equality. > > I'm not sure if any of these things should really impact performance that > much though. And what I could do in Clojure if I wanted to improve it. > > > Any Help? > >

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-21 Thread Steve Miner
> On Nov 21, 2016, at 3:05 PM, Didier wrote: > > I experimented with this a lot, and took everyone's advice, and this is the > fastest I got, even faster then Michael Gardner's answer. > > (deftype point5 [^long i ^long j] > Object > (equals [this that] (and (= (.i this) (.i ^point5 that))

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-21 Thread Andy Fingerhut
)) >> >> #_(printf "result is %d" (count (time (nth* 2000 [0 0] >> >> And here's the F# code: https://github.com/c-cube/hash >> set_benchs/blob/master/neighbors2.fsx >> >> Currently, this takes about 30s in Clojure, while it only takes

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-21 Thread Didier
code and theirs are: > >- Lack of a Point struct, I'm just using a vector. >- They use a mutable set, I don't. >- They overrode Hashing for their point struct, as well as equality. I > rely on Clojure's default hashing, and vector equality. > > I'm

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-16 Thread Michael Gardner
ty. I > rely on Clojure's default hashing, and vector equality. > I'm not sure if any of these things should really impact performance that > much though. And what I could do in Clojure if I wanted to improve it. > > > > Any Help? > > > > Thanks. >

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-16 Thread Alex Miller
vector. >- They use a mutable set, I don't. >- They overrode Hashing for their point struct, as well as equality. I >rely on Clojure's default hashing, and vector equality. > > I'm not sure if any of these things should really impact performance that >

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-16 Thread Alex Miller
On Wednesday, November 16, 2016 at 8:10:27 AM UTC-6, Jason Felice wrote: > > I'll bet the atom accesses dominate the computation. They are a part of > Clojures software transactional memory (STM) and have a cost. > Atoms don't use the STM and if used in a single-threaded context like this, th

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-16 Thread Jason Felice
ctor. >- They use a mutable set, I don't. >- They overrode Hashing for their point struct, as well as equality. I >rely on Clojure's default hashing, and vector equality. > > I'm not sure if any of these things should really impact performance that > mu

Re: Help me understand what part of this code is slow, and how to make it faster?

2016-11-16 Thread James Reeves
hen-not (or (.contains s1 p) (.contains s2 p)) (.add s0 p)))] (doseq [p s1] (iter-neighbors add p)) (recur (dec n) s0 s1)) - James > > Any Help? > > > Thanks. > > -- > You received this message because you are subscribed to the Go

Help me understand what part of this code is slow, and how to make it faster?

2016-11-15 Thread Didier
sure if any of these things should really impact performance that much though. And what I could do in Clojure if I wanted to improve it. Any Help? Thanks. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: need help on `pprint/write` code with better readability

2016-10-24 Thread jiyinyiyong
Cool library! But i just changed to fipp this morning. I think I will try it much later. fipp is really fast that it succeeded clojure.pprint/write. On Mon, Oct 24, 2016 at 4:36 PM Thomas Heller wrote: > Try https://github.com/weavejester/cljfmt > > It is specifically written for clj code and no

Re: need help on `pprint/write` code with better readability

2016-10-24 Thread Thomas Heller
Try https://github.com/weavejester/cljfmt It is specifically written for clj code and not general pprinter. /thomas On Sunday, October 23, 2016 at 1:28:23 PM UTC+2, Jiyin Yiyong wrote: > > I'm using `write` function to generate code very heavily. But small part > of the code are hard to read.

Re: need help on `pprint/write` code with better readability

2016-10-23 Thread jiyinyiyong
What does miser-width mean since you set it to 60? On Mon, Oct 24, 2016 at 3:08 AM Alex Miller wrote: > Try something like this: > > (require '[clojure.pprint :as pprint]) > (defn print-code [o] > (binding [pprint/*print-right-margin* 100 > pprint/*print-miser-width* 60] > (ppr

Re: need help on `pprint/write` code with better readability

2016-10-23 Thread Alex Miller
Try something like this: (require '[clojure.pprint :as pprint]) (defn print-code [o] (binding [pprint/*print-right-margin* 100 pprint/*print-miser-width* 60] (pprint/with-pprint-dispatch pprint/code-dispatch (pprint/pprint o Or one of the "pretty printer" libraries lik

need help on `pprint/write` code with better readability

2016-10-23 Thread Jiyin Yiyong
I'm using `write` function to generate code very heavily. But small part of the code are hard to read. So I digged into the options and increased `right-margin` to make it a little better. Here's the changes: https://github.com/Cirru/sepal.clj/commit/e65e2d3cac8a5c5537716acd12cc475712ab6f66 htt

Re: Help with using spec

2016-10-18 Thread 'Jason Courcoux' via Clojure
ll) 1) >> => ([[-1 -1] [-1 0] [0 -1] [-1 -1] [-1 0] [-1 0]]) >> >> (gen/sample (s/gen ::board) 1) >> => ([[0 1] [1 1] [1 1] [1 1] [1 1] [0 0] [0 1]]) >> >> (s/fdef my-function :args (s/cat :board ::board)) >> >> (s/fdef my-function2 :args (s/cat :boar

Re: Help with using spec

2016-10-17 Thread Alex Miller
0] [0 1]]) > > (s/fdef my-function :args (s/cat :board ::board)) > > (s/fdef my-function2 :args (s/cat :board ::coll)) > > > But these don't: > > (gen/sample (s/gen (:args (s/get-spec `my-function))) 1) > => (([1 0] [0 0] [0 1] [0 1] [1 1])) > (gen/sample (s/gen

Help with using spec

2016-10-17 Thread 'Jason Courcoux' via Clojure
] [1 1])) (gen/sample (s/gen (:args (s/get-spec `my-function2))) 1) => (([[-1 -1] [-1 -1] [0 0] [0 0] [-1 0] [-1 -1] [0 0]])) I'm sure it's something obvious, but I been looking for a couple of hours and can't seem to see it - could someone please help point me in the right directi

Looking to develop an app to help Live Streamers (Twitch, Facebook Live ...) interact with their viewers.

2016-08-10 Thread Jeremy Vuillermet
Hi, I'm developing with clojure/clojurescript since 3 years and I'm currently looking to create an app to help live streamers (Twitch, Facebook live, Periscope, YouTube, HitBox etc ...) interact with their viewers. Right now, the only way to interact is using the chat. Really quickly

Re: [Help] core.async and jetty

2016-02-23 Thread Miguel Ping
Thanks Zach, I would love to do an unfair comparison between clojure and nodejs :) Gonna give it a spin On Tuesday, February 23, 2016 at 5:09:50 PM UTC, Zach Tellman wrote: > > For what it's worth, Aleph will handle pipelined requests in parallel: > https://github.com/ztellman/aleph. > > On Tue

Re: [Help] core.async and jetty

2016-02-23 Thread Zach Tellman
For what it's worth, Aleph will handle pipelined requests in parallel: https://github.com/ztellman/aleph. On Tuesday, February 23, 2016 at 4:46:23 AM UTC-8, Miguel Ping wrote: > > Thanks, thats what I eventually found out. > > On Tuesday, February 23, 2016 at 12:39:00 PM UTC, jonah wrote: >> >> H

Re: [Help] core.async and jetty

2016-02-23 Thread Miguel Ping
Thanks, thats what I eventually found out. On Tuesday, February 23, 2016 at 12:39:00 PM UTC, jonah wrote: > > Hi Miguel- pipelining is essentially http keep alive. A very old jetty > thread > > > http://jetty.4.x6.nabble.com/HTTP-1-1-Request-Pipelining-handling-td18682.html > >

Re: [Help] core.async and jetty

2016-02-23 Thread Jonah Benton
Hi Miguel- pipelining is essentially http keep alive. A very old jetty thread http://jetty.4.x6.nabble.com/HTTP-1-1-Request-Pipelining-handling-td18682.html indicates that for simplicity jetty will execute subsequent requests on the kept-alive socket serially. Jonah On Mon, Feb 22, 2016 at 3:3

Re: [Help] core.async and jetty

2016-02-22 Thread Miguel Ping
By the way, I can see that jetty is reusing the same HttpInput instance on the request (most probably because of pipelining) On Monday, February 22, 2016 at 8:33:37 PM UTC, Miguel Ping wrote: > > Hi guys, > > I'm trying to replicate an experiment on nodejs and http pipelining: > http://blog.yld.

  1   2   3   4   5   6   7   8   9   10   >