Re: Getting highlighted clojure code into a presentation

2013-05-18 Thread John Gabriele
On Friday, May 17, 2013 11:42:55 PM UTC-4, Korny wrote: > > Yes, I know I can just take a screenshot, but that gives you a bitmap that > doesn't scale nicely or give you any ability to do last minute editing. > But the above gets tedious very fast - I wonder if there's a better option > I've m

Re: [ANN] alpacas: a new Clojure source viewer

2013-06-05 Thread John Gabriele
On Tuesday, June 4, 2013 4:24:49 PM UTC-4, Gary Trakhman wrote: > > Just fyi, most clojure libs are published under EPL or Apache licenses, of > course the choice is up to you :-). GPL has some restrictions that would > prevent the lib from being used in many projects. > > from the EPL wikipedia

Re: [ANN] alpacas: a new Clojure source viewer

2013-06-05 Thread John Gabriele
On Wednesday, June 5, 2013 10:34:35 AM UTC-4, Laurent PETIT wrote: > > tl;dr: when should I prefer LGPL over EPL for a Clojure lib ? > Have a look at the brief summary at http://docs.python-guide.org/en/latest/writing/license.html . If you care more about item #2 on that 2-item list, then you

Re: In what OS do you code?

2013-06-15 Thread John Gabriele
On Saturday, June 15, 2013 9:40:13 PM UTC-4, Korny wrote: > > How are all the Linux users handling Java installation? Using an official > Oracle installer, or your package manager somehow, or something else? Or > using (gasp) openJDK? > sudo apt-get install openjdk-7-jdk -- -- You received t

putting 2-element colls into a map: works with vectors, but not with lists?

2013-06-24 Thread John Gabriele
Why does `into` fail when the 2-element collections are lists and not vectors? : ~~~ user=> (into {} [[:a 1] [:b 2]]) {:a 1, :b 2} user=> (into {} ['(:a 1) '(:b 2)]) ClassCastException clojure.lang.Keyword cannot be cast to java.util.Map$Entry clojure.lang.ATransientMap.conj (ATransientMap.jav

Re: putting 2-element colls into a map: works with vectors, but not with lists?

2013-06-24 Thread John Gabriele
On Monday, June 24, 2013 12:14:56 PM UTC-4, Sean Corfield wrote: > > On Mon, Jun 24, 2013 at 8:49 AM, John Gabriele > > > wrote: > > Why does `into` fail when the 2-element collections are lists and not > > vectors? : > > Because the implementation special c

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 clo

Re: Contrib libs where the name starts with "core."

2013-07-07 Thread John Gabriele
ools" is for libraries for Clojure tooling, and > "data" is for working with various data formats and structures. > > On July 7, 2013 at 4:34:47 AM, John Gabriele (jmg...@gmail.com) > wrote: > > Why do some of the contrib library names begin with "core."?

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 . -- 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 , though that doesn

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] 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: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread John Gabriele
On Saturday, August 10, 2013 11:26:37 AM UTC-4, Phil Hagelberg wrote: > > On Friday, August 9, 2013 10:07:39 PM UTC-7, Sean Corfield wrote: > > None of these problems have had anything to do with SSL. > > It's been two things: the self-install function was moved, and the S3 ACL > was incorrect due

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 rec

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

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

2013-09-04 Thread John Gabriele
I tried implementing the sieve of Eratosthenes in Clojure. The approach is to loop while (A) keeping my current list of numbers which have not yet been eliminated, and (B) keeping track of the number I'm "on" (checking for multiples thereof). Here's what I came up with (in a foo.clj file): ~~~

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

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

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 t

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

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) ~~~ -- Yo

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

2015-03-11 Thread John Gabriele
errormsg" > http://dev.clojure.org/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

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,

`(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 followin

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

2015-03-18 Thread John Gabriele
7;(vector) is a vector with the symbol 'vector. > > `(~vector) is similar to what [vector] gives you. > > On Wed, Mar 18, 2015 at 5:01 PM, John Gabriele > wrote: > >> I see that you can pass extra args to `apply` --- between the func and >> the coll args -

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 pro

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 readme

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

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

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

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 (?!) > ~~~ > >

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

2015-06-15 Thread John Gabriele
t values, I would > recommend reading: > > > http://blog.reverberate.org/2014/09/what-every-computer-programmer-should.html > > On Friday, 12 June 2015, John Gabriele wrote: > >> My understanding is that a rational number is one that can be written as >> a

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 err

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 >: > >> On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: >>> >>> In Clojure you can define a local constant

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

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: 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 . -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

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 [clj-stacktrace](https://

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 dat

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

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 > wrote: > > most clojurists(?) > > seems to roll their own solution. > > Probably because it's [clojure.java.io] not in clojure.core, which means > > a) it isn't found by searchin

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

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

2014-10-08 Thread John Gabriele
unction. This includes the Clojure collections, but also strings, > arrays and Java collections. > > The Sequential interface is a way of indicating a collection has a natural > order. So seqs, lists and vectors are sequential, but maps and sets are not. > > The ISeq in

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 > wrote: > >> * (when calling `seq` on a coll) "...In either case, if the collection >> is empty, `seq` returns nil and never an e

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 s

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 St

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 e

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

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 e

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 thi

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: 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 followed for

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 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 [inlein](http://inlein.org/

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

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: associative destructuring on a list? (using :keys)

2017-01-09 Thread John Gabriele
enerally people just 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

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 [:t

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

2017-02-26 Thread John Gabriele
or [row rows] >[: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 > wrote: > >> I&#x

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,

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

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

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

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

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

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: What sorcery is this? (`reduced`, `reduced?`)

2017-04-25 Thread John Gabriele
rocess 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

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 usage of the transducers

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

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

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

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 po

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 t

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

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 le

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
educe (fn [a i] (let [y (last a) z (last y)] (if (and z (= (inc z) i)) >>> (conj (pop a) (conj y i)) (conj a [i] [] x) >>> >>> Shantanu >>> >>> On Wednesday, 19 March 2014 08:26:43 UTC+5:30, John Gabriele wrote: >>>> >>>>

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

2014-03-28 Thread John Gabriele
(conj a [i] [] x) > > Shantanu > > 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 cons

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 > < > http://richhickey.github.io/clojure-contrib/types-api.html#clojure.

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

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: 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 > > 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 equivalent of common l

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 > > 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 seq where `x` is th

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: [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 > 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 c

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

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-tabpanel&focusedCommentId=34820#comment-34820 > > I would write my own get variant, or use

Re: Emacs font and theme for clojure

2013-09-28 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: 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 > 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 leiningen is, Clojure seems

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 su

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: (scroll down to "Dependents"). -- John

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 l

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 h

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 > > >> That violates the principle of free software. License incompatibilities >> like this divide the open-source community. Please change. > > > Said "principle of free software" is not well de

  1   2   3   >