Home | Reviews | GUIpedia | Forum | Fun500


BrandonReflow
I see kyles new Reflow project. Whats with all the experienced coders and wacky ideas how the Computer should work.:P I think It might be need to see materialize (so I can steal all the cool stuff).
2008-08-222:55 PM

ksrRe:Reflow
Yeah, I've sort of set the bar high for myself. It's gonna happen though - making smooth and fancy graphics is no problem anymore, thanks to FreeBASIC. And I'm really making progress with the scripting language.
2008-08-223:02 PM

BrandonRe:Reflow
Got a screenshot? When can we expect a Demo?
2008-08-223:06 PM

ksrRe:Reflow
Hey, I haven't got it out of text mode yet lol. I'm not too far away from GUI mode though - I've just got to flesh out TNT with some commands, and then write the handlers.
2008-08-223:21 PM

BrandonRe:Reflow
Well I suppose Text mode is better than nothing.
2008-08-223:26 PM

ksrRe:Reflow
I've just got user subroutines (functions) working in TNT (the scripting language). This is the first part of the GUI back end, because events (such as button clicks, etc) are handled by special user functions. They work sort of like an interrupt: the locations of the handlers are kept in a vector table, and are jumped to when the event happens. This means that you don't actually need a 'main loop' in TNT scripts - all the code could be in the handlers. This also means that the 'end' statement at the end of a script isn't implied like in BASIC: If you don't put it there, the script will still execute, waiting for an event.
2008-09-165:33 PM

ksrRe:Reflow
Latest power feature: functions and overloading. When you define a function in TNT, you don't specify how many arguments it takes. You access them with the [i]arg n[/i] command, which returns the nth argument. Here's an example of a put (print) replacement (useless as it itself uses the put command :P): [code]{ function newput { if [= [arg 1] "-nonewline"] put -nonewline [arg 2] } { else put [arg 1] } } newput -nonewline "Hello" newput "Hello"[/code] As you can see, the function requires either 1 or 2 arguments, depending on the value of the first. Here's a more realistic example of a better-designed function that replaces put, with an added "-caps" switch that causes the output to be in upper case: [code]{ function newput #textptr points to the argument which contains the text to be displayed set textptr 1 #flags set nonewline 0 set caps 0 #loop through first 3 arguments set x 0 { while [< $x$ 3] set x [+ 1 $x$] { if [= [arg $x$] "-caps"] set textptr [+ 1 $textptr$] set caps 1 } { if [= [arg $x$] "-nonewline"] set textptr [+ 1 $textptr$] set nonewline 1 } } #dereference set textptr [arg $textptr$] #perform actions found and display { if [= $caps$ 1] set textptr [upper $textptr$] } { if [= $nonewline$ 1] put -nonewline $textptr$ } { else put $textptr$ } } #all valid newput "Hello" newput -caps "Hello" newput -nonewline "Hello" newput -caps -nonewline "Hello" newput -nonewline -caps "Hello"[/code]
2008-09-174:20 PM

Re:Reflow
What exactly does the QBasic CHAIN command do?
2008-09-176:20 PM

jasonwoodlandRe:Reflow
I think it's for Running BAS, EXE, BAT files.
2008-09-176:37 PM

ToddRe:Reflow
That's amazing, Kyle! Functions and overloading are a big step in programming a programming language! I have ideas for making an online scripting language too to help speed up the web-design process as well as to instruct programming. My ambitions are also to make a system-based, visual programming language. Similar to how VB can drag and drop window objects and create programs, I have a similar concept in mind. The only problem is that I'll be looking for something efficient to use. C++ and Delphi are pretty efficient but Delphi doesn't do SWITCHes with strings, only integers. :( So I'll be doing the old IF and ELSEIF statements for each command parsed. I did actually make a BATCH-like Windows-based programming language called Visual Q. I made it a couple of years ago but if you're interested in seeing how it works, just let me know and I'll send you a copy. It had some minor flaws (i.e. a function within another in a single expression) that caused problems but overall it's a pretty powerful language. I made a calculator program in it.
2008-09-179:22 PM

ksrRe:Reflow
That sounds very interesting, Todd. I'd appreciate a copy :)
2008-09-1812:13 PM

ksrRe:Reflow
Reflow is now being hosted at: http://code.google.com/p/reflow/ I will add to it soon, with some wiki pages and maybe a sreenshot mockup I have. When the project gets going though, all downloads, bugs and feature requests will be handled through that site.
2008-09-262:46 PM

ToddRe:Reflow
Sorry for not seeing that previous post, Kyle. I uploaded a copy of "Visual Q" which I called the language at that time. It's relatively simple to learn and in the "syntax.txt" file lists all the functions and commands. I never got around to making a well-flowing help and documentation file but I will be working on a VM-like programming language which I will document. http://www.sixbynine.net/filequick/117 The "ds32.exe" file was just an experiment with a 32-bit interpreter which is still very riddled with bugs.
2008-09-263:20 PM

ksrRe:Reflow
Wow, Todd, I'm impressed! How do you manage to compile EXEs?
2008-09-263:35 PM

ToddRe:Reflow
It doesn't really compile EXEs since it's 16-bit and just an interpreter. I hope in the VM, I can have it compile EXEs into a VM-interpreted byte-code.
2008-09-265:12 PM

ksrRe:Reflow
Ah, I see what it does now. Does it just create a copy of DSRUN.EXE, with the code attached as a resource or something? edit: nevermind, now I see that the code's in the DLL :)
2008-09-266:13 PM

ToddRe:Reflow
Yeah, that's the only choice I had. Which is why I plan to do 32-bit since I can write byte-code to the EXE and embed it so the EXE reads the byte-code and doesn't need any external files. But to compile the code to machine code would require a lot of knowledge in Assembly. I know the innerworkings of Assembly but I just don't know the instructions for every A, B, C, and D tokens.
2008-09-266:32 PM

GUIs


2021 Brandon Cornell