Questions tagged [interpreter]

An interpreter is a program that executes, i.e. performs, instructions written in a programming language. The tag [interpreter] should be applied to questions concerning the programming of interpreters or for questions about the detailed inner workings of interpreters. Use [interpreter-pattern] (possibly with this tag) for questions about the Gang of Four design pattern.

An interpreter is a program that executes, i.e. performs, instructions written in a programming language.

An interpreter may be a program that either

  1. executes the source code directly
  2. translates source code into some efficient intermediate representation (code) and immediately executes this
  3. explicitly executes stored precompiled code1 made by a compiler which is part of the interpreter system

From wikipedia

2265 questions
41
votes
6 answers

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.
Michał Kwiatkowski
  • 9,196
  • 2
  • 25
  • 20
39
votes
2 answers

How can CoffeeScript be written in CoffeeScript?

So as a new web programmer (background is mostely in C,C++, and Python) with no javascript experience (or desire to experience it, based on what I have seen) I have been doing some precursory research on CoffeeScript and am really liking what I…
37
votes
13 answers

create my own programming language

Possible Duplicates: References Needed for Implementing an Interpreter in C/C++ How to create a language these days? Learning to write a compiler I know some c++, VERY good at php, pro at css html, okay at javascript. So I was thinking of how was…
Ramilol
  • 3,394
  • 11
  • 52
  • 84
37
votes
5 answers

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…
Don Wakefield
  • 8,693
  • 3
  • 36
  • 54
37
votes
3 answers

How exactly is a PHP script executed?

I was just thinking to myself "How exactly is a PHP script executed?" I thought it was parsed first for syntax errors etc, and then interpreted and executed. However, I don't know why I believe that is correct. I'm probably wrong. So, how exactly is…
alex
  • 479,566
  • 201
  • 878
  • 984
36
votes
1 answer

How do I read the output of the IPython %prun (profiler) command?

I run this: In [303]: %prun my_function() 384707 function calls (378009 primitive calls) in 83.116 CPU seconds Ordered by: internal time ncalls tottime percall cumtime percall filename:lineno(function) 37706 41.693 …
Peter D
  • 3,283
  • 4
  • 24
  • 23
35
votes
6 answers

Does Pycharm have Interactive Python Interpreter?

I am a fairly new Pycharm user switched from other IDEs recently. One question I have is about the interactive python interpreter, which is the "window" I can type in variables to check them after I ran my script. Pyscripter has this thing called…
Nan An
  • 633
  • 3
  • 7
  • 11
34
votes
7 answers

Optimisation for a brainfuck interpreter

As an exercise to help me learn about interpreters and optimisation, neither of which I know anything about, I have written a brainfuck interpreter in C. It appears to work flawlessly thus far, though it does not compete well in execution speed…
Delan Azabani
  • 79,602
  • 28
  • 170
  • 210
34
votes
6 answers

/usr/bin/perl: bad interpreter: Text file busy

This is a new one for me: What does this error indicate? /usr/bin/perl: bad interpreter: Text file busy There were a couple of disk-intensive processes running at the time, but I've never seen that message before—in fact, this is the first time…
chris
  • 36,094
  • 53
  • 157
  • 237
33
votes
7 answers

C interpreter written in javascript

Is there any C interpreter written in javascript or java ? I don't need a full interpreter but I need to be able to do a step by step execution of the program and being able to see the values of variables, the stack...all that in a web…
Loïc Février
  • 7,540
  • 8
  • 39
  • 51
33
votes
15 answers

Online Interactive Consoles

Where can I find an online interactive console for programming language or api? Ruby Python Groovy PHP? Perl? Scheme Java C?
Nick Retallack
  • 18,986
  • 17
  • 92
  • 114
33
votes
8 answers

How do I run a python interpreter in Emacs?

I just downloaded GNU emacs23.4, and I already have python3.2 installed in Windows7. I have been using Python IDLE to edit python files. The problem is that I can edit python files with Emacs but I do not know how to run python interpreter in Emacs.…
Jeff Lee
  • 341
  • 1
  • 3
  • 3
32
votes
9 answers

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…
Kevlar
  • 8,804
  • 9
  • 55
  • 81
31
votes
5 answers

Is there an interactive interpreter for Java?

I want to execute java commands interactively from shell: is there a way to do so?
Mohamed Khamis
  • 7,731
  • 10
  • 38
  • 58
29
votes
4 answers

Running/Interpreting C on top of the JVM?

Is there a way to run plain c code on top of the JVM? Not connect via JNI, running, like you can run ruby code via JRuby, or javascript via Rhino. If there is no current solution, what would you recommend I should do? Obviously I want to use as many…
amitkaz
  • 2,732
  • 1
  • 20
  • 18