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.

660 questions
10
votes
2 answers

OrderBy with a non-transitive IComparer

Take a custom IComparer, that treats two doubles as equal if their difference is less than a given epsilon. What would happen if this IComparer is used in a OrderBy().ThenBy() clause? Specifically I am thinking of the following…
HugoRune
  • 13,157
  • 7
  • 69
  • 144
10
votes
1 answer

what exactly should PROTECT wrap on assignment?

I re-read the bit about garbage collection in writing R extensions multiple times now, and still don't understand the difference between these two usages: SEXP var = PROTECT(allocVector(STRSXP, 100)); vs SEXP var; PROTECT(var = allocVector(STRSXP,…
eddi
  • 49,088
  • 6
  • 104
  • 155
10
votes
4 answers

How does scanf() work inside the OS?

I've been wondering how scanf()/printf() actually works in the hardware and OS levels. Where does the data flow and what exactly is the OS doing around these times? What calls does the OS make? And so on...
jetru
  • 1,964
  • 4
  • 16
  • 24
10
votes
3 answers

What's the internal format of a .NET String?

I'm making some pretty string-manipulation-intensive code in C#.NET and got curious about some Joel Spolsky articles I remembered reading a while…
JCCyC
  • 16,140
  • 11
  • 48
  • 75
9
votes
3 answers

Is there a python module to parse Linux's sysfs?

Hey all, Linux has a lot of great features in procfs and sysfs, and tools like vmstat extend that quite a bit, but I have a need to collect data from a variety of these systems and was hoping to leverage a unified Python utility instead of hacking…
C.J. Steele
  • 211
  • 2
  • 5
9
votes
2 answers

How does PHP actually work?

Is there some guide out there that describes how the PHP internals? How files are loaded (required, included)? How they are parsed and executed? How memory is allocated? How objects are created/destroyed? How external modules are loaded? How the…
Kay Pale
  • 6,449
  • 7
  • 28
  • 28
9
votes
3 answers

Android Studio Start Failed

I've just installed android studio. For the first time when I run that after a short while (after showing a loading bar), It shows me this error. So I searched in Internet and I did Everything I could,(downloading the last version on Java,…
bardia barai
  • 91
  • 1
  • 1
  • 2
9
votes
1 answer

C++11 internal std::string representation (libstdc++)

How std::string is internally represented in c++11 (libstdc++)? While digging inside the implementation, I found: /* A string looks like this: * * [_Rep] * _M_length …
Borzh
  • 5,069
  • 2
  • 48
  • 64
9
votes
1 answer

How does gdb set software breakpoints in shared library functions?

I know that software breakpoints in an executable file can work through replacing some assembler instruction at the desired place with another one, which cause interrupt. So debugger can stop execution exactly at this place and replace this…
Michael
  • 1,505
  • 14
  • 26
9
votes
1 answer

internal string caching in R

This question is stemming from the following data.table bug report - #4978, but I'm going to use a data.frame example to illustrate that this is not a data.table specific issue: Consider the following: df = data.frame(a = 1, hø =…
eddi
  • 49,088
  • 6
  • 104
  • 155
9
votes
4 answers

How does a syscall actually happen on linux?

Inspired by this question How can I force GDB to disassemble? and related to this one What is INT 21h? How does an actually system call happen under linux? what happens when the call is performed, until the actual kernel routine is invoked ?
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
8
votes
3 answers

Why can't I add a tuple to a list with the '+' operator in Python?

Python not support adding a tuple to a list: >>> [1,2,3] + (4,5,6) Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate list (not "tuple") to list What are the disadvantages for providing such a…
max
  • 49,282
  • 56
  • 208
  • 355
8
votes
3 answers

How are categories implemented in Objective C?

I know how to use categories as a programmer, but I'm curious how they are implemented. Does the compiler compile them into calls to class_replaceMethod from a static initializer? Thanks.
Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55
8
votes
1 answer

How does Elasticsearch 7 track_total_hits improve query speed?

I recently upgraded from Elasticsearch 6 to 7 and stumbled across the 10000 hits limit. Changelog, Documentation, and I also found a single blog post from a company that tried this new feature and measured their performance gains. But I'm still not…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
8
votes
4 answers

LIst Comprehensions: References to the Components

In sum: I need to write a List Comprehension in which i refer to list that is being created by the List Comprehension. This might not be something you need to do every day, but i don't think it's unusual either. Maybe there's no answer here--still,…
doug
  • 69,080
  • 24
  • 165
  • 199