repl

Location of generated class files when used in clojure repl

When I enter (use 'some.namespace) in the Repl, the corresponding clojure file is compiled and loaded. Are the compiled class files stored on the file system, or they only reside in the memory? The Repl is started from the command line, no editor/IDE is involved. ...

What is the difference between a REPL and an interpreter?

Hi, I was just wondering if there is any technical difference between a REPL and an interpreter? ...

Clojure namespace management - Is there a way to save and restore the state of clojure repl namespaces, imports etc. ?

Clojure has a large number functions/macros for working with namespaces and java package imports. To my (limited) understanding the set up of namespaces can be considered state in a clojure process (repl). When working iteratively at a REPL session, especially when source files are (re)-loaded, I can find it easy to get confused - often...

lisp package differences between repl and compile file

I'm currently playing with lispbuilder-sdl on SBCL under Windows. My source code is as follows: (asdf:operate 'asdf:load-op :lispbuilder-sdl) (asdf:operate 'asdf:load-op :lispbuilder-sdl-binaries) (asdf:operate 'asdf:load-op :lispbuilder-sdl-examples) (sdl-examples:squashed) When I compile the file I get the error: package "SDL-EXAMP...

Hello world in Prolog

I'm tearing my hair out trying to find how to just write a Hello World program in Prolog. I just want to create a program that runs like so: > ./hw Hello, world! > The problem is that every single example I can find works in a REPL, like so: ?- consult(hello_world). % hello compiled 0.00 sec, 612 bytes Yes ?- hello_world. Hello Wor...

Ways to start Clojure REPL ?

Name the ways you know to start the Clojure REPL. What is your favourite ? Does it highlight things for you ? I know of : 1. NetBeans IDE with the Enclojure plugin, and 2. the Leiningen shell script : lein repl No favorite for me so far, and I'd certainly like some colors. What else ? ...

How to improve workflow for creating a Lua-based Wireshark dissector

I've finally created a Dissector for my UDP protocol in Lua for Wireshark, but the work flow is just horrendous. It consists of editing my custom Lua file in my editor, then double-clicking my example capture file to launch Wireshark to see the changes. If there was an error, Wireshark informs me via dialogs or a red line in the Tree ana...

can i clean the repl ?

if i played with a lot of code in a repl console, how can i clear it ? i would like a fresh one without restarting it. can that be done ? ...

Function Erroneously Returning Nil

I'm trying to learn Lisp now, as a supplement to my CS1 course because the class was moving too slow for me. I picked up "Practical Common Lisp," which so far has turned out to be a great book, but I'm having some trouble getting some examples to work. For instance, if I load the following file into the REPL: ;;;; Created on 2010-09-01 ...

IDLE like interactive console for Ruby

I'm starting out with Ruby and was wondering if there's an interactive console similar to Python's IDLE, you know, with context highlighting and autocompletion. I've tried IRB, but it's fairly spartan (although it gets the work done; no question about that). Googling hasn't helped. You guys have any suggestions? ...

Is it possible to build a interactive C shell?

I'm just wondering if this is possible using either (Python, Java or C)? I'm looking for something like IPython for Python. ...

Is it possible to define new ADTs in GHCi

While commenting on new features in ghci I wished that ghci had the ability to declare type declaration and declaring new ADT types, someone informed that it was indeed possible, and after searching I found this page which told me I could do let numUniques' :: (Eq a) => [a] -> Int; numUniques' = length . nub Apparently that same sort...

Is there an equivalent to the perl debugger 'x' in pdl2 (or Devel::REPL)?

I am using pdl2 (the PDL shell) also as a my default Perl interactive shell (it loads all the nice plugins for Devel::REPL). But I am missing the x dumper-printing alias. p is nice for piddles but it does not work for a normal array ref or hash ref. I have loaded Data::Dumper but it lacks an easy way of controlling depth and I like the w...

error: value sorted is not a member of List[Int]

Welcome to Scala version 2.8.0.Beta1-prerelease (Java HotSpot(TM) Client VM, Java 1.6.0_21). Type in expressions to have them evaluated. Type :help for more information. scala> List(3, 1, 2).sorted <console>:5: error: value sorted is not a member of List[Int] List(3, 1, 2).sorted ^ Why am I getting this wei...

Saving my running toplevel for later

Hi, When working in the ocaml or ghci toplevels I often build up a significant "context" for want of a better word, values bound, functions, modules loaded, and so on. Is there a way to save all of that and reload it later so I can continue exactly where I left off? Or better yet, dump out the entire lot as a text file that could be rel...

Previous expression in clojure repl

In the python repl, getting the result of the previously input expression is easy: >>> 1+2 3 >>> _ 3 >>> Is there a way to do this in the clojure repl? ...