I'm just wondering what editors you know which are "scriptable". E.g take an Emacs, one can really say you can do everything from within the editor: writing,reading, programming. All with the "scripting language" Emacs-Lisp. What other editors you know are out there as scriptable?
Do you know let's say an editor scriptable in Perl, Ruby or any other more C-like language?
On the Windows platform, the Zeus editor is scriptable in the Lua, Python, Java Script, VB Script and TCL languages.
Yi is the Haskell equivalent to Emacs. It is specifically designed along the same lines as Emacs: everything is scriptable in Haskell, the editor itself is more or less just a Haskell script, and there is only a very small, very generic, non-scriptable core. In contrast to most Emacs implementations, however, which use a different language for the core than for the scripts, Yi's core is also implemented in Haskell.
Vim has Vimscript for writing plugins and extending functionality.
Redcar is a text editor written in (mostly) Ruby, which is fully scriptable in Ruby. It is not nearly as flexible as Emacs, but more on the level of TextMate.
UltraEdit and UEStudio have the feature to record many of its commands during a manual execution to a macro and run this macro again later. The macro can be also edited to add a loop or simple conditions.
And UltraEdit / UEStudio support also scripts. Those scripts are parsed with the JavaScript core engine. Therefore everything supported by JavaScript core like variables, arrays, string manipulations, calculations of integers or floats, nested loops, etc. can be also used in those scripts plus lots of commands of UltraEdit / UEStudio itself.
UltraEdit is available for Windows, Linux and Mac and as portable application for Windows.
Related
I'm using lua inside another (Windows) application that provides a lua scripting interface. Is there a way for me to know which lua executable is being used? I know the version, but I would like to know where is the lua.exe that is running.
Lua is an embedded scripting language; that is the design of the thing. Lua is designed and intended to be incorporated into other programs. Lua.exe is essentially just a tiny shim over the Lua runtime, Lua being incorporated into a small console application. This is useful for using Lua as a console scripting language, but Lua.exe is in no way required to use Lua.
Lua scripts are not expected to know or care about the environment in which they run, except for in exactly the ways that this environment provides for them to detect. Lua as a language therefore has no mechanism to detect anything about the nature of the environment. If an embedded Lua environment wants you to be able to query such things, it will provide a mechanism for you to do so.
Is there a parser generator that can take a single grammar and create a parser in both c# and javascript?
I've tried using ANTLR, but I have yet to get it into Visual Studio (lackluster/outdated documentation and packages).
The end goal is that I can manage a single grammar (for a subset of SQL; specifically select statements and a few new keywords specific to my problem domain) but generate two parsers (c#/javascript).
Any help is much appreciated.
Is there a parser generator that can take a single grammar and create a parser in both c# and javascript?
The only one I am aware of is ANTLR. Note that ANTLR will not generate both a JavaScript- and C# based parser in one go though. You will have to change (at least) one option in the grammar and invoke org.antlr.Tool to generate a parser for your other target language.
I've tried using ANTLR, but I have yet to get it into Visual Studio
Then don't use Visual Studio, but use your favorite text editor (and use org.antlr.Tool from the console), or ANTLRWorks.
There's canopy, which targets javascript, ruby, java, and python from PEG
My AGL parser builder is written in Kotlin common, so it can be used on any Kotlin target (JVM, JavaScript, native code, etc).
https://medium.com/#dr.david.h.akehurst/a-kotlin-multi-platform-parser-usable-from-a-jvm-or-javascript-59e870832a79
Unfortunately, Kotlin does not yet target .net....but maybe it will come in the future.
docopt let you describe your help message in a string respecting some common convention and that's how all commands, options and arguments will be defined.
Docopt has many official implementations: python, bash, C#, rust, ruby, C++, Go, R, Julia, Nim, Hashkell, PHP, C, F#, CoffeeScript, Swift, Scala, D, Java, Clojure, Tcl, Lua
I am not even a newbie to erlang yet, I am just using RabbitMQ, which is written in Erlang. After I run configure/make/make install, the build output directories have plenty of .c and .erl files. Is this necessary? What's the reasoning behind it?
some examples:
./lib/erlang/lib/erl_interface-3.7.6/src/misc/show_msg.c
./lib/erlang/lib/cosNotification-1.1.18/src/oe_CosNotification.erl
Yes, it's necessary. The runtime system of Erlang is written in C, and most of the standard library is written in Erlang.
What's the reasoning behind it?
What would be the alternative? In order to execute any Erlang code, you need to have the runtime system already started, and so it can't be written in Erlang. It could be written in:
Assembly
C
C++ or some other language
Erlang could be executed without a runtime
Assembly is obviously a bad choice: you'd have to rewrite it nearly completely for any new CPU target and it would be much harder to maintain.
C provides excellent performance and portability, and ability to call C code from Erlang would at any rate be required. This is the choice made not only by Erlang, but by Python, Ruby, Perl, etc. as well.
C++ complicates portability (some OSes have C compilers available, but not C++ compilers; quality of C++ compilers varies more); other languages even more so (along with performance, possibly requiring their own runtime, etc.).
The final option would make Erlang a completely different language.
I'm trying to learn Lua, but I don't really know which binary to download. There's 2 choices:
Lua Binaries
Lua for Windows
The second option Lua for Windows seems to be the recommended option, but the installer weighs in at 26.6Mb, which is pretty hefty for what is supposed to be a v.lightweight language.
I'm thinking of using Lua as a scripting language for games, and perhaps as a fast development language for file processing like how Python or Ruby does it. So it must be something lightweight, not a 26.6Mb file.
Which is the appropriate one to download and start?
Luaforwindows, no doubt. It's simpler, easier and faster.
The installer comes with lots of stuff (Scite editor & several extra libs if I remember well). But the installer asks you before installing all those extra stuff. Just install the minimum and you will be fine.
Lua for Windows includes a handful of other, useful libraries and tools. The actual Lua executable included is still tiny, in the 1-2MB range as expected.
Having the extras there already will only make things easier, and disk space is cheap: go with Lua for Windows.
You may also want to check ZeroBrane Studio, which is only 4M download on Windows and is based on the same editor as SciTE that comes with Lua for Windows. ZBS also comes with 50+ Lua examples and few simple lessons to get started quickly with Lua programming.
Quoting from here.
Installation
The LuaBinaries files are intended for advanced users and programmers who want to incorporate Lua in their applications or distributions and would like to keep compatibility with LuaBinaries, so they also will be compatible with many other modules available on the Internet.
If what you want is a full Lua installation, please check other projects such as the Lua for Windows and LuaRocks.
Seems quite clear to me that you should download Lua for Windows.
From the Wikipedia defination,
Programming language is
Scripting languages are languages that allow you to send commands directly to a system that executes these commands. These commands are read line by line and executed-interpreted, but not compiled.
Whilst, Scripting language is
Programming languages are languages that allow you to create a program by writing structured code that is read all at once by the system, checked for errors, and translated into an unreadable format that the machine can then execute(compiled).
ActionScript is now quite developed language(Which runs after compilation not interpreted) and after ActionScript 3,Flex and Air, Its hard to believe ActionScript is still dubbed as Scripting language.
The line between a programming language and a scripting language is blurry. Once upon a time, a "programming language" was a compiled language like C or C++, because only those languages were really efficient enough to write non-trivial programs in. Scripting languages were languages that were typically not compiled and thus slower; their relative inefficiency relegated them to systems maintenance tasks or "gluing" parts of a compiled program together. Now, computers are getting faster and language interpreters are getting more advanced, so even a traditional "scripting" language like Python or Tcl can be used to write a full-fledged application. However, once a language is dubbed a scripting language, it's hard to shirk off the title.
Don't believe everything in the Wikipedia.
PHP for example is compiled into bytecode at runtime, while java is compiled into bytecode at compilation time. The php interpreter executes the bytecode, and the java VM executes its bytecode both doing about the same thing.
A bash script is not compiled at all and is interpreted run line by line.
C is compiled into machine code that is read directly by the hardware.
According to the wiki entry, only the bash is truly a script which is a misnomer.
It is much more nuanced than the wiki entry implies.
JavaScript is a scripting language in browsers because it scripts the browser.
Bash is a scripting language because it scripts the OS.
Python and ActionScript are called scripting languages because they share things in common with real scripting languages (dynamically typed, sometimes interpreted, higher-level than C). I think "scripting language" as a term is far too over-used, and is mainly used to put down dynamically typed languages.
Reading the definitions above, the machine can't execute the format that the Flex compiler creates, therefore ActionScript is a scripting language.
Of course, anything that compiles to a VM would be considered a scripting language by that definition, including Java. Forth, being a threaded interpreted language, would also be a scripting language.
So forget Wikipedia. These distinctions used to make more sense than they do now.
JavaScript is getting faster monthly, and will probably soon be faster than ActionScript, if it isn't already.
I'd say a better definition for "scripting language" is, "a scripting language controls an application or enclosed environment, like a browser or a word processor or Flash."
But with the Chrome OS, even that definition is in peril, as the browser (including Flash, which Google has embraced) threatens to become an OS.