Questions tagged [lisp]
Lisp is a (family of) general purpose programming language(s), based on the lambda calculus, and with the ability to manipulate source code as a data structure.
188 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
7
votes
2
answers
366
views
Lexically-scoped Lisp interpreter
Introduction
Here's an interpreter, written in Common Lisp, for a simple Lisp dialect that has some semi-"advanced" features, namely lexical scope with closures, ...
9
votes
1
answer
132
views
Lisp-like language interpreter in Python
I decided to learn more about how interpreters work and made a simple Scheme interpreter in Python. I'd like to hear some advice on how I could have written this better, or on the mistakes I've made.
...
3
votes
0
answers
123
views
Destructive quick and merge sort
I've implemented a destructive merge and quick sort in common lisp, but the code feels verbose and highly imperative. I was wondering if anyone could offer guidance on idioms that could make the code ...
0
votes
2
answers
322
views
Split a list into two parts
I wanted to split a list into 2 parts, as per the chosen size, first the size and then the list. Example:
(split 3'(1 3 5 7 9))
...
3
votes
0
answers
275
views
Prime number generator in lisp
My implementation is based on the incremental prime sieve described on Wikipedia. I'm relatively new to lisp so I would appreciate any comments on my coding style or on the algorithm.
The below code ...
1
vote
1
answer
67
views
Installing packages when needed
I decided to create a portable Emacs config and install packages I use if it's necessary on a fresh computer.
Here is what I've done:
...
5
votes
0
answers
107
views
Hide your text with colorful blocks in secret(-mode)
Motivation
While working on a completely unrelated task, I wanted to share a screenshot of my current Emacs frame, but not of the actual text contents. And while GIMP's pixelate filter did the job, I ...
Zeta's user avatar
- 19.6k
3
votes
2
answers
467
views
Tower of Hanoi in Racket
I'm in the early stages of learning Racket, and decided to have a go at the tower of Hanoi. I did this without any reference whatsoever, so everything is up for review, including the algorithm as well ...
4
votes
1
answer
68
views
Count complete trips to the basement and back to ground floor
An elevator starts on the ground floor 0 and moves up or down by one floor at a time as described by an input string travel. ...
3
votes
0
answers
193
views
LOVE2D-based grid-movement rhythm game in Fennel
This is the initial skeleton for a short game written in Fennel for a Jam event. It runs sensibly, but I want to know if I'm missing something that could make the code more elegant as it's a bit ...
6
votes
1
answer
123
views
WOMOIWIW: What Org-mode Opens is What I Want
Motivation
Previously, on the Emacs stack exchange:
In Org mode, when I open a link (C-c C-o) [...] [that] contains a wildcard, such as file:3_o*.pdf, Emacs opens ...
Zeta's user avatar
- 19.6k
2
votes
0
answers
41
views
define a lisp function, that takes fsm , a transition and state-index and return the state obtained by the transition from the state
The state machine has the below specifications
(defparameter *test-machine*
(make-fsm
:alphabet '(a b)
:table '((2 1) (0 2) (1 0))
:initial 0
:accepting '(2)))
...
4
votes
1
answer
357
views
Deque class in Common Lisp
I created a library with two CLOS class to implement a deque structure similar to the one available in C++, plus a few Lisp-ian twists. The two classes are node, ...
2
votes
0
answers
54
views
Lispy code? Palindrome of product
My answer to Project Euler problem 4 (largest palindrome of product of two 3-digit numbers) is below.
Please suggest improvements, style changes, indentation, commenting, naming, ...
And nitpicks are ...
3
votes
2
answers
278
views
Lispy code? Prime factors of a number
My answer to Project Euler problem 3 (largest prime factor of 600851475143) is below.
Please suggest improvements, style changes, indentation, commenting, naming of "objects", ...
...