00:00:00 --- log: started forth/07.05.19 01:45:31 --- quit: sorear ("leaving") 02:14:50 --- join: segher_ (n=segher@dslb-084-056-136-008.pools.arcor-ip.net) joined #forth 02:25:21 --- quit: segher (Read error: 110 (Connection timed out)) 02:27:51 --- join: ASau (n=user@217.118.66.62) joined #forth 03:13:02 --- quit: Baughn (Read error: 110 (Connection timed out)) 03:21:21 --- join: Baughn (n=svein@195134062103.customer.alfanett.no) joined #forth 03:47:29 --- part: edrx left #forth 04:20:03 --- quit: ASau (Read error: 110 (Connection timed out)) 05:20:45 --- join: ASau (n=user@217.118.66.32) joined #forth 07:09:36 --- quit: ygrek (Remote closed the connection) 08:00:16 --- quit: ASau (Read error: 104 (Connection reset by peer)) 08:03:39 --- join: sorear (n=stefan@ip68-6-133-142.sd.sd.cox.net) joined #forth 08:49:46 --- join: ASau (n=user@217.118.66.32) joined #forth 09:13:31 --- join: Tomasso (n=tomasso@136-133-114-200.fibertel.com.ar) joined #forth 09:13:49 --- part: Tomasso left #forth 09:58:30 --- join: ASau` (n=user@ggsn1mail1.beelinegprs.ru) joined #forth 10:03:04 --- join: ygrek (i=user@gateway/tor/x-cf2dd3ec080ce3cd) joined #forth 10:04:48 --- join: yumehito_ (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 10:05:25 --- join: ASau`` (n=user@ggsn1mail1.beelinegprs.ru) joined #forth 10:09:33 --- quit: ASau` ("ERC Version 5.0.1 $Revision: 1.726.2.3 $ (IRC client for Emacs)") 10:09:52 --- nick: ASau`` -> ASau` 10:17:07 --- quit: yumehito (Read error: 113 (No route to host)) 10:20:17 --- quit: ASau (Read error: 92 (Protocol not available)) 10:20:29 --- nick: ASau` -> ASau 10:36:20 --- nick: yumehito_ -> yumehito 11:26:03 --- join: neceve (n=Clau@unaffiliated/neceve) joined #forth 11:30:59 --- join: ASau` (n=user@217.118.66.61) joined #forth 11:37:40 --- join: ASau`` (n=user@217.118.66.61) joined #forth 11:38:55 --- quit: ASau` ("ERC Version 5.0.1 $Revision: 1.726.2.3 $ (IRC client for Emacs)") 11:50:55 --- quit: ASau (Read error: 110 (Connection timed out)) 11:54:20 --- quit: ygrek () 12:39:32 --- join: Quartus__ (n=Quartus_@209.167.5.2) joined #forth 13:09:12 --- join: ASau``` (n=user@ggsn3inet8.beelinegprs.ru) joined #forth 13:24:14 --- quit: ASau`` (Read error: 110 (Connection timed out)) 13:27:52 --- nick: ASau``` -> ASau 13:34:49 --- join: DocPlatypus (n=skquinn@adsl-75-63-210-132.dsl.hstntx.sbcglobal.net) joined #forth 13:35:45 is there an easy way in GNU Forth to see how much memory a word takes up after being compiled? 13:36:04 or for that matter, an entire file 13:37:26 unused : a-word ... ; unused - . 13:37:44 Or something like. 13:40:20 --- quit: yumehito ("Lost terminal") 13:41:34 wow. over 20k, most of it probably strings 13:42:19 --- join: yumehito (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 13:42:36 it's a bunch of screen routines, spinners, throbbers, sliders, etc. (stuff a program displays to show it is still running and hasn't frozen) 13:49:01 a single word? 13:49:15 no, a collection of words 13:49:39 then I'm not getting the 'wow' 13:50:15 just seems to be rather big for what it does 13:50:37 I'll pastebin one of the more exotic ones so you can see what I'm talking about 13:54:33 http://forth.pastebin.ca/497410 13:55:58 no wonder. That's ghastly. 13:56:57 I know, I got really bored 13:57:41 it's the longest, slowest implementation I can imagine to do that. 13:59:08 probably the easiest to follow though 14:00:12 no, I don't think it has any saving graces. 14:02:50 maybe I'm not the great programmer I used to be 14:03:32 I don't know. It looks like you got stuck in BASIC, maybe. 14:03:58 well for a while I did 14:04:51 Have you ever heard of Dijkstra? 14:04:56 http://en.wikiquote.org/wiki/Dijkstra 14:05:10 Start factoring. 14:08:19 See, you have regular patterns: 14:08:35 a) "<", spaces, ">"; 14:08:45 b) ">", spaces, "<"; 14:08:48 yeah I know at least mod 0, 8, and 9 can be factored easily 14:09:23 Why haven't you done it? 14:09:29 it was a five minute hack 14:09:44 Well, alright. 14:12:30 got a "table overflow" when I tried to "see" it. that's definitely not a good sign 14:12:38 I wouldn't factor the silly spinning strings. I'd use a table lookup. 14:13:47 I wouldn't write these tables. 14:13:57 silly fixed-size tables 14:14:56 silly forth and its culture of dictionary allocation 14:19:40 damn... 14:20:07 if I have another number on the stack when I enter a "case", can I just "swap" to get to it? 14:20:50 You can. 14:20:52 don't use case unless you have no other choice. 14:21:06 case ... byech 14:22:23 obviously, that table is one huge don't-care 14:26:17 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 14:26:17 --- mode: ChanServ set +o tathi 14:27:16 hi tathi 14:27:19 hello 14:27:51 hi all 14:31:28 you're likely to need indexed string arrays more than once; if you don't already have an implementation, now's the time. 14:32:09 well, I needed a good rainy day programming project or three anyway :-) 14:32:43 http://forth.pastebin.ca/497472 14:32:45 should take you under a half-hour. 14:32:53 there's my solution 14:33:18 (I'm a novice too, so style critiquers should look) 14:33:36 I'm taking a look since I'm morbidly curious 14:35:29 not too bad 14:35:56 doesn't solve the same problem. 14:36:08 Quartus__: I think it does 14:36:24 (stuff a program displays to show it is still running and hasn't frozen) 14:36:31 well in that respect yes 14:36:39 I don't recall any strings in the problem description :) 14:37:14 at best it does something vaguely similar 14:38:42 http://forth.pastebin.ca/497481 <-- these were the first two I made 14:38:44 Quartus__: it doesn't give the same strings, of course 14:38:58 then I got bored and started making the fancier ones 14:39:38 : spinner s" -/|\" drop + c@ emit ; 14:39:51 : throbber s" .oOo" drop + c@ emit ; 14:40:07 er, need a 3 and 14:40:17 (or 4 mod) 14:40:55 4 mod may give negative result. 14:41:14 okay, abs 4 mod then 14:41:49 : mkthrob >r : r> s" sliteral rot abs swap mod + c@ emit" evaluate ; 14:42:04 What about "min-int abs" on 2-complement CPU? 14:42:04 s" -/|\" mkthrob spinner 14:42:40 fm/mod 14:42:47 oh now that's cute 14:43:42 standard mod either has sm/rem or fm/mod behaviour. It isn't going to return a negative modulus for a positive input. 14:44:41 Then you have to deal with integer overflow. 14:45:24 the only way I get a negative from mod is by doing e.g. "7 -8 mod" 14:45:30 on GNU Forth 14:45:53 integer overflow is a complete non-issue here. 14:46:18 Why? 14:46:28 yeah I'm not worried at all about integer overflow... even on 16-bit archs it would take a lot of loops 14:46:43 You can increase your number with 1+ and with "1+ ... mod". 14:54:27 which is a bad idea because it means the number of cycles the spinner goes through has to be known by the caller. 14:55:40 Or better yet, factor it out into an incrementing word. 14:55:41 yeah I wrote these with the assumption the caller would just do something like "i throbber" 14:55:53 1 /spinner or suchlike 14:56:23 Auto-incrementig is much better, in this case. 14:56:37 so 'spinner', like my 'blip' 15:00:33 not auto-incrementing does allow for more flexibility in a few cases I have in mind 15:01:01 --- nick: crest__ -> Crest 15:01:56 --- join: crest_ (n=crest@p5489c3e1.dip.t-dialin.net) joined #forth 15:02:20 --- quit: Crest (Nick collision from services.) 15:02:29 the next logical abstraction would be a 'show-progress' word that could be passed a percentage-complete value 15:02:30 --- nick: crest_ -> Crest 15:03:10 but that isn't the same thing as something that shows the program is still working even if no known progress percentage has been made 15:03:52 I'm thinking in particular of fsck and friends that spin the spinner even when just reading and analyzing but don't move the progress bar 15:03:54 a trivial special-case. 0% complete could just be a spinner. 15:04:35 right but GNU/Linux fsck.ext2 in particular spins the spinner even when not incrementing the progress bar 15:04:41 or 101, or whatever floats your boat. 15:05:56 uh, sure. So place your progress bar at one spot on the screen, the spinner at another. 15:06:21 the comment you made implied that a progress bar replaces a spinner, and I was stating it does not necessarily 15:06:41 at least that is how I read it 15:07:04 a spinner is just a progress bar that doesn't know how far along you are. 15:15:27 to me, they are two completely distinct things. certainly you could use a spinner that way but it's not the only way one could be used 15:15:57 I'm not suggesting a limitation on the use of spinners. 15:22:06 --- quit: tathi ("leaving") 15:22:15 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 15:22:15 --- mode: ChanServ set +o tathi 15:28:00 and I didn't mention this before... I think Dijkstra is full of crap about programmers that started with BASIC 15:28:42 You just don't get the clue. 15:29:03 no, I get the clue, I just think he's full of crap 15:29:04 Dijkstra is quite right in his opinion. 15:29:34 Basic discourages many practices of good programming. 15:29:50 why do you even want a spinner? 15:30:05 Even in modern its incarnations. 15:30:13 i believe in the unix philosophy - be quiet 15:30:49 Religion is no good. 15:31:01 not everything is run straight from the command line a la Unix ... sometimes there are needs for interactivity 15:31:26 even some Unix programs need to provide progress information and/or feedback 15:36:46 which part of his quote about BASIC programmers do you disagree with? 15:37:58 that it's impossible for BASIC programmers to learn good programming practices 15:38:15 and the bit about mental mutliation 15:38:24 so essentially, the whole thing 15:38:35 'Practically impossible' is the actual phrase. 15:39:31 you might consider the year he made the quote, the nature of BASIC up to that time, and his many years as a CS educator. 15:39:46 sure, maybe that quote was accurate in 1980 15:40:01 but today it's as dated as "640K ought to be enough for anybody" 15:40:19 which is a bogus quote, actually 15:40:49 so maybe it was but you get the idea 15:41:11 okay, how about as dated as "the world is flat and you'll fall off the edge if you try to sail all the way around" 15:41:37 which is probably not an exact quote but certainly represents what many thought in the 15th century before Christopher Columbus set sail 15:41:49 I get the idea that you're calling Dijkstra an idiot based solely on your own ignorance of history and context. 15:42:29 --- part: tathi left #forth 15:42:45 on that quote I think he was full of crap... now that I look a few others are already dated too 15:44:58 you're wrong about the awareness of the world being round in and well before Columbus' time, too. 15:45:29 okay, how about as dated as parachute pants and blue eyeshadow, the well known fashion fads of the 1980s? 15:46:08 (and you're not going to convince me I'm wrong about those) 15:47:13 --- join: ASau` (n=user@ggsn2inet3.beelinegprs.ru) joined #forth 15:47:29 However low it may be, Dijkstra's IQ is probably not on topic. 15:47:34 So you're saying you think Dijkstra was full of crap for making a statement that was entirely valid at least at the time he made it? 15:48:12 low IQ. Dijkstra. Ok. You need to do some serious reading. 15:48:48 a lot of things have changed with regard to computing since 1975 15:49:01 So? 15:49:22 BASIC hasn't changed to that extent. 15:49:23 Quartus__: it's called mocking, or maybe sarcasm 15:50:00 ASau`: in 1975 Microsoft either hadn't been founded yet, or was still in Bill Gates's garage 15:50:08 So? 15:50:26 BASIC hasn't changed to that extent. 15:50:30 32-bit computers were either damned expensive, or an engineer's wet dream. 15:50:43 BASIC *has* changed big time 15:50:55 Not to *that* extent. 15:51:17 for one, in 1975 it was primarily an interpeted language, today it is usually compiled 15:51:24 You still has nothing new in comparison with techniques of 70s. 15:51:42 So? 15:51:51 that's a *huge* change 15:52:11 You may have it compiled or interpreted, semantics has not changed. 15:52:16 today, line numbers aren't even used, instead of using labels 15:52:28 in fact that's a change in execution speed, nothing more 15:52:47 Alright, you've got labels back into BASIC. 15:53:04 You *did* return to FORTRAN II or IV. 15:53:05 So? 15:53:05 err instead using labels. 15:53:55 you know so much is different on a modern BASIC versus Atari BASIC circa 1980 that I am not even sure I can find the right places to begin 15:54:20 A great deal is the same, as well. 15:54:40 how about most BASIC compilers now let you specify what should be an integer or floating point number, whereas back in the day one had to use arcane-looking shit like A$ or B% or C! or D# 15:54:56 --- quit: ASau (Read error: 110 (Connection timed out)) 15:55:15 modern BASICs have looping constructs (besides just FOR...NEXT) 15:55:24 So, you did return to good old FORTRAN IV. 15:55:26 function and subroutine definitions that bear more resemblance to C 15:55:41 So? 15:55:55 What about passing procedures as parameters? 15:56:24 I haven't looked that closely at FreeBASIC so I wouldn't know on that one, but maybe it lets you 15:56:32 I'm not ruling it out 15:56:46 Maybe or maybe not, you're not sure yourself. 15:57:05 This cannot prove anything. 15:57:07 and you say FORTRAN like it's something bad 15:57:09 And you continue to insult Dijkstra for making a statement which was entirely true in 1975, and arguably true to some degree right to the present day. 15:57:33 okay, I didn't realize at first he made it in 1975 15:57:43 And I still fail to see how this discussion has anything whatsoever to do with Forth. 15:57:50 but until November of that year I wasn't even born so a lot has changed since then 15:57:59 Dijkstra has an interesting history as regards Forth. 15:58:38 I assure you, the changes in BASIC you talk about are much younger. 15:58:41 how many people still use punch cards? paper tape? printing terminals? 15:58:55 that alone gives you an idea how much computing in general has changed 15:59:20 What, based on improved I/O? 15:59:20 hell, I'm using a CRT, not an LCD flat panel, and I feel out of date! 15:59:38 How many people still use C and derived languages? 15:59:53 COBOL and FORTRAN, for that matter. APL. 15:59:55 ASau`: Unix is written in C and has been improved over the years 16:00:13 C underwent a couple of standardization efforts that didn't change a whole lot. 16:00:16 How many people use non-relational DBMS'? 16:00:27 Nah! 16:00:29 UNIX! 16:00:52 I would say the C standardization was a winner overall though you still have K&R diehards 16:00:52 Have you ever looked at BSD source? 16:00:57 actually I have 16:01:15 And this code is still used. 16:01:15 and I dared not go tinker with too much as my C is not that great 16:01:29 Nor your Forth, it shows signs of serious BASIC mental mutliation. 16:01:58 as far as that code being easy to follow and see exactly what goes on, I don't think it's half bad 16:02:17 It would be bad code if directly transliterated back to BASIC. 16:02:19 You can't say for sure, but commercial unices are even 16:02:20 worse in this case, as you can find old bugs in, say Solaris awk. 16:02:44 especially for one of my five minute hacks ... though I would not say that's my best programming by a long shot 16:03:04 I don't use proprietary Unices, only a GNU variant and OpenBSD 16:03:25 I'm serious, however. To write such a thing, especially in Forth, with a huge nested conditional smacks strongly of BASIC thinking. 16:04:26 No matter, BSDs and GNU are still the same. 16:04:36 Quartus: at least it compiled and woked 16:04:38 worked* 16:04:47 Even when they fix some old bugs, it's the same plain old UNIX. 16:04:48 If that's your only criteria, then carry on. 16:04:51 when I tried to factor it, I couldn't get that far 16:05:29 apparently I'm running afoul of some hidden gotcha in case/of that's not documented 16:06:48 Completely ignoring any advice not to use it. 16:07:43 DocPlatypus: you've also *completely* forgotten about don't care conditions 16:07:47 it's easier to read than the corresponding if/else/then mess 16:07:53 So don't use that either. 16:08:00 okay, so what does that leave? 16:08:14 Were you looking the other way when this conversation started? 16:08:18 Scroll back. 16:08:38 no, I remember what was said 16:08:40 T.F. advice: "Don't decide! Calculate!" 16:08:45 You very cleary don't remember. 16:09:01 I can paste a line that contradicts you 16:09:23 Whom? 16:09:37 whatever that's supposed to mean 16:09:39 ASau`: DocPlatypus 16:10:28 DocPlatypus: Why do you insist on using that specific set of markers, for instance? 16:10:43 sorear: artistic value 16:11:01 T.F. advice: "Take advantage of don't cares [unspecified spots in the problem]" 16:13:38 I've read it 16:15:15 Quartus: Do you think paying attention to artistic value is another good sign of mental mutilation? 16:15:32 he probably does, I'll agree to disagree 16:17:34 artistic value? 16:17:47 Are you talking about the particular squiggles being used in this 'spinner'? 16:17:58 of course he is 16:18:07 I think they're overworked and silly, but that has nothing to do with my comments about the code. 16:18:54 Quartus: But as I see it, working less-hard on the squiggles can greately simplify the code; eg in my paste 16:19:44 Simpler output often mean simpler code. 16:20:16 That's neither here nor there. If the problem at hand is to output one of a dozen or two variable-length strings, however silly those strings are, the CASE approach is easily among the worst possible. 16:20:34 they are fixed-length strings in this case 16:20:47 Even so. 16:25:37 --- quit: slava () 16:33:48 --- quit: ASau` (Read error: 110 (Connection timed out)) 16:57:35 okay, a 4.4% time savings by using a string array method, over 20000 runs... not even sure if that's that consistently repeatable because some tests indicated the old case/of code was faster 16:57:56 paste it 16:58:00 ok 16:58:24 i think I've calmed down now :) 17:01:44 http://forth.pastebin.ca/497641 17:02:54 I calculated out the absolute time savings... it's something like 2.5 microseconds or so per call, seems huge but I doubt it would be an issue on all but the oldest PCs 17:03:46 utime is probably a pretty expensive operation - 2.5us sounds about right for gettimeofday alone 17:04:01 sorear: no, I only utime at beginning and end of loop 17:04:06 So instead of considering the advice for all of the various reasons it was given, you're looking for justifications to keep using your existing technique? 17:04:44 Quartus: no, I'm benchmarking the existing code versus a new version and analyzing the results 17:04:55 and making a fully informed decision based on that analysis 17:05:13 Good grief. 17:05:37 and yes, in a way, I feel kind of silly for going through the trouble, but I'll be that much more ready to do this for *real* code as well 17:14:26 heck, it's nothing I did different from testing reads from /dev/urandom versus Brodie's PRNG 17:14:33 differently* 17:15:40 btw, Quartus, /dev/urandom wasn't significantly slower when I tried it, I don't know if you ever saw that 17:16:22 now... /dev/random (without the u) *will* be slower, as it'll run out of bits every so often 17:16:28 causing the program to *block* 18:24:53 --- quit: DocPlatypus ("Leaving") 18:27:27 --- join: timlarson__ (n=timlarso@user-12l37rb.cable.mindspring.com) joined #forth 18:41:02 --- quit: timlarson (Read error: 110 (Connection timed out)) 18:46:57 --- join: timlarson___ (n=timlarso@user-12l37rb.cable.mindspring.com) joined #forth 19:03:13 --- quit: timlarson__ (Read error: 110 (Connection timed out)) 19:36:11 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-144-077.pools.arcor-ip.net) joined #forth 19:43:28 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 19:43:49 --- nick: snoopy_1711 -> Snoopy42 19:46:50 --- join: Raystm2 (n=NanRay@adsl-68-95-148-201.dsl.rcsntx.swbell.net) joined #forth 19:49:51 Hey Ray. Long time. 19:50:11 Indeed. Missed you, missed you all. 19:50:21 How've ya bin? 19:50:25 Raystm2 Returneth. 19:52:19 I've been okay, health wise. Seem to be having a hard time seeing in day light. I get snowblind on sunny days. 19:52:31 Shades. 19:53:55 Ya. Need to get a good pair. Something in a polarized. 19:54:03 You are well? 19:54:11 Book coming along? 19:54:21 Can't complain. Book proceeds albeit slowly. 19:56:28 Ya, mine too. Was a might harder to research with out internet access. I got pretty addicted to being online. Was interesting to take such a long break. 19:57:07 How goes it? 19:58:15 The county workers have finished $25000.00 in repairs that we got thru a grant. 19:58:25 Good deal. 19:58:39 Ya, central heat and air is a real requirement here. 19:59:11 I'm selling fans and window units on the front porch. Got 50 bucks for one of the big fans today. 19:59:16 :) 20:01:35 Well, needless to say, I'm not employed yet. I'm not even looking. I'm gonna make a go at trying to sell my organizer. 20:01:53 Good luck! 20:02:34 Hehe. Thanks. I need all I can get. 20:02:54 Anything new in the forth world since i've been "away"? 20:03:04 Seems like more names here. 20:03:10 Lurkers. 20:04:46 Took the opertunity to finish Pelc, Thinking, and Starting, all over again. 20:05:06 Any new insights? 20:05:06 I always get something new in that process. 20:05:18 Ya. indeed and it's already showed up in my work, 20:05:29 More usage of creation words. 20:05:49 That's good. Leveraging one of the strengths of the language. 20:05:54 Relying more on arrays then vars. 20:06:06 ya. 20:06:37 More at ease with number conversion, you know <# # sign hold #> stuff 20:07:53 Good. 20:08:29 I was always making my own number conversion routines. 20:08:36 Re-inventing. 20:09:07 The <# #> stuff is quite elegant and powerful. 20:09:25 I like it. 20:28:25 * Raystm2 must catch up to the mailing list. 20:57:13 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 20:57:13 --- mode: ChanServ set +o slava 21:13:31 Hi slava. 21:14:34 yo 21:14:45 so heading off to Guadalajara, slava? :) 21:14:56 huh? 21:15:04 http://groups.google.com/group/comp.lang.forth/msg/0f3a794d50fdd143 21:15:17 hah 21:16:42 --- join: edrx (n=Eduardo@201.5.14.61) joined #forth 22:58:53 --- quit: Raystm2 ("I've embarrassed my self enough for one day.") 23:14:27 --- quit: sorear ("leaving") 23:21:55 --- join: ygrek (i=user@gateway/tor/x-d0101a1ec67aa6ae) joined #forth 23:59:59 --- log: ended forth/07.05.19