I just found out about an old part of Clojure: clojure.parallel
http://clojure.org/reference/other_libraries#_parallel_processing_deprecated
Out of curiosity, why has it been deprecated?
According to http://dev.clojure.org/jira/browse/CLJ-216 the reason is, that it would not work anymore with Java 7.
Related
I'm a novice programmer who just migrated from Python (on IDLE) to C++ and I'm finding it uncomfortable to know only a few "essential" methods of STL data structures. Is there something like the Python help() function in C++, or some other way to access digestible and concise documentation as regards the Standard Library?
Edit: To be clear, I am looking for a way to access documentation from my computer, preferably from within the IDE/compiler (I currently use and prefer g++ on Cygwin in Windows 7. I also have Code::Blocks, however). Please don't recommend books or mark this question as a duplicate of The Definitive C++ Book Guide and List.
This is the documentation I like the most : http://en.cppreference.com/w/
With a keyword for fast searching in Firefox, it is very efficient
In general Cplusplus.com helps very much.
Maybe the GNU C++
Library will also help.
You could also read the official C++
book by Bjarne Stroustrup.
http://cppreference.com
http://www.cplusplus.com
If you're on Mac OS, you can use the nice Dash which can integrate with editors or be used on its own. It supports the cppreference.com docs (instant offline indexed documentation).
If you're on Windows (Visual Studio) MSDN also provides STL docs.
As I'm on Linux I just use http://cppreference.com, but I'd like to have a good alternative (not Zeal) to Dash.
Clojure is written mainly in Clojure, but there had to be a "first" version of a clojure compiler that was written in something else, presumably Java.
Is the code of that compiler available anywhere?
My interest is purely academic, not productional, I'd like to see the way that Rich Hickey handled the chicken/egg problem.
The clojure compiler is written in java, not clojure. So the current version is the one that will satisfy your curiosity. Of course it's a reasonable point of view to say that macros are part of the compiler, and those are indeed written in clojure, but they are not relevant to the chicken/egg problem you mention, which is solved by having the compiler in Java.
Compiler bootstrapping is a common issue when you write your compiler in the same language as that which you are compiling.
In the case of Clojure, however, the compiler is written in Java, so no tricky games required.
For fun historcal reference, GHC, the Haskell compiler (written in Haskell), was originally compiled via Lazy ML.
Not sure if this relates to your interests, but Rich had originally worked on a language called DotLisp and for that he began with a study of JScheme, which he used as a basis for the original code and eventually replaced completely.
DotLisp is here: http://dotlisp.sourceforge.net/dotlisp.htm
JScheme is here: http://jscheme.sourceforge.net/jscheme/main.html
(Trivia: one of the authors of JScheme is Brandeis professor Tim Hickey, no known relation to Rich.)
I'm just starting to use boost for my embedded C++ programming. Lambda looked interesting so I was reading up on it. When I tried using stl algorithms with lambdas on containers of shared_ptrs I ran into some problems. Doing some searching here on SO led me to a post that indicated Lambda was deprecated and Phoenix was to be used for all new code. As I try to learn more of boost I would like to avoid learning the deprecated parts. Where is this type of thing documented?
In general, the boost documentation will warn you of deprecated features. However, this information sometimes "leaks" out before the docs are updated, which is what seems to have happened in this case. You could always subscribe to one of the developer mailing lists if you really want to be at the cutting-edge, otherwise you should be just fine sticking to the official docs.
If we check the official documentation we can find various ways of interfacing Erlang and C/C++. A similar question was asked here in 2009 and I would like to know how the things changed since then.
Is there any mature stable library that does all the dirty work of implementing binary protocols between Erlang and C? Is it ei or erl_interface and what is the difference between them?
I mean this seems to be a quite common problem and I hope that someone has successfully solved it already and there is no need to write your own Erlang Port Driver anymore, since most of it is generic code.
P.S. I have also found this library: EPAPI.
Nothing have changed significantly since 2009, the top answer from the question you linked is still correct.
NIFs became less experimental starting from R14 and are actively used in some projects, but they are still incompatible with HiPE compiler (native flag to compile).
Bjarne Stroustrup gave a keynote presentation today for the Going Native 2012 conference. In his presentation, he discussed the issue of enforcing correct units. His elegant (IMHO) solution to this involved using an operator I have never heard of before: operator"". Using this operator, he was able to write C++ code that looked like this:
ratio = 100m / 1s;
Where operator""m(...) and operator""s(...) were defined.
Does anyone know of any documentation regarding how to actually use this operator (or even if any modern C++ compilers support it)? I tried searching online, but had no luck. Any help would be greatly appreciated.
The syntax you'd be looking for is "user-defined literals" which is a feature of C++11.
g++ versions 4.7 and better support this feature.
Here is some documentation describing the use of that operator overload:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
Also see the excellent link Xeo provides in the comments to your question.
Currently the best documentation is probably in the standard itself. You can get the latest version from the commitee's site. According to gcc's site it will be in the next revision of gcc (gcc-4.7). You should be able to test it when building gcc from the SVN repository.