Questions tagged [internals]

The internals tag denotes questions about how things work, as opposed to how to accomplish something specific. Of course, how something works underneath will have practical implications, but internals questions aren't about how to do something; rather, how to understand something.

If you understand how a database or parser or version control system actually works, you'll be better at using it. Internals questions seek this kind of inside knowledge.

568 questions
42
votes
3 answers

What constitutes a merge conflict in Git?

How does git determine that a particular merge has a conflict and what the conflict is? My guess would go something like this: if the two commits being merged have a common parent commit, and if they have both changed line X from what the parent…
Nathan Long
  • 113,812
  • 91
  • 316
  • 418
42
votes
14 answers

Should I use internal or public visibility by default?

I'm a pretty new C# and .NET developer. I recently created an MMC snapin using C# and was gratified by how easy it was to do, especially after hearing a lot of horror stories by some other developers in my organisation about how hard it is to do in…
1800 INFORMATION
  • 119,313
  • 29
  • 152
  • 234
41
votes
1 answer

How are java interfaces implemented internally? (vtables?)

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, pointer fixups, thunks, etc). Java doesn't have…
JanKanis
  • 5,166
  • 3
  • 31
  • 38
39
votes
2 answers

Understanding how .Internal C functions are handled in R

I wonder if anyone can illustrate to me how R executes a C call from an R command typed at the console prompt. I am particularly confused by R's treatment of a) function arguments and b) the function call itself. Let's take an example, in this…
Simon O'Hanlon
  • 54,383
  • 9
  • 127
  • 173
37
votes
7 answers

Where did the text segment get its name?

Traditional assembler, and higher level compilers work with several memory segments, according to intended use. Hence, there is a data segment, a stack segment, a bss, and text segment. The text segment is also called the code segment. Text…
gbarry
  • 9,651
  • 5
  • 29
  • 39
36
votes
3 answers

If Java's garbage collector moves objects, what is Object.hashCode and System.identityHashCode?

I've often heard that these methods (Object.hashCode and System.identityHashCode) return the address of the object, or something computed quickly from the address; but I'm also pretty sure the garbage collector moves and compacts objects. Since the…
Rob N
  • 11,371
  • 11
  • 72
  • 126
32
votes
1 answer

What happens internally when a file path exceeds approx. 32767 characters in Windows?

In Windows (assume 2000 onwards), a file path can be at most approximately 32767 characters in length. This limitation exists due to the internal handling with UNICODE_STRING in the native API (also on the kernel side, in drivers etc). So far so…
0xC0000022L
  • 18,189
  • 7
  • 69
  • 131
30
votes
4 answers

Internals of Python list, access and resizing runtimes

Is Python's [] a list or an array? Is the access time of an index O(1) like an array or O(n) like a list? Is appending/resizing O(1) like a list or O(n) like an array, or is it a hybrid that can manage O(1) for accessing and resizing? I read here…
daveeloo
  • 873
  • 3
  • 9
  • 8
29
votes
6 answers

How to get array of bits in a structure?

I was pondering (and therefore am looking for a way to learn this, and not a better solution) if it is possible to get an array of bits in a structure. Let me demonstrate by an example. Imagine such a code: #include struct A { …
Shahbaz
  • 42,684
  • 17
  • 103
  • 166
26
votes
4 answers

Order of static constructors/initializers in C#

While working on a C# app I just noticed that in several places static initializers have dependencies on each other like this: static private List a = new List() { 0 }; static private List b = new List() { a[0] }; Without doing…
BCS
  • 67,242
  • 64
  • 175
  • 277
24
votes
1 answer

OCaml internals: Exceptions

I'm curious to know how exceptions are dealt with in OCaml runtime to make them so lightweight. Do they use setjmp/longjmp or do they return a special value in each function, and propagate it? It seems to me that longjmp would put a little strain on…
Waneck
  • 2,340
  • 15
  • 30
24
votes
2 answers

How does RVM detect when you've changed directories?

One thing that RVM can do is notice when you've changed directories, look for an .rvmrc, and change your current Ruby version and gemset according to that file's contents. It makes this change as soon as you change into that directory and outputs a…
Nathan Long
  • 113,812
  • 91
  • 316
  • 418
24
votes
3 answers

Where can I find information about Javascript engine internals?

I'm looking for books / articles / papers on Javascript engine internals along the lines of the many reference works about the JVM internals, CLR internals, etc. I could (and likely will) look at the source code for JavaScriptCore and V8/Chromium,…
Alan
  • 3,667
  • 1
  • 24
  • 33
23
votes
1 answer

Why is __code__ for a function(Python) mutable

In a previous question yesterday, in comments, I came to know that in python __code__ atrribute of a function is mutable. Hence I can write code as following def foo(): print "Hello" def foo2(): print "Hello 2" foo() foo.__code__ =…
Akshat Harit
  • 774
  • 4
  • 13
23
votes
1 answer

Internals of Spring Framework and other IoC containers

I've been using spring for some time, but I always wondered how does it work, more specifically, how do they load and weave beans/classes marked only with an interface or @annotation. For the xml declarations, it's easy to see how spring…
Miguel Ping
  • 17,442
  • 22
  • 82
  • 135
1
2
3
37 38