interpreter

How do I access the Ruby AST from C level code?

I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this AST in a Ruby C extension? Does it involve the Ruby extension API, or ...

Best GUI Python Interpreter

When I'm trying to hack out an idea I find the Python interpreter is an invaluable to tool to quickly get a working prototype and iterate on it. I've been using IDLE bundled with Python on Windows and that's been working pretty well. I'm currently on a different system running Ubuntu and IDLE doesn't seem to work as well. The tooltips d...

Learning Resources on Parsers, Interpreters, and Compilers

I've been wanting to play around with writing my own language for a while now (ostensibly for the learning experience) and as such need to be relatively grounded in the construction of Parsers, Interpreters, and Compilers. So: Does anyone know of any good resources on constructing Parsers, Interpreters, and Compilers? EDIT: I'm not l...

Have you used any of the C++ interpreters (not compilers)?

I am curious if anyone have used UnderC, Cint, and Ch (or any other C++ interpreter) and could share their experience. Thanks everyone for your valuable input. /Allan ...

How to load a python module into a fresh interactive shell in Komodo?

When using PyWin I can easily load a python file into a fresh interactive shell and I find this quite handy for prototyping and other exploratory tasks. I would like to use Komodo as my python editor, but I haven't found a replacement for PyWin's ability to restart the shell and reload the current module. How can I do this in Komodo? ...

Will the Javascript performance improvements from Trace Trees find their way into other interpreted languages?

It sounds like Mozilla is having good luck improving JavaScript performance with TraceMonkey. See also Andreas Gal's paper on Trace Trees. Are these improvements available to other interpreters/compilers and if so, does this mean we'll see a cascade of improvements in other interpreted languages? ...

How to invoke an interactive elisp interpreter in Emacs?

Right now I write expressions in the *scratch* buffer and test them by evaluating with C-x C-e. I would really appreciate having an interactive interpreter like SLIME or irb, in which I could test Emacs Lisp expressions. ...

How to avoid .pyc files?

Can I run the python interpreter without generating the compiled .pyc files? ...

Are there any recent Lua to JavaScript converters or interpreters somewhere?

I need to find a good Lua to JavaScript converter; lua2js on luaforge.org is out of date (3 or so years old and looks like it doesn't work on Lua 5.1) and I haven't yet found anything on Google. Does anyone have any experience with any other converters out there? It should work on Lua 5.1 and preferably be .NET based, but .NET is not a ...

How to implement URL pattern interpreter as used by Django and RoR in PHP

What's the best way to implement a URL interpreter / dispatcher, such as found in Django and RoR, in PHP? It should be able to interpret a query string as follows: /users/show/4 maps to area = Users action = show Id = 4 /contents/list/20/10 maps to area = Contents action = list Start = 20 Count = 10 /toggle/projects/10/active map...

With Lua and Python embeddable, is there a place for Basic?

I started off programming in Basic on the ZX81, then BASICA, GW-BASIC, and QBasic. I moved on to C (Ah, Turbo C 3.1, I hardly knew ye...) When I got started in microcontrollers I regressed with the BASIC Stamp from Parallax. However, BASIC is/was awesome because it was so easy to understand and so hard to make a mistake. I moved on t...

How do I add tab completion to the Python shell?

When starting a django application using python manage.py shell, I get an InteractiveConsole shell - I can use tab completion, etc. Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) When just starti...

Back-end choice for a new dynamic programming language?

I've been developing a Smalltalk variant for just the fun of it and I wonder what would be a fellow stackoverflowers choice when it comes to targeting a back-end. These were my current considerations: .NET, JVM: These two VM's are mainly for statically typed languages and I assume it would be quite hard to target such a dynamic language...

Why have language Interpreters written in target language

What's the importance of having an interpreter for a given language written in the target language (e.g. PyPy)? ...

References Needed for Implementing an Interpreter in C/C++

I find myself attached to a project to integerate an interpreter into an existing application. The language to be interpreted is a derivative of Lisp, with application-specific builtins. Individual 'programs' will be run batch-style in the application. I'm surprised that over the years I've written a couple of compilers, and several dat...

Create a DSL vs. Embed an Existing Language

This often comes up: your application has gotten extensive enough that it's time to add some programmability into it to make it flexible. One example might be a finance application - you want to add a formula editor so that you can create your own custom formulas without having to re-compile the code. You have to make a choice: do you c...

Haskell Interactive

I am a bit rusty on my Haskell and am looking to ramp back up. One thing I enjoy from F# is the F# Interactive shell integrated with Visual Studio: I can evaluate virtually anything (including function and class definitions) and use F# as a shell. Is there an equivalent in Haskell? When I use ghci, I cannot evaluate function definitions....

Detecting infinite loop in brainfuck program

I have written a simple brainfuck interpreter in MATLAB script language. It is fed random bf programs to execute (as part of a genetic algorithm project). The problem I face is, the program turns out to have an infinite loop in a sizeable number of cases, and hence the GA gets stuck at the point. So, I need a mechanism to detect infinite...

Is there an OpenSource BASIC interpreter in Ruby/Python?

I want something simple in order to experiment/hack. I've created a lot interpreters/compilers for c and I just want something simple. A basic BASIC :D If you don't know any (I've done my google search...), yacc/bison is the only way? Thx ...

OK Programming language from USB stick with no installation

I'm looking for a compiler or interpreter for a language with basic math support and File IO which can be executed directly from a memorystick in either Linux or Windows. Built in functionality for basic datastructures and sorting/searching would be a plus. (I've read about movable python, but it only supports windows) Thank you ...