Best win32 compiled scripting language? [closed] - windows

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best compilable scripting language for Win32? I prefer .EXE's because I don't want to install the runtime on the servers first (my company administrates many via remote), but I need to be able to do things like NTFS permissions and (if possible) APIs over the network.
There was a small Perl which appeared to be able to do most of this, but it does not seem to have been updated/developed in quite a while. I have wondered about Lua, but I don't know if it has everything I need yet (and don't want to hunt through fifty library sites trying to find out). Any thoughts?

Have you considered using an EXE maker? For example, you can code in Python and use py2exe to create a standalone EXE that runs anywhere (it actually packages Python into the exe, so you don't have to install the runtime).

Ruby is my scripting language of choice.
Try RubyScript2Exe.

A scripting language is, almost by definition, not compiled into a standalone executable. So maybe you need to restate your intentions or give some indication about what kind of program you want to create.
C# is a powerful language that compiles to .EXE and allows you to interface with pretty much anything (through native p/invoke calls, if necessary). A basic but very usable Visual Studio for C# can be downloaded for free from the Microsoft website. The .NET runtime is installed on most systems nowadays.

Did you consider AutoIt ?
It is a scripting language, and you can quickly transform a script into an exe...

At OSCON 2005, I heard Damien Conway say "the only thing better than Perl is something that works well, even if it's not written in Perl."
It's good advice. Instead of looking for the best language that can be compiled to an .EXE, worry a lot more about writing it in a language that can be compiled to an .EXE. Use whatever works. Just remember that the quality of your programming matters infinitely more than what language you use.
That said, I like py2exe. YMMV. Good luck!

Related

How is the code stored in an executable? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I read that an executable stores the code in different sections. For example, a separate section for data etc. Is this generic across different platforms such as Win or MacOs or Linux?
Some insight into it would be really helpful.
You are correct in that an executable has several sections or segments: Not all of them, however, are code.
There is usually one segment for code - in ELF and PE, this is usually called .text. Additional ones exist to store dynamic linkage data, hard coded strings, read only data, global variables, etc.
To see these for yourself, rather than Wiki and Google , try hands on:
In Windows: You have a tool called DUMPBIN.EXE , part of visual studio. If you can't get your hands on that, use Dependency Walker (which is freely downloadable). This will parse PE and PE32+ (that is, 64-bit) files
In Linux: Use objdump -x , or readelf (both are pretty much the same, though with slightly different options) for ELF files.
In Mac: Use otool -l to see the load commands (which show you the sections and the segments) in Mach-O files.
Using either or all tools will hopefully get you a better idea of how things work.
Hope this helps,
TG
Windows uses Portable Executable format.
*nix generally uses Executable and Linkable Format. Previously some used SOM, a.out, ECOFF, XCOFF, COFF, and some others.
OS X and iOS (and NeXT, history fans) uses Mach-O.
PowerPC systems still support Preferred Executable Format which was used with earlier Mac OSs, and some forms of BeOS.
Maybe start with http://en.wikipedia.org/wiki/Comparison_of_executable_file_formats

Ruby as a standalone language [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have been messing around with ruby on rails. But my questions is really simple. Is ruby used language used for desktop applications? I mean without Rails? Can it be combined with GUI packages and Graphics Libraries to create a game for example? I have read that ruby is based on C. So it will be fast right?
Is ruby used language used for desktop applications?
Yes it is.
I mean without Rails?
Yes.
Can it be combined with GUI packages and Graphics Libraries to create a game for example?
Yes it can be.
I have read that ruby is based on C. So it will be fast right?
No, it won't be "fast" in the same way C is fast, because that isn't the point of Ruby. Ruby isn't "based on" C in any sense. The interpreter which runs Ruby code may be written in C (there are many interpreters and not all of them are), but that has nothing to do with the language itself. C and Ruby are not really comparable and occupy completely different niches.
I've no experience in programs where speed is critical; however, from my experience, Ruby is fast enough for user applications with GUI, and differences are almost unnoticeable from other similar dynamical languages (Ruby 1.9 is even faster, sometimes).
There is a reason I don't name the "similar languages": I think languages benchmarks aren't useful at all. While the fact that Ruby is fast enough for general purpose programming will probably make you happy, I think it's more important that if you already know and like Ruby you will be more productive using it.
There are some limit cases Ruby will be even faster than C: your implementations in C for functions that are offered as methods in the Ruby core lang and std lib could be slower than the ones in Ruby VM. This is just to say, speed isn't usually a concern, unless you're actually well aware of a particular reason you should be concerned with speed.
Some nice GUI libraries are FXRuby and Shoes, a very easy library used in the Hackety Hack project to teach children to program.
I usually use Tk when programming with Ruby and Python because it's included in the standard library and there is no need to install anything else.
For Gaming, you can try Gosu and Chingu; Gosu is probably the most actively developed Ruby Gaming Library, and Chingu is a nice collection of classes based on the foundations offered by Gosu. They've not got the nice community of other gaming libraries (e.g. Pygame) but you can easily start making little games with them.
Check out the Shoes GUI, it has different implementations, each one has a colorname, the most popular ared Red and Green Shoes, they are often used to make the kind of games you see also in Flash or regular javascript. They are fast enough for that kind of games. Some implementations even work with JRuby.
Red Shoes
Green Shows
Ruby is a language whose common implementation (e.g. ruby-1.9.3-pl94) is an interpreter coded in C. File main.c contains the main function in C which set up the Ruby VM implemented in C in file vm.c.
You could have several implementations of Ruby. I heard that some people wanted to re-implement Ruby above the Parrot VM (itself implemented in C); but that effort is perhaps still in progress. JRuby is a Ruby above the JVM.
Indeed interpreter vs compiler is not a sharp difference. Many interpreters contain a virtual machine with a translator (which you could view as a compiler) to that VM. Some VM implementations have a Just In Time dynamic translator to machine code. The JIT part produces machine code dynamically.
You could code a graphical application using e.g. Ruby-Gnome, a glue to Gnome and Gtk. You could also use Ruby Qt, a glue to KDE and Qt

Want to learn assembly, confused about where to start [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Just for the hell of it, i've taken an interest in learning assembly. The problem is I can't find a good starting point...
There seems to be a lot of assemblers available (FASM, NASM, YASM, MASM) but each has their own separate syntax, commands, and features. FASM seems to be the most convenient since it can compile executables without a linker but I haven't been able to find any tutorials to start me off. All the "Hello World" examples i've seen are 16 or 32-bit, but i'm running on 64-bit Windows so none of them work. The Windows examples included with FASM work but I'm not looking to get into Windows programming right from the start, I want to grasp the basics first.
Can anyone point me in the right direction?
If you want to learn to read assembly, I recommend learning to use WInDbg or IDA Pro as your primary debugger - learning not only what the instructions do, but how a C++ compiler idiomatically translates your source code into assembly will help you to learn far better than if you're doing contrived 100% assembly examples
I am no expert on assembly but it is an essential thing, to at least be familiar with, in computing. In a computer engineering class we used SPIM by James Laurus, a MIPS architecture simulator for windows. I think it is a good starting point. You can find a MIPS cheat-sheet via Google search, as well as some tutorials.
Assembly is cool because it is essentially machine language. Happy hacking!
32-bit examples should work even though your host OS is 64-bit.
On top of that is the difference between a 32- and a 64-bit Hello World just 2 characters:
include 'win64ax.inc'
vs
include 'win32ax.inc'
This is the best x86 ASM introduction I have found:
http://www.drpaulcarter.com/pcasm/
There is a pdf version of his book on that page. It starts at the very basics and works its way up. I got all of the fundamental ASM knowledge that I needed just with this book (stack frame creation, calling conventions, c interop, just to name a couple).
It's just boring to learn assembler without any goal.
Could I recommend you to buy any robot kit? As I know RoboSavvy robots are managed by assmeblers / C .. Others may have only DSL.
http://robosavvy.com/site/
P.S. I've learned assembler when I was in need to cheat in games. But today I would choose robot kits.
If you are a bigner and wants to learn the assembly better to get ASM knowledge 1st.
secondly try to learn the basic logic behind each code.
3.enjoy the language when try to learn if u r intrested otherwise leave it.

Which programming languages meet these criteria for GUI app development? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm trying to find a programming language I feel really comfortable learning and using for desktop/GUI application development. I realize it's unlikely that any language meets ALL of these criteria, but I'd like to find one that meets as many as possible. I've listed the following features ROUGHLY in order from most desirable/important to least.
Ideal Language Features:
Code Style: C/Java-like
GUI Development: Easy, elegant, and platform-Native styling
Community: Widely documented, active development, friendly & helpful, unity of focus
Object-oriented
Garbage Collection, no worrying about pointers, etc
Native compilation, NO 3rd-party runtimes like GTK or .NET
Multi-platform (can be compiled on *nix, Windows, Mac)
Reasonably fast
Mixed typing (soft-typed, OR both soft- and strict-typed -- i.e. Pike)
Background:
Most importantly, I need something that is straight foward and reasonably familiar, and something that isn't going to require a deep understanding of platform-specific APIs. I can't afford to spend a lot of time learning to develop Win32 apps in C++ for example. I've used wxWidgets, and liked the basic usage, but I'm really wanting to use a language with garbage collection, dynamic typing, and so on.
My frustration with Java, C#, and others is the need for a 3rd party runtime. I don't want end users to have to worry about installing and maintaining a separate platform.
Now then. Ideas??
Haha, due to the constraints you imposed you are now left with HTML and javascript. Good luck :)
The answer to your question is simply: None.
You excluded all desirable languages and platforms in your question.
I'd suggest you throw away your aversion against .NET and go with Delphi Prism. It's not C#, it is cross-platform compatible (everything is officially supported on Mono) and you can create applications that bring the runtime with them (Mono as part of your application).
I'd suggest Groovy and Griffon. Groovy is a dynamic language (like Ruby / Python) that runs on the JVM and integrates with millions of Java libraries out there easily. Griffon is a high-productivity RAILS-like framework for developing GUIs. Groovy has been around for 5 years and has a robust community and is supported by SpringSource (now division of VMWare). Griffon is a bit younger, but also has a fairly robust community.
These seem to fit your criteria.
I know I switched from Java to Grails (web framework written in Groovy that's similar to Rails), and haven't looked back.
Have you looked at QT? It's a really great GUI library and there are bindings for just about every language in common usage. There is a ton of documentation and a wide community. You mention that you want to do something in a language with garbage collection and dynamic typing, but rule out Python and Ruby, which are the 2 most popular languages that fit this criteria (also, they both have great QT bindings, I use pyQT4 and it is just awesome). They really aren't that far from what you do in Java/C, you just end up writing a lot less.
Wow you really limit your choices. I'm going to jump on the QT bandwagon and recommend C++.
Most of the objects in QT inherit from another object that sort of does it's own garbage collection.
There is incredible documentation out there for it.
QT is extremely powerful and has most of the elements you would like, and is extensible if you want to modify elements yourself.
If you do a static build for your release build the people you give the application to won't need distribute any other libraries as they will all be built into the .exe file.
The next iteration of Delphi is said to be cross-platform (Windows, Mac, Linux). I think it meets all your requirements except garbage collection.
No language meets all of those restrictions. Technically, it sounds like you're asking for something almost identical to Java but then explicitly disallow Java for unstated reasons. Conceptually, it sounds like you're looking for Python or Ruby but disallow them for using slightly different syntax.
Given the order of priorities, I think the closest you'll find in existing languages might be C with the Boehm GC and GTK+ for the GUI (and GLib for the object system). You do say "No GTK" under "No third-party runtime required", but I'm not sure what "runtime" you refer to here, since IIRC it's just a bunch of C libraries.
Given the specificity of the requirements, I think your best bet is to write your own language. Compilers really aren't that hard to write anymore. There are off-the-shelf tools to help with parsing and code generation and math and text processing and GC and so on. Once you get started you'll probably find people willing to help port it. Many existing cross-platform GUI libraries (like wxWidgets) use C/C++ so if you have a decent FFI you can use that, too. You want "support" and "documented" but if you're the primary author you'll understand it better than anybody. The hardest part about a language is design, and it sounds like you have a picture in your head of exactly what the language should be already.
There are a few if you can accept either WxWindows or GTK or QT as a toolkit.
In the order of my personal preference would be:
Eiffel Studio
D with the D-GTK binding
F#
javascript?
might be not the fastest one and doesn't fully address all your needs, but hey... its everywhere and easy to learn
didn't read after the list, but with prism You can probably achieve most your goals.
or You can try Qt and c++ autopointers
Silverlight could actually give you enough cross-platform availability to use C#/.NET, but I am not sure it fits all your requirements.
Sounds like Action Script 3 will make you happy. But it's more web oriented but you could try to make a projector or an Air application. I think it's a good solution because you can do anything with AS3 (image, video, text, sound video text keyboard and mouse input, pear to pear and 3d since flash 10, ...) and it's cross platform and you can use it on the web or your desktop :)
If you are a pure root coder (using vim and only command line for ex) you can make your whole app without using the flash ide, by just writing your as files and compiling them with mxmlc (that comes with the free flex sdk).
I suggest Python. Although it doesn't fit your first requirement of coding style, but it fits all your other requirements!
GUI Development: Easy, elegant, and platform-Native styling --> Yes
I'd suggest that you try wxPython (wxWidgets for Python). This is so "native" on Python that about 90% of all the wxWidgets code examples on the Internet are for Python! I've personally used TkInter, Gtk and wxPython. All of them are well supported on Python. My personal choice is wx.
Community: Widely documented, active development, friendly & helpful, unity of focus --> YES
Object-oriented --> Yes
Garbage Collection, no worrying about pointers, etc --> Yes
Native compilation, NO 3rd-party runtimes like GTK or .NET --> Yes. - You can eiter:
pack a single dll with your code - or
use py2exe which is able to create a single executable out of your project
Multi-platform (can be compiled on *nix, Windows, Mac) --> Yes.
Reasonably fast --> Yes. Well, it's not the fastest out there, but close enough that some serious projects are done in Python only.
Mixed typing (soft-typed, OR both soft- and strict-typed -- i.e. Pike) --> Yes.
Regarding your first requirement I'd say that you should give Python at least a try. It requires very little effort to get started. There is a 2-hour tutorial which gives you a serious introduction. There's a Basic to Advanced tutorial where I'd almost guarantee that you'll be writing your first application on the second day.
I also feel your pain Brian. Most time when I ask questions about desktop GUIs the only answer I get is: "Make it Web". You really nailed it, since your question is still open inspite some really non-constructive answers...
I've been watching closely JavaFX 2, it solves some of Swing problems and seems very promising. This may be the only thing Oracle did right since getting Java from Sun.
UPDATE:
.NET is finally becoming an open-source, cross-platform solution. .NET Core allows native compilation for multiple devices.
The new .NET experience is exactly what I was looking for when I asked this question several years ago.
Original:
Lots of good suggestions, despite being salted with negativity throughout.
I think I'm going to go with C# and Mono. I like C# well enough syntactically (I've been accused often of being shallow, but the syntax of a language is just as important to me as its features, because I spend a lot of time writing in that particular syntax). Although similar to Java, it has a few unique features that I appreciate, and I think the community seems more open-minded.
My biggest complaint about Java besides performance, frankly, is the community. It seems infected with an excess of arrogance, and it also seems to be very fragmented in terms of support for and development on various overlapping libraries, tools, and so on. The community surrounding Mono seems much more organized.
Actually, so does .NET itself, for that matter. Sun is a big enterprise company that seems every bit as confused about what it IS and what it DOES as Microsoft or IBM, yet they seem to be doing an even worse job of leading and organizing their platform than Microsoft, which is pretty tragic.

Recommendations for a Windows based make tool [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Does anyone have any recommendations for a good, fast, make tool? SCons? KJam? Something else?
Cross platform tools would also be acceptable.
GNU make is fast, but the native Windows-port is not very polished; there are a lot of pitfal regarding things like which shell is used to execute your commands. (Search for "MS-DOS" in the GNU make manual.)
SCons works very well on Windows. SCons had (last time I looked) some serious performance issues on large projects (thousands of files and upwards), but that was a couple of years ago.
CMake is an excellent tool if you want to work in Visual Studio but still stay crossplatform and allow other development tools on other platform. Can also generate makefiles for windows, so you're not bound to Visual Studio.
Whatever you may think of Ant, it is not a replacement for Make. That's like saying that a SUV is a replacement for a Formula 1 car. They are entirely different beasts. Ant is good for some things, and make for others.
There is a relatively new tool called premake which you may want to investigate. It looked promisiing when I looked, but I haven't checked it out in any detail.
On a PC is said in your title, so I assume you mean Windows? If so, I would recommend installing the Cygwin environment and if you install all the packages along with it, GNU's make is part of the deal. If you are on a Linux platform or one of the Unix variants, then you can just go with the GNU make directly.
You may be interested in cross-platform tools like Ant, Rake, Gant. These should give you most, if not all the functionality of GNU make, though compiling C code may be harder in some than other.
I've recently started using BJam. It is cross-platform and has a saner syntax than make.
If you're on Windows and you have the .Net Framework, you can use MSBuild. It's very similar to nAnt, and also has a lot of support from the community (some very detailed community toolkits are out there). It has a somewhat steep learning curve, but it's quite powerful once you get the hang of it.
Also another option could be writing PowerShell scripts. It depends what you want to do I guess. In my limited experience with makefiles, they've usually be to compile something, or set environment conditions, which you would use batch files for on a Windows platform.
If you need to build C-language based projects, take a look at rtEasyMake at www.routinetools.com. It is windows based and very easy to setup.

Resources