19
votes
6answers
268 views

Use of OR as branch control in FP

I undertook an interview last week in which I learnt a few things about python I didn't know about (or rather realise how they could be used), first up and the content of this question is the use of ...
18
votes
14answers
9k views

Python Macros: Use Cases?

If Python had a macro facility similar to Lisp/Scheme (something like MetaPython), how would you use it? If you are a Lisp/Scheme programmer, what sorts of things do you use macros for (other than ...
12
votes
9answers
605 views

Editing programs “while they are running”? How?

This question is a corollary to: Editing programs “while they are running”? Why? I'm only recently being exposed to the world of Clojure and am fascinated by a few examples I've seen of "live ...
10
votes
4answers
5k views

Any good text editor - Android app - optimised for programmers? [closed]

Are there any good Android apps - text editors, optimised for programmers? I'm asking about an Android app which is an editor! I am not interested in editors running on a desktop/laptop computers ...
10
votes
3answers
483 views

Is there some lispy language that seamlessly integrates with Python?

Is there a language based on S-expressions with powerful macros that allows as seamless integration with Python as Clojure with JVM? I want to try using such syntax and features while having access ...
7
votes
2answers
276 views

Help me write my LISP :) LISP environments, Ruby Hashes

I'm implementing a rudimentary version of LISP in Ruby just in order to familiarize myself with some concepts. I'm basing my implementation off of Peter Norvig's Lispy (http://norvig.com/lispy.html). ...
6
votes
5answers
846 views

Best dynamic languages for OpenGL/general graphics

Which are the most mature and well supported solutions for writing graphical programs? I have been using C++ with OpenGL/GLUT, but would like to try a more flexible and expressive approach. Ruby and ...
6
votes
2answers
486 views

implementing lisp in Python

First: yes, i have taken a very long look at Norvig's lispy. Second: I have reused part of his code. Third: if you are one of those people that idolizes him, I know him, so feel free to ask me to tell ...
5
votes
5answers
152 views

Advice on translating code from very unrelated languages (in this case Scheme to Python)?

Reasoning: I'm trying to convert a large library from Scheme to Python Are there any good strategies for doing this kind of conversion? Specifically cross-paradigm in this case since Python is more ...
5
votes
2answers
1k views

Programming Language for Berkeley Overmind Starcraft AI competition

Does anyone know which programming language the Berkeley Overmind submission to the Starcraft AI competition this past year was?
5
votes
1answer
202 views

Are there pattern matching functions in Python like this?

I just found the pattern matching feature in Racket very powerful. > (match '(1 2 3) [(list a b c) (list c b a)]) '(3 2 1) > (match '(1 2 3) [(list 1 a ...) a]) '(2 3) > (match '(1 2 3) ...
4
votes
4answers
184 views

Analog of Python's range in Scheme

How to create a list of consecutive numbers in Scheme? In Python to create a list of integers from 1 to 10 would be range(1,11). Is there an equivalent for Scheme? mzscheme --version gives Welcome ...
4
votes
4answers
633 views

Questions for python->scheme conversion

I currently am trying to write a Python program using scheme semantics so I can later translate it into Scheme without relying on a lot of Pythonic stuff. I'm trying solve the sliding puzzle problem ...
4
votes
2answers
891 views

Are there any Python reference counting/garbage collection gotchas when dealing with C code?

Just for the sheer heck of it, I've decided to create a Scheme binding to libpython so you can embed Python in Scheme programs. I'm already able to call into Python's C API, but I haven't really ...
4
votes
1answer
1k views

Tower of hanoi, python -> scheme, shows error. What am I missing?

The python implementation import sys def move(src, dst, tmp, num): if num == 1: print 'Move from', src, 'to', dst else: move(src, tmp, dst, num-1) move(src, dst, tmp, 1) ...

1 2 3
15 30 50 per page