Re: Clojure cheatsheet with tooltips (alpha)

2012-03-28 Thread Dave Sann
How are you able to make the tooltips extend beyond the browser window. I 
have not seen this before.

Dave

On Saturday, 24 March 2012 21:15:20 UTC+11, Andy Fingerhut wrote:

 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't 
 ready yet.


 http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 I found and used TipTip for tooltips [1], because it advertises the 
 ability to keep the tooltips within the browser window no matter where the 
 cursor is relative to the window border.  I've tweaked a few settings that 
 may cause it to fail to do this properly sometimes, and there are many 
 cases where the tooltip appears so close to the cursor that it flashes on 
 and off quickly.  As a workaround, try moving the cursor away from the 
 tooltip, but still hovering over the link if you can.  If anyone knows how 
 to correct those problems by tweaking the JavaScript code or CSS settings, 
 please let me know.

 The tooltips consist of the normal doc strings, with the first line of 
 dashes removed, and truncated to the first 15 lines if it is longer than 
 that (very few are).  Most links go to clojuredocs.org, as usual.

 Give it a test drive and see what you think.

 Andy


 [1] http://code.drewwilson.com/entry/tiptip-jquery-plugin



-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-27 Thread Chip Collier
Hi,

 The key question is Why do we need a cheatsheet? Well, the learning


Speaking from personal experience as someone who writes Python for a
living. There are a lot of cases where I know that Clojure *could*
already have a function to do something but I don't know what it's
called. So I have to spend a lot of time looking at things and more or
less feeling around in the dark until I get a lead.
To give a concrete example: in Python there is a function `enumerate`
and in Clojure there is a function `map-indexed`. The cheatsheet was a
handy way to make this mental connection.


Cheers,
Chip



signature.asc
Description: OpenPGP digital signature


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-27 Thread Alex Miller
Maybe I'm in the minority but I don't think the cheat sheet needs to be a 
queryable oracle for all Clojure information.  It's just a tool to jar your 
memory or browse for a function by category.  When I first started using 
Clojure I found it helpful to browse through sequence functions in 
particular.  I was inexperienced enough then to not even know how to ask 
the right questions to query a cheat sheet.  

I think a tool like you describe sounds like a fun hack to write but I 
don't see how it has anything to do with the cheat sheet.

Andy also mentions elsewhere on this thread that we should have multiple 
versions of the sheet on the web site and I disagree with that too.  imho 
we need a single link where people go - it's perfectly fine to have a 
library of other versions available at the underlying repo.


On Monday, March 26, 2012 4:07:20 PM UTC-5, Bost wrote:

  if there are any strong feelings about how to make the cheatsheet more 
 of a modular, queryable structure than it currently is.

 The key question is Why do we need a cheatsheet? Well, the learning
 curve is steep. I.e. there are things like [1] quite many functions
 and [2] they are hard to remember and [3] the REPL is by no means
 beginner friendly etc.

 What can be done about it ?
 We can reduce the amount of functions. I doubt this would work. Or we
 develop tools like this queryable cheatsheets with tooltips etc. Or...
 well, basically most of the time I personally have a problem like:

 I have [1 2 3 4 5 6 7 8 9] and (a b c d). How do I make (:a [1 2] :b
 [4 5] } {:c [6 7] [:d {8 9}]) from it?

 I was thinking about a clojure function which applies some frequently
 used patterns (combinations of map, apply, into, assoc, vector, list
 etc.) on my input parameter and compares the result with the last
 parameter. And it prints the combination if they are equal or gives me
 the best nearest guess. I realized it's a job for a macro... something
 like discussed on

 http://www.learningclojure.com/2010/09/clojure-macro-tutorial-part-i-getting.html

 What do you think about that?

 Bost



-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-27 Thread Rostislav Svoboda
 I think a tool like you describe sounds like a fun hack to write but I don't 
 see how it has anything to do with the cheat sheet.

A tool that writes the code instead of you cannot be called a sheet
anymore. It's cheating in its *purest* form :) But I repeat: Don't get
excited too much. To make such a tool means to make your computer
think. So all we can do is to make a tool which help you to get over
the initial stages o learning clojure.

Maybe the very first implementation of this tool could just throw a
bunch of examples from http://clojuredocs.org/ at you...

Bost

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Andy Fingerhut
I've replaced this test page [1] with another one.  The one I posted on March 
24 has been overwritten.  The version at [2] that does not use JavaScript, but 
only the title attribute on anchors, is still there as it was yesterday.

[1] 
http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

[2] 
http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html

The new version of [1] uses different JavaScript for the tooltips, simplified 
so that the tips always appear above or below the link being tipped.  This made 
it easier to ensure the tip always appears within the bounds of the window.  
The only exceptions I am aware of where the tip can go out of the window 
boundaries is if your window is so narrow ( 600 pixels or so) that the tip 
doesn't fit in the width of the window at all, or too short vertically.

It should also eliminate the bouncing problem that the old one had, and I 
have made the tips completely opaque, not partially transparent.

It still probably won't work well with Android browsers with touchscreens.  I 
don't know what could be done about that.  I did try it on Safari on my iPhone, 
and found that on a single tap on a link, it showed the tooltip, and it 
required a second tap on the same link for the browser to follow the link.  I 
like that behavior.

Take it for another spin if you had issues with it before.

All necessary files to generate these pages, including my modified jQuery 
TipTip plugin, are here:

https://github.com/jafingerhut/clojure-cheatsheets

Andy


On Mar 24, 2012, at 3:15 AM, Andy Fingerhut wrote:

 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't ready 
 yet.
 
 http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html
 
 I found and used TipTip for tooltips [1], because it advertises the ability 
 to keep the tooltips within the browser window no matter where the cursor is 
 relative to the window border.  I've tweaked a few settings that may cause it 
 to fail to do this properly sometimes, and there are many cases where the 
 tooltip appears so close to the cursor that it flashes on and off quickly.  
 As a workaround, try moving the cursor away from the tooltip, but still 
 hovering over the link if you can.  If anyone knows how to correct those 
 problems by tweaking the JavaScript code or CSS settings, please let me know.
 
 The tooltips consist of the normal doc strings, with the first line of dashes 
 removed, and truncated to the first 15 lines if it is longer than that (very 
 few are).  Most links go to clojuredocs.org, as usual.
 
 Give it a test drive and see what you think.
 
 Andy
 
 
 [1] http://code.drewwilson.com/entry/tiptip-jquery-plugin
 

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread mnicky
Seems that the text of cl-format overflows the right edge of the tooltip: 
http://i.imgur.com/B0ljt.png (tested in FF, Opera, Chrome)

On Monday, March 26, 2012 11:12:50 AM UTC+2, Andy Fingerhut wrote:

 I've replaced this test page [1] with another one.  The one I posted on 
 March 24 has been overwritten.  The version at [2] that does not use 
 JavaScript, but only the title attribute on anchors, is still there as it 
 was yesterday.

 [1] 
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 [2] 
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-title-attribute.​htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html

 The new version of [1] uses different JavaScript for the tooltips, 
 simplified so that the tips always appear above or below the link being 
 tipped.  This made it easier to ensure the tip always appears within the 
 bounds of the window.  The only exceptions I am aware of where the tip can 
 go out of the window boundaries is if your window is so narrow ( 600 
 pixels or so) that the tip doesn't fit in the width of the window at all, 
 or too short vertically.

 It should also eliminate the bouncing problem that the old one had, and 
 I have made the tips completely opaque, not partially transparent.

 It still probably won't work well with Android browsers with touchscreens. 
  I don't know what could be done about that.  I did try it on Safari on my 
 iPhone, and found that on a single tap on a link, it showed the tooltip, 
 and it required a second tap on the same link for the browser to follow the 
 link.  I like that behavior.

 Take it for another spin if you had issues with it before.

 All necessary files to generate these pages, including my modified jQuery 
 TipTip plugin, are here:

 https://github.com/​jafingerhut/clojure-​cheatsheetshttps://github.com/jafingerhut/clojure-cheatsheets

 Andy


 On Mar 24, 2012, at 3:15 AM, Andy Fingerhut wrote:

  There are still some problems with this, but it is ready for 
 experimental use, at least.  Alex, please don't put this on clojure.org-- it 
 ain't ready yet.
  
  
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html
  
  I found and used TipTip for tooltips [1], because it advertises the 
 ability to keep the tooltips within the browser window no matter where the 
 cursor is relative to the window border.  I've tweaked a few settings that 
 may cause it to fail to do this properly sometimes, and there are many 
 cases where the tooltip appears so close to the cursor that it flashes on 
 and off quickly.  As a workaround, try moving the cursor away from the 
 tooltip, but still hovering over the link if you can.  If anyone knows how 
 to correct those problems by tweaking the JavaScript code or CSS settings, 
 please let me know.
  
  The tooltips consist of the normal doc strings, with the first line of 
 dashes removed, and truncated to the first 15 lines if it is longer than 
 that (very few are).  Most links go to clojuredocs.org, as usual.
  
  Give it a test drive and see what you think.
  
  Andy
  
  
  [1] 
  http://code.drewwilson.com/​entry/tiptip-jquery-pluginhttp://code.drewwilson.com/entry/tiptip-jquery-plugin
  


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread mnicky
just the first idea that came into my mind: maybe with something like RDF 
schema?

On Monday, March 26, 2012 8:47:54 PM UTC+2, Devin Walters (devn) wrote:

  This is slightly off-topic, but I wanted to discuss the structure of the 
 cheatsheet. 

 I would like to turn the cheatsheet into a more queryable document than it 
 currently is and allow for it to be a dependency via clojars. 
 cheatsheet-structure has a lot of the display logic for various output 
 formats which doesn't seem relevant to simply getting information out of a 
 specific section or subsection. It seems like the raw data should be 
 separate from the display logic: for instance, instead of…

 [:column
   [:box green
:section Primitives
:subsection Numbers
:table [[Arithmetic :cmds '[+ - …]]]
   ]
 ]

 It should be possible to have a simple map somewhere:

 (def primitives
   {:primitives {:children [:numbers, :strings, …], :column? true},
:primitives-numbers {:title Numbers, :children [:arithmetic, …], 
 :box-color blue},
:numbers-arithmetic {:title Arithmetic, :commands '[+ - …]}})

 With a function that does something like:

 (into-output-structure primitives) = [:column [:box blue :section 
 Primitives :subsection Numbers :table [[Arithmetic :cmds '[+ - …]]]

 Long story short, I've been staring at this for a bit, and I'm wondering 
 if there are any strong feelings about how to make the cheatsheet more of a 
 modular, queryable structure than it currently is.

 Cheers,
 '(Devin Walters)

 On Monday, March 26, 2012 at 4:35 AM, mnicky wrote:

 Seems that the text of cl-format overflows the right edge of the tooltip: 
 http://i.imgur.com/B0ljt.png (tested in FF, Opera, Chrome)

 On Monday, March 26, 2012 11:12:50 AM UTC+2, Andy Fingerhut wrote:

 I've replaced this test page [1] with another one.  The one I posted on 
 March 24 has been overwritten.  The version at [2] that does not use 
 JavaScript, but only the title attribute on anchors, is still there as it 
 was yesterday.

 [1] 
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 [2] 
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-title-attribute.​htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html

 The new version of [1] uses different JavaScript for the tooltips, 
 simplified so that the tips always appear above or below the link being 
 tipped.  This made it easier to ensure the tip always appears within the 
 bounds of the window.  The only exceptions I am aware of where the tip can 
 go out of the window boundaries is if your window is so narrow ( 600 
 pixels or so) that the tip doesn't fit in the width of the window at all, 
 or too short vertically.

 It should also eliminate the bouncing problem that the old one had, and 
 I have made the tips completely opaque, not partially transparent.

 It still probably won't work well with Android browsers with touchscreens. 
  I don't know what could be done about that.  I did try it on Safari on my 
 iPhone, and found that on a single tap on a link, it showed the tooltip, 
 and it required a second tap on the same link for the browser to follow the 
 link.  I like that behavior.

 Take it for another spin if you had issues with it before.

 All necessary files to generate these pages, including my modified jQuery 
 TipTip plugin, are here:

 https://github.com/​jafingerhut/clojure-​cheatsheetshttps://github.com/jafingerhut/clojure-cheatsheets

 Andy


 On Mar 24, 2012, at 3:15 AM, Andy Fingerhut wrote:

  There are still some problems with this, but it is ready for 
 experimental use, at least.  Alex, please don't put this on clojure.org-- it 
 ain't ready yet.
  
  
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html
  
  I found and used TipTip for tooltips [1], because it advertises the 
 ability to keep the tooltips within the browser window no matter where the 
 cursor is relative to the window border.  I've tweaked a few settings that 
 may cause it to fail to do this properly sometimes, and there are many 
 cases where the tooltip appears so close to the cursor that it flashes on 
 and off quickly.  As a workaround, try moving the cursor away from the 
 tooltip, but still hovering over the link if you can.  If anyone knows how 
 to correct those problems by tweaking the JavaScript code or CSS settings, 
 please let me know.
  
  The tooltips consist of the normal doc strings, with the first line of 
 dashes removed, and truncated to the first 15 lines if it is longer than 
 that (very few are).  Most links go to clojuredocs.org, as usual.
  
  Give it a test drive and see what you think.
  
  Andy
  
  
  

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Andy Fingerhut
It might be straightforward to write a bit of Clojure code that takes the first 
structure and transforms it into the second.  Discarding information you don't 
want is usually easier than adding information that isn't there.

Strings could be manipulated to remove characters that are illegal in keywords, 
and change spaces to dashes, and then call keyword on it, e.g.

user= (keyword (str primitives - numbers))
:primitives-numbers

Andy

On Mar 26, 2012, at 11:47 AM, Devin Walters wrote:

 This is slightly off-topic, but I wanted to discuss the structure of the 
 cheatsheet.
 
 I would like to turn the cheatsheet into a more queryable document than it 
 currently is and allow for it to be a dependency via clojars. 
 cheatsheet-structure has a lot of the display logic for various output 
 formats which doesn't seem relevant to simply getting information out of a 
 specific section or subsection. It seems like the raw data should be separate 
 from the display logic: for instance, instead of…
 
 [:column
   [:box green
:section Primitives
:subsection Numbers
:table [[Arithmetic :cmds '[+ - …]]]
   ]
 ]
 
 It should be possible to have a simple map somewhere:
 
 (def primitives
   {:primitives {:children [:numbers, :strings, …], :column? true},
:primitives-numbers {:title Numbers, :children [:arithmetic, …], 
 :box-color blue},
:numbers-arithmetic {:title Arithmetic, :commands '[+ - …]}})
 
 With a function that does something like:
 
 (into-output-structure primitives) = [:column [:box blue :section 
 Primitives :subsection Numbers :table [[Arithmetic :cmds '[+ - …]]]
 
 Long story short, I've been staring at this for a bit, and I'm wondering if 
 there are any strong feelings about how to make the cheatsheet more of a 
 modular, queryable structure than it currently is.
 
 Cheers,
 '(Devin Walters)
 
 On Monday, March 26, 2012 at 4:35 AM, mnicky wrote:
 
 Seems that the text of cl-format overflows the right edge of the tooltip: 
 http://i.imgur.com/B0ljt.png (tested in FF, Opera, Chrome)
 
 On Monday, March 26, 2012 11:12:50 AM UTC+2, Andy Fingerhut wrote:
 
 I've replaced this test page [1] with another one.  The one I posted on 
 March 24 has been overwritten.  The version at [2] that does not use 
 JavaScript, but only the title attribute on anchors, is still there as it 
 was yesterday.
 [1] 
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.html
 
 [2] 
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-title-attribute.​html
 
 The new version of [1] uses different JavaScript for the tooltips, 
 simplified so that the tips always appear above or below the link being 
 tipped.  This made it easier to ensure the tip always appears within the 
 bounds of the window.  The only exceptions I am aware of where the tip can 
 go out of the window boundaries is if your window is so narrow ( 600 
 pixels or so) that the tip doesn't fit in the width of the window at all, 
 or too short vertically.
 
 It should also eliminate the bouncing problem that the old one had, and I 
 have made the tips completely opaque, not partially transparent.
 
 It still probably won't work well with Android browsers with touchscreens.  
 I don't know what could be done about that.  I did try it on Safari on my 
 iPhone, and found that on a single tap on a link, it showed the tooltip, 
 and it required a second tap on the same link for the browser to follow the 
 link.  I like that behavior.
 
 Take it for another spin if you had issues with it before.
 
 All necessary files to generate these pages, including my modified jQuery 
 TipTip plugin, are here:
 
 https://github.com/​jafingerhut/clojure-​cheatsheets
 
 Andy
 
 
 On Mar 24, 2012, at 3:15 AM, Andy Fingerhut wrote:
 
  There are still some problems with this, but it is ready for experimental 
  use, at least.  Alex, please don't put this on clojure.org -- it ain't 
  ready yet.
  
  http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.html
  
  I found and used TipTip for tooltips [1], because it advertises the 
  ability to keep the tooltips within the browser window no matter where 
  the cursor is relative to the window border.  I've tweaked a few settings 
  that may cause it to fail to do this properly sometimes, and there are 
  many cases where the tooltip appears so close to the cursor that it 
  flashes on and off quickly.  As a workaround, try moving the cursor 
  away from the tooltip, but still hovering over the link if you can.  If 
  anyone knows how to correct those problems by tweaking the JavaScript 
  code or CSS settings, please let me know.
  
  The tooltips consist of the normal doc strings, with the first line of 
  dashes removed, and truncated to the first 15 lines if it is longer than 
  that (very few are).  Most links go to clojuredocs.org, as usual.
  
  Give it a test drive and see what you think.
  

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Devin Walters
Ah, I was thinking the reverse: (clojure.string/split (name :foo-bar) #-)  

But yes, you might be right. I guess the only thing I'd say is that the 
structure as it currently exists is sort of a bear. It just feels too big, 
like there's a more modular solution, but maybe it's not necessary?  

'(Devin Walters)


On Monday, March 26, 2012 at 2:12 PM, Andy Fingerhut wrote:

 It might be straightforward to write a bit of Clojure code that takes the 
 first structure and transforms it into the second.  Discarding information 
 you don't want is usually easier than adding information that isn't there.
  
 Strings could be manipulated to remove characters that are illegal in 
 keywords, and change spaces to dashes, and then call keyword on it, e.g.
  
 user= (keyword (str primitives - numbers))
 :primitives-numbers
  
 Andy
  
 On Mar 26, 2012, at 11:47 AM, Devin Walters wrote:
  This is slightly off-topic, but I wanted to discuss the structure of the 
  cheatsheet.  
   
  I would like to turn the cheatsheet into a more queryable document than it 
  currently is and allow for it to be a dependency via clojars. 
  cheatsheet-structure has a lot of the display logic for various output 
  formats which doesn't seem relevant to simply getting information out of a 
  specific section or subsection. It seems like the raw data should be 
  separate from the display logic: for instance, instead of…
   
  [:column
[:box green
 :section Primitives
 :subsection Numbers
 :table [[Arithmetic :cmds '[+ - …]]]
]
  ]
   
  It should be possible to have a simple map somewhere:
   
  (def primitives
{:primitives {:children [:numbers, :strings, …], :column? true},
 :primitives-numbers {:title Numbers, :children [:arithmetic, …], 
  :box-color blue},
 :numbers-arithmetic {:title Arithmetic, :commands '[+ - …]}})
   
  With a function that does something like:
   
  (into-output-structure primitives) = [:column [:box blue :section 
  Primitives :subsection Numbers :table [[Arithmetic :cmds '[+ - …]]]
   
  Long story short, I've been staring at this for a bit, and I'm wondering if 
  there are any strong feelings about how to make the cheatsheet more of a 
  modular, queryable structure than it currently is.  
   
  Cheers,
  '(Devin Walters)
   
   
  On Monday, March 26, 2012 at 4:35 AM, mnicky wrote:
   
   Seems that the text of cl-format overflows the right edge of the tooltip: 
   http://i.imgur.com/B0ljt.png (tested in FF, Opera, Chrome)

   On Monday, March 26, 2012 11:12:50 AM UTC+2, Andy Fingerhut wrote:
I've replaced this test page [1] with another one.  The one I posted on 
March 24 has been overwritten.  The version at [2] that does not use 
JavaScript, but only the title attribute on anchors, is still there as 
it was yesterday.
[1] 
http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.html
 
(http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html)
[2] 
http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-title-attribute.​html
 
(http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html)
The new version of [1] uses different JavaScript for the tooltips, 
simplified so that the tips always appear above or below the link being 
tipped.  This made it easier to ensure the tip always appears within 
the bounds of the window.  The only exceptions I am aware of where the 
tip can go out of the window boundaries is if your window is so narrow 
( 600 pixels or so) that the tip doesn't fit in the width of the 
window at all, or too short vertically.
It should also eliminate the bouncing problem that the old one had, 
and I have made the tips completely opaque, not partially transparent.
It still probably won't work well with Android browsers with 
touchscreens.  I don't know what could be done about that.  I did try 
it on Safari on my iPhone, and found that on a single tap on a link, it 
showed the tooltip, and it required a second tap on the same link for 
the browser to follow the link.  I like that behavior.
Take it for another spin if you had issues with it before.
All necessary files to generate these pages, including my modified 
jQuery TipTip plugin, are here:
https://github.com/​jafingerhut/clojure-​cheatsheets 
(https://github.com/jafingerhut/clojure-cheatsheets)
Andy
 
On Mar 24, 2012, at 3:15 AM, Andy Fingerhut wrote:
 There are still some problems with this, but it is ready for 
 experimental use, at least.  Alex, please don't put this on 
 clojure.org (http://clojure.org/) -- it ain't ready yet.
  
 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.html
  
 

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Rostislav Svoboda
 if there are any strong feelings about how to make the cheatsheet more of a 
 modular, queryable structure than it currently is.

The key question is Why do we need a cheatsheet? Well, the learning
curve is steep. I.e. there are things like [1] quite many functions
and [2] they are hard to remember and [3] the REPL is by no means
beginner friendly etc.

What can be done about it ?
We can reduce the amount of functions. I doubt this would work. Or we
develop tools like this queryable cheatsheets with tooltips etc. Or...
well, basically most of the time I personally have a problem like:

I have [1 2 3 4 5 6 7 8 9] and (a b c d). How do I make (:a [1 2] :b
[4 5] } {:c [6 7] [:d {8 9}]) from it?

I was thinking about a clojure function which applies some frequently
used patterns (combinations of map, apply, into, assoc, vector, list
etc.) on my input parameter and compares the result with the last
parameter. And it prints the combination if they are equal or gives me
the best nearest guess. I realized it's a job for a macro... something
like discussed on
http://www.learningclojure.com/2010/09/clojure-macro-tutorial-part-i-getting.html

What do you think about that?

Bost

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Devin Walters
This is basically exactly what I've been thinking about. 

I was going to get the cheatsheet into a place where I could use it easily so I 
could ask:

(sente [1 2 3])

Since [1 2 3] is a clojure.lang.PersistentVector, we could return functions 
that operate specifically on that type.

But the ideal case is exactly what you're saying, and what I've wanted to 
figure out for a long time. Kibit seems like a template for doing this sort of 
thing, but it will take a lot of training to get it to be useful. It's 
certainly a non-trivial problem. 

'(Devin Walters)


On Monday, March 26, 2012 at 4:07 PM, Rostislav Svoboda wrote:

  if there are any strong feelings about how to make the cheatsheet more of a 
  modular, queryable structure than it currently is.
 
 
 The key question is Why do we need a cheatsheet? Well, the learning
 curve is steep. I.e. there are things like [1] quite many functions
 and [2] they are hard to remember and [3] the REPL is by no means
 beginner friendly etc.
 
 What can be done about it ?
 We can reduce the amount of functions. I doubt this would work. Or we
 develop tools like this queryable cheatsheets with tooltips etc. Or...
 well, basically most of the time I personally have a problem like:
 
 I have [1 2 3 4 5 6 7 8 9] and (a b c d). How do I make (:a [1 2] :b
 [4 5] } {:c [6 7] [:d {8 9}]) from it?
 
 I was thinking about a clojure function which applies some frequently
 used patterns (combinations of map, apply, into, assoc, vector, list
 etc.) on my input parameter and compares the result with the last
 parameter. And it prints the combination if they are equal or gives me
 the best nearest guess. I realized it's a job for a macro... something
 like discussed on
 http://www.learningclojure.com/2010/09/clojure-macro-tutorial-part-i-getting.html
 
 What do you think about that?
 
 Bost
 
 -- 
 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 
 (mailto:clojure@googlegroups.com)
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com 
 (mailto:clojure+unsubscr...@googlegroups.com)
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 
 


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Rostislav Svoboda
 It's certainly a non-trivial problem

To solve this problem would mean 'to make computer think'. That's why
I only mentioned 'frequently used patterns'. But it would be a great
tool to help learn clojure.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Devin Walters
I have a repo called sente that is largely a blank slate. Would you be 
interested in collaborating on this? If so let me know your github username and 
ill add you to the project.

Cheers,
'(Devin Walters)

On Mar 26, 2012, at 4:31 PM, Rostislav Svoboda rostislav.svob...@gmail.com 
wrote:

 It's certainly a non-trivial problem
 
 To solve this problem would mean 'to make computer think'. That's why
 I only mentioned 'frequently used patterns'. But it would be a great
 tool to help learn clojure.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-26 Thread Rostislav Svoboda
 I have a repo called sente that is largely a blank slate. Would you be 
 interested in collaborating on this?

Yes I'm *definitely* interested but I doubt I'd gonna be much useful for you.

 If so let me know your github username and ill add you to the project.

Thank you but I think it brings more if we exchange our ideas and
patches here on the mailing list.

Bost

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-25 Thread Philip Potter
This looks great! Big usability win!

Phil

On 24 March 2012 10:15, Andy Fingerhut andy.finger...@gmail.com wrote:
 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't ready 
 yet.

 http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 I found and used TipTip for tooltips [1], because it advertises the ability 
 to keep the tooltips within the browser window no matter where the cursor is 
 relative to the window border.  I've tweaked a few settings that may cause it 
 to fail to do this properly sometimes, and there are many cases where the 
 tooltip appears so close to the cursor that it flashes on and off quickly.  
 As a workaround, try moving the cursor away from the tooltip, but still 
 hovering over the link if you can.  If anyone knows how to correct those 
 problems by tweaking the JavaScript code or CSS settings, please let me know.

 The tooltips consist of the normal doc strings, with the first line of dashes 
 removed, and truncated to the first 15 lines if it is longer than that (very 
 few are).  Most links go to clojuredocs.org, as usual.

 Give it a test drive and see what you think.

 Andy


 [1] http://code.drewwilson.com/entry/tiptip-jquery-plugin

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-25 Thread Rostislav Svoboda
I personally find this one better:
http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html

The tooltips appear right at the place where I'm looking and pointing
my mouse, and they tend to appear always at the same place - below the
mouse and line I'm reading.

 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't ready 
 yet.

 http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-25 Thread mnicky


On Sunday, March 25, 2012 1:41:29 PM UTC+2, Bost wrote:

 I personally find this one better:

 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-title-attribute.​htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html


Me too. It follows the KISS principle :)

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Clojure cheatsheet with tooltips (alpha)

2012-03-24 Thread Andy Fingerhut
There are still some problems with this, but it is ready for experimental use, 
at least.  Alex, please don't put this on clojure.org -- it ain't ready yet.

http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

I found and used TipTip for tooltips [1], because it advertises the ability to 
keep the tooltips within the browser window no matter where the cursor is 
relative to the window border.  I've tweaked a few settings that may cause it 
to fail to do this properly sometimes, and there are many cases where the 
tooltip appears so close to the cursor that it flashes on and off quickly.  
As a workaround, try moving the cursor away from the tooltip, but still 
hovering over the link if you can.  If anyone knows how to correct those 
problems by tweaking the JavaScript code or CSS settings, please let me know.

The tooltips consist of the normal doc strings, with the first line of dashes 
removed, and truncated to the first 15 lines if it is longer than that (very 
few are).  Most links go to clojuredocs.org, as usual.

Give it a test drive and see what you think.

Andy


[1] http://code.drewwilson.com/entry/tiptip-jquery-plugin

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-24 Thread mnicky
The tooltips themselves seem pretty nice, but on smaller windows, they are 
sometimes placed behind the edges and thus not visible: 
http://i.imgur.com/YA4gF.png

On Saturday, March 24, 2012 11:15:20 AM UTC+1, Andy Fingerhut wrote:

 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't 
 ready yet.


 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 I found and used TipTip for tooltips [1], because it advertises the 
 ability to keep the tooltips within the browser window no matter where the 
 cursor is relative to the window border.  I've tweaked a few settings that 
 may cause it to fail to do this properly sometimes, and there are many 
 cases where the tooltip appears so close to the cursor that it flashes on 
 and off quickly.  As a workaround, try moving the cursor away from the 
 tooltip, but still hovering over the link if you can.  If anyone knows how 
 to correct those problems by tweaking the JavaScript code or CSS settings, 
 please let me know.

 The tooltips consist of the normal doc strings, with the first line of 
 dashes removed, and truncated to the first 15 lines if it is longer than 
 that (very few are).  Most links go to clojuredocs.org, as usual.

 Give it a test drive and see what you think.

 Andy


 [1] 
 http://code.drewwilson.com/​entry/tiptip-jquery-pluginhttp://code.drewwilson.com/entry/tiptip-jquery-plugin


On Saturday, March 24, 2012 11:15:20 AM UTC+1, Andy Fingerhut wrote:

 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't 
 ready yet.


 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 I found and used TipTip for tooltips [1], because it advertises the 
 ability to keep the tooltips within the browser window no matter where the 
 cursor is relative to the window border.  I've tweaked a few settings that 
 may cause it to fail to do this properly sometimes, and there are many 
 cases where the tooltip appears so close to the cursor that it flashes on 
 and off quickly.  As a workaround, try moving the cursor away from the 
 tooltip, but still hovering over the link if you can.  If anyone knows how 
 to correct those problems by tweaking the JavaScript code or CSS settings, 
 please let me know.

 The tooltips consist of the normal doc strings, with the first line of 
 dashes removed, and truncated to the first 15 lines if it is longer than 
 that (very few are).  Most links go to clojuredocs.org, as usual.

 Give it a test drive and see what you think.

 Andy


 [1] 
 http://code.drewwilson.com/​entry/tiptip-jquery-pluginhttp://code.drewwilson.com/entry/tiptip-jquery-plugin


On Saturday, March 24, 2012 11:15:20 AM UTC+1, Andy Fingerhut wrote:

 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't 
 ready yet.


 http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-full.htmlhttp://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 I found and used TipTip for tooltips [1], because it advertises the 
 ability to keep the tooltips within the browser window no matter where the 
 cursor is relative to the window border.  I've tweaked a few settings that 
 may cause it to fail to do this properly sometimes, and there are many 
 cases where the tooltip appears so close to the cursor that it flashes on 
 and off quickly.  As a workaround, try moving the cursor away from the 
 tooltip, but still hovering over the link if you can.  If anyone knows how 
 to correct those problems by tweaking the JavaScript code or CSS settings, 
 please let me know.

 The tooltips consist of the normal doc strings, with the first line of 
 dashes removed, and truncated to the first 15 lines if it is longer than 
 that (very few are).  Most links go to clojuredocs.org, as usual.

 Give it a test drive and see what you think.

 Andy


 [1] 
 http://code.drewwilson.com/​entry/tiptip-jquery-pluginhttp://code.drewwilson.com/entry/tiptip-jquery-plugin


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-24 Thread Rostislav Svoboda
Hi Andy

On 24 March 2012 11:15, Andy Fingerhut andy.finger...@gmail.com wrote:
 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't ready 
 yet.

 http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 Give it a test drive and see what you think.

Slick! :)

I tested the tooltips on chrome, firefox and even on my android. On
chrome I find the tooltip boxes too transparent. On firefox the
transparency is fine but the tooltip font size is bigger than the
font-size used on the page (which IMO could be larger anyway) On the
android, well yea no tooltips appear :) so you need to do this back 
forth clicking as before. Interestingly when you go back then a
tooltip is placed behind the screen edges and it's kind of difficult
to get rid of it. The same appearance like reported here:

 The tooltips themselves seem pretty nice, but on smaller windows, they are
 sometimes placed behind the edges and thus not visible:
 http://i.imgur.com/YA4gF.png

Bost

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure cheatsheet with tooltips (alpha)

2012-03-24 Thread Peter Buckley
The tooltips work well on my BlackBerry, thanks!

-Original Message-
From: Rostislav Svoboda rostislav.svob...@gmail.com
Sender: clojure@googlegroups.com
Date: Sat, 24 Mar 2012 13:18:57 
To: clojure@googlegroups.com
Reply-To: clojure@googlegroups.com
Subject: Re: Clojure cheatsheet with tooltips (alpha)

Hi Andy

On 24 March 2012 11:15, Andy Fingerhut andy.finger...@gmail.com wrote:
 There are still some problems with this, but it is ready for experimental 
 use, at least.  Alex, please don't put this on clojure.org -- it ain't ready 
 yet.

 http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-full.html

 Give it a test drive and see what you think.

Slick! :)

I tested the tooltips on chrome, firefox and even on my android. On
chrome I find the tooltip boxes too transparent. On firefox the
transparency is fine but the tooltip font size is bigger than the
font-size used on the page (which IMO could be larger anyway) On the
android, well yea no tooltips appear :) so you need to do this back 
forth clicking as before. Interestingly when you go back then a
tooltip is placed behind the screen edges and it's kind of difficult
to get rid of it. The same appearance like reported here:

 The tooltips themselves seem pretty nice, but on smaller windows, they are
 sometimes placed behind the edges and thus not visible:
 http://i.imgur.com/YA4gF.png

Bost

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en