language-implementation Questions

2

Solved

When implementing precise garbage collection, there is always the issue of figuring out which words on the stack are pointers and which are other kinds of data such as integers or floating point nu...

2

Solved

Suppose you're compiling a functional language to portable C, and suppose also that for various reasons you want precise rather than conservative garbage collection. There is no portable way (perha...

8

Solved

Why is the main method entry point in most C# programs static?
Floccus asked 2/3, 2010 at 21:34

5

Solved

When designing a byte code interpreter, is there a consensus these days on whether stack or three address format (or something else?) is better? I'm looking at these considerations: The objective...
Soupspoon asked 16/6, 2011 at 0:39

4

The list primitives in Lisp have the opperator length defined as follows: (define (length lst) (if (null? lst) 0 (+ 1 (length (cdr lst))))) Why can't implementers of some Lisp make length a pri...
Annelieseannelise asked 20/6, 2011 at 20:32

7

Solved

I've been told that if I'm coding in ANSI C to declare in the order that the variables will be used, assert that pointers are not null and that indices are within bounds, and to initialize just bef...
Anywhere asked 13/9, 2009 at 10:21

1

I wanted to write some educational code in Haskell with Unicode characters (non-Latin) in the identifiers. (So that the identifiers look nice and natural for speakers of a natural language other th...

6

Solved

When using list comprehension or the in keyword in a for loop context, i.e: for o in X: do_something_with(o) or l=[o for o in X] How does the mechanism behind in works? Which functions\met...
Rachmaninoff asked 30/1, 2011 at 16:33

1

Solved

I was just experimenting in Python with different syntax for passing in a generator as an argument to a function, and I realized that although I've been doing this, >>> sum((j for j in xr...
Vineland asked 25/1, 2011 at 22:15

1

Solved

C++ has multiple inheritance. The implementation of multiple inheritance at the assembly level can be quite complicated, but there are good descriptions online on how this is normally done (vtables...
Efta asked 12/12, 2010 at 20:52

4

Solved

Is there a R5RS-or-higher Scheme implementation that does parallelization? For example, if I say to do: (map (lambda (x) (pure-functional-stuff x)) '(1 3 5 7 11 13)) it will process 1, 3, 5, ...

6

Solved

This is a more theoretical question about macros (I think). I know macros take source code and produce object code without evaluating it, enabling programmers to create more versatile syntactic str...
Dermal asked 9/7, 2010 at 16:25

2

Solved

The Perl array is an abstract data type. What's the internal mechanism for the Perl array? Is it implemented with dynamic array or linked list? Since the array elements have random access, I would...
Extreme asked 28/6, 2010 at 5:50

4

Solved

The C++ language provides virtual functions. Within the constraints of a pure C language implementation, how can a similar effect be achieved?
Eightfold asked 24/6, 2010 at 20:20

4

Solved

From the Google Open Source Blog: PyPy is a reimplementation of Python in Python, using advanced techniques to try to attain better performance than CPython. Many years of hard work have fin...
Erbe asked 7/4, 2010 at 11:13

2

Solved

I'd like to implement a Lisp interpreter in a Lisp dialect mainly as a learning exercise. The one thing I'm thrown off by is just how many choices there are in this area. Primarily, I'm a bit more ...
Oxytocin asked 23/8, 2009 at 14:42

6

Solved

From http://code.google.com/p/unladen-swallow/wiki/ProjectPlan I quote: "Using a JIT will also allow us to move Python from a stack-based machine to a register machine, which has been shown to imp...

7

Solved

Single inheritance is easy to implement. For example, in C, the inheritance can be simulated as: struct Base { int a; } struct Descendant { Base parent; int b; } But with multiple inheritance, t...

1

Solved

In the llvm tutorials and examples, the compiler outputs LLVM IR by making calls like this return Builder.CreateAdd(L, R, "addtmp"); but many interpreters are written like this: switch (opcode)...

5

Solved

I'm reading The C++ Programming Language and in it Stroustrup states that the int value of a char can range from 0 to 255 or -127 to 127, depending on implementation. Is this correct? It seems like...
Jitters asked 4/11, 2008 at 20:47

2

Solved

I believe I'm getting bitten by some combination of nested scoping rules and list comprehensions. Jeremy Hylton's blog post is suggestive about the causes, but I don't really understand CPython's i...
Sewn asked 22/10, 2008 at 13:15

© 2022 - 2024 — McMap. All rights reserved.