Skip to content

Commit

Permalink
Version 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wejgaard committed Feb 15, 2015
1 parent 1911f09 commit 8e9e4a0
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 47 deletions.
34 changes: 34 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
The TclForth source is provided under the MIT license.
Additional licenses apply, see below.

The MIT License (MIT)

Copyright © 2015 Wolf Wejgaard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---

The TclForth system releases are based on:

The Tcl/Tk runtime system: http://www.tcl.tk/software/tcltk/license.html

The Metakit database: http://equi4.com/metakit/license.html


25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
##TclForth
##TclForth

A multi-platform desktop Forth based on Tcl/Tk. - Version 0.57
A multi-platform desktop Forth. - Version 0.6.0

####Overview
TclForth uses Tcl/Tk as its native language. The Forth source code is compiled to Tcl procedures for execution in the Tcl run time system. Tcl commands and Forth words coexist as a symbiosis of Tcl and Forth.


####Features#

* Universal desktop Forth, runs in Windows, OS-X, Linux, Solaris and more.
* Universal desktop Forth, runs in Windows, OS-X, Linux, and more.
* Native data types array, string, list, and dict.
* Native local variables.
* Native graphical toolkit based on Tk.
* Native database (Metakit).
* TclForth is provided as desktop apps for Windows and OS-X

Tcl view

* Arguments and results are transferred on a parameter stack.
* Concatenative/postfix notation.

####Installation
[Download the latest release](https://github.com/wolfwejgaard/tclforth/releases)
[Download the appropriate release and the source code](https://github.com/wolfwejgaard/tclforth/releases)

* Store the executable together with the source folder.
* Windows: Run tclforth.exe
* OS-X: Run tclforth.app

Both apps contain a Tcl runtime and a load routine for the TclForth source in the external source directory.
Both executables contain a Tcl runtime and a load routine for the TclForth source.




* Linux: Run tclforthx in a terminal or, if available, load tclsh. In the Tcl console:

Expand All @@ -44,9 +49,15 @@ https://groups.google.com/forum/#!forum/tclforth



####Release Notes
###Release Notes

#####Version 0.6.0

* Adapted to GitHub conventions:
* The TclForth systems are now provided as releases.
* Semantic versioning.

######Version 0.57
#####Version 0.57

* Console: New prompt, command line starts at the left border
* Console: Accepts pasting of source with multiple units/definitions
Expand Down
34 changes: 0 additions & 34 deletions TclForth.app/Contents/Info.plist

This file was deleted.

Binary file removed TclForth.app/Contents/MacOS/tclforthapp
Binary file not shown.
Binary file removed TclForth.app/Contents/Resources/vlc.icns
Binary file not shown.
Binary file removed TclForth.exe
Binary file not shown.
57 changes: 56 additions & 1 deletion source/compiler.tcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: compiler.tcl
# Project: TclForth
# Version: 0.57
# Version: 0.6.0
# License: Tcl
# Author: Wolf Wejgaard
#
Expand Down Expand Up @@ -367,3 +367,58 @@ proc printnl {text} {
puts $text
}
set MonitorFile ../../holon.mon
proc LastAccess {} {
global MonitorFile
if {[file exists $MonitorFile]} {
file stat $MonitorFile status
return $status(mtime)
} {
return 0
}
}
set LastRead 0
proc Monitor {} {
global LastRead errorInfo
if {$LastRead != [LastAccess]} {
set LastRead [LastAccess]
if {[catch DoIt result]} {
puts "Error: $errorInfo"
}
}
after 200 Monitor
}
proc LoadInConsole {file} {
global f Console comstart
set f [open $file r]; fconfigure $f -encoding binary
$Console insert $comstart [read $f]\n
close $f
}
proc DoIt {} {
global MonitorFile
# set result [uplevel #0 {eval {source $MonitorFile}}]
# set result [uplevel #0 {eval { LoadForth $MonitorFile}}]
set result [uplevel #0 {eval { LoadInConsole $MonitorFile}}]
# puts $result
# SendMonitor $result
EvalText
}
proc SendMonitor {text} {
set f [open $::MonitorFile w]
fconfigure $f -encoding binary
puts $f "$text\n"
close $f
}
proc StartMonitor {} {
global LastRead
set LastRead [LastAccess]
Monitor
}
9 changes: 6 additions & 3 deletions source/console.fth
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
\ File: console.fth
\ Project: TclForth
\ Version: 0.57
\ Version: 0.6.0
\ License: Tcl
\ Author: Wolf Wejgaard
\

: ConsoleWindows { -- }
"TclForth Version 0.57" Title
"TclForth Version 0.6.0" Title
".forth" "text" Widget Console
"-padx 10 -pady 10 -relief sunken -border 1 -highlightcolor white" Console config
"-expand 1 -fill both" Console pack
Expand Down Expand Up @@ -217,7 +217,10 @@ Code HideTclConsole { -- }
"<Down> {NextComline; break}" Console bind
ConsoleMenu
printforth
"A Forth access to Tcl/Tk" .cr
"Ctrl-C = Clear Console" .cr
"Ctrl-S = Clear Stack" .cr
"Ctrl-W = Show Words" .cr
"--" .cr
okprompt
;

2 changes: 1 addition & 1 deletion source/forth.fth
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Compiler \ SkipLine

\ File: forth.fth
\ Project: TclForth
\ Version: 0.57
\ Version: 0.6.0
\ License: Tcl
\ Author: Wolf Wejgaard
\
Expand Down
2 changes: 1 addition & 1 deletion source/tk.fth
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\ File: tk.fth
\ Project: TclForth
\ Version: 0.57
\ Version: 0.6.0
\ License: Tcl
\ Author: Wolf Wejgaard
\
Expand Down
Binary file removed tclforthx
Binary file not shown.

0 comments on commit 8e9e4a0

Please sign in to comment.