text:
No strings (or numbers) attached
If you like this, consider participating in:

The Official Dyalog APL 2016 Year Game
The monthly Dyalog APL 2017 Code Golf Challenge

Make 12 snippets/expressions, in the same language, that result in the numbers 0 through 10, and 42 respectively, but without writing any literal numeric, string, or character data.
Build-in data, like PI() and ALPHABET(), are fine, and so are e.g. CJam's U, X, Y, Z, and A constants, and Processing's BLEND, CHORD, CENTER, BREAK, and  LINES.
Every snippet must be able to stand on its own, i.e. they may not be interdependent. However, inside a single snippet, you may assign a variable and use it freely, as long as you refer to it directly by name, and not through a string containing its name.
All the snippets must be valid on the submitter’s computer at the time of submission (as reported by SE), but may not rely on unusual local conditions like number of files in a directory, the exact date or time, or specific input from the user.
Examples of valid snippets
3: INT(LOG10(YEAR(TODAY())))   because it remains true in the foreseeable future
4: CUBICROOT(LEN(CHARACTERSET()))   because a 256 letter character set is very common
8: SQRT(SYSTEMTYPE())   because 64-bit systems are very common
Examples of invalid snippets
5: LEN(USERNAME())   because most people do not use “Admin” as login :-)
9: LOG10(SYSTEMMEMORY())   because it only works on systems with exactly 1 GB of memory
42: CODE("*")   because it contains a string/character literal
The result of each snippet must result in an actual number (value, int, float, etc.) that can be used for further calculations using the same language as the snippet, i.e not a text string representing that number.
Only character based languages allowed.
Score is total byte count of all the 12 snippets combined. Newlines separating the snippets are not counted in.
Note that the above rules may prevent some languages from participating, even if they are Turing complete.
FAQ
Q Can the programs accept any input?
A Yes, but you may not just ask for input and enter the relevant number.
Q Are physical digits (non-data) digits allowed?
A Yes, e.g. LOG10().
Q Do Symbols in Ruby count as literals?
A Yes.
Q Does score include newlines between each snippet?
A No.
Q Is TI-BASIC "character based" enough to be valid?
A Yes.
Q Do false and true count as number literals?
A No, they are acceptable.
Q Can we use a number literal to call a function if that's the only way and the number doesn't influence the output of the function?
A Yes, if that is the normal way to write code in your language.
Q My language assumes there is a [something] at the start of each program/expression. Must I include it, or should my snippets just work if placed in the middle of a program/expression?
A They should just work in the middle of a program/expression.
Q What about regex literals?
A Forbidden, except for languages that only do regexes.
Q Is one piece of code that could print all the specified numbers acceptable?
A No, they have to be separate and mutually independent.
Q May I assume a boilerplate like int main() {}... or equivalent?
A Yes.
Q What output datatypes are allowed?
A Any numeric datatype, like int, float, etc.
Q Do I need to print the result of each snippet?
A No, making the result available for subsequent use is enough.
Q Are pre-set variables allowed?
A Yes, and they become reset (if changed) for every snippet.
Q Are π and e considered number literals?
A No, you may use them.
Q May I return 4 and 2 in different cells for 42?
A No, they must be connected as one number.
Q Bytes or characters?
A Bytes, but you may choose any desired codepage.
Q May constant functions and preset variables like J's 9:, Actually's 9, and Pretzel's 9 be used?
A Yes, if the vocabulary is finite (19 for J, 10 for Actually and Pretzel).

If 0-9 are not number literals but are pre-populated variables, would they be fair game?

@Cyoce So 10 is {1, 0} and not 2×5?

no, there is simply another syntax for literals that is not base-10, so 0-9 are not literals. They hold the value of 0-9, but are considered variables

@Cyoce Then it's fine. What language is that?

pretzel (a language I'm working on).

Do numbers in languages such as Sesos (non-competing) count as literals?

@EriktheGolfer Why should(n't) they be?

@Adám Because the SBIN is the actual program. The literals appear as such in the SASM, but I don't know... I think they count, though, so Sesos is definitely out. I think it's like C, where the pre-compiled form of the code has literals that count as such.

@Adám, What about using undefined constants? PHP has a default value for undefined constants, which is the name of the constant.

@aross Sounds fine to me. Can you give an example?

@Adám A constant ╦═ (IBM-850), which is the binary negation of string 42. It's not very creative, but it is short :)

@aross Go ahead.

Hexagony, 13 bytes

1
2
3
4
5
6
7
8
9
10
42

Try it online!
In Hexagony, 0 through 9 are functions that multiply the current memory by 10, and then add the number represented by the function name. Therefore, the first snippet is empty as memories start off as 0.
For example, if the current memory is 65, executing the function 3 will make the current memory 653.
(To downvoters: downvote all you want; I am ready.)

Sneaky, but gets my upvote and tick.

Funciton, 1222 bytes
Apart from numeric literals, there are two ways I can produce a value (any value at all) in Funciton: stdin and lambda expressions. Stdin is a single box while a full lambda expression requires more syntax, so I’m going with stdin. However, while stdin could be anything, all of the following work regardless of what input is provided.
All of the library functions used here existed before the challenge was posted.
0 (40 bytes in UTF-16)
╔╗┌┐
║╟┤└┼┬┐
╚╝└─┘└┘

This uses the raw syntax for less-than. A value is never less than itself, so the result of this is 0.
1 (52 bytes in UTF-16)
╔╗┌─╖┌─╖
║╟┤⌑╟┤ɕ╟
╚╝╘═╝╘═╝

⌑ returns a lazy sequence containing a single element and ɕ counts the number of elements. (The lazy sequence is lazy enough that this snippet doesn’t actually evaluate stdin at all!)
2 (70 bytes in UTF-16)
╔╗┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ɕ╟
╚╝╘═╝╘═╝╘═╝

= 2¹. ʂ generates all subsequences of a sequence, and thus turns a sequence of n elements into one with 2ⁿ.
3 (88 bytes in UTF-16)
╔╗┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ɕ╟┤♯╟
╚╝╘═╝╘═╝╘═╝╘═╝

= 2 + 1. ♯ increments a value by 1.
4 (88 bytes in UTF-16)
╔╗┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ʂ╟┤ɕ╟
╚╝╘═╝╘═╝╘═╝╘═╝

= 2².
5 (106 bytes in UTF-16)
╔╗┌─╖┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ʂ╟┤ɕ╟┤♯╟
╚╝╘═╝╘═╝╘═╝╘═╝╘═╝

= 4 + 1.
6 (106 bytes in UTF-16)
╔╗┌─╖┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ɕ╟┤♯╟┤!╟
╚╝╘═╝╘═╝╘═╝╘═╝╘═╝

= 3 factorial.
7 (110 bytes in UTF-16)
┌───┐┌─╖┌─╖┌─╖╔╗
│┌─╖├┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤A╟┘╘═╝╘═╝╘═╝╚╝
 ╘╤╝

= A(2, 2) (Ackermann function).
8 (118 bytes in UTF-16)
┌────┐┌─╖┌─╖┌─╖╔╗
│┌──╖├┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤<<╟┘╘═╝╘═╝╘═╝╚╝
 ╘╤═╝

= 2 << 2 (shift-left).
9 (128 bytes in UTF-16)
┌───┐┌─╖┌─╖┌─╖┌─╖╔╗
│┌─╖├┤♯╟┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤×╟┘╘═╝╘═╝╘═╝╘═╝╚╝
 ╘╤╝

= 3 × 3.
10 (146 bytes in UTF-16)
┌───┐┌─╖┌─╖┌─╖┌─╖┌─╖╔╗
│┌─╖├┤♯╟┤ɕ╟┤ʂ╟┤ʂ╟┤⌑╟╢║
└┤+╟┘╘═╝╘═╝╘═╝╘═╝╘═╝╚╝
 ╘╤╝

= 5 + 5.
42 (170 bytes in UTF-16)
┌──────┐┌─╖┌─╖┌─╖┌─╖┌─╖╔╗
│┌─╖┌─╖├┤!╟┤♯╟┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤♯╟┤×╟┘╘═╝╘═╝╘═╝╘═╝╘═╝╚╝
 ╘═╝╘╤╝

= 6 × (6 + 1).

+1 for the Ackermann function.

I wish I could upvote more than once...

JavaScript, 144 141 140 138 132 125 123 bytes
With help from @edc65, @Sjoerd Job Postmus, @DocMax, @usandfriends, @Charlie Wynn and @Mwr247!

result.textContent = [

+[]                          ,// 0  (3 bytes)
-~[]                         ,// 1  (4 bytes)
-~-~[]                       ,// 2  (6 bytes)
-~-~-~[]                     ,// 3  (8 bytes)
-~Math.PI                    ,// 4  (9 bytes)
-~-~Math.PI                  ,// 5  (11 bytes)
-~-~-~Math.PI                ,// 6  (13 bytes)
Date.length                  ,// 7  (11 bytes)
(a=-~-~[])<<a                ,// 8  (13 bytes) = (2 << 2)
(a=~Math.E)*a                ,// 9  (13 bytes) = (-3 * -3)
(a=-~-~[])<<a|a              ,// 10 (15 bytes) = ((2 << 2) | 2)
(a=Date.length)*--a           // 42 (19 bytes) = (7 * 6)

];

Try 4: -~Math.PI

@edc65 Thanks! I thought there would be something I could do with PI. :)

For 5, 6 you can also use -~-~Math.PI and -~-~-~Math.PI saving another byte (twice).

@SjoerdJobPostmus Oh of course! Thanks for catching that.

You can save one on 9 with (a=~Math.E)*a

Use +[] for 0 (saves 1 byte).

Save one on 42 with: (a=-~-~-~Math.PI)*(++a)

Save two on 10 with (a=-~!![])<<a^a

Save four on 7 with Date.length

Save one on 42 with (escape+NaN).length. P.S. Today I learned that JavaScript is really weird...

@Mwr247 Nice, thanks! Functions seem to cast to strings differently depending on the JavaScript implementation so I included your 42 solution as a comment.

(a=Date.length)*--a does 42 in 19 bytes

I was gonna say that NaN counts as a number, but it's literally Not a Number :P

Mouse-2002, 27 26 17 14 bytes
The first snippets push 0-10, and ZR+ pushes 25 then 17 and 25 17 + 42 = is 1.
A
B
C
D
E
F
G
H
I
J
K
ZR+

It says "a snippet or expression" so you can remove all the !'s

@cat I can't speak for the questioner, but I think that means stand alone from each other - no defining a function in one, then using it in another. However, each snippet doesn't need to be an entire program, it can assume the boilerplate int main() {}... equivalent that will make it run.

CJam, 27 24 bytes
U    e# 0
X    e# 1
Y    e# 2
Z    e# 3
Z)   e# 3 + 1
YZ+  e# 2 + 3
ZZ+  e# 3 + 3
AZ-  e# 10 - 3
YZ#  e# 2³
A(   e# 10 - 1
A    e# 10
EZ*  e# 14 × 3

Thanks to @MartinBüttner for -1 byte!
Try it online!

Perl 5, 86 75 71 66 bytes
All ^Fs are literal control characters (0x06 in ASCII), and hence a single byte.
$[          # array start index, defaults to 0                                  2
!$[         # !0 is 1                                                           3
$^F         # max sys file descriptor number, 2 on all sane systems             2
++$^F       # 2 + 1                                                             4
~-$]        # 5 - 1                                                             4
int$]       # $] is Perl version, int truncates                                 5
length$~    # 1 + 5                                                             8
~~exp$^F    # floor(e^2)                                                        7
$^F<<$^F    # 2 bitshift-right 2                                                6
-!$[+ord$/  # -1 + 10                                                          10
ord$/       # input record separator, newline by default, ord gets ASCII val    5
ord($"^$/)  # 32 + 10                                                          10

Thanks to msh210 for saving 11 bytes and Dom Hastings for 9 bytes!

Perl is strange. http://www.zoitz.com/comics/perl_small.png

downgoated because "max sys file descriptor number, 2 on all sane systems = 3" but i have 65+

(i'm just joking, i upvoted of course)

You ever read the comments on an SE post and think, "wow, which dumbass wrote that"? That's me right now, at myself.

!$[+ord$/   # -1 + 10 — I don’t understand. In line 2 you say that !$[ gives you 1, not −1, so this snippet gives 11.

@Timwi Whoops, I must have missed the - while copying that one down. Thanks!

@DomHastings Your snippet for 7 results in 20 for me, and the one for 42 is actually 32. The others do work, though; thanks!

@DomHastings Ah, you're right about 7. As for the 42 one, now I get 48 when running it instead (?!?). That's super weird, since neither of those variables are things that should change...

Well, anyway, it seems to work when called in a brand new session (perl -e ...); I was testing all of these in the same debug session before. I'll go ahead and add that one in also, thanks!

Just noticed another one too: 9 ++$^F*$^F! Was really annoyed that ~~$] didn't work for 5. Don't understand why (or how...) it's handled differently to other variables: perl -E 'say~~$];say~~eval$]'... $]|$- works correctly, but is no shorter. Perl is strange. :)

Brainfuck, 70 bytes
+
++
+++
++++
+++++
++++++
+++++++
++++++++
+++++++++
++++++++++
--[>+<++++++]>-

Each line must be run individually.
The first 10 are self explanatory: we increment the value of the cell via each plus.
The 42 is a lot more complex. It relies on the fact the most brainfuck interpreter use 8-bit cells, meaning that all operations on it are done modulo 256. The -- sets cell #0 to 254. Then we enter a loop which runs until cell #0 is 0. Each iteration adds 1 to cell #1 and adds 6 to cell #0. This loops runs 43 times, so cell #1 is 43. Finally, we subtract 1 from cell #1 to make it 42.
I got the most efficient 42 ever found from http://esolangs.org/wiki/Brainfuck_constants

@someonewithpc 4 and 2 is different from 42: the OP says The result of each snippet must result in an actual number that can be used for further calculations using the same language as the snippet, i.e not a text string representing that number. You can do calculations on 42 directly, but it's not the same for 4 and 2 in separate cells.

Oh, ok. I had missed that..

Darkness, 339 303 bytes
This is where Darkness really shines. Get it? :~)!
Without printing (replaced the space with \s in the first line since it won't show otherwise):
\s

█

██

███

████

█████

██████

███████

████████

█████████

██████████

██████████████████████████████████████████

With printing:
■

█■

██■

███■

████■

█████■

██████■

███████■

████████■

█████████■

██████████■

██████████████████████████████████████████■

Each line must be run individually in this case since the program terminates in the light (a space). However, it is possible to write this on one or several lines in the same program.
Regular darkness (█) increments a register by 1, and the ■ instruction (some sort of mini-darkness) outputs the contents of the register.

I don't think this asks for full programs, just snippets.

Prolog, 113 99 bytes
Snippets:
e-e              % 0.0
e/e              % 1.0
e/e+e/e          % 2.0
ceil(e)          % 3
ceil(pi)         % 4
ceil(e*e-e)      % 5
ceil(e+e)        % 6
floor(e*e)       % 7
ceil(e*e)        % 8
ceil(pi*e)       % 9
ceil(pi*pi)      % 10
ceil(e^e*e)      % 42

Combines the mathematical constants e and pi in different ways converted to int.
Edit: Saved 14 bytes by utilizing floats for 0-2.

anything wrong with e/e=1?

@steveverrill: it will become a float (1.0). I interpreted the challenge description to mean that the numbers should be integers. Most of these, if not all could be shortened otherwise.

@steveverrill Floats are fine. We just need the right value.

MATL, 30 bytes
O
l
H
I
K
Kl+
HI*
KYq
HK*
IH^
K:s
IH^:sI-

H, I, and K are predefined constants for 2, 3, and 4 (like pi). O and l are functions that returns a matrix of zeros (O) or ones (l), the default size is 1x1. : makes a vector, and s sums it, so K:s makes a vector from 1 to 4 and sums it to get 10. Yq is the n-th prime function, so KYq is the 4th prime, 7.

That Yq function (and its implementation) was a very nice suggestion of yours :-)

IK+ would work just as well for 7, but it's a bit too boring :P

C#, no usings, 234 bytes
new int()                       // 0
-~new int()                     // 1
-~-~new int()                   // 2
-~-~-~new int()                 // 3
-~-~-~-~new int()               // 4
-~-~-~-~-~new int()             // 5
-~-~-~-~-~-~new int()           // 6
-~-~-~-~-~-~-~new int()         // 7
-~-~-~-~-~-~-~-~new int()       // 8
(int)System.ConsoleKey.Tab      // 9
(int)System.TypeCode.UInt32     // 10
(int)System.ConsoleKey.Print    // 42

This is much more boring than I initially thought it was going to be. I had pretty varied ideas, such as new[]{true}.Length and true.GetHashCode() and typeof(int).Name.Length and uint.MinValue etc., but new int() beat them all.

Would the rules allow you to do something like var a = new int(); and then use a in each snippet?

@LoganDam: I find it more interesting if every expression has to stand on its own. That’s also why I didn’t use any using declarations.

Whoa what are those for 9/10/42 :Oo

@ev3commander: They are simply the shortest-named enum values defined in mscorlib that have the necessary integer value. For ConsoleKey.Tab, the value 9 is not surprising (9 is also the ASCII of the tab character). The others are probably arbitrary.

Shorter one for 8: int a=-~-~new int();a<<a

@LegionMammal978: Nice! However, you can’t use that inside an expression, so I’m not sure I’d count it...

PHP, 157 145 91 bytes
First time posting on Code Golf, figured I'd give it a shot. I'll get better eventually :P If you see any obvious (to you) spots where I could save characters, let me know.
EDIT: Realized I didn't need the semicolons, since these are just snippets.
EDIT2: Thanks to Blackhole for many suggestions!
LC_ALL
DNS_A
~~M_E
~~M_PI
LOCK_NB
LC_TIME
LOG_INFO
INI_ALL
IMG_WBMP
SQL_DATE
SQL_TIME
LOG_INFO*INI_ALL

PHP has a lot of extensions, and therefore a lot of predefined constants far better than the mathematical ones for this challenge ;). LC_ALL for 0 (-1 byte), DNS_A for 1 (-3 bytes), LOCK_NB for 4 (-3 bytes), LC_TIME for 5 (-7 bytes), LOG_INFO for 6 (-8 bytes), INI_ALL for 7 (-5 bytes), …

… IMG_WBMP for 8 (-4 bytes), SQL_DATE for 9 (-9 bytes), SQL_TIME for 10 (-3 bytes) and LOG_INFO*INI_ALL for 42 (-11 bytes). Hence a total of 51 bytes saved! These constants are valid at least in PHP 5.6.1 on Windows.

@Blackhole isn't LC_ALL a locale dependent thing?

@cat It's indeed a constant used with setlocale() to change all the categories of locales. But the value of the constant itself is of course independent of the locale :).

@Blackhole ah, i see!

@Blackhole: Sorry, I was inactive for a couple days. Thanks for the help!

PowerShell, 147 bytes
These use + to implicitly cast things to integers. The later numbers use Enums from the .Net Framework unerpinnings of PowerShell which happen to have the right values.
+$a                          #0, 3 bytes (unset vars are $null, +$null == 0)
+$?                          #1, 3 bytes (bool previous result, default $true, +$true == 1)
$?+$?                        #2, 5 bytes (same as #1, twice)
$?+$?+$?                     #3, 8 bytes (beats [Int][Math]::E)
$?+$?-shl$?                  #4, 11 bytes (-shl is shift-left)
$?+$?+$?+$?+$?               #5, 14 bytes
$?+$?+$?-shl$?               #6, 14 bytes (enum value, + casts to integer)
+[TypeCode]::Int16           #7, 18 bytes
$?+$?-shl$?+$?               #8, 14 bytes
+[consolekey]::tab           #9, 18 bytes
+[TypeCode]::UInt32          #10, 19 bytes
+[consolekey]::Print         #42, 20 bytes

#Total:                      147 bytes

-~-~-~ used in JavaScript, C# and PHP answers would be - -bnot - -bnot - -bnot in PowerShell.
x^y exponentiation used in Perl answers, or x**y in Python or JavaScript ES7, would be [Math]::Pow($x,$y)
constants e and Pi are the character-heavy [Math]::E and [Math]::PI

x^y is xor in JavaScript. JavaScript (ES7) has ** for exponents. Source

@mbomb007 Ah, thanks - I've updated my note on that.

@mbomb007 I still think that's kind of silly

@SuperJedi224 Why? That's how Python does it. And xor is an important operator.

Python 2, 191 159 158 157 156 149 146 bytes
My first submission ever, I hope I got everything right !
Based on the time I spent on this, I guess there's surely a better one for a few of them.
# 0 | Bytes : 5
int()

# 1 | Bytes : 5
+True

# 2 | Bytes : 6
-~True

# 3 | Bytes : 8
-~-~True

# 4 | Bytes : 10
-~-~-~True

# 5 | Bytes : 12
-~-~-~-~True

# 6 | Bytes : 14
-~-~-~-~-~True

# 7 | Bytes : 16
-~-~-~-~-~-~True

# 8 | Bytes : 15
a=True;a<<a+a+a

# 9 | Bytes : 19
a=True;(a<<a+a+a)+a

# 10 | Bytes : 20
int(`+True`+`int()`)

# 42 | Bytes : 16
~-len(`license`)
# Especially proud of this one !

Total byte count: 146

Many thanks to FryAmTheEggman !

Welcome to PPCG :) I'm not 100% sure about this challenge but I think using True as an idiom for 1 should be acceptable, as I don't know when they aren't equivalent as snippets.

Oh, you're right ! Not using it for the 1 itself, because True is not 1 but for all the computation based on 1, it helps ! Editing now.

Use #8 len(\id(id)`)`. Then 8, 9, and 10 will be shorter. Also, maybe add a hyperlink to Try it online.

You can get 9 with len(`{()}`) for 11 bytes, and that gives you 7 through 10 shorter.

DC, 35 bytes
K
KZ
IZ
Iv
EI-
FI-
IZd*
IIZ/
Ivd+
IIv-
IIZ-
IKZ-
I
EdE++

To test the snippets append a f to print the stack and pass that string to dc:
$ echo 'EdE++f' | dc
42

I believe that E and F here are digits (even when they are greater than the input radix).  Evidence for this is that they combine as digits; e.g. F0 -> 150.  You can see the same behaviour with decimal digits once you change input and output radix.

There are lots of other answers using similar stuff... why should I be the only one where this is not ok?

You shouldn't - if there are other solutions using digits, then they aren't valid answers either.

I don't care any more! Codegolf even accepts a graphic mandelbrot set program as solution to the task to write an ascii art mandelbrot program... codegolf needs a big reset and when restarted I may or may not care about rules again... :-Þ

TI-BASIC, 41 bytes
0~10:
X
cosh(X
int(e
int(π
-int(-π
int(√(π³
int(π+π
int(e²
int(eπ
int(π²
Xmax

42:
int(π²/ecosh(π

In TI-BASIC, all uninitialized single-letter variables start at 0, and Xmax (the right window boundary of the graph screen) starts at 10.
The mathematical constant π is one byte, but e is two bytes.

Isn't π considered numeric data?

@vsz perhaps, but it isn't a number literal. The op even says so.

@NBZ very good point. My bad.

Python 2, 306 275 274 bytes
I used the fact that for any x (integer and not 0) the expression x/x equals 1 and played around with some bitwise operations.
I adjusted the snippets such that they still meet the requirements (thanks @nimi this saved me 24 bytes), but you have to manually test them. Here is the code and individual byte counts:
zero.py Bytes: 7
len({})
--------------------------
one.py  Bytes: 12
r=id(id)
r/r
--------------------------
two.py  Bytes: 17
r=id(id)
-(~r/r)
--------------------------
three.py    Bytes: 20
r=id(id)
-(~r/r)|r/r
--------------------------
four.py Bytes: 20
r=~id(id)/id(id)
r*r
--------------------------
five.py Bytes: 26
r=~id(id)/id(id)
(r*r)|r/r
--------------------------
six.py  Bytes: 25
r=~id(id)/id(id)
(r*r)|-r
--------------------------
seven.py    Bytes: 27
r=~id(id)/id(id)
-~(r*r|-r)
--------------------------
eight.py    Bytes: 24
r=-(~id(id)/id(id))
r<<r
--------------------------
nine.py Bytes: 29
r=-(~id(id)/id(id))
r-~(r<<r)
--------------------------
ten.py  Bytes: 31
r=~id(id)/id(id)
-r*((r*r)|r/r)
--------------------------
answer.py   Bytes: 37
r=-(~id(id)/id(id))
(r<<r*r)|(r<<r)|r
--------------------------
Total byte count: 274

You can save bytes with i=id(id);r=~i/i

Math++, 92 bytes total
0 (1 bytes): a
1 (2 bytes):!a
2 (3 bytes):_$e
3 (4 bytes): _$pi
4 (7 bytes): _$e+_$e
5 (8 bytes): _($e+$e)
6 (9 bytes): _$pi+_$pi
7 (8 bytes): _($e*$e)
8 (9 bytes): _($e*$pi)
9 (10 bytes): _($pi*$pi)
10 (12 bytes): _$e*_($e+$e)
42 (19 bytes): _($pi+$pi)*_($e*$e)

Javascript (Browser Env), 155 136 130 bytes
+[]
-~[]
-~-~[]
-~-~-~[]
-~-~-~-~[]
-~-~-~-~-~[]
-~-~-~[]<<-~[]
-~-~-~-~-~-~-~[]
-~[]<<-~-~-~[]
~(~[]+[]+-[])
-~[]+[]+-[]
-~(top+top.s).length // Requires browser environment

Thanks to:
@Ismael Miguel: 155 -> 136 -> 130 bytes

You can use -~[]+[]+-[] to produce 10. It will return a string, but it's still usable as a number. Also, you can use -~(top+top.s).length to calculate 42 (-8 bytes) and drop your dependency on Google Chrome. To save more 3 bytes, use (P=Math.PI)*P>>+[] to calculate 9.

Sorry, forgot a few bytes you can shave. You can use ~(~[]+[]+-[]) to generate 9. That should cut down a few more bytes.

curiously, +[12] gives 12 and +[1, 2] gives NaN. I hate JS

@cat It's because of JavaScript's weird cast system. Arrays cast to strings like [1,2,3] => "1,2,3" and strings cast to numbers like "12" => 12 but if there are non-number characters in the string the cast returns NaN. +[1,2] casts to a string then a number but the string contains a comma so "1,2" becomes NaN.

@user81655 that. is. HORRID.

Seriously, 39 33 bytes
Stuff in parentheses is explanations:
 (single space, pushes size of stack, which is 0 at program start)
 u (space pushes 0, u adds 1 (1))
 ⌐ (space pushes 0, ⌐ adds 2 (2))
 u⌐ (space pushes 0, u adds 1 (1), ⌐ adds 2 (3))
 ⌐⌐ (space pushes 0, ⌐⌐ adds 2 twice (4))
 ⌐P (space pushes 0, ⌐ adds 2 (2), P pushes the 2nd prime (5))
Hl▓ (H pushes "Hello, World!", l pushes length (13), ▓ pushes pi(13) (6))
QlP (Q pushes "QlP", l pushes length (3), P pushes the 3rd prime (7))
Ql╙ (Q pushes "QlP", l pushes length (3), ╙ pushes 2**3 (8))
úl▓ (ú pushes the lowercase English alphabet, l pushes length (26), ▓ pushes pi(26) (9))
 u╤ (space pushes 0, u adds 1 (1), ╤ pushes 10**1 (10))
HlPD (H pushes "Hello, World!", l pushes length (13), P pushes the 13th prime (43), D subtracts 1 (42))

Hexdumps of programs:
20
2075
20a9
2075a9
20a9a9
20a950
486cb2
516c50
516cd3
a36cb2
2075d1
486c5044

Thanks to quintopia for 6 bytes!

I suppose Seriously uses a 256 char codepage that includes pseudo graphic chars?

@NBZ CP437

You can save a byte on 6 with Hl▓

The same idea with ú saves a byte on 9

HlPD saves 2 bytes on 42, and QlP saves a byte on 7, and Qlª saves a byte on 9, and Ql╙ saves a byte on 8. I think that gets Seriously down to 33 bytes all told, tying Pyth.

dc, 42 bytes
K
zz
OZ
zzz+
OZd*
OdZ/
zzzz*
Ozz+-
OdZ-
Oz-
O
Od+dz++

Results
0
1
2
3
4
5
6
7
8
9
10
42

There aren't many ways to generate new numbers with dc.  I use O: output base, initially 10; K: precision, initially 0; z stack depth, initially 0; Z significant digits of operand.  We combine these with the usual arithmetic operators.
Test program
#!/bin/bash

progs=(                                         \
    "K"                                         \
    "zz"                                        \
    "OZ"                                        \
    "zzz+"                                      \
    "OZd*"                                      \
    "OdZ/"                                      \
    "zzzz*"                                     \
    "Ozz+-"                                     \
    "OdZ-"                                      \
    "Oz-"                                       \
    "O"                                         \
    "Od+dz++"                                   \
)

a=0
results=()
for i in "${progs[@]}"
do
    results+=($(dc -e "${i}p"))
    (( a+=${#i} ))
done

echo "#dc, $a bytes"
echo
printf '    %s\n' "${progs[@]}"
echo
echo '##Results'
echo
printf '    %s\n' "${results[@]}"

MS Excel formulas, 163 151 150 143 bytes
Not exactly a programming language, but here it goes...
0:  -Z9                         (03 bytes)
1:  N(TRUE)                     (07 bytes)
2:  TYPE(T(Z9))                 (11 bytes)
3:  TRUNC(PI())                 (11 bytes)
4:  TYPE(TRUE)                  (10 bytes)
5:  ODD(PI())                   (09 bytes)
6:  FACT(PI())                  (10 bytes)
7:  ODD(PI()+PI())              (14 bytes)
8:  EVEN(PI()+PI())             (15 bytes)
9:  TRUNC(PI()*PI())            (16 bytes)
10: EVEN(PI()*PI())             (15 bytes)
42: EVEN(CODE(-PI())-PI())      (22 bytes)

PI() is used in most cases as it is the shorter way (that I am aware of) to introduce a numeric value without using a number or string literal. N converts various things (incl. booleans) to numbers, and T converts various things to text. TYPE returns 2 for a text argument and 4 for a boolean argument. TRUNC discards fractional part (i.e. rounds positive numbers down), EVEN rounds up to the next even number, and ODD rounds up to the next odd number. CODE(-PI()) is the ASCII code of the first character of the conversion to text of -π, i.e. 45 (for "-").
EDIT: Removed equal signs from the byte count (-12!) - as pointed out by Nᴮᶻ in the comments, they are not supposed to be included.
EDIT 2: Assuming the rest of the worksheet is empty, it is possible to use a reference to an empty cell as zero (again, suggested by Nᴮᶻ) provided that we include a minus sign (or use it in other numeric expression) to resolve type ambiguity.

0=Z9

Removed the =s, thanks. Regarding your suggestion, I avoided cell references on purpose, to make sure the formulas are independent of table contents - if Z9 contains a text, =Z9 won't return zero anymore. I decided not to assume anything about the table.

anyway, you made me loot at it again, and I realized I could at least save 1 byte by using to 0 the same logic that I used to 1...

But some languages have all variables set to 0 if they are not set to something else. In this context, I would see Excel as a language with (theoretically infinite) memory cells A1:ZZZ..:999... and no distinction between program code and data (i.e. may be self-modifying). Since each snippet is independent of the others, I assume it is in A1, and the rest of the sheet it blank. (For programs, I would have one whole statement in each cell A1, A2, etc.)

I see your point... but there is a further problem with cell references: Z9 on an empty sheet is an empty value that is converted to 0 in many cases, but may be converted to "" (empty string) if used in some expressions - much like a VBA uninitialized Variant - so it is not strictly equivalent to 0. For example, = 0&"a"  is evaluated to "0a" but = Z9&"a" evaluates to "a". This can be solved, however by adding an unary - to the reference (thus forcing it to be numeric - again, just like in VBA). So -Z9 can be used as zero. I've just updated the answer. Thanks again.

42=ROW(Z42)

Hahahahah now this looks like cheating...

How is that any more cheating than 9=9:_ in J?

And the default is numeric (evidenced by Excel right-justifying the 0 of =Z9), so you really don't need the -.

I suppose it isn't, but for me it would spoil the fun (much like using all those constants in VBA) - I could post something like that in a separate answer (like I did with VBA), but I don't feel like doing it... About the minus sign, it just wont work inside any formula, so I think it's better with the -... Think of these as self-imposed constraints!

INT() is shorter than TRUNC()

TRUE+TRUE for 2

Japt, 34 33 30 bytes
1 byte saved thanks to @ThomasKwa
T
°T
C-A
D-A
E-A
F-A
G-A
°G-A
Iq
´A
A
H+A

Here's what each of the different chars means:
T    0
A    10
B    11
C    12
D    13
E    14
F    15
G    16
H    32
I    64
q    sqrt on numbers
°    ++
´    --

Does Japt take hexadecimal numbers by default? If so, then A through F would be numeric literals...

@NBZ A-I are variables that are, by default, assigned to various numbers, as shown above. A-F are assigned to 10-15. Does this invalidate those variables?

No. I was just wondering if, say 12AB3 was valid. Now I know it isn't. No literals here, move along. :-)

Mathematica, 101 bytes
a-a
a/a
⌊E⌋
⌈E⌉
⌈π⌉
⌊E+E⌋
⌈E+E⌉
⌊E*E⌋
⌈E*E⌉
⌈E*π⌉
⌈π*π⌉
⌊π*π^π/E⌋

I'm pretty sure some of these are suboptimal. Those rounding brackets are really expensive.
For consistency, the first two could also be E-E and E/E of course, but I thought it's quite nifty to get 0 and 1 from a computation with undefined variables.

@NBZ Sorry, forgot about 0. If a gets the value 0 afterwards, that's not an issue, as long as it's unused when a/a is evaluated.

@NBZ The byte count is simply the UTF-8 byte count.

Dyalog APL, 59 52 bytes
-7 bytes by @NBZ
I wasn't about to let one of @NBZ's questions go without an APL answer!
⍴⍬            0
⎕IO           1
⍴⎕SD          2
⎕WX           3
⍴⎕AI          4
⌈⍟⎕PW         5
⌊⍟⎕FR         6
⍴⎕TS          7
+⍨⍴⎕AI        8
⌊○○⎕IO        9; floor(pi^2 times ⎕IO)
⍴⎕D           10
⍎⌽⍕⌈*○≢#    42

In the last snippet, by NBZ, ≢# equals 1. ceil(e^(pi*1)) is calculated as 24, whose digits are then swapped.
Constants used:

⍬, is the empty numeric one-dimensional vector. Therefore, its shape ⍴⍬ is 0.
# is a special vector of length 1.
⎕IO (index origin) starts at 1.
⎕AV, the character set, is of length 256.
⎕PW, the print width, is 79 characters.
⎕WX, window expose (whatever that is) is 3.
⎕FR, the float representation, is 645. I have no idea what this is either.
⎕D, "digits", is '0123456789'.
⎕TS, timestamp, has seven elements: Year, month, day, hr, min, sec, ms.
⎕SD, screen dimensions, has two elements: width and height.
⎕AI, account info, has four elements. I don't know what they are.

Finally ;-) But you can do way better than that if you use full-fledged Dyalog APL. If you don't have one, it is easy to get.

I already had Dyalog, but I didn't know there were so many system constants!

⎕WX is a similar to ⎕ML; it controls the level of reserved-ness for names that are properties etc. of GUI objects. ⎕FR switches floats between 64 and 128 bit representation. ⎕AI is (UserName, CPUtime, SessionLength, KeyingTime.

Better, but you are forgetting to think arrays! E.g. 0 and 1 can each be written with only two chars...

0=⍴⍬ 1=≢# 2=⍴⍬⍬ ... 42=⍎⌽⍕⌈*○≢#

I would upvote, but @lirtosiast hasn't updated to use Nᴮᶻ's suggestions.

I agree with everything except ⎕PW which is not a constant with a fixed default. I believe in recent versions of Dyalog APL, it defaults to "as wide as your session is" (and it also tracks the width of the session), and so it depends on unpredictable external factors. Also I'd be wary of blindly using ⎕WX given that that also has a default that has changed over the years, if my memory serves me well.

Marbelous, 98 bytes
Not terribly exciting, it relies on the ?n devices which turn any marble into a random value in the range 0..n (inclusive) a side effect of this is that ?0 turns any marble into a 0 regardless of input. I think the use of literals is permitted because the value does not affect the outcome and there is no other way to call a function once in Marbelous.
0:
00  # A hexadicemal literal: value 0
?0  # Turn any marble into a random value from the range 0..0 (inclusive)

1:
00
?0
+1  # increment by one

...
9:
00
?0
+9

10:
00
?0
+A  # increment by 10

42:
00
?0
+L  # increment by 21
+L

It sure looks like 0...L are numeric literals.

@NBZ They're not, you can't use them independently. +0 through +Z are like builtin functions. It's boring but valid.

DUP, 68 bytes
[
 [
  [
[)]!
[ )]!
[  )]!
[)~_]!
[ )~_]!
[  )~_]!
[   )~_]!
[)$+]!
[ )$+~_$+]!

Try it here.
There are a LOT of ways to do this, but I'm abusing the return stack for this one.
Explanation
To fully figure this out, you need to understand DUP's behavior regarding lambdas. Instead of pushing the lambda itself to the stack, it actually pushes the current IP to the stack when the lambda is detected. That can explain the first 3 snippets, which involve lambdas.
The next snippets use the return stack. When ! is executed, the current IP is pushed to the return stack, and the top of the stack is set as the new IP to start lambda execution. ) pops a number from the return stack onto the data stack.
That's pretty much enough to explain the rest of the snippets. If you still don't get it, keep in mind that the Step button is quite handy!

><>, 86 bytes

0: ln;
1: lln;
2: llln;
3: lll+n;
4: lll:+n;
5: llll+n;
6: llll++n; or llll:+n;
7: lllll+n;
8: lllll:+n;
9: lllll++n; or llllll+n;
10: llll+:+n; or lll:l+*n;
42: llll*ll+*n;

Relies on stack size to get its literals.

You can probably remove the n on each because functions in stack-based languages can leave the output on the stack for -11 bytes.

@redstarcoder then I could even remove the ; for a total of 22 bytes and consider the end of the function reached at the end of the line, but it's a little ambiguous since ><> doesn't have out-of-the-box functions.

Technically if you want functions in ><>, your functions have to accept a return position (x & y) on the stack in addition to their parameters, make sure these aren't in the way while doing calculations ([ comes in handy in that context), then jump to the return position after having finished execution. I had done a POC a while ago, check it out if you're interested

I've actually seen your post before, and good work! I did a meta post about the ambiguities of functions. What I'm saying is this is typically allowed, with the ;. The reason I say to leave in ; is because otherwise there's no way of denoting when the function ends without a .. Most people seem to consider this fair but I could try to write a specific meta post here if you're concerned.

Sorry, the linked post is still relevant, but this is where I was talking about writing an answer to clear up potential ambiguities: http://meta.codegolf.stackexchange.com/questions/8737/what-even-is-a-function-by-our-standards

@redstarcoder thanks for the info ! I feel like suffixing the ><> snippets by . would be the best way to stick to the definition of function as described in the most upvoted answer of the meta post, however I agree ; is a good alternative which requires less explanation.

@redstarcoder nevermind using ., I just remembered it requires additional code to get the RET position on top of the stack. ; feels fair, but it also feels incorrect as per the definition of a function :-/ I'll see if I can make up my mind about it, and if I do I'll probably comment on the meta post you linked.

05AB1E, 40 38 24 bytes
¾
X
Y
XÌ
Y·
T;
T;>
T;Ì
TÍ
T<
T
žwT+

Push counter_variable
Push 1
Push 2
Push 1+2
Push 2*2
Push 10/2
Push (10/2)+1
Push (10/2)+2
Push 10-2
Push 10-1
Push 10
Push 32, 10, add

Y· is more stack-clean than Yx, X can be used instead of º here (it defaults to 1, º means len(stack)>1, so it does not default to anything). Also, your bytecount is 24, not 35 (CP-1252, newlines do not count if they are separate snippets).

I know it wasn't possible yet at the time you posted this, but 6 can be ₆t now (push 36, square-root) to save a byte (Try it online).

Pyth, 35 34 33 bytes
-1 byte by @Mimarik
There are a number of possibilities for some programs.
0, 1 byte
Z

1, 2 bytes
hZ
!Z

2, 3 bytes
hhZ
eCG
eCd
lyd
lyb
lyN

3, 3 bytes
l`d

4, 3 bytes
l`b
eCN

5, 4 bytes
hl`b
telG

6, 3 bytes
elG

7, 4 bytes
tttT
helG

8, 3 bytes
ttT

9, 2 bytes
tT

10, 1 byte
T

42, 4 bytes
yhyT

All of these involve either basic double (y), +1 (h) and -1 (t) commands, or l (length of a string). The Z variable is initialized to zero.
For 5, b is initialized to a newline character. Backtick gives "\n" (including the quotes, and the length of that string is 4.
Try them here!

User Mimarik suggested saving a byte on 42 with yhyT. (I rejected the edit as per http://meta.codegolf.stackexchange.com/questions/1615/suggested-edits-reject-golfing/1619#1619)

R, 123 bytes
+!pi                #  0  -   4 bytes
+TRUE               #  1  -   5 bytes
nchar(NA)           #  2  -   9 bytes
floor(pi)           #  3  -   9 bytes
cars$d[pi]          #  4  -  10 bytes
ncol(CO2)           #  5  -   9 bytes
nrow(BOD)           #  6  -   9 bytes
cars$s[pi]          #  7  -  10 bytes
sum(dim(BOD))       #  8  -  13 bytes
floor(pi*pi)        #  9  -  12 bytes
ceiling(pi*pi)      # 10  -  14 bytes
nrow(CO2)/nchar(NA) # 42  -  19 bytes
                    # Total 123 bytes

R, 166 165 bytes
I made a PI based answer
pi-pi                         # 0
pi/pi                         # 1
(pi+pi)/pi                    # 2
floor(pi)                     # 3
ceiling(pi)                   # 4
ceiling(pi)+pi/pi             # 5
floor(pi+pi)                  # 6
ceiling(pi+pi)                # 7
floor(pi*pi)-pi/pi            # 8
floor(pi*pi)                  # 9
ceiling(pi*pi)                # 10
ceiling(pi^pi+pi+sqrt(pi))    # 42

80386 machine code, 73 bytes
Hexdump:
33 c0
33 c0 40
33 c0 40 40
33 c0 40 40 40
33 c0 40 40 40 40
33 c0 40 8d 04 80
33 c0 40 8d 04 80 40
33 c0 40 8d 04 80 40 40
33 c0 40 8d 04 c0 48
33 c0 40 8d 04 c0
33 c0 40 8d 04 c0 40
33 c0 40 8d 04 c0 8d 04 80 48 48 48

The snippets calculate the required value in the eax register, suitable as a return value from a function.
I used various combinations of the following instructions:
xor eax, eax         (33 c0)    eax = 0
inc eax              (40)       eax = eax + 1
dec eax              (48)       eax = eax - 1
lea eax, [eax+eax*4] (8d 04 80) eax = eax * 5
lea eax, [eax+eax*8] (8d 04 c0) eax = eax * 9

The numbers here are too small to use all the possibilities of the instruction set - the only noteworthy thing here is the easy multiplication by 5 and 9. For example, here is a 13-byte snippet whose result is 2016:
33 c0      xor eax, eax             eax = 0
40         inc eax                  eax = 1
8d 0c c0   lea ecx, [eax+eax*8]     ecx = 9
8d 04 89   lea eax, [ecx+ecx*4]     eax = 45
f7 e0      mul eax                  eax = 2025
2b c1      sub eax, ecx             eax = 2016

Visual Basic for Applications, 68 bytes
VBA has a lot of builtin constants and public enums. I opted not to use any external or MS Office-specific library - only base VBA:
-x                     '=0  (2 bytes)
x^x                    '=1  (3 bytes)
vbGet                  '=2  (5 bytes)
vbLong                 '=3  (6 bytes)
vbLet                  '=4  (5 bytes)
vbDouble               '=5  (8 bytes)
vbYes                  '=6  (5 bytes)
vbNo                   '=7  (4 bytes)
vbSet                  '=8  (5 bytes)
vbObject               '=9  (8 bytes)
vbError                '=10 (7 bytes)
vbKeyPrint             '=42 (10 bytes)

Total = 68 bytes. Notice that by default, undeclared variables (such as x above) are all set to blank Variants, that may be interpreted, depending on context, as 0 or as an empty string. However, both operators - and ^ force it to be numeric. Also, in VBA, 0^0 is evaluated to 1 (instead of generating an error as one might expect). I'll also post an answer without constants.

Interesting choice. Maybe try Excel too?

Just did it! Thanks.

Jelly, 31
<blank>
‘
‘‘
‘‘‘
‘‘²
‘‘²‘
‘‘‘Ḥ
⁴H’
⁴H
‘‘‘²
⁵
⁴Ḥ⁵+

Explanation
0: Outputs 0 by default

Increment
Increment twice
Increment thrice
Increment twice and square
Increment twice, square, and increment
Increment thrice and double
Halve sixteen and decrement
Halve sixteen
Increment thrice and square
Ten

42: Double sixteen and add ten

I thought Jelly could do better. Are there no constants for 1 - 10?

@Nᴮᶻ No. It only has constants for 256, 16, 10, space, and newline.

You may want to add that the empty program produces 0.

Haskell, 212 210 198 196 190 187 134 bytes
Edit: After reading in the FAQ that using pi is allowed, throwing everything away and doing it all using pionly saves a lot of bytes.
pi-pi                     -- 0.0,  5 bytes
pi/pi                     -- 1.0,  5 bytes
succ$pi/pi                -- 2.0, 10 bytes
floor pi                  --   3,  8 bytes
ceiling pi                --   4, 10 bytes
succ.ceiling$pi           --   5, 15 bytes
floor$pi+pi               --   6, 11 bytes
ceiling$pi+pi             --   7, 13 bytes
pred.floor$pi*pi          --   8, 16 bytes
floor$pi*pi               --   9, 11 bytes
round$pi*pi               --  10, 11 bytes
floor$pi**pi+pi+pi        --  42, 18 bytes

However, I still like the old approach more as using a number to generate other numbers feels a bit like cheating.
sum[]                     --  0,  5 bytes
length[LT]                --  1, 10 bytes
fromEnum GT               --  2, 11 bytes
length[LT ..]             --  3, 13 bytes
length$show[()]           --  4, 15 bytes
length.show$False         --  5, 17 bytes
length$show[True]         --  6, 17 bytes
length.show$Left()        --  7, 18 bytes
length.show$Right()       --  8, 19 bytes
length$show[Just[]]       --  9, 19 bytes
length$show[LT ..]        -- 10, 18 bytes
fromEnum.succ.last$show() -- 42, 25 bytes

LT,EQ and GT are the values of the Ordering Type. As Ordering is an instance of Enum, fromEnum GT yields 2 and [LT ..] creates the list [LT,EQ,GT]. show converts all instances of the Show type class to strings.
Bonus:
42 in 42 bytes: length.show$Just$[LT ..]>>[EQ,GT]>>[GT,LT]
How long is nothing? length Nothing
Saved 3 bytes thanks to nimi and 3 bytes thanks to xnor.

Save two bytes with 6: length$show[True]. 10: length$show[LT ..].

42: fromEnum$succ$last$show().

sum[] gets you 0

PHP, 38 37 bytes
Note: uses IBM-850 encoding.
+_          #0
+~╬         #1
+~═         #2
+~╠         #3
+~╦         #4
+~╩         #5
+~╔         #6
+~╚         #7
+~Ã         #8
+~ã         #9
+~╬¤        #10
+~╦═        #42

Explanation
Undefined constants in PHP have their name as default value. The resulting string is then negated to result in "0", "42" etc. Finally, it's converted to integer using the leading +.
Tweaks

Saved a byte by exploiting the fact that converting any string results in 0 when converted to int, except when it matches /^[0-9.]+/

D1ffe7e45e, 112
0
02
020
0202
02020
020202
0202020
02020202
020202020
0202020202
02020202020
202020202020202020202020202020202020202020

Each line is a different snippet.
The numbers in the program don't count as number literals since they're only used as commands.
The final one can definitely be golfed more.
EDIT: I got the interpreter working and all snippets work. If you'd like to test if yourself, add 0f0f to the end of the snippet so the program terminates.

Those sure look like literals to me. Also, don't post code that you haven't tested.

Can you explain how they work?

@NBZ D1ffe7e45e works based on the difference between two hexadecimal numbers. That difference is then interpreted into a command. For example, the difference between 0 and 2 is 2, which is interpreted as the increment command (like + in Brainf**k). I thought that since they're being used as commands and not number literals it still counted. I'll delete the answer if it doesn't.

@Mego I got the interpreter working and my code works. See the above comment for why I think they're not literals.

I don't think any of these are literals. However, I don't think you should print the numbers, since the result of each snippet must result in an actual number that can be used for further calculations.

@Dennis Since the number is stored in the cells, should I just remove the command to print the numbers?

@Dennis OK. Also, D1ffe7e45e assumes there is a 0 at the start of each program. Can I remove the 0s from the start of my snippets?

I don't know. I think you should ask the OP.

O, 36 bytes

l
Nl
CA-
DA-
EA-
FA-
FA-)
A(((
A((
A(
A
A.+.+))

Mostly finding the difference of hex letters,
CA- = 13-11 = 2
DA- = 14-10 = 3
( and ) decrement and increment respectively,
A(( = 10-1-1 = 8
.+ duplicates the top of the stack and adds it together
A.+.+))
10.+.+))
20.+))
40))
42

The first two get the length of the stack (l), which zero, or one when a blank CodeBlock is pushed to the stack (N).

Could you may explain what happens here?

@NBZ voila, good sir

If A through F are hex values, are they not numeric literals then?

Pyth, 50 40 bytes
Z
hZ
hhZ
hhhZ
hhhhZ
hhhhhZ
ttttT
tttT
ttT
tT
T
yhyT

In Pyth, Z=0 and T=10. h is head, which means the next variable + 1. (e.g. hhZ == 2). t is tail, which means the next variable - 1 (e.g. tttT == 7). The last line is the fanciest: we essentially do double(1 + double(10)).
Try it out here!
Thomas Kwa has golfed a superior solution.

I would suggest 1) adding an explanation for what these do, and 2) adding a link to your code in the Pyth online interpreter, like so.

y can be used to double the value of a number, for example, you can get 42 with yhyT which is like double(add_one(double(ten)))

The loop is completely useless. Aside from the solution yhyT you could simply do hh*ThhhhZ.

Javascript, 159 chars
No any variables
Any line between ` is a code snippet. The whole code is a test. It returns an array [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 42]. If returning string "42" instead of number 42 is ok, code can be made 3 schars less (remove |[]).
`
+[]
-~[]
!![]+!![]
~~Math.PI
-~Math.PI
-~Math.PI|!![]
Math.PI<<!![]
Math.PI<<!![]|!![]
!![]<<Math.PI
Math.PI*Math.PI^[]
(-~Math.PI|!![])<<!![]
-~Math.PI+[]+(!![]+!![])|[]
`.split('\n').filter(Boolean).map(eval)

k4, 41 bytes
Most of this is a cheap hack—every builtin function in k has an internal id number, and . retrieves them. Entries of the form .(x) are implemented thus; others are commented.
A question: are we supposed to generate the numbers or print them? E.g., for zero, should we return some numeric type containing zero as a value, or should we display the exact string 0? I ask because in there are several default settings that could be useful here, but they all have (32-bit) integer type, which means that in recent (3.x) versions of q/k4, they are displayed on the console with a type suffix of i appended. The following assumes 0i is a valid form of 0, but has alternatives in the comments.
\p     /  0: the default network port (none); alternatively, #(), the count of the empty list
#`     /  1: the count of a null symbol atom; alternatively, if this is considered a character literal, use .(+)
\W     /  2: the default starting day of the week (monday), counting from saturday as 0; alternatively, .(-)
.(*)   /  3
.(%)   /  4
#!`    /  5: the number of namespaces loaded by default (works in 3.2 or 3.3; in earlier versions, use this as 4 and .(&) as 5)
.(|)   /  6
\P     /  7: the default numeric precision (7 significant figures); alternatively, #.j, the count of the .j namespace; alternatively, .(^)
.(=)   /  8
.(<)   /  9
.(>)   / 10
.(var) / 42

you're just meant to push the numbers for use, you needn't print them.

Ah. The \x forms may still be invalid for a different reason then: for technical reasons, you can't actually use their return value for anything—to do that, you have to use a different form, ."\\x" (which wouldn't be any use here as it's six characters long).

C, 202 bytes
enum{a}; // 0, 8

enum{a,b}; // 1, 10

enum{a,b,c}; // 2, 12

enum{a,b,c,d}; // 3, 14

enum{a,b,c,d,e}; // 4, 16

enum{a,b,c,d,e,f}; // 5, 18

enum{a,b,c,d};c*d; // 6, 18

enum{a,b,c,d,e};d+e; // 7, 20

enum{a,b,c};c<<c; // 8, 17

enum{a,b,c};b+(c<<c); //  9, 21

enum{a,b,c};c+(c<<c); // 10, 21

enum{a,b,c,d,e,f};c*f*e+c; // 42, 26

Printed Version, 730 bytes
enum{a,b,c,d,e};char m[d]={(d<<e)+a,a};main(){printf(m);} // 0, 57

enum{a,b,c,d,e};char m[d]={(d<<e)+b,a};main(){printf(m);} // 1, 57

enum{a,b,c,d,e};char m[d]={(d<<e)+c,a};main(){printf(m);} // 2, 57

enum{a,b,c,d,e};char m[d]={(d<<e)+d,a};main(){printf(m);} // 3, 57

enum{a,b,c,d,e};char m[d]={(d<<e)+e,a};main(){printf(m);} // 4, 57

enum{a,b,c,d,e};char m[d]={(d<<e)+e+b,a};main(){printf(m);} // 5, 59

enum{a,b,c,d,e};char m[d]={(d<<e)+e+c,a};main(){printf(m);} // 6, 59

enum{a,b,c,d,e};char m[d]={(d<<e)+e+d,a};main(){printf(m);} // 7, 59

enum{a,b,c,d,e};char m[d]={(d<<e)+e+e,a};main(){printf(m);} // 8, 59

enum{a,b,c,d,e,f};char m[d]={(d<<e)+f+e,a};main(){printf(m);} // 9, 61

enum{a,b,c,d,e,f,g,h,i,j,k};char m[d]={k*d+h,k*k,a};main(){printf(m,k);} // 10, 72

enum{a,b,c,d,e,f,g,h,i,j,k};char m[d]={k*d+h,k*k,a};main(){printf(m,k*e+c);} // 42, 76

@NBZ fixed the byte counts, I also assume that I cannot print 4 and 2 to produce 42, it has to be the value 42

@KhaledAKhunaifer: You can do calculations inside enum{} like enum{z,o,t,e=t<<t} // e=8...

@yeti tip taken into account, also 3<<4 is 48 which is '0', useful to convert digits into ascii characters

, 36 bytes (12 chars)
Ḁ
ḁ
Ḃ
ḃ
Ḅ
ḅ
Ḇ
ḇ
Ḉ
ḉ
Ḋ
Ḫ

Try it here (test-suite-style, Firefox only).
There are variables for numbers from 0-256. (One of the benefits of choosing from UTF-8 is that you can dedicate a whole charset of 256 characters just to this kind of stuff. (Of course, byte count is a side effect.))

It's nice being on top, but assuming ESMin is eligible for winning, why isn't this accepted?

Look at the byte count. (If you're looking at the leaderboard, it's buggy for ESMin.)

Oh, yeah, I totally know how to read.

@ӍѲꝆΛҐӍΛПҒЦꝆ, I don't see a leaderboard in this question (though many a [tag:code-golf] question does have one). Am I missing something (like, perhaps, a userscript that adds a leaderboard to every [tag:code-golf] question that doesn't have one already)?

If you have the PPCG userscript, you will see the board.

J, 46 43 42 bytes
Thanks to Nᴮᶻ for the help and exploration!
%_         NB. Inverse of infinity
_.         NB. Indeterminate value, evaluates to 1
2:_
3:_
4:_
5:_
6:_
7:_
8:_
9:_
+~5:_      NB. verb magic
(7:*6:)_   NB. 7 * 6

Here are some other programs:
(number): (representation)
1:  *_             NB. signum of infinity                                          same bytes
1:  #a:            NB. The tally of the Ace/Empty box                              +1 byte
1:  1:_            NB. The constant function with infinity;                        +1 byte
2:  #_`_           NB. The tally of infinity gerund-ed with itself                 +1 byte
2:  #_,_           NB. (same)                                                      +1 byte
2:  #_;_           NB. (same)                                                      +1 byte
42: (*:+])6:_      NB. verb magic / 6 squared plus 6                               +1 byte
42: +:<.o.7:_      NB. double floor pi times 7                                     +1 byte
42: <.(#a.)%6:_    NB. Tally of alphabet (256) divided by 6 (6:_) floored (<.);    +3 bytes
42: a+*~(a=:6:_)   NB. 6 squared plus 6.                                           +4 bytes
42: (a=:6:_)+:*a   NB. 6 squared plus 6.                                           +4 bytes
42: #C.>.%:^@^2:_  NB. I'm not entirely sure how this works                        +5 bytes

That's really neat.

But then I'm using the literal 7 at the end.

@Nᴮᶻ Ah, nice! I was wondering how to use pi times!

If you found this challenge fun, you may want go submit a J answer here...

@Nᴮᶻ Thank you! I am doing that now! :D

6 squared plus 6: (*:+])6:_

#C.>.%:^@^2:_ (you can remove the @) is the count (42) of the permutations (0...41) of ceiling of e^e^2.

I actually had J in mind when I wrote *Note that the above rules may prevent some languages from participating, even if they are Turing complete.

in the OP!

Another alternative for 42: 7 squared minus 7 (*:-])7:_

I thought we can't use numbers? @Adám

@LeakyNun 7:_ is a function, which just happens to have a digit in its name. Here, it takes infinity (_) as argument, and returns seven. There is no function called 17:. Compare to TI-BASIC's 10^( which is a single-byte function with a funny name.

R, 100 bytes
Copied the solutions for 6 and 7 from @MiloChen here.
+F                   # | 0     | 2 bytes
+T                   # | 1     | 2 bytes
T+T                  # | 2     | 3 bytes
T+T+T                # | 3     | 5 bytes
T+T+T+T              # | 4     | 7 bytes
T+T+T+T+T            # | 5     | 9 bytes
nrow(BOD)            # | 6     | 9 bytes
cars$s[pi]           # | 7     | 10 bytes
cars$s[pi]+T         # | 8     | 12 bytes
(pi*pi)%/%T          # | 9     | 11 bytes
(pi*pi)%/%T+T        # | 10    | 13 bytes
(pi^pi+pi+pi)%/%T    # | 42    | 17 bytes
                     # | total | 100 bytes

This saves some bytes compared to the 123 and 165 solutions.

Perl 6, 84 81 bytes
+$           #  0
++$          #  1
-+^++$       #  2
-+^e         #  3
-+^π         #  4
1+-+^π       #  5
floor τ      #  6
-+^τ         #  7
floor e*π    #  8
floor π*π    #  9
-+^(τ+e)     # 10
-+^(e**e*e)  # 42

Constants used
> e
2.71828182845905
> π
3.14159265358979
> τ
6.28318530717959

An attempt at some explanation
#0: $ is an anonymous state variable, the + coerces it to a number, and
    by default its value is 0
#1: ++$ increases the state var by 1, giving us 1
#2: +^ as a prefix is the Integer bitwise negation operator, use that with ++$ (1) and we get -2, use - to negate it and give 2
#3:  Use +^ with e, which is coerced to Int, giving -3 which then gets negated with -
#4: Same as #3 but with π
#5: Same as #4 but add 1
I think the rest are easy to follow with the above bits explained.

Visual Basic for Applications, no named constants, 134 bytes
That's tougher:
-x                     '=0  (2 bytes)
x^x                    '=1  (3 bytes)
x^x+x^x                '=2  (7 bytes)
x^x+x^x+x^x            '=3  (11 bytes)
Len(Year(x))           '=4  (12 bytes)
Len(Year(x)&-x)        '=5  (15 bytes)
Day(x)Mod Month(x)     '=6  (18 bytes)
Len(Time())-x^x        '=7  (15 bytes)
Len(Time())            '=8  (11 bytes)
Len(Time()&-x)         '=9  (14 bytes)
Len(Date())            '=10 (11 bytes)
Day(x)+Month(x)        '=42 (15 bytes)

Total = 134 bytes. Again, - and ^ force undeclared variables (Variants) to be treated as numeric, and in VBA 0^0 evals to 1.
The concatenation operator force numbers to string form, so -x is 0 and &-x is & "0".
For Day, Month and Year functions, zero corresponds to december 31, 1899.
I also used the fact that (at least for most locales), VBA date strings have 10 characters and time strings have eight...
Thanks! This was a funny challenge.

Hoon, 89 bytes
`@`&
`@`|
+(|)
+:!=(+)
+:!=(-<)
+:!=(->)
+:!=(+<)
+:!=(+>)
+:!=(-<-)
+:!=(-<+)
+:!=(->-)
+:!=(->->-)

0 is just "yes" (0) casted to an atom
1 is just "no" (1) casted to an atom
2 is incremented "no" - .+ automatically casts to an atom, so no need for @
3 - 42 are the fun ones: It's using the != rune, which compiles an arbitrary Hoon expression to Nock. In this case, it's compiling axis navigation syntax into the Nock expression [0 axis], which I then take the tail of with +:expr.
In Hoon, all variable accesses are actually just indexing into a binary tree, and it allows you to index manually as well. The syntax is alternating sets of -/+ and </>, each one being head/tails for the current node. I also use +axis, which is a bit shorter for 8, 9, and 42.

8, 9, 42: Wouldn't that be literal numbers?

Nope. They aren't literals, you can't cast them to numbers. If you ran +1 in the Hoon repl, it evaluates to the value at the top of the context the same way that - does. The only reason I'm able to get the number out of it is by compiling the code to the equivalent of Assembly and pulling the axis out of the formula.

I still think this is questionable. Can you get any number with the incantation +:!=(+…)?

Yes, the same way that you can get any number by pulling the index that -<- snippets compile to. Think of it more as compiling C "a=1; &a" and grabbing the index the mov is pulling from. Since all Hoon compiles down to (Nock)[https://github.com/urbit/urbit/blob/master/Spec/nock/5.txt], which is entirely based on tree indicies and a state machine over natural numbers, I think it's perfectly fine to grab numbers from the output. I could change it back to tree navigation syntax for 8/9/42, but it's the exact same emitted Nock code and means the same thing. It's just marginally shorter for them.

I think literal tree navigation would be more in the spirit of the OP. Otherwise, one could argue that 10 should be valid, because ceil(square(pi())) would evaluate to 10 anyway.

+10 does not evaluate to 10. It's evaluating to the value at index 10 in the context, which is most of the Arvo kernel and the entire stdlib. The != rune just doesn't evaluate it, but compiles it to Nock instead which can be indexed as a noun. The analogy would be more against using π instead of pi - they mean the same thing, do the same thing, compile to the same thing.
Regardless, I'll change them back to tree navigation syntax.

Haskell, 295 bytes
0: length[]
1: length[()]
2: length[(),()]
3: length[(),(),()]
4: length[(),(),(),()]
5: length[(),(),(),(),()]
6: length[(),(),(),(),(),()]
7: length[(),(),(),(),(),(),()]
8: length[(),(),(),(),(),(),(),()]
9: length[(),(),()]*length[(),(),()]
10: length[(),()]*length[(),(),(),(),()]
42: length[(),(),(),(),(),()]*length[(),(),(),(),(),(),()]

Jolf, 26 bytes
<empty>
lέ
lq
mfπ
Uά
½t
mfτ
mΓCt
wwt
wt
t
mQ

Okay, so I have a 42-builtin. I'm obsessed with that number. Also for forty-two, lm,t: the length of the integer partitions of ten.
Explanations
The empty program is a truth machine, and, since given no input, just output's a zero.
lέ is the length of a tab, i.e., 1.
lq is the length of the source code, i.e., 2.
mfπ is the floor of pi, i.e., 3.
Uά is the square root of 16, i.e., 4.
½t is half ten, i.e., 5.
mfτ is the floor of tau (i.e. twice pi), i.e., 6
mΓCt is the length of the collatz sequence beginning with ten, i.e. 7.
wwt is 10-1-1, i.e., 8.
wt is 10-1, i.e., 9.
t is 10.
mQ is the builtin for 42.

Alternate solution
Except for 0 and 10, a solution with @<char with charcode value of N> would be golfier solution for N, however, even though it doesn't use any literals (it actually reads the source code's next character), it isn't in the spirit of the challenge. This would tally 20 bytes.

Why is there a built in for 42?

@Cyoce "Okay, so I have a 42-builtin. I'm obsessed with that number" ;)

Ruby, 194 bytes
[]<=>[]
[[]].size
[[],[]].size
Dir.name.size
Hash.name.size
Float.name.size
Method.name.size
Integer.name.size
NilClass.name.size
TrueClass.name.size
FalseClass.name.size
Integer.name.size*Method.name.size

BASH, 318 bytes
0 to 3 are exit code, other ones are stored in A
bytes count is split as follow :2-5-5-26-23-32-26-38-26-33-32-70
#0
ls
#1
cd \\
#2
ls \\
#3
cd \\
A=$?
A=$(($A+$A+$A))
#4
ls \\
A=$?
A=$(($A*$A))
#5
cd \\
A=$?
A=$(($A+$A+$A+$A+$A))
#6
ls \\
A=$?
A=$(($A+$A+$A))
#7
cd \\
A=$?
A=$(($A+$A+$A+$A+$A+$A+$A))
#8
ls \\
A=$?
A=$(($A*$A*$A))
#9
A=$?
A=$(($A+$A+$A))
#10
ls \\
A=$?
A=$(($A+$A+$A+$A+$A))
#42
@
A=$?
cd \\
B=$?
cd \\
C=$?
C=$(($C+$C+$C))
B=$(($A-$B))
A=$(($B/$C))

7 is more than probably golfable a bit more, as is 42

Can't you mix operations like + and *?

I don't think so sadly, the only one where it could be useful is 7 and it need +4 for parenthesis to only remove 3 (the last +$A)

Perl6 (117 112) no state
e-e
e/e
e.floor
e.round
pi.ceiling
floor e+e
tau.floor
tau.ceiling
floor pi*e
floor pi*pi
round pi*pi
tau.floor*tau.ceiling

Racket 205 bytes
(- pi pi)
(/ pi pi)
(/(+ pi pi)pi)
(floor pi)
(ceiling pi)
(sub1(floor(+ pi pi)))
(floor(+ pi pi))
(ceiling(+ pi pi))
(floor(sub1(* pi pi)))
(floor(* pi pi))
(ceiling(* pi pi))
(floor(+ pi pi(expt pi pi)))

Output:
0.0
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
10.0
42.0

Haskell, 133 bytes
Pi-based, three floating point answers with the rest being integers:
 0: (5)  pi-pi
 1: (5)  pi/pi
 2: (10) (pi+pi)/pi
 3: (8)  round pi
 4: (10) ceiling pi
 5: (15) succ.ceiling$pi
 6: (11) floor$pi+pi
 7: (13) ceiling$pi+pi
 8: (16) floor$cosh pi-pi
 9: (11) floor$pi*pi
10: (11) round$pi*pi
42: (18) floor$pi**pi+pi+pi

QBIC, 14 bytes
Thank you @Adám, for clarifying part of the rules. Brought the byecount down to 14.
a
q
r
s
t
u
v
w
x
y
z
v*w

All lower-case letters are numerical variables in QBIC, which default to 0. Exceptions are the letters q-z, which get initialised to 1-10. 42 is simply 6*7.

Save 11 bytes by removing the question-marks, as per the FAQ: Q Do I need to print the result of each snippet?
A No, making the result available for subsequent use is enough.

You can still take them out and include your byte count (14). And you were not going to win anyway, as there is already a 13-byte answer.

Processing, 65 44 bytes
X
Y
Z
HSB
Z*Z
LINES
HSB*Z
TAB-Z
MITER
X+TAB
-~TAB
BOX+Y

Explanation
Using the hint from the question, I decided to use Processing constants to produce these numbers. These constants contain a numerical value. So to gather them, I used PConstants.java.
Here is the list of all the constants I used:
X      == 0
Y      == 1
Z      == 2
HSB    == 3
LINES  == 5
MITER  == 8
TAB    == 9 (char)
BOX    == 41

After this, all that was left for me to do is to choose the combinations of these constants that produce the numbers 1 to 10 and 42. Finally, I ended up with these:
println(X);//0
println(Y);//1
println(Z);//2
println(HSB);//3
println(Z*Z);//2 * 2 = 4
println(LINES);//5
println(HSB*Z);//3 * 2 = 6
println(TAB-Z);//9 - 2 = 7
println(MITER);//8
println(X+TAB);//0 + 9 = 9
println(-~TAB);//-~9 = 10
println(BOX+Y);//41 + 1 = 42

Several notes:
TAB has a char value of 9, meaning that if I print TAB, I print a literal tab. So to convert it to an int, I just add 0 to it.
And that's it!
Edit
I discovered PConstants.java. It appears to contain all of the constants that exist in Processing. All that research I did is on the Processing Reference is not needed anymore. Time to cut down on the bytes :)

Elixir, 267 bytes
Elixir's syntax doesn't exactly lend itself to golfing, and its strong typing makes this pretty hard too.
length []                                             # 0
length [[]]                                           # 1
length [[],[]]                                        # 2
floor :math.pi                                        # 3  (:math is technically a literal, but Elixir's atoms are neccessary to access many modules)
ceil :math.pi                                         # 4
length [[],[],[],[],[]]                               # 5
floor :math.pi+:math.pi                               # 6
ceil :math.pi+:math.pi                                # 7
(ceil :math.pi+:math.pi)+length [[]]                  # 8
floor :math.pi*:math.pi                               # 9
length(Atom.to_charlist URI)                          # 10 (URI is an alias to Elixir.URI which is 9 characters long)
(length(Atom.to_charlist Version))*(floor :math.pi)   # 42 (length of "Elixir.Version" times 3)

Try it online!

Deadfish / Deadfish~, Score: 62 / 56
0: o
1: io
2: iio
3: iiio
4: iiso
5: iisio
6: iisiio
7: iiisddo or {i}dddo (Deadfish~ only)
8: iiisdo or {i}ddo (Deadfish~ only)
9: iiiso or {i}do (Deadfish~ only)
10: iiisio (Deadfish) or {i}o (Deadfish~)
42: iisiisiiiiiio (Deadfish) or {iiii}iio (Deadfish~)
Amazingly, up to 9, vanilla deadfish is as efficient! I put these together because they're almost identical.

Uiua, 37 36 bytes
⌊⚂
⌊η
⌈η
⌊π
⌈π
⌈+πη
⌊τ
⌈τ
⌈+τη
⌊×ππ
⌈×ππ
⌊+τⁿππ

Try it!
I will be curious to see if anyone has any two-byters for 0. I found a dozen three-byters. Found one!
⌊⚂      # floor of random float in [0,1)
⌊η      # floor of eta (number of radians in a quarter circle)
⌈η      # ceiling of eta
⌊π      # floor of pi (ratio of circle's circumference to diameter)
⌈π      # ceiling of pi
⌈+πη    # ceiling of eta plus pi
⌊τ      # floor of tau (ratio of circle's circumference to radius)
⌈τ      # ceiling of tau
⌈+τη    # ceiling of eta plus tau
⌊×ππ    # floor of pi squared
⌈×ππ    # ceiling of pi squared
⌊+τⁿππ  # floor of pi to the pi plus tau

○π should work in theory, but there are precision errors.

Vyxal, 22 bytes

›
⇧
›⇧
⇧⇧
₀½
⇧T
₀⇩‹
₀⇩
₀‹
₀
₄E∑⇧

Try it Online!
I think all of these are optimal aside from maybe 7 and 42, but I couldn't find anything shorter. 0, 1, 2, and 10 are definitely optimal at least.
      # 0
›     # 0 + 1
⇧     # 0 + 2
›⇧    # 0 + 1 + 2
⇧⇧    # 0 + 2 + 2
₀½    # 10  / 2
⇧T    # (0 + 2) * 3
₀⇩‹   # 10 - 2 - 1
₀⇩    # 10 - 2
₀‹    # 10 - 1
₀     # 10
₄E∑⇧  # digitsum(2 ** 26) + 2

dc, 44
Score does not include newlines between each snippet.
If CJam's U, X, Y, Z, and A constants are allowed, then I assume dc's representation of 10-15 as A-F is also OK.
z
zZ
CI-
DI-
EI-
FI-
II+E-
II+D-
II+C-
II+B-
A
IB+CI-*

@yeti's answer is better.

"Make 12 snippets/expressions..." - I don't think the print command counts in "snippet length".

@yeti yes, I see.  Oh well, looks like you have me beat handily anyway.

I started without using A...F and then saw your comment about A...F. So your solution influenced mine.... e.g.: 42 was IIZd+*dZ+ initially...

Can A F be used as part of a single number, or only stand-alone?

I believe that E and F here are digits (even when they are greater than the input radix). Evidence for this is that they combine as digits; e.g. F0 -> 150. You can see the same behaviour with decimal digits once you change input and output radix.

@TobySpeight Yep - probably a fair point

Staq, 60 bytes
&              0
&i             1
&ii            2
&iii           3
&iiq           4
&iiqi          5
&iiqii         6
&iiiqdd        7
&iiiqd         8
&iiiq          9
&iiiqi        10
&iiqii&+qX+   42

Instructions:
& push 0 on top of stack
i increment top stack value
d decrement top stack value
q square top stack value
+ add top and 2nd stack values, put sum on top of stack
X delete 2nd stack value

Cardinal, 50 bytes
Instructions, with alternatives if they have the same lengths:
0:  IPs are initialized to 0, otherwise, use instruction 0
1:  +
2:  ++
3:  +++
4:  ++++     or ++=*    or ++=t
5:  +++++    or ++=t+   or ++=*+
6:  +++=*    or ++=**
7:  +++=*+   or ++=tt-
8:  ++=tt
9:  +++=t
10: ++=tt*   or +++=t+
42: +++=*=t*

Explanation:
IPs in Cardinal carry length 2 stacks around. The topmost value is called active, the bottom value is called passive. Both can switch roles.
+ increment active value
- decrement active value
* addition : active=active+passive
t multiplication: active=active*passive
= set passive = active value

beeswax, 50 46 bytes
(62 57 bytes, if IPs are not initialized)
Explanation of instructions:
P    increment top lstack value
M    decrement top lstack value
z    all lstack values = 0
F    all lstack values = top
G    get value from absolute(row,column) = lstack(2nd,3rd) value.
@    flip 1st and 3rd lstack values
.    top=top*2nd value
+    top=top+2nd value
!    bitwise NOT
(bel) ASCII control character 7, not printable

Instructions for number creation without using numbers, with multiple examples, if the byte lengths are the same. Prepend z if the bee is not in an initialized state:
 initialized  to 0                         not initialized to 0
                                                  prepend z
no instruction              [0,0,0]•       z
P                           [0,0,1]•       zP
PP                          [0,0,2]•       zPP
PPP                         [0,0,3]•       zPPP
PPF. or PPPP or PPF+        [0,0,4]•       zPPF.
PPF.P or PPF+P or PPPPP     [0,0,5]•       zPPF.P
PPPF+ or PPF++ or PPFP.     [0,0,6]•       zPPPF+
PPPF+P or PPF..M            [0,0,7]•       zPPF..M
(bel)*1FG                   [0,0,7]•  ← this would make ‘7’ one byte shorter
PPF..                       [0,0,8]•       zPPF..
PPPF.                       [0,0,9]•       zPPPF.
PPPF.P                      [0,0,10]•      zPPPF.P
*PFG                        [0,0,42]•      *PFG (in this configuration the IP is always initialized)

You can clone my beeswax GitHub repository here.

Actually, 32 bytes
╜
╒K
 ⌐
╦L
╦K
╦L⌐
╦Lτ
╠²L
╦L╙
╦L²
kY╤
╒º╦+L

All full programs. Try it online!
Explanation

╒ is ln(2)
╦ is pi
╠ is e
L is floor
K is ceil
τ is double
² is square

For the last one:
╒º╦+L
╒      ln(2)
 º     convert from radian to degree (39.71440802747729)
  ╦+   + pi (42.85600068106709)
    L  floor

Why non-competing?

@Adám Because Actually is released this year?

I see. Move along.

@LeakyNun Actually, Actually seems to be started in november 2015 looking at the github graph. I'm not sure when the 'official' release date was, though, so you could be right. Just wanted to use 'Actually, Actually..` Love that programming language's name. ;P

@KevinCruijssen Actually and seriously, Seriously should be the one released in Sep 2015.

@KevinCruijssen When I am home I will download the version on Dec 17 2015 and then make this competing

Well, the whole discussion is unnecessary now... ;)

Jelly, 26 bytes (non-competing)
00:
01: ‘
02: ‘‘
03: ‘‘‘
04: ‘‘Ḥ
05: ⁵H
06: ⁵H‘
07: ⁴H’
08: ⁴H
09: ⁵’
10: ⁵
42: ⁴Ḥ+⁵

Try it online! (paste each one of the snippets in the 'Code' field.)

Brain-Flak, 172 143 bytes
(<>)
(())
(()())
(()()())
(()()()())
(()()()()())
((()()()){})
((()()()){}())
((()()()()){})
(((()()())){}{})
((()()()()()){})
(((((()()()){}()){})){}{})

Try it online! (copy-paste yourself)

Sinclair ZX81/Timex TX1000/1500 BASIC
After some discussion with Adám below, you have the following on the ZX81** (0 to 10 inclusive and 42), where explanations may be necessary, see the relevant note in the square brackets:
[1] .
[2] NOT .
(PI+PI)/PI
INT PI
INT PI+NOT .
INT (PI+PI)-NOT .
INT (PI+PI)
INT (PI+PI)+NOT .
INT (PI*PI+COS PI)
LEN STR$ PI
INT (PI*PI)+NOT .
[3] INT (PI**PI+PI+PI)

Notes:

This is a short-hand of 0.0
Not zero is 1, this is two keystrokes (so two bytes), which is shorter then PI/PI (three keystrokes)
** is to the power of, so it's the integer value of PI to the value of PI plus PI+PI

To see this in action, you can type it in as follows using Direct or Online mode in ZX BASIC:
PRINT .,NOT .,(PI+PI)/PI,INT PI,INT PI+NOT .,INT (PI+PI)-NOT .,INT (PI+PI),INT (PI+PI)+NOT .,INT (PI*PI+ COS PI),LEN STR$ PI,INT (PI*PI)+NOT .,INT (PI**PI+PI+PI)

Here is a more evil listing that I came up with that prints 1 to 10 inclusive (try typing it into a ZX81 emulator - actually don't):
1 PRINT LEN STR$ USR VAL (STR$ INT (EXP PI+PI)+STR$ (PI-PI)+STR$ (PI/PI+(PI/PI)))
2 PRINT (PI+PI)/PI
3 PRINT INT PI
4 PRINT INT (SGN PI+PI)
5 PRINT INT PI+(PI/PI)
6 PRINT INT (PI+PI)
7 PRINT INT ((PI+PI)+((PI/PI)))
8 PRINT INT (PI+PI+PI-SGN (PI))
9 PRINT LEN STR$ PI
10 PRINT INT (PI*PI)+PI/PI

You don't need PRINTs. You use a lot of forbidden strings, no? graphice should probably be with an S.

Good spot - thanks. I'll correct the typo. I put it as a program to run so that I could see each outputted number, rather than running everything in direct mode for each entry.

I also used LET A$="...." simply because I wanted to do something different than using PI - if it's not allowed then my bad.

Amended version is now up - I'll work out how to get 42 later.

Why not (PI+PI)*((PI+PI)+((PI/PI)))? Do you really need doubly nested parens in 7?  Is there no order of execution for number 5? Why does 4 have parens after INT, but number 5 doesn't?

Yes you can remove one set of brackets from ((PI/PI)) - I did it to make it clearer to me. Line 4 PRINT INT (SGN PI+PI) - if you PRINT INT SGN PI+PI you will get a different result. It's been a while since I've delved into Sinclair ZX81 BASIC but there are some rounding errors with PI - also brackets are not always required when calling INT, RND and other functions like other BASIC variants. It was quirky, heavily cost-reduced home computer with only 8K ROM so sometimes you'll get unexpected results.

This is [tag:code-golf]. You've got to strip it down to the very bare minimum, (ab)using quirks. Clarity is not a consideration ;-)

It is common to include code-golf solutions twice in answer posts. First the actual golfed submission, then an "un-golfed" one for clarity. Also, you're missing 0, and 1 should be PI/PI, no? May I edit your post?

Yes I will - trying to write this even into a ZX81 emulator was slightly frustrating so it brought out some malevolence in me (hoping that someone else will try to type it in) - I'll properly golf it later when I'm in a happier mood. Probably.

I'm pretty sure PRINT NOT PI will give you zero

But PI-PI is shorter than NOT PI. Also, remember that PRINT should not be in the actual submission.

It depends whether you are counting bytes or characters. PI is one keystroke on the ZX81, so 1 byte, NOT PI is two keystrokes, so two bytes, PI-PI is three bytes. NOT PI is therefore shorter than PI-PI in the ZX81 byte count.

Usually, tokenized languages are counted by their actual internal representation. See e.g. http://meta.codegolf.stackexchange.com/questions/1541/how-to-score-ti-basic

Actually, I've just remembered that you can PRINT . which is zero (same as PRINT 0.0)

You still have superfluous parens.

Looking good, but do you really need all the spaces, e.g. + COS?

The spaces are generated by the ZX81 interpreter. If you enter 10PRINT"HELLO", you will see 10 PRINT "HELLO" on screen. This is the infamous '1-key' entry system that Sinclair came up with, although entering PI takes four key presses in total, ie, shift and new line to get to the function mode, and then shift and M to produce PI

Ruby, 149 147 bytes
$.
-~$.
-~-~$.
-~-~-~$.
-~-~-~-~$.
-~-~-~-~-~$.
-~-~-~$.>>~$.
-~-~-~-~-~-~-~$.
-~$.>>~-~-~$.
-~$.>>~-~-~$.|-~$.
-~-~-~-~-~$.>>~$.
-~-~-~-~-~$.>>~-~-~$.|-~-~$.

Explanation:
$.is the number of the last line read from the current input file. Since we are not reading any file, this is initialized with 0.
1 through 5 are just the previous number +1, then I can use shifts for multiplication (negative right shift saves 1 byte) and or for addition (can't use +/- because of priority).
So, for example, 42 is 5>>-3|2

Can you maybe provide an explanation?

Lua 5.3, 146 bytes
Uses a lot of length operators. Version probably doesn't matter but it is dependent on the value of _VERSION so I might as well include it for clarity.
0. #{}
1. #{_G}
2. #{_G}+#{_G}
3. #type(x)
4. #type{}-#{_G}
5. #type{}
6. #type{}+#{_G}
7. #_VERSION
8. #type(load)
9. #type(load)+#{_G}
10. #_VERSION+#type(x)
42. - -(#type{}-#{_G}..#{_G}+#{_G})

Annotated with explainations:
0. #{}                 -- {} is an empty table, # is the length operator, length of empty table is 0.
1. #{_G}               -- {_G} is a table containing the global environment (itself a table), so there is one item.
2. #{_G}+#{_G}         -- 1+1
3. #type(x)            -- x is not set and so defaults to nil, type(nil) returns the string "nil", length of "nil" is 3.
4. #type{}-#{_G}       -- 5-1
5. #type{}             -- type of table is "table", length of "table" is 5, brackets not required when only argument is a table literal.
6. #type{}+#{_G}       -- 5+1
7. #_VERSION           -- _VERSION contains the current version as a string ("Lua 5.3"), of length 7.
8. #type(load)         -- type of 'load' is "function", length of "function" is 8.
9. #type(load)+#{_G}   -- 8+1
10. #_VERSION+#type(x) -- 7+3
42. - -(#type{}-#{_G}..#{_G}+#{_G}) -- concatenation operator implicitly converts numerical operands to strings, resulting in "4".."2"=="42". Double negation converts it to a number.

SmileBASIC, 73 71 bytes
#NO 'unknown use (maybe dialog box results?)
#UP 'd-pad up
#CHKZ 'used in SPCHK and BGCHK to get the z coordinate
#TRED 'text color red
#LEFT 'd-pad left
#BQLSF 'biquad low shelf filter
#BQHSF 'biquad high shelf filter
#BQPEQ 'biquad peaking equalizer
#CHKI 'used in SPCHK to check definition number
#TBLUE 'text color blue
#TPURPLE 'text color purple
#BQHSF*#BQPEQ '42

What does the ? do?

How about 42: #BQLSF*#BQPEQ?

? is a shortcut for PRINT, and I just realized this isn't required.

tcl, 376
$argc
incr i
llength [list {} {}]
llength [list {} {} {}]
llength [list {} {} {} {}]
llength [list {} {} {} {} {}]
llength [list {} {} {} {} {} {}]
llength [list {} {} {} {} {} {} {}]
llength [list {} {} {} {} {} {} {} {}]
llength [list {} {} {} {} {} {} {} {} {}]
llength [list {} {} {} {} {} {} {} {} {} {}]
expr [llength [list {} {} {} {} {} {} {}]]*[llength [list {} {} {} {} {} {}]]

To try it, on the first line just prepend puts  and in the others wrap them by puts [ before and ] after.
demo

Can't you use two such things and e.g. multiply them?

@Adám: I've got your point. Thanks!

It would seem to me that puts [...] isn't necessary for further computation.

@Adám: changed according to your observation.

Japt, 22 bytes
0:  T       T == 0
1:  v       Implicit input 0; Number.v gives 1 if it's even, 0 otherwise
2:  y       Number.y(other) gives GCD of two numbers; `other` defaults to 2
3:  D-A     A == 10, D == 13; 13-10
4:  Gq      G == 16; 16.sqrt()
5:  Az      Number.z(other) gives this/other rounded towards 0; `other` defaults to 2
6:  Cz      C == 12
7:  Ez      E == 14
8:  Iq      I == 64
9:  AÉ      É is a shortcut for `-1`
10: A       Obviously.
42: H+A     H == 32; 32+10

Try it online:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
42

Husk, 42 bytes
With string and character literals forbidden as well as numbers, all Husk has to work with are sequence builtins: N (all natural numbers), ø (empty list), and the İ family. (And functions which never get evaluated, on account of being wrapped, but that's a bit far from useful.)
Lø        Length of the empty list.
¬ø        Negation of the empty list.
←İp       First prime. I wanted to use \. here, but even though there are no digits . is a (deliberate) corner case of numeric literal syntax and not a special constant.
←İπ       First digit of pi.
□←tN      Second natural number, squared.
←İ5       First power of 5. (Power sequences only exist for 2, 3, 5, and 7; the digits are arbitrary labels.)
D←İ3      First power of 3, times 2.
←İ7       First power of 7.
½LΘİ€     Length of the list of Euro denominations with a zero tacked on to the beginning, over 2.
□←İπ      First digit of pi, squared.
←İ⁰       First power of 10.
D→D←İ⁰    First power of 10, times 2, plus 1, times 2.

MathGolf, 20 bytes
p   # 0
î   # 1
⌠   # 2
d±  # 3
☻√  # 4
♂½  # 5
B½  # 6
D½  # 7
☻½  # 8
d²  # 9
♂   # 10
J∞  # 42

Try it online.
Explanation:
p   # Print the top of the stack (or 0 if there is no input, nor anything on the stack)
î   # 1-indexed loop index (1 by default)
⌠   # + 2 (which becomes 0+2 by default)
d±  # Push -3, and then pop and push its absolute value
☻√  # Push 16, square-rooted
♂½  # Push 10, halved
B½  # Push 12, halved
D½  # Push 14, halved
F½  # Push 16, halved
d²  # Push -3, squared
♂   # Push 10
J∞  # Push 21, doubled

Of course there any many alternatives for some.. i.e. 6 can alternatively be X√; τi; ╟x; M¼; C½; N¼; O¼; P¼; etc. (Try it online).

Pyth, 30 bytes
Z
hZ
hhZ
l`d
eCN
ePT
elG
sPT
ttT
tT
T
.ON

Try it online!
Breakdown:
Z = Zero, T = Ten, G = alphabet.
Z    // 0: Zero
hZ   // 1: Zero + 1
hhZ  // 2: Zero + 1 + 1
l`d  // 3: length of the representation of ' '
eCN  // 4: The last digit of the ascii code for " (34)
ePT  // 5: Last digit of the prime factorials for 10 [2, 5]
elG  // 6: Last difit of the length of the alphabet
sPT  // 7: Sum of the prime factorials for 10
ttT  // 8: 10 - 1 - 1
tT   // 9: 10 - 1
T    // 10: 10
.ON  // 42: Octal value for the " character

Factor + math.unicode, 88 bytes
f ?1+
e e /
e ⌊
e ⌈
π ⌈
φ e^ ⌊
φ e^ ⌈
e sq ⌊
e sq ⌈
π sq ⌊
π sq ⌈
φ 10^ ⌈

Try it online!
Explanation:
f ?1+     ! ?1+: increment the input by 1 or return 0 if input is f
e e /     ! e (2.7182818...) divided by e
e ⌊       ! the floor of e
e ⌈       ! the ceiling of e
π ⌈       ! the ceiling of pi (3.14159...)
φ e^ ⌊    ! the floor of e raised to the phi (1.618033...) power
φ e^ ⌈    ! the ceiling of e raised to the phi power
e sq ⌊    ! the floor of e squared
e sq ⌈    ! the ceiling of e squared
π sq ⌊    ! the floor of pi squared
π sq ⌈    ! the ceiling of pi squared
φ 10^ ⌈   ! the ceiling of 10 raised to the phi power (10^ is a function)

I think you may discount newlines from your score. There are eleven of them, so your score is 88 bytes. Also +1 for showing off Factor's ability to test all of them in one TIO link as a single code block :)

C, 78 bytes
Quite a handful of undefined behaviours.
The implementation is gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2), using this online C sandbox.
a-a                //1-1
a                  //1
a+a                //1+1
a+a+a              //1+1+1
++a*a              //2*2
++a+a++            //3+2
++a*a++            //3*2
a+++a+a+a          //1+2+2+2
++a<<a             //2<<2
++a*++a            //3*3
a+++a*++a          //1+3*3
(a=++a*a++)*a+a    //(a=3*2)*a+a

a defaults to 1 being the first argument of main.
Boilerplate example for the last one:
#include <stdio.h>
int main(int a)
{
    printf("%d\n",(a=++a*a++)*a+a);
    return 0;
}

without undefined behaviors, 88 bytes
a-a              //1-1
a                //1
a+a              //1+1
a+a+a            //1+1+1
a<<a+a           //1<<2
a<<a+a|a         //(1<<2)|1
a+a+a<<a         //3<<1
a+a+a<<a|a       //(3<<1)|1
a+a<<a+a         //2<<2
a+a<<a+a|a       //(2<<2)|1
a++;a<<a|a       //(2<<2)|2
a=a+a+a<<a;a*a+a //a=3<<1;a*a+a

Why wouldn't they be valid?

@Adám Because a "snippet" is hard to define?

That was meant as a relaxation of rules, not a stringency. I don't know C, but can't you remove main(a){ and ;}?

@Adám I'm not sure.

@Adám Given that the a defaults to 1 because it is the argument of main and the name does not have to be a, do you think I can remove the boilerplate? For example, main(c){c=++c+c++;++c*c++;} works as well.

Yes, I do. If a (or c for that matter) hasn't been used yet (which is a kind of "default"), then the snippet will evaluate to the desired number. Ergo, remove the boilerplates.

@Adám Then can the enum boilerplate in the above solution be removed also?

I'm not sure what it does there.

@Adám Well, I believe that in an enum, the first variable would be 0, etc.

Then it is needed to get the final result, no?

@Adám Well, so is main(a), no?

Let us continue this discussion in chat.

Excel VBA, 59 bytes
Enums from the Excel object available to VBA. n is said to be an uninitialized variable and thus holds the default value of 0 as a Variant.
These snippets may be called to the VBE immediate window by prepending with ?. e.g. ?xlOr.
Further information on each response is commented to the right
00: -n          ''  2 bytes;  Uninitialized var `n` defaults to `0`
01: n^n         ''  3 bytes;  0^0=1
02: xlOr        ''  4 bytes;  Excel.XlAutoFilterOperator.xlOr
03: xlSet       ''  5 bytes;  Excel.XlCubeFieldType.xlSet
04: xlWKS       ''  5 bytes;  Excel.XlFileFormat.xlWKS
05: xlDXF       ''  5 bytes;  Excel.XlPictureConvertorType.xlDXF
06: xlCSV       ''  5 bytes;  Excel.XlFileFormat.xlCSV
07: xlCGM       ''  5 bytes;  Excel.XlPictureConvertorType.xlCGM
08: xlEPS       ''  5 bytes;  Excel.XlPictureConvertorType.xlEPS
09: xlTIF       ''  5 bytes;  Excel.XlPictureConvertorType.xlTIF
10: xlPCX       ''  5 bytes;  Excel.XlPictureConvertorType.xlPCX
42: xlWJ3+xlOr  ''  10 bytes; Excel.XlFileFormat.xlWJ3+Excel.XlAutoFilterOperator.xlOr

Java 8, 300 bytes
My only goal was to get every value using only java.lang.Math and integer casting. Because of that, it's probably not the best answer in terms of golf. I have fun making it, however, and that's what counts :) If I had more time, I would have gone further and only used the constants Math.PI and Math.E.
(int)(Math.E-Math.E)              // 0
(int)(Math.E/Math.E)              // 1
(int)Math.E                       // 2
(int)Math.PI                      // 3
(int)(Math.E/Math.E+Math.PI)      // 4
(int)(Math.E+Math.E)              // 5
(int)(Math.PI+Math.PI)            // 6
(int)(Math.E+Math.E+(int)Math.E)  // 7
(int)(Math.E+Math.E+Math.E)       // 8
(int)(Math.PI*Math.PI)            // 9
(int)Math.ceil(Math.PI*Math.PI)   // 10
(int)Math.ceil(Math.pow(Math.PI,Math.PI)+Math.E+Math.E) //42

TIO code to evaluate all of these at once

Whispers v2, 224 bytes
> e
>> 1-1

> e
>> 1÷1

> e
>> ⌊1⌋

> e
>> ⌈1⌉

> π
>> ⌈1⌉

> π
>> ⌈1⌉
>> ≻2

> π
>> 1+1
>> ⌊2⌋

> e
>> 1²
>> ⌊2⌋

> e
>> 1²
>> ⌈2⌉

> π
>> 1²
>> ⌊2⌋

> π
>> 1²
>> ⌈2⌉

> e
>> ≻1
>> 1*2
>> ⌈3⌉

Each snippet is separated by two newlines. In Whispers, digits (0123456789) only refer to their numerical value when on a nilad line i.e. if the line begins with > . These lines simply return the value represented on the line. Used in the snippets are > e and > π which return \$e\$ and \$\pi\$.
How they work
0 - 10 bytes
> e
>> 1-1

Try it online!
Return \$e - e = 0\$
1 - 11 bytes
> e
>> 1÷1

Try it online!
Returns \$e \div e = 1\$
2 - 14 bytes
> e
>> ⌊1⌋

Try it online!
Returns \$\lfloor e\rfloor = 2\$
3 - 14 bytes
> e
>> ⌈1⌉

Try it online!
Returns \$\lceil e\rceil = 3\$
4 - 15 bytes
> π
>> ⌈1⌉

Try it online!
Returns \$\lceil\pi\rceil = 4\$
5 - 23 bytes
> π
>> ⌈1⌉
>> ≻2

Try it online!
Returns \$\lceil\pi\rceil+1=5\$
6 - 22 bytes
> π
>> 1+1
>> ⌊2⌋

Try it online!
Returns \$\lfloor2\pi\rfloor=6\$
7 - 21 bytes
> e
>> 1²
>> ⌊2⌋

Try it online!
Returns \$\lfloor e^2\rfloor = 7\$
8 - 21 bytes
> e
>> 1²
>> ⌈2⌉

Try it online!
Returns \$\lceil e^2\rceil = 8\$
9 - 22 bytes
> π
>> 1²
>> ⌊2⌋

Try it online!
Returns \$\lfloor\pi^2\rfloor = 9\$
10 - 22 bytes
> π
>> 1²
>> ⌈2⌉

Try it online!
Returns \$\lceil\pi^2\rceil = 10\$
42 - 29 bytes
> e
>> ≻1
>> 1*2
>> ⌈3⌉

Try it online!
Returns \$\lceil e^{e+1}\rceil = 42\$

Python 3
len([])
len([len])
len([len,len])
len([len,len,len])
len([len,len,len,len])
len([len,len,len,len,len])
len([len,len,len,len,len,len])
len([len,len,len,len,len,len,len])
len([len,len,len,len,len,len,len,len])
len([len,len,len,len,len,len,len,len,len])
len([len,len,len,len,len,len,len,len,len,len])
len([len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len,len])

Just lists and functions. No forbidden literals!
Definitely can be golfed, but I automatically generated these, so I might golf it later.

At the very least, you could replace inner lens with []s, no?

@Adám didn’t think of that :p