language-implementation Questions

5

Solved

The word LOOP is described as "Resolve the destination of all unresolved occurrences of LEAVE". (emphasis mine) Unlike IF ... ELSE ... THEN, where the number of forward references is always one, L...
Selfesteem asked 9/10, 2019 at 12:21

3

Solved

Laziness is what kept Haskell pure. If it had been strict, purity would soon go out the window. I fail to see the connection between the evaluation strategy of a language and its purity. Consider...

3

How do all the languages implements asynchronous callbacks? For example in C++, one need to have a "monitor thread" to start a std::async. If it is started in main thread, it has to wait for the c...
Eme asked 1/5, 2014 at 11:13

9

Solved

Are there any Common Lisp implementations for .Net?
Funerary asked 21/9, 2008 at 7:0

6

Solved

Where can I get some paper/doc/whatever which describes how a Haskell compiler actually works? I read quite a few of the docs of GHC, but stopped after getting a headache. So, something which doesn...
Baptista asked 8/12, 2010 at 7:34

4

Solved

Suppose we want to write our own sum function in Haskell: sum' :: (Num a) => [a] -> a sum' [] = 0 sum' (x:xs) = x + sum' xs Why can't we do something like: sum' :: (Num a) => [a] ->...
Kaitlynkaitlynn asked 26/2, 2018 at 16:12

3

Solved

The number of statically nested blocks in Python is limited to 20. That is, nesting 19 for loops will be fine (although excessively time consuming; O(n^19) is insane), but nesting 20 will fail with...
Oyler asked 7/7, 2017 at 14:0

7

Solved

I am just trying to understand why all fields defined in an Interface are implicitly static and final. The idea of keeping fields static makes sense to me as you can't have objects of an interface ...
Poky asked 3/10, 2009 at 11:27

2

Solved

According to the docs: inspect.currentframe() Return the frame object for the caller’s stack frame. CPython implementation detail: This function relies on Python stack frame support in t...
Decarlo asked 30/3, 2012 at 7:52

1

Solved

Is there a way to see the code behind a JavaScript's method? Not a javascript method from the website's .html or .js files, but JavaScript's internal methods. For example: How can I see how Jav...
Arturoartus asked 16/4, 2016 at 0:6

1

Solved

I'm currently reading Implementing functional languages: a tutorial by SPJ and the (sub)chapter I'll be referring to in this question is 3.8.7 (page 136). The first remark there is that a reader f...

5

Solved

I know the very basics about using coroutines as a base and implementing a toy scheduler. But I assume it's oversimplified view about asynchronous schedulers in whole. There are whole set of holes ...
Ludewig asked 19/4, 2009 at 12:50

2

Solved

How exactly is foreach implemented in C#? I imagine a part of it looking like: var enumerator = TInput.GetEnumerator(); while(enumerator.MoveNext()) { // do some stuff here } However I'm...
Colliery asked 24/6, 2012 at 16:30

2

Solved

I was looking the implementation of memcpy.c, I found a different memcpy code. I couldnt understand why do they do (((ADDRESS) s) | ((ADDRESS) d) | c) & (sizeof(UINT) - 1) #if !defined(__MACHD...
Bowing asked 4/10, 2013 at 17:45

1

Solved

I am toying with nim (at the time of writing still called nimrod), by writing a Brainfuck interpreter in the language. Without loops implemented, I have: import os, unsigned const RamSize = 200 ...
Expertize asked 30/5, 2013 at 17:50

2

Solved

In Ruby 2.0.0-p0, the __dir__ variable was introduced for easy access to the directory of the file currently being executed. Why is __dir__ lowercase when __FILE__ is uppercase?
Lowder asked 3/3, 2013 at 20:50

4

Solved

Can anyone familiar with Python's internals (CPython, or other implementations) explain why list addition is required to be homogenous: In [1]: x = [1] In [2]: x+"foo" ---------------------------...

4

Solved

I am intrigued by how the C++ exception handling mechanism works. Specifically, where is the exception object stored and how does it propagate through several scopes until it is caught? Is it store...
Pleochroism asked 29/1, 2009 at 7:30

1

Solved

I was playing around in the REPL and I got some weird behavior: Clojure 1.4.0 user=> (type {:a 1}) clojure.lang.PersistentArrayMap user=> (def x {:a 1}) #'user/x user=> (type x) clojure.l...
Secretive asked 16/8, 2012 at 16:33

1

Solved

Here's clojure's definition of vector: (defn vector "Creates a new vector containing the args." {:added "1.0" :static true} ([] []) ([a] [a]) ([a b] [a b]) ([a b c] [a b c]) ([a b c d] [a ...
Bond asked 4/7, 2012 at 11:37

5

Solved

In this popular question about why substring takes O(n) in C#, one of the main answers provided argued that if a large array were allocated and substrings computed by having the new strings just re...

5

Solved

If I make a JVM in Java, for example, is it possible to make the implementation I made actually faster than the original implementation I used to build this implementation, even though my implement...
Marquise asked 21/2, 2012 at 14:48

9

Solved

I have been trying to understand the internal implementation of java.util.HashMap and java.util.HashSet. Following are the doubts popping in my mind for a while: Whats is the importance of the @...
Grounder asked 23/11, 2009 at 8:52

2

Solved

How can letrec be implemented without using set!? It seems to me that set! is an imperative programming construct, and that by using it, one loses the benefits of functional programming.
Nb asked 11/12, 2011 at 23:35

1

Solved

Possible Duplicate: yield statement implementation I've seen msdn docs and it says: The yield keyword signals to the compiler that the method in which it appears is an iterator blo...
Wringer asked 27/11, 2011 at 12:23

© 2022 - 2024 — McMap. All rights reserved.