Skip to content

Commit ade1085

Browse files
committed
rename jeforth.js filename to projectk.js
1 parent d21d320 commit ade1085

24 files changed

+61
-569
lines changed

3ce/background.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
vm.screenbuffer = ""; // type() to screenbuffer before I/O ready; self-test needs it too.
1414
vm.selftest_visible = true; // Dummy, background page does not have a display.
1515
// vm.type() is the master typing or printing function.
16-
// The type() called in code ... end-code is defined in the kernel jeforth.js.
16+
// The type() called in code ... end-code is defined in the kernel projectk.js.
1717
// type to vm.screenbuffer, although background page has no display.
1818
vm.type = function (s) {
1919
try {
@@ -26,14 +26,14 @@
2626
}
2727

2828
// vm.panic() is the master panic handler. The panic() function defined in
29-
// project-k kernel jeforth.js is the one called in code ... end-code.
29+
// project-k kernel projectk.js is the one called in code ... end-code.
3030
vm.panic = function(state){
3131
vm.type(state.msg);
3232
if (state.serious) debugger;
3333
}
3434

3535
// Even in 3ce background page we still need the panic() function below
36-
// but we can't see the one in jeforth.js so one is defined here for convenience.
36+
// but we can't see the one in projectk.js so one is defined here for convenience.
3737
function panic(msg,level) {
3838
var state = {
3939
msg:msg, level:level

3ce/ce.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function ce3_host_onmessage (message, sender, sendResponse) {
248248
tabid {} js: tos().file="js/jquery-1.11.2.js" inject drop
249249
then
250250
tabid {} js: tos().file="js/version.js" inject drop
251-
tabid {} js: tos().file="project-k/jeforth.js" inject drop
251+
tabid {} js: tos().file="project-k/projectk.js" inject drop
252252

253253
\ Inject the main program of jeforrth.3ce (jeforth.3htm.js equivalent)
254254
<ce>
@@ -259,7 +259,7 @@ function ce3_host_onmessage (message, sender, sendResponse) {
259259
// We need to help it a little as the following example:
260260

261261
(function(){
262-
// vm.minor_version = 204; // 3ce target page minor version. major version is from jeforth.js kernel.204; // 3ce target page minor version. major version is from jeforth.js kernel.
262+
// vm.minor_version = 204; // 3ce target page minor version. major version is from projectk.js kernel.204; // 3ce target page minor version. major version is from projectk.js kernel.
263263
vm.minor_version = jeforth3we_minor_version;
264264
var version = vm.version = parseFloat(vm.major_version+"."+vm.minor_version);
265265
vm.appname = "jeforth.3ce"; // 不要動, jeforth.3we kernel 用來分辨不同 application。
@@ -300,12 +300,12 @@ function target_f7_handler (message, sender, sendResponse) {
300300
};
301301
302302
// vm.panic() is the master panic handler. The panic() function defined in
303-
// project-k kernel jeforth.js is the one called in code ... end-code.
303+
// project-k kernel projectk.js is the one called in code ... end-code.
304304
vm.panic = function(state){
305305
vm.type(state.msg);
306306
if (state.serious) debugger;
307307
}
308-
// We need the panic() function below but we can't see the one in jeforth.js
308+
// We need the panic() function below but we can't see the one in projectk.js
309309
// so one is defined here for convenience.
310310
function panic(msg,level) {
311311
var state = {

3ce/jeforth.3ce.background.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>jeforth.3ce background page</title>
55
<script src="js/jquery-1.11.2.js"></script>
6-
<Script src="project-k/jeforth.js"></Script>
6+
<Script src="project-k/projectk.js"></Script>
77
<script src="js/version.js"></script>
88
<Script src="3ce/background.js"></Script>
99
</head>

3ce/jeforth.3ce.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
</style>
1919
<script src="js/jquery-1.11.2.js"></script>
20-
<script src="project-k/jeforth.js"></script>
20+
<script src="project-k/projectk.js"></script>
2121
<script src="js/version.js"></script>
2222
<script src="3ce/jeforth.3ce.js"></script>
2323
</head>

3ce/jeforth.3ce.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
kvm.selftest_visible = true; // type() refers to it.
1919

2020
// kvm.type() is the master typing or printing function.
21-
// The type() called in code ... end-code is defined in the kernel jeforth.js.
22-
// We need to use type() below, and we can't see the jeforth.js' type() so one
21+
// The type() called in code ... end-code is defined in the kernel projectk.js.
22+
// We need to use type() below, and we can't see the projectk.js' type() so one
2323
// is also defined here, even just for a few convenience. The two type() functions
2424
// are both calling the same kvm.type().
2525
var type = kvm.type = function (s) {
@@ -33,12 +33,12 @@
3333
}
3434

3535
// kvm.panic() is the master panic handler. The panic() function defined in
36-
// project-k kernel jeforth.js is the one called in code ... end-code.
36+
// project-k kernel projectk.js is the one called in code ... end-code.
3737
kvm.panic = function(state){
3838
type(state.msg);
3939
if (state.serious) debugger;
4040
}
41-
// We need the panic() function below but we can't see the one in jeforth.js
41+
// We need the panic() function below but we can't see the one in projectk.js
4242
// so one is defined here for convenience.
4343
function panic(msg,level) {
4444
var state = {

3ce/target.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Program path <span id=location>location</span><br>
9797
// js: $(".console3we")[0].style.visibility="hidden"
9898

9999
// vm.type() is the master typing or printing function.
100-
// The type() called in code ... end-code is defined in the kernel jeforth.js.
100+
// The type() called in code ... end-code is defined in the kernel projectk.js.
101101
// target_type(s) types to the target page outputbox, instead of to the host page
102102
// that may be the popup page or a 3ce extension page.
103103
function target_type(s) {

3hta/f/wmi.f

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
\ "localhost" by default. Define t/c before include wmi.f in command line if your target computer is not localhost.
1515

1616
\ 如果在 include wmi.f 之前先設定 t/c 之值,則整套 wmi.f 都 refer to the specified t/c. 所以你可以去 access 別的機器.
17-
\ 例如 "cscript jeforth.js s' 10.34.98.76' constant t/c include wmi.f list-some-OS-properties" 可以去看遠端機器的內容。
17+
\ 例如 "cscript projectk.js s' 10.34.98.76' constant t/c include wmi.f list-some-OS-properties" 可以去看遠端機器的內容。
1818
\ 若不先給定 t/c 則以下這段程式會把 t/c 設成 localhost 所以是對本地電腦工作。我不想每次都得指定 target computer 因此
1919
\ 如此安排。
2020

@@ -341,7 +341,7 @@
341341
;
342342

343343
\ this is a one liner to list all devices. %errorlevel% is the count of devices.
344-
\ cscript jeforth.js include wmi.f cr list-all-PnP-devices bye
344+
\ cscript projectk.js include wmi.f cr list-all-PnP-devices bye
345345

346346
<selftest>
347347
*** Demo how to use objEnumWin32_PnPEntity object
@@ -381,7 +381,7 @@
381381
;
382382

383383
\ This is a one liner that lists yellow marks and red marks in Device Manager, leaving %errorlevel% with the abnormal item count.
384-
\ cscript jeforth.js include wmi.f cr list-abnormal-items-in-device-manager bye
384+
\ cscript projectk.js include wmi.f cr list-abnormal-items-in-device-manager bye
385385

386386
<selftest>
387387
*** Let's see if there's any abnormal items in device manager
@@ -427,7 +427,7 @@
427427
;
428428

429429
\ This is a one liner to show CD/DVD drives, leaving %errorlevel% with the count.
430-
\ cscript jeforth.js include wmi.f list-CD/DVD-drives bye
430+
\ cscript projectk.js include wmi.f list-CD/DVD-drives bye
431431

432432
<selftest>
433433
*** Demo objEnumWin32_CDROMDrive object
@@ -498,13 +498,13 @@
498498
;
499499

500500
\ This is a one liner to show processors, leaving %errorlevel% with the physical processor count.
501-
\ cscript jeforth.js include wmi.f list-all-processors bye
501+
\ cscript projectk.js include wmi.f list-all-processors bye
502502

503503
\ This is a one liner to show processors, leaving %errorlevel% with the logical processor count.
504-
\ cscript jeforth.js include wmi.f list-all-processors drop bye
504+
\ cscript projectk.js include wmi.f list-all-processors drop bye
505505

506506
\ This is a one liner to show processors, leaving %errorlevel% with the processor core count.
507-
\ cscript jeforth.js include wmi.f list-all-processors drop drop bye
507+
\ cscript projectk.js include wmi.f list-all-processors drop drop bye
508508

509509
<selftest>
510510
*** Demo objEnumWin32_Processor object
@@ -570,7 +570,7 @@
570570
</selftest>
571571

572572
\ This is a one liner to show BIOS things.
573-
\ cscript jeforth.js list-Win32_BIOS-properties bye /f0:wmi.f //nologo
573+
\ cscript projectk.js list-Win32_BIOS-properties bye /f0:wmi.f //nologo
574574

575575
\ View Battery info
576576
\ http://msdn.microsoft.com/en-us/library/windows/desktop/aa394074(v=vs.85).aspx
@@ -580,7 +580,7 @@
580580
end-code
581581

582582
\ This is a one liner to show battery things.
583-
\ cscript jeforth.js list-Win32_Battery-properties bye /f0:wmi.f //nologo
583+
\ cscript projectk.js list-Win32_Battery-properties bye /f0:wmi.f //nologo
584584

585585
<selftest>
586586
*** Demo how to use objEnumWin32_Battery, list Win32_Battery properties

3htm/f/jsc.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ \ function test (input) {
186186

187187
<js>
188188
// vm.panic() is the master panic handler. The panic() function defined in
189-
// project-k kernel jeforth.js is the one called in code ... end-code. That
189+
// project-k kernel projectk.js is the one called in code ... end-code. That
190190
// panic() is actually calling vm.panic(). We redefine vm.panic() because jsc
191191
// is ready now while F12 debugger can be called from jsc still.
192192

3htm/js/jeforth.3htm.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
kvm.selftest_visible = true; // type() refers to it.
1111

1212
// kvm.type() is the master typing or printing function.
13-
// The type() called in code ... end-code is defined in the kernel jeforth.js.
14-
// We need to use type() below, and we can't see the jeforth.js' type() so one
13+
// The type() called in code ... end-code is defined in the kernel projectk.js.
14+
// We need to use type() below, and we can't see the projectk.js' type() so one
1515
// is also defined here, even just for a few convenience. The two type() functions
1616
// are both calling the same kvm.type().
1717
var type = kvm.type = function (s) {
@@ -25,12 +25,12 @@
2525
}
2626

2727
// kvm.panic() is the master panic handler. The panic() function defined in
28-
// project-k kernel jeforth.js is the one called in code ... end-code.
28+
// project-k kernel projectk.js is the one called in code ... end-code.
2929
kvm.panic = function(state){
3030
type(state.msg);
3131
if (state.serious) debugger;
3232
}
33-
// We need the panic() function below but we can't see the one in jeforth.js
33+
// We need the panic() function below but we can't see the one in projectk.js
3434
// so one is defined here for convenience.
3535
function panic(msg,level) {
3636
var state = {

3nd/f/jsc.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ \ function test (input) {
122122

123123
<js>
124124
// vm.panic() is the master panic handler. The panic() function defined in
125-
// project-k kernel jeforth.js is the one called in code ... end-code. That
125+
// project-k kernel projectk.js is the one called in code ... end-code. That
126126
// panic() is actually calling vm.panic(). We redefine vm.panic() because jsc
127127
// is ready now while F12 debugger can be called from jsc still.
128128

3nw/Getting-Started.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ \ function Window(routing_id, nobind) {
161161
<section>
162162
js> win.width . \ 876
163163
js: win.width=800 \ it works
164-
js> win.title . \ jeforth.3nw -- 3 words jeforth.js for node-webkit with jQuery-terminal
164+
js> win.title . \ jeforth.3nw -- 3 words projectk.js for node-webkit with jQuery-terminal
165165
js: win.title="hahaha" \ it really changes the nw window's title
166166
js> win.zoomLevel . \ 0 this is the font size of the forth console
167167
js: win.zoomLevel=1

3nw/localstorage.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

3nw/oklai.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353

5454
<section>
5555
.(( Now 'win' is the nw.exe main program DOM window object ))
56-
win js> pop().title . \ jeforth.3nw -- 3 words jeforth.js for node-webkit with jQuery-terminal
56+
win js> pop().title . \ jeforth.3nw -- 3 words projectk.js for node-webkit with jQuery-terminal
5757

5858
\ [ ] the 'window' seen in debugger and the 'win' (gui.Window.get()) are different things.
5959
\ jeforth global variables are window.variables, e.g. window.debug, window.stackwas, window.screenbuffer, etc.
6060
\ Whild window.title is "undefined", but gui.Window.get().title is
61-
\ "jeforth.3nw -- 3 words jeforth.js for node-webkit with jQuery-terminal"
61+
\ "jeforth.3nw -- 3 words projectk.js for node-webkit with jQuery-terminal"
6262
\ This is not so difficult to understand. i.e. gui.Window.get().minimize() ==> works fine and
6363
\ window.minimize() ==> TypeError: Object [object global] has no method 'minimize'
6464

LOG/3ca.log.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@
128128
c:\Users\hcche\Downloads\jeforth.3we\jeforth.3chrome.html \ from jeforth.3we-59858c0208
129129
<Script src="jeforth.3chrome.js"></Script>
130130
--> As shown above it's the .js file that is suspected --> compared, can't find any suspect.
131-
so try to use jeforth.3chrome.js . . . still failed. --> Now I believe the jeforth.js
132-
is different. Because it's blocked at jeforth.js --> Nope, jeforth.js is the same.
133-
--> so try to use the jeforth.3chrome.html .. no work -> use the jeforth.js too ...
131+
so try to use jeforth.3chrome.js . . . still failed. --> Now I believe the projectk.js
132+
is different. Because it's blocked at projectk.js --> Nope, projectk.js is the same.
133+
--> so try to use the jeforth.3chrome.html .. no work -> use the projectk.js too ...
134134
failed --> use the manifest.json it self ... OK !!
135135

136136
------------ was --------------------------------------------

LOG/Log of TR.html

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

LOG/log.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h3> I am a H3 tag</h3>
379379
</div>
380380

381381
<div>
382-
[ ] Words(a[]) &lt;--- why a[] ?<br>&nbsp;&nbsp;&nbsp; A:&nbsp;這是很老的 code 了。把 word name, xt, 等一切 properties 用一個 array 送進去。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;這個機關現在看來有點多餘, JavaScript object 的 properties 可以隨時加掛,不需要用<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;這樣的技巧。位置在 project-k 的 jeforth.js 裡面,誰願意貢獻時間有空把它改掉。<br>[ ] panic() &lt;---- why not simply type() ?<br>&nbsp;&nbsp;&nbsp; A:&nbsp;jeforth engine or kernel is supposed to be used in embeded systems too.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In that case, panic() is still necessary while type() has no meaning.<br>[ ] nexttoken("RegEx") 收 string. 怎麼不直接收 RegEx ?
382+
[ ] Words(a[]) &lt;--- why a[] ?<br>&nbsp;&nbsp;&nbsp; A:&nbsp;這是很老的 code 了。把 word name, xt, 等一切 properties 用一個 array 送進去。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;這個機關現在看來有點多餘, JavaScript object 的 properties 可以隨時加掛,不需要用<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;這樣的技巧。位置在 project-k 的 projectk.js 裡面,誰願意貢獻時間有空把它改掉。<br>[ ] panic() &lt;---- why not simply type() ?<br>&nbsp;&nbsp;&nbsp; A:&nbsp;jeforth engine or kernel is supposed to be used in embeded systems too.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In that case, panic() is still necessary while type() has no meaning.<br>[ ] nexttoken("RegEx") 收 string. 怎麼不直接收 RegEx ?
383383
</div>
384384

385385
<div>

LOG/log.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Get the project
3535
| Item | Address |
3636
----------------|----------------------------------------------
3737
| jeforth.3we high level source code | *http://github.com/hcchengithub/jeforth.3we* |
38-
| Kernel, jeforth.js 3-words-engine| *http://github.com/hcchengithub/project-k* |
38+
| Kernel, projectk.js 3-words-engine| *http://github.com/hcchengithub/project-k* |
3939

4040
Get source code from GitHub dwon to your computer through 'git clone' or Download Zip, either way.
4141

f/jeforth.f

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
end-code
3939
// ( <name ..code..> -- ) Start composing a code word.
4040

41-
code _init_ ( -- ) \ Initialize vm.g.members that are moved out from jeforth.js which is thus kept pure.
41+
code _init_ ( -- ) \ Initialize vm.g.members that are moved out from projectk.js which is thus kept pure.
4242

4343
// To support private word, END-CODE needs one more line
4444
words.forth[2].xt = function(){
45-
// was from project-k jeforth.js, modified by jeforth.3we jeforth.f _init_
45+
// was from project-k projectk.js, modified by jeforth.3we jeforth.f _init_
4646
if(compiling!="code"){ panic("Error! 'END-CODE' to a none code word.\n"); return};
4747
current_word_list().push(new Word([newname,newxt]));
4848
last().vid = current;
@@ -233,7 +233,7 @@ execute = vm.g.selftest_execute = function execute(entry) {
233233
我嘗試了種種的 self-test 寫法。有的很醜,混在正常程式裡面相當有礙視線;不醜的很
234234
累,佔很大 source code 篇幅。
235235

236-
以下是發展到目前最好的方法,jeforth.js kernel 裡只有 code end-code 兩個基本
236+
以下是發展到目前最好的方法,projectk.js kernel 裡只有 code end-code 兩個基本
237237
words, 剛進到 jeforth.f 只憑這兩個基本 words 就馬上要為每個 word 都做 self-test
238238
原本是很困難的。 然而,jeforth.f 是整個檔案一次讀進來成為大大的一個 TIB 的, 所
239239
以其中已經含有 jeforth.f 的全部功能。如果 self-test 安排在所有的 words 都 load

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
</style>
1313
<script src="js/jquery-1.11.2.js"></script>
14-
<script src="project-k/jeforth.js"></script>
14+
<script src="project-k/projectk.js"></script>
1515
<script src="js/version.js"></script>
1616
<script src="3htm/js/jeforth.3htm.js"></script>
1717
</head>

jeforth.3nd.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Usage: node.exe jeofrth.3nd.js cr .' Hello World!!' cr bye
66
//
77

8-
var jeForth = require('./project-k/jeforth.js').jeForth;
8+
var jeForth = require('./project-k/projectk.js').jeForth;
99
global.kvm = global.jeforth_project_k_virtual_machine_object = new jeForth()
1010
kvm.minor_version = require("./js/version.js").jeforth3we_minor_version;
1111
kvm.host = global; // global 掛那裡的根據。
@@ -15,8 +15,8 @@ kvm.screenbuffer = ""; // used by both inside and outside vm.
1515
kvm.selftest_visible = true; // used by both inside and outside vm.
1616

1717
// kvm.type() is the master typing or printing function.
18-
// The type() called in code ... end-code is defined in the kernel jeforth.js.
19-
// We need to use type() below, and we can't see the jeforth.js' type() so one
18+
// The type() called in code ... end-code is defined in the kernel projectk.js.
19+
// We need to use type() below, and we can't see the projectk.js' type() so one
2020
// is also defined here, even just for a few convenience. The two type() functions
2121
// are both calling the same kvm.type().
2222
var type = kvm.type = function (s) {
@@ -35,12 +35,12 @@ kvm.clearScreen =
3535
// '\033c' or '\033[2J' http://stackoverflow.com/questions/9006988/node-js-on-windows-how-to-clear-console
3636

3737
// kvm.panic() is the master panic handler. The panic() function defined in
38-
// project-k kernel jeforth.js is the one called in code ... end-code.
38+
// project-k kernel projectk.js is the one called in code ... end-code.
3939
kvm.panic = function (state) {
4040
type(state.msg);
4141
if (state.serious) debugger;
4242
}
43-
// We need the panic() function below but we can't see the one in jeforth.js
43+
// We need the panic() function below but we can't see the one in projectk.js
4444
// so one is defined here for convenience.
4545
function panic(msg,level) {
4646
var state = {

jeforth.3nw.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</style>
1313
<script src="js/jquery-1.11.2.js"></script>
1414
<script src="js/version.js"></script>
15-
<Script src="project-k/jeforth.js"></Script>
15+
<Script src="project-k/projectk.js"></Script>
1616
<script id=js>
1717
var jeforth_project_k_virtual_machine_object = new jeForth(); // A permanent name.
1818
var kvm = jeforth_project_k_virtual_machine_object; // "kvm" may not be so permanent.
@@ -42,7 +42,7 @@
4242
return(version);
4343
}
4444
// kvm.panic() is the master panic handler. The panic() function defined in
45-
// project-k kernel jeforth.js is the one called in code ... end-code and it's
45+
// project-k kernel projectk.js is the one called in code ... end-code and it's
4646
// not visible here.
4747
kvm.panic = function(state){
4848
kvm.type(state.msg);

0 commit comments

Comments
 (0)