00:00:00 --- log: started forth/04.02.09 01:11:57 --- quit: Nutssh ("Client exiting") 01:12:11 --- join: Nutssh (~Foo@gh-1081.gh.rice.edu) joined #forth 02:09:51 Erm, Who logged figuk? 02:56:21 i would not mind such a log 03:30:44 I have the logs. 03:31:46 http://robert.zizi.org/pub/figuk.log 03:32:32 thanks 03:35:47 * Robert notices that he has 94MB of IRC logs. 03:36:22 Since a few months, heh. 03:59:23 wow, alot 04:00:40 Guess where I'm living my life. 04:00:53 --- quit: Nutssh ("Client exiting") 04:03:15 heh 04:40:52 --- join: Serg (~z@212.34.52.140) joined #forth 04:41:04 hello 04:41:30 hi 04:41:56 Robert: how's your ham license ? 04:42:11 It's still not on fire! 04:42:18 ?? 04:42:22 :D 04:42:31 I'm joking. 04:42:35 still not on air, w kW of power ? 04:42:51 Don't have any VHF equipment, and the government STILL doesn't allow me to use HF, so... 04:42:55 No ;) 04:43:14 HF=SW ? 04:43:22 1-30 MHz 04:44:33 for me above 30 MHz is not interesting, coz it's local 04:44:34 Yes. 04:44:39 Right 04:44:43 Or 3-30 I think they define it as 04:44:51 Meaning that 160m is in fact MW ;) 04:44:56 u have no 1800kHz ? 04:45:18 We have that band, but I can't transmit on it. :( 04:45:38 i got old military radio, but seems it's dead ;(( 04:46:00 only locals on 1.8, 3.5, 7 04:46:13 err, 3.5 - deaf at all 04:46:24 and 14 too ;(( 04:47:08 what RX antenna do u have ? 04:47:54 * Serg has ~5m of indoor tail 04:48:03 Hehe 04:48:08 About 15m of wire to a tree 04:48:13 About 7 meters above ground 04:48:19 nice 04:48:30 and what do u hear, on what rig ? 04:48:35 I have heard people from most of europe. 04:48:51 IC730, which I have borrowed. 04:48:55 USA, Pacific ? 04:49:00 No 04:49:15 local conditions, QRN etc. ? 04:49:46 * Serg is in crowded rooming house in industrial district, near "Pravda" printing plants 04:50:05 I hear quite a few Russians 04:50:10 Hehehe 04:50:17 Not that bad 04:50:39 3 of 5 storeys, North blocked by 9-storey house 04:51:00 Now I'm listening to germans (or maybe dutchmen) on 18m 04:51:08 room faces west 04:51:09 :/ 04:51:52 I mostly hear germans and russians. 04:52:09 And finns 04:53:22 imagine an adv in dating magazine: looking for a woman on hi-building in no-QRN district ;))))) 04:54:14 do u send QSL ? 04:54:47 Haha 04:54:48 Nope.. 04:55:02 does ICOM suffer jam from working computer ? 04:55:38 But my parents are giving me a membership in the amateur radio organization of Sweden (SSA), so I will be able to use their QSL bureau. 04:55:44 I don't know :) 04:57:34 * Serg gonna carry my rig to local hams shack and check it thoroughly, and maybe replace valves 04:57:50 14kg of weight, damn 04:58:07 Hehe 04:58:26 looks like poor sens. or inner noise 04:58:56 latter is strange, coz no digi inside, happily 04:59:05 1973 ;) 04:59:19 older than me - 1979 ;)) 05:00:39 seals intact ;)) 05:08:16 --- join: hovil (~hovil@CommSecureAustPtyLtd.sb1.optus.net.au) joined #forth 05:19:44 re 05:28:37 --- quit: Serg () 05:28:58 --- join: I440r (~mark4@65.42.232.20) joined #forth 05:29:40 heh a buddy of mine is having an interview todeay and i drove him here and i found an open wireless connection here :P 05:30:04 heh 05:30:06 nice 05:30:29 yea lol 05:30:40 im doing an emerge -uD world -p :))) 05:30:47 Heh 05:30:48 :D 05:30:54 Hi I440r 05:30:54 erm sans the -p 05:30:57 hi :) 05:31:20 Open wireless lans are nice... 05:31:59 A couple of friends and I found one on a hill right out in nowhere 05:32:06 man its a fscking FAST connetion too !! 05:33:01 --- join: zardon_ (~zardon@h24-68-59-145.gv.shawcable.net) joined #forth 05:33:01 --- quit: zardon (Read error: 104 (Connection reset by peer)) 05:33:09 damn 05:33:17 180k per second download 05:33:35 Yay 05:36:34 deleting 200 spam :/ 05:36:52 Heh 05:36:52 --- join: _proteus (~proteusgu@216.27.161.121) joined #forth 05:36:57 I get no spam :) 05:37:00 * Robert is lucky 05:37:02 And paranoid 05:37:05 heh 05:37:10 --- nick: zardon_ -> zardon 05:51:47 --- quit: qFox (Read error: 104 (Connection reset by peer)) 05:52:14 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 05:53:36 --- quit: proteusguy (Read error: 110 (Connection timed out)) 05:53:47 --- quit: qFox (Client Quit) 07:06:07 zardoz! 07:06:57 heh, nope 07:07:09 you are the only one to see that 07:07:15 have been 07:07:28 Well, I *am* special. 07:10:54 anyone who has seen that is~ 07:24:23 Or as Sean Connery says it... "Zhardozh." ;) 07:26:20 heh 07:48:54 --- quit: _proteus ("Leaving") 08:50:59 --- join: proteusguy (~proteusgu@65.196.135.240) joined #forth 08:51:00 --- quit: arke (Read error: 104 (Connection reset by peer)) 08:58:38 --- quit: I440r ("brb") 09:09:24 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 09:09:49 --- join: I440r (~mark4@65.42.232.20) joined #forth 09:31:19 --- join: downix (~downix@adsl-2-34-247.bct.bellsouth.net) joined #forth 10:48:35 --- join: moritz_ (~moritz@p50877A4B.dip.t-dialin.net) joined #forth 10:48:49 Hallo 10:49:27 Hola 10:53:37 top of the day to you 11:38:52 --- quit: I440r ("brb") 11:46:37 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 11:47:38 --- join: I440r (~mark4@65.42.232.20) joined #forth 11:49:09 I'm puzzling a bit over how to implement Forth locals. 11:49:21 dont 11:49:32 locals do nothing but add to the complexity 11:49:42 forth has NO need for locals what so ever 11:49:58 yeah 11:50:01 there isnt a single GOOD implementation of local variables for forth 11:50:03 not one 11:50:04 evil 11:52:30 That's fine, but since my system is intended to allow the programmer to create their own domain-specific language, using Forth-like architecture, I wouldn't want to force them to purely use the stack. They might want to make some BASIC-ey sort of scripting language out of it, for instance. 11:55:11 --- join: networm (~networm@L0628P13.dipool.highway.telekom.at) joined #forth 12:06:32 I suppose they can just manage their own damn locals stack if they really need it... screw 'em! 12:08:42 --- quit: I440r (Remote closed the connection) 12:08:59 thats the spirit~ 12:12:49 Hehe 12:14:15 :) 12:14:25 OK, here's another confusion... 12:15:03 The parameter field can contain code and/or parameters. 12:15:32 Seems that it could get a bit confusing with some defining words. 12:18:52 --- part: moritz_ left #forth 12:22:16 : test , , create does> dup @ swap 1 cells + @ ; 12:29:31 How does this normally map into memory? I've got DOES> working in my Forth, but I have seperated a word's code and data... 12:30:09 --- quit: downix ("Leaving") 12:39:56 madgarden: I think you normally do: : test create , , DOES> ... 12:40:20 Er, oops, yea I have that backwards. 12:40:37 But I guess I'm just confused about the intermingling of code and parameters. 12:40:55 madgarden: CREATE adds a definition, and makes it put the address of HERE on the stack. 12:41:24 DOES> modifies the last definition to branch to where you put DOES> after it puts the address of HERE on the stack 12:41:55 CREATE always allocates enough code space to fit this branch. 12:42:21 Ahh... 12:44:26 so CREATE normally creates a DOVAR word, and DOES> changes the code field of the last word to DODOES and links to the DOES> code of the defining word... ? 12:45:51 I think you got it 12:47:26 And is there a restriction on calling DOES> for a non-CREATEd word? 12:48:20 usually. I suppose if you implement it right there doesn't have to be one 12:48:36 s/right/just so/ 12:52:40 I'm just trying to think of a case where this would mess up an existing word that didn't have the DOES branch field allocated. I supposed calling DOES> on an existing non-CREATEd word would just scrap any parameters, and convert to a DODOES word. 13:00:41 --- join: haqqer (wossname@HSE-QuebecCity-ppp82318.qc.sympatico.ca) joined #forth 13:07:37 --- quit: hovil ("Leaving") 13:28:06 madgarden: I don't know what you mean by "parameters" 13:29:50 --- join: BjarkeEbert (~BjarkeEbe@0x503e7c12.arcnxx12.adsl.tele.dk) joined #forth 13:31:22 hi 13:33:01 hi zardon :) 13:33:23 Hi 13:33:29 A danish forther. :) 13:35:29 parameters, data... same thing, non? I've seen it called both in various articles. CFA, PFA... 13:36:37 Right. 13:36:43 At least when it comes to the stack. 13:39:13 Well I'm actually not talking about the stack, but the memory where a word's data is stored. 13:39:25 Oh. 13:39:42 Like that.. then I'm not sure. 13:39:50 * Robert isn't a dictionary :) 13:40:18 madgarden: I see. 13:41:04 What do you call it then? ;) 13:41:08 madgarden: I was imagining a DOES> that would append DODOES to the most recent definition, not replace the current definition with DODOES. 13:41:36 madgarden: data, or data space 13:44:33 Herkamire: Ahh. Oops, sorry for my articulate explanation. ;) OK then, I'll stick with "data space" from now on. Seems to be described as "parameters" a lot, though, which is more confusing. 13:46:08 madgarden: "data space" will probably be understood correctly by more people 13:46:40 it's sometimes hard to find forth terms that everybody has the same definition for 13:47:36 --- join: Nutssh (~Foo@dunwlessnat.rice.edu) joined #forth 13:47:48 I haven't found a universal term for the word lookup table that FIND searches. Most people call this the dictionary, but some call code space the dictionary 13:49:21 the dictionary is just the part of code space that contains word definitions 13:52:27 Well, there's also the vocabularies to consider, which are often in "threads", or something. More confusion. Most of it doesn't apply to my Forthy thing anyway, heh. 13:55:42 yeah, I don't have vocabularies, or a seperate data space. 13:57:22 I like calling the word lookup table the "dictionary" and the data/code space the "heap" except they sometimes cause confusion. 13:57:45 zardon: what else is in code space besides definitions? 13:57:55 alloc 13:57:57 allot 13:58:10 I've got seperate data space of sorts, but mostly because the data is script values and I didn't want to have 16 bytes for each compiled cell. Vocabularies and dictonaries (which can be shared), but there's a lot of non-Forth cheating since it's written in C. 13:59:07 hmm 13:59:09 zardon: I thought allot give you memory in data space 13:59:17 yeah 13:59:21 zardon: or does "dictionary" mean all available memory? 13:59:26 well, i have one uber space 13:59:36 i treat it as all memory 13:59:49 im working on dynamic memory allocation atm 13:59:54 zardon: and you call the one uber space the "dictionary"? 13:59:57 Speaking of dictionaries, code/data space, and HERE... how is the link field of a new word normally linked to the previous word? Would that be via LAST? 14:00:20 madgarden: in what fortH? 14:00:30 many forths don't use a linked list 14:00:31 --- quit: madgarden (Read error: 54 (Connection reset by peer)) 14:00:38 --- join: madgarden (~madgarden@Kitchener-HSE-ppp3576375.sympatico.ca) joined #forth 14:02:55 Well, in any Forth, just in general. I realise that each Forth is unique, but they tend to often have a link field in their word headers. 14:03:09 Unless I'm misunderstanding the purpose of that now. 14:05:00 they usually link backwards right? 14:05:04 (if not both ways) 14:05:40 FIND starts with the most recent, so they must link newest -> oldest 14:05:55 Yep. 14:06:02 I gather you don't link them this way? 14:07:45 --- quit: haqqer ("oshi") 14:09:36 --- quit: scope ("leaving") 14:30:32 madgarden: no, just do an array 14:32:18 Herkamire: And you did say your code/data was seperate from the dictionary? 14:32:38 yeah 14:33:23 hey guys 14:33:28 hi warpzero 14:33:31 i have questions today 14:33:32 Greetings program. 14:33:42 program wishes to learn 14:34:15 I save a few memory regions into my ELF 14:35:01 the kernel uses the chip's TLB to map program-space to real memory space right 14:36:23 1) dictionary 2) source blocks 3) data (strings and such. I don't use this yet) 14:36:58 warpzero: what kernel? what chip? 14:37:12 well the linux kernel 14:37:21 but i dont know does it vary by chipo 14:37:40 Herkamire: Are you not compiling yet? Is the data (3) also for compiled code? 14:38:34 (3) is not a traditional data space. C, and friends compile to the code space 14:38:45 --- quit: qFox ("if at first you dont succeed, quit again") 14:39:03 I intend to put strings, tables, and other data there. 14:40:38 my code space is not saved to the ELF. 14:41:32 So your code space is the "source blocks"? 14:41:38 Oh, never mind... 14:41:42 You're talking about the ELF here. 14:41:52 sorry I left code space out of my list because it's not in the ELF 14:42:01 My fault... too many chat windows. ;) 14:43:23 full list of memory sections when herkforth is running: 1) ELF header and kernel (as loaded by linux) 2) dictionary 3) source 4) additional data for source (unused) 5) code/data space 6) stacks 14:45:37 I've yet to figure out how to keep respective source code tied to the compiled words after the fact. 14:45:40 when you bootstrap (save to a new ELF) sections 2, 3 and 4 are spaced out nicely again so they have room to grow. 14:46:51 I have an entry in the dictionary header records that says where the source is for each word. Problem is that when you change the source, they are no longer correct. 14:47:04 I couple weeks ago I wrote the code to search and update these pointers 14:47:38 I don't know if you can do that with a traditional forth. 14:47:49 Do you basically just point to the start of the source text? 14:48:04 yeah. except that I don't use text 14:48:07 I'd planned to have a string containing the source code, attached to each word. 14:48:27 madgarden: that would work. 14:48:30 You've got a Colorforth variation? 14:48:33 madgarden: shawdow blocks 14:48:49 madgarden: it's more like colorforth than ANS forth 14:48:55 shadow 14:49:04 Herkamire: Except, I can't absolutely know where the source for each word starts or ends, necessarily. 14:49:25 madgarden: yep. that's an issue I'm still looking for a solution to. 14:49:34 I would like the computer to know where definitions start and end 14:50:02 I may change the way the source is stored so it can 14:50:27 My problem is compounded by the fact that I don't even know what the language looks like. 14:50:30 this information is useful to the editor, and user, and will be very handy for an optomizer. 14:50:37 Since it's defined by the Forthy user. 14:50:58 Yep, it would be ideal. 14:51:26 Especially for a funky tree-viewed linking Forthy editor. 14:51:33 I store my source similar to the way aha does 14:51:58 to do a tree view you need to know where the end of the definitions is 14:52:52 --- quit: proteusguy (Read error: 54 (Connection reset by peer)) 14:57:35 --- quit: Nutssh (Read error: 110 (Connection timed out)) 15:29:30 --- quit: BjarkeEbert ("Leaving") 15:48:13 --- join: Sonarman (~matt@adsl-64-160-166-10.dsl.snfc21.pacbell.net) joined #forth 15:52:52 hi everybody 15:53:20 hi sla 15:53:23 va 15:54:58 great -- i get some time to work on my game tonight :) 16:04:18 --- join: proteusguy (~proteusgu@216.27.161.121) joined #forth 16:18:22 --- join: Nutssh (~Foo@gh-1081.gh.rice.edu) joined #forth 16:53:10 --- quit: networm ("Client exiting") 17:00:23 --- quit: Nutssh (Read error: 110 (Connection timed out)) 17:08:13 slava: What's your game again? 17:09:36 madgarden, 2d top view urban crime shoot-em-up and RPG :) 17:14:15 madgarden, and you can press F2 to drop into a forthish interpreter and tweak game parameters 17:16:26 --- quit: Robert (Read error: 60 (Operation timed out)) 17:16:33 --- join: Robert (~snofs@c-185a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 17:19:34 Hey nice! 2D shootemup eh? Like, what style? 17:19:55 slave, and yes, *every* game should have a Forthish console interface. :) 17:19:57 slava 17:21:41 well there's a tile based map, it scrolls when your guy runs around, you can have vehicles and weapons, you can interact with people. its still under development, but quite fun already 17:22:00 re: the console -- you can only cheat once you know postfix syntax :) 17:22:08 So, a bit GTA-ish? 17:22:20 yes, a bit like GTA but you don't steal cars, you have to purcahse them, etc 17:22:23 in general its more RPG-ish 17:22:38 My kung fu brawler game also has a Forth-ish console. Haven't been working on it though, it was undergoing a rewrite. :-/ 17:22:39 you can't just go around killing people aimlessly, you have to earn money and buy stuff 17:22:43 otherwise you'll just get shot 17:22:56 Ahh, more RPG-ish sounds like a good plan. 17:23:07 its pretty immoral :-) 17:23:21 there are various ways to earn money -- drug dealing, sticking people up, burgling houses 17:23:40 Kids these days, I tell ya! ;P 17:23:45 bullets are kind of expensive so you have to be careful, can't go too crazy 17:24:12 i plan on doing a mission engine scripted using the language 17:24:12 I'm working on a few game projects. Mostly kung fu oriented, though one is more of a dungeon-themed beatemup. 17:24:20 cool! 17:24:21 Sounds good! 17:24:22 what language? 17:24:36 Yep, I'll be using Forthy for everything from configuration to AI event handling. 17:24:45 My stuff is all written in C. 17:24:51 cool 17:25:08 i'm writing in java and my language 'factor', my langauge compiles to virtual machine bytecode 17:25:13 using opengl for graphics 17:25:22 Yes, I have seen some of your factor code. Coolness. 17:25:41 Right now I'm using Allegro for graphics/sound etc. 17:25:46 what is allegro? 17:25:47 Though, I may switch to SDL down the road. 17:25:49 i still haven't done sound 17:26:20 Allegro is a C game library, basically. Nice and high-level with functions like draw_sprite(), play_sample(), set_gfx_mode(), etc. 17:26:59 cool 17:27:02 opengl is a bit more low level than that 17:27:06 but i have a nice set of wrappers 17:27:50 when the compiler is better i want to port more java code to factor 17:27:58 Yep, actually Allegro has an OpenGL addon. 17:29:40 --- join: Robert_ (~snofs@c-185a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 17:29:42 --- quit: Robert (Remote closed the connection) 17:29:51 Definitely, Allegro's advantage is its high-level interface. It's been around a while though, and could use an overhaul... that's where the next version of Allegro is heading. It will have native OpenGL support, for one. 17:30:01 Dragonball Z is on, bbl. ;) 17:30:04 --- nick: Robert_ -> Robert 18:13:04 slava: Does your project have a web page? 18:15:21 madgarden, not yet 18:39:14 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 18:39:20 --- mode: ChanServ set +o kc5tja 18:42:32 hey kc5tja 18:42:43 Howdy 18:42:50 Hi 18:42:54 * kc5tja is cooking. 18:43:20 Hehe.. turned out I and another guy both wrote about the same program, in Forth and in Python. 18:43:30 His was 10 times larger (counting lines of code). 18:44:45 hehehe 18:53:48 what was the program? 18:54:11 brb -- water's boiling. 18:57:09 Robert, forth interpreter :) 19:08:13 Heh, no. 19:08:25 High level language -> brainfuck compiler. 19:08:34 Not the most useful program there is. :) 19:15:49 :) 19:17:19 my bf interpreter is 1K gforth source 19:17:22 37 lines 19:17:36 hahah 19:18:06 slava: what? 19:18:18 Funny that I wrote a bf interpreter? 19:18:23 yes 19:18:29 ok its on 19:18:32 i'm going to write one in factor 19:18:36 and it will be less than 37 lines 19:18:37 :-) 19:18:43 what can I say. I'm a sucker for small forth programming challanges 19:18:58 oh yeah! well, I'm going to... 19:19:01 i did a static http server in 47 lines 19:19:03 umm 19:20:48 fun :) 19:21:14 oh yeah, well I did a mandelbrot generator in 8 lines 19:22:00 I played with HTTP a bit 19:22:08 didn't like it much 19:24:19 Hehe. 19:24:29 Mandelbrot generator in 8 lines, not bad. :) 19:26:40 I just changed it to make a 400x400 image instead of 200x200. much more impressive now :) 19:29:20 * kc5tja did 2048x2048 with it. Very nice. :) 19:29:50 Well, I can barely write an ASCII box-drawing program in Forth. ;) 19:31:21 kc5tja: :) 19:31:51 * Herkamire goes and writes an ASCII box-drawing program in forth. 19:33:41 brb 19:36:57 forget box 19:37:04 Oops, wrong window 19:37:09 madgarden: too late, I already wrote it 19:38:02 Well, let's have it! Mine's almost done too. 19:38:37 back 19:41:49 ( w -- ) 19:41:49 : line 0 do 42 emit loop cr ; 19:41:49 19:41:49 ( w -- ) 19:41:49 : sides 42 emit 2 - 0 do 32 emit loop 42 emit cr ; 19:41:49 ( w h -- ) 19:41:51 : box 19:41:53 over line 19:41:55 2 - 0 do dup sides loop 19:41:57 line 19:41:59 ; 19:50:12 Herkamire: So let's see your 1 line version. ;) 19:51:12 lol 19:59:52 variable width 19:59:52 : top width @ 0 do 42 emit loop cr ; : bottom top ; 19:59:52 : middle 42 emit width @ 2 - 0 do space loop 42 emit cr ; 19:59:52 : box ( height width -- ) cr width ! top 2 - 0 do middle loop bottom ; 20:01:26 madgarden: very nice 20:06:48 madgarden: i like yours better. 20:20:12 Herkamire: :) funny how similar they are! I guess a box is a box. :) 20:21:11 madgarden: I guess so :). I was thinking about leaving the width on the stack, but I didn't bother trying it. 20:21:30 Herkamire: Was 42 the only suitable ASCII code you could remember too? ;) 20:21:57 no, I looked it up 20:22:03 char * . 20:22:38 Herkamire: Yea for some reason when writing Forth code, I seem to never want to use variables... I tend to want purely "functional" code. 20:23:15 Yea, I was going to put [ char * ] literal in there, but remembered the code. 20:23:37 [char] * works 20:23:51 Oh, right... I always forget about those versions. 20:24:07 madgarden: And as well you should; functional code is provably correct just by looking at it. 20:24:07 Probably I've been using my own Forthy's limited wordset too much. 20:25:44 my postfix lang doesn't have local variables 20:26:00 slava: Mine either, yet. May not bother either. 20:26:09 yeah its kind of more elegant not having them :) 20:26:09 Herkamire: how would you write enumaration words? 20:26:14 i have shuffle notation though 20:26:30 i think i mentioned this before, ~<< rot A B C -- B C A >>~ 20:26:50 slava: yea, I want to practice scrambling my brain by mentally shuffling the stack, so I'll probably leave out the locals 'til someone whines. 20:26:53 so theoretically you can always make a few of your own shuffle words if the stack gets too hairy. 20:27:01 slava: Yep, I've seen your neat shuffler code. 20:27:18 the shuffler code is not neat at all 20:27:25 it needs cleanup, its too long 20:27:32 Well, it's neato. ;) 20:27:42 the compiler is very elegant now; still 2 passes though 20:28:05 madgarden: what's an enumeration word? 20:28:06 with JVM bytecode you have to know the stack effects in advance 20:28:12 slava: Oh? Why 2? 20:28:16 so first it has to check that the word has a constant stack effect 20:28:18 Ahh. 20:28:19 and then generate the actual code 20:29:39 Herkamire: Well, imagine some words that allow you to create a series of named constants of increasing value. Perhaps: 20:29:39 enumstart 20:29:39 enum OGRE 20:29:39 enum TROLL 20:29:39 enum ORC 20:29:53 And OGRE=0, TROLL=1, ORC=2, etc... 20:30:07 Simple, but useful. 20:30:44 In C, it would be enum{OGRE=0, TROLL, ORC}; 20:31:23 oh I see. I probably wouldn't 20:32:31 variable curenum : enumstart 0 curenum ! ; : enum curenum @ dup constant 1 + curenum ! ; 20:34:14 I suppose one could also do this: 20:34:14 : enum dup constant 1+ ; 20:34:14 and then... 20:34:14 0 enum OGRE enum TROLL enum ORC 20:34:44 drop 20:34:45 ;) 20:35:00 I'd do: 0 constant OGRE 2 constant TROLL 3 constant ORC ... 20:35:39 except define constant is a color in my forth, so it works out nicely like so: 20:35:57 Herkamire, you're writing a colorforth? :-) 20:36:07 yeah 20:36:20 cool 20:36:22 how does it use color? 20:36:23 the source tokens are more like aha though 20:37:04 what is aha 20:38:55 slava: each source token is a dictionary index, and a color that tells the compiler what to do with it (0. execute 1. compile 2. number 3. lit 5. noop 6. define constant 7. define word 20:39:08 Jeff Fox wrote aha 20:40:20 the editor displays 0 and 2 in yellow, 1 and 3 in green, noop in white, 6 in magenta and 7 in red 20:41:35 4 is unused. it will probably give you a pointer to the dictionary entry. 20:44:14 so you store already tokenized source? 20:44:19 i had the same idea 20:44:34 so to rename a word, you just change the dictionary entry 20:45:23 slava: yep :) 20:45:31 it's pretty cool 20:45:48 that's on the list of things that's better about my forth editor than using vim. (not a long list) 20:46:46 Herkamire, there is a problem though 20:46:53 Herkamire, if your sources get corrupted somehow, they might be hard to recover 20:46:57 Herkamire, plain text is more portable 20:47:09 Herkamire, you want to store everything in a db right? what if it gets clobbered 20:47:13 I used to store small constants in the source token (had seperate colors for this) but I have since decided that it's much simpler to just store them in the dictionary. that way _every_ source token points to a dictionary entry 20:47:41 slava: backups 20:47:55 I'm still undecided about the database 20:48:53 I plan to have an ascii export, but only so I can bootstrap from source 20:49:09 cool 20:49:25 i have a number of unsolved problems with adding a database to factor 20:49:29 how will i handle multiple db's for instance 20:49:36 i'll want one db that i distribute, and one for personal coding 21:03:57 I have a number of thoughts and concerns about databases. 21:04:09 but for now, I don't have one :) 21:04:21 I have a lot of things I'd like to do before I make a database 21:05:06 well, I'm off to bed. if you want to know more about hekforth tonight: http://jason.herkamire.com:5000/svn/herkforth/doc/ 21:05:12 --- quit: Herkamire ("goodnight all") 21:18:35 * warpzero is back (gone 21:37:16) 21:23:24 hey kc5tja 21:33:29 --- join: Nutssh (~Foo@gh-1081.gh.rice.edu) joined #forth 21:41:39 --- quit: Nutssh (orwell.freenode.net irc.freenode.net) 21:41:39 --- quit: proteusguy (orwell.freenode.net irc.freenode.net) 21:42:04 --- join: Nutssh (~Foo@gh-1081.gh.rice.edu) joined #forth 21:42:04 --- join: proteusguy (~proteusgu@216.27.161.121) joined #forth 21:43:15 --- join: _proteus (~proteusgu@216.27.161.121) joined #forth 21:56:26 re 21:59:53 --- quit: proteusguy (Connection timed out) 22:00:59 kc5tja: sup dude? 22:05:37 Nothing much. 22:06:54 kc5tja: I am having a quandary :( 22:07:11 * kc5tja is still relaxing from his bike rides today. 22:07:26 * warpzero is still trying to figure out how to implement his language 22:13:28 Write a long and unstructured BASIC program to interpret it. 22:14:00 --- join: Serg (Serg_Pengu@212.34.52.140) joined #forth 22:14:26 Hi Serg :) 22:14:47 hiya ! 22:15:36 Robert: uh 22:16:12 warpzero: line numbers are a MUST. 22:16:29 Right. 22:16:53 spaghetti code 22:17:01 Yummy. 22:19:15 madgarden: i never number lines since BASIC ;)) 22:20:04 cant you do it in FORTRAN 22:20:56 Serg: What, you've *stopped* using BASIC? ;) 22:23:34 madgarden: yeah, it was hard to overcome the addiction ;)) 22:23:47 wow 22:23:52 #fortran is GIGANTIC 22:23:55 let me tell you 22:24:40 FORTRAN and BASIC are about the same - ancient, line-numbered, lotsa GOTO, no recursion ;(( 22:24:55 i am gunna write my interpereter in fortran 22:25:09 i learned a little FORTRAN by docs for ancient RU computers 22:25:30 warpzero: why ??? 22:25:50 Heh. 22:25:52 its faster than C lol 22:26:50 Serg: I learned programming with C64 BASIC. I was pissed off when I had to learn structured BASIC in highschool. ;) 22:27:30 I would get insane if school tried to make me do BASIC. 22:27:32 C++ is bad enough. 22:27:38 madgarden: ;((( for me, structured QBASIC was a great relief after micro's line-numbered one 22:27:45 --- quit: Sonarman ("leaving") 22:28:02 i would FORBID basic 22:28:25 :) 22:28:27 it learns terrific coding style 22:28:42 Not as bad as brainfuck, but I get what you mean. 22:29:14 brainfuck is cool 22:29:18 ;) 22:29:56 a friend of mine at age of 17 became "professor", teaching progging to 11-13y kids 22:30:10 they started right from ASM and C++ 22:30:44 thats how i would do it except w/o the ++ part 22:30:55 Serg: Well I adapted to structured BASIC. Of course line numbers suck in retrospect. 22:31:11 Robert: This was back in the late 80's mind you. ;) We also were taught Pascal and C. 22:31:14 objects, incaps., inheritage 22:31:25 fuck OO 22:31:33 --- join: ASau (~asau@158.250.48.196) joined #forth 22:31:46 OO in C is fun. 22:31:57 Dobre jitro! 22:32:01 i can make a struct with function pointers GOOD ENOUGH FOR ME 22:32:10 warpzero: That's object oriented. 22:32:37 kc5tja: but its not c++ i hate c++ 22:32:46 The language is not the methodology. 22:32:59 So let's *not* fuck OO, let's fuck C++ instead. 22:33:13 ASau: Privet. 22:33:19 Anyway, I need to get to bed. 22:33:20 Amen. 22:33:26 no 22:33:26 kc5tja: Good luck with sleeping. 22:33:32 dont go to bed 22:33:39 C OO using interfaces seems a nice way to go. 22:33:50 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 22:33:51 kc5tja: later tater. 22:34:49 --- nick: _proteus -> proteusguy 22:34:58 so do you think if 22:35:19 a language has inheritance but not polymorphism through inheritance its still OO? 22:36:20 sounds a bit like prototyped OO 22:37:35 my language is like that 22:37:53 its polymorphic but its polymophic through a different mechanism 22:38:53 whatever works! 22:39:28 i dont know how to implement it though 22:40:04 by what mechanism is it polymorphic? 22:40:53 the ability to redifine itself at runtime 22:41:16 i just realized something 22:41:16 its kinda like normal polymorphism but it doesn't neeeed inheritance 22:41:22 whats that 22:41:23 on a per-instance basis? 22:41:33 yeah 22:41:58 in factor, stack words and passing around literal code quotations results in no code being generated -- so it has immediate words that you do not explicitly state as being such 22:42:00 So again, sounds like prototyped OO. 22:42:07 the compiler just deduces that certain code can be run at compile time 22:42:14 ok that's cool - inheritence is no pre-requisite for polymorphism, that's just an obvious implementation. 22:42:17 slava: huh? 22:43:23 warpzero, here is a dumb example 22:43:25 : foo 2 3 swap >r dup r> 2drop dup 2drop ; 22:43:30 "foo" asm 22:43:36 core(Lfactor/FactorInterpreter;)V 22:43:36 RETURN 22:43:36 MAXSTACK = 0 22:43:36 MAXLOCALS = 1 22:43:40 so its compiled to a no-op! 22:43:52 oh man slava i dont understand that much forth 22:44:52 Heh. 22:44:58 slava: Well done. :) 22:45:49 you can write words that take code quotations (= linked lists!) on the stack and shuffle them around and execute them, to implement various control structures -- and its all compiled efficiently 22:46:01 one catch -- if/then/else cannot be compiled yet :) 22:46:07 lol 22:46:09 Hehe. 22:48:13 Will you push all register-cached stack items before entering an if/else/then construct? 22:48:32 And how will you do when other words are called? 22:49:26 when other words are called i pass the relevant locals to that word 22:50:02 regrading if/then/else, if there is code in the same word after the if/then/else construct, the branches of the if will need to straighen out the locals so that the layout is the same on the other side 22:52:14 i am thinking of implementing my language not interpereted but with a default native target of parrotcode 22:52:49 since my language supports continuations and other odd kinds of dicking around with the stack, it will always need an interpreter for some code 22:53:23 thats how i feel 22:53:41 also an interpreter is needed for a debugger 22:55:01 my language has the same problem but it comes from being able to write itself 22:55:56 Stupid broadcast stations... 22:57:52 i plan on rewriting the compiler from java to factor 23:02:26 Sounds like an excellent idea. 23:03:04 good night all! 23:03:20 gnight 23:03:21 Night 23:07:21 my language doesn 23:07:23 fuck 23:07:30 i am getting a headache and shit 23:08:43 my language has to mix infix and prefix for its expressions 23:08:59 eeew 23:09:05 stick to one or the other please 23:09:26 there are only 3 operators you can use in an expression 23:11:23 dereference, member-of and with-type 23:11:41 --- quit: Robert ("brb") 23:12:41 the problem is that infix requires parentheses 23:13:23 I'd just go prefix all the way, if you have to pick one. 23:14:13 for member-of???? 23:15:47 --- join: Robert (~snofs@c-185a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 23:16:43 that would look odd 23:16:56 *.*a b 23:17:04 ew :) 23:17:14 i have an idea 23:17:18 i have it right now so its *a.b 23:17:25 since you only have 3 operators 23:17:31 operator 1 is { a b } 23:17:34 operator 2 is [ a b ] 23:17:38 operator 3 is ( a b ) 23:17:47 no thats bad 23:18:05 *a:c.b 23:18:19 if i force precedence of : i think i can make it work infix 23:18:38 aah syntax :) 23:18:44 no i cant 23:18:53 i recently started changing my word names fromCamelCase to words-separated-with-dashes 23:18:59 it looks much beter 23:19:08 oic 23:19:28 my current two-operator syntax is really nice 23:19:35 **a..b 23:19:48 what's with the prefixed **? 23:19:54 double dereference 23:19:59 oh 23:20:13 and extra .s terminate dereference 23:21:17 in c thats equivalent to *(*(*(a)).b) 23:30:41 how nifty is that syntax, slava? 23:31:34 i've never seen triple dereferncing in C 23:32:09 well * is less like C's star than PHP's $ but 23:32:18 i think you get the idea 23:32:24 slava, but the - key is so far away. shift is much closer. 23:32:48 slava, do you count a[b] as a derefence? 23:32:59 and -> .. 23:33:25 OrngeTide: ah so you see how it works? 23:34:20 warpzero, yea. i'm not sure what's so impressive about it though. 23:34:29 i just think its a nifty way to do it 23:34:32 without -> 23:34:36 or [] 23:36:15 warpzero, c=5["hello!"]; 23:37:03 OrngeTide: =( *5.hello *c ) 23:37:21 oh wait theres an exclamation 23:37:27 OrngeTide: =( *5."hello!" *c ) 23:37:42 warpzero, hehe. so what is this you're working on? (i just got here) 23:37:51 my language 23:38:18 warpzero, what's wrong with forth? :) 23:39:06 OrngeTide: too limiting 23:39:37 i kinda like strongforth. i'm a little perverse. I dunno how well I could get it to work with CREATE DOES> type stuff. but the prototype of my own strongly typed forth can figure out the types of new colon declarations (as long as they don't have special things in them and if the loops and conditionals follow certain rules) 23:39:44 forth isn't limiting at all 23:39:59 yeah 23:40:06 it limits me to programming computers 23:41:13 I use forth in my solitaire game as the user interface. 23:41:38 you just type out english-like commands. it feels like playing solitaire on a text adventure. :) 23:41:55 lol awesome 23:42:27 also forth is limited to certain types 23:43:11 warpzero, forth doesn't have any types. it's not limited any more than assembly language is. 23:43:20 i've used forth that had bignums. 23:43:26 just like lisp/scheme 23:43:35 and plenty of people do c-like structs in forth. *shrug* 23:43:36 yeah but you cant just add types at runtime 23:43:58 warpzero, well the line between runtime and compiletime is extremely blurry in forth. so yes. you can add new types. 23:44:17 and there are OO forths with smalltalk like OO. 23:44:20 even so its still to limiting 23:44:45 the only limitation in forth is the human brain. 23:44:46 Forth is totally unlimiting! 23:44:57 its too limiting 23:44:57 warpzero, i think you're confusing forth with perl. :) 23:45:05 it's too unlimited. 23:45:28 It's limited by its unlimity... or something. 23:45:35 no language exists that is what i want 23:45:45 madgarden, which is why i say it's limited by your brain. 23:46:05 OrngeTide: Which I wholly agree with. ;) 23:46:20 I was just being a dork. 23:46:24 As usual. 23:46:34 hmm... forth lacks solidness and libs 23:47:21 Serg, libs are a terrible solution 23:47:28 there needs to be a scripting forth that does perl-ish stuff 23:47:31 That's because Forth is not a defined language. Its malleability is its lack of conformance. 23:47:48 as a professional unix developer. libs comprise a pretty large portion of the problems I deal with. 23:47:55 warpzero: My Forthy could be made to do Perlish stuff. 23:48:19 there are a lot of cute regular expression systems for ansi forth. 23:48:36 madgarden: i want to write forth scripts not php scripts for my website u kno 23:49:02 warpzero: OK, so what's stopping you? 23:49:10 there isnt a mod_forth? 23:49:29 not sure, but I've played with some Forth written in Perl. 23:49:57 warpzero, there are a lot of people who write cgis in gforth. 23:50:05 yForum is a forum package written in gforth 23:50:10 OrngeTide: thats awesome 23:51:10 when i get a little better I'd like to do a webserver in forth. (i'm actually pretty new to forth) 23:51:32 yeah so am i i mainly just use it for a desk calculator 23:52:07 yeah i think an OO forth that had good string support and stuff would be the coolest 23:52:07 warpzero, yea. i have a big stack of forth books. i'm getting ready to write my own forth. I finally understood what CREATE DOES> and , do in forth. pretty interesting stuff 23:52:31 what do CREATE DOES> and , do? 23:52:49 warpzero, well you can avoid a lot of parsing type activities because you can reuse the forth parser. if you tweak what your requirements for input are you can save yourself a lot of time. 23:53:09 just point yourself at an alternate dictionary and feed the parser the input. 23:53:17 hmm 23:53:21 warpzero, they manipulate dictionary entries directly. 23:53:41 warpzero, CREATE would create an empty entry. DOES> lets you stick actual code in the dictionary and , can append something to it. 23:53:50 ah 23:53:53 thats pretty nifty 23:54:09 lets you write code at runtime 23:54:11 so you can create words that compile different code depending on what they see. 23:54:16 right. 23:54:22 My Forthy has does>. That was fun to implement. 23:54:32 my language can do that too its pretty cool feature 23:54:53 my favorite word for learning forth is SEE 23:55:02 see emit 23:55:14 would show you the implemention of the emit word. pretty slick. 23:55:26 see does> you get the idea:) 23:55:38 HOLY SHIT 23:55:40 most forths have a build-in decompiler 23:55:41 THAT IS SO COOOL 23:55:57 see + 23:56:33 those more primative isntructions are less interesting unless you can read assembly. (in bigforth they are wrapped with a layer of crap so you can't really see much) 23:57:08 i can kindof read assembly 23:58:08 i usually need a book if it's a cpu i'm not familiar with. 23:58:20 im not familiar with any cpus 23:58:21 * OrngeTide is dying to write a forth OS for his SPARC classic 23:58:33 but i've never done anything with sparc asm. 23:59:16 yeah you can acheive the same effect with my language's disinstantiate operator 23:59:59 --- log: ended forth/04.02.09