I am looking for a way of controlling translation format for Purescript code when target platform is JavaScript.
"spago bundle-app" generates JavaScript code for ES5 version.
spago/pulp/purs --help doesn't tell much.
googling by keywords like "Purescript codegen target ES6" is not helpful either.
Some discussions regarding ES6 and Purescript popped up among results but nothing practically useful.
I've found lebab tool translating ES5 to ES6,
but I guess it is not right way to go.
The PureScript compiler creates mostly ES3 code. This is on purpose because Ecma Script is strictly backwards compatible and ES3 code runs in a ES5-, ES2015-, ES2016- (and so on) environment. This means that code created by the PureScript compiler runs even in older browsers.
If you are coming from TypeScript or Babel, you might be used to being able to choose the target. This is because these compilers work with plugins that run after each other. But the PureScript compiler does not have such a feature (since it is not transforming JS to JS like these specific compilers).
So what can be the benefit of targeting a newer version? Code size, performance and features. If you want to use new ES2015 features in your FFI code there is great news: You can make use of these features now in PureScript 0.13. There are also talks about making the compiler target newer JavaScript environments in the future for the benefits mentioned above. If someone would have to support older environments they could still add Babel to their toolchain. But PureScript is a small community project and neither performance nor code size are of a very high priority for the project (and if they were, there would probably be other optimisations that could yield much greater results).
I have found an older question about a similar topic, but I am still wondering how to do this: I'd like to try to use clang for code navigation, instead of gtags / GNU global or similar tools. I am already using autocomplete-clang for Emacs, which works really well. But it does only completion. Now I would like to ask clang: "Where is the definition and / or declaration of the symbol in xyz.cc:42:23". Is this possible with either c-index-test or clang?
Clang definitely knows where is the definition of the symbol. I switched from clang-autocomplete to clang-autocomplete-async which uses clang-complete tool built on top of clang instead of stock clang. Although this tool does not support navigation yet, I believe it would be possible to implement it quite easily.
If I am going to develop using Coffeescript I will need to know what browsers are supported by the coffeescript JS code - I'm sure there will be a webpage somewhere on the subject :)
CoffeeScript's motto is "It's Just JavaScript." That means that if you write CoffeeScript code that invokes a feature that only exists in newer browsers, the JavaScript output will depend on that feature. CoffeeScript's own syntactic features, such as class inheritance and array comprehensions, generate code that's compatible with all major browsers going back to IE6.
Update: I now realize you were specifically asking for browsers which support the Coffeescript compiler. I have no detailed information about that, but considering the wide usage of Coffeescript my answer would be most of them.
No browsers support Coffeescript directly, although there may be some magic javascript snippets available that could compile Coffeescript to Javascript on the fly when a browser loads the page.
The usual workflow however is to compile Coffeescript to Javascript, and then only feed the browsers the resulting Javascript files. "Compile" may not be the proper word either, as it is more or less translating one set of source code (Coffescript) to another set of source code (Javascript), which is then parsed and sometimes JIT-compiled to execute in the browser (Spidermonkey, V8 etc).
Is it possible to integrate the Java autocompletion for the classes I import via java_import? Methods defined in Ruby would be nice too, but this would be more of a candy.
I could be off here, but:
Doesn't RSense achieve what you need? It is supposed to detect new definitions after a "require" method
https://github.com/rsense/rsense
How Do I Get Eclipse Style Function Completions in Emacs for C, C++ and JAVA?
I love the power of the Emacs text editor but the lack of an "intellisense" feature
leaves me using Eclipse.
M-/ is a quick and dirty autocomplete based on the contents of your current buffer. It won't give you everything you get in Eclipse but is surprisingly powerful.
I can only answer your question as one who has not used Eclipse much. But! What if there was a really nice fast heuristic analysis of everything you typed or looked at in your emacs buffers, and you got smart completion over all that everywhere, not just in code?
M-x load-library completion
M-x global-set-key C-RET complete RET
When I was doing java development I used to use the:
Java Development Environment for Emacs (JDEE)
The JDEE will provide method name completion when you explicitly invoke a jdee provided function. It has a keyboard binding for this functionality in the jdee-mode.
The CEDET package provides completion for C/C++ & Java (and for some other languages). To initial customization you can take my config that i use to work with C++ projects
Right now, I'm using Auto Complete for Emacs. As a current Visual Studio and ex-Eclipse user, I can say that it rivals both applications quite well. It's still not as good as Microsoft's IntelliSense for C#, but some would say that C++ is notoriously difficult to parse.
It leverages the power of (I believe) the Semantic package from Cedet, and I find it feels nicer to use when compared to Smart Complete. It completes C++ members, local variables, etc. It's pretty good. However, it falls down on not being able to complete overloaded methods (it only shows the function once with no parameters, but thats a limitation of Cedet I believe), and other various things. It may improve in future though!
By the way, I could be wrong here, but I think you need an EDE project set up for the class member completion to work (just like you would normally with Semantic). I've only ever used it while having an EDE project, so I assume this is true.
Searching the web I find http://www.emacswiki.org/cgi-bin/wiki/EmacsTags#toc7 describing complete-tab in etags. It is bound to M-Tab by default. This binding may be a problem for you
Also, etags has some limits, which may annoy you...
The link also points to CEDET as having better symbol completion support.
Have you tried the emacs plugin for eclipse?
http://people.csail.mit.edu/adonovan/hacks/eclipse-emacs.html
I've written a C++-specific package on top of CEDET that might provide
what you want. It provides an Eclipse-like function arguments hint.
Overloaded functions are supported both for function arguments hint
and for completion.
Package is located here:
https://github.com/abo-abo/function-args
Make sure to check out the nice screenshot:
https://raw.github.com/abo-abo/function-args/master/doc/screenshot-1.png
auto-complete-clang is what you want. Can't go wrong with using an actual C++ compiler for completions.
The only problem it has is there's no way to know what -I and -D flags to pass to the compiler. There are packages for emacs that let you declare projects and then you can use that.
Personally, I use CMake for all C and C++ work so I wrote some CMake code to pass that information to emacs through directory-local variables. It works, but I'm thinking of writing a package that calls cmake from emacs so there's less intrusion.