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
23
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
  • 122,748
  • 97
  • 336
  • 451
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
  • 18,082
  • 23
  • 88
  • 136
22
votes
9 answers

Database Internals - Where to Begin?

So lets say that you want to learn some stuff about database internals. What's the best source code to look at? the best books to buy? I was talking about this with a buddy the other day and he recommended: Art of Computer Programming, Volume 3:…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
22
votes
4 answers

Python generator objects: __sizeof__()

This may be a stupid question but I will ask it anyway. I have a generator object: >>> def gen(): ... for i in range(10): ... yield i ... >>> obj=gen() I can measure it's size: >>> obj.__sizeof__() 24 It is said that…
root
  • 76,608
  • 25
  • 108
  • 120
21
votes
3 answers

.NET: Value type inheritance - technical limitations?

I'm wondering if there are any technical reasons for why .NET value types do not support inheritance (disregarding interface implementation)... I can't at first glance think of a reason why value types shouldn't allow single base class…
user438034
21
votes
4 answers

Determining if a given Python module is a built-in module

I am doing some parsing and introspection of various modules, but I don't want to parse built-in modules. Now, there is no special type for built-in modules like there is a types.BuiltinFunctionType, so how do I do this? >>> import CornedBeef >>>…
porgarmingduod
  • 7,668
  • 10
  • 50
  • 83
20
votes
5 answers

How are weak references implemented?

I wonder how weak references work internally, for example in .NET or in Java. My two general ideas are: "Intrusive" - to add list of weak references to the most top class (object class). Then, when an object is destroyed, all the weak references…
Michal Czardybon
  • 2,795
  • 4
  • 28
  • 40
20
votes
3 answers

In PHP, why does "or die()" work, but "or return" doesn't?

In PHP, you can handle errors by calling or die to exit when you encounter certain errors, like this: $handle = fopen($location, "r") or die("Couldn't get handle"); Using die() isn't a great way to handle errors. I'd rather return an error code so…
Sosumi
  • 759
  • 6
  • 20
19
votes
1 answer

Reference for R wizards

Based on this answer, I learned of a special class of internal functions that can be accessed from R: a set of functions accessed via .Internal(specialFunction). If one queries ?.Internal this excerpt may be found: Only true R wizards should even…
Iterator
  • 20,250
  • 12
  • 75
  • 111
19
votes
2 answers

Why is reversed(mylist) so slow?

(Update: Might only happen in CPython 3.8 32-bit for Windows, so don't be surprised if you can't reproduce it in other versions. See tables in the Update section.) Both iter and reversed result in specialized iterators for lists: >>> iter([1, 2,…
Kelly Bundy
  • 23,480
  • 7
  • 29
  • 65
19
votes
2 answers

How can I best find out how django works internally?

so I have been playing around with django for a bit and I really do like this framework. However, I would like to understand better how it actually works 'under the covers'. Here is my current view of client-server-django world, which is very rough…
Paul
  • 7,836
  • 2
  • 41
  • 48
18
votes
2 answers

Why does Single() not return directly when more than one element is found?

I found (roughly) this code in the Enumerable.Single method while inspecting it with some decompiler: foreach (TSource current in source) { if (predicate(current)) { result = current; num += 1L; } } if (num > 1L) { …
Vince
  • 896
  • 5
  • 18
17
votes
2 answers

Internals of node.js. How does it actually work

Perhaps somebody who implemented node.js module can explain the protocol between node.js queue processed on a single thread and a blocking IO operations that will be performed by a module. I suspect that it goes something like this: node.js thread…
Sharas
  • 860
  • 8
  • 18
17
votes
1 answer

Internals (client and server) of aborting an XMLHttpRequest

So I'm curious about the actual underlying behaviours that occur when aborting an async javascript request. There was some related info in this question but I've yet to find anything comprehensive. My assumption has always been that aborting the…
pospi
  • 3,540
  • 3
  • 27
  • 26
17
votes
1 answer

How can I get my Android device Internal Download Folder path?

It is possible to get the Android device Internal Download Folder path?
Andrey
  • 231
  • 1
  • 2
  • 10
1 2
3
43 44