00:00:00 --- log: started retro/06.10.23 00:29:50 --- quit: Quartus (Read error: 104 (Connection reset by peer)) 00:31:07 --- join: Quartus (n=trailer@CPE0001023f6e4f-CM013349902843.cpe.net.cable.rogers.com) joined #retro 01:04:51 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #retro 01:50:05 --- join: Cheer1 (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #retro 01:51:26 --- quit: Cheery (Read error: 110 (Connection timed out)) 01:56:18 --- nick: Cheer1 -> Cheery 02:27:26 --- quit: Cheery (Read error: 110 (Connection timed out)) 02:32:58 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #retro 03:07:31 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 03:09:50 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #retro 05:21:53 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #retro 05:52:41 --- quit: neceve (Read error: 113 (No route to host)) 06:05:37 good morning 06:26:30 hi 06:26:37 I'm considering to improve my assembler. 06:26:40 hi Cheery 06:26:43 cool! 06:29:29 I'm going to introduce bit of portability and few seemingly new methods I inherited from SEAForth assembler. I'm going to improve that a bit. 06:29:42 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #retro 06:30:00 So the end result is something which does seem like a forth, but is assembly code to it's deepest soul. 06:30:14 not needing hardware stack at all. :) 06:30:21 Good morning. 06:30:26 hiya Ray_work 06:30:35 What do you think? lukeparrish? 06:30:43 interesting thought 06:31:08 it'll have a dictionary? 06:31:32 ugh, I meant to say data stack. 06:31:44 the resulting code is just pure assembly, it doesn't need data stack neither it needs a dictionary. 06:31:59 Thought, I'll do relocatable code support later. ;) 06:32:04 ah, so just a macro assembler? 06:32:11 that's a good idea 06:32:31 erider has been talking along those lines of late. 06:32:36 well, it's highly advanced macro assembler. 06:32:41 :) 06:33:12 the interpretation is done like it is done before. 06:34:21 the lateston my db: http://retroforth.net/paste/?id=237 06:37:28 So erider already said something like this? 06:37:48 oh well, he's good player if he did .:) 06:38:15 he's been thinking of making a forth-lisp (as have I) and one thing that came up was keeping forth as a macro language 06:39:03 well, I wouldn't keep this as a macro language. 06:39:25 you'd condense it down further to pure assembley 06:40:07 the implementation I have in mind is something like: ] 2 3 + 1 + [ would become: mov $2, %eax; add %eax, $3; add %eax, $1 06:40:09 lukeparrish: the database is starting to shape up nicely. I wanna see if I can use it in RxChess so that I can gain a better handle on all the information that I need to store for each move. 06:40:35 hmm. you can make inline forth functions that are more assembley like (as opposed to lots of jumps), but they take up more space. 06:40:44 gotta go :( 06:40:51 Ray_work: glad you like it :) 06:41:23 have a great day! 06:41:25 ~ 06:41:36 bye 06:43:03 So in general, things are going all well with keow? 06:43:28 Ray_work: what do you think about such system? 06:43:31 me doesn't know. 06:43:57 I haven't been following it's progress as much as I would like. 06:45:06 well, it's going to be a full fledged forth compiler rather than assembler used by forth. 06:45:27 Thought, first thing I'll need is the unificator. :) 06:45:32 I really need it more than ever I guess. 06:48:16 I have never worked with forth before. I have been looking for a language that is compiled, better memory usage, faster than my typical scripting languages that I use such as PHP, Python, Ruby but not as complex, cumbersom and dangerous as C. I mainly do database programming. Is forth something I should look into? 06:48:43 for some things like bookkeeping which registers are used and how they should be used that it'd be most optimal, unificator could be useful. 06:49:08 Depends, retroforth is something most people should look into. :) 06:50:26 Cheery: so is your assembler going to be like a forth with a ~2-cell-deep data stack? 06:50:30 it is simple; you can even do your own if you have some time. it is thin; there is not much in it. it's less dangerous; hence not as cryptical syntax shit is done like c has. 06:50:43 Are there libraries for accessing say, Postgresql, mysql, etc? 06:51:17 timlarson_: yes, shallow data stack which uses registers instead of stacks. 06:51:35 ie, amount of registers is abstracted away, and their existence. 06:52:15 sounds good, as long as when you need to specify certain registers you can, e.g. for system calls. 06:52:41 I think I'll do some kind of platform dependent hinting. 06:52:49 for things just like you said. 06:54:22 But same time I'm going to put in variables which tells in what implementation you are. 06:54:28 jeremy_c: if you look into some of the "larger" forths, you may find those libraries you need. These forths included the free Win32Forth, and Gforth, and the "Got-a-trial-version but the main version is payfor" = Swift Forth by Forth Inc. 06:54:36 so a normal assembler-semantics, but with a forth-like syntax instead of the standard ugly asm syntax, and with auto-register-selection with manual override possible? 06:54:56 exactly. 06:55:17 I like it :) 06:55:27 I thought you like it. ;) Because I like it too. 06:55:32 jeremy_c: for retroForth, you would mostlikely need to use the foriegn function interface, and access those applications thru that. 06:59:29 Cheery: if you make parts of the assembler vectorable (if I have the term right) words then it should be easy to plug in different register auto-selection logic for different platforms (even if the auto-selection logic itself may be difficult in some cases). 07:01:52 yep, hail for vectorable words! 07:01:52 :P 07:02:02 I think I should've done it like this in beginning. 07:02:35 But I didn't invent this yet that time, so I don't feel guilty. 07:02:54 Hmm. Thought, I think I need few things I've seen once. 07:03:13 I remember the cool interpreted if, else, then -clause from somebody around here... 07:03:20 jeremy_c: tipically, if a forth needs a database, the programmer will roll his own. unless of course the database already exists. timlarson: arn't you doing something with retroforth and a database? 07:04:06 I am using sqlite...and may use rxforth at some point in combination with this. 07:04:30 Ty. 07:05:00 but if Cheery turns out something good (sounds like it is coming along...) I may use Cheery-asm with fisp instead or also. 07:05:48 Ray_work: Cheery: As someone looking for a new language to learn, debating ones such as C++, Eiffel, ADA, Pascal, for the purpose of a compiled language with better performance thatn scripting languages, why should I look at forth? I am not wanting to put anyone/any language, down just wondering because learning a new language is a major time investment. 07:06:47 Forth has been called a secret weapon. The best reason to learn forth is to learn 07:06:57 "another" way of programming. 07:07:41 The biggest problem with forth is that the community has not seen a real need to interface with the rest of the world. 07:08:56 forthers would rather use programs in other languages that do the job sufficiantly already. They tend to use forth where computation is intensive, or where controlling hardware and other devices are necessary. 07:09:26 Forth will change the way you program in just about every other language. 07:09:41 Or where forth's interpreter is like a caffeine in your coffee. 07:09:47 which really is not my area of expertise. By trade I am a database programmer. Nothing more than normal +, /, *, etc... 07:09:47 It's worth knowing. It most likely won't be necessary on the job. 07:11:35 Where forth excells is in createing problem-specific languages. What I mean by that is... You have a problem you'd like to solve, you write words that are the lexicon of the problem and these words carry out the functions that pertain to solving the problem. 07:12:21 Forth is just an another incredibly useful tool, it is not just in mainstream too often. ;) 07:12:55 oh well, if gForth is representing forth, I do not wonder why. >;p 07:13:01 :) 07:14:59 I must agree it doesn't look good. 07:21:40 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #retro 07:24:25 Hmm. code parameters... I wonder how this system should emulate the data stack in a stackless environment. 07:24:40 would one use registers or return stack? 07:24:41 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #retro 07:25:20 oh well, I guess I'll use registers. 07:26:10 the extra hints for compiling can be then putted to the dictionary. 07:28:57 that should be a sufficient ABI in shallow-stack -forth. 07:31:53 Especially if I could make the stack pattern static, so that every time, mostly same registers will be used. ;) 07:35:53 but... maybe that is not necessary, only one number/buffer would be necessary for storing the register ordering, and maybe it could be even easily expected. 07:52:00 --- part: jeremy_c left #retro 08:03:30 I think I call my next assembler "one experience assembler" 08:03:47 until I find a shorter name. :D 08:04:09 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-096-249.pools.arcor-ip.net) joined #retro 08:07:25 --- quit: Snoopy42 (Read error: 104 (Connection reset by peer)) 08:07:37 --- nick: snoopy_1711 -> Snoopy42 09:04:22 --- join: erider (n=erider@unaffiliated/erider) joined #retro 09:17:02 --- quit: erider (Read error: 104 (Connection reset by peer)) 09:29:58 --- join: erider (n=erider@unaffiliated/erider) joined #retro 12:41:15 --- quit: Cheery (Read error: 110 (Connection timed out)) 13:28:24 --- quit: timlarson_ ("Leaving") 13:32:51 what does exactly the hide word do? 14:07:12 hmm.. well why the hell is rxforth slow on so simple benchmarks like helloworld compared to gforth? somehow that doesn't fit into my world where assembler code is faster than C code. 14:13:05 hmm 14:13:29 virl: basthem lol 14:16:44 basthem? 14:17:12 what is a basthem? 14:18:19 never mind but why are you going off 14:24:28 going off?! now I'm confused.. 14:26:16 virl: about gforth and rf 14:27:08 --- join: redear (n=pocketpr@66.146.130.82) joined #retro 14:31:56 --- nick: Raystm2 -> babstm 14:32:05 --- nick: babstm -> nanstm 14:33:23 --- part: redear left #retro 14:42:16 --- join: crc (n=crc@pool-151-197-229-182.phil.east.verizon.net) joined #retro 14:42:28 --- mode: ChanServ set +o crc 14:43:13 Hi crc. 14:43:22 hi ray 14:46:47 virl: hide makes a name in the dictionary invisible 14:47:19 I use it in the rf ans layer; I alias several words into their own vocabulary, and then hide the originals. 14:47:20 it rechains the :link fields a bit, it doesn't actually remove the name 14:54:26 hi crc 14:54:43 whats is virl talking about 14:57:18 a while back, I'm reading the logs 14:58:09 erider, he asked what hide does. 15:02:03 huh? 15:02:15 virl. Asked what hide does. 15:02:45 ok just tell me to stay out of grown foaks business lol 15:02:59 erider, I'm sorry, I'm not understanding you. 15:03:32 I don't know either I well don't like english 15:03:47 s/well/really 15:04:14 --- quit: Ray_work ("User pushed the X - because it's Xtra, baby") 15:14:13 crc: rf doesn't preform better then gforth? 15:15:54 that depends 15:16:16 gforth has a lot of optimizations for speed; rf/rxforth do not 15:16:32 (though rf 9.3 will bring some) 15:19:07 which optimizations could be good for rxforth? 15:19:28 a version of the core optimized for pentium or higher processors 15:22:45 more inlining, making sure code and data are separate, and keeping things aligned would also help 15:23:01 Hashed wordlists, perhaps. 15:24:10 that would help reduce compilation time for larger programs 15:24:26 Yes. Small thing. 15:25:29 One benefit of the simple linked list you've got now is that it was trivial to add wordlist support on top of it. I think it'd need to be added from the inside, if the implementation were optimized with a hashtable. 15:26:44 I have no plans to switch away from the linked list I use at present 15:27:45 what else... constant folding, maybe. 15:28:24 My redefined CONSTANT does that, but a fancier one could translate 3 5 + 2 * into 16, or 72 9 swap drop into 72, etc. 15:28:29 oops, into 9, I mean. ;) 15:30:01 I have explored some things along those lines 15:36:12 * lukeparrish is back from work 15:36:57 darn it, we scared off jeremy_c 15:38:06 hi luke 15:38:12 hi crc 15:41:52 hmm. rolling one's own database vs. using interfacing to mysql. which is best? 15:42:44 Depends on whether you're just fiddling around for your own amusement, or you have something practical to accomplish. 15:43:22 forth or perl, which is best? 15:43:37 Best for what? 15:44:04 depends what you need it for, I guess 16:01:02 interfacing to mysql puh... 16:01:11 --- quit: virl (Remote closed the connection) 16:01:28 there's a one-note banjoy. 16:01:31 hehe. banjo. 16:13:55 and it's a sour note. :( 16:14:10 hi nanstm 16:14:13 slashsexchange. 16:14:19 No, he's a vision of joy and levity. 16:14:34 --- nick: nanstm -> Raystm2 16:15:00 hi erider, sorry, i'm not my wife, tho she's prob'ly a better conversation. :) 16:15:13 jeremy_c will be back 16:15:26 You know jeremy_c? 16:15:42 he is trying to decide what language to invest his time in 16:15:43 jeremy_c will be back in THUNDERBALL! 16:15:43 Did you send him here with out protection, nay a raincoat? 16:16:23 hahaha. ( bond theme plays so loud in Ray's mind that Quartus can hear it all the way in Canada.) 16:16:24 erider, if he's just starting out, he should invest his time in a a dozen or so languages. 16:16:31 da da DA DA! 16:16:46 I brought him here to ask the forth experts 16:17:04 Both of them? 16:17:32 You should have told him that they are _both_ here after crc gets home. 16:17:57 he has a web thingy that he has been working in php and ruby and now he is looking for performance 16:18:22 has he determined where his bottlenecks are? 16:18:29 Would be cool to see him do it in forth, but I fear it's a long way from here. 16:18:38 he is looking at fpc but bigforth is running a close race 16:19:33 memory management is one of the things he wants 16:20:03 Ok. Sounds like he hasn't done any analysis to see where his bottlenecks are, and that he's floundering around looking for something that'll magically make it all better. 16:21:51 well I wouldn't say that its just I having asked him 16:22:03 * Raystm2 going to the store for food and supplies. Ya'll talk amonst yourselves till I return. :) 16:22:39 I would think, having written an application that I wanted to optimize, learning a new language would not be the best first step. 16:22:44 Oh pardon my manners... Anybody need anything? 16:22:46 I think he doen't want a scripting language to handle this web thingy do to the lack of performance that they bring 16:22:54 Raystm2, snack cakes. 16:23:13 hmmm snack cakes ( Homer Simpson) 16:23:22 hmm snack cakes sound good :) 16:23:26 hehe 16:23:48 Sugar free snack cakes, coming up. :) ( bleh!) 16:23:55 * erider goes to the kitchen 16:23:57 eww :) 16:26:27 --- join: jeremy_c (n=jeremy_c@cpe-71-74-145-210.neo.res.rr.com) joined #retro 16:27:18 Q I ask jemery_c to join 16:27:18 you can ask him directly 16:27:58 Hello. 16:28:12 hi 16:28:49 hmm did Quartus go and get snack cakes too... 16:29:20 erider: you use forth? 16:30:22 I wouldn't say I use it I'm studying it due to its going to be a major part of the language we are working on 16:30:48 erider: how is it going to be a part? 16:31:26 some of the semantic style 16:31:38 the use of stacks and such 16:31:55 erider: I've never programmed in a language with stacks. What's the advantage? 16:33:45 erider: what do you mean behind the scenes? 16:37:13 a stack is simply an array of contiguous memory with a pointer that gets incremented or decremented, so you can easily get to the top element. it is a fundamental construct of memory, so all languages use it behind the scenes. 16:37:34 * lukeparrish was gone at work earlier today 16:38:00 saw your questions in the backlog though 16:38:22 lukeparrish: I understand the use of a stack in that regards. erider was speaking about it in regards to syntax and forth. 16:38:35 cool 16:39:04 lukeparrish: erider has suggested the possible use of forth. I've never used forth before. Ruby, Python, C are my main languages. 16:39:28 lukeparrish: I have been looking for something in between C and Ruby. Want better performance, memory usage but not the complexity or dangers of C. 16:39:48 hmm. perl maybe? 16:40:00 not sure about the memory aspects there though 16:40:09 lukeparrish: from my experience, and limited testing, perl is not very fast. 16:40:11 how bad is ruby on memory? 16:40:31 I can do in C in about 1mb what ruby takes 30 or so do to. The real thing with ruby is speed. 16:41:31 forth is less strict than C, hence it can be more dangerous 16:41:34 An example, a web app I have in ruby on my desktop pushes about 35 requests a second. I created a small segment of that app in C. Exact same template, exact same database queries, doing all the same work (parsing cookies, etc...) and the C app on my desktop push 1,600 requests /sec 16:42:29 jeremy_c: are you using sqlite with C 16:42:36 crc. contrariwise, Forth doesn't allocate data structures on the subroutine stack, so it's perhaps harder to exploit. 16:42:43 erider: no, in the above it was mysql. 16:42:47 * erider lol is reading about sqlite 16:42:49 Quartus: true enough 16:44:48 jeremy_c: are you needing some cgi stuff 16:45:13 erider: I use FastCGI in my examples on C and Free Pascal. 16:46:55 whats the speeds between fpc and C 16:47:27 fpc is about 1.5x slower overall (according to computer languages shootout). 16:47:52 Since when is the shootout benching a DOS-specific Forth? 16:48:08 I'm talking about the example you had 16:48:27 oh, unfortunantly I didn't code the same example :-/ 16:48:36 ah ok 16:48:43 Quartus huh? 16:49:01 FPC is the name of a DOS Forth implementation. Are you using it here to mean something else? 16:49:29 yes 16:49:34 FreePasCal 16:49:37 free pascal 16:49:56 * lukeparrish guessed right :) 16:50:02 It's a Forth-relative channel, so you can see where the confusion would come in. FPC was a major DOS Forth. 16:50:41 erider: in some instances, ruby is 641 times slower than c. However, the average 155 times slower 16:50:55 Quartus: fpc I am speaking about is free pascal. http://freepascal.org 16:53:56 I knew that Ruby was exceptionally slow, but that's huge. 16:54:29 I knew those delays were ominous when I installed Rails 16:56:18 lukeparrish: Quartus: It really is terrible. 16:56:56 Now, I use rails at work, and it does do some nice things and quick for the programmer, but at work, we throw two 5k servers at it and let the servers do a few other things, and we got a nice system. 16:57:19 Most of what Perl actually gets used for is calling out to external libraries, so it might be faster for your purposes. 16:57:41 Of course, if you don't know Perl, that's gonna slow you up. 16:58:01 perl is fun. well, I like it. 16:58:13 Quartus: Right now I'm not looking for a language I neccessarly know, but one I can put into my toolbelt as between C and Ruby. 16:58:37 That's a pretty wide field, if Ruby is 155 slower than C. Pretty much everything fall inbetween. 16:58:39 I've explored Pascal, Eiffel, Ada, OCaml and a few others as well. 16:58:49 the perl man pages are very extensive. lots of examples available. 16:59:16 Quartus: OK, maybe I should say as close as I can get to C, but staying away from the danger and complexitities, maybe with a good standard lib also. 16:59:27 For CGI work? Perl is the obvious choice. 16:59:39 Quartus: I'd love to have simplicity of Ruby and speed of C, but that will not happen. 17:00:15 If you already know C, Perl won't be much of a reach. It's used a lot for CGI, so it's tuned for that. 17:00:25 Quartus: according to the computer language shootout, ruby and perl are about the same speed, no? 17:00:33 php is very similar to perl. 17:00:50 I take that back, perl is a bit faster than ruby, but not too much. 17:01:11 8, 9x faster. still, 145x slower than c. 17:01:12 jeremy_c, maybe they are, if you're trying to do the Sieve of Eratosthenes, or calculate PI. Again, what most often happens is callouts to library code. Perl is used hugely for CGI, so that stuff is well-tuned. 17:02:25 --- quit: Shain (zelazny.freenode.net irc.freenode.net) 17:02:40 But as I said (possibly before you were here), if you have an app that's slow, the right answer isn't to learn a new language and recode it; it's to find your bottlenecks and optimize those with tools you already have. 17:02:45 --- join: Shain (i=steve@c-67-161-56-76.hsd1.ca.comcast.net) joined #retro 17:03:22 If you run out of tools to do that with, then you'd branch out. But if you've got a scripting language, and you've got C, you can solve your problems with those without first learning an entirely new skillset. 17:03:55 If you really think the only solution is learning a new language, Perl is a lot closer to what you already know than something like Forth. 17:04:07 Plus, Perl is tuned to the application domain. 17:05:05 when not just use a language like lua that you can extend with C 17:05:18 You can extend Perl with C. You can extend Ruby with C. 17:05:28 You can extend Forth with C, for that matter. 17:06:08 agreed :) 17:06:34 but lua is written in C and is very lite weight 17:06:43 I'm just saying, tossing out your app and re-writing in a language you have yet to learn it is not a practical approach for any but the most trivial of apps. 17:06:59 is there a way to embed perl in html the way php is generally embedded? 17:07:10 yes 17:08:56 why is it generally not done? 17:09:10 a cgi-bin seems rather silly, actually. 17:09:33 it's ugly and seen by the user, when it's really a programming detail. 17:09:50 lukeparrish: I very much dislike embedding code in HTML. Very easy to make an unmaintainable app. 17:10:12 an app using fastcgi is the only way to go. 17:10:37 how does fastcgi do it? 17:11:22 lukeparrish: fastcgi is nothing more than an interface to a web browser that maintains a running app. So, your app starts, connects to database, builds cache, sets up whatever it needs, then sits and waits for a request to come in. 17:11:36 The webserver will give it a request, it'll run, then it goes back waiting for another request. 17:12:01 It's not really a way of where the bin is or embedding in html, etc... in fact, PHP can be setup to run in a fastcgi enviornment instead of, say, mod_php. 17:12:59 * erider is going nuts that he never got into webstuff :( 17:13:22 hmm. can the bin be made invisible? can it look like it's embedded in html? 17:13:40 lukeparrish: my app never uses cgi-bin in the URL. infact, it's all .html extensions. 17:13:55 cool 17:14:15 i.e. /patient/view/100.html that actually runs the patient module, the view function, and sends 100 to it as the id to lookup. 17:14:43 nice! 17:15:07 does fastcgi make this pretty simple to configure? 17:15:33 lukeparrish: fastcgi does nothing for you in regards to how your app works. 17:15:56 ok, what does? 17:16:01 lukeparrish: your app :-) 17:16:20 lukeparrish: i.e. with apache, I have a mod rewrite that says if it doesn't exist in the file system, run this binary 17:16:33 or, more correctly, give it to the fastcgi binary already running. 17:17:03 My fastcgi binary then simply looks at the URL, say, /patient/view ... it then calls the correct module/function. 17:17:20 that sounds sensible 17:17:54 lukeparrish: there are quite a few frameworks that exist that will do thinks like that for you, such as ruby on rails. 17:18:12 lukeparrish: I then use a text templating system, like Smarty or libtmpl that will abstract the HTML. 17:18:34 lukeparrish: I never code HTML output in my application. Nor do I code my application in HTML. It's a strict MVC. 17:18:49 MVC? 17:18:55 model view controller. 17:19:08 model is the database, view is the HTML, controller is the application. 17:19:37 cool 17:21:11 * jeremy_c pasted http://pastie.textmate.org/19206 17:21:45 that's an example of what I am talking about. 17:23:49 jeremy_c: neat I don't think you can do that in C 17:23:51 * jeremy_c pasted http://pastie.textmate.org/19207 17:24:06 erider: sure you can. I've already done it. 17:24:32 not looking that clean :) 17:24:35 there, that last paste is a very simple method of looking at the URI and making a decision as to which module/function to run. That is my Pascal version. 17:25:09 * jeremy_c pasted http://pastie.textmate.org/19208 17:25:10 this is interesting stuff 17:25:13 erider: that's the C version. 17:25:22 erider: that does the *exact* same thing. 17:25:34 well, except set the added_company_id 17:25:51 mierda! use C! 17:26:12 5 lines 17:26:29 35 in pascal 17:26:54 erider: that's not the decision making for which module to run. that's only the list function. 17:27:12 ah ok 17:27:27 but the list function in pascal is 35 lines 17:27:47 http://pastie.textmate.org/19206 17:28:00 that's the list function, it's 5 or 6. 17:28:15 minus the HTML template. Both use the same template, the C and pascal version. 17:28:24 anyway, I am seriously off topic w/this on #retro. 17:28:28 sorry. 17:28:35 it's cool though :) 17:28:48 we discuss all kinds of things 17:29:49 lukeparrish: anyway, see what I mean about seperation of controller/view ? not mixing HTML and code, nor code and HTML? Makes for a very clean source tree and also, you can have HTML designers working on the view and not messing your code. 17:30:21 hmm. you mean having the template seperate from the code that controls it? 17:30:31 lukeparrish: right. 17:30:35 makes sense. 17:31:30 lukeparrish: the template has a very limited amount of "code" that can be inserted, such as {{if $company_was_added}}
Company was added!
{{end}} 17:31:36 jeremy_c: lukeparrish, crc, or I don't punt you, your topic is fine. :) 17:32:32 jeremy_c: more importantly, we seem to be learning from you. 17:33:19 Raystm2: I'm happy that someone's learning from me. Too often I'm the one asking the questions :-) 17:33:46 I'm learning from you, and I wish I could form the questions. 17:34:43 Raystm2: it's all a matter of where we spend our time at. I've been developing web database apps for 10 years now. 17:35:46 * Raystm2 doesn't remember a time when anybody got punted from this chat that wasn't in fun and the person was allowed back in immediately. 17:36:14 * lukeparrish doesn't remember that time, either 17:36:23 :P 17:36:27 arke would punt you for fun. 17:36:34 lol I like the word punted 17:36:38 Part of his personallity. 17:36:40 (that means kick, right?) 17:36:43 ya. 17:37:13 Punt is football for "Give the ball to the other team cuz we couldn't get 10 yards in 3 downs". 17:37:27 It's done with a kick, yes. 17:37:38 maybe 6 years ago I messed around with php and perl for a while. haven't done a lot with them since :/ 17:38:40 I played with perl for about 20 minutes in 1997, and I loved it, even tho I was told that it was write-only. 17:38:44 I played with perl on some bot and text correction stuff but I was pulled away by lisp 17:39:02 Me too. Lisp got me away from perl. 17:39:26 Forth got me away from lisp, and colorForth got me away from all reason. 17:40:17 RetroForth is starting to bring me back into the human fold. 17:42:18 jeremy_c: It's like I said thismorning, Forth is worth knowing. Don't expect to beable to do anything productive with it. I mean, we all do productive things with Forth, but it's rare. In this chat there may be only 2 people making any money using forth. 17:42:52 There are only 14 people in this chat, so that's pretty amazingly high. 17:43:08 12, actually (I'm two of'em, and ChanServ is one.) 17:43:09 Not for a chat dedicated to the language 17:43:15 . 17:43:34 This is #retro, which is dedicated to a particular free and experimental variant. 17:43:44 Well, I suppose this is an experimental version, but go to # forth and its even lower. 17:43:56 ya. 17:43:58 Q you were the guy that said 12 languages right 17:44:00 Great minds... 17:44:42 erider, yes, I promote knowing as many computer languages as you can manage, particularly including ones that aren't Algol-derived. 17:46:45 thats seems like a big task some would say just learn one real well 17:47:03 Do that too. 17:47:04 * Raystm2 retroforth = 18 for moi. Tho, I've only ever really done the tutorials and never have done any production code ever. 17:48:33 I love lisp but I can't be stuck in a box when I'm programming 17:51:12 Dinner. 17:51:36 Quartus: to answer your question/statment a while ago about learning a new language. Many times I just wish I had one in my belt that was in between C and Ruby. So, I've been on a search for that language. 17:52:35 Forth is worth learning not because it's between any two languages, speedwise, though in this case it is, but because it's not Algol-derived, it'll teach you new ways of thinking, teach you to factor, and those skills will serve you well in all your programming in any language. 17:52:49 Quartus: to trash an app and recreate for sole purpose of better performance is questionable. However, pair that with a purpose for learning a new language, then against the time it takes to narrow down performance problems, create in c, expose to scripting language, and it might just be worth it. 17:54:04 Quartus: I don't even know what you mean by factor :-/ ... The only Non-algol language I've delt with is OCaml. I got to the point I could make some small utilities without refering to reference manual, but no guru... Learning OCaml was good for me, it did exactly what you said... my abilities in existing languages took a boost. 17:54:22 Same would happen with Forth, but perhaps to a more dramatic degree. 17:54:55 Quartus: what is so interesting/powerful about forth that it would have that effect? 17:57:14 It's stack based, so parameters are passed anonymously; because of this, it's optimized for function calls, so it encourages the writing of short, visually-obvious, and testable words. Words (functions) are first-order objects in the language, so skill at naming them is important. The process of writing Forth is something like writing a small language in the specific problem domain, 17:57:19 and then writing the solution in that language. 17:58:37 Quartus: hm, that is different than I currently do. I analyze the problem, see the solution in my mind, then transfer it to code. 17:59:02 Understanding the problem well enough to break it down into well-named, short, testable words is called 'factoring'. It's critical to good Forth, and it's an amazingly useful skill to develop. 17:59:26 Quartus: yes, I can see that applying to other languages already. 18:01:26 Quartus: hm, that was horrible English, maybe I should learn that language first :-) ... I meant, yes, I can see how that would be beneficial for application into other languages that I know already. 18:02:22 Learning to write words that take, at most four stack items; learning to abstract functionality behind well-chosen names; learning to build your application in layers of abstraction, testing as you go; building incrementally and interactively -- all useful. 18:04:29 My lisp monk told me that same thing :) 18:04:32 Forth recompiles so quickly it's barely noticeable, so your edit/compile/test cycle is really just edit/test. 18:05:07 I think every language need a interactive mode 18:05:22 that should be the standard in language design 18:05:49 You can test Forth without a test harness, as you're interacting directly with the same vm it's running on. 18:06:39 But I wouldn't suggest learning Forth as some kind of gap-filling solution for a toolkit, or because you think an existing application needs optimization. Learn it for the sake of learning it. 18:08:00 I agree 18:08:10 Quartus: it's always good to have a test case for learning though. 18:08:19 * jeremy_c thinks 18:08:50 but I'm learning it for the sake that I need to read that code and be able to understand some of the implementation 18:09:05 Quartus: however, what I do almost 99% of the time is database programming, is forth suited for that? a comment here yesterday made me think no? 18:09:40 Most of that is just scripting, calling out to external libraries, yes? 18:09:44 lukeparrish: make a dbase thingy that was neat 18:09:55 For my money, forth just makes more sence then anything else i've ever seen, save being a savant that can code directly in machine. 18:09:55 Quartus: most of what? 18:10:01 Most database programming. 18:10:25 Quartus: asking the database for information, processing information and doing things with the information. 18:10:38 Sure. That doesn't demand much of a language. 18:11:00 Quartus: i.e. one of my projects right now I am working on is an EDI translator. I have to read many tables, assemble information and create a terrible looking EDI file that also validates to a set EDI spec. 18:11:16 Yuck. 18:11:44 Quartus: nothing demands much of a language. All can benefit from a language that helps the programmer do the job better, cleaner, more maintainable, etc... 18:12:24 Quartus: have you delt with EDI files before? MAYBE*YOU*KNOW WHAT~I'M TALKING*ABOUT~ 18:12:35 Quite a few tasks demand quite a bit of a language. But retrieving data from external tables via an external database engine, especially in linear fashion, and reassembling that data in another format, is not a challenging task in any language. 18:13:48 Quartus: maybe I've oversimplified all the programs I've ever written, but everything I've ever written I could have written in any language I knew. 18:13:59 or maybe I've never written a complex program. 18:14:12 I don't know. Most journeyman code is pretty pedantic stuff, to be sure. 18:14:55 The largest app I maintain is 200k lines, mixture of ruby, python, and even some bash in there gluing some things together. 18:15:05 but size does not equate to complexity. 18:15:14 True. 18:15:41 Quartus: what would you call a task that requires quite a bit of a language? 18:16:40 I've never gotten into graphics, or simulation. I can see how those would be some complex tasks. But still, seems like any language would do them, just some faster than others. 18:18:05 Let's see. Statistics-management packages. A graphics manipulation package (transforms, etc.). Simulators of various kinds. Expert systems. Circuit analyzers. Equation solvers. Grammar analyzers. 18:18:45 those can't be written in Ruby? Python? C? 18:19:42 I'm sure you could write them in binary with the front panel switches on a PDP-8. 18:20:38 To me, they are all programs, all can have an amount of finesse to them. i.e. I can create a database view screen or I can create a database view screen that is maintainable, optimized, minimum code, layered code reuse, etc... all of that takes a bit of skill. 18:21:56 They indeed are all programs. Some languages make it easier to manipulate certain kinds of data than others do. Forth is among the languages that allow you add new datatypes as first-order objects in the language, so you can build the desired target language for the problem domain. 18:23:07 For instance, though this is a smaller example, I have a BNF package in Forth that defines a BNF language. I can then write BNF productions like this: 18:23:26 You dont send software to Mars written in C. Forth on the other hand... 18:23:33 BNF: ;BNF 18:24:39 I love the BNF thingy. It turn programming into Dictionary definitions, practically. Great for expert systems. 18:25:11 Quartus: I'd have to learn a bit more about forth to understand what you just wrote. 18:25:11 Great for parsing concatenative languages. 18:25:20 jeremy_c, are you familiar with BNF? 18:26:03 Quartus: I understand it's purpose and can read some for languages I know. I would never be able to sit down and write grammar in BNF. 18:26:13 jeremy_c: bnf is how one would make a compiler 18:26:25 Ok, it's actually simpler than you probably think it is. It's used to describe a syntax for a language. 18:26:40 It's a little language. 18:27:47 Baskus-Naur Form 18:28:17 * Raystm2 see's BNF as Backus - Naur Factoring. 18:28:17 Anyway, aside from the confusion I've introduced by bringing up BNF, the point is that I've defined a BNF language inside Forth, and then written the BNF in that. It's trivial to generate code directly from the parser. This sort of thing is quite difficult in most other languages. 18:30:06 Quartus: I see where your coming from. I'd like to learn a bit about forth just to get some hands on action. 18:30:16 That's the right attitude going in. 18:30:52 I say this because otherwise you'll find it substantially alien to the way you normally think about programming (I'm guessing you're grounded in Algol-derivative languages), get frustrated, and disappear muttering invectives. 18:31:22 yes 18:32:16 Quartus: OCaml was pretty different. I was frustrated for a while because things didn't make sense. Then it started to snap in my mind, it's a pretty cool language. 18:33:12 jeremy_c Was there anybody to help you with OCaml or did you do it by yourself? 18:33:39 Raystm2: I hung on on OCaml and asked some complex questions (what I thought was anyway) there. 18:33:51 Raystm2: #ocaml that is. 18:34:31 Raystm2: but tried to do as much as I could on my own as not to agitate people 18:34:52 OCaml is functional. Forth has shades of that. So that's good, at least you're able to see past the Algolish-only way of thinking about programming. 18:35:38 yes, it was my first functional language, well, only. 18:36:26 I learned APL in the 80's out of necessity, work-related. After that Forth doesn't seem all that different from most other programming languages. But it really seems very different to some people. 18:36:39 I don't have OCaml yet, reason I ask. 18:37:15 Raystm2: try haskell first 18:37:39 I have a tinsy bit a few years back. I'm ready to return. 18:37:50 I worked out that you can do a quicksort in fewer symbols and fewer lines in Standard Forth than in Haskell. Really upset one Haskell guy. 18:39:09 hehe. I love that stuff. But Haskell is another one of those, "Y'ought ta have that'n yer belt" as well, just for the way it works and what it works on well. 18:39:15 Some people get really emotionally attached to their language, most commonly when it's the only one they know, and it was hard for them to gain whatever level of expertise they have. So they need it to be best, where best=shortest, or fastest, or something. 18:40:41 agreed 18:41:02 And they're quick to tell you why whatever it is you use sucks. :) 18:41:26 And they cross post that **** as well. :( 18:41:41 Boring. 18:41:43 Does John Doty crosspost? :) 18:42:12 Fortunate for me, I only know the name from the way you've invoked it, I'm gathering. 18:42:30 c.l.f. Loves Forth so much he can't keep from telling us all how stupid we are. 18:42:31 I don't think i've seen his posts. 18:42:45 But then I saw my first werty a few weeks back. 18:43:00 werty happens about once a week, usually a half-dozen at a time. 18:43:10 He's less coherent than Doty. 18:43:35 AH so, a peek into werty's schedual, and there for a way to destroy him. 18:43:48 I think the destruction is long past. 18:43:51 Why did I say that? 18:44:05 I don't know the guy. But I'm glad you warned me. :) 18:44:17 Anyway he's like a garden sprinkler. He posts constantly, but in different groups at different times. 18:44:34 I've seen some of the people you've warned me for, and now I trust your opinion. Is that too kiss ass? :) 18:44:56 heh. Well, I'm not alone in being a barometer for the truly insane. 18:46:03 Yet you suffer me well. I'm appreciative. I'm trying to maintain an even flow till atleast a time when Quartus forth on the palm is way behind me, if you care to know why i'm _using_ you so openly. LOL :) 18:46:08 Werty'd peg the needle on anybody's whackometer. 18:46:15 hehe. 18:46:23 Raystm2, get on with it, man. I can be bought. :) 18:46:56 I know, I know. I'm excited too. The Vx shipped on Friday. 18:47:36 I should have it Wednesday, Thursday, from NY. 18:47:48 Keen. 18:48:47 How's the book coming? 18:49:00 Pretty well. Writing quite a bit of code for it. 18:49:39 any good forth's for mac? 18:50:19 Who was it on #forth who was using Carbon MacForth? 18:50:35 http://www.forth.org/compilers.html 18:51:21 Could be, Quartus, I know of what you speak I saw it too but can't recall where. Could have been c.l.f. 18:53:02 jeremy_c: mops might be a nice Mac forth. I've not a Mac tho I lement the fact. 18:58:02 --- quit: erider (Read error: 104 (Connection reset by peer)) 19:01:48 --- join: erider (n=erider@unaffiliated/erider) joined #retro 19:09:50 --- quit: erider (Read error: 54 (Connection reset by peer)) 19:11:14 --- join: erider (n=erider@unaffiliated/erider) joined #retro 20:03:11 --- quit: erider ("I don't sleep because sleep is the cousin of death!") 20:21:07 forth looks pretty complex. 20:21:23 * jeremy_c did a bad thing and skipped the two chapters introducing and jumped to example code. 20:22:12 First two chapters of what? 20:22:23 http://www.mpeltd.demon.co.uk/arena/ProgramForth.pdf 20:22:35 What page are you on? 20:22:43 Quartus: how would you recommend I spend a bit of time learning forth? 20:22:50 16 20:22:57 installed gforth 20:23:13 It helps to have something you want to do with it. 20:23:44 A few tasks at hand I believe are a bit out of a learning tutorial. 20:23:59 What on page 16 looks complex? 20:24:33 Maybe not. Read a file that looks like: ABC*123*456~DEF*332*123~ ... ABC = seg name, 123, 456 = elements belonging to segment ABC, ~ = terminator for ABC seg, DEF starts a new segment. 20:24:46 CR 2DUP SWAP . ." multiplied by " . 20:24:50 ." equals " times cr ; 20:25:32 Quartus: I don't want to tie up your time with silly things. if I read the first few chapters, I am sure things will be easier. I shouldn't have jumped ahead. 20:26:02 It would help. I don't know how good that book is, I haven't run through it. In #forth you'll find the topic has pointers to an updated Starting Forth, and a recently-revised Thinking Forth. 20:26:17 What do you do with that ABC etc. after you read it in? 20:26:57 Well, as a tutorial, simply print it. followed by it's elements, then a new line or something when we get to the end of the segment and start a new one. 20:27:24 Ultimately, a lot will echo back to a file, and when some segments are found, they need to be changed and then written back to a file. 20:27:25 Ah. Well, Standard Forth certainly has file-access words, and parsing is pretty simple. But you'll want to get the basics down first, I'd think. 20:27:39 Quartus: yes. I agree. 20:28:19 Quartus: so you think thinking in forth is a good way to learn it? 20:28:44 jeremy_c: more of a result of doing it. 20:28:49 Thinking Forth is a book about Forth as a technique for problem solving. 20:28:57 There's some interesting stuff in there. 20:29:22 I'm in the process of writing a book to teach Forth, as I think there's a need. 20:29:33 Quartus: Raystm2: How would you recommend a forth newbie with no concept of forth what-so-ever learn forth? 20:29:38 But begin the Starting Forth is where you shall. -- Yoda. 20:29:51 The web version of Starting Forth will get you started. 20:30:02 Pelc's book you've got there might well be useful too -- as I say I haven't read it. 20:30:17 Hm, I must have missed the URL for starting forth. 20:30:23 It's in the topic in #forth. 20:30:56 Oh. I passed right by it seeing the Thinking in Forth 20:30:58 got it. 20:31:11 jeremy_c: there is a tutorial for MVP forth that is great for beginners as well, but Starting Forth is best because we've all read it and instantly know where you are and what you're dealing with. 20:31:18 The Standard is a handy reference, and the Appendix makes interesting reading. 20:33:32 Btw, jeremy_c: you will recognise every construct in forth, you've seen it all before. 20:34:34 ah oh.... few programmers who learn Forth ever go back to other languages 20:34:37 I don't know, Raystm2. Lots of C programmers never deal with function pointers, for instance. And CREATE/DOES> is its own animal, as are :NONAME words, pictured-numeric output, dual stacks... 20:34:48 * jeremy_c loves function pointers 20:35:09 hmm, create does punches a major hole in my supposition, damn. 20:35:15 does> even 20:35:29 C doesn't have catch/throw, though you can sort of wave in the general direction of setjmp longjmp 20:35:51 Java? 20:35:52 ya but Python's error handling isn't much different. 20:36:28 Forth has multiple namespaces, which C doesn't. C is typed, however weakly, while Forth isn't. Etc. 20:36:35 ya. 20:37:40 Ok, first question. Let's say I want to say hello to the World. : greet-world ... ." Hello World" CR ; 20:37:49 Except for ... 20:37:51 So, I created a word (syntax may be wrong) greet-world. 20:37:55 Dictionaries, inline assembler in hex, dumps as your first line of debugging defence. 20:37:56 ... was for new line 20:38:02 my bad. 20:38:25 That syntax is fine otherwise. 20:38:42 How is that different in forth philosophies than me in C creating a function greet_world () ? 20:38:45 that's the real question 20:38:49 It isn't. 20:39:01 Well, not in the large, anyway. It's a first-order word in the language, now. 20:39:07 Forth has been called a "meta-application language"--a language that you can use to create problem-oriented languages. 20:39:09 You can type greet-world and away you go. 20:39:36 how is it any more suited to create problem-oriented languages than C? 20:39:52 For saying hello, most languages (there are some exceptions) can do it in one or two lines. 20:40:00 And they're all surprisingly similar. 20:40:25 So for that problem domain, you'll have trouble differentiating. 20:40:32 There's a good one in starting forth. Something like -- : wash fill soap aggitate rince spin ; 20:40:33 Congratulations, though, you've mapped it beautifully. :) 20:42:27 : washing-machine wash rinse spin ding ; :) better but still not it. 20:42:34 looking it up. 20:44:06 jeremy_c, for an example of Forth fitting to a problem, have a look here: http://quartus.net/products/forth/compare.shtml 20:44:27 That's in no way an exaggerated example; I actually shortened the C source. 20:45:32 Quartus: but that's not a testament to forth, that's just the fact that Quartus Forth has a lot of backend standard library that makes life easy for the front-end programmer. 20:46:29 However, I have done some C programming for the Palm. Gave it up because it was dragging me down. I like the Quartus Forth much better!!! 20:47:01 In fact it has very little back-end. But it is an illustration; in Quartus Forth I've mapped KEY to the event handler. Abstracted a page of C into one word, and re-oriented the nature of the event-handling system from a callback to a querying system. 20:49:37 I'm not showing it as a 'testament to Forth', but rather as an illustration of how analysis can simplify a problem. By having first-class functions and implicit parameter passing, I believe that Forth maps more directly to the linguistic processing parts of the human brain. That, along with Forth's interactivity, are powerful features for finding the optimal solution-fit to a given problem. 20:52:04 * jeremy_c is bummed, TextMate does not have forth support :-( 20:52:06 Other things: Forth encourages (enforces, really) small-grained factoring. Good factors are small enough to visually inspect to determine correct function, and they can be tested both interactively and by very simple inline tests. 20:52:28 TextMate is a memopad replacement? 20:52:33 yes. 20:52:40 Straight ascii memos? 20:52:43 mac os x editor. 20:52:46 oh. 20:52:51 not on palm. 20:53:01 http://macromates.com/ 20:53:01 Oh, thought you meant on the Palm. I think there is one named that for the Palm. 20:53:32 I'm not an IDE-dependent programmer. I just need an editor and a command-line. 20:53:55 That's all TextMate is, an editor. However, I have all sorts of nice macros that I made, and it supports, that I enjoy. 20:54:04 No reason you can't use it for Forth. 20:54:17 No, but I'm just use to pretty syntax highlighting :-) 20:54:33 Ah. I wrote a small highlighter for a different editor. Bit tricky with Forth, as its extensible. 20:54:56 If I stick with it, I'll add it to textmate, the highlighting language for textmate is beautiful. 20:55:09 It may already have been done. 20:55:20 nope. :-( 20:55:45 TextMate has a great list of available plugins, tons of languages. TextMate people all submit to the main repo for available modes. 20:55:56 gnn,. 20:55:58 er, hmm. 20:56:24 does vim have a mode? 20:56:38 I think more than one. 20:56:57 I don't use vim, but if you ask in #forth somebody there might. Bit late in the day for most of the audience right now, but you never know. 20:58:35 got it. 21:14:44 Ok, I've used it in an example, but how's that work? : stars 0 do star loop ; 21:14:47 30 stars 21:15:20 I see the loop obviously, but what's forth thinking in the back ground to translate my do ... loop into 30? 21:15:41 What makes you think there's any translation going on? 21:16:17 Because I don't see what I am use to seeing ... do star; index ++; while index < 30; 21:17:14 do/loop is roughly equivalent to the C 'for' loop, and in this example it's taking its limit parameter from the stack, which you're passing it when you say 30 stars . 21:20:57 What does the . mean all by it self? print? Or does it have more meaning? 21:21:12 Displays a single-cell value (an integer) with a trailing space. 21:23:04 void stars(int nstars) { do star(); while((nstars--)>1); } 21:23:12 That's the rough C equivalent of your 'stars' word. 21:24:30 It seems like a big danger is getting too much or too little on the stack thus corrupting the entire system? 21:25:06 It isn't a practical danger of any sort, but if you're worried about it you can do a simple depth-check assertion. 21:29:10 What are common file extensions for forth? 21:29:43 I use .fs 21:30:31 I have seen .4th .f .for and .4 21:30:46 also .frt 21:33:36 on long-lost systems, .scr 21:43:33 There, now I have basic highlighting and function browsing in textmate 21:44:39 Bear in mind if you're ever editing a Forth word, and the : name line has gone off of the top of the screen, you're badly in the weeds. :) 21:44:49 Forth words are generally very short. 21:48:03 http://jeremy.cowgar.com/images/tm-forth.png 21:49:04 \ is a comment to end-of-line, also. You might want to colour Standard words at some point, too, to differentiate them from your own. 21:52:19 Is there a list of standard forth words? 21:52:47 At the end of the Standard. 21:55:32 Quartus: do you use gforth any? Is there something I have to do to load the standard dictionary? 21:55:46 things like abs don't work for me. 21:55:53 I do. What are you typing? 21:56:13 hm, abs does work :-) 21:56:28 10 20 equals 21:56:34 10 20 = 21:56:37 Undefined word 21:56:58 Oh! I just now saw above the "equals CORE" it has a = 21:56:59 The last page of the Standard lists the word name, and how it's pronounced. 22:18:48 k, core words (except for some weird ones I couldn't get to highlight properly, are in. 22:19:12 weird, eh? :) 22:19:40 #> 22:19:54 I think the editor is treating them as word separators. 22:20:06 oh? Modified an existing syntax file? 22:20:43 Quartus_: no, from scratch. But I think I may need to tell it what word separators are. I think it's taking a default somewhere. 22:20:52 ah. 22:21:28 anyway, I'm going to quit playing with syntax highlighting and play with forth a bit :-) 22:21:58 probably more productive :) 22:22:33 I think the syntax highlighting is easier though ;-) 22:22:58 it's a little language. They're usually easy. 22:37:05 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #retro 22:46:00 working with the stack seems like it could get cumbersome. dup over swap rot 22:46:40 That's why keeping the stack shallow, and words short, is key. 22:48:28 Going back to my example of reading an edi file and trying to output it back out. Let's say I create a word called read-element ... it reads 1 element, places it on the stack. To know if I have a valid segment, I must do comparisons to 5, 6, 7, sometimes 18 segments deep (if each was placed onto the stack). i.e. CLM**100.0*10~ ... the 10 may signify that a discount was taken, which should appear in element #2, which in this case is blan 22:49:03 So, I have to throw an error and say this is not valid. However, in reality, that code "10" is in position 14 on the segment. 22:49:10 Can you deal with the stack in such a way? 22:49:32 you cut off at 'in this case is blan', and it would take me ten minutes to unravel your problem description. Can you break it down in smaller parts without suggesting solutions as you go? 22:50:22 the only thing you missed was k. ... in this case is blank. 22:50:39 I cannot determine if the CLM segment is valid until I read the whole segment, no. 22:51:00 CLM**100.0*9~ might be fine, but CLM**100.0*10~ is bad. 22:51:08 I don't know what a CLM segment is, or how to validate the data, or what you plan to do with it once you read it. 22:51:47 well, for one, just validate it. If it's a valid file, then I will pass it on to the processor program which will import data. 22:52:00 And how do you validate CLM**100.0*9~ ? 22:52:22 ClaimData*DiscountAmount*TotalAmount*Status~ ... So, Status = 10 means, discounted. Status = 9 means, could not discount. 22:52:47 So how do you validate CLM**100*9~ ? 22:52:58 er, sorry -- CLM**100.0*9~ 22:53:07 So, if CLM**100.00*9~ comes across, that's fine. The network could not discount the claim, so no need for a discount amount. However, CLM**100.00*10~ is bad, the network said I got a discount, however, they did not give me the discount amount. 22:53:25 The discount amount is empty. That's a good claim. 22:53:46 CLM*90.00*100.00*9~ woudl be bad. No discount could be gotten, however, they supplied a discount amount == bad. 22:53:58 Ok. So validation means the program knows all the rules for all the different types of segments that might go by? 22:54:13 right. 22:54:54 Ok. So you want to split the input into pieces delimited by ~ and then split those segments into strings delimited by *. 22:55:03 yes. 22:55:12 And then perform validation based on the first three-letter string. 22:55:21 * = element terminator, ~ = segment terminator 22:55:40 Sometimes it's 2 characters, other times 3. 22:55:55 Ok. I can think of several ways to do that. 22:56:43 So now that I understand the problem a bit better, what were you suggesting as an approach? 22:57:46 I don't know. I am just getting to the part of dup rot swap etc... I was asking the question, can you do such things on the stack that far down. 22:57:55 You shouldn't try. 22:58:09 The stack is not for data storage; it's for parameter passing, and temporary manipulation of parameters. 22:58:34 Quartus: there are other methods of data storage then? 22:59:23 Quartus: I suppose I will get to that soon enough. I'm thinking too far ahead I guess. Just taking what I am learning and trying to apply to a problem I have sooner than I should. 22:59:33 Of course; you can form and access data structures in memory. Forth provides 'dataspace', referenced by words such as HERE and , and ALLOT, and also dynamic memory allocation (ALLOCATE RESIZE and FREE). 23:00:01 If I were working on your problem, I'd want to see the set of possible segment types and the rules governing their validation. 23:00:24 Quartus: the book is 893 pages long, I have a PDF if you want it 23:00:27 :-D 23:00:36 jeremy_c, I don't personally want to write your program, unless you're hiring. :) 23:00:45 Quartus: I'm joking. 23:00:54 I am too, unless you're hiring. :) 23:01:30 I'll continue to read and try not to apply current problems to forth yet. 23:02:02 well, one way of learning is to learn a little bit, try like hell to solve a complex problem with only that, fail, and go back and learn more, repeating this until your grandchildren bury you. 23:08:15 O dpm 23:08:19 I don't recommend it, as such. :) 23:39:50 * jeremy_c tired, going to sleep 23:40:09 later! 23:59:59 --- log: ended retro/06.10.23