00:00:00 --- log: started forth/04.01.10 01:23:36 --- quit: ayrnieu (Read error: 104 (Connection reset by peer)) 01:24:45 --- join: ayrnieu (~julian@206.61.132.159) joined #forth 02:04:45 --- quit: fridge (Remote closed the connection) 02:50:34 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 03:15:57 --- quit: ayrnieu ("screen") 03:17:19 --- join: ayrnieu (~julian@206.61.132.159) joined #forth 03:30:04 --- join: fridge (~fridge@dsl-203-33-164-15.NSW.netspace.net.au) joined #forth 03:51:31 --- nick: Robert__ -> Robert 05:06:16 --- quit: ayrnieu (Read error: 110 (Connection timed out)) 05:36:16 --- join: XeF4 (~xef4@nuclease100.gprs.suomen2g.fi) joined #forth 05:36:58 * XeF4 steps cautiously back in 05:37:59 Hi :) 05:44:36 --- quit: rO| (Read error: 110 (Connection timed out)) 06:52:25 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 08:30:27 --- join: blockhead (default@dialin-63-tnt.nyc.bestweb.net) joined #forth 08:31:35 --- quit: tathi ("leaving") 08:47:30 --- quit: madgarden ("*frotz*") 08:51:23 --- quit: XeF4 (Read error: 110 (Connection timed out)) 09:00:42 It's been my experience that open source games almost never have good levels. do you think the epiar.net folks will manage it? 09:02:34 Herkamire: it seems that adonthell might have even good plot 09:02:46 and kq lives has also some kind of plot 09:04:02 Herkamire: Haha, true. For a game I wrote several years ago, I let my (then) 8 year old sister make the levels. :) 09:04:41 --- quit: fridge (Read error: 110 (Connection timed out)) 09:18:05 hiya 09:19:28 Good morning. 09:19:40 the epiar.net folk suck. 09:19:55 they've been working on basically nothing for 2 years now. 09:21:08 the main programmer doesn't let anybody help except for people who suck him (or so it seems), and then the codebase gets messy and he decides to start over. 09:21:21 his latest little thing is that he's starting 2 (!) new codebases. 09:21:23 WHY!? 09:27:01 * arke is back (gone 09:31:01) 09:28:56 --- join: Necrovore (~edkiser@pcp01941139pcs.hlcrs201.al.comcast.net) joined #forth 09:29:38 Hello. 09:31:22 Hi 09:34:45 hi Necrovore 09:35:08 I haven't been here in a while. I'm glad to be back. 09:35:24 * arke has never see Necrovore here before ^_^ 09:35:40 Necrovore: When were you here last time? 09:36:01 * Necrovore was only here once before, and that was more than a month ago, for about 20 or 30 minutes. 09:36:16 Maybe I wasn't here then... welcome back anyway. 09:36:19 :) 09:36:26 Maybe I should say S" hello" TYPE CR 09:37:00 Yes, you should. 09:37:03 er 09:37:11 S" Yes, you should." TYPE CR 09:37:14 ^__^\ 09:37:31 --- join: XeF4 (~xef4@thymine98.gprs.suomen2g.fi) joined #forth 09:39:34 I remember when Necrovore showed up. possibly only because of the cool nick :) 09:40:44 * Herkamire finds it annoying and sad that google can search the entire internet much faster I can search my portage tree 09:41:31 so put your portage tree somewhere web-visible and google for it? =D 09:41:31 Google has racks and racks of blade computers, that's why. If you had that, you could search your portage tree much faster. :-) 09:44:13 it's not a matter of computing speed I think. It's not that much data 09:44:52 maybe I'll write a bash script to do it reasonably quickly 09:47:18 --- quit: qFox ("if at first you dont succeed, quit again") 09:47:58 maddox is sooo funnny 09:50:05 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 09:57:20 ack 09:57:32 Herkamire: bash wiz? could you help me with something? 09:59:28 arke: I'll try 09:59:55 quick search for package description and homepage: grep -e "HOMEPAGE" -e "DESCRIPTION" < `ls /usr/portage/*/$PACKAGENAME/$PACKAGENAME*.ebuild | tail -n 1` 09:59:57 chris@chris:~/frapiar> make 09:59:57 if [ `sdl-config --version` -ne 0 ] \ 09:59:57 then \ 09:59:57 echo "SDL seemingly not present." \ 09:59:57 echo "Make sure sdl-config is present. " \ 09:59:59 return 1 \ 10:00:01 fi \ 10:00:03 /bin/sh: -c: line 2: syntax error: unexpected end of file 10:00:05 make: *** [dlinux] Error 2 10:00:37 what's with the backslashes? 10:01:09 line continuations, i think. 10:01:11 lemme try without 10:01:11 you're telling it to echo "fi" and then there's no end to the if construct 10:01:41 chris@chris:~/frapiar> make 10:01:41 if [ `sdl-config --version` -ne 0 ] 10:01:41 /bin/sh: -c: line 2: syntax error: unexpected end of file 10:01:41 make: *** [dlinux] Error 2 10:02:00 Ok 10:02:18 try: if ["`sdl-config --version`" != "0" ] 10:02:20 then 10:02:21 ... 10:02:22 fi 10:02:41 * Necrovore will be back later, hopefully 10:02:54 --- quit: Necrovore ("for miscellaneous distractions") 10:03:02 Ok. 10:03:12 you need to double quote `sdl-config...` because if it doesn't output anything it will parse to: if [ -ne 0 ] and that's a syntax error 10:03:36 oops, put a space before my first double quote: if [ "`sdl-config --version`" != "0" ] 10:04:02 Hrm, well, thats probably the wrong contruct anyway. 10:04:09 anyway, I don't think sdl-config is going to return "0" 10:04:15 I'm trying to test if sdl-config exists 10:04:32 if [ "`which sdl-config`" = "" ] 10:04:33 then 10:04:40 echo "No sdl-config" 10:04:40 fi 10:04:44 Ok, thanks. 10:04:46 lemme try that 10:05:23 ugh. 10:05:32 i gotta backslash it, since its in a Makefile 10:06:25 argh, fuck it 10:06:26 ^__^_ 10:07:36 ugh 10:07:44 how do I have Makefiles inherit stuff? 10:07:47 or actuazlly 10:07:49 nevermind. 10:10:30 --- quit: blockhead ("Client Exiting") 10:28:58 Woohoo. 10:29:01 Frapiar compiles. 10:29:02 :D 10:29:20 Now I need to start coding teh meat. 10:30:07 MEAT! 10:31:01 0xDEADBEEF 10:31:45 0x1337 10:34:04 0x0000000000000000 <- 64 bit number 10:36:25 oh whoo 10:36:35 I get to code a SDL GUI now 10:36:39 and I've never done that before. 10:40:56 uugh :( 10:41:00 I don't even know where to start....ack 10:41:13 I want to steal the Epiar code, but I don't....lol 10:43:25 Eek, nevermind 10:43:29 epiar code is horrible as shit. 10:45:27 SDL is great 10:45:32 hmm 10:46:56 Yes it is. 10:47:05 And the Epiar GUI code is shit. 10:47:25 its majorly ugly. 10:47:31 Now I get to make a better one. 10:47:41 is there any reasonable OO wrapper for SDL? 10:47:42 7win 7 10:47:43 and I've never evver coded one, or even know just how they work ^__^ 10:47:57 JSDL is decent I heard. 10:48:51 java sdl?` 10:49:12 yes. 10:49:15 Ack! 10:49:22 this epiar EAF shit is annoying as hell. 10:49:52 mur: what language? 10:50:35 c++ or java 10:51:50 --- join: dubious (~marc@209.71.234.197) joined #forth 10:52:31 the #forth portal site is still not working: http://forth.bespin.org 10:57:00 Alright, time for me to learn libxml 10:57:18 hm then jsdl at least, and there is no reason one can't use the C API as-is with C++ 10:59:57 theres an objective C binding, but savannah is down. 11:00:04 and theres an sf.net one too, but its a ghost 11:01:50 * mur is not interested in objective-c 11:04:01 I'm actually curious to use objective-c some day, it is only the lack of popularity which is stopping me :( 11:04:42 well 11:05:00 at least mac developing package seems to support it having it main language 11:05:49 mur: true, and I hear many good things about cocoa. however, since I only work on linux and solaris, gcc and gnustep are all I got. 11:06:08 I'm suprised to have someone in #forth talk about not wanting to learn a language as popular as objective-C because it's not popular 11:06:10 --- join: Sonarman (~matt@adsl-67-113-234-18.dsl.snfc21.pacbell.net) joined #forth 11:06:14 forth is not popular 11:07:38 Herkmire: to me, forth fills a niche that no other language does. on the other hand, objective-c isn't unique enough and can be substituted with a few alternative languages. 11:08:33 Herkamire: the few OO features supported by Obj-C and not by C++ are not a problem for me, I'd rather have C++'s templates and suffer with those deficiencies. 11:08:59 I see 11:09:44 I think objective-C is a nice language too. but I don't intend to use it 11:13:28 hm, I have to do something about reading -fomit-frame-pointer as -vomit... 11:13:48 hehe :) 11:14:07 this has been plaguing me for ages ;) 11:18:17 -vomit-frame-pointer sounds like an exception-handling extension 11:21:25 throw new FramePointer(); 11:24:07 hey guys, i'm gonna eat breakfast, and i want you to vote and discuss and when I get back, tell me what you guys think I should implement first: XML Scripting, Minimal Gameplay, GUI Widget system 11:24:11 * arke is away: breakfast 11:25:33 XML scripting? what does that mean? 11:26:16 breakfast at 11:30 :) 11:26:33 i guess writing scripts using XML 11:27:30 Sonarman: scripts to do what? the only useful thing to script in XML would be transforms and that's what XSLT is for. 11:28:22 i don't know. maybe he wants to write actual structured scripts in XML and parse them using libxml. sounds weird to me, though :) 11:28:34 the fact that transforms are expressed in XML couldn't be more appropriate, it can be really powerful. 11:29:05 Sonarman: yeah, me too. I'm curious to hear more details about what he meant though, he might be on to something ;) 11:29:43 a playable demo it is... 12:28:23 yay! 12:28:44 was part of a game dev group once. 12:29:11 we made a system for handling and displaying errors, and a resource manager. 12:29:29 both quite good. and then we lost interest/vision 12:29:43 if we had instead made a crude demo, it might not have died 12:31:19 my game is further along than that :) 12:31:28 30,000 lines of code 12:31:58 our group failed mostly because our leader left 12:34:03 --- join: Sonarman (~matt@adsl-67-113-234-18.dsl.snfc21.pacbell.net) joined #forth 12:35:22 slava: you should evaluate how far along your game is by what it can do rather than the number of lines, and that goes for myself too. I'm so much like that, thinking I've accomplished many good things by coding a lot. It's not to say that we're totally wrong, just that, as reminded by Herkamire, we need to make sure to focus on the end product. 12:35:37 this is actually quite hard for us programmers who have to deal with the nitty gritty 12:36:38 I think I will make a resolution this year to demo what I code at least once a month to people around me, friends and family for example. 12:37:13 none of which are programmers, so this is likely to be entertaining for me and boring for them ;) 12:37:27 yes, i've shown the game to a few people. 12:37:30 its quite playable. 12:38:41 --- quit: onetom ("Lost terminal") 12:38:52 --- join: onetom (~tom@cab.bio.u-szeged.hu) joined #forth 12:46:56 Herkamire: error code!? PLEASE 12:47:00 :) 12:53:04 * arke is away: work 13:07:07 sc seems pretty cool 13:18:41 --- quit: I440r (Read error: 110 (Connection timed out)) 13:41:26 --- join: madgarden (~madgarden@Kitchener-HSE-ppp3576567.sympatico.ca) joined #forth 13:46:00 --- quit: Sonarman ("leaving") 14:19:32 --- quit: dubious ("Leaving") 14:26:29 --- join: I440r (~mark4@12-160.lctv-a5.cablelynx.com) joined #forth 14:35:44 --- join: TheBlueWizard (TheBlueWiz@pc0cdn1d.ppp.FCC.NET) joined #forth 14:35:45 --- mode: ChanServ set +o TheBlueWizard 14:35:49 hiya all 14:37:04 Hey :) 14:38:12 hiya Robert :) 14:39:53 someone gave me a book titled "Library of Forth Routines & Utilities today :) 14:41:28 yea ? 14:41:35 is it old stuff or new ? 14:41:54 it was published in 1986 14:41:59 cool 14:42:08 :) 14:42:22 i love looking through my dads old forth dimentions issues 14:42:36 got some interesting chapters such as "Natural Language Processing" and "Expert Systems" 14:43:14 cool :) heh 14:43:38 * I440r is making 223 ammo with his lee loader - very accurate loads 14:43:51 execpet the last one which was 5 thou shorter than all the others 14:43:54 which is weird 14:44:23 but ok cuz im making em all exactly 2.260 inches in length which is the sami max oal 14:45:34 im also installing a fresh XP install on my other machine so i can do some tidy up devel on my soon to be released 8051 forth 14:46:08 * TheBlueWizard winces re: the utterance of "XP" 14:50:18 yes me too 14:50:29 but the cygnbal 8051 ide runs in windows 14:51:06 cygnbal? you mean cygnus? 14:51:29 no 14:51:30 cygnal 14:51:38 tho they were just bought and have had a name change 14:51:41 www.cygnal.com 14:52:00 hmm 14:52:33 I'm OK with "XP" as long as it stands for eXtreme Programming 14:52:42 heh] 14:53:00 * TheBlueWizard eats a stray ] to keep his bones strong 14:54:05 lol 14:54:23 i disagree with writing test procedures first - how do you know what to test :P 14:54:29 but xp is way cool 14:54:37 i wish they did it where im working now 14:54:46 --- join: Sonarman (~matt@adsl-64-169-95-7.dsl.snfc21.pacbell.net) joined #forth 14:55:00 hehe :) you know what to test because you design first 14:55:10 nononononono!!!!!!!!lol 14:55:13 you design as you go 14:55:15 :) 14:55:28 you _change_ the design as you go 14:55:34 ill acept an initial OVERALL design that does not talk any sort of DETAILS what so ever 14:55:38 that ill accept 14:55:58 XP emphasizes iterative development as I understand it, so you only need to develop a few test items at first, and keep developing more as you go along 14:56:13 right 14:56:31 right. so you design those items, code testers, then code the items 14:56:32 its the interactive development that makes xp work as well as it does 14:57:46 you can change the testing items as you go along...I understand it is a way of keeping everything in line, and helps catch errors 14:58:35 kc is the expert here lol 15:00:28 yep....kc is an XP/literate programming devotee 15:02:15 i believe chuck moore invented the whole concept of xp and literate programming with forth. 15:02:42 he was probably using xp methods long before anyone formalized them 15:03:03 pffffff 15:03:11 bloody apple devkit 15:03:33 heh 15:03:45 does any forth use shuffle notation to define stack operators? 15:04:29 in my interpreter, dup is defined as follows: 15:04:29 ~<< dup A -- A A >>~ 15:04:42 >r is defined as 15:04:42 ~<< >r A -- r:A >>~ 15:04:44 etc. 15:04:54 slava: I don't think literate programming is "invented in concept" by Chuck Moore...literate programming as I understand it emphasizes clear documenting of how the program should work and how it works 15:05:00 ~<< and >>~ are like : and ; 15:05:06 except their content is a shuffle 15:05:23 TheBlueWizard, well forth's interactive nature, combined with shadow blocks, etc 15:07:33 yes...I could argue it is a primitive form of literate programming...LP as Donald Knuth developed it lets you extract documents from the code, and extract code from the documents 15:07:49 this is one of the goals of my language 15:08:01 i want api docs and code to be stored in an outline-like database 15:08:19 and the built-in http server (which already exists -- the database doesn't) will generate nice web pages with pretty printed code on the fly. 15:21:28 sounds nice :) 15:22:06 provided it isn't too complicated....working with database tends to make things more complicated :/ 15:23:16 yes. 15:23:35 i'm trying for something a bit more complex than forth blocks, but simpler than a generic database or filesystem :) 15:24:13 * TheBlueWizard nods and notes that finding a happy medium under such situations is tricky 15:24:44 i was thinking variable-length blocks or something. 15:24:55 in a flat namespace with a number->block mapping. 15:25:01 code can provide whatever abstraction on top of that. 15:25:20 i'm not really adverse to complexity, i maintain a text editor with 60,000 lines of code :) 15:26:21 written in Forth? 15:26:40 no 15:27:50 ah....ok 15:28:26 its written in java, with some domain-specific parsers for various things that are too verbose in java. 15:30:39 mmhmm 15:32:20 the nice thing about languages like forth and lisp is you don't really need to bother using xml, property lists, etc for config stuff 15:34:16 done right, yeah 15:37:16 --- join: Robert__ (~snofs@c-b75a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 15:44:38 --- quit: Robert (Read error: 60 (Operation timed out)) 16:07:12 gotta go...bye all 16:07:47 --- part: TheBlueWizard left #forth 16:45:30 --- nick: Robert__ -> Robert 16:48:22 --- join: rO| (rO_@pD954587D.dip.t-dialin.net) joined #forth 17:35:42 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 17:35:42 --- mode: ChanServ set +o kc5tja 17:52:22 --- join: ayrnieu (julian@206.61.132.159) joined #forth 18:13:09 --- quit: qFox ("if at first you dont succeed, quit again") 19:19:36 * arke is back (gone 06:26:33) 19:19:41 hiya 19:23:08 This has got to be the coolest thing ever... comic strips of other people's dreams, heh. Check out the archive: http://www.slowwave.com/ 19:30:14 er 19:30:19 weird. 19:31:43 is there another "good" hosting thing like SF.net or savannah?/ 19:34:00 I don't think so. 19:34:27 Ack. 19:34:37 SF.Net is mean, and Savannah is constantly down. 19:34:44 And I don't want to spend any cash. 19:34:47 ^__^ 19:34:57 And I _would_ like CVS 19:36:06 The standard extensibility interpreter for GNU software is GUILE, which implements the language Scheme (an especially clean and simple dialect of Lisp). http://www.gnu.org/software/guile/. We don't reject programs written in other "scripting languages" such as Perl and Python, but using GUILE is very important for the overall consistency of the GNU system. 19:36:16 that pisses me off. really, it does. 19:36:45 Oh well. 19:36:56 You can GNU license your code, and not submit it to be officially GNU Software. 19:37:21 I know. 19:37:26 But what If I wanted to? 19:37:39 Would my project be looked down upon if i used, for example, XML? 19:38:08 (although XML is entirely different .. its more of a state-based/variable-set-based than scheme, so better for some things) 19:39:31 Don't know. 19:39:43 There is one exception: do not ever use the "trigraph" feature of Standard C. <--- Lol, unless you've read K&R, you most likely don't even know about that one lol 19:41:54 what are trigraphs? 19:42:39 I think they're triple-character replacements for single-character symbols in C. 19:42:57 oh, so if your keyboard doesn't have some keys? 19:43:01 Back when C was knee-high to a grasshopper, keyboards, for example, simply didn't have { and }, so they needed triple-symbols to represent them. 19:43:16 java has this too but its even more obtuse 19:43:24 \u1234 is a unicode hex literal 19:43:35 you can use it instead of { and } or on fact any character 19:43:45 your entire source file can be \u....\u.... 19:44:13 i think its something like //( or ??( for { 19:44:23 I don't have my K&R book right now... 19:45:04 arke, i extended my shuffle notation to support the return stack 19:45:15 so now >r is actually defined as ~<< >r A -- r:A >>~ 19:46:31 cool 19:46:53 what does "reentrant" mean? 19:46:58 here is a one-liner that I "ported" from joy; its quicksort! [ dup length 1 <= ] [ ] [ dup car [ > ] cons partition ] [ append ] binrec 19:47:27 its inefficient, a lot of consing 19:47:34 i want to try writing an in-place sort that is also 1 line 19:47:38 Re-entrant basically means that multiple concurrent tasks can execute the same snip of code safely without knowing about the other tasks. 19:47:53 kc5tja, are stack operators hard-coded in your forth? 19:47:59 Yes 19:48:12 But if you wanted to make one that wasn't I'm sure it'd be relatively easy to do. 19:48:23 Not just multiple concurrent tasks, but also the same task in the context of previous calls to that code. 19:48:29 yes 19:48:45 kc5tja, started work on it yet? :) 19:49:04 Define "work." 19:49:08 code 19:49:18 kc5tja: could you give me an example, like SDL for exmaple? 19:49:26 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 19:50:01 SDL is not re-entrant, because you are allowed precisely one drawing surface per process. 19:50:23 No matter how many threads exist, every time you call sdl_open() or whatever it's called, you'll get the same screen, or change the mode of the one that's already open. 19:50:25 kc5tja: That I do not understand. They should allow more.. 19:50:33 Well, SDL isn't re-entrant. 19:50:37 SDL_SetVideoMore(); 19:50:42 To allow more, they'd need to make it re-entrant. 19:50:53 That's maybe something to expect from SDL2 19:50:56 arke: No, they need to treat display surfaces like files or something. 19:51:06 I have zero expectations of SDL2 even making it to reality. 19:51:14 variable buf : >buf buf ! ; : buf> buf @ ; ... : baz >buf swap buf> - + ; : bar >buf 1 2 3 baz buf> / ; 19:51:17 kc5tja: why? 19:51:34 well, SDL was a Loki thing, wasn't it? 19:51:36 ayrnieu, what? :) 19:51:47 tathi: Yep. 19:51:51 slava - example of the effects of non-reentrant code. 19:51:57 ayrnieu, oh 19:52:06 arke: Because the SDL folks themselves told me they couldn't seem to agree on what, exactly, SDL 2.0 should be like. 19:52:11 slava - particularly, how a non-reentrant API can break in the absense of multiple tasks. 19:52:38 kc5 - it doesn't matter if they agree on anything, so long as someone starts actually writing something =) 19:52:38 kc5tja: so there are still people maintaining SDL even now that Loki is gone? 19:53:13 tathi: Oh yeah, Sam Slouken. 19:53:22 tathi: he's the guy that made it, i think 19:53:22 tathi: yes. 19:54:09 WTF!? 19:54:18 I search SDL libraries for GUI 19:54:19 and I find 19:54:24 C++ GUI Widget library 19:54:24 C++ GUI Widget library 19:54:25 C++ GUI Widget library 19:54:26 C++ GUI Widget library 19:54:28 C++ GUI Widget library 19:54:32 C++ GUI Widget library 19:54:34 WTF!? 19:54:36 lol 19:54:51 Please don't ever do that again. 19:56:41 Sorry, but ... well .. i get a little too emotional about things some times 20:04:05 what's the problem? that it's C++? 20:06:20 Yes. 20:06:31 You got 10 C++ Widget libraries for a C library 20:07:39 They should make a SDL backend for GTK+ ^___^ 20:20:10 --- join: imaginator (~gps@166.70.196.201) joined #forth 20:33:14 imaginator - do you have a URL to your Forth? 20:34:07 #frapiar :) 20:34:53 arke - the channel for your branch of epiar? 20:34:59 Yes. 20:40:39 sorry 20:40:44 I was busy. 20:41:08 ayrnieu: http://www.xmission.com/~georgeps/Perpheon/Perpheon-103.zip 20:55:15 ayrnieu: hint: change #if 1 to #if 0 in main() if you want to play with it. 21:09:45 imaginator, what is your forth like? 21:20:32 slava: it's a work-in-progress, but here are some ways in which it is different than a ANS Forth: 21:21:20 ' is a special token for pushing strings. 'hello' would push each character onto the stack one at a time, and finally a length of 5. 21:21:53 I use . for the end of a definition. For example : incr 1 + . 21:22:15 It's designed to be embeddable, and supports multiple VMs at once. 21:22:41 the string support is a little odd i think 21:22:57 what if you pass 3 strings to a function, you can't use stack operators on them. 21:23:32 alloc.string would be used in such a case. 21:23:45 I haven't added it yet, but I've been planning to. 21:24:17 And then alloc.string would push an address of the string. I've also been considering a stackify.string 21:24:25 or string.to.stack 21:24:42 why not just have all stacks heap allocated, with gc? :) 21:24:48 all strings 21:24:50 not stacks 21:25:42 I suppose I could do that. I've looked at the Boehm-GC, but it seems quite complex. 21:25:53 slava: does your Forth have a GC? 21:26:03 my language does this, yes. i wouldn't call it a "forth" 21:26:21 it is typed, has cons cells... 21:26:22 a GC written in ANSI Forth exists, of course. 21:26:59 --- quit: tathi ("leaving") 21:27:31 To me the complexity of the GCs I've seen have scared me away. 21:27:44 of course the gc is free in my case since its provided by the jvm :) 21:27:52 have/has 21:28:04 slava: cool. 21:28:25 I've looked at some of the languages that compile for the JVM. How is the speed? 21:29:03 right now its interpreted so its kind of slow. but still faster than some other interpreters written in java (eg beanshell). soon i will do a compiler for it, it should be almost as fast as native java 21:29:34 If you code for the JVM does that mean that your opcodes become JIT compiled if the JVM supports it? 21:29:53 yes 21:30:20 so if you output bytecodes intelligently, you can create decent assembly. but its harder than writing a native compiler. 21:30:48 so you will have a bytecode compiler forthe scripting language? 21:31:03 you mean scripting lang -> JVM bytecode? yes 21:31:07 yes 21:31:18 i just noticed that you're in #java too 21:31:48 yes, we've been talking for a while. ;) 21:32:02 * ianp lurks 21:32:26 i'm in #lisp too :) 21:33:17 I havent done lisp yet, i like it though 21:33:27 * kc5tja likes Lisp a lot. 21:33:46 hi kc5tja 21:34:00 slava: is slava a russian name? 21:34:19 ianp: Howdy 21:34:29 ianp, yes 21:38:16 I like Lisp. I find it interesting how Charles Moore was inspired somewhat by LISP when he created Forth. 21:39:37 was he really? 21:39:42 forth and lisp are quite different 21:39:54 IIRC he said that he read a paper by McCarthy about LISP. I wish I remember which interview it was. 21:39:57 slava: But they're incredibly similar too. 21:39:58 I'll try to find it. 21:40:05 slava: Moore was McCarthy's student. 21:41:45 http://www.colorforth.com/bio.html 21:42:00 "He learned Lisp from John McCarthy." ... 21:42:09 I found another somewhere on the web. 21:42:30 It must have been so exciting back then. 21:42:45 Yeah 21:42:45 But perhaps it's more exciting now with our powerful computers. 21:43:13 Well, it's interesting that my desktop personal computer actually has greater overall computing power than the fastest Cray-built supercomputer. 21:43:42 It fails only in vector computation, but only because (a) it's not a PowerPC, and therefore, (b) has no vector math abilities. :) 21:43:58 cray had 64-way vector registers though, no? 21:44:04 antivec is puny in comparison :) 21:44:17 kc5tja, do you code with blocks? 21:44:33 Yes, Cray had 64-way vector processors. 21:44:53 But I'm not sure that they had 64 FPUs for each vectorizable operation. 21:45:11 I could be wrong on that though. His supercomputers were rather small to have that many FPUs. 21:45:26 slava: Yes, I code with blocks, personally. 21:45:32 I find them more convenient than files overall. 21:45:34 how do your organize the code? 21:45:45 and why more convinient? i'm just curious ;) 21:46:18 Do you assign a word to each block or what? 21:46:27 * imaginator hasn't played with blocks 21:46:55 I've only ever used blocks in the context of Pygmy on DOS and in Enth/Flux. 21:47:22 i like pygmy 21:47:35 and I'm happy ... I got some help with Frapiar 21:47:41 kc5tja: do you use vibe? 21:47:47 tathi is helping, and I might have some others tooo ^______^ 21:48:25 Sonarman: I currently use VIBE, yes. 21:48:40 kc5tja, do you have any code written in blocks that i can look at? 21:48:55 When FS/Forth officially runs for the first time, though, I'll have to drop to a line-based block editor, due to Linux's inherent console limitations. 21:49:08 kc5tja, x11 :) 21:49:28 slava: Yeah, right, I'd like to see you make a simple (e.g., <4K) Forth environment that uses X11. :) 21:49:44 < 4K? wow 21:49:45 well 4k is a bit tight :) 21:49:57 Oh, I know -- I can post the line-based block editor's source code for you. 21:50:00 Do you use 5 bit bytes like Knuth? ;) 21:50:06 imaginator: No. 21:50:08 u mean Chunk? 21:50:12 Chuck 21:50:24 kc5tja, is fs/forth only 4 blocks? 21:50:27 kc5 - well, if you decide to support a 'traditional' KEY, you can build a nice enough block editor =) 21:50:54 8 list Screen 8 not modified 21:50:54 0 ( Line-based Block Editor ) empty 21:50:54 1 variable blk 21:50:54 2 : pad here 64 32 fill ; 21:50:54 3 : ed page dup list blk ! ; 21:50:55 4 : to 64 * blk @ block + update ; 21:50:57 5 : frm tib >in @ + ; 21:50:59 6 : howmuch #tib @ >in @ - 64 min ; 21:51:01 7 : done #tib @ >in ! ; 21:51:03 8 : prep pad frm here howmuch move ; 21:51:05 9 : r prep to here swap 64 move done ; 21:51:07 10 : left blk @ block 1024 + over - ; 21:51:09 11 : z to pad here swap 64 move ; 21:51:11 12 : o dup to dup 64 + left move z ; 21:51:13 13 : i dup o r ; 21:51:15 14 : d to dup 64 + left >r swap r> move 15 z ; 21:51:17 15 21:51:19 WHOA!!!! 21:51:23 WTF!! 21:51:25 Where'd all the extra carriage returns come from???? :( 21:51:35 * kc5tja hates Linux sometimes... :( 21:51:38 kc5 - extra carriage returns? 21:51:50 I have blank lines in between every other IRC post. 21:51:54 kc5 - I don't. 21:52:23 kc5tja: I don't see blank lines in between. 21:52:27 hmm 21:52:30 I do. Weird 21:53:14 So basically your editor is like ed? 21:53:31 but numbered? 21:53:51 kc5tja: there's a bunch of spaces after each line 21:54:16 Herkamire: hmmm.... 21:54:35 imaginator: The line-based editor is, yes. 21:55:03 kc5tja, do you just remember what number block holds what code? or is there an organizational scheme? 21:55:25 ayrnieu: I don't want to define KEY because that involves putzing with the terminal settings. I don't want to get into that kind of complexity yet, because in order to sanely restore terminal settings (e.g., as after a crash), you need to capture signals and all sorts of other stupid bullcrap. 21:55:43 slava: A combination of both. I have a tool called INDEX which helps me. 21:55:49 Want code? :) 21:55:53 That also is in a block. 21:56:03 Can't you exec stty? 21:56:38 kc5tja, what do blocks give you that files with numeric names don't? 21:56:41 No, because exec()-ing overwrites the process image. Once stty is done, it'll drop back to bash. 21:56:46 kc5tja, explicit enforcement of 25 lines/60 chars per line? 21:57:42 slava: The block form factor helps keep my code organized. 64x16 characters is like an index card. 21:57:57 slava: It also facilitates a wholistic Forth environment. 21:58:01 64x16? i thought it was 25x60 :) 21:58:10 slava: A block is 1024 bytes. 21:58:14 indeed 21:58:37 I was thinking of a hypertext editor for my Forth. Basically each word that is defined by : would be a link to that code. 21:58:43 yes! 21:58:54 i've thought of this too. 21:59:05 and mouse hover over a word shows its stack effect comment. 21:59:23 Moreover, when compiling a word, it's a whole lot easier to store a single 32-bit integer that identifies a source block, then it is to stre a filename and line number pair. So when you say something like SEE FOO, instead of launching some grotesquely bloated text editor, it just pops up the block editor containing FOO's definition. 21:59:43 imaginator: Herkamire beat you to that idea. :) 22:00:06 :) 22:00:23 File-based Forths fail miserably in presenting a nice, clean, wholistic environment. 22:00:25 slava: the mouse hover idea is interesting. 22:01:05 kc5: how do you send code to a friend via email then? 22:01:28 I have a tool that I wrote which converts a range of blocks into text form, then writes it to a file. 22:01:35 I then send that file inlined or as an attachment. 22:01:50 Though the format for that file is designed for human consumption. 22:02:04 what i'm thinking of is that when i enter a colon definition in the repl, it is automatically persisted. 22:02:16 with some form of undo of course. 22:02:16 I'm thinking of changing the format to use line-editor commands so that reading the file is equivalent to typing the contents of the blocks. 22:02:26 :) 22:03:45 Note that in my environment, all even-numbered blocks contain code, while all odd-numbered blocks contain shadow documentation for the preceding even-numbered block. 22:04:04 are all your definitions one-liners like in the above example? 22:04:09 VII. Final thoughts 22:04:09 ------------------- 22:04:09 Don't use Emacs. Things that are obviously created using emacs will be silently forwarded to a special place in my filesystem. Also, if you do not follow my draconic standards to the letter (or, if I'm in a bad mood, to each bit of each individual color value of each pixel represented by 32-bits in X11 using banked mode of each letter in a bold 12-point Arial font), they will be sent to the same safe place in my filesystem. 22:04:24 99.99% of them are. However, there is not a single definition which exceeds 2 lines long. 22:04:41 is that funny? : 22:04:43 :) 22:04:52 kc5tja, how long have you been doing forth? 22:04:54 arke - not really, without context. 22:05:04 coding standard document. 22:05:11 slava: Since 1988 or so. I don't remember exactly when I started. 22:05:21 kc5tja, so you're pretty good at this factoring thing eh :) 22:05:24 OMG kc5tja IS TEH OLD GRAMPS 22:05:28 arke - named what? Stardards that apply to what? 22:05:34 Old gramps? I'm only 29. 22:05:40 lol 22:05:43 ayrnieu: Coding style. for a C program. 22:06:00 I started learning about Forth first with F-PC. 22:06:08 Then I found PygmyForth, and I just fell in love with it. 22:06:29 My 486 laptop was the last machine to have PygmyForth installed on it. Unfortunately, that laptop is dead now. :( 22:06:45 Now, I'm making FS/Forth for Linux to take its place. 22:06:48 kc5tja: might i say that dosbox runs pygmy very well? 22:07:05 arke: Yeah, but so what? I won't be able to exploit the Linux environment. 22:07:05 kc5tja, what stack operators does your forth have? 22:07:07 kc5tja: i think it works good with dosemu as well, although I'm not completely certain on that one. 22:07:11 kc5tja: true. :) 22:07:14 slava: Whatever I want, whenever I want. 22:07:25 kc5tja, i mean, do you consider stuff like 2over too baroque 22:07:29 slava: I have DUP DROP SWAP NIP ROT and OVER currently. 22:07:31 kc5tja, or 2-rot 22:07:41 slava: But I define other operators as I need them as compiler macros. 22:07:43 kc5tja, and you find these are enough? 22:07:51 kc5tja, i'm trying to minimise the amount of 'stack noise' in my code. 22:07:52 slava: For 80 to 90% of my needs, yes. 22:08:22 I'll typically use 2SWAP and 2DROP when working with strings a lot, but I won't define those until absolutely necessary. 22:08:31 I like my Forth environments very, very minimal. 22:09:01 Minimal Forth = Fast Forth = easy to grok/master, though not necessarily with a shallow learning curve. 22:09:21 I do not support vocabularies; I believe firmly in repeatedly recycling the dictionary. 22:09:54 what is a vocabulary? 22:09:55 FS/Forth is restricted to only 1024 Forth vocabulary words and 256 compiler words. 22:10:02 slava: A group of related definitions. 22:10:02 what if the dictionary gets choked and clogged with stuff? 22:10:08 slava - a named wordlist. 22:10:08 arke: That never, ever happens. 22:10:28 arke: It can't happen, because every time you switch applications, the dictionary is first empty'ed. 22:10:34 kc5tja: uum, what if you have some function that gets called alot that always does 100 allot and never frees it? 22:10:38 (unless you forget to type EMPTY in your root source block) 22:10:53 hrm. 22:10:56 arke: What does allot have to do with name clutter? 22:11:06 not name clutter, dictionary clutter. 22:11:12 Like I said, though, empty takes care of all that. 22:11:41 kc5tja: alright, neat. it empties it only to a certain point though, right? 22:12:02 Unless you have mark'ed it somewhere, to the bare bones, basic, unfettered Forth environment. 22:12:19 --- quit: Herkamire ("The night time is the right time!") 22:12:20 And, unlike ColorForth, FS/Forth also lets you unmark, which lets you empty to an earlier point. 22:12:42 This permits more sophisticated overlays (which VIBE will use, once it's implemented) 22:12:57 but if you completely clear teh dictionary, isn't dup etc. gone too? :) 22:13:02 unmark will not let you go beyond the bare-bones Forth kernel though. 22:13:08 Aah, Ok. 22:13:08 :) 22:13:41 * kc5tja notes that his target compiler basically works by allocating data in the dictionary, and never frees it. 22:13:44 kc5tja, what is VIBE? 22:13:53 slava: VI-like Block Editor. 22:14:00 ah 22:14:15 A visual block editor inspired by VI, more for portability reasons, but also because VI is currently my favorite editing environment too. 22:14:25 useful for, say, a server that you'd like to fix at 'runtime' by rolling back to just after the definition of important state. 22:14:40 I'm currently in love with Kate. 22:14:56 ayrnieu: ?? 22:15:16 kc5 - mark, empty. 22:15:42 ayrnieu: Yes. Mark sets the "remember" point for empty. Unmark undoes the most recent mark. 22:17:01 And when using blocks for storage, I'm finding Forth to be comparable to my Palm Pilot in application usability. 22:17:27 Applications compile so fast that it's unnoticable. 22:17:30 what kind of programs does your forth run? 22:18:04 Currently, my Forth environment runs a very, very simple game of Go that I wrote (two player only; it's not smart enough even for the dumbest of one-player modes), which I wrote just to see how small I could make it. 22:18:14 * ayrnieu almost starts to hack on VIBE before he notices the license. 22:18:14 It also has the cross-compiler for FS/Forth. 22:18:17 try writing an http server. 22:18:35 ayrnieu: What license? 22:18:54 The last I recalled, VIBE is under zlib/libpng license. 22:19:20 It's far, far more liberal than even GPL. 22:19:29 kc5 - the source that I got off forthfreak only has 'All Rights Reserved.' 22:19:58 --- quit: arke ("Leaving") 22:20:11 --- join: arke (~chris@wbar8.lax1-4-11-099-104.dsl-verizon.net) joined #forth 22:20:14 Then I hereby grant you permission to hack on the code as you please. The only restriction you have is that you claim the original code is mine, and that it is now libpng/zlib license. 22:20:31 oh, OK. Thanks =) 22:20:44 That all rights reserved stuff is just my standard "I don't know what kind of license to use for this yet" license, which pretty well dates the code you're looking at . :) 22:20:46 YOUVE GOT WITNESSES 22:20:52 pfft whatever. 22:20:54 Like I care. 22:20:55 ayrnieu, so it was the lsd interpreter that insipired you to look at forth again? :) 22:21:06 ayrnieu isn't going to make a ton of money off of a single block editor for Forth. 22:21:07 :) 22:21:08 slava - aye. 22:22:03 slava - well, actually that LSD code that you pasted a URL to in #Lisp 22:22:06 slava: Check http://www.falvotech.com/cgi/fsforth/SamuelFalvo for a list of applications that I want to run on FS/Forth. 22:22:32 *wavy lines all across everyone's vision as we're sent to the future* ... "Wow, ayrnieu made 5 TRILLION dollars ... and just off a simple block editor for forth!" 22:22:36 # Printed Circuit Board editor 22:22:36 # Electronics circuit simulator, suitable for simulating RF circuits. 22:22:36 # Bill of Materials tool 22:22:36 # Creation of the ForthBoxComputer. 22:22:37 # Creation of several hobby electronics kits, to be offered for sale. 22:22:39 # Website maintenance tools 22:22:41 # WikiWikiWeb engine 22:22:43 # POP3 e-mail client (with Baysian filtering??) 22:22:45 # An optimizing Forth compiler that employs dataflow analysis to produce near optimal machine language output 22:22:48 # Desktop publishing and document editing 22:22:56 MysticOne: :) 22:23:02 arke: I have a feeling he gave the URL so it wouldn't get pasted in here :) 22:23:08 * MysticOne chuckles 22:23:11 its not like its alot of lines... 22:23:18 and everything written in neat 64x16 blocks :) 22:23:20 i did it so that the lazy people could see it too. 22:23:24 hahaha 22:23:33 oh well 22:23:33 slava: Yep. You just need to know how to read Forth, that's all. 22:23:34 bed time 22:23:35 g'nyght! 22:23:39 73 OM 22:23:43 will your emails be limited to 16 lines :) 22:23:45 :) 22:23:48 slava: lol 22:23:53 slava: No. 22:24:01 Source text editor != general purpose text editor. 22:24:45 However, it would indeed be neat to make the system work within the confines of a block-based system, to minimize the code I have to write. ;d 22:24:46 :) 22:24:52 :P 22:24:53 Free-flow text editors are not easy to write. :/ 22:25:14 block 345-366 is the wiki, inbox begins at block 6879, etc :) 22:25:19 Well, you could have it be a 2-D block like thing, and then when you write it out, just piece it together. 22:25:27 you'll need some kind of abstraction on top of the block system. 22:25:28 :) 22:25:44 slava: The abstraction is application specific, not OS-enforced. 22:26:24 will there be a GUI? 22:26:29 The blocks are used as a virtual memory of sorts, to implement what basically amounts to be a database. 22:26:37 yes 22:26:39 slava: A text user interface is plenty sufficient for e-mail. 22:26:48 told my girlfriend that MS could get all her personal letters... now she unplugs the network before starting Office... :-( 22:28:03 slava: The PCB editor and simulation software will have a GUI though. 22:28:09 But the GUI isn't like a WIMP-type GUI. 22:28:15 whats teh interface? SDL? 22:28:23 arke: It'll use SDL as its frame buffer, yes. 22:28:31 Coolness. 22:28:56 Of course, I ahve to get the cross-compiler to emit a dynamically linked executable first to do it, but that'll come in time. 22:29:09 brb 22:32:29 back 22:33:20 did you remember to put the seat back down? 22:33:36 The female of the house has her own toilet. The rest can deal with it. 22:34:30 how beastly 22:34:32 who do you live with? 22:36:36 --- quit: Sonarman ("leaving") 22:44:33 kc5tja, how do blocks scale with large programs? what if i have 10,000 lines? 22:44:51 or even 1000? 22:45:09 arke: I live with four other roommates. 22:45:23 slava: Very large applications tend to be much smaller in Forth. 22:45:34 slava: The 'mega' application is typically composed of much smaller applications. 22:45:50 the question still stands, how to organize a large number of blocks. 22:45:53 how many do you have in total? 22:46:07 slava: Right now, I have less than 100. But the block file grows as I need it. 22:46:36 slava: In a native-hardware Forth, the block storage device would be exclusively available for blocks. E.g., a floppy disk would have 1440, a harddrive . . . astronomical numbers. 22:47:10 Right now, I tend to start each "major" work on blocks divisible evenly by 10. 22:47:10 i'm still thinking it will be hard to organize their content. 22:47:25 do you ever need to move blocks around? 22:47:31 Your definition of organize is apparently very different from mine. 22:47:42 slava: Yes. I have a tool EXCHANGE that swaps two blocks. 22:47:55 I use it rarely though. 22:47:56 does it update calls to load in other blocks? 22:48:14 How can it? Source is stored as ASCII content within blocks. 22:48:18 what oif you have program X at block 10-19, and program Y at 20-21, then you need to add some screens to program X? 22:48:32 I do one of two things, depending. 22:48:58 I either add the blocks to 22-2x, and change the root source block of X to include those, or I write a tool to block-move a series of blocks up. 22:52:13 Typically, however, I'd just stick the blocks at around 25-30, leaving a few blocks left over for Y to be expanded. 22:52:23 It's really not hard to do, and INDEX helps keep things nice and organized. 22:52:41 Well, not organized per se, it is quite a suitable search tool. 22:56:10 ok 22:56:39 can you post your current index? im curious. 23:00:33 4 list Screen 4 not modified 23:00:33 0 ( INDEX ) empty 23:00:33 1 23:00:33 2 : .title dup 5 u.r space dup block 64 type cr ; 23:00:33 3 : title swap .title 2 + swap ; 23:00:34 4 : .index begin 2dup u> if 2drop exit then title again ; 23:00:36 5 23:00:40 6 cr .index 23:00:42 7 23:00:44 8 23:00:46 9 23:00:48 10 23:00:50 11 23:00:52 12 23:00:54 13 23:00:56 14 23:00:58 15 23:01:06 no i meant the index itself 23:01:18 Of my working blocks file? 23:01:22 yes 23:01:40 i'm wondering what kind of organization you have. 23:01:47 0 60 index 23:01:47 0 23:01:47 2 ( MARK, EMPTY, UNMARK ) 23:01:47 4 ( INDEX ) empty 23:01:47 6 ( EXCHANGE or COPY two blocks ) empty 23:01:48 8 ( Line-based Block Editor ) empty 23:01:54 10 ( FS/Forth::Target ) empty 23:01:54 12 ( FS/Forth::Target::Buffer ) 23:01:54 14 ( FS/Forth::Target::Accessors @ ! C@ C! ) 23:01:56 16 ( FS/Forth::Target::Compiler Core ) 23:01:58 18 23:02:04 20 ( FS/Forth::Vocabulary::Forth ) 23:02:04 22 ( FS/Forth::Vocabulary::Forth::Bind ) 23:02:04 24 ( FS/Forth::Target Compiler::Forth Word Search ) 23:02:06 26 ( FS/Forth::Target Compiler::Entry Point ] ) 23:02:08 28 ( FS/Forth::Target Compiler::Compiler Word Search, [, ; ) 23:02:12 30 ( FS/Forth::Target Compiler::Decimal and Hex Literal Support ) 23:02:14 32 ( FS/Forth::Target Compiler::Decimal and Hex Literal Support ) 23:02:16 34 ( FS/Forth::Target Compiler::[entry-point] ) 23:02:18 36 23:02:20 38 23:02:22 40 ( ELF Process Image ) 23:02:24 42 ( ELF File Output ) 23:02:26 44 ( ELF Program and Section Headers ) 23:02:28 46 ( ELF String Section ) 23:02:30 48 23:02:32 50 ( ELF Process Image ) -4k- hhere elfHeader h! 23:02:33 52 23:02:36 54 23:02:37 56 23:02:42 58 ( PRETTY - Pretty-lister to text files ) empty 23:02:44 60 ( FS/Forth for Linux :: Root Block ) 23:02:46 62 ( FS/Forth for Linux :: syscall bye ) 23:02:48 64 ( FS/Forth for Linux :: Primitives ) 23:02:50 66 ( FS/Forth for Linux :: Primitives [con't] ) 23:02:52 68 ( FS/Forth for Linux :: TYPE EMIT CR ) 23:02:54 70 ( FS/Forth for Linux :: ACCEPT ) 23:02:54 I see a bug. 23:02:56 72 23:03:09 it was 0 60 index, yet its at 72 already. 23:03:25 That's because I can fit only so much text in my window before it scrolls off. 23:03:41 I typed 62 72 index afterwards. 23:03:44 I just didn't paste it. 23:03:56 ok 23:04:04 I didn't even mean to grab the 0 60 index -- it's not terribly important to the listing. 23:04:19 kc5tja, my interpreter already has 1000 lines of code in the std library, but a lot of it is comments and blanks. 23:04:34 kc5tja, i want to give blocks a try though. 23:05:07 Well, notice that I skip every other block in the listing. :) 23:05:22 Also, as you can see by the listing of the INDEX block itself, not all 16 lines have to be used. 23:05:50 Also, note blocks 60-70 -- yes, FS/Forth coding has begun. :D 23:06:01 :) 23:06:42 you basically have a filesystem hierarchy there :) 23:06:52 Yes, but it's semantic, not hierarchial. 23:07:45 I never said I didn't organize things together. :) I only said that I prefer blocks over flat files. :) 23:10:58 BTW, the PRETTY command is what I use to emit blocks as a continuous listing in ASCII format, suitable for e-mailing and such. 23:11:21 do you load blocks manually? 23:11:29 Yes. 23:11:44 The root block of an application is responsible for LOADing its dependent blocks. 23:12:03 right 23:12:07 I also have aliases set up. 23:12:17 Notice that many of the blocks start right away with empty. :) 23:12:28 Block 2 contains my listing of aliases: 23:12:28 what does that do? 23:12:38 2 list Screen 2 not modified 23:12:38 0 ( MARK, EMPTY, UNMARK ) 23:12:38 1 23:12:38 2 warnings off 23:12:38 3 : mark s" marker _empty_" evaluate ; 23:12:38 4 : unmark s" _empty_" evaluate ; 23:12:41 5 : empty unmark mark ; 23:12:43 6 23:12:45 7 : index 4 load ; 23:12:47 8 : exchange s" x" 6 load ; 23:12:49 9 : copy s" c" 6 load ; 23:12:53 10 : fs 10 load ; 23:12:55 11 : elf 40 load ; 23:12:57 12 : plist 32 word count 58 load ; 23:12:58 You know what I really hate about SDL? 23:12:59 13 23:13:01 14 mark 23:13:03 15 23:13:08 You know what I really hate about SDL? 23:13:18 s = SDL_CreateRGBSurface( SDL_SRCCOLORKEY, scr->w, scr->h, 23:13:18 scr->fmt->BitsPerPixel, 23:13:18 scr->fmt->Rmask, scr->fmt->GMask, 23:13:18 scr->fmt->BMask, scr->fmt->AMask); 23:13:35 grrrr 23:13:52 That Rmask isn't the same basic form as BMask? :) 23:13:54 All I want to do is clone SDL_GetVideoSurface(); 23:14:05 kc5tja: ? 23:14:31 arke: Note the case difference between Rmask (little m) and BMask (bit m). 23:14:46 One of those two symbols is going to be undefined. 23:14:47 er, oops 23:15:04 heh, yeah 23:15:09 its supposed to be small case 23:15:11 thanks 23:16:33 Aah, yes. 23:16:46 If I keep all the surfaces the same type, the blitting will be fast. 23:16:58 arke, what are you coding? 23:17:28 Frapiar, an Epiar branch (which is basically a space/shoot/trade game) 23:18:13 HEH! I just thought of a name that is so awesome for that kind fo game, but which would likely get you sued. 23:18:14 :) 23:18:17 Century 21. :D 23:18:41 arke, all in forth? 23:18:41 But I digress. 23:18:46 kc5tja: :) 23:18:48 slava: no, C 23:18:52 :( 23:19:06 slava: The aliases are used to rapidly 'name' applications, and lets me switch between them at will. 23:19:29 kc5tja, does forth multitask? 23:20:00 slava - many Forths multitask. 23:20:13 Although in this case, I have only a few "applications" created -- fs (short for FS/Forth) compiles a new image, elf creates a new ELF executable header (no longer required explicitly, since fs now does it automatically), and plist pretty-lists a series of blocks. 23:20:27 slava: Depends on your definition of multitasking. 23:20:48 In the strictest sense of the term "multitask," many Forths are equipped with a cooperative task switcher that permits one to create multiple tasks. 23:21:08 But multitasking is often restricted to multithreading, a la Unix threads, where all the threads belong to a single application. 23:21:32 Thus, if you are wondering if you can run multiple applications at once, then the answer is "not as such." 23:21:46 I want to qualify something though. 23:21:55 though nowadays many systems have 'VM-level' threads that allow for lightweight concurrency. 23:22:06 Up to now, and even continuing from now into the future, most ANSI Forth purists will tell you it's not possible to run multiple Forth apps concurrently. 23:22:21 kc5 - er, why? 23:22:38 ANSI purists like teh wang then. 23:22:48 ayrnieu: Because the dictionary behaves like a stack: if you launch tasks A, B, then C, and want to kill B, you must also kill C as well. 23:23:18 However, I posit that it is possible to partially get around this if you break your code up into the typical model, view, and controller triads. 23:23:44 If you launch all your models as background tasks, which do not require user interaction, then they can certainly run concurrently. 23:23:58 or have separate dictionaries per task? 23:23:58 The only thing that changes in the dictionary, then, is the view/controller code. 23:24:18 slava - an additional task-local dictionary, more likely. 23:24:33 slava: You can do that, and this is how old-style Forth systems worked. 23:24:40 But this partitions memory into small, fixed-sized chunks. 23:24:42 kc5 - I've absolutely no idea what you mean by 'model, view, and controller triads.', sorry. 23:24:52 ayrnieu: Ever heard of Smalltalk? 23:25:21 kc5 - I've managed to learn just about everything but that language or its kin. 23:25:43 Smalltalk invented the MVC design pattern. It's since spread widely to other GUI systems. 23:25:44 smalltalk has the concept of an 'image' which in some ways is similar to forth blocks. 23:25:48 but its much more complex. 23:25:49 The idea is simple. 23:26:04 slava: No, not quite. :) If you want, I can explain the differences in a bit. 23:26:16 You have the 'model' object which, well, models something. 23:26:24 A text file consists of an array of bytes, for example. 23:26:35 That array of bytes can be searched for text patterns, etc. 23:26:37 well an image stores serialized objects right 23:26:41 blocks is source 23:26:45 The model exposes only the brute functionality of something. 23:27:19 so the model wouldn't have pattern-matching functions, just what it needs to act like an array of bytes. 23:27:33 A view object is responsible for interrogating the model, to find out how to render it to the user (hence its name: it's responsibility is solely to display or let the user view the state of the model). 23:27:57 ayrnieu: No, the model certainly does have a search function. 23:28:09 A text editor would be pretty useless without one. :) 23:28:40 But the model DOES NOT interact with the human AT ALL. It's purely a model of whatever it is the human is interacting with. 23:28:58 ah, OK. 23:29:00 The model's job is purely to maintain state. 23:29:08 And to represent the high-level functionality of the program. 23:29:15 The view's job is to render that state to the screen. 23:29:50 The controller's job, however, is to interpret human gestures so that it may instruct the model or view what to do (the former case would be like, "Search for string FOO", while the latter might be "Scroll down 3 lines.") 23:30:07 The view and the controller are often kept together. 23:30:23 Practical example: many X11 applications are GUI front-ends to Unix shell tools. 23:30:46 (e.g., Grip is a front-end to both cdparanoia and an mp3 encoder) 23:31:26 In this case, the shell tool is serving as the model, since it represents only the most abstract concepts and functionality, whiel the GUI engine is responsible for presenting the state of the system and for controlling the shell tool. 23:31:37 Well, in Forth, we can get the same basic idea. 23:31:39 you know what I just realized? 23:31:41 controller is like the event listeners, 23:31:47 arke, what 23:31:49 slava: More or less. 23:31:58 They're a bit more than that, because they can also generate events. 23:32:00 I just got the motivation I needed to ACTUALLY GET SOMETHING DONE 23:32:36 My idea is that you have the models resident in the background, not interacting with anything except their background stuff. 23:32:49 E.g., I can have an IRC client running in the background, even if I'm viewing another application. 23:32:57 It'll just queue and log stuff to block storage. 23:33:34 Then, when I want to switch to the IRC program, the source for the IRC view/controller code will empty the dictionary, taking out any previous view, and compiling itself in its place. 23:33:49 No models need be changed in the process, since they've already been loaded a priori. 23:34:03 in my language you can do multithreading with continuations. 23:34:22 slava: Forth already has innate partial continuation support: the return stack. 23:34:33 kc5tja: in the general case, you often want multiple views/controlers for a single model. 23:34:53 kc5 - thanks for the explanation -- I think you've solved a number of problems I've worried about but haven't done much with, yet. 23:35:13 TreyB: So switch to a different view/controller. 23:35:20 Simulatneously. 23:35:32 Simultaneously, even. 23:35:37 TreyB: If that were the case, I'd be using a multi-overlapping windowing window manager. 23:35:49 * kc5tja has never yet found a concrete need for multiple views on a single model. 23:36:10 But even so, nothing is preventing you from writing code to display two concurrent views of the same piece of data. 23:36:16 (or more if you desire) 23:36:28 You make it sound like it's utterly impossible. 23:36:52 eh? 23:37:09 "In the general case, you often want multiple views/controllers for a single model." 23:37:16 That makes it sound like my proposal isn't suitable for this. 23:37:54 You said: "empty the dictionary, taking out any previous view, and compiling itself in its place" 23:38:20 If I load a "view" that happens to have two or more concurrent views, then I fail to see how what I said doesn't satisfy your criteria. 23:38:22 I simply noted that sometimes one just wants to add a view. 23:39:04 * kc5tja just switches to a different view. 23:39:28 You can implement "add" via "replace with n+1", as you suggested. 23:39:51 * kc5tja nods 23:40:51 At any rate, I do find that 99.9% of my applications don't really need 'models.' 23:41:24 So far, every application I've written is quite happy manipulating data in block storage, treating it more or less as an orthogonal, persistent store. 23:41:45 I'd want to investigate the cost of tear-down-and-replace vs. "simply" adding. The adding mechanics may introduce enough extra complexity to warant avoiding it. 23:41:47 (even though it's not really orthogonal, since i have to manually use BLOCK to get a block address, or mark it UPDATEd). 23:42:05 What do you mean by tear-down-and-replace? 23:42:36 Oh, you mean swapping out whole chunks of code to handle a particular display situation? 23:42:42 Right. 23:42:51 * kc5tja is getting punchy. I should be in bed right now, so I apologize if I'm getting incoherent. 23:43:10 * TreyB should have bailed two hours ago himself. 23:43:31 * kc5tja wanted to investigate the tear-down-and-replace method of killing a "middle task," as I like to call it. I think with a suitably fast Forth compiler, it'd make application termination a non-issue. 23:44:32 Everthing involves trade-offs. Find a sweet spot and lick it :-) 23:45:14 But right now, Forth changes applications so fast that, even though it recompiles an app every time I use it, it appears as if every app is always running. 23:45:41 It's very sweet. I enjoy it immensely. 23:46:35 PalmOS essentially works this way. Switching apps involves terminate-and-restart. 23:46:41 * kc5tja nods 23:46:46 That's why I always allude to PalmOS. 23:46:55 I absolutely love it. 23:47:11 I can tell you from intimate experience that it has its warts. 23:47:19 Everything does. 23:48:16 For example, if I were to make an e-mail client or an IRC client, I'd ahve to make a background task to manage the connection(s), because if I switch to another app, I don't want those network connections to close. 23:48:36 Thus, I have to have some kind of lingering code to handle things on behalf of the UI-portion of the application. 23:48:45 cool 23:48:59 But these kinds of applications are very, very, very rare in practice. 23:49:18 I know for a fact a web browser needn't be this way. Grab the HTML, grab whatever images you have, and be done with it. 23:49:54 You might have to implement some lingering code if you want to do background downloads while using another application, but still, as a whole, a web browser is a pretty self-contained little system. 23:50:04 Music programs would also need lingering code. 23:50:42 In reality, lots of programs would benefit from architecting this way. 23:51:12 Forth is good at forcing people to factor, factor, factor. 23:51:37 Folks who dislike factoring, or who can't do it (yet), find Forth a very difficult language to learn. 23:52:18 This, I think, is just another example of how forth literally forces the programmer to factor his code better. 23:52:34 Well, it's midnight here. I need to get to bed. 23:52:40 Night all! 23:52:43 * TreyB too. 23:52:46 G'night. 23:52:51 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 23:53:09 night 23:59:59 --- log: ended forth/04.01.10