coconut

Simple, elegant, Pythonic functional programming.

APACHE-2.0 License

Downloads
18.6K
Stars
4K
Committers
27

Bot releases are visible (Hide)

coconut - v1.2.1 [Colonel]

Published by evhub over 7 years ago

See Coconut's documentation for more information on all of the features listed below.

New features:

  • --mypy flag for automatic type-checking (including real-time in the REPL)
  • Support for Python type annotations on all versions
  • New enhanced partial application (e.g. func$(?, y)) (thanks @Sitwon!)
  • Tail recursion elimination added in addition to tail call optimization
  • Support for %magic commands on Coconut's Jupyter kernel
  • Syntax highlighting for Coconut's Jupyter kernel
  • Support for keyword and star arguments in pattern-matching function definition
  • Support for pattern-matching in statement lambdas (e.g. def (x is int) -> x)
  • Adds coconut-run command with shebang support (e.g. #!/usr/bin/env coconut-run)
  • Support for COCONUT_STYLE environment variable for setting a default --style
  • New CONTRIBUTING.md
  • New Czech translation (thanks @Tovim!)

Fixes:

  • Method calls are now valid implicit partials (e.g. .method(args))
  • Compilation speed significantly increased
  • Fixed running IPython %coconut command multiple times
  • Fixed --watch compiling files twice (thanks @Nexus6!)
  • Version restrictions on dependencies loosened
  • Enhanced reversed and enumerate built-ins (thanks @Nexus6!)
  • Fixed calling methods on integer literals (thanks @DomoSokrat!)
coconut - v1.2.0 [Colonel]

Published by evhub about 8 years ago

Colonel is the next major release of Coconut, and makes major feature additions and minor breaking changes over v1.1.1 [Brontosaurus]. See the updated documentation for more information on everything below.

Breaking changes:

  • removed @recursive (now does auto tco)
  • function composition (..) precedence changed
  • removed --autopep8 flag

New features:

  • automatic tail call optimization
  • statement (multiline) lambdas
  • command-line syntax highlighting
  • --jobs flag
  • assignment function notation
  • @recursive_iterator
  • star pattern matching
  • implicit pass for data and class
  • inline nonlocal and global statements
  • --keeplines flag
coconut - v1.1.1 [Brontosaurus]

Published by evhub over 8 years ago

v1.1.1 [Brontosaurus] makes only minor feature additions over v1.1.0 [Brontosaurus], and should be fully backwards-compatible. The major changes were:

  • Adding a --watch flag (#99, #106, thanks @Boscillator!)
  • Improving Jupyter / IPython console autocompletion (#114)
  • Adding methodcaller implicit partial (#112)
  • Adding links to 3rd party Vim and Emacs highlighters (thanks, @manicmaniac and @NickSeagull!)
  • Adding pip install coconut[...] as a way to install optional dependencies
coconut - v1.1.0 [Brontosaurus]

Published by evhub over 8 years ago

Brontosaurus makes notable feature additions over v1.0.0 [Albatross], but should be fully backwards-compatible. The major changes were:

  • Adding addpattern and prepattern built-ins (#92, #103)
  • Changing recommended file extension from .coc to .coco (#88)
  • Making interpreter print the result of an expression (#100, thanks @Boscillator!)
  • Fixing IPython / Jupyter kernel support (#97)
  • Adding support for guards in pattern-matching function definition (#98)
  • Upgrading to pyparsing 2.1.5
coconut - v1.0.0 [Albatross]

Published by evhub over 8 years ago

Albatross is the first production release (v1.0.0) of the Coconut programming language. No new features have been added since Pinnate (v0.4.1), although there have been major stability improvements. For documentation, see our new website at http://coconut-lang.org.

coconut - [P]innate

Published by evhub over 8 years ago

Pinnate (v0.4.1) is the first candidate release for v1.0.0. The language has become relatively stable and is unlikely to change much until a release is selected for v1.0.0.

Massive changes have been made to Coconut since Odisha (v0.3.6). If you've been following Coconut development, you should read the new tutorial and go over the new documentation to familiarize yourself with all the changes.

Pinnate is the type of leaf on the Coconut palm.

coconut - [O]disha

Published by evhub almost 9 years ago

Major Changes:

  • New: --package or -p and --standalone or -a flags for forcing the type of compilation to perform
  • --print or -p is now --display or -d (-d is no longer an alias of --debug)
  • Fixes issues in data mutability and augmented assignment
  • Significantly increases compilation speed

Odisha is a part of India famous for its coconuts.

coconut - [N]ucifera

Published by evhub almost 9 years ago

Major Changes:

  • New: Built-in consume function for efficiently exhausting iterators
  • New: Only recompiles changed files (will recompile all files if --force is passed)
  • Improves (-) to support subtraction and negation
  • Improves Python-version-cross-compatibility for str, bytes, and open
  • Warns on mixing of tabs and spaces even if --strict isn't passed
  • Changes coconut.convenience.setup function

Cocos Nucifera is the scientific name for the coconut tree.

coconut - [M]acapuno

Published by evhub almost 9 years ago

Major Changes:

  • New: Built-in datamaker function for writing data.__new__ constructors
  • Removes itemgetter, attrgetter, and methodcaller from built-ins in favor of implicit partial application
  • Supports slice objects in iterator slicing
  • Fixes incompatibility with newest pyparsing

Macapuno is a type of mutant coconut commonly used in desserts.

coconut - [L]auric

Published by evhub almost 9 years ago

Major Changes:

  • New: In-place lazy chaining
  • New: Enhanced imaginary literals
  • Fixed error message line numbers
  • Fixed --runing a file with imports
  • Fixed interpreter scoping

Lauric acid is the primary fatty acid found in coconuts.

coconut - [K]opyor

Published by evhub almost 9 years ago

Major Changes:

  • New: Lazy chaining
  • New: Head-last pattern-matching
  • New: Lazy list pattern-matching
  • Fixed empty and one-item lazy lists
  • Improved Python version cross-compatibility
  • Fixed interpreter errors

Kopyor is the Indonesian name for a macapuno coconut.

coconut - [J]awz

Published by evhub about 9 years ago

Major Changes:

  • New: Lazy lists
  • New: Pattern-matching function definition
  • New: Enhanced except statements
  • New: __coconut_version__ built-in
  • def is now mandatory in mathematical function definition
  • Match failures now raise MatchError instead of ValueError
  • Added coconut.convenience.parse(mode="exec")

Jawz Hindi is the Arabic word for Coconut, translated literally as Indian Nut.

coconut - [I]locos

Published by evhub about 9 years ago

Major Changes:

  • New: Destructuring assignment
  • New: Implicit partial application
  • New: Additional pipeline operators
  • Changed non-decimal integer syntax from 101_2 to 2_101
  • Improved error messages
  • coconut.convenience.version("full") is now coconut.convenience.version("spec")

Ilocos is an area in the Philippines that is a major producer of coconuts.

coconut - [H]awaii

Published by evhub about 9 years ago

Major Changes:

  • New: Infix function definition
  • New: --target parameter
  • New: Support for Python 3.5 syntax
  • More Python-like interpreter

Hawaii is one of the most iconic homes of the coconut tree.

coconut - [G]uam

Published by evhub over 9 years ago

Major Changes:

  • New: case blocks
  • New: Code passthrough
  • New: Checks in match statements
  • More Pythonic list and tuple matching
  • Fixed module docstrings
  • Reduced header size

Guam was once home to many coconut plantations until they were destroyed by the coconut rhinoceros beetle.

coconut - [F]iji

Published by evhub over 9 years ago

Major Changes:

  • New: IPython Support
  • Improved Backtick Calling
  • Improved Convenience Functions
  • Improved Python 2/3 Universalizability
  • Improved Error Messages
  • Fixed Match Statement Errors
  • --exec is now --code

Fiji is an island home to many coconut trees, including the eponymous Fiji Dwarf.

coconut - [E]ocene

Published by evhub over 9 years ago

Major Changes:

  • New: Match Statements
  • New: Built-Ins itemgetter, attrgetter, methodcaller, dropwhile, and tee
  • New: Enhanced Set Literals
  • New: Enhanced Decorators
  • New: Enhanced Else Statements
  • --code is now --exec

Eocene is the period in which it is believed the earliest coconut trees lived.

coconut - [D]rupe

Published by evhub over 9 years ago

Fixes lots and lots of bugs, finishes the documentation, and adds --print, --quiet, and --nowrite flags.

Drupe is the category of fruit that the coconut belongs to.

coconut - [C]opra

Published by evhub over 9 years ago

Adds data blocks and the takewhile built-in, removes zipwith, fixes --code and --run.

Copra is the dried meat of a coconut used to create coconut oil.

coconut - [B]ermuda

Published by evhub over 9 years ago

The first version of Coconut to be featured on the Python Package Index.

Bermuda is the furthest north location for the natural growth of the coconut tree.