Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 284 lines (232 sloc) 5.575 kB
9bd18c9 @wilkie Added Variadic class and a wrapper for variadic arguments that can be…
authored
1 import djehuty;
50a35e5 @wilkie Updated Linux console support to work with the Major Changes. Fiddlin…
authored
2
893f8fa @wilkie Added rotate function to iterable. Tried to use it for the runtime, b…
authored
3 import data.list;
a27597e @wilkie Cleaned up graphics classes and moved View and Graphics out of core a…
authored
4 import gui.application;
f1fdfc9 @wilkie Split GUI core into multiple files. Removed old event code completely.
authored
5 import gui.window;
50a35e5 @wilkie Updated Linux console support to work with the Major Changes. Fiddlin…
authored
6 import gui.button;
f1fdfc9 @wilkie Split GUI core into multiple files. Removed old event code completely.
authored
7 import gui.widget;
2dc06af @wilkie Added Barrier as a synchronization primitive. Fixed Thread bug in Syn…
authored
8 import gui.listbox;
f1fdfc9 @wilkie Split GUI core into multiple files. Removed old event code completely.
authored
9
c8e8d5d @wilkie Removed class String from Core.
authored
10 import hashes.digest;
11
ecb168d @wilkie Added preliminary Tui Menu code for placing a menu bar into a Tui app…
authored
12 import resource.menu;
13
a27597e @wilkie Cleaned up graphics classes and moved View and Graphics out of core a…
authored
14 import graphics.graphics;
15
816e311 @wilkie Moved Image from Core to Resource
authored
16 import resource.image;
1cf9ce8 @wilkie Moved Sound from Core to Resource
authored
17 import resource.sound;
0427383 @wilkie Cleaned up audio and sound code and added a test mp2 file.
authored
18
5bc3c94 @wilkie Changed Tui package to Cui so I can reserve Tui for Touch-User-Interf…
authored
19 import cui.application;
20 import cui.window;
21 import cui.label;
22 import cui.textfield;
23 import cui.tabbox;
24 import cui.container;
50a35e5 @wilkie Updated Linux console support to work with the Major Changes. Fiddlin…
authored
25
6ade503 @wilkie Added 1-d FFT operations for arrays and Vectors. Used them to impleme…
authored
26 import synch.timer;
95c3f68 Ported most things to OS X.
Lindsey authored
27 import synch.thread;
7866466 @wilkie Added some atomic operations for x86 and x86-64 platforms (I haven't …
authored
28 import synch.atomic;
6ade503 @wilkie Added 1-d FFT operations for arrays and Vectors. Used them to impleme…
authored
29
8e96740 @wilkie Worked on creating a native button widget that would not interfere wi…
authored
30 import networking.irc;
31
1360573 @wilkie Moved File, Directory, and Console to an io package.
authored
32 import io.console;
50a35e5 @wilkie Updated Linux console support to work with the Major Changes. Fiddlin…
authored
33
34 import hashes.md5;
35
3f67663 @wilkie Added new test framework. Tests go into a .specs directory as separat…
authored
36 import spec.test;
ead8bf5 @wilkie Fixed up some regex bugs and added some cool features to support back…
authored
37
39355cc @wilkie Added a new command line parsing tool. It is super-sophisticated :)
authored
38 import parsing.options;
a39ad61 @LindseyB Stubbed out some functions for tuitabs and added a method to arraylis…
LindseyB authored
39
65f0c59 @wilkie File class can either open (r+) or create files (w+). DSpec will over…
authored
40 import io.file;
41
dc2e607 @wilkie Added simple audio test cases. Added better (correct) fft implementat…
authored
42 import math.vector;
43
b16a31a @LindseyB Added a way to check the day of the week to core date. Only valid for…
LindseyB authored
44 import core.date;
45
5bc3c94 @wilkie Changed Tui package to Cui so I can reserve Tui for Touch-User-Interf…
authored
46 import cui.textfield;
03f8b3e @wilkie string and utf8 is used by default everywhere
authored
47 import core.application;
af7336d @wilkie Ported new code to Unix.
authored
48
5bc3c94 @wilkie Changed Tui package to Cui so I can reserve Tui for Touch-User-Interf…
authored
49 import cui.textbox;
50 import cui.codebox;
9804118 @wilkie Added some future modules. The Tui Window should not pollute the onRe…
authored
51
5bc3c94 @wilkie Changed Tui package to Cui so I can reserve Tui for Touch-User-Interf…
authored
52 import cui.dialog;
53 import cui.filebox;
54 import cui.listbox;
cbb6b53 @wilkie Added TuiContainer and TuiDialog and TuiFileBox. TuiWindow now adds w…
authored
55
d963339 @wilkie Added a Fixed class for fixed point arithmetic and a Currency class f…
authored
56 import math.fixed;
57 import math.currency;
ffccff2 @wilkie So, utoa is now the unsigned form of itoa. The Integer class has some…
authored
58 import math.integer;
f27b42b @wilkie Updated decoders to have extensions and strings to identify them. Fix…
authored
59 import parsing.d.parser;
60
3625cb0 @wilkie FTP test winsamp
authored
61 import networking.ftp;
d963339 @wilkie Added a Fixed class for fixed point arithmetic and a Currency class f…
authored
62
48617d5 @wilkie Added runtime tests and implementation for switch statements on strings.
authored
63 private template _switch_string(T) {
64 int _switch_string(T[][] table, T[] compare) {
65 if (table.length == 0) {
66 return -1;
67 }
68
69 TypeInfo ti = typeid(T[]);
70 // Binary search the table
71 size_t min = 0;
72 size_t max = table.length;
73
74 // Current comparing position
75 size_t cur;
76
77 // Temp for compare value
78 int cmp;
79
80 while(max > min) {
81 cur = (max + min) / 2;
82 cmp = ti.compare(&table[cur], &compare);
83
84 if (cmp == 0) {
85 return cur;
86 }
87 else if (cmp > 0) {
88 max = cur;
89 }
90 else {
91 min = cur + 1;
92 }
93 }
94
95 return -1;
96 }
97 }
98
99
3f67663 @wilkie Added new test framework. Tests go into a .specs directory as separat…
authored
100 import spec.specification;
101
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
102 import data.queue2;
103
20cafd8 @wilkie Implementing some Regex magic.
authored
104 class MyConsoleApp : Application {
3625cb0 @wilkie FTP test winsamp
authored
105 static this() { new MyConsoleApp(); }
0a34482 @wilkie Fixed Variant in Core to toString arrays of strings correctly.
authored
106
893f8fa @wilkie Added rotate function to iterable. Tried to use it for the runtime, b…
authored
107 override void onApplicationStart() {
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
108 q = new Queue2!(string);
109 Thread t = Thread.current;
95c3f68 Ported most things to OS X.
Lindsey authored
110
7866466 @wilkie Added some atomic operations for x86 and x86-64 platforms (I haven't …
authored
111 ulong a, b, c;
112 a = 4;
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
113 b = 0b10011101_10110011_11100011_11011010;
7866466 @wilkie Added some atomic operations for x86 and x86-64 platforms (I haven't …
authored
114 c = 5;
f298333 @wilkie Added currency specifier to format function. Need to clean up locale …
authored
115 Console.putln("{1}, {0}, {1}, {0:X}, {} {} {X8} {00.0000}".format(12, 11, 13, 3.4));
7866466 @wilkie Added some atomic operations for x86 and x86-64 platforms (I haven't …
authored
116 Console.putln(a,b,c);
117 Console.putln(Atomic.compareExchange(a,b,c));
118 Console.putln(a,b,c);
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
119
120 float d,e,f;
121 d = 1.0;
122 e = 1.1;
123 f = 2.234;
124 Console.putln(d,e,f);
125 Console.putln(Atomic.compareExchange(d,e,f));
126 Console.putln(d,e,f);
127
128 void* A=null;
129 void* B=cast(void*)0xfe;
130 void* C=cast(void*)0xff;
131
132 Console.putln(A,B,C);
133 Console.putln(Atomic.compareExchange(A,B,C));
134 Console.putln(A,B,C);
135
136 short g,h,i;
137 g = 3;
138 h = 4;
139 i = 4;
140 Console.putln(g,h,i);
141 Console.putln(Atomic.compareExchange(g,h,i));
142 Console.putln(g,h,i);
143
63c6c94 @wilkie Added runtime functions for array reversal and fixed apply functions.…
authored
144 Console.putln([1,2,3,4].rotate(2));
145 Console.putln("hello"c.dup.reverse);
08e9e7e @wilkie Added runtime functions and separated core runtime classes into separ…
authored
146 /*Console.putln("he\u0364llo"c.dup.reverse);
63c6c94 @wilkie Added runtime functions for array reversal and fixed apply functions.…
authored
147 Console.putln("hlle\u0364o"c.dup.reverse);
148 Console.putln("he\u0364po"c.dup.reverse);
149 Console.putln("he\u0364llo"w.dup.reverse);
150 Console.putln("he\u0364llo"d.dup.reverse);
08e9e7e @wilkie Added runtime functions and separated core runtime classes into separ…
authored
151 Console.putln("he\u0364llo"d.dup.reverse());*/
63c6c94 @wilkie Added runtime functions for array reversal and fixed apply functions.…
authored
152 Console.putln([1,2,3,4,5,6,7,8].dup.reverse());
f298333 @wilkie Added currency specifier to format function. Need to clean up locale …
authored
153 Console.putln(new Fixed(3.5));
2f1aa7f @LindseyB Compiling on 32bit and Windows fixed.
LindseyB authored
154 //Atomic.exchange(a,6);
7866466 @wilkie Added some atomic operations for x86 and x86-64 platforms (I haven't …
authored
155 Console.putln(a,b,c);
6074538 @wilkie Fixed french currency function.
authored
156 Console.putln("{c}".format(1500.42));
157 Locale.id = LocaleId.French_FR;
f298333 @wilkie Added currency specifier to format function. Need to clean up locale …
authored
158 Console.putln("{c}".format(1500.42));
159 Console.putln(new Currency(150042,2));
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
160 t = new Thread(&foo);
161 t.start();
162
163 t = new Thread(&foo);
164 t.start();
165 t = new Thread(&foo);
166 t.start();
167 t = new Thread(&foo);
168 t.start();
169 t = new Thread(&foo);
170 t.start();
171 t = new Thread(&foo);
172 t.start();
173 t = new Thread(&foo);
174 t.start();
175 t = new Thread(&foo);
176 t.start();
177 t = new Thread(&foo);
178 t.start();
7866466 @wilkie Added some atomic operations for x86 and x86-64 platforms (I haven't …
authored
179 Timer tmr = new Timer(250);
95c3f68 Ported most things to OS X.
Lindsey authored
180 push(tmr);
181 tmr.start();
2f1aa7f @LindseyB Compiling on 32bit and Windows fixed.
LindseyB authored
182 //while(freak < 9) {
183 //}
3e30b03 @wilkie Changed Console colors to just use the normal Color. Now, consoles co…
authored
184 Console.forecolor = Color.White;
185 Console.putln("White");
186 Console.forecolor = Color.Red;
187 Console.putln("Red");
188 Console.forecolor = Color.Green;
189 Console.putln("Green");
190 Console.forecolor = Color.Blue;
191 Console.putln("Blue");
192 Console.forecolor = Color.Yellow;
193 Console.putln("Yellow");
194 Console.forecolor = Color.Magenta;
195 Console.putln("Magenta");
196 Console.forecolor = Color.Cyan;
197 Console.putln("Cyan");
198 Console.forecolor = Color.Gray;
199 Console.putln("Gray");
200 Console.forecolor = Color.DarkGray;
201 Console.putln("DarkGray");
202 Console.forecolor = Color.DarkRed;
203 Console.putln("DarkRed");
204 Console.forecolor = Color.DarkGreen;
205 Console.putln("DarkGreen");
206 Console.forecolor = Color.DarkBlue;
207 Console.putln("DarkBlue");
208 Console.forecolor = Color.DarkYellow;
209 Console.putln("DarkYellow");
210 Console.forecolor = Color.DarkMagenta;
211 Console.putln("DarkMagenta");
212 Console.forecolor = Color.DarkCyan;
213 Console.putln("DarkCyan");
214 Console.forecolor = Color.Black;
215 Console.putln("Black");
216 Console.forecolor = Color.Gray;
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
217 ulong foo = 45;
218 Console.putln(foo);
219 Atomic.add(foo, 45);
220 Console.putln(foo);
221 Console.putln(q);
893f8fa @wilkie Added rotate function to iterable. Tried to use it for the runtime, b…
authored
222
223 Console.putln([1,2,3,4].rotate(-1));
224
63c6c94 @wilkie Added runtime functions for array reversal and fixed apply functions.…
authored
225 foreach_reverse(dchar d; "he\u0364llo"c) {
226 Console.putln(d);
227 }
228
0ff786c @wilkie Added runtime function for the array.sort property. Just a simple in-…
authored
229 Console.putln([3,2,1].sort);
230 Console.putln([[1,2],[2,3],[3],[1],[0]].sort);
3f67663 @wilkie Added new test framework. Tests go into a .specs directory as separat…
authored
231
af8f6b1 @wilkie Some code changes, removing building runtime from Makefile for now.
authored
232 typedef int oneint = 3;
233 oneint fb;
234 oneint[] oneints = new oneint[10];
2f1aa7f @LindseyB Compiling on 32bit and Windows fixed.
LindseyB authored
235 //Console.putln(oneints[0]);
236 //Console.putln(fb);
dcc5b55 @wilkie Adding some runtime array allocation functions.
authored
237
48617d5 @wilkie Added runtime tests and implementation for switch statements on strings.
authored
238 dstring[] fuzz = [
239 "abc",
240 "zzt"
241 "hello",
242 ];
243
244 string foobe = "hello";
245
246 switch(foobe) {
247 case "abc":
248 case "zzt":
249 break;
250 case "hello":
251 Console.putln("yay");
252 break;
253 default:
254 break;
255 }
256
257 Console.putln(_switch_string(fuzz, "hello"d));
258
95c3f68 Ported most things to OS X.
Lindsey authored
259 for(;;){}
260 }
261
262 override bool onSignal(Dispatcher dsp, uint signal) {
263 Console.putln("fire");
264 return true;
265 }
b3e8c97 @wilkie Moved list to Data, which is a package for data structures. Implement…
authored
266
267 void foo(bool bar) {
268 Atomic.increment(fudge);
269 while(fudge < 9) {
270 }
271 q.add("foobara");
272 q.add("foobarb");
273 q.remove();
274 q.add("foobarc");
275 q.add("foobard");
276 q.remove();
277 Atomic.increment(freak);
278 }
279
280 ulong fudge;
281 ulong freak;
282 Queue2!(string) q;
95c3f68 Ported most things to OS X.
Lindsey authored
283 }
Something went wrong with that request. Please try again.