00:00:00 --- log: started forth/07.09.29 00:30:28 --- quit: forther (Read error: 110 (Connection timed out)) 02:35:48 --- quit: wossname (Read error: 110 (Connection timed out)) 03:35:41 --- join: neceve (n=ncv@86.104.205.201) joined #forth 03:36:36 --- join: edrx (i=edrx@189.25.52.145) joined #forth 04:16:36 --- join: wossname (n=w@CPE00195b252b77-CM001a666a6e78.cpe.net.cable.rogers.com) joined #forth 06:58:01 --- join: mark4__ (n=mark4@ip70-190-68-238.ph.ph.cox.net) joined #forth 07:18:14 --- quit: H4n1 (Read error: 110 (Connection timed out)) 08:11:49 --- quit: segher_ (Read error: 110 (Connection timed out)) 08:37:06 --- join: forther (n=forther@c-67-180-150-67.hsd1.ca.comcast.net) joined #forth 08:47:28 --- join: Raystm2- (i=NanRay@c-24-8-127-241.hsd1.co.comcast.net) joined #forth 08:49:08 --- quit: Raystm2 (Read error: 104 (Connection reset by peer)) 10:13:03 --- join: Raystm2 (i=NanRay@c-24-8-127-241.hsd1.co.comcast.net) joined #forth 10:14:20 --- quit: Raystm2 (Client Quit) 10:14:38 --- quit: Raystm2- (Read error: 104 (Connection reset by peer)) 10:19:24 --- quit: forther (Read error: 110 (Connection timed out)) 10:33:08 --- part: FMota left #forth 10:57:43 --- quit: edrx (Read error: 110 (Connection timed out)) 11:18:50 --- join: FMota (n=FMota@dhcp-36-203-57-69.cf-res.cfu.net) joined #forth 12:41:13 --- join: TreyB_ (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 12:49:23 --- quit: TreyB (Read error: 110 (Connection timed out)) 13:09:41 --- join: code_gardner (n=code_gar@dsl-66-243-240-105.elltel.net) joined #forth 13:51:13 --- join: H4ns (n=Hans@68.15.56.211) joined #forth 14:02:25 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-175-197.pools.arcor-ip.net) joined #forth 14:20:58 --- quit: Snoopy42 (Read error: 110 (Connection timed out)) 14:21:01 --- nick: snoopy_1711 -> Snoopy42 14:22:42 forth :p 14:23:13 Yup. 14:23:27 Forth is in the house. 14:23:37 The HIZ-ouse. 14:23:50 BAM 14:23:59 (block allocation map) 14:24:15 It's FAT. (File Allocation Table) 14:24:33 (I know, it's supposed to be spelt PHAT in this use-case, but deal with it.) 14:24:36 heh 14:25:43 --- quit: H4ns (Read error: 110 (Connection timed out)) 14:28:22 * kc5tja just learned what a gap buffer is. 14:28:26 Man, I feel so dumn. 14:28:35 So dumn I can't even spedl sumb. 14:29:29 Why? 14:29:31 gap buffers look cool 14:29:35 There's too much to know all at once anyway. 14:29:36 rather use ropes tho maybe 14:29:56 Ropes? 14:30:02 they are thicker than strings 14:30:04 Ahh, I think I've read about gap buffers before. 14:30:16 anothe data structure used in text editors and other string manipulation programs 14:30:20 madgarden: A gap buffer is just a plain buffer split into two segments, with a "gap" between them for text insertion. 14:30:27 Yup. 14:30:29 worth reading about, but basically uses binary tree nodes 14:30:38 Well, not even that. 14:30:45 Yes. 14:30:48 to store the string 14:30:49 I mean, it literally is two semi-spaces in a single space. 14:30:49 The only exciting thing about gap buffers search/replace. 14:31:06 As you cursor to the left or to the right, characters are copied from one buffer to the next. 14:31:11 it's easy to insert & concatenate text in ropes 14:31:28 male: Yes, searching will be vital for my text editor. 14:31:31 Traditional gap buffers don't imploy indirection. 14:31:58 male: Right, but you can use auxiliary indices to do that. 14:32:06 kc5tja: Unless the text you're editing is very large, or your computer is very slow, you probably don't need the added complexity. 14:33:04 Line based editors, for instance, avoid the problem almost entirely. 14:33:31 Right. 14:33:48 Or block editors. :P 14:33:55 As do change rings. 14:33:55 The best approach I've seen was a system that used a line-based representation, but the "active line" (where the cursor was on) was kept in a small gap buffer. 14:34:22 When the cursor leaves the line, the gap buffer is repacked and saved for that line. 14:34:32 * kc5tja googles for change rings. 14:34:47 Also known as 'divorce.' 14:34:57 Editors with undo support store a list of changes. 14:35:10 Therefore, they don't actually need to alter the buffer. 14:35:18 Since the same state may be deduced from the changes. 14:35:18 --- quit: ygrek (Remote closed the connection) 14:36:02 Of course, you can flush the changes to the buffer at any time (usually just at saving, though) 14:36:11 Applications which need to see the current state of the buffer will need to reconstruct the "normal" image of the buffer every time though. 14:36:18 The change ring is usally a linked list. 14:36:22 * kc5tja nods 14:36:23 But a stack could work too ;-) 14:36:38 Well, a stack implements the undo concept better. :) 14:36:42 You have a similar issue with gap buffers. 14:37:12 Ie. You probably want to remove the gap before a search op. 14:37:12 A gap buffer is substantially faster though, because you only have two semi-spaces to deal with, not N. 14:37:23 Yes, definitely. :) 14:37:33 Faster under what circumstances, though? 14:38:05 You can usually (but not always) break operations up into (do something before this point) and (do something after this point). Gap buffers have each case contiguous. 14:38:27 There's no recursive descent into change trees or lists. 14:38:29 --- join: segher_ (n=segher@82-217-247-28.cable.quicknet.nl) joined #forth 14:38:40 s/faster/far more convenient in most cases/ 14:39:07 Okay. I'll buy that it's simpler, but I don't buy that simpler algorithms always result in better performance. 14:39:53 Well, it depends on what you're doing. 14:40:05 Anyway, the biggest problem with any non-contiguous buffer representation is integrating with other tools/libraries. 14:40:08 Like regex. 14:40:26 If you don't plan to integrate, then you're pretty much free to do whatever you want. 14:41:24 And I definitely agree that the block/record approach is ideal for dealing with large volumes of loosely related information. 14:41:38 Such as Forth source code. 14:42:09 There's no rule saying that blocks have to be fixed size. 14:42:35 Your editor could provide a block interface while storing the blocks in any order and size on backing store. 14:43:32 Just think of each block as a file ;-) 14:43:40 How do you communicate how big a block is to an application if they are variable sized? 14:43:58 Lots and LOTS of XML. 14:44:18 Well, that's the thing -- I would not consider them blocks -- I'd consider them more along the lines of objects. 14:44:35 Well, they could still be numbered though. 14:44:41 Yes, definitely. 14:44:48 So that you could treat them as contiguous when the need arises. 14:44:56 Which is unlike normal files. 14:45:18 Anyway, the idea is to keep the editor's buffer small. 14:45:45 (and also to reduce the amount of data that needs to be in RAM at any one time) 14:46:57 I think you'd be surprised how many editors just use plain old contiguous buffers. 14:47:32 --- quit: code_gardner ("Leaving") 14:48:00 There'd have to be some kind of caching for the current line, then, to keep user responsiveness up. 14:50:17 The number of people editing files larger than 1MB is pretty small. 14:51:27 One could do an audit of public CVS servers or something to get some statistics on the matter. 14:51:38 partly because the editors that can handle it well are pretty rare ;) 14:52:03 * male tries to find a 1GB text file to open in Emacs. 14:53:03 I rather regularly open multi-megabyte (double digits) log files with vim at work. 14:53:16 It is VERY fast and responsive. The only time I have to wait is when it's actually loading. 14:53:24 Even saving is faster than loading, which implies it's not using a flat buffer. :) 14:54:45 So, now you know why I'm interested in handling very large buffers with very rapid search. :) 14:54:56 Log files? 14:55:01 Bad use for an editor anyway. 14:55:03 50BM+ log files. 14:55:05 You want a pager. 14:55:15 Pagers lack other features that I use. 14:55:24 Like editing? 14:55:27 Yes. 14:55:27 :-P 14:55:41 Why would anyone edit a log file, unless they're doing something evil? 14:55:48 you should only view and edit 50 MB log files with discrete finite automata! 14:55:57 To remove lines that are not important. 14:56:05 All lines are important. 14:56:13 If they aren't, then don't log them in the first place. 14:56:17 OK, you don't know what I do at work, so you're just hand-waving. 14:56:31 Not all lines are of relevance to all people. 14:56:41 We do have different departments for a reason. 14:56:51 I know that many people use editors to do things better suited to other tools, such as sed. 14:57:01 but you dont have scripts to filter out various versions of the log file for each department? 14:57:14 wossname: Part of my job is to *write* those scripts. 14:57:24 thats cool 15:00:05 I've just tried a flat-buffer editor on a 1MB text file and there is no latency when editing. 15:00:15 Just FYI. 15:00:24 OK, expand it to 50MB or larger. 15:00:57 Which editor, BTW? 15:01:13 I'm quite certain I would never find myself in a situation where I was able to read and understand 50MB of text in a single session. 15:01:51 It's just an example client for my data structures library. 15:01:57 The name is ET. 15:02:12 anyways, isn't it good if a text editor can handle these cases? 15:02:24 i'm not impressed with a text editor if it can't scroll 10 mb+ files smoothly 15:02:28 Isn't it could if your fork is a spoon and your spoon is a fork? 15:02:32 s/could/good/ 15:02:40 cutlery and text editors are unrelated 15:02:50 Scrolling has NOTHING to do with it, woss. 15:02:52 flexbility and power are desirable in an editor 15:02:54 We're talking about insertion. 15:03:06 presumably 15:03:10 Yes, toaster ovens etc. 15:03:16 it will handle all basic operations efficiently 15:03:25 otherwise it might be a nice editor but not all that great 15:03:28 * kc5tja is more concerned with searching and cut-n-pasting, but I digress. 15:04:27 I'm sure all the nano etc are flat buffer too. 15:04:56 So you could try your 50MB log file on them. 15:05:25 I believe Joe uses gab buffers though. 15:05:30 s/gab/gap/ 15:07:18 kc5tja: Besides, are you REALLY going to try and edit these 50MB log files on your Forth system? 15:08:18 do it kc5tja! wirte the editor! it will be awesome :~} 15:09:01 wheel writing is the pleasure of a software craftsman 15:10:53 --- join: crest__ (n=crest@p5489E3DA.dip.t-dialin.net) joined #forth 15:11:07 * male still thinks it's silly to put anti-lock brakes and a navigation system on a tricycle. 15:12:13 you cannot deny that working on the difficult constraints he has imposed on his text editor 15:12:23 will make him a better software developer 15:12:42 Is that a goal in and of itself? 15:12:51 yes 15:13:10 improvement, pleasure, and at the end of it he can even use the software for something useful 15:13:16 sounds perfect 15:13:53 Then your epitaph can be "He never did anything useful, but boy could he pretend to." 15:14:10 life is improvement 15:14:23 there is nothing more useful than self-improvement 15:14:30 Forth is all about doing only what is necessary and avoiding misguided pre-optimization. 15:14:54 Wait until you find a real case where it's too slow before you start planning for it. 15:14:56 i'm not really talking about forth specifically here 15:15:06 i know the optimization dogma 15:15:28 a bit of careful predesign when selecting your algorithms & data structures does not hurt 15:15:32 No one cares how great a programmer you are. 15:15:41 Perhaps it's sad, but it's true. 15:15:43 i care 15:15:49 that's all that matters to me 15:16:09 Well aren't you the warm milk of human kindness... 15:16:27 I'm planning on writing the editor environment because I want to write the editor. I want to learn about the guts of what makes an editor tick. I want to see how expandable I can make it. I also want to incorporate some humane interface (Raskin) concepts into it, to see how it'd all fit together. 15:16:40 ^^^ there you go, exploration & self-improvement 15:16:40 Is this a goal in and of itself? Yes. 15:16:58 there is nothing wrong with wanting to do things this way 15:17:17 It is a very admirable goal, because it means I have repertoir(sp?) of advanced Forth application programming experience I can draw on for when I submit my resume to places like Intellasys or Forth, Inc. 15:17:26 Hey, I never said he doesn't have the right to waste his time. 15:17:35 People have lots of useless hobbies. 15:17:38 you have an odd definition of 'waste' 15:17:43 Like acosting others for their hobbies. 15:18:11 You certainly are sensitive. 15:18:17 Just making an observation. 15:18:22 I'm merely being sober and realistic. 15:18:38 --- quit: crest_ (Read error: 110 (Connection timed out)) 15:18:40 For something to be a 'waste,' that implies that no value comes of it. 15:18:43 I get value. 15:18:46 Therefore, it's not a waste. 15:18:46 For all I know you thought that a gab buffer was an absolute necessity. 15:18:57 I'm just trying to offer a hint at the truth. 15:19:02 what truth? 15:19:07 Your truth is no more valid than mine. 15:19:19 life is not just deadlines & meeting bare specifications 15:19:27 That you only need a hammer heavy enough for the nails you have! 15:19:44 if kc5tja has time to go about this approach, then he will personally gain from following it 15:19:57 And that using a jet engine where a bottle-rocket will do is pointless and stupid. 15:20:01 i'm sure if it were a critical thing, he'd take the most efficient path as well 15:20:05 HAHAHHA!!!!!! 15:20:16 That's the first time I've ever heard of a Forth environment described as a 'jet engine.' 15:20:44 If I wanted to use this thing for mission-critical stuff, I'd be using Haskell, not Forth. 15:20:45 what do you do in your spare time, male? have a "girl-friend"?? pah 15:20:51 Am I the only one who's ever heard of KISS? 15:21:03 KISS is also highly subjective. 15:21:12 My goal is to write a tool for self-education. 15:21:29 It's an exploratory vehicle. 15:21:39 I want to use Forth because I think most naturally in Forth. 15:21:46 you're really weird :p 15:22:04 Fine. I suppose you have a photographic memory or some other power which will allow you to extract value from that effort in the future. 15:22:24 You're being a royal asshole. You just don't understand. 15:22:29 /ignore'd. Fucktard. 15:22:40 I understand all too well. 15:22:57 no, you don't. but thats my last comment as well i guess 15:23:15 Why should he be babied? 15:23:51 I only joined in the conversation because it seemed, for once, to be about Forth. 15:24:31 wossname: For the record, I do intend on writing the editor. If others find it useful, awesome. If not, so what? I'll at least enjoy the experience of writing it. 15:24:32 Let him waste his time and energy. 15:24:41 male, yes... let him. 15:25:01 Is someone sending messages under my name or what? 15:25:13 When did I say he didn't have a right to be a fool? 15:25:42 Perhaps there's a lot of love in here for kc5tja and his hobbies. 15:25:57 kc5tja, i understand the motivation perfectly. but his time & energy is saved only for truly non-trivial things apparently 15:26:03 I hardly see how that makes me a villain, or the truth something to be ignored. 15:26:08 Yup. 15:26:39 Why do people continue to write love stories, when there are already novels written before? 15:26:41 * male wasn't aware the world was suffering from an editor shortage. 15:26:46 Just read those. 15:27:12 Haha. You certainly are a proud fellow. 15:27:15 * kc5tja shrugs -- oh well. 15:27:22 I suppose your code is Art? 15:27:37 male, what do you do for a hobby? 15:27:47 i like to take a lot of drugs & pass out on my bed :] 15:27:54 I raise chinchilla. 15:28:18 cool. 15:28:26 Then I EAT THEM. 15:28:51 Okay. That's enough comp.lang.forth bullshit for today. 15:29:11 * male wonders when Forther's will grow up. 15:29:28 weak troll... 15:30:29 wossname: I'm quite sure I wasn't even talking to you. How did I get hooked into this nonsense? 15:30:46 If kc5tja wants to say something snarky, let him. 15:31:09 Or are you his knight in shining armour? 15:31:39 i can't stop myself from replying to bullshit 15:32:02 Well, it's a shame, because people might have learned something about buffer techniques today. 15:32:11 I know I certainly have a lot to say on the matter. 15:32:32 And it sounds like kc5tja has been doing some reading. 15:33:33 I suppose I'm just not used to this type of emotion being expressed regarding algorithms. 15:33:39 Where's PoppaVic when you need him? 15:33:46 We need to set up a cage match. 15:34:08 Do you all revel in conflict and anger? 15:34:30 I only join this channel for historical reasons. 15:35:06 I'm ready and willing to leave if I know for certain that there will never be any useful or interesting discussions here. 15:35:29 Hahah :) 15:35:47 I believe kc5tja has voted. 15:35:51 And the rest? 15:36:03 Anyone have something constructive or informative to say? 15:36:26 Or is this channel only for bickering? 15:52:56 --- join: Raystm2 (i=NanRay@c-24-8-127-241.hsd1.co.comcast.net) joined #forth 15:53:32 re Raystm2 16:36:40 : save postpone r> postpone swap postpone >r postpone >r ; immediate 16:36:43 : .... r> r> swap >r >r ; 16:36:44 This is why I love Forth. 16:37:08 : move-left text-cursor-offset @ + text-size 1- min text-cursor-offset ! ; 16:37:11 : move-left-after: save .... r> move-left ; 16:37:12 : replace-in-buffer ( caddr u -- ) 16:37:12 dup text-buffer-big-enough? 16:37:12 if dup move-left-after: text-insertion-point swap move 16:37:12 else 2drop then ; 16:48:43 --- join: H4ns (n=Hans@68.15.56.211) joined #forth 16:50:11 Wow, that's nice and readable for some reason. 16:50:29 And kc5tja, ever considered a word like postpone{ ... } ? 16:58:13 --- join: nighty^ (n=nighty@72.0.72.123) joined #forth 17:02:39 madgarden: I have, but it's less work in this case to just type everything out. 17:02:54 I could have used S" r> swap >r >r" evaluate. 17:20:45 : replace-in-buffer ( caddr u -- ) 17:20:45 dup enough-space-to-replace? 17:20:45 if $( dup move-left-after: (place-text) )$! update-space-consumed 17:20:45 else 2drop then ; 17:20:56 And that's with a refactoring including the use of code quotation. :D 17:33:59 --- quit: Off_Namuh (Remote closed the connection) 18:22:49 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 18:22:49 --- quit: TreyB_ (Read error: 104 (Connection reset by peer)) 18:30:26 --- join: edrx (i=edrx@189.25.71.148) joined #forth 18:44:44 --- quit: H4ns (Read error: 110 (Connection timed out)) 18:52:01 --- quit: edrx (Success) 19:07:16 --- join: edrx (i=edrx@189.25.130.110) joined #forth 19:22:42 --- join: Off_Namuh (i=GPS@gateway/tor/x-1bd2a20ad7eac470) joined #forth 19:39:35 --- quit: TreyB (Read error: 104 (Connection reset by peer)) 20:04:40 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 20:07:56 --- quit: male ("User disconnected") 21:37:58 --- quit: proteusguy (Read error: 110 (Connection timed out)) 21:38:34 --- join: proteusguy (n=proteusg@ppp-124.120.217.123.revip2.asianet.co.th) joined #forth 21:41:14 --- join: forther (n=forther@c-67-180-150-67.hsd1.ca.comcast.net) joined #forth 21:41:44 --- join: Raystm2- (i=NanRay@c-24-8-127-241.hsd1.co.comcast.net) joined #forth 21:41:47 --- quit: Raystm2 (Read error: 104 (Connection reset by peer)) 21:43:18 --- quit: forther (Client Quit) 22:03:25 --- join: Off_Namuh72 (i=GPS@gateway/tor/x-8627a9e6e430fcae) joined #forth 22:11:19 --- quit: Off_Namuh (Read error: 104 (Connection reset by peer)) 22:23:03 --- quit: wossname (Connection timed out) 23:13:51 --- join: ygrek (i=user@gateway/tor/x-0b9bba8f5604a8bd) joined #forth 23:45:52 --- join: doublec (n=doublec@203-97-173-6.cable.telstraclear.net) joined #forth 23:46:55 --- quit: mark4__ (Read error: 110 (Connection timed out)) 23:59:59 --- log: ended forth/07.09.29