Home | Reviews | GUIpedia | Forum | Fun500


ksrReflow
I'm going to steal aguma's idea and post all Reflow updates in this thread. Feel free to post comments. Yesterday I implemented file handling in TNT. There are five functions inspired by their Tcl equivalents: open, close, read, getf and putf. getf returns one line at a time while read returns the entire file as a string. putf works just like the put function (which is used to write to the screen). Some example code: [code]#demonstrates file handling set file1 [open fstest.txt w] #open test1 for writing #file1 contains the file idenitifier putf $file1$ Hello #write "Hello" putf -nonewline $file1$ World #write "World" directly after close $file1$ #close set file1 [open fstest.txt r] #open the same file for reading put [read $file1$] #write the contents of the file directly #to the screen close $file1$ #close[/code] Plan for this week: implement arrays, more string manipulation functions, and start work on a QML reader.
2009-03-233:56 PM

ksrRe:Reflow development thread
Arrays are done. This involved quite a major change: to get the value of a variable you do this : instead of $variable$ as before. This means you can nest variables like this: returns the value of variable array, which depends on what the value of x is. Example code: [code] #crude for loop (i might add a {for } construct later) set x 0 { while [< 10] set x [+ 1] set array [* ] #fill array with square numbers } set x 0 { while [< 10] set x [+ 1] put #print each element } [/code] Because of this nesting which is a key characteristic of TNT, there are many possibilities. Multi-dimensional arrays are done by putting the subscripts next to each other: [code]set array "value"[/code] You can have an array of arrays (currently trying to think if this might ever be useful): [code]set array "value" #x arrays of n arrays each[/code] This functionality isnt really built-in, or specifically coded for. It just comes about because of how TNT handles variables. So if you wanted, you can have the subscripts at the front (array) or in the middle, or the subscripts can be text, instead of numeric. PS: Brandon, what happened to syntax highlighting?
2009-03-298:03 AM

BrandonRe:Reflow development thread
The forum upgrade turned it of, should it be on? Your GUI is looking good in concept :P
2009-03-298:20 AM

ksrRe:Reflow development thread - console input
There will be two different types of application in reflow, console and gui. This is set by the interface console or interface gui command at the top of the source code. At the moment as there is no GUI to speak of, only console applications are supported. To get input in a console app you use the get command. This is like INPUT in BASIC - it will halt the script (although other running scripts will execute as normal) until the enter key is pressed. An optional -s flag waits for a single keypress instead of a enter-terminated string, and doesn't print to the screen unlike normal get. Plan for this week: string manip, QML reader.
2009-03-306:19 PM

BrandonRe:Reflow development thread - console input
So would a possibly at version 1 be a Console, 1 task at a time version for limited systems?
2009-03-306:36 PM

ksrRe:Reflow development thread - console input
The first public release will certainly be console-only. Multitasking is already fully implemented though, so there will probably be some task-swapping or screen-sharing facility.
2009-03-306:49 PM

BrandonRe:Reflow development thread - console input
Cool, I'm liking the idea so far, and from past experience, it seems you make a quality product.
2009-03-307:46 PM

ksrRe:Reflow development - release 0.01
This first release is console only as promised, and is essentially just a preview of the scripting language. It features a very basic QML reader (no hyperlinks yet, I'm working on it). There are some example 'applications' in the apps folder too. To run them, change the startup line in sysconfig.ini. You can actually list multiple startup apps, but they will run on top of each other. If you are actually using DOS, rename wget.exe.dos in the sys folder to wget.exe. Use w and s to scroll up/down in the QML browser. Download: http://www.file-pasta.com/file/rf0.01.zip More soon
2009-04-038:28 PM

pharoahRe:Reflow development - release 0.01
I'm getting a page fault in DosBox with CWSDPMI.
2009-04-038:44 PM

ksrRe:Reflow development - release 0.01
Yeah I'm not sure why it doesn't work in DOSBox. Are you on Windows? Can you try running it in a command prompt window?
2009-04-038:51 PM

pharoahRe:Reflow development thread
Just rebooted it, very impressive! I like the scripting language, one of the best I've seen. Also I believe you're the 3rd person in the world to write a QML reader :). You need to make a homepage for it.
2009-04-038:53 PM

BrandonRe:Reflow development thread
It won't run in DOSEMU either.
2009-04-039:21 PM

ksrRe:Reflow development thread
I'll try and investigate what is making it crash. In the meantime, Brandon, can you try it in Windows?
2009-04-048:43 AM

BrandonRe:Reflow development thread
I hate the devil, I think I can get out my thin client (which currently runs FreeDOS) and try it a little later.
2009-04-0410:06 AM

ksrRe:Reflow development thread
I've stopped it crashing in DOSBox so hopefully it will work in DOSEMU now too. I didn't realise that DOSBox has no network support though so it's pretty useless. d/l: http://file-pasta.com/file/rf0.02.zip
2009-04-0410:13 AM

BrandonRe:Reflow development thread
Perhaps it would have worked in DOSEMU if I was smart enough to rename the WGET files :P Anyways, it does seem to work pretty well, considering it was made in a scripted language. I'm excited to see what comes next.
2009-04-0410:46 AM

ksrRe:Reflow development thread
I've been 'porting' Reflow to GUI/graphics mode (release 0.03 coming soon..) and everything is working fine apart from this bit of code: [code] shell "sys/wget -q -O etc/url " + px [/code] For some reason, when wget is called, the I get a garbled screen. The -q means it shouldn't output anything to the screen, and I've tried sticking > nul on the end too. Anyone have any ideas? It works just fine (although extreeeemeely sloooowly) in DOSBox.
2009-04-176:35 PM

ksrRe:Reflow development thread
I'm not sure whether this is a bug with wget, FB or what. Running it on my laptop doesn't garble the screen but it distorts it, and you have to change screenmodes to correct it - not very convenient. Could you please run the attached wt.exe file and see what happens? http://file-pasta.com/file/wget.zip
2009-04-176:58 PM

BrandonRe:Reflow development thread
It worked for me in DOSBox. And in FreeDOS. No garbling :P
2009-04-177:01 PM

ksrRe:Reflow development thread
Well, the wget in the zip is the Windows version, so that's maybe why it's working in FreeDOS (as it won't have executed wget).
2009-04-177:10 PM

BrandonRe:Reflow development thread
lol, that is very funny. Why'd you include the windows version?
2009-04-177:44 PM

ksrRe:Reflow development thread
Because that's what I'm developing on :P The DOS version of wget seems to work ok - it must be just a quirk with the Windows version, which is a shame. Do you know of a wget alternative available for windows and dos?
2009-04-1810:43 AM

BrandonRe:Reflow development thread
Nope. Who cares if the Windows one has a quirk? It won't be there in the actual GUI, which will be on DOS.
2009-04-1810:51 AM

pharoahRe:Reflow development thread
I'm trying to keep tabs on all the QML reader projects. How is this one going?
2009-04-2610:43 PM

GUIs


2021 Brandon Cornell