Re: What to read after 3 dozen "introduction to transducers" blog posts

2017-05-10 Thread John Gabriele
On Wednesday, May 10, 2017 at 3:16:42 AM UTC-4, Luke Burton wrote: > > > > On May 6, 2017, at 10:56 AM, Matching Socks > wrote: > > > > This one. > https://tech.grammarly.com/blog/building-etl-pipelines-with-clojure > > > > "To be honest, this is a somewhat advanced

Re: What sorcery is this? (`reduced`, `reduced?`)

2017-04-25 Thread John Gabriele
s that a return value should end the reduce. It does this by simply > wrapping the return value in a Reduced object. > > `reduced?` is used by the outer process to detect that wrapper (it just > checks if it is a Reduced) > > > On Tuesday, April 25, 2017 at 2:34:05 PM UTC-5

What sorcery is this? (`reduced`, `reduced?`)

2017-04-25 Thread John Gabriele
Just recently stumbled upon `reduced` and `reduced?`. It seems rather magical... how does the outer `reduce` (or `reductions`) know to stop? That is, how does the function which is being called (`reduced`) affect the function that's calling it (below, `reductions`)? : ~~~clojure (defn main

Re: Startup time of standalone .jar executable

2017-03-21 Thread John Gabriele
On Tuesday, March 21, 2017 at 11:24:20 AM UTC-4, Michael Lindon wrote: > > I wrote a collaborator some clojure code which I distributed to them as a > standalone jar file which they are executing with > > java -jar mystandalone.jar > > The problem is that this executable is called a great many

Re: java interop, `(.instanceMember Classname)`

2017-03-21 Thread John Gabriele
On Tuesday, March 21, 2017 at 12:35:05 PM UTC-4, John Gabriele wrote: > > On Monday, March 20, 2017 at 4:59:33 PM UTC-4, Colin Fleming wrote: >> >> Object doesn't have a getName() method. >> >> This doc is confusing - as Phill comments above, this is calling the >

Re: java interop, `(.instanceMember Classname)`

2017-03-21 Thread John Gabriele
On Monday, March 20, 2017 at 4:59:33 PM UTC-4, Colin Fleming wrote: > > Object doesn't have a getName() method. > > This doc is confusing - as Phill comments above, this is calling the > getName() method on an instance of Class. In Clojure, a bare classname > (String, ArrayList or whatever)

Re: java interop, `(.instanceMember Classname)`

2017-03-21 Thread John Gabriele
On Monday, March 20, 2017 at 7:47:46 PM UTC-4, Alex Miller wrote: > > If someone could file an issue on the clojure-site repo, I would be happy > to improve the example. Thanks. Filed: , though I don't have alternative wording/prose for

Re: java interop, `(.instanceMember Classname)`

2017-03-20 Thread John Gabriele
On Monday, March 20, 2017 at 4:14:46 AM UTC-4, Matching Socks wrote: > > Methods having the same name might be distinguished by their argument > lists. > Thanks, but it sounds like you're describing method overloading, as in (.someMethod someObj arg1) ; vs (.someMethod someObj arg1

java interop, `(.instanceMember Classname)`

2017-03-20 Thread John Gabriele
In the [Java Interop Docs](https://clojure.org/reference/java_interop), what does the example (.instanceMember Classname args*) mean? (Looks like the example given at the top for that one is `(.getName String)`, but I don't see any `getName` method in the javadoc for java.lang.String.)

Re: How can I re-order rows in a table (hiccup)?

2017-02-26 Thread John Gabriele
Gotcha. No, you got it; should be sorting my data first. Thanks! On Friday, February 24, 2017 at 6:00:59 PM UTC-5, Gary Trakhman wrote: > > Generally it's easier to sort the data before it gets put into hiccup > table formatting. Is there any reason not to? > > On Feb 24, 2017

Re: How can I re-order rows in a table (hiccup)?

2017-02-26 Thread John Gabriele
gt;[:tr (for [h headers, :let [v (row h)] [:td h])])]) > > Then you could write something like: > > (->table (update data :rows (partial sort-by :color)) > > - James > > On 24 February 2017 at 22:41, John Gabriele <jmg...@gmail.com > > wrote: > &g

How can I re-order rows in a table (hiccup)?

2017-02-24 Thread John Gabriele
I'm using hiccup, and I'd like to build a table, but then have the option to re-order it (sort its rows by a column of my choosing). I want a `sort-table-by` function. That is, if I've got Color Size -- red 2 green 7 blue4 (or, as a data structure: `(def tbl [:table

Re: associative destructuring on a list? (using :keys)

2017-01-09 Thread John Gabriele
pass an option map unless the function is meant > purely for "easy" interactive use (vs "simple" programmatic use). This is > because it's more difficult to call a keyword-argumented function correctly > when the keyword arguments are not literals. > &g

associative destructuring on a list? (using :keys)

2017-01-06 Thread John Gabriele
I've used associative destructing in the usual fashion: some-app.core=> (def m {:a 1 :b 2}) #'some-app.core/m some-app.core=> (let [{:keys [a b]} m] (str a "-" b)) "1-2" but what is going on here: some-app.core=> (def li '(:a 1 :b 2)) #'some-app.core/li ;; Wat?

Re: [moderated] I don't understand what (:t :t) means

2016-12-28 Thread John Gabriele
> > hello,everyOne,i'm a new clojure learner. > I don't know what the structure of (:t :t)! > when i use coll? list? vector? set? map? seq? they all return false!! > what is the structure of (:t :t)? thank you very much! > Couple other things to note: * `:t` is just a keyword, like `:foo` or

Re: Clojure For Scripting

2016-12-08 Thread John Gabriele
On Thursday, December 8, 2016 at 3:46:25 PM UTC-5, Asim Jalis wrote: > > I wrote a blog post on how to quickly get started with Clojure. > > How To Use Clojure For Scripting > http://asimjalis.github.io/blog/2016/12/07/clojure-for-scripting.html > You might also look at

Re: [ANN] beta.clojars.org: new Clojars infrastructure that needs testing

2016-09-21 Thread John Gabriele
On Tuesday, September 20, 2016 at 7:17:55 PM UTC-4, Daniel Compton wrote: > > Hi folks > > We’re moving the Clojars infrastructure from Linode to the very kind folks > at Rackspace. {snip} > Thanks, sounds like a lot of work. Any particular reasons for the switch? -- You received this message

Re: Clojure docstring style

2016-09-21 Thread John Gabriele
On Wednesday, September 21, 2016 at 1:10:37 PM UTC-4, John Gabriele wrote: > > On Wednesday, September 21, 2016 at 9:54:23 AM UTC-4, Eli Naeher wrote: >> >> On Wed, Sep 21, 2016, at 06:36 AM, nare...@helpshift.com wrote: >> >> Is there a convention to be followe

Re: Clojure docstring style

2016-09-21 Thread John Gabriele
On Wednesday, September 21, 2016 at 9:54:23 AM UTC-4, Eli Naeher wrote: > > On Wed, Sep 21, 2016, at 06:36 AM, nare...@helpshift.com > wrote: > > Is there a convention to be followed for referring the parameters of a > function in the docstring, e.g. for emacs lisp we upcase the parameter name?

Re: why is it so annoying to run clojure code

2016-06-10 Thread John Gabriele
On Thursday, June 9, 2016 at 12:08:39 PM UTC-4, Jiacai Liu wrote: > > I started learning clojure recently, and I am annoyed at the way to run > it (aka. lein run). why clojure script can't be run like python,ruby or > scala, like python .py > I suggest using [Inlein](http://inlein.org/) for

Re: Porting Clojure to Native Platforms

2016-05-11 Thread John Gabriele
On Monday, April 25, 2016 at 4:12:13 PM UTC-4, JvJ wrote: > > > > The main motivation would be performance gains. > Sounds like competing performance-wise with the JVM is extremely difficult. My best guess is that a successful new Clojure implemention will have these qualities: * be

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-10-23 Thread John Gabriele
Excellent news! Looking forward to receiving my hard-copy, though haven't yet heard when it's shipping. On Thursday, October 22, 2015 at 7:32:57 PM UTC-4, Daniel Higginbotham wrote: > > Clojure for the Brave and True is now > available in print and ebook form

Re: Unable to write GPL software with clojure?

2015-08-19 Thread John Gabriele
On Wednesday, August 19, 2015 at 9:33:13 AM UTC-4, Phillip Lord wrote: It would be interesting to do a survey of license use. I am sure EPL is common, partly because Clojure uses it, and partly because leiningen puts it in as the default (bad leiningen!). Interesting aside, I see that

Re: Decomplecting Clojure

2015-08-14 Thread John Gabriele
On Thursday, August 13, 2015 at 1:51:32 PM UTC-4, Sebastian Bensusan wrote: I never thought of laziness! It's a good point. Retroactively I might add it to the Functional Style section :) I think of laziness as often going together with (possibly-) infinite lists. Thanks for the

Re: Decomplecting Clojure

2015-08-13 Thread John Gabriele
Wait. If a module has dependencies, that's usually a *good* thing --- it hopefully does one thing well, and doesn't reinvent the wheel. Also, the article online still reads, Does it have many dependencies? By the way, I enjoyed the article. Thanks! I liked the short pithy sentences you wrote

Re: `rational?` `decimal?` Am I misunderstanding these? (also `float?`)

2015-06-15 Thread John Gabriele
down to about 1e-2_147_483_647, and up to filling your computer's memory.) For a first step towards understanding floating-point values, I would recommend reading: http://blog.reverberate.org/2014/09/what-every-computer-programmer-should.html On Friday, 12 June 2015, John Gabriele jmg3

`rational?` `decimal?` Am I misunderstanding these? (also `float?`)

2015-06-11 Thread John Gabriele
My understanding is that a rational number is one that can be written as a fraction. For example, 5.1, which can be written as 51/10. But Clojure seems to disagree: ~~~ (rational? 51/10) ;= true (rational? 5.1) ;= false (?!) ~~~ Is my definition of rational incorrect? Also, my understanding

Re: `rational?` `decimal?` Am I misunderstanding these? (also `float?`)

2015-06-11 Thread John Gabriele
On Thursday, June 11, 2015 at 9:34:57 PM UTC-4, John Gabriele wrote: ~~~ (integer? 5) ;= true Yes (integer? 5N) ;= true Yes (integer? 5.1) ;= false (float? 5.1) ;= true (float? 5.1M) ;= false (?!) ~~~ Whoops. Please ignore the two Yes's. Also, I think I just fell

prettier stacktraces?

2015-06-01 Thread John Gabriele
How can I get prettier stacktraces? Would be great if it has colorized output in the terminal (highlighting line line indicating my .clj source code file). I thought I'd try [clj-stacktrace](https://github.com/mmcgrana/clj-stacktrace), and updated my ~/.lein/profiles.clj as noted in the

Re: prettier stacktraces?

2015-06-01 Thread John Gabriele
On Monday, June 1, 2015 at 2:31:46 PM UTC-4, nikolay.k...@gmail.com wrote: I think this https://github.com/AvisoNovate/pretty is what you're looking for. Intriguing. How can I get this to work automatically? I've got a project created via `lein new app my-app`, and I want to see the pretty

Re: prettier stacktraces?

2015-06-01 Thread John Gabriele
On Monday, June 1, 2015 at 2:57:50 PM UTC-4, John Gabriele wrote: On Monday, June 1, 2015 at 2:31:46 PM UTC-4, nikolay.k...@gmail.com wrote: I think this https://github.com/AvisoNovate/pretty is what you're looking for. Intriguing. How can I get this to work automatically? {snip} Hm

Re: Embedded systems and transpiling Clojure to Nim

2015-05-11 Thread John Gabriele
Alan, there was an attempt at compiling Clojure to C, https://github.com/schani/clojurec , but it hasn't been updated in a while. On Thursday, April 30, 2015 at 11:00:02 PM UTC-4, Alan Moore wrote: All, I just ran across Nim (previously Nimrod) which is a garbage collected systems

`(apply map vector ...)`, and passing `apply` a list vs. a vector

2015-03-18 Thread John Gabriele
I see that you can pass extra args to `apply` --- between the func and the coll args --- and `apply` will prepend the extras to the coll before proceeding. For example, these all work: (apply + [1 2 3 4]) (apply + 1 2 [3 4]) (apply + 1 2 '(3 4)) While thinking about how the

Re: `(apply map vector ...)`, and passing `apply` a list vs. a vector

2015-03-18 Thread John Gabriele
with the symbol 'vector. `(~vector) is similar to what [vector] gives you. On Wed, Mar 18, 2015 at 5:01 PM, John Gabriele jmg...@gmail.com javascript: wrote: I see that you can pass extra args to `apply` --- between the func and the coll args --- and `apply` will prepend the extras to the coll

Re: Adding directory to classpath in leiningen

2015-03-12 Thread John Gabriele
Hi Cecil, I think what you want to do is create a library project to house your common code, install the library to your local repository, then use it from your project: ~~~ cd ~/dev lein new my-stuff/my-lib cd my-lib # edit src/my_stuff/my_lib.clj , adding your common code here lein install

Re: Adding directory to classpath in leiningen

2015-03-12 Thread John Gabriele
Forgot to add, you can then run `lein repl` from my-proj as usual, and have easy access to your library code: ~~~ $ cd ~/dev/my-proj $ lein repl my-proj.core= (my/foo 4) 4 Hello, World! nil ~~~ On Thursday, March 12, 2015 at 11:58:53 AM UTC-4, John Gabriele wrote: Hi Cecil, I think what

Re: Could use a better error message here (using a list in update-in)

2015-03-11 Thread John Gabriele
/display/community/Creating+Tickets –S On Tuesday, March 10, 2015 at 3:13:36 PM UTC, John Gabriele wrote: In Clojure v1.6.0. This one confused me when I'd accidentally passed a list in to `update-in` instead of a vector: -- You received this message because you are subscribed to the Google

Could use a better error message here (using a list in update-in)

2015-03-10 Thread John Gabriele
In Clojure v1.6.0. This one confused me when I'd accidentally passed a list in to `update-in` instead of a vector: ~~~ some-app.core= (update-in [:a :b :c] [1] name) [:a b :c] some-app.core= (update-in '(:a :b :c) [1] name) NullPointerException clojure.core/name (core.clj:1518) ~~~ -- You

Re: Mutable local variables

2014-11-12 Thread John Gabriele
On Saturday, November 8, 2014 10:15:12 PM UTC-5, Blake McBride wrote: Greetings, I have a sense that there is value in immutable variables and data but that value is unneeded in my application and more than a nuisance. How can I create a let that creates mutable locals that I can easily

better way to group consecutive numbers in a vector?

2014-11-06 Thread John Gabriele
Hi all, I've got this: `[1 3 4 5 7 9 10 11 12]` and I'd like to turn it into this: `[[1] [3 4 5] [7] [9 10 11 12]]`. That is, I'd like to group consecutive numbers together (the final goal being to produce something like `[1 3-5 7 9-12]`, but that's the easy part). I haven't found an easy way

Re: better way to group consecutive numbers in a vector?

2014-11-06 Thread John Gabriele
On Thursday, November 6, 2014 8:48:07 PM UTC-5, blake wrote: I wanted to put the delimiters in one step and then split in a different one, so I did this: (defn delimit[v] (reduce #(if (= (last %) (dec %2)) (conj % %2) (conj % :split %2)) [(first v)]

Re: Clojure Survey 2014 - Tag Clouds

2014-10-31 Thread John Gabriele
Neat! I notice that in the results for name one language feature you'd like to see added, the following items show up separately, though should probably be combined: StartupTime, FasterStartup, FastStartup, StartTime, CompileTime. Similarly, in most glaring weakness, lumped together are

Re: help with sequence, seq, Seq, and `seq`

2014-10-09 Thread John Gabriele
On Thursday, October 9, 2014 12:51:47 AM UTC-4, Ambrose Bonnaire-Sergeant wrote: On Wed, Oct 8, 2014 at 10:55 PM, John Gabriele jmg...@gmail.com javascript: wrote: * (when calling `seq` on a coll) ...In either case, if the collection is empty, `seq` returns nil and never an empty

Re: help with sequence, seq, Seq, and `seq`

2014-10-09 Thread John Gabriele
On Thursday, October 9, 2014 10:38:42 AM UTC-4, Gary Verhaegen wrote: I have not checked the second edition yet, but when I read JoC, my understanding was that seq is used specifically for an object that implements ISeq and is used as such (i.e. by calling first and rest on it) while

help with sequence, seq, Seq, and `seq`

2014-10-08 Thread John Gabriele
Reading Joy of Clojure, section 5.1.2, I'm hoping someone here can help me understand the following: * `clojure.core/seq` returns a seq or a sequence? Likewise for `map` and `filter`. * What is the difference between a seq and a sequence? * A seq may possibly be lazy, but vectors and

Re: help with sequence, seq, Seq, and `seq`

2014-10-08 Thread John Gabriele
a natural order. So seqs, lists and vectors are sequential, but maps and sets are not. The ISeq interface is the internal interface for seqs. An object is a seq if it implements ISeq. - James On 8 October 2014 19:39, John Gabriele jmg...@gmail.com javascript: wrote: Reading Joy

Re: Handling java streams..

2014-09-29 Thread John Gabriele
On Monday, June 27, 2011 5:50:52 PM UTC-4, Ken Wesson wrote: On Mon, Jun 27, 2011 at 6:52 AM, Andreas Liljeqvist bon...@gmail.com javascript: wrote: most clojurists(?) seems to roll their own solution. Probably because it's [clojure.java.io] not in clojure.core, which means a) it

Re: Clojure beginner: angst about doing things right

2014-09-23 Thread John Gabriele
On Monday, September 22, 2014 2:45:23 PM UTC-4, J David Eisenberg wrote: The good news: the code works. The bad news: I'm convinced I'm doing it wrong, in the moral purity sense of the word. Something inside of me says, You could have just used (map...) to do this the *right* way, but I

Re: Use Require and Import

2014-09-19 Thread John Gabriele
On Friday, September 19, 2014 2:53:24 AM UTC-4, Gomzee wrote: I am new to clojure can any one give me a good example answer to differentiate between Use, Require and Import. Specially I am getting confused with Require and Import. To quote Craig Andera, require is load; see

Re: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-12 Thread John Gabriele
A format I particularly like is when there's simply one video file where: * the main portion of the window shows the slides, * a small thumbnail-size portion shows the speaker, and * the remaining rectangle shows static details such as the name of the talk, name of speaker, subject, and

Re: Useless Java error messages

2014-09-02 Thread John Gabriele
On Monday, September 1, 2014 7:24:54 PM UTC-4, Beau Fabry wrote: The pretty-errors leiningen plugin might be worth a look Hm... I don't see that particular plug-in in the [main lein plug-in list](https://github.com/technomancy/leiningen/wiki/Plugins). Do you mean

Re: lein 2.4.3 repl outside project?

2014-08-28 Thread John Gabriele
On Thursday, August 28, 2014 11:29:44 AM UTC-4, Tim Visher wrote: Anyone else get this error? Yup. I think it's https://github.com/technomancy/leiningen/issues/1625. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

destructuring help: `(let [{:keys [...]} ...]` in a `defn` vs in a `let`

2014-08-27 Thread John Gabriele
Why is it that although this works: ~~~clojure (defn foo [ args] (let [{:keys [a b]} args] (str a \~ b))) ;;= #'some-app.core/foo (foo :a 1 :b 2) ;;= 1~2 ~~~ this does not: ~~~clojure (let [{:keys [a b]} [:a 1 :b 2 :c 3]] (str a \~ b)) ;;= ~ ~~~ ? And even stranger, *this* *does* work:

Re: Calculating the number of timestamps logged within a specific time period

2014-07-18 Thread John Gabriele
On Thursday, July 17, 2014 8:49:12 AM UTC-4, empt...@gmail.com wrote: Hi, I have a list of epoch times which map to HTTP requests. '(1405060202611 1405060201157 1405060201361 1405060201261 1405060200391 1405060201458 1405060201705 1405060201058 1405060205062 1405060201558

Re: Local variable

2014-07-08 Thread John Gabriele
On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: In Clojure you can define a local constant with let, but I need a variable (I think). I want to do the following. I have a function that checks several things. Every time an error is found I want to set the variable errors

Re: Local variable

2014-07-08 Thread John Gabriele
On Tuesday, July 8, 2014 11:38:42 AM UTC-4, Cecil Westerhof wrote: 2014-07-08 16:55 GMT+02:00 John Gabriele jmg...@gmail.com javascript:: On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: In Clojure you can define a local constant with let, but I need a variable (I think

Re: Could use an error message here? (using `get` on an atom containing a map)

2014-06-15 Thread John Gabriele
On Saturday, June 14, 2014 11:43:46 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: Seems unlikely: http://dev.clojure.org/jira/browse/CLJ-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=34820#comment-34820 I would write my own get variant, or use

Could use an error message here? (using `get` on an atom containing a map)

2014-06-14 Thread John Gabriele
This one took me a few minutes to see what I was doing wrong: ~~~ user= (def m (atom {:x 1 :y 2})) #'user/m ;; Later on ... user= (get m :x) nil ;; What?? `:x` isn't a key in `m`? But I *know* it is... ;; Sanity check, for comparison: user= (get {:a 1 :b 2} :c); Right; `:c` is not a key in

Re: [ANN] Clojure cheatsheet with search capability

2014-06-10 Thread John Gabriele
On Monday, June 9, 2014 7:09:01 PM UTC-4, Andy Fingerhut wrote: On Mon, Jun 2, 2014 at 6:54 AM, John Gabriele jmg...@gmail.com javascript: wrote: On Sunday, June 1, 2014 5:15:52 PM UTC-4, Andy Fingerhut wrote: Thanks to Francois du Toit, the versions of the Clojure cheatsheet available

Re: [ANN] Clojure cheatsheet with search capability

2014-06-02 Thread John Gabriele
On Sunday, June 1, 2014 5:15:52 PM UTC-4, Andy Fingerhut wrote: Thanks to Francois du Toit, the versions of the Clojure cheatsheet available at the link below now have the ability to let you search for all symbols beginning with a string you type in, with color highlighting of matches.

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-06 Thread John Gabriele
On Tuesday, May 6, 2014 1:41:25 PM UTC-4, puzzler wrote: On Tue, May 6, 2014 at 9:56 AM, Sean Corfield se...@corfield.orgjavascript: wrote: Sean, I think you missed the point of that example. The point was that the docstring actually makes sense if it were written as: Returns a new

Re: Clojure equivalent of special common lisp vars: still looking for that zen place...

2014-05-05 Thread John Gabriele
On Saturday, May 3, 2014 10:53:40 AM UTC-4, Bob Hutchison wrote: On May 3, 2014, at 9:45 AM, Dave Tenny dave@gmail.com javascript: wrote: I'm still struggling with how to write the most readable, simple clojure code to deal with dynamically bindings. What is the graceful clojure

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-01 Thread John Gabriele
On Wednesday, April 30, 2014 5:48:17 PM UTC-4, Sean Corfield wrote: For a project that has its auxiliary documentation on a Github wiki, you don't even need to git clone edit the repo: you can simply click Edit Page. That's about a low a barrier to entry as there can be and we still

Re: OT: Wiki Use Survey

2014-04-08 Thread John Gabriele
On the first question, Other needs its own checkbox. -- John On Monday, April 7, 2014 7:26:08 PM UTC-4, Rich Morin wrote: My spouse (Vicki Brown) has put together a very short survey on wiki use. If this is of possible interest to you, read on... -r The SurveyMonkey page for the Wiki

Re: [ANN] Clojure cheat sheet (v13)

2014-03-28 Thread John Gabriele
Thanks, Andy! Love love love the cheatsheet. :) -- John -- 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

Re: algorithm help: extracting groups of consecutive ints from a sorted list

2014-03-28 Thread John Gabriele
, John Gabriele wrote: If you've got a sorted list of numbers, for example: [1 3 4 5 7 9 10 13] where some are consecutive, how can you pull out the consecutive runs? That is, either produce [1 [3 4 5] 7 [9 10] 13]; or maybe something like [[1 7 13] [3 4 5] [9 10

Re: algorithm help: extracting groups of consecutive ints from a sorted list

2014-03-28 Thread John Gabriele
On Wednesday, 19 March 2014 08:26:43 UTC+5:30, John Gabriele wrote: If you've got a sorted list of numbers, for example: [1 3 4 5 7 9 10 13] where some are consecutive, how can you pull out the consecutive runs? That is, either produce [1 [3 4 5] 7 [9 10] 13]; or maybe something

Re: using contrib functions

2014-03-28 Thread John Gabriele
On Friday, March 28, 2014 10:40:55 PM UTC-4, Christopher Howard wrote: Hi. --Insert here the usual caveats about being new to Clojure and Java.-- I wanted to try out this Contrib function describe on this page

algorithm help: extracting groups of consecutive ints from a sorted list

2014-03-18 Thread John Gabriele
If you've got a sorted list of numbers, for example: [1 3 4 5 7 9 10 13] where some are consecutive, how can you pull out the consecutive runs? That is, either produce [1 [3 4 5] 7 [9 10] 13]; or maybe something like [[1 7 13] [3 4 5] [9 10]] ; (the first vec is the elements

Re: Can't start repl with Leiningen

2014-02-26 Thread John Gabriele
On Wednesday, February 26, 2014 3:19:43 AM UTC-5, Matej Fröbe wrote: It seems that this is independent of where I run the project. Matej, What OS (and version) are you using? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: error in website text

2014-02-26 Thread John Gabriele
On Wednesday, February 26, 2014 10:01:16 AM UTC-5, Janek Warchoł wrote: Then it seems that i have completely misunderstood the point of that paragraph - it may be worth rewording it. Anyway, thanks for explanation. Best, Janek Could be changed to: It endeavors to be a general-purpose

Re: Can't start repl with Leiningen

2014-02-25 Thread John Gabriele
On Sunday, February 23, 2014 4:32:54 PM UTC-5, Matej Fröbe wrote: Hello Clojure users! I have a problem with running *$lein repl* After some time I get: *REPL server launch timed out.* *$lein run myproject* works fine Leiningen and Java versions are: *$lein versionLeiningen 2.3.4 on

Re: clojure.java.shell/sh and expand wildcard

2014-02-25 Thread John Gabriele
On Tuesday, January 21, 2014 11:05:13 PM UTC-5, Michael Gardner wrote: Try (sh “bash” “-c” “ls *.txt”). Sorry for the belated reply, Michael. Thanks so much for the help; works! -- John -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Should predicates always have one argument?

2014-01-31 Thread John Gabriele
It looks like the `comparator` function wants you to give it a 2-arg predicate. -- John On Friday, January 31, 2014 11:55:30 AM UTC-5, Andy Fingerhut wrote: While most of the functions and macros in Clojure core with a ? at the end take 1 arg, there are several that take two: contains?

clojure.java.shell/sh and expand wildcard

2014-01-21 Thread John Gabriele
I'd like to do something like: user= (require '[clojure.java.shell :as sh]) user= (sh/sh ls *.txt) but get: {:exit 2, :out , :err ls: cannot access *.txt: No such file or directory\n} even though there *are* a few .txt files present. That error message is the same one I'd get if

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread John Gabriele
On Wednesday, January 8, 2014 7:17:35 AM UTC-5, Mikera wrote: The JVM isn't really the problem though, at least as far as I can work out. In fact I think the whole JVM startup is slow thing is a bit of a myth: JVM startup including running a simple hello world is less than 0.1 secs on my

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread John Gabriele
On Wednesday, January 8, 2014 11:17:07 AM UTC-5, tbc++ wrote: And even clojure-py is miles behind stock python. One of the problems with Clojure as it stands now is that there is just way too much init work that has to be done on every startup. Just as a comparison, let's compare how

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-05 Thread John Gabriele
On Saturday, January 4, 2014 1:12:12 PM UTC-5, Michael Gardner wrote: Hopefully the landscape for alternative Clojure hosts will improve with the completion of CinC [2]. [2] https://github.com/Bronsa/CinC Looks like CinC is now: * https://github.com/clojure/tools.analyzer *

Re: library development

2013-12-20 Thread John Gabriele
Ah, neat. This works great! If I can just `lein install` my libs (or other people's libs) and then use them in all my projects (just like the libs found at clojars), what extra functionality does lein-localrepo provide beyond that? -- John On Friday, December 20, 2013 9:22:30 AM UTC-5,

Re: library development

2013-12-20 Thread John Gabriele
On Friday, December 20, 2013 9:22:30 AM UTC-5, Daniel Higginbotham wrote: lein install actually installs your library ~/.m2/repository in addition to creating the pom and jar. That should be all you need to do. On Friday, December 20, 2013 12:16:59 PM UTC-5, John Gabriele wrote: Ah, neat

Re: Code layout

2013-12-10 Thread John Gabriele
On Tuesday, December 10, 2013 9:24:16 PM UTC-5, Plinio Balduino wrote: Hi there What is the ideal way to format Clojure code? I'm following Batsov's Style Guide but, in some moments, it sounds a bit confuse to me. To the point: (reduce + (filter even? nums))

Re: Regarding Clojure's license

2013-11-13 Thread John Gabriele
On Wednesday, November 13, 2013 6:06:02 PM UTC-5, Colin Fleming wrote: I don't see why a company would have any problem at all with *using* LGPL'd software, even in a product. However, I can see the possible complaints if they wanted to *modify* it and then distribute their modified

Re: Regarding Clojure's license

2013-11-12 Thread John Gabriele
On Tuesday, November 12, 2013 11:30:23 AM UTC-5, Sean Corfield wrote: It's also worth pointing out that a lot of US companies won't use GPL-licensed software (and won't pay for a closed source version), and many aren't comfortable with LGPL either. I don't see why a company would have

Re: Regarding Clojure's license

2013-11-12 Thread John Gabriele
On Tuesday, November 12, 2013 11:40:53 AM UTC-5, Michael Klishin wrote: 2013/11/12 Kalinni Gorzkis musicde...@gmail.com javascript: That violates the principle of free software. License incompatibilities like this divide the open-source community. Please change. Said principle of free

Experiences using SQLite with Clojure? Recommendations?

2013-10-23 Thread John Gabriele
How have your experiences been using SQLite with Clojure? Back when org.xerial/sqlite-jdbc was at v3.7.2, I'd heard some complaints. But I notice that the project appears to be fairly actively maintained (see its [mailing list] and [project page]). The current version is 3.7.15-M1. [mailing

Re: Are there any GUI based Clojure apps out there?

2013-10-17 Thread John Gabriele
Seesaw is, of course, the GUI *toolkit* for creating GUI apps. Though, it does come with a lot of examples. Also, speaking of seesaw, it looks like ClojureSphere lists a number of projects which make use of it: http://www.clojuresphere.com/seesaw/seesaw (scroll down to Dependents). -- John

Re: Teaching Clojure to students (how ?)

2013-10-08 Thread John Gabriele
On Tuesday, October 8, 2013 12:52:38 PM UTC-4, Phil Hagelberg wrote: On Monday, October 7, 2013 8:12:05 PM UTC-7, John Gabriele wrote: For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein

Re: Teaching Clojure to students (how ?)

2013-10-07 Thread John Gabriele
On Monday, October 7, 2013 4:28:57 AM UTC-4, Phillip Lord wrote: Lee Spector lspe...@hampshire.edu javascript: writes: Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. Tend to agree with this also. As nice as

Re: Emacs font and theme for clojure

2013-09-29 Thread John Gabriele
On Thursday, September 26, 2013 10:51:44 AM UTC-4, Murtaza Husain wrote: Hi, I was just cycling through the different themes in emacs. I was wondering what font and theme combination others are using ? I like Inconsolata and Zenburn. -- -- You received this message because you are

Re: ANN How to Write a Useful Change Log

2013-09-12 Thread John Gabriele
One thing I like to see under each release's heading in the ChangeLog.md file is a date indicating when the release was made. -- -- 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

Re: new ClojureDocs experiment

2013-09-11 Thread John Gabriele
On Wednesday, September 11, 2013 1:55:45 AM UTC-4, Steven Degutis wrote: One of my assumptions was that people don't use wikis simply because it's Yet Another Account to sign up for, {snip} I don't think that's it. Public wikis can be alright if assiduously maintained... Ok, I'll stop

Re: new ClojureDocs experiment

2013-09-10 Thread John Gabriele
On Sunday, September 8, 2013 4:07:33 AM UTC-4, Steven Degutis wrote: https://github.com/sdegutis/clojuredocs/wiki {snip} Thoughts? Hi Steven, This is a nice piece of work. Thank you. Some thoughts: * Wikis are difficult to keep nice. And, seemingly contradictory to that, it's

Re: Why does this overflow? (a try at the sieve of Eratosthenes)

2013-09-05 Thread John Gabriele
On Thursday, September 5, 2013 3:01:01 AM UTC-4, Cedric Greevey wrote: Deeply nested lazy seq generation? Try wrapping the main sequence in a doall at each iteration of the outer loop. Ah, thanks, Cedric! Changed `(recur (remove-multiples-of new-num new-nums) ...` to `(recur (doall

Re: Eval vs the repl

2013-08-28 Thread John Gabriele
On Wednesday, August 28, 2013 12:13:54 PM UTC-4, Jamie Brandon wrote: user [do (inc 1)] Just curious: what do you expect that to do? To me it looks like a 2-element vector... (containing a `do` special form and then the value 2), but my repl yields 2 as the result (?). -- -- You

Re: Emacs Clojure mode : No syntax highlighting for #_

2013-08-28 Thread John Gabriele
On Wednesday, August 28, 2013 6:09:11 PM UTC-4, JvJ wrote: Although semicolons cause the text color to change in order to look commented-out, the #_ reader macro doesn't cause any such change. Is this intended, or is it a bug? I see this as well with the version of clojure-mode I've

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-02 Thread John Gabriele
On Friday, August 2, 2013 9:03:03 AM UTC-4, Zach Oakes wrote: I’ve been working on a simple IDE for the past few months. It started as an attempt to add Leiningen integration to Clooj, but eventually I decided to start a new project from scratch. It is very alpha-quality, so please be

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread John Gabriele
On Tuesday, July 23, 2013 11:50:50 AM UTC-4, Greg Slepak wrote: I think I read somewhere that :use is no longer encouraged, but I could be mistaken. From what I've read, it seems like most people agree that Clojure has too many ways of including/importing/referencing/requiring/using

Re: [ANN] Varspotting: spotting Clojure Vars for fun and profit!

2013-07-09 Thread John Gabriele
Neat! Maybe also add it to the listing at https://github.com/technomancy/leiningen/wiki/Plugins. -- John On Tuesday, July 9, 2013 3:11:16 AM UTC-4, Michał Marczyk wrote: ...and here comes 0.0.2 with non-buggy Var counts: Varspotting report for built-in namespaces:

Re: Doc about auto-namespaced keywords (e.g. ::user)?

2013-07-09 Thread John Gabriele
On Tuesday, July 9, 2013 4:57:19 PM UTC-4, Bastien Guerry wrote: Hi all, while reading the documentation for friend, I stumbled upon auto-namespaced keywords -- how can I find more doc about them? Hi Bastian, They're mentioned in http://clojure.org/reader, though that doesn't say

Contrib libs where the name starts with core.

2013-07-07 Thread John Gabriele
Why do some of the contrib library names begin with core.? What's the difference between these and the other contrib libs (ex. java.jdbc or tools.reader)? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

  1   2   3   >