All Questions
7 questions
4
votes
1
answer
142
views
C99 - Lexer for the Monkey Programming Language from the book "Writing An Interpreter In Go"
Below is a C version of a lexer for the Monkey programming language, originally written in Go, as presented in the book Writing An Interpreter In Go.
LOC: 371. (Excluding the tests.)
Language:
Copy ...
6
votes
3
answers
1k
views
A String View Library in C
I was recently working through the PintOS projects and became curious if there was a better way to do some string processing in C. Specifically, instead of strtok_r,...
4
votes
1
answer
100
views
Double linked list API design in C
I have created the following few functions for handling the use of doubly linked lists.
list.c:
...
7
votes
2
answers
4k
views
Safe and simple strtol()
Until today, in the few cases where I needed something like this, it had been in simple programs which only I used, and where I didn't care about security, so I used the simple ...
4
votes
0
answers
57
views
Texplode KotH controller
I am creating a KotH (King of the Hill) challenge for Programming Puzzles and Code Golf. Other site users will write programs that play Texplode (a version of this game on a square grid). The program ...
1
vote
1
answer
61
views
Select comparison function for sorting based on type information
So I'm working on a patch for the python interpreter where you go through the list and look at the types of the elements and try to use optimized special-case comparison functions that are much ...
4
votes
1
answer
978
views
Designing function prototypes for a singly-linked list API in C
I am in the process of rewriting in C all the data structures that I learned about a few years ago to increase my understanding of data structures and the C language. The first one I'm doing is singly-...