Commit Graph

290 Commits

Author SHA1 Message Date
Abhishek L
c69c14cc7d contrib/anaphoric: More anaphoric macros added
* hy/contrib/anaphoric.hy: The following anaphoric macros have been
  added
  `ap-reject` : Opposite of ap-filter, yields the elements when a `pred`
  evaluates to false
  `ap-dotimes` : Execute body forms (possibly for side-effects) n times
  with `it` bound from 0 to n-1
  `ap-first` : return the first element that passes predicate
  `ap-last`  : return the last element that passes predicate
  `ap-reduce`: anaphoric form of reduce that allows `acc` and `it` to
  create a function that is applied over the list

* docs/contrib/anaphoric.rst: updated docs to reflect these changes

* tests/__init__.py: updated to explicitly include tests for anaphoric
  macros
2013-12-26 05:57:06 +02:00
Paul Tagliamonte
c7070f82b5 Add ap-if docs. 2013-12-25 20:28:32 -05:00
Nicolas Dandrimont
799c39ffad Implement del
Closes #385.
2013-12-22 20:26:57 +02:00
Berker Peksag
abcd97b1f1 Add update_coreteam script. 2013-12-17 18:50:01 +02:00
Vasudev Kamath
58313884b2 Added information about core team members
Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
2013-12-17 14:36:19 +02:00
Berker Peksag
ecd13ef659 Add versionadded directive to cli.rst. 2013-12-06 07:51:32 +02:00
Joe H. Rahme
61112138ca Adds try-hy to the docs
As requested in PR #350.
This commit also adds Joe "rahmu" Hakim Rahme to the AUTHORS file
2013-12-05 23:07:46 +05:30
Berker Peksag
2c76d8ec90 Document command line options. 2013-12-05 22:03:05 +05:30
Guillermo Vaya
3cc0f8a717 Added info about tox, so people can use it prior to a PR 2013-12-02 12:07:05 +01:00
Paul Tagliamonte
9531d772cf add the start of hacking rules 2013-12-01 12:56:26 -05:00
Abhishek L
d8c29f51d6 docs/api:formatting fixes in quote' and unquote'
A newline was omitted which caused the examples not to render for quote
and unquote forms
2013-12-01 01:20:58 +05:30
agentultra
3773be1d1a Rename anaphoirc.rst to anaphoric.rst 2013-11-30 10:47:08 -05:00
agentultra
cb6889314a Add documentation and doc strings 2013-11-29 19:59:20 -05:00
Abhishek L
63a9e35f7f Document eval, quasiquote' and quote'.
Also, fix the usage of `setv`.
2013-11-27 12:14:49 +02:00
Christopher Allan Webber
8348b2b0fd Fix the repo location 2013-10-17 15:35:17 -05:00
Joe H. Rahme
3856467bf6 Uses square brackets for conds in docs 2013-10-16 18:31:18 +02:00
Sean B. Palmer
defccc6853 Added macroexpand-1 2013-10-11 13:50:10 +01:00
Sean B. Palmer
033198a90e Added documentation for macroexpand 2013-10-11 12:06:22 +01:00
Paul Tagliamonte
656d646198 change virtualenv name to be `hy' 2013-10-10 17:17:43 -04:00
Paul Tagliamonte
a70bcc1f2f Merge branch 'master' into pr/306 2013-10-10 17:17:20 -04:00
Sean B. Palmer
6364296a7b Documented punycode conversion more thoroughly using a compound case 2013-10-10 15:59:19 +01:00
Berker Peksag
221a9b4918 Mention virtualenvwrapper in the hacking guide. 2013-10-09 12:36:35 +03:00
Berker Peksag
0248e42633 Update hacking guide. 2013-10-08 06:00:25 +03:00
Bob Tolbert
d9dee8ec67 One more commit to change the test for Python 2/3 to a macro
Note that this can't use the macro in hy.core.macros so there
is a local copy in language.hy
2013-09-03 18:41:11 -06:00
Bob Tolbert
399ea1889a Second (smaller) set of native core functions
This rounds out the first pass at a set of core functions, adding
some that were not in the first PR.

From here I'm working on a contrib.seq and contrib.io module to
hold less obvious but maybe interesting native functions that can
move to core if desired.

This should also close out issure #150 asking for some core
functions like these.
2013-09-03 13:52:00 -06:00
kaizoku
b892ec4e66 Add zero? predicate to check if an object is zero 2013-09-02 02:28:21 -07:00
Tuukka Turto
e845287941 fix def / setv example 2013-08-25 21:29:24 +03:00
Tuukka Turto
99ba2880a6 minor fix 2013-08-05 23:30:03 +03:00
Tuukka Turto
7709509ed3 documenting defn / defun 2013-08-05 23:23:35 +03:00
Tuukka Turto
635e47b2cb documentation for defun / defn and let 2013-08-05 21:56:57 +03:00
Paul Tagliamonte
acfc5c6aa5 Merge branch 'master' into pr/236 2013-07-27 10:22:38 -04:00
Paul Tagliamonte
6d9b93567d Merge branch 'master' into pr/262 2013-07-23 00:08:32 -04:00
Paul Tagliamonte
7aa000b6a0 Merge branch 'master' into pr/263 2013-07-23 00:07:11 -04:00
Tuukka Turto
6665a2b490 clarified rest / cdr, cleaned up require 2013-07-23 06:39:29 +03:00
Tuukka Turto
151ac69ce8 working on documenting builtins 2013-07-23 00:36:34 +03:00
Tuukka Turto
c6410b7050 cond documentation 2013-07-22 23:59:21 +03:00
Tuukka Turto
ec76c6bee0 documentation for require
working on documenting macros
2013-07-22 23:36:59 +03:00
Guillermo Vaya
82e8598cd6 fix to assoc docs + new multiassoc definition 2013-07-22 18:48:21 +02:00
Joe H. Rahme
b761c7dc83 Fixes a mistake (most probably a typo) in the tutorial. 2013-07-21 02:59:35 +02:00
Tuukka Turto
a786577a8b documentation for global 2013-07-19 15:57:25 +03:00
Tuukka Turto
22d8a78330 better macro example 2013-07-19 12:06:23 +03:00
Tuukka Turto
d580351b41 initial macrodef documentation 2013-07-18 15:00:24 +03:00
Paul Tagliamonte
d3e3334bb4 Merge branch 'master' into pr/252 2013-07-16 21:11:12 -04:00
Paul Tagliamonte
967bb95534 Merge branch 'master' into pr/237 2013-07-16 21:05:31 -04:00
Paul Tagliamonte
3dde930ede Merge branch 'master' into pr/236 2013-07-16 20:57:29 -04:00
Tuukka Turto
624dfdc8c9 clarified foreach - else 2013-07-16 20:23:38 +03:00
Joe H. Rahme
a85ba71a20 Removes link to interactive demo from docs 2013-07-15 10:45:42 +02:00
Bob Tolbert
62f1f40830 Add set of new core functions
Add set of new core functions to the stdlib.

Moved the auto-import code from compile_expression to
HySymbol so that "even?' in this style expression will
be found and imported.

(list (filter even? [1 2 3 4 5]))

The core functions are documented in 2 sections, one
for basic functions like (even?..) and (nth ...) and
one for all the sequence functions.

Update: This removes all the caching decorators, misnamed as
'lazy-seq' from the core. All sequence methods now just use
yield to return a generator, so they are Python-lazy

Further refinements of core functions

Cleaned up the docs to use 'iterator' instead of 'generator'

Fixed drop to just return the iterator instead of an extra
yield loop. But also added a test to catch dropping too
many.
2013-07-13 09:55:16 -06:00
Tuukka Turto
6dc424007f removed setf 2013-07-10 11:39:27 +03:00
Tuukka Turto
e09a89b7cf foreach - else clarification 2013-07-10 08:24:58 +03:00
Tuukka Turto
08734602ca defclass clarification 2013-07-10 07:11:11 +03:00
Joe H. Rahme
236ebccc74 Removes setf in favor of setv 2013-07-10 02:16:49 +02:00
Tuukka Turto
9c31e34a26 documentation for builtins
relates #18
2013-07-09 12:04:53 +03:00
Tuukka Turto
35e28e52ac documentation for some of the builtins
references #18
2013-07-06 19:48:09 +03:00
Tuukka Turto
cabf40bd2a documented else / finally syntax for try / catch 2013-06-30 08:27:15 +03:00
Joe H. Rahme
22370b9fcc Removes the repetition of the comment section in the tutorial 2013-06-21 17:30:23 +02:00
Thomas Ballinger
00f655c3a1 grammar in api.rst 2013-06-07 00:53:53 -03:00
Paul Tagliamonte
2c582fbd52 I'm an idiot, Sorry, @aldeka 2013-06-01 22:04:55 -04:00
Paul Tagliamonte
8cb3102365 Adding in @aldeka 's cuddles image! 2013-06-01 22:03:30 -04:00
Christopher Allan Webber
0f266fee9b Move TODO from being an actual block of visible text to a comment
This is cleaner and more respectable :)
2013-05-20 18:26:36 -05:00
Christopher Allan Webber
e5de92178d We should introdeuce people to the tutorial before we toss them at hacking 2013-05-20 18:25:26 -05:00
Christopher Allan Webber
c3811b5e71 Replacing cuddles ascii art with the cuddles drawing, restoring hy logo 2013-05-20 18:17:11 -05:00
Paul Tagliamonte
c463489584 thanks @olasd 2013-05-20 15:49:51 -04:00
Paul Tagliamonte
2b655d59ae fixing the image src 2013-05-20 15:45:43 -04:00
rogererens
65585434db Update tutorial.rst
I did some elaborate math checking...
2013-05-13 18:39:29 +02:00
Nicolas Dandrimont
938d783e3b Symbols get mangled without double-underscores now 2013-05-09 23:42:54 +02:00
Nicolas Dandrimont
c4ca00a485 Fix the PDF docs build 2013-05-09 23:42:54 +02:00
Christopher Allan Webber
0571bab382 Return None in --init-- because due to a syntax flaw we have to! 2013-05-09 16:08:39 -05:00
Christopher Allan Webber
204bc9c39e Fixing *args and **kwargs notation in docs 2013-05-09 16:04:12 -05:00
Christopher Allan Webber
c5dbc39ee1 Fixing documentation error with extra double-colon 2013-05-09 16:02:25 -05:00
Christopher Allan Webber
b68d5ac3a3 Remove document classes TODO 2013-05-09 16:01:07 -05:00
Christopher Allan Webber
b4b3ab89f7 Documenting classes! 2013-05-09 16:00:30 -05:00
Christopher Allan Webber
5bd5620dd0 Dictionary style keyword arguments documentation 2013-05-09 15:48:02 -05:00
Christopher Allan Webber
0a362a2120 oh yeah, make this a clojure syntax block in the docs 2013-05-09 15:40:32 -05:00
Christopher Allan Webber
b6d730c044 Documenting: tuples and argument formatting 2013-05-09 15:35:47 -05:00
Christopher Allan Webber
60c1a1ba06 Docs: "Much more readable, no! -> Much more readable, no?" 2013-05-09 15:11:42 -05:00
Paul Tagliamonte
14d33633e1 RST syntax fix 2013-05-08 22:32:11 -04:00
Clinton N. Dreisbach
d76d011b11 Added documentation about import 2013-05-08 22:16:03 -04:00
Paul Tagliamonte
feabe3ff4a Merge branch 'master' into pr/125 2013-04-21 10:58:08 -04:00
John Jacobsen
3f6bf5f27b more TODOs 2013-04-21 09:27:11 -05:00
John Jacobsen
38051ef96b whitespace in doc 2013-04-21 09:04:52 -05:00
John Jacobsen
44329227db Remove unneeded line from TODO section 2013-04-21 09:04:13 -05:00
John Jacobsen
499ec7697c Add context manger / 'with' statement to tutorial 2013-04-21 09:03:19 -05:00
Gergely Nagy
494bf0e8ad Remove the import-as and import-from builtins
The new and improved (import) can handle all cases import-as and
import-from did, so drop the latter two from the language. To do this,
the import builtin had to be changed a little: if there's a single
import statement to return, return it as-is, otherwise return a list of
imports.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-20 16:06:32 +02:00
Paul R. Tagliamonte
403be35aa3 use hy 2013-04-14 18:24:37 -04:00
Paul R. Tagliamonte
4e61ae59fd small internals tweak 2013-04-08 21:53:06 -04:00
Christopher Browne
4ce3081933 Typo in tutorial 2013-04-08 17:09:00 -04:00
Christopher Browne
1c14a69fc9 example was missing function parameter name 2013-04-08 17:01:12 -04:00
Will Kahn-Greene
3dabc1a72a Update example to be more relevant to users 2013-04-08 12:03:42 -04:00
Paul R. Tagliamonte
4629501628 Addining some initial docs. 2013-04-07 11:35:10 -04:00
Will Kahn-Greene
2724478f13 Fix clone url in hacking docs 2013-04-07 07:55:25 -04:00
Will Kahn-Greene
485c98c799 Add important pause in quickstart to regain composure 2013-04-05 21:50:56 -04:00
Will Kahn-Greene
9178d541fd Add necessary conclusion to quickstart 2013-04-05 21:38:18 -04:00
Will Kahn-Greene
3cfaf0af1e Tweak runline for easier reading 2013-04-05 21:27:30 -04:00
Will Kahn-Greene
f9f99a430b Linkificate the other Python virtual environment text 2013-04-05 21:22:47 -04:00
Will Kahn-Greene
4ddae38a8b Linkificate the Python virtual environment text 2013-04-05 16:39:46 -04:00
Will Kahn-Greene
b37f5f21d5 Fix to be more friendly 2013-04-05 16:34:25 -04:00
Will Kahn-Greene
6fbba17158 Add quickstart and hacking docs 2013-04-05 16:30:12 -04:00
Will Kahn-Greene
57f764ebfe Cosmetic: Fix header formatting
This tweaks the header formatting in reST so that we can use ---
for 3rd level headers.
2013-04-05 14:56:59 -04:00
Christopher Allan Webber
d5d05c1dba Removing accidental 1 insertion. Sorry paultag! 2013-04-03 16:27:20 -05:00
Christopher Allan Webber
39bc7e0b97 Replacing "quirks and eccentricities" with a "welcome"
We love welcoming people!
2013-04-03 16:27:01 -05:00
Christopher Allan Webber
976d8b5bf1 Renaming "language spec" to "tutorial" 2013-04-03 16:21:31 -05:00
Christopher Allan Webber
c627fad5e2 No documentation of one of .hy's coolest features, bidirectional imports! 2013-04-03 11:59:52 -05:00
Christopher Allan Webber
4a6fa15099 There's no reason for the " ; and a little more complex" comment 2013-04-03 11:30:22 -05:00
Christopher Allan Webber
ab1f30def5 Add hy logo to frontpage of docs 2013-04-03 11:27:40 -05:00
Christopher Allan Webber
3537a8285d New (hy) logo! 2013-04-03 11:00:35 -05:00
Paul R. Tagliamonte
4e7362848a adding in a bit about the double rainbow 2013-04-02 20:56:10 -04:00
Christopher Allan Webber
a878a7f7d5 List comprehensions example 2013-04-02 19:12:33 -05:00
Christopher Allan Webber
65b162cda2 Hy is lisp-stick on a python! 2013-04-02 18:55:59 -05:00
Paul R. Tagliamonte
397db464a5 Add a bit about the threading macro 2013-04-01 21:20:44 -04:00
Paul R. Tagliamonte
e8d7a01752 Bwaha, paroneayea typo 2013-04-01 21:09:30 -04:00
Paul R. Tagliamonte
f60daaa40d Really square braces! 2013-04-01 21:08:19 -04:00
Christopher Allan Webber
c098db9b51 We should call simple-conversation after defining it, just like we did in python! 2013-04-01 17:59:26 -05:00
Christopher Allan Webber
1b60bee8a3 Change all instances of (def foo bar) to (setv foo bar)!
I'm in ur base polluting your language with all my opinions!
2013-04-01 16:51:28 -05:00
Christopher Allan Webber
0c4ae39bc0 Even more lisp sections marked as lispy highlighted code blocks 2013-04-01 15:06:19 -05:00
Will Kahn-Greene
e7cae36ff0 Syntax highlight blocks as clj
* hy is close enough to clojure , we can (ab)use that for syntax
  highlighting code blocks
* fix "sphynx" spelling in requirements file
2013-04-01 12:55:16 -04:00
Christopher Allan Webber
df6ef654d7 Switch over to a more lisp'y syntax for the "for" statment docs 2013-04-01 11:01:36 -05:00
Christopher Allan Webber
93583b56a4 TODO: explain more about hy's for 2013-04-01 10:59:13 -05:00
Christopher Allan Webber
d10d9e79f9 Move the comment section, explain for loops 2013-04-01 10:58:13 -05:00
Christopher Allan Webber
5296e6ab55 Explain how to wrap multiple statments of execution in "do" 2013-04-01 10:49:04 -05:00
Christopher Allan Webber
edf33a08b4 Updating documentation for the new cond order 2013-04-01 10:34:36 -05:00
Christopher Allan Webber
a0acbd7948 Clarifying that we won't be executing the comment, but will exec the code! 2013-04-01 10:12:15 -05:00
Christopher Allan Webber
4d9f0ae6a1 Don't say "comfortable" twice so close to each other 2013-04-01 10:11:07 -05:00
Christopher Allan Webber
be784793f0 Oops, fix the url for the interactive demo 2013-04-01 09:29:33 -05:00
Christopher Allan Webber
f1dd537391 Mention the IRC channel 2013-04-01 09:28:52 -05:00
Christopher Allan Webber
ff65513811 More information about what Hy really is in the language spec section. 2013-04-01 09:27:30 -05:00
Christopher Allan Webber
06adc86f46 A slightly better explaination of what Hy is. 2013-04-01 09:24:15 -05:00
Christopher Allan Webber
f0ec34d6fb Yet another slight improvement to Cuddles 2013-04-01 09:19:38 -05:00
Christopher Allan Webber
f9ed4e8fa8 Mention the interactive hy->python demo 2013-04-01 08:37:40 -05:00
Christopher Allan Webber
13c7cb9736 Refer to the mascot by name! 2013-04-01 08:34:10 -05:00
Christopher Allan Webber
ff99fb89ad Slight improvements to the Cuddlefish's fin. This is critical stuff! 2013-04-01 08:31:41 -05:00
Christopher Allan Webber
2ddf752d3e Okay, a cuddlefish that actually renders :) 2013-04-01 08:27:16 -05:00
Christopher Allan Webber
d8fe13a913 Hy: now with "cuddlefish" mascots 2013-04-01 08:23:42 -05:00
Christopher Allan Webber
767af90175 python hash comments -> hy comments 2013-04-01 07:32:11 -05:00
Christopher Allan Webber
4334700549 Explaining cond 2013-04-01 07:14:23 -05:00
Christopher Allan Webber
b1d83b12c6 Adding some missing "::" to the rst structure and fixing a sentence fragment. Next: cond! 2013-04-01 07:10:40 -05:00
Christopher Allan Webber
6c8f0da256 Adding a super basic tutorial to the docs. 2013-03-31 16:46:56 -05:00
Paul Tagliamonte
1241707f73 Adding in docz 2013-03-13 19:43:19 -04:00
Paul R. Tagliamonte
8cf9bd582d change version bits 2013-03-12 22:58:07 -04:00
Paul R. Tagliamonte
73cb1dcb7d Adding in a docs directory. 2013-03-12 22:53:45 -04:00