Commit Graph

188 Commits

Author SHA1 Message Date
Louis Dionne
1026267959 [CMake] Modularize the checks for external packages 2016-01-04 14:58:11 -05:00
Louis Dionne
83aec20fa3 [doc][b2] Generate documentation by cloning from gh-pages
Generating the documentation from scratch left the benchmarks out.
Instead of trying to properly generate the documentation locally,
we now leave this to Travis CI and simply clone the proper version
of the documentation.
2016-01-03 20:06:34 -05:00
Louis Dionne
c41a5cb6be Update copyright notices for 2016 2016-01-01 14:54:06 -05:00
Louis Dionne
f55e345d6f Suggest using doc/html instead of doc/gh-pages to store the documentation 2015-12-29 13:44:39 -05:00
Louis Dionne
feeea67453 [Doc] Add missing copyright notices in doc/
Fixes #228
2015-12-23 17:56:28 -05:00
Louis Dionne
45c94ff96d [Doc] Move chart-related JavaScript to doc/ and simplify the local chart viewer 2015-12-23 12:25:54 -05:00
Louis Dionne
0a69c7ae61 [Doc] Store the benchmarks per-commit on the gh-pages branch
Fixes #225
2015-12-22 18:55:54 -05:00
Louis Dionne
cab5794a17 [Doc] Add note about manual loop unrolling 2015-12-17 10:06:53 -05:00
Louis Dionne
6a38978745 [Doc] Add a small section on how to get support 2015-12-12 12:24:40 -05:00
Louis Dionne
850dbf7ad7 Provide an experimental print function
Closes #200
Closes #219
2015-12-09 14:47:13 -05:00
Louis Dionne
75cdd4d4d1 [Doc] Allow breaking MathJax equations on multiple lines
This should fix some issues when looking at the documentation
on small devices.

Also, fix mis-rendered `monadic_compose` in math mode.

Closes #156
2015-12-04 15:19:24 -05:00
Louis Dionne
129c80b0ce [Tutorial] Document when-based tag-dispatching
Closes #173
2015-11-29 11:20:01 -05:00
Louis Dionne
48da4cf5c4 [Doc] Always use https for external scripts
As explained in [1], it seems that protocol-relative URLs are now an
anti-pattern. Hence, f750a7a was the wrong fix.

[1]: https://www.paulirish.com/2010/the-protocol-relative-url/
2015-11-27 17:35:10 -05:00
Louis Dionne
f750a7afde [Doc] Use protocol-relative URLs to load external scripts
Otherwise, the external scripts would sometimes be blocked by browsers
because the protocol used to connect to the documentation wouldn't match
the protocol used to fetch external scripts.
2015-11-27 09:28:49 -05:00
Louis Dionne
4156e0f13c [Tutorial] Remove unwanted links to hana::value 2015-11-23 15:33:58 -05:00
Louis Dionne
cfbd606103 [Tutorial] Add link to the wiki 2015-11-16 08:52:53 -05:00
Louis Dionne
d7ba283f86 [Boost.Build] Fix documentation generation 2015-11-16 07:42:53 -05:00
Louis Dionne
5e27a68388 [Tutorial] Remove unwanted tutorial entry from the navigation bar
By moving the tutorial into tutorial.hpp instead of tutorial.md, there
is no unwanted entry in the left navigation bar anymore.
2015-11-15 21:31:54 -05:00
Louis Dionne
a41f63693b [Tutorial] Complete the section on external adapters 2015-11-15 15:16:31 -05:00
Louis Dionne
61b3ab74dc [Doc] Prepare the setup to document external adapters. 2015-11-15 15:16:30 -05:00
Louis Dionne
526ee4d90a [Doc] Explain reason for not including adapters in boost/hana.hpp 2015-11-12 15:42:24 -05:00
Louis Dionne
3707877225 [Iterable] Remove the tail function
Closes #158
2015-11-11 14:08:36 -05:00
Louis Dionne
7d578de9d8 [Iterable] Reformulate the MCD in terms of drop_front 2015-11-07 16:18:11 -05:00
Louis Dionne
e9b9a00dfa [Doc] Precise the zero const of creating a std::array 2015-11-06 10:24:08 -05:00
Louis Dionne
6fdbd1b35c [Doc] Document the Homebrew formula for installing Hana
Closes #195
2015-11-04 18:26:43 -05:00
Louis Dionne
fbb6c4fd4d [CMake/Doc] Add the 'install' target and document how to install Hana
Also remove the 'check' target from 'all', because otherwise 'check'
is run before 'install'.
2015-10-29 13:34:34 -04:00
Louis Dionne
33f2b4cf2f [Benchmarks] Improve transparency w.r.t Fusion algorithms
Specifically,

(1) We now benchmark with fusion::list too
(2) We now document our methodology for forcing the evaluation of algorithms

Note that we still use `as_list` and `as_vector` to force the evaluation
of algorithms instead of using e.g. `for_each`. This is because we want
to compare apples with apples, and for this we need to get a sequence of
computed values, not only for_each over the view. The disclaimer in the
tutorial saying "Fusion might encourage a different design" takes care
of warning people about the fact that we're not necessarily using
idiomatic Fusion, but not need to benchmark unfairly to try to
account for that.
2015-10-22 18:21:13 -04:00
Louis Dionne
911db80d31 Automatically generate the tutorial.hpp file from tutorial.md with Boost.Build 2015-10-22 15:42:34 -04:00
Louis Dionne
ddeba4ac6d [Jamfile] Allow generating the documentation with Boost.Build
Note:
Since Boost.Build seems unable to feed markdown files to Doxygen,
we duplicate the tutorial.md file into tutorial.hpp. This is a
temporary solution only.
2015-10-20 08:23:24 -04:00
Louis Dionne
dbd0fb9246 Change links from ldionne/hana to boostorg/hana 2015-10-19 09:41:47 -04:00
Louis Dionne
59581c9a5d [Doxyfile] Remove obsolete IMAGE_PATH 2015-10-18 21:45:37 -04:00
Louis Dionne
af4923a1cd [Doc] Fix mis-rendered code snippet in MathJax 2015-10-18 11:11:35 -04:00
Louis Dionne
8a643a9c14 [optional] Make the interface closer to that of std::optional
Also remove `only_when`, which is frankly not very useful.
2015-10-12 11:29:37 -04:00
Louis Dionne
35da925d19 [IntegralDomain] Rename to EuclideanRing
Note that no `norm` function is added for now, since the `norm` is not
tied to the specific Euclidean ring as explained in [1]. However, it
might be useful to enforce an arbitrary choice to be made for each
Euclidean ring. This could perhaps be added in the future.

Fixes #28

[1]: https://en.wikipedia.org/wiki/Euclidean_domain#Definition
2015-10-08 14:42:22 -04:00
Louis Dionne
cff7039ab3 [CMake/Travis] Simplify CMake setup by moving benchmark and doc uploads to Travis
The benchmarks/documentation were only ever updated from Travis, and it
is much simpler to do it directly in bash from Travis than to write it
in CMake as we did.
2015-10-04 16:48:38 -04:00
Louis Dionne
44aa4bc718 [Doc] Add warning about potential for ODR violations
Closes #76
2015-09-27 11:29:23 -04:00
Louis Dionne
42934900b8 [Struct] Add the BOOST_HANA_ADAPT_ADT macro
Also
- Reorganize adaptation macro unit tests
- Add BOOST_HANA_PP_DROP_FRONT and BOOST_HANA_PP_FRONT macros
2015-09-22 13:37:49 -07:00
Louis Dionne
cf063a4fe3 Return hana::integral_constants from type_traits adapters
Also, remove the ext/std/{type_traits,utility} headers in favour of the
<boost/hana/traits.hpp> header.
2015-09-21 07:45:04 -07:00
Louis Dionne
8ef31253b2 [Doc] Minor tweak to the make_map example 2015-09-15 18:09:54 -04:00
Louis Dionne
f31295a004 [Travis] Add testing on OS X and refactor .travis.yml
Also

- Add a Travis job without Boost
- Only test Boost 1.58.0 on one compiler, to reduce the size of the matrix
- Reorder the environment variables to prettify the Travis matrix
- Add a job to build on Clang trunk, but allow failures
2015-09-13 23:30:38 -04:00
Louis Dionne
4f1cbf58e9 [tutorial] Improve the section on container types and creation 2015-09-13 16:09:03 -04:00
Louis Dionne
267cef77e1 [Doc] Remove Doxygen warnings and make it more quiet 2015-09-12 23:54:37 -04:00
Louis Dionne
c32ec8c3d0 Reformulate many algorithms in terms of IntegralConstants instead of Constants 2015-09-09 15:55:18 -04:00
Louis Dionne
cb43a2f7b2 [Doc] Minor fixes
- Do not strip comments from the documentation
- Mention `to` in the MCD of Constant
2015-09-09 15:25:50 -04:00
Louis Dionne
a7f25d124e [slice] Accept an arbitrary Foldable of indices, and remove subsequence
Fixes #84
2015-09-08 17:29:54 -04:00
Louis Dionne
cf56c3ab83 [Doc] Document new-style concepts and remove core/models.hpp 2015-09-05 19:27:38 -04:00
Louis Dionne
fd5e3ca715 [Concepts] Define concepts as template structs instead of using models<>
The `models<>` machinery added unnecessary complexity for little benefit.
Also, this makes Hana's concepts syntactically closer to concepts lite,
which should contribute to making them easier to grasp at first sight.
2015-09-05 19:25:01 -04:00
Louis Dionne
ac4e3bc56e [Tutorial] Use vector_tag instead of Vector in tutorial example 2015-09-03 13:29:17 -04:00
Louis Dionne
b9d0f6d2d1 [integral_constant] Rename IntegralConstant to integral_constant_tag 2015-09-03 13:29:17 -04:00
Louis Dionne
673a84c787 [ext/] Rename tags to xxx_tag for external adapters 2015-09-03 13:29:17 -04:00
Louis Dionne
79db7e90df [range] Rename Range to range_tag 2015-09-02 21:59:05 -04:00
Louis Dionne
5cec8b3e2e [tuple] Rename Tuple to tuple_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
9168cc4ce8 [map] Rename Map to map_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
c52c6d88d4 [Doc] Adjust the documentation to use "tag" instead of "data type" when it makes sense 2015-09-02 21:59:03 -04:00
Louis Dionne
4e3d17bd3b [Core] Do not use a nested ::hana struct to hold the tag.
This was annoying because

(1) We couldn't use the name hana:: from within the struct
(2) It requires one more instantiation unless you use the
    `using hana = self` trick. But that trick makes something
    that should be trivial to do slightly harder, and that is stupid.
2015-09-02 21:59:03 -04:00
Louis Dionne
f3d9df96d0 [Core] Rename datatype<> to tag_of<>
Also, rename the nested hana::datatype alias to hana::tag.
2015-09-02 21:59:03 -04:00
Louis Dionne
08f66d47c1 [IntegralConstant] Suffix variable templates with _c, and clean up type names
Along with PR #166, this closes #122 because names have now been
cleaned up and are now consistent basically everywhere.
2015-09-01 16:34:04 -04:00
Louis Dionne
0e8913fa3c [Doc] Use implementation-defined instead of unspecified-type
Also, update the tutorial to reflect the fact that container types
are now sometimes specified.
2015-08-31 13:42:15 -04:00
Louis Dionne
d8b08aa43c [Doc] Promote Metafunction from data type to concept, and document as such 2015-08-31 12:59:22 -04:00
Louis Dionne
98e76512a1 [Doc] Document hana::lazy instead of hana::Lazy 2015-08-31 11:42:57 -04:00
Louis Dionne
c2ed70ddf9 [Doc] Document hana::type instead of hana::Type
Precisely,
1. Rename hana::_type to hana::basic_type, and document it
2. Rename hana::type<> to hana::type_c<>
3. Create and document the hana::type<> type
2015-08-30 17:08:06 -04:00
Louis Dionne
e1d08aa277 [Doc] Document hana::basic_tuple instead of hana::BasicTuple 2015-08-30 17:07:19 -04:00
Louis Dionne
d0492da082 [Doc] Document hana::integral_constant instead of hana::IntegralConstant 2015-08-30 17:07:19 -04:00
Louis Dionne
ed2eca2ddb [Doc] Document hana::string instead of hana::String 2015-08-30 17:07:19 -04:00
Louis Dionne
3738a4c662 [Doc] Document hana::range instead of hana::Range 2015-08-30 17:07:18 -04:00
Louis Dionne
7f933490ad [Doc] Document hana::optional instead of hana::Optional 2015-08-30 17:07:18 -04:00
Louis Dionne
4bd3c6bd0e [Doc] Document hana::map instead of hana::Map 2015-08-30 17:07:18 -04:00
Louis Dionne
22d75503ed [Doc] Document hana::pair instead of hana::Pair 2015-08-30 17:07:18 -04:00
Louis Dionne
e4c1b44f8e [Doc] Document hana::set instead of hana::Set 2015-08-30 17:07:18 -04:00
Louis Dionne
6d80a308da [Doc] Document hana::tuple instead of hana::Tuple
Also, document the member functions of `hana::tuple` and add an example.

Fixes #163
2015-08-30 17:07:18 -04:00
Louis Dionne
97c86a064b [Doc] Remove references to tuple_t from the benchmarks 2015-08-30 17:04:57 -04:00
Louis Dionne
307f0d8c50 Add the lexicographical_compare algorithm 2015-08-26 13:40:11 -04:00
Louis Dionne
f373b421f9 [Headers] Minimize the #includes in headers
- Allow specializing models_impl with a forward declaration only
- Modularize remaining concept headers
- Include <boost/hana.hpp> in unit tests to ease the transition
- Add the core/dispatch.hpp header to reduce the number of boilerplate includes
2015-08-26 11:27:28 -04:00
Louis Dionne
54171139bc [Benchmarks, Doc] Update version of the Github.js lib and improve chart.html 2015-08-24 11:47:40 -04:00
Louis Dionne
e67b14bd96 [Doc] Use typewritter font where needed in the cheatsheet 2015-08-23 13:49:17 -04:00
Louis Dionne
e2c4c1f36e [Sequence] Add the remove_range algorithm
Closes #52
2015-08-23 13:49:16 -04:00
Louis Dionne
08b3db1708 [Examples] Modularize and use qualified names
This patch modularizes the examples, makes them self-contained and
also uses qualified hana:: names.

Fixes #139
Fixes #126
2015-08-15 17:50:40 +02:00
Louis Dionne
9771a2f0ed [Doc] Re-document the Functional module. 2015-08-09 09:00:31 +02:00
Louis Dionne
d8f3b8775e [Doc] Transition to benchmarks on Clang 3.6.2 from 3.6.1 2015-08-08 16:56:35 +02:00
Louis Dionne
78f056a25c [example.switchAny] Update the tutorial to use hana::pair and default_t instead of _default 2015-07-28 20:23:21 +02:00
Louis Dionne
2027593022 [Tutorial] Remove misplaced comma 2015-07-26 12:42:20 +02:00
Louis Dionne
9d74084996 Remove take_until and some xxx_exactly variants
Of the xxx_exactly variants, only drop_front_exactly is kept for now,
because it actually allows an optimization. The other ones did not
really provide a compile-time improvement, so they are removed.
2015-07-26 12:42:20 +02:00
Louis Dionne
cecaf823f6 [Iterable] Replace front by at in the MCD to allow more efficient algorithm implementations
Related to #158
2015-07-25 16:20:48 +02:00
Louis Dionne
d3b7cb2c85 Modularize the headers
This (large) commit introduces the following changes:
- Each algorithm lives in its own header
- The concepts are defined in the concept/ subdirectory. They define the
  `models` metafunction, some explicit default implementations (like
  Applicative::transform_impl), and they include all the algorithms
  related to that concept.
- Removed the `until` method from Logical
- Removed the `drop_until` method from Iterable
- [minor] Added the detail::nested_to utility

Closes #160
2015-07-25 16:20:47 +02:00
Louis Dionne
83c3b4781e [Doc] Move the tutorial out of hana.hpp
Fixes #161
2015-07-07 21:26:11 +02:00
Louis Dionne
3db57c6bca [README, Doc] Update the logo and mention that it's now officially in Boost 2015-07-07 19:47:12 +02:00
Louis Dionne
bd50d5f651 [Doc] Methods -> Functions in the reference
Fixes #98
2015-06-13 09:47:22 -04:00
Louis Dionne
35cdf3b83a [Struct] Implement macros using ERB templates instead of Boost.Preprocessor
This is done because the resulting macros are much more straightforward
to debug when a user makes a mistake. Also, it avoids pulling yet another
dependency.

Also added some general purpose macros in detail/preprocessor.hpp.
2015-06-10 15:50:35 -04:00
Louis Dionne
f3cff75480 [Benchmarks] Disable std::tuple benchmarks on Clang 3.5.0 due to ICE 2015-06-05 10:17:30 -04:00
Louis Dionne
35f25cbc35 [Doc] Implement improvements suggested by @tzlaine (part 1)
- Remove the preface entirely
- Move the current introduction to a "Description" section
- Move the "Quadrants of computation" to the "Introduction"
- Move the current "Motivation" section to the start of the "Introduction"
- Move the section on "Introspection" higher up in the docs
- Remove the "Concept" column in the Cheatsheet, and add links to each
  individual algorithm instead.
- Add a rationale for unpack's name and parameter order
- Add `fold` and `reverse_fold` to the cheatsheet
- Mention the list of all headers in the tutorial
- Add an alphabetical index with everything in the library
- Precise that smaller is better in chart subtitles
- Add benchmarks for std::make_tuple and std::get
2015-06-04 21:13:45 -04:00
Louis Dionne
8fd8129258 [Doc] Daily tutorial improvements
- Finish the section on "Introspection"
- Use a Boost "proposed" logo instead of the proper Boost logo
2015-06-02 23:52:57 -04:00
Louis Dionne
2d7ffed101 [Doc] Daily documentation improvements
- Add an "Acknowledgements" section
- Rename Boost.Hana to Hana for now (not officially a Boost library)
- Partially write the section on "Introspection"

Fixes #46
I feel like the documentation now provides enough real world examples:
- switchAny
- Euclidean distance
- JSON generation (to be written)
- MPL reimplementation
2015-06-01 18:06:28 -04:00
Louis Dionne
ac04435b60 [Doc] Daily improvement of the tutorial
- Merge section on Amphibian Algorithms with section on Algorithms
- Replace the `decayed` pseudo-code by `std::decay_t`.
- Rewrite and move section on type computations
- Add Appendix on the MPL implementation
2015-05-31 18:57:05 -04:00
Louis Dionne
cd38e0238a [Doc] Italicize words from the pseudo-code glossary.
Fixes #74, thanks @alexk7 for the initial suggestion at C++Now.
2015-05-28 19:26:00 -04:00
Louis Dionne
4d3d71aae3 [Doc] Add a Boost logo 2015-05-13 14:10:03 -06:00
Louis Dionne
5ad2e3092d [Doc] Remove old Gnuplot-based benchmarks
[ci skip]
2015-05-05 19:14:56 -04:00
Louis Dionne
434fe06298 [Doc] Fix broken include of GitHub.js 2015-04-29 17:03:59 -04:00
Louis Dionne
a32ea99003 [Tutorial] Charts were pointing to the wrong datasets 2015-04-29 12:08:02 -04:00
Louis Dionne
a85be42014 [Doc] Get JSON data for the charts with the proper headers 2015-04-26 09:03:10 -04:00
Louis Dionne
ca37fdfa4c [Doc] Add a section on performance in the tutorial
Also:
- Introduce the .js charts we have in the reference
- Remove the ugly "Generated by Doxygen" footer
- Refactor the benchmarks
2015-04-25 16:31:56 -04:00