zk / clojuredocs Goto Github PK
View Code? Open in Web Editor NEWclojuredocs.org web app
Home Page: http://clojuredocs.org
License: Eclipse Public License 1.0
clojuredocs.org web app
Home Page: http://clojuredocs.org
License: Eclipse Public License 1.0
see views/function.html.erb
Search for something like "send-off" doesn't work because of the hyphen.
I didn't find any entries for new contrib libraries like clojure.java.jdbc and several others listed at http://clojure.github.com
It would be nice to have those.
Adding version support requires changes in several parts of the app:
libarary
, ns
, and name
from the functions
table to a function_versions
table.version
column to the function_versions
table.function.latest_version
/ function.versions
where appropriate.function.html.erb
page to view previous versions.
Hello,
The problem is that if you just search for "take-nth", the site doesn't find anything. However, the auto-complete works fine, and it's the only option to open this function's page.
Cheers,
Anton
Suggested by Christopher Maier and Dennis Crenshaw at the conj.
Need a way to clean a database dump.
User table:
Hi,
I think it would be a win for many users if you could include a autodiscovery link for a search plugin information.
I created a search engine information on mycroft http://mycroft.mozdev.org/search-engines.html?name=clojuredocs.org but direct integration would be nice I think.
Mycroft suggest to copy and modify the xml file in case of auto detection:
http://mycroft.mozdev.org/developer/hosting.html
Integration Example:
<meta>
...
<link rel="search" type="application/opensearchdescription+xml" title="ClojureDocs" href="http://mycroft.mozdev.org/installos.php.html/40721/clojuredocs_keywords.xml">
I figured the link tag would go into main.html.erb but I am not so sure about that and wanted to "ask" first.
What do you think?
regards
Ben.
Should not save as < and > in db (for display in tooling / repl), should handle on output to page.
I do not know which is considered correct, but I wanted to point out the inconsistency in case it was a bug.
When I use the API for Clojure 1.2.0 or 1.3 to get the comments for clojure.core/let, I get the same 1 comment beginning "Note Bene".
http://api.clojuredocs.org/comments/1.2.0/clojure.core/let
http://api.clojuredocs.org/comments/clojure.core/let
I also see that comment when I go to the 1.2.0 version of the web page here:
http://clojuredocs.org/clojure_core/1.2.0/clojure.core/let
but it is not there when I go to the 1.3 version of the let web page:
http://clojuredocs.org/clojure_core/clojure.core/let
Which of the 1.3 versions, the API or the web page, is considered correct?
duck-streams has been deprecated in the 1.2 branch of contrib, but this isn't reflected on its ns page. The :deprecated meta entry needs to be consumed and displayed on relevant pages.
I'm thinking hourly, AES encrypted backups to S3. I'm on the fence about incrementals.
Would be useful, after comments, to have an external link section for pointing to other blogs who have introduced the var being documented. Currently comments are used for that, but that just feels like a hack.
Link to special form url in the docstring / source, similar to the output of (doc ):
user=> (doc if)
-------------------------
if
Special Form
Please see http://clojure.org/special_forms#if
nil
I'll probably just add them to the database manually, maybe script it. There are only 16 or so.
The sort order is sensitive to case. See http://clojuredocs.org/clojure_core/clojure.core for an example: note that the 'e' Vars are sorted too high in the list (because of EMPTY-NODE)
compare curl http://api.clojuredocs.org//comments/clojure.contrib.json/read-json
with curl http://api.clojuredocs.org/examples/clojure.contrib.json/read-json
the former has CRLF line endings, whereas the latter has LF. it would be useful to have CR and CRLF automatically converted to LF when adding documentation to the repo.
Playing around with cd-analyzer, I had it analyze my API client, which has the full name org.thnetos/cd-client. The analyze went fine, going to the actual page (http://localhost:3000/org.thnetos/cd-client) causes a problem:
Processing MainController#ns (for 127.0.0.1 at 2010-09-09 22:03:52) [GET]
Parameters: {"action"=>"ns", "lib"=>"org.thnetos", "ns"=>"cd-client", "controller"=>"main"}
Namespace Columns (4.5ms) SHOW FIELDS FROM `namespaces`
Namespace Load (2.7ms) SELECT * FROM `namespaces` WHERE (`namespaces`.`name` = 'cd-client') LIMIT 1
User Columns (1.8ms) SHOW FIELDS FROM `users`
Library Columns (1.8ms) SHOW FIELDS FROM `libraries`
Library Load (0.3ms) SELECT * FROM `libraries` WHERE (`libraries`.`name` = 'org.thnetos') LIMIT 1
It should be loading the "lib"=>"org.thnetos/client", we need something to munge slashes in fully-qualified package names.
Either that, or I imported it improperly :)
To support directly linking within the var page.
ex.
http://clojuredocs.org/clojure_core/clojure.core/map#example_1234
http://clojuredocs.org/clojure_core/clojure.core/map#comment_1234
http://clojuredocs.org/clojure_core/clojure.core/map#see-also_1234
I'd like to use ClojureDocs when I'm offline, is there a way to down the sit as a pdf or locally(without building from source) to have it when I need some examples without the internet.
THANKS!
[1:16 PM] <coopernurse> srid: clojuredocs is also good, and has a quick ref that groups by data structure http://clojuredocs.org/quickref/Clojure%20Core
[1:16 PM] <coopernurse> I like the examples on clojuredocs
[1:26 PM] <srid> coopernurse: that's very handy! examples are what I most like about clojuredocs as well.
[1:26 PM] <srid> coopernurse: btw, when I clicked on your link I see "Logged in as coopernurse" on the top-right corner.
[1:26 PM] <srid> session caching bug?
[1:26 PM] <coopernurse> srid: woah. on the clojuredocs site it says that?
[1:27 PM] <srid> yes
[1:27 PM] <srid> I hit the same bug while developing code.activestate.com
[1:27 PM] <srid> then I remembered the I mistakenly cached the page header too. so if one user loaded the page, and when the next did the same immediately he would see the former user's page header
[1:27 PM] <coopernurse> interesting.. so this is just a cosmetic issue?
[1:27 PM] <coopernurse> for example, can you change my email address?
[1:28 PM] <coopernurse> on my clojuredocs profile page
[1:28 PM] <srid> no, it is only a page caching bug. it just loads it from the cache for me (which cache was last-updated when you did)
It looks like it's impossible to add examples to dec'
http://clojuredocs.org/clojure_core/clojure.core/dec'
I guess this has to do with the ' since it's very possible to add examples to the ordinary dec-page.
As of now, items in the rss feed for recent updates (http://clojuredocs.org/feed/recent_updates) are showing up as walls of text due to the new examples changes (http://bit.ly/ca2lRR).
Basically, line breaks aren't being translated correctly, and needs to be changed so that:
user=> (map inc [1 2 3 4 5]) (2 3 4 5 6) ;; map can be used with multiple collections. Collections will be consumed ;; and passed to the mapping function in parallel: user=> (map + [1 2 3] [4 5 6]) (5 7 9) ;; When map is passed more than one collection, the mapping function will...
looks like:
user=> (map inc [1 2 3 4 5]) (2 3 4 5 6)
;; map can be used with multiple collections. Collections will be consumed
;; and passed to the mapping function in parallel:
user=> (map + [1 2 3] [4 5 6]) (5 7 9)
;; When map is passed more than one collection, the mapping function will...
in your rss reader.
When searching for a function such as when
or case
, the first result is not the one in clojure.core, but often a function of the same name found in clojure.contrib or other libraries.
log output:
Processing UserSessionsController#new (for 76.25.241.113 at 2010-10-15 09:05:52) [POST] Parameters: {"openid.mode"=>"id_res", "openid.op_endpoint"=>"https://openid.hyves-api.nl/", "openid.return_to"=>"http://clojuredocs.org/login?for_session=1&_method=post", "openid.ns.sreg"=>"http://openid.net/extensions/sreg/1.1", "openid.sig"=>"Mth1eqCjmMqIOx94pLyWeuRf9cTs3E051sb5Z2tfnF8=", "openid.response_nonce"=>"2010-10-15T08:57:53ZMTQyNDU0OTM3Nw==", "openid.ns"=>"http://specs.openid.net/auth/2.0", "action"=>"new", "for_session"=>"1", "openid.identity"=>"http://zacharykim.hyves.nl/", "openid.ns.ax"=>"http://openid.net/srv/ax/1.0", "openid.assoc_handle"=>"SE1BQy1TSEEyNTZfbm8tZW5jcnlwdGlvbl8xMjg3MjEyODU5XzE4NzI3NDI5MDdfTzZxUXZTekd0QVZTZjJxOVBKc1U0QmNzZUZnPQ==", "openid.signed"=>"assoc_handle,ax.mode,claimed_id,identity,mode,op_endpoint,response_nonce,return_to,ns,ns.ax,ns.sreg,signed", "controller"=>"user_sessions", "openid.ax.mode"=>"fetch_response", "openid.claimed_id"=>"http://zacharykim.hyves.nl/#NzgzZjI4Nj"} ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request' passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in `start' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:222:in `start' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' Rendering /var/www/clojuredocs/public/422.html (422 Unprocessable Entity)
When printing java types, it's possible for clojuredocs to think that an example contains an HTML tag. The preview attempts to auto-close the tag at the end.
See this image: http://imgur.com/9axXC.jpg
Notice the </int[]> tag at the end.
Example of search API URL:
http://api.clojuredocs.org/search/pmap
Results:
[
{"id":1579,"name":"zipmap","ns":"clojure.core","url":"http://clojuredocs.org/v/1579"},
{"id":1952,"name":"pmap","ns":"clojure.core","url":"http://clojuredocs.org/v/1952"},
{"id":5659,"name":"pmap","ns":"clojure.core","url":"http://clojuredocs.org/v/5659"},
{"id":5854,"name":"zipmap","ns":"clojure.core","url":"http://clojuredocs.org/v/5854"}
]
One of the pmap results is the Clojure 1.2 page for pmap, and the other is for Clojure 1.3, but there is no way to tell from the search result which is which.
Would it be difficult to add something like a key :lib_version with value "1.2.0" or "1.3.0" in the maps of the search result, similar to how the examples API returns?
3rd party lib support is still a ways off, so this issue will be used to track 3rd party library import requests.
I tried these, but they return null:
For +
http://api.clojuredocs.org/examples/clojure.core/+
http://api.clojuredocs.org/examples/clojure.core/%2B
For /
http://api.clojuredocs.org/examples/clojure.core//
http://api.clojuredocs.org/examples/clojure.core/_
http://api.clojuredocs.org/examples/clojure.core/%2F (that got a "Not found" page rather than null)
For ..
http://api.clojuredocs.org/examples/clojure.core/_dot_dot gives back null
http://api.clojuredocs.org/examples/clojure.core/%2E%2E gives back same page as next URL:
http://api.clojuredocs.org/examples/clojure.core
Also, I don't know if this is related to the API, but if you click on the link for function ".." on this page:
http://clojuredocs.org/quickref/Clojure%20Core
it goes to the following page, which shows a "ClojureDocs 404":
http://clojuredocs.org/clojure_core/clojure.core/_dot_dot
Not sure of the details, maybe seed from gist, then edit? Gist-backed examples?
http://api.clojuredocs.org/ has a link to cd-client which has since been renamed to clojuredocs-client to make it easier to find on github.
The new link is: https://github.com/dakrone/clojuredocs-client
I would make this change myself, but I was unable to locate the page that's being served.
Just an idea... github oauth would be cool.
The "Varibles" section should be spelled "Variables" on the Quick Reference page.
Searching for a string with hyphens doesn't seem to work, it returns empty results. Maybe the hyphen is being interpreted by the search engine instead of searching for the whole string? For example: as-file.
I'm writing a mobile application for clojuredocs. So I just wonder is it possible to expose API for function includes docs, usages and even sources.
Thank you.
The goal here is to get rid of the overwhelming wall of text currently shown on the main CD page by:
I tried to read from the API with clj-http 0.2.1 and I got the following exception:
EOFException Unexpected end of ZLIB input stream java.util.zip.InflaterInputStream.fill (InflaterInputStream.java:223)
This is with the examples API, but it seems to happen everywhere. This happens when Accept-Encoding contains gzip. Now, this could possibly be a clj-http problem, but given the simplicity of the way it handles gzip streams, I'm leaning towards it being a clojuredocs problem.
Can anybody with more knowledge of the internals of clojuredocs confirm whether or not this is a clojuredocs problem?
Hi,
I noticed that if you search for a function with it's literal name, it doesn't always show up at the top of the results while it does show up at the top of the search dropdown. Is this expected behaviour?
For example when searching for simple functions like when
, do
, or if
, those only show up at respectively the 6th, 3rd or 5th place in the queries.
The idea here is to get prospective clojure users to a repl in the least amount of steps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.