What other OCaml top level programs exist? (Vista) - windows

I'm using OCamlWinPlus v1.9RC4. It sucks pretty hardcore. It's constantly crashing, and lacks basic features. What other toplevel OCaml programs can be recommended for Windows Vista?

You can use a Windows version of Emacs and use the customization files (*.el) provided with OCaml's source archive to turn Emacs in a powerful, if idiosyncratic, toplevel.
You'll find the instructions in ocaml-3.11.1/emacs/README. Specifically:
Once you have started caml by M-x run-caml:
M-C-x send phrase to inferior caml process
C-c C-r send region to inferior caml process
C-c C-s show inferior caml process
C-c` goto error in expression sent by M-C-x

I used ocaml from cmd. Editing with history is there..
Can you elaborate on ocamlwinplus crashes? Did you try to debug it?

I use Notepad++ to write code then I compile it from cmd, simply there is no simple way to do it with OCAML!

Related

Using MIT/GNU Scheme

I have downloaded the MIT/GNU Scheme implementation of LISP in order to understand Structure and Interpretation of Computer Programs. However, I am a bit confused about what I am dealing with when I launch the program. When the program is launched, I get two windows: the "MIT/GNU Scheme" window, and the "Edwin: *scheme*" window.
What are these two windows used for? Is the "MIT/GNU Scheme" one some sort of command-line interpreter? While the other is where code can be written and saved?
Further questions: If the MIT/GNU Scheme is a command-line interpreter, how can I get the "1 ]=>" prompt to show. And if the other is where I write programs, how do I test and save the programs?
MIT/GNU Scheme should start off as minimized. It is just a background console window that starts the editor. You need not pay attention to it (nor can you interact with it).
Edwin: *scheme* is the Edwin text editor, which looks to me like some sort of Emacs derivative. It allows you to not only write Scheme scripts but also evaluate Scheme expressions interactively. However, to do this you will need to learn the appropriate keybindings and commands, and some familiarity with Emacs would certainly help here too. Therefore I suggest reading the documentation.

REPL with features of modern shell

I am creating a script (in Lisp, though this can apply to any language with a REPL) which users interface with using the language's REPL. But this does not include even basic interactive features like remembering history. I am wondering if it is possible to tell a terminal emulator to interpret commands using an arbitrary language, instead of the built-in language.
Thanks!
OK, follwoing the advice of user2864740, I looked at GNU Readline, which is the library the provides much of the functionality that I'm looking for. I'm going to switch to Guile Scheme instead of Common Lisp since Guile supports Readline out of the box. However, it looks like it can work in Common Lisp as well: http://www.cliki.net/sb-readline
Yet another approach might be to start the editor emacs, run
M-x shell
and in this shell run your Lisp REPL. You get a lot of feature for free, like command history.

when to use Command Windows

I use Immediate windows in Visual studio a lot but I am not sure what are the uses cases for using Command windows. Can it be used for debugging anyting particular? Wondering any other people use it and if so, what exactly they find it useful for?
It is useful for typing in commands to the IDE. You can use it to invoke any command, even ones that are not available on a menu or toolbar.

assembly programming in Emacs how to?

assembly programming in Emacs how to?
I want Emacs to do following things
1. assembling
2. run the just before made program inside Emacs
3. debugging with watching flags and registers as like ollydbg or softice
4. decompile executable file for see what assembly codes are made by c
but I don't know how to do this
could somebody let me know ?
Which operating system (and machine architecture) are you using? I think that's quite essential information for questions about assembly programming.
I'll try to answer your four points anyway:
Just run your assembler (e.g. as) from M-x compile.
Run it from a shell buffer or from shell-command (bound to M-!).
Emacs' built-in graphical debugging support is started with M-x gdb. You may have to look for some external debugger support package if GDB is not suitable for your purposes.
For disassembling object code, I'd use GDB. But I think if you have the C sources, it would be better to compile them with the -S flag to see the assembly code emitted by the compiler instead of what can be reconstructed from the machine code.
Since you mention SoftICE, I'm assuming you're on windows.
(Good old times, by the way. If anybody ever used SoftICE on windows 9x, he/she will know what I mean :)
I don't use Emacs, but here's how to get started:
Get the tools you need to assemble your program (ie: at least, the assembler and the linker). On windows, the MASM package comes with everything you need : http://www.masm32.com/
Figure out wich commands you need to compile a simple hello world.
Configure Emacs so that it runs the above commands for you

Good resources for writing console style applications for Windows?

For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well not exactly like Vim or Emacs but one that takes over the entire command prompt while it is in use and then after you exit it leaves no trace behind. I know that on Unix there is the curses library but for Windows? ...
PDCurses works on Win32.
I found List of Console Functions on msdn, PDCurses, and The Console Module.
You can certainly write that kind of application with Delphi, which has reasonable commandline support. People often overlook that Delphi can build any kind of Windows executable, not just GUI apps.
I don't know off-hand if the free 'Turbo' edition of Delphi has anything cobbled into it to PREVENT you from using it to build console apps - I would have thought it would be fine for this kind of thing.
There is a small but good tutorial on using C++ for the Windows console at www.benryves.com/tutorials/?t=winconsole&c=all going as far as coding a simple painting program.
You could also try Free Pascal. It is a free ((L)GPL) Object Pascal compiler which is compatible with the Delphi-compiler. It has an console-based IDE, which proves that you can make very good console-applications with it, and which you can use as an example.
If you want to use a graphical IDE to build your console-application, you can download the Lazarus IDE.
As a bonus your application will run on Windows (32/64 bit), Linux, Mac OS X, FreeBSD, Solaris etc...
In Windows or DOS, I used the conio library from Borland. It's very old but fine enough for a beginner like me.
As Robsoft says Delphi would be a good start. There is Turbo Delphi (Pascal based) or Turbo C++ both free editions.
web site here.
http://www.turboexplorer.com/
Check out some of the mono libs. They have a great one to parse command line arguments but can't remember the namespace.
Miguel just posted some terminal code as well.
For ncurses-like library/framework on Windows, I'll highly suggest to get your hand dirty with PDCurses.
If you trying/using C#, there's Curses-Sharp.
This is the best tool for it I've ever seen!!
1) Create any application using VB6 IDE
2) Convert it to Console Application, using THIS!

Resources