linux
Factor handbook > The implementation > System interface > Operating system detection

Prev:os ( -- class )
Next:macosx


Vocabulary
system

Definition


Methods


































M: linux find-visual-studio-code-invocation
{
[ "code" which ]
[ "Code" which ]
[ home "VSCode-linux-x64/Code" append-path ]
[ "/usr/share/code/code" ]
} [ [ exists? ] ?1arg ] map-compose 0|| ;









M: linux init-monitors
H{ } clone watches set <inotify> [
[ inotify set ] [
[ inotify-read-thread ] curry
"Linux monitor thread" spawn drop
] bi
] [ "Linux kernel version is too old" throw ] if* ;



M: linux lookup-baud
H{
{ 0 0 }
{ 4800 12 }
{ 921600 4103 }
{ 9600 13 }
{ 134 4 }
{ 200 6 }
{ 1800 10 }
{ 19200 14 }
{ 75 2 }
{ 1000000 4104 }
{ 38400 15 }
{ 57600 4097 }
{ 150 5 }
{ 600 8 }
{ 4000000 4111 }
{ 1152000 4105 }
{ 115200 4098 }
{ 2400 11 }
{ 500000 4101 }
{ 1500000 4106 }
{ 230400 4099 }
{ 2500000 4108 }
{ 2000000 4107 }
{ 3500000 4110 }
{ 300 7 }
{ 460800 4100 }
{ 110 3 }
{ 1200 9 }
{ 50 1 }
{ 576000 4102 }
{ 3000000 4109 }
} ?at [ invalid-baud ] unless ;
























M: linux resolve-localhost { T{ ipv4 { host "0.0.0.0" } } } ;
























M: linux x>hid-bit-order
{
0
0
0
0
0
0
0
0
0
41
30
31
32
33
34
35
36
37
38
39
45
46
42
43
20
26
8
21
23
28
24
12
18
19
47
48
40
224
4
22
7
9
10
11
13
14
15
51
52
53
225
49
29
27
6
25
5
17
16
54
55
56
229
85
226
44
57
58
59
60
61
62
63
64
65
66
67
83
71
95
96
97
86
92
93
94
87
91
90
89
98
99
0
0
0
68
69
0
0
~157 more~
} ; inline



M: linux x>hid-bit-order
{
0
0
0
0
0
0
0
0
0
41
30
31
32
33
34
35
36
37
38
39
45
46
42
43
20
26
8
21
23
28
24
12
18
19
47
48
40
224
4
22
7
9
10
11
13
14
15
51
52
53
225
49
29
27
6
25
5
17
16
54
55
56
229
85
226
44
57
58
59
60
61
62
63
64
65
66
67
83
71
95
96
97
86
92
93
94
87
91
90
89
98
99
0
0
0
68
69
0
0
~157 more~
} ; inline