Re: Idiomatic program for someone new to Clojure

2020-12-30 Thread Jakub Holý
I am late to the party but you might find https://blog.jakubholy.net/clojure-common-beginner-mistakes/ useful. It also links to a few very valuable resources. On Thursday, December 17, 2020 at 12:42:41 AM UTC+1 Derek Troy-West wrote: > Hello James, > > Aditya links to one of Stuart Sierra's

Re: Idiomatic program for someone new to Clojure

2020-12-16 Thread Derek Troy-West
Hello James, Aditya links to one of Stuart Sierra's Do's and Don't posts. That series of posts really influenced my basic Clojure style and I'd suggest reading them all: https://stuartsierra.com/tag/dos-and-donts, they're (mostly!) great and simple advice. Best, Derek On Tuesday, December

Re: Idiomatic program for someone new to Clojure

2020-12-15 Thread aditya....@gmail.com
On Wednesday, December 16, 2020 at 3:12:22 AM UTC+5:30 jamesl...@gmail.com wrote: > So I think I can answer my first question. That particular line in > `pipeline-build-count` is doing associative destructing > . > And you

Re: Idiomatic program for someone new to Clojure

2020-12-15 Thread Peter Strömberg
Seconding aditya's advice here. I can truly recommend watching this talk about solving problems the Clojure way: https://youtu.be/vK1DazRK_a0 Interestingly, he applies it on a JavaScript code example. Which makes it all that much more powerful. On Tue, 15 Dec 2020 at 22:42, James Lorenzen

Re: Idiomatic program for someone new to Clojure

2020-12-15 Thread James Lorenzen
So I think I can answer my first question. That particular line in `pipeline-build-count` is doing associative destructing . And you didn't have to do the `as response` but like you said in your comment, you are just doing

Re: Idiomatic program for someone new to Clojure

2020-12-15 Thread James Lorenzen
Thanks for the suggestions aditya. I definitely like where you are headed. I have a few questions. This syntax in `pipeline-build-count` method looks confusing to me: > [{:keys [body] :as response}] ;; destructuring for convenience and function API documentation Would you mind breaking that

Re: Idiomatic program for someone new to Clojure

2020-12-14 Thread aditya....@gmail.com
I'd try to separate the "I/O or side-effecting" parts from the "purely data processing" parts. This makes the program much easier to test --- the "purer" the code, the better it is. This also helps tease apart domain-agnostic parts from domain-specialised parts, which is useful, because

Re: Idiomatic program for someone new to Clojure

2020-12-14 Thread James Lorenzen
Very cool everyone. This is exactly the kind of feedback I was hoping for. I'm going through Clojure for the Brave and I hadn't made it to the macros chapter yet. That single threading macro is pretty sweet! Thanks everyone! On Monday, December 14, 2020 at 11:00:02 AM UTC-6 brando...@gmail.com

Re: Idiomatic program for someone new to Clojure

2020-12-14 Thread Brandon R
Hey James, Another small suggestion is you can just pass println to map, since it takes 1 argument in your case. (map println (sort builds)) But here, since you just want to perform side effects, maybe run! would be a better function to use. (run! println (sort builds)) This would cause it to

Re: Idiomatic program for someone new to Clojure

2020-12-14 Thread Justin Smith
a small suggestion: you don't need to nest let inside let, a clause can use previous clauses: (defn get-latest-build [pipeline] (let [response (fetch-pipeline pipeline) json (parse-string (:body response) true) [pipeline] (:pipelines json)] (:counter pipeline also

Idiomatic program for someone new to Clojure

2020-12-14 Thread James Lorenzen
Hello all, This is my first Clojure program and I was hoping to get some advice on it since I don't know any experienced Clojure devs. I'm using it locally to print the latest build numbers for a list of projects. ``` (ns jlorenzen.core (:gen-class) (:require [clj-http.client :as client])

Re: Help please: New to clojure development

2018-02-07 Thread Nadeen Kurz
Thank you, appreciate it On Feb 7, 2018 12:16 AM, "Aditya Athalye" wrote: > Welcome to Clojure, Nadeen. > > A few friends and I created "Clojure by example" for programmers not > familiar with Clojure https://github.com/inclojure-org/clojure-by-example > > This is

Re: Help please: New to clojure development

2018-02-06 Thread Aditya Athalye
Welcome to Clojure, Nadeen. A few friends and I created "Clojure by example" for programmers not familiar with Clojure https://github.com/inclojure-org/clojure-by-example This is intended as a quick-start to a common way of problem-solving with Clojure. The README explains more, and should

Re: Help please: New to clojure development

2018-02-06 Thread Andy Fingerhut
>> >>> The two collections are lined up, then passed as arguments to the >>> function. >>> >>> If you want to put this into one function, then you don't need an inner >>> map. You instead want: >>> >>> (defn state-desc

Re: Help please: New to clojure development

2018-02-06 Thread Nadeen Kurz
u instead want: >> >> (defn state-desc2 [input-file] >> (let [desc2 (:st_abbrev input-file)] >> (case desc2 >> "AZ" (assoc input-file :state "Arizona") >> "FL" (assoc input-file :state "Flor

Re: Help please: New to clojure development

2018-02-06 Thread Simon Luetzelschwab
quot;OH" (assoc input-file :state "Ohio") > "default"))) > > You could also write it as: > > (def state-names > {"AZ" "Arizona", "FL" "Florida", "OH" "Ohio"}) > > (de

Re: Help please: New to clojure development

2018-02-06 Thread Nadeen Kurz
input-file :state (state-names (:st_abbrev input-file On 6 February 2018 at 01:22, Nadeen Kurz <kurznad...@gmail.com> wrote: > 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

Re: Help please: New to clojure development

2018-02-05 Thread James Reeves
)) 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 2018 at 01: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 "john&quo

Re: New to Clojure

2017-01-16 Thread Gregg Reynolds
On Jan 16, 2017 5:25 PM, "Gregg Reynolds" <d...@mobileink.com> wrote: On Jan 16, 2017 5:15 PM, "(hash-map :new "to clojure" :need "assistance")" < nas@gmail.com> wrote: Hi Gregg, I had a look at Aleph - looks fantastic! Plus it seems

Re: New to Clojure

2017-01-16 Thread Gregg Reynolds
On Jan 16, 2017 5:15 PM, "(hash-map :new "to clojure" :need "assistance")" < nas@gmail.com> wrote: Hi Gregg, I had a look at Aleph - looks fantastic! Plus it seems to have good docs as well. RE the bids, very special use case constraints set by the client

Re: New to Clojure

2017-01-16 Thread (hash-map :new &quot;to clojure" :need "assistance")
ot;(hash-map :new "to clojure" :need "assistance")" < > nas...@gmail.com > wrote: > > Hi all! > > So, I'm new to Clojure! I'm coming in from a Java background and am > currently working on a project that has prompted me to have a look at > whether C

Re: New to Clojure

2017-01-16 Thread (hash-map :new &quot;to clojure" :need "assistance")
d a > pleasure to use. > > Good luck with your project. > > regards, > Simon > > On Monday, 9 January 2017 23:06:30 UTC, (hash-map :new "to clojure" :need > "assistance") wrote: >> >> Hi all! >> >> So, I'm new to Clojure! I

Re: New to Clojure

2017-01-14 Thread Gregg Reynolds
On Jan 9, 2017 5:06 PM, "(hash-map :new "to clojure" :need "assistance")" < nas@gmail.com> wrote: Hi all! So, I'm new to Clojure! I'm coming in from a Java background and am currently working on a project that has prompted me to have a look at whether Clo

Re: New to Clojure

2017-01-14 Thread Gregg Reynolds
On Jan 9, 2017 5:06 PM, "(hash-map :new "to clojure" :need "assistance")" < nas@gmail.com> wrote: Hi all! So, I'm new to Clojure! I'm coming in from a Java background and am currently working on a project that has prompted me to have a look at whether Clo

Re: New to Clojure

2017-01-14 Thread simon lomax
As far as SQL libraries for Clojure are concerned I would highly recommend HugSQL <https://www.hugsql.org/>. Comprehensive documentation and a pleasure to use. Good luck with your project. regards, Simon On Monday, 9 January 2017 23:06:30 UTC, (hash-map :new "to clojure" :n

Re: New to Clojure

2017-01-12 Thread Christopher Small
excellent argument in this vein. My 2c Chris On Thursday, January 12, 2017 at 11:43:17 AM UTC-8, (hash-map :new "to clojure" :need "assistance") wrote: > > Hi Dennis, > > Thanks very much for getting back to me - this sounds really good. I've > had a look at sqlkor

Re: New to Clojure

2017-01-12 Thread (hash-map :new &quot;to clojure" :need "assistance")
e movement from Java to Clojure easy for someone completely new to > Clojure? > > See above. Familiarity with Java means the ecosystem and tooling (and > stacktraces) won’t cause you any problems, but at the same time, if your > developers are steeped in Java / OOP thinking,

Re: New to Clojure

2017-01-12 Thread (hash-map :new &quot;to clojure" :need "assistance")
You may want to check into some of the Clojure libraries > that provide DSLs for generating SQL statements. I've tried > http://sqlkorma.com/ and https://github.com/jkk/honeysql, and I've had > fairly good luck with both of them. > > Dennis > > On Monday, January 9, 2017 at 4:06:30 PM

New to Clojure - productivity and debugging with Emacs

2017-01-12 Thread Chad Stovern
Not much to add here, but if you're digging into Emacs and the modes you've listed, I've started to document my emacs config here: https://github.com/chadhs/dotfiles/blob/master/editors/emacs-config.org If you're curious about common feature uses; head to the keybindings section and look at

Re: New to Clojure - productivity and debugging with Emacs

2017-01-12 Thread Bill Piel
The key to using sayid to capture curl requests is having emacs/cider connected to the same jvm instance that is running the web server. I did this by starting a repl with `lein repl`, then calling the -main function, which started the web server. From there, I used sayid to trace namespaces

Re: New to Clojure - productivity and debugging with Emacs

2017-01-11 Thread Colin Yates
The big barrier for me with emacs was discovering and then remembering all of the various finger-bending chords to do things. Spacemacs uses hydra so all the key mappings are grouped in a very logical way. Have a read of http://spacemacs.org, particularly the horizontal image slide show. But

Re: New to Clojure - productivity and debugging with Emacs

2017-01-11 Thread ahawk
Thanks a lot for your reply. I saw the video of your presentation and it seems like your tool is exactly what I am looking for. I've actually installed the package in Emacs and configured the Emacs/CIDER integration, but I haven't gotten to try it thoroughly just yet. In your video, you

Re: New to Clojure - productivity and debugging with Emacs

2017-01-11 Thread Gregg Reynolds
On Jan 8, 2017 1:52 AM, "ahawk" wrote: .. I find it difficult to know exactly what to expect from these libraries and many other, unless, of course, I read and understand their source. That is a challenge in its own right for a less advanced programmer such as myself. The

Re: New to Clojure - productivity and debugging with Emacs

2017-01-11 Thread ahawk
I guess you're right.. however, I'm generally inclined to try to do it the right way (or, what I perceive as the right way) the first time. Now I know liberator exists, I feel an urge to use it :-) With regards to logging, I actually considered that option, but it just didn't seem very

Re: New to Clojure - productivity and debugging with Emacs

2017-01-11 Thread ahawk
Thanks a lot for the very elaborate reply. I should probably buy SICP. With regards to discovery, I will have a closer look at clojure.spec. It looks interesting. I've previously (perhaps wrongfully) discarded Prismatic Schema, thinking something like "don't you really just want static

Re: New to Clojure

2017-01-09 Thread Sean Corfield
lojure is easy for some and extremely hard for others. > Is the movement from Java to Clojure easy for someone completely new to > Clojure? See above. Familiarity with Java means the ecosystem and tooling (and stacktraces) won’t cause you any problems, but at the same time, if your

Re: New to Clojure - productivity and debugging with Emacs

2017-01-09 Thread J.-F. Rompre
Hi ahawk, If you have the time, by all means reach for all the references and books mentioned in this thread, and there is a wealth of free resources out there. However doing both that and learning a powerful tool such as Emacs/CIDER at the same time can be frustrating. If time is of the

Re: New to Clojure

2017-01-09 Thread Matching Socks
You mention SQL. Note, that using JDBC in Clojure is really, really easy. It's a porcupine in Java, but in Clojure it's pure fudge. Whatever your Java frame of reference for an ORM might be, Hibernate or Spring or whatever, bang! you probably won't need it. Sure, there are JDBC wrappers

Re: New to Clojure

2017-01-09 Thread Dennis Roberts
SLs for generating SQL statements. I've tried http://sqlkorma.com/ and https://github.com/jkk/honeysql, and I've had fairly good luck with both of them. Dennis On Monday, January 9, 2017 at 4:06:30 PM UTC-7, (hash-map :new "to clojure" :need "assistance") wrote: > > Hi al

New to Clojure

2017-01-09 Thread (hash-map :new &quot;to clojure" :need "assistance")
Hi all! So, I'm new to Clojure! I'm coming in from a Java background and am currently working on a project that has prompted me to have a look at whether Clojure would be useful. I have started by going through the "Brave Clojure" website and working through the exercises and what

Re: New to Clojure - productivity and debugging with Emacs

2017-01-09 Thread Bill Piel
ahawk, I've been using clojure for years, but can still relate to the issues you are facing, which is why I wrote a debugging/development tool to help. It's called sayid. It can be used directly from the repl, but has an emacs/cider integration that makes it much more powerful.

Re: New to Clojure - productivity and debugging with Emacs

2017-01-08 Thread Matching Socks
That is an ambitious project. Divide and conquer. One super duper benefit of Clojure is that if you make a web app with, say, just Ring and Compojure, you can later transplant that work into a more elaborate app scaffolding, because it's all just plain maps. "quite a lot of map manipulation

Re: New to Clojure - productivity and debugging with Emacs

2017-01-08 Thread Colin Yates
Hi ahawk and welcome to Clojure! Your question seems to cover multiple domains: - navigating/discovery in non-statically typed languages, specifically Clojure - developing in Clojure - developer tools (e.g. IDE for Clojure) (I can feel a stream of consciousness/ramble coming so so this might

New to Clojure - productivity and debugging with Emacs

2017-01-07 Thread ahawk
Hi everyone I am a rather unexperienced Clojure user, so please bear with me. I am developing a web app using popular libraries such as ring, compojure, liberator and friend to handle routing, content negotiation and authentication. There is quite a lot of map manipulation going on with the

New Dutch Clojure group - Rotterdam/Den Haag Clojure Meetup - EHRD.clj

2013-02-27 Thread Vijay Kiran
Hi All, On Wednesday 27th March we will be hosting the inaugural EHRD.clj in Rotterdam. The first meeting will feature a talk from Christophe Grandhttp://clj-me.cgrand.net/ (Clojure core contributor and co-author of Clojure Programming) plus beer and nibbles. We will be meeting from 7pm

New to Clojure, need some help

2012-08-09 Thread Jason Long
I am trying to remove every occurrence of a given element from a vector. I can use (filter #(== % a) v) where 'a' is the value to be removed and 'v' is the vector, but this returns 'a' and 'a' is the value i want to remove. So, how can i do this? I tried replacing 'filter' with 'remove' but it

Re: New to Clojure, need some help

2012-08-09 Thread Baishampayan Ghose
Hi, Does this work for you? (remove #{:a} [:a :b :a :c :d :e]) Also, if you have a list of items you can have all of them in the same set/predicate like so - (remove #{:a :z :x} [:a :b :a :c :d :e :z :b :d :e :x :z]) Hope this helps. Regards, BG On Thu, Aug 9, 2012 at 10:11 AM, Jason Long

Re: New to Clojure, need some help

2012-08-09 Thread Timothy Baldridge
To clarify Baishampayan's code, hash-sets in Clojure are functions: = (#{1} 1) 1 = (#{1} 2) nil Nil and false in Clojure are the same thing, So Baishampayan's example: (remove #{:a :z :x} [:a :b :a :c :d :e :z :b :d :e :x :z]) #{:a :z : x} will return nil if the value is not in the vector,

Re: New to Clojure, need some help

2012-08-09 Thread Baishampayan Ghose
On Thu, Aug 9, 2012 at 10:11 AM, Jason Long jsnl...@gmail.com wrote: Also, can anyone tell me why != is not included for equality testing, that would make this problem easy. To answer your other question, != in Clojure is called not= Regards, BG -- Baishampayan Ghose b.ghose at gmail.com --

Re: new with clojure, need help!

2012-05-06 Thread Roberto Mannai
If you're also planning to try Emacs: http://sourceforge.net/apps/wordpress/codesounding/2012/04/14/installing-and-configuring-emacs-24-for-clojure-updated/ Key bindings (under SLIME commands): https://github.com/technomancy/swank-clojure On Wed, Apr 25, 2012 at 4:37 PM, omer

Re: new with clojure, need help!

2012-05-05 Thread Rostislav Svoboda
i need a more basic guidence on how to install the nessecery plugins to eclipse, and what to do with them... eclipse IDE may look like a good idea but in the beginning it just increases the amount of work you need to do and troubles you need to overcome. Just start with the REPL and any

Re: new with clojure, need help!

2012-05-05 Thread Jim - FooBar();
On 06/05/12 00:51, Rostislav Svoboda wrote: i need a more basic guidence on how to install the nessecery plugins to eclipse, and what to do with them... eclipse IDE may look like a good idea but in the beginning it just increases the amount of work you need to do and troubles you need to

Re: new with clojure, need help!

2012-04-30 Thread Bill Robertson
Hello, I put together a presentation that will help you. http://www.tekbot.com/clojure-simple-start.pdf It teaches you a few things for working with the repl that will help you whether or not you're working with Emacs, Eclipse etc... It also discusses a little bit about using leiningen, which

new with clojure, need help!

2012-04-26 Thread omer
hello im need to learn how to use clojure and how it works, i found some videos the helped me a bit to understand how clojure works, but i need a more basic guidence on how to install the nessecery plugins to eclipse, and what to do with them... any tutorial will do! thats... p.s. im using

Re: new with clojure, need help!

2012-04-26 Thread John Gabriele
On Apr 25, 10:37 am, omer omeryco...@gmail.com wrote: hello im need to learn how to use clojure and how it works, i found some videos the helped me a bit to understand how clojure works, but i need a more basic guidence on how to install the nessecery plugins to eclipse, and what to do with

RE: new with clojure, need help!

2012-04-26 Thread Guofeng Zhang
See if the following is helpful: http://dev.clojure.org/display/doc/Getting+Started+with+Eclipse+and+Counterclockwise From: clojure@googlegroups.com [mailto:clojure@googlegroups.com] On Behalf Of omer Sent: Wednesday, April 25, 2012 10:37 PM To: clojure@googlegroups.com Subject: new

Re: New(er) Clojure cheatsheet hot off the presses

2012-04-16 Thread Rostislav Svoboda
I just checked the http://clojure.org/cheatsheet seing there just the old version without any tooltips. Would anyone put there a new one with tooltips? Thx Bost -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-29 Thread Greg Chapman
On Mar 22, 10:18 pm, Andy Fingerhut andy.finger...@gmail.com wrote: If anyone has suggestions for what you would like to see added to the cheatsheet, especially _specific_ suggestions, feel free to send me email. I was just looking at the clojure.org cheatsheet today and noticed that it

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-28 Thread David Martin
There is a jquery plugin called hoverintent which accomplishes this. http://cherne.net/brian/resources/jquery.hoverIntent.html -Dave On Tue, Mar 27, 2012 at 3:41 PM, Andy Fingerhut andy.finger...@gmail.comwrote: I would be happy to, if someone could teach me how to do it. I didn't write the

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-28 Thread Andy Fingerhut
Just to follow up quickly, two possible ways have been suggested for doing this, but one way seems to require increasing the distance between words on the page, which I'd prefer not to do. The other I haven't looked into in enough detail to see whether it will work, but I may do that soon. As

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Frank Siebenlist
(3) tooltips using a modified TipTip jQuery plugin tool, for people like me who like its look feel better than (2). http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html I like that one - looks cool - very helpful!! Thanks, Frank. On Mar

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Frank Siebenlist
Forgot to add that we only need one cheatsheet, and I vote for (3). On Mar 27, 2012, at 7:55 AM, Frank Siebenlist wrote: (3) tooltips using a modified TipTip jQuery plugin tool, for people like me who like its look feel better than (2).

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread David Martin
There can be only one. :-) I prefer #3 as well. On Mon, Mar 26, 2012 at 2:25 PM, Andy Fingerhut andy.finger...@gmail.comwrote: Welcome, Pierre. Thanks for the info. My current thinking is to start publishing on clojure.org two, or maybe even three versions of the cheatsheet: (1) no

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Mark
Love the new cheatsheet! Because no good deed go unpunished: Can you make hiding the popup a little less sensitve? I find myself looking at a popup and then unconsciously moving the mouse into the popup text and that causes the popup to disappear. On Monday, March 26, 2012 2:25:17 PM UTC-7,

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Andy Fingerhut
I would be happy to, if someone could teach me how to do it. I didn't write the JavaScript that does the tooltips -- I just took the TipTip jQuery plugin and bashed away at it slightly until it did what I wanted. I've tried using keepAlive: true in the options it already implements to see if

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Andrea Chiavazza
Would you consider removing the underlining from all links ? I think it would look much better, -- 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

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread John Gabriele
On Mar 26, 5:25 pm, Andy Fingerhut andy.finger...@gmail.com wrote: (3) tooltips using a modified TipTip jQuery plugin tool, for people like me who like its look feel better than (2).    http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-t... I like #3 as well, though would

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-27 Thread Pierre Mariani
You can do 2 things, together or separate depending on your choice: -increase the area that will respond to the mouse hover, so you don't have to be exactly on the link to see the tooltip -lengthen the fadeOut delay. I have implemented both at the URL below.

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-26 Thread Pierre Mariani
On Saturday, March 24, 2012 11:59:49 PM UTC-7, Andy Fingerhut wrote: I've tried again using links with doc strings as the values of the title attribute, but when the text in Firefox 11.0 it does not honor the line breaks in my text, but reflows it. Try it out yourself at [1]: [1]

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-26 Thread Andy Fingerhut
Welcome, Pierre. Thanks for the info. My current thinking is to start publishing on clojure.org two, or maybe even three versions of the cheatsheet: (1) no tooltips, just like the one published now, in case people find them annoying: http://clojure.org/cheatsheet (2) tooltips with the

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Andy Fingerhut
I've tried again using links with doc strings as the values of the title attribute, but when the text in Firefox 11.0 it does not honor the line breaks in my text, but reflows it. Try it out yourself at [1]: [1]

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Cedric Greevey
On Sun, Mar 25, 2012 at 2:59 AM, Andy Fingerhut andy.finger...@gmail.com wrote: I've tried again using links with doc strings as the values of the title attribute, but when the text in Firefox 11.0 it does not honor the line breaks in my text, but reflows it.  Try it out yourself at [1]:

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread DHM
On Mar 24, 6:32 pm, Cedric Greevey cgree...@gmail.com wrote: On Fri, Mar 23, 2012 at 4:43 PM, David Martin davidhmar...@gmail.com wrote: I agree that title attribute is the way to go. You shouldn't use the alt attribute for tooltips though, as this violates accessibility standards. Alt

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Andy Fingerhut
On Mar 25, 2012, at 12:15 AM, Cedric Greevey wrote: On Sun, Mar 25, 2012 at 2:59 AM, Andy Fingerhut andy.finger...@gmail.com wrote: I've tried again using links with doc strings as the values of the title attribute, but when the text in Firefox 11.0 it does not honor the line breaks in my

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread DHM
Remind me again: why do you want to put much of the docstring in there, and not just a quick precis that's enough to jog someone's memory and/or let them know whether they ought to click through or should skip that one based on what they're trying to find? I like that what I see in the

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Moritz Ulrich
On Sun, Mar 25, 2012 at 20:40, DHM davidhmar...@gmail.com wrote: Um... I don't want this to devolve into an argument, but can I voice my support for going with the full docstring tooltip? Having tried it, it seems really useful to me, and I don't see the reason to reduce the text to something

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-24 Thread David Martin
I agree that title attribute is the way to go. You shouldn't use the alt attribute for tooltips though, as this violates accessibility standards. Alt should either contain a literal description of the image, or be left empty. On Mar 23, 2012 1:11 PM, Cedric Greevey cgree...@gmail.com wrote: On

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-24 Thread Cedric Greevey
On Fri, Mar 23, 2012 at 4:43 PM, David Martin davidhmar...@gmail.com wrote: I agree that title attribute is the way to go. You shouldn't use the alt attribute for tooltips though, as this violates accessibility standards. Alt should either contain a literal description of the image, or be left

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Rostislav Svoboda
Hi Andy If anyone has suggestions for what you would like to see added to the cheatsheet It'd be great to have a tooltip appearing at every function I go over with my mouse. Typically I click on a function just to realize Oh, this is not the one I need so I have to go back. And this back

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Andy Fingerhut
I definitely like the tooltip idea. I like it so much that I've already played with it a bit, looking at several web pages with instructions for how to do it, but my knowledge of good ways to do this is zero except for the results of those Google searches. Has anyone implemented tooltips on a

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread László Török
Hi, I think Twitter's Bootstrap toolkit is sg to consider. http://twitter.github.com/bootstrap/javascript.html#tooltips also http://twitter.github.com/bootstrap/javascript.html#popovers I already used them, they're easy and fun to implement. :) I think if the content already appers somewhere

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Jordan Berg
It would be straightforward in clojurescript as well. Google provides a bunch of different tooltips in the closure library: http://closure-library.googlecode.com/svn/docs/class_goog_ui_Tooltip.html http://closure-library.googlecode.com/svn/docs/class_goog_ui_AdvancedTooltip.html

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Cedric Greevey
On Fri, Mar 23, 2012 at 10:58 AM, Andy Fingerhut andy.finger...@gmail.com wrote: I definitely like the tooltip idea.  I like it so much that I've already played with it a bit, looking at several web pages with instructions for how to do it, but my knowledge of good ways to do this is zero

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Andy Fingerhut
Thanks for the suggestions, folks. Cedric, have you tried your method before? I'm not sure, but I think it was the thing that I tried that led me to add (b) to my list of preference. I like anything that makes the development job easier, but not if it violates that preference. Thanks, Andy On

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Cedric Greevey
On Fri, Mar 23, 2012 at 3:57 PM, Andy Fingerhut andy.finger...@gmail.com wrote: Thanks for the suggestions, folks. Cedric, have you tried your method before?  I'm not sure, but I think it was the thing that I tried that led me to add (b) to my list of preference.  I like anything that makes

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Andy Fingerhut
I'm not putting the Declaration of Independence in the tooltips, but the Clojure doc strings, with the same text width as they appear in the original, which is nearly 80 characters wide. Those are easily wide enough to go partially out of the browser window unless the browser takes pains not to

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-23 Thread Cedric Greevey
On Fri, Mar 23, 2012 at 4:49 PM, Andy Fingerhut andy.finger...@gmail.com wrote: I'm not putting the Declaration of Independence in the tooltips, but the Clojure doc strings, with the same text width as they appear in the original, which is nearly 80 characters wide. I'd suggest not using the

New(er) Clojure cheatsheet hot off the presses

2012-03-22 Thread Andy Fingerhut
Alex Miller not only organizes conferences that are a blast to attend (i.e. Clojure/West, and I'm inclined to believe Strange Loop would be cool, too), he also puts up new versions of the Clojure cheatsheet when I ask him nicely. Here it is, in the usual place: http://clojure.org/cheatsheet

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread MarisO
(defn fac [n] (if (= n 1) 1 (* n fac (- n 1 your code tries to multiply n by function this is correct: (defn fac [n] (if (= n 1) 1 (* n (fac (- n 1) On Aug 2, 8:11 am, recurve7 dan.m...@gmail.com wrote: In browsing this group I see this topic has been brought up several times over

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Nicolas
On 3 août, 03:00, Mark markaddle...@gmail.com wrote: The compiler might not be able to do better but the runtime system certainly could.  In this case, both filtered and more information is what's needed.   Why couldn't the runtime generate a message like: Symbol fac of type clojure.lang.IFn

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Brian Goslinga
On Aug 2, 8:39 am, Ken Wesson kwess...@gmail.com wrote: It is true that the messages commonly encountered could stand to be better documented on a Clojure site. I'm wondering if we could go further, though, and make REPL exception printing more informative. The Java exception gets stored in

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Brian Marick
On Aug 2, 2011, at 7:23 PM, Armando Blancas wrote: Check out the work of Warren Teitelman on Conversational LISP and Do What I Mean, way back when most in this board weren't even born. Around 1985, I heard Teitelman's Do What I Mean (DWIM) referred to as DWWTWHM (Do What Warren Teitelman

New to Clojure -- Errors Are Frustrating

2011-08-02 Thread recurve7
In browsing this group I see this topic has been brought up several times over the past 3 years, so I apologize for revisiting it. I just downloaded Clojure and was excited to try it, but so far trying to move beyond simple examples has often resulted in me making a mistake that yields a Java

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread Sergey Didenko
It got improved a lot in Clojure 1.3 which is beta for a while. -- 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

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread Ken Wesson
On Tue, Aug 2, 2011 at 3:11 AM, recurve7 dan.m...@gmail.com wrote: Here's one example where recursion and lack of positional error feedback make it hard for me, as someone coming from Java, to spot the error (and seeing ClassCastException threw me off and had me wondering where/how I had done

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread Jeremy Heiler
On Tue, Aug 2, 2011 at 3:11 AM, recurve7 dan.m...@gmail.com wrote: Here's one example where recursion and lack of positional error feedback make it hard for me, as someone coming from Java, to spot the error (and seeing ClassCastException threw me off and had me wondering where/how I had done

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread Sean Corfield
On Tue, Aug 2, 2011 at 12:11 AM, recurve7 dan.m...@gmail.com wrote: user= (defn fac [n] (if (= n 1) 1 (* n fac (- n 1 #'user/fac user= (fac 3) java.lang.ClassCastException: user$fac cannot be cast to java.lang.Number (NO_SOURCE_FILE:0) Let's assume you'd put the code in a source file

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread recurve7
Thanks for the replies. I see 1.3 Beta 1 provides some more Java context that helps me find the problem, although it still doesn't afford Clojure its own uniquely-searchable error system or positional error references. On Aug 2, 6:31 am, Sergey Didenko sergey.dide...@gmail.com wrote: It got

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread recurve7
Thank you, Ken. It's encouraging to see the community is thinking of ways to improve this. On Aug 2, 6:39 am, Ken Wesson kwess...@gmail.com wrote: On Tue, Aug 2, 2011 at 3:11 AM, recurve7 dan.m...@gmail.com wrote: Here's one example where recursion and lack of positional error feedback make

  1   2   >