00:00:00 --- log: started forth/07.04.02 00:13:51 --- quit: edrx (Read error: 113 (No route to host)) 01:04:59 --- quit: ygrek (Remote closed the connection) 01:07:26 --- join: ygrek (i=user@gateway/tor/x-7b40cbd84a2e01b5) joined #forth 02:06:33 --- join: yumehito (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 02:13:39 --- join: brx (n=brx@p57A79F95.dip0.t-ipconnect.de) joined #forth 03:08:09 --- quit: JasonWoof ("off to bed") 03:13:45 --- join: vatic (n=chatzill@pool-162-83-233-103.ny5030.east.verizon.net) joined #forth 03:14:40 --- quit: mark4_ (Read error: 110 (Connection timed out)) 03:24:39 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 03:24:39 --- mode: ChanServ set +o tathi 03:55:28 --- join: vatic_ (n=chatzill@pool-162-83-233-103.ny5030.east.verizon.net) joined #forth 04:01:20 --- quit: vatic (Nick collision from services.) 04:01:38 --- nick: vatic_ -> vatic 05:47:35 --- quit: tathi ("leaving") 05:54:49 --- join: azekeprofit (i=azekepro@88.204.193.173.metro.online.kz) joined #forth 05:55:51 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 06:02:10 --- quit: azekeprofit (Read error: 104 (Connection reset by peer)) 06:02:28 --- join: azekeprofit (n=azekepro@88.204.193.173) joined #forth 06:06:25 --- part: azekeprofit left #forth 06:07:05 --- join: azekeprofit (n=azekepro@88.204.193.173) joined #forth 06:14:23 --- quit: ecraven ("bbl") 06:14:40 --- quit: virsys ("bah") 06:36:12 --- join: virsys (n=virsys@or-71-54-193-76.dhcp.embarqhsd.net) joined #forth 06:39:25 --- join: madwork (n=foo@204.138.110.15) joined #forth 06:41:07 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 06:41:07 --- mode: ChanServ set +o Quartus_ 06:55:31 --- join: ayrnieu (n=julian@pdpc/supporter/sustaining/ayrnieu) joined #forth 07:04:04 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 07:04:04 --- mode: ChanServ set +o tathi 07:04:06 --- quit: Quartus_ (Read error: 104 (Connection reset by peer)) 08:45:56 Any comments? http://forth.pastebin.ca/421036 08:48:26 I believe -ROT pretty commonly available (reverse ROT). 08:48:59 oh, really? I wasn't so sure about that, thanks! 08:50:48 I would also probably have tri-wav take the parameters as input, instead of storing them later 08:51:43 you mean the create/does> stuff? I think I want that... 08:53:07 tathi: it's an audio idea and conceivably I'd have lots of tri-wav instances with differing input parameters. 08:53:27 I thought it would be smart to keep the parameters with the instance. 08:53:34 : tri-wav ( min max inc "name" -- ) create , , , \ etc... 08:54:09 1 4 1 tri-wav update-dur 08:54:21 that's all I meant. 08:54:32 oh I see, just a different way of building update-dur. thanks again! 08:55:13 that way somebody can't accidentally build a tri-wav without all the parameters 08:56:03 It should also be fine to use <= and >= 08:56:04 my understanding of create/does> is pretty small. I'm essentially copying from an example in Rather's forth handbook. 08:56:20 Again, they're not strictly standard, but they usually exist. 08:56:57 sure 08:57:35 I see that MacForth has <= and >=, but not -rot 08:58:07 hmm. your call then. 08:58:31 You could probably use WITHIN to do the bounds check and avoid the ROT ROT altogether 08:58:38 Quartus has none of them ;-) 08:59:04 OK, don't mind me then :) 09:00:09 tathi: I did an earlier version using WITHIN, but got hung on the >=, but < conditional boundaries... 09:00:25 oh, hey! the input is much appreciated! 09:01:18 the tri-wav went to zero and when I compensated by "adding 1" then it didn't work with 1 as an initial condition. 09:02:04 yeah. I was fiddling with it a bit last night and ran into that myself. 09:02:13 : tri-wav ( -- ) create 09:02:15 does> ( dur1 -- dur2 ) 09:02:16 2dup dup dur-min @ 1+ 09:02:18 swap dur-max @ 09:02:19 within invert if 09:02:21 dup dur-inc @ negate over dur-inc ! 09:02:23 then 09:02:24 dur-inc @ + 09:02:25 ; 09:02:43 I thin that one works... 09:02:49 sort of 09:08:52 well you better factor it, way too much data shuffling 09:09:03 But your version in the paste has the problem with 1 as an initial condition as well 09:10:34 yeah, I was just noticing that. I think I need to update dur before I test... 09:11:02 segher_ any hints? 09:12:27 well you can start with the IF body of course 09:12:27 --- join: yumehito_ (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 09:13:02 another good rule of thumb is you can split out the part you used that 2dup dup for 09:13:17 etc. 09:14:13 i have no idea what this code is trying to accomplish, but the best factors are typically the ones that are a logical step, with logical inputs and outputs 09:15:03 segher_ your looking at what's here in the channel, not what I posted, right? 09:15:24 yes 09:15:30 OK 09:16:14 not saying what I posted is any better: http://forth.pastebin.ca/421036 09:16:20 --- quit: azekeprofit (Read error: 104 (Connection reset by peer)) 09:16:40 --- join: azekeprofit (n=azekepro@88.204.193.173.metro.online.kz) joined #forth 09:17:08 hi 09:17:19 Quartus: do you use blackberry ? 09:17:33 Quartus: or you are using a treo ? 09:18:52 vatic: i cannot figure out that code easily either ;-) 09:19:08 nighty--: I think he has a Lifedrive and a Blackberry 09:19:23 Lifedrive ? 09:19:28 what is that ? 09:19:31 URL ? 09:19:49 http://www.palm.com 09:20:51 yes does not have a keyboard 09:20:57 segher_: repeated calls to write-sample generate a series of floating point numbers between 1.0 and -1.0 09:21:46 update-dur determines how many samples of a certain amplitude are generated 09:22:02 and update-amp determines the amplitude. 09:22:39 update-dur uses tri-wav to generate a triangle wave with certain parameters 09:23:04 update-amp relies on a variable and hard coded number so far... 09:23:44 --- quit: yumehito (Read error: 110 (Connection timed out)) 09:24:03 segher_: it should run... 09:27:48 --- join: brx` (n=brx@p57a78d10.dip0.t-ipconnect.de) joined #forth 09:42:08 --- quit: brx (Read error: 110 (Connection timed out)) 09:47:41 --- join: segher__ (n=segher@dslb-084-056-191-066.pools.arcor-ip.net) joined #forth 09:58:37 --- join: brx (n=brx@p57A7A61D.dip0.t-ipconnect.de) joined #forth 09:59:51 --- quit: segher_ (Read error: 110 (Connection timed out)) 10:01:32 --- join: brx`` (n=brx@p57A7872B.dip0.t-ipconnect.de) joined #forth 10:02:40 --- nick: crest_ -> Crest 10:07:05 --- quit: brx` (Read error: 110 (Connection timed out)) 10:16:09 --- quit: brx (Read error: 110 (Connection timed out)) 10:22:30 --- join: brx (n=brx@p57a7826a.dip0.t-ipconnect.de) joined #forth 10:31:09 --- quit: brx`` (Read error: 110 (Connection timed out)) 10:36:42 --- join: brx` (n=brx@p57A7C749.dip0.t-ipconnect.de) joined #forth 10:46:20 vatic: http://forth.pastebin.ca/421167 10:49:55 --- join: brx`` (n=brx@p57a7c54d.dip0.t-ipconnect.de) joined #forth 10:52:33 --- quit: brx (Read error: 110 (Connection timed out)) 10:55:28 hey tathi! thanks so much for this! I'll have to study it carefully... 10:56:31 one thing, I should have mentioned it, my thought is to keep the current sample on the stack, so I could call a-wave a-wave b-wave a-wave c-wave a-wave... 10:56:55 but I haven't thought that through in terms of the implementation. 10:57:12 --- quit: brx` (Read error: 110 (Connection timed out)) 10:59:01 yeah. 10:59:36 my thought was that you can't use update-dur on more than one value anyway (because you need the direction too) 10:59:40 so I put it in the structure. 11:05:58 tathi: not sure I'm following you. You mean that tri-wave isn't re-entrant, so why hassle with the sample value on the stack? 11:06:56 no, I mean that the sample value does not uniquely identify your position in the waveform. 11:07:32 ah, right! 11:07:50 really nice code, BTW... ;-) 11:08:17 but sample value + last increment used does 11:08:45 and you need to store the increment anyway, so there is no need for a separate direction flag 11:09:32 --- join: brx (n=brx@p57a7831f.dip0.t-ipconnect.de) joined #forth 11:10:20 sure. I'm just saying that the sample and the increment are one "object", so keeping the sample on the stack instead of in the structure was bothering me a little. 11:10:54 though...come to think of it, since I'm storing the initial sample value in the structure, there's no need for the separate top/bottom checks 11:11:10 I could just set the correct sign for the initial increment, and go back to using within and negate 11:13:48 wav-inc @ wav-val +! wav-val @ wav-max @ > IF wav-max @ wav-flip THEN wav-val @ mav-min @ < IF mav-min @ wav-flip THEN 11:14:16 : wav-flip ( border -- ) 2* wav-val @ - wav-val ! wav-inc @ negate wav-inc ! ; 11:16:34 ya 11:16:37 --- quit: grub_booter (Read error: 110 (Connection timed out)) 11:18:36 segher__: very nice of you and tathi to take an interest in my code, thanks! 11:19:53 --- join: Quartus_ (n=Quartus_@209.167.5.2) joined #forth 11:19:53 --- mode: ChanServ set +o Quartus_ 11:24:54 --- quit: brx`` (Read error: 110 (Connection timed out)) 11:29:56 --- join: brx` (n=brx@p57a78cf6.dip0.t-ipconnect.de) joined #forth 11:30:13 ok, updated my paste. http://forth.pastebin.ca/421218 11:32:05 --- nick: segher__ -> segher 11:33:18 --- join: brx`` (n=brx@p57a7bc75.dip0.t-ipconnect.de) joined #forth 11:37:54 --- quit: brx (Success) 11:38:45 --- join: grub_booter (n=charlie@d515301E0.access.telenet.be) joined #forth 11:38:57 tathi: not educated enough to read the CREATE: 1 abs negate , 4 over, 1 , 1+ , Is that correct? 11:40:18 --- quit: brx` (Read error: 60 (Operation timed out)) 11:43:40 --- join: brx (n=brx@p57A7AFB1.dip0.t-ipconnect.de) joined #forth 11:49:38 vatic, I don't follow your question 11:49:42 --- join: brx` (n=brx@p57a7b660.dip0.t-ipconnect.de) joined #forth 11:50:23 btw, re your inquiry, anything that's run from the console will show up in CrashLog under 'quartus', so I'd need further context to know. 11:50:54 Quartus: I'm too stoopid to understand what the CREATE does in tathi's paste: http://forth.pastebin.ca/421218 11:50:57 --- quit: brx`` (Read error: 110 (Connection timed out)) 11:51:05 but I going to look at it and find out... 11:51:08 i'm 11:51:16 I see the paste, but I don't understand what you wrote 11:52:54 doesn't tri-wave take the arguments 1 4 1, perform some operations on them (abs negate, etc.) and then store them in the dictionary? 11:53:13 I can't figure out what's being stored... 11:53:17 :-) 11:59:35 --- join: brx`` (n=brx@p57a7b455.dip0.t-ipconnect.de) joined #forth 12:00:08 --- quit: brx (Read error: 110 (Connection timed out)) 12:01:17 Quartus_: I figured it out, thanks... 12:02:02 wav-inc: -1 wav-val: 1 wav-bounds: 2 4 12:03:52 --- join: brx (n=brx@p57a7893d.dip0.t-ipconnect.de) joined #forth 12:06:52 --- quit: brx` (Read error: 110 (Connection timed out)) 12:10:41 --- quit: brx`` (Read error: 60 (Operation timed out)) 12:10:43 Quartus_: should have been reading it 1 4 1 abs negate , over , , 1+ , 12:11:05 amazing! what a great language... 12:11:40 --- join: ASau (n=user@ggsn3inet4.beelinegprs.ru) joined #forth 12:15:39 hehe 12:15:50 sorry, went outside to get a few things done. 12:16:01 probably better you figuring it out on your own anyway. :) 12:16:36 Good evening, tathi. 12:16:46 hi ASau 12:16:47 tathi: yes, those lesson are learned. no hand-holding! 12:16:58 Dobry Vecer! 12:17:23 Good evening, vatic. 12:17:38 how are you ASau? 12:21:25 I'm going to slavery. 12:22:08 --- join: edrx (n=Eduardo@200.217.105.63) joined #forth 12:23:22 huh? Have you ever heard Rasaan Roland Kirk? 12:25:14 No. Who is he? 12:25:47 In fact, I have all the chances not going there. 12:25:56 Jazz saxophonist. Has a brilliant tune "Volunteered Slavery" 12:26:51 If bank security finds me "not so beautiful", I don't get their job. 12:27:03 If I get, it's slavery. 12:28:34 What did Brecht say? "Forget about robbing banks, it's better to own one"? 12:29:24 --- join: brx` (n=brx@p57a7b026.dip0.t-ipconnect.de) joined #forth 12:29:36 Guten Abend, brx`. 12:36:19 --- quit: brx (Read error: 110 (Connection timed out)) 12:43:34 --- quit: Quartus_ (Read error: 60 (Operation timed out)) 12:44:28 "What's the big deal about robbing banks compared to owning one"? - Brecht 12:46:06 Where is it from? 12:46:17 The quotation source? 12:46:33 I think that's from _Happy End_ (w/Weill) around the end where the Rockefellers show up. 12:46:51 He says it even better, of course. 12:47:19 I'm checking wikiquote. 12:47:51 It's interesting resource. 12:48:23 I've never used it. I'll be by the libretto on Wednesday, though... 12:49:01 I lists quotations of David Hilbert and Russian, English 12:49:02 and German variants hardly overlap. 12:49:50 I looked for "Standpunkt" quotation there yesterday. 12:49:54 did Hilbert rob banks? ;-) 12:50:59 --- join: Quartus_ (n=Quartus_@209.167.5.2) joined #forth 12:50:59 --- mode: ChanServ set +o Quartus_ 12:51:08 Do I care? 12:51:29 Good evening, Quartus. 12:52:07 who knows what your future employer will ask you to do! 12:53:46 I'm supposed to work in processing center. 12:53:56 Oracle and the stuff. 12:57:14 --- join: JasonWoof (n=jason@c-71-192-30-169.hsd1.ma.comcast.net) joined #forth 12:57:14 --- mode: ChanServ set +o JasonWoof 12:57:18 vatic: "Was ist der Einbruch in eine Bank gegen die Gründung einer Bank?" - Die Dreigroschenoper 13:00:58 It'd be more precise to translate "...against founding one." 13:01:19 sorry vatic, was afk 13:01:30 Right? 13:01:52 no prob, Quartus... 13:02:33 ASau: that's it. I guess I have the wrong "musical." 13:03:22 The German gets to the heart of the robbing/founding identity. 13:23:58 --- quit: ASau (Nick collision from services.) 13:24:18 --- quit: ygrek () 13:24:34 --- join: ASau (n=user@iggsn1inet2.beelinegprs.ru) joined #forth 13:24:48 Sorry. 13:24:55 Damn stupid mistake. 13:28:42 --- quit: timlarson_ ("Leaving") 13:42:15 good evening 13:46:11 hey crc. 14:07:37 --- quit: tathi ("leaving") 14:08:18 --- join: brx (n=brx@p57a79fd0.dip0.t-ipconnect.de) joined #forth 14:16:09 --- quit: brx` (Read error: 60 (Operation timed out)) 15:03:11 --- join: crest_ (n=crest@p5489e1da.dip.t-dialin.net) joined #forth 15:08:46 --- quit: ASau (zelazny.freenode.net irc.freenode.net) 15:08:46 --- quit: brx (zelazny.freenode.net irc.freenode.net) 15:08:46 --- quit: azekeprofit (zelazny.freenode.net irc.freenode.net) 15:08:46 --- quit: virsys (zelazny.freenode.net irc.freenode.net) 15:08:46 --- quit: madgarden (zelazny.freenode.net irc.freenode.net) 15:08:46 --- quit: gnomon (zelazny.freenode.net irc.freenode.net) 15:08:47 --- quit: unfy (zelazny.freenode.net irc.freenode.net) 15:08:48 --- quit: Snoopy42 (zelazny.freenode.net irc.freenode.net) 15:08:48 --- quit: nighty-- (zelazny.freenode.net irc.freenode.net) 15:08:48 --- quit: yumehito_ (zelazny.freenode.net irc.freenode.net) 15:08:48 --- quit: Crest (zelazny.freenode.net irc.freenode.net) 15:08:48 --- quit: slava (zelazny.freenode.net irc.freenode.net) 15:08:50 --- quit: OrngeTide (zelazny.freenode.net irc.freenode.net) 15:08:50 --- quit: juhaheinonen (zelazny.freenode.net irc.freenode.net) 15:08:50 --- quit: crc (zelazny.freenode.net irc.freenode.net) 15:08:50 --- quit: Shain (zelazny.freenode.net irc.freenode.net) 15:08:51 --- quit: uiuiuiu (zelazny.freenode.net irc.freenode.net) 15:08:51 --- quit: segher (zelazny.freenode.net irc.freenode.net) 15:08:51 --- quit: ayrnieu (zelazny.freenode.net irc.freenode.net) 15:08:51 --- quit: madwork (zelazny.freenode.net irc.freenode.net) 15:08:52 --- quit: cmeme (zelazny.freenode.net irc.freenode.net) 15:08:52 --- quit: Baughn (zelazny.freenode.net irc.freenode.net) 15:09:03 --- join: crc (n=crc@pdpc/supporter/active/crc) joined #forth 15:09:03 --- join: OrngeTide (i=orange@orangetide.com) joined #forth 15:09:03 --- join: juhaheinonen (n=o@82.118.209.100) joined #forth 15:09:03 --- mode: irc.freenode.net set +o crc 15:09:12 --- join: Shain (i=steve@adsl-75-30-244-32.dsl.pltn13.sbcglobal.net) joined #forth 15:09:12 --- join: uiuiuiu (n=ian@schihei.net) joined #forth 15:09:14 --- join: brx (n=brx@p57a79fd0.dip0.t-ipconnect.de) joined #forth 15:09:14 --- join: azekeprofit (n=azekepro@88.204.193.173.metro.online.kz) joined #forth 15:09:14 --- join: virsys (n=virsys@or-71-54-193-76.dhcp.embarqhsd.net) joined #forth 15:09:14 --- join: madgarden (n=madgarde@bas2-kitchener06-1096651787.dsl.bell.ca) joined #forth 15:09:14 --- join: gnomon (n=gnomon@CPE0050eb372bdb-CM001692f57b56.cpe.net.cable.rogers.com) joined #forth 15:09:14 --- join: unfy (n=unfy@69.60.116.93) joined #forth 15:09:24 --- join: ASau (n=user@iggsn1inet2.beelinegprs.ru) joined #forth 15:09:32 --- join: segher (n=segher@dslb-084-056-191-066.pools.arcor-ip.net) joined #forth 15:09:32 --- join: ayrnieu (n=julian@pdpc/supporter/sustaining/ayrnieu) joined #forth 15:09:32 --- join: madwork (n=foo@204.138.110.15) joined #forth 15:09:32 --- join: Baughn (n=svein@084202037191.customer.alfanett.no) joined #forth 15:09:32 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 15:09:32 --- join: Snoopy42 (i=snoopy_1@dslb-084-058-190-203.pools.arcor-ip.net) joined #forth 15:09:32 --- join: nighty-- (n=nighty-@66-163-28-100.ip.tor.radiant.net) joined #forth 15:10:04 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 15:10:04 --- join: yumehito_ (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 15:10:04 --- join: Crest (n=crest@p5489d50e.dip.t-dialin.net) joined #forth 15:10:04 --- mode: irc.freenode.net set +o slava 15:12:08 --- join: DocPlatypus (n=skquinn@adsl-75-62-71-232.dsl.hstntx.sbcglobal.net) joined #forth 15:18:24 --- quit: Crest (Connection timed out) 15:22:45 got bored and started messing with http://www.complang.tuwien.ac.at/forth/programs/sun.4th -- is there any realistic hope of getting this to run in gforth? 15:23:34 is that my sunrise sunset code? Mobile presently 15:24:20 Quartus_: it's somebody's sunrise/sunset code... maybe it is yours 15:25:20 think so. 15:25:51 should be fine in gforth 15:26:29 it's actually a kforth port of it. and I feel stupid, just now noticed the URL of the original. 15:27:41 the issue I run into is that I always wind up with a result of -1 or "Fatal Error" 15:28:00 I can look at it later. 15:28:48 I'm guessing there's some kind of kforth-specific assumption made in this code that gforth doesn't like 15:29:39 try the original 15:30:06 the original barfs at "needs calendar" 15:30:30 or should I comment those lines out? 15:30:40 that's because it uses that module (available at my site) to do calendrical math. 15:34:34 I wrote it for Quartus Forth, but it's readily adaptable. 15:37:37 ok I'm hunting for what I need now 15:41:33 ok where is calendar hidden? I found the other three 15:41:39 --- quit: vatic ("*poof*") 15:43:45 --- join: vatic (n=chatzill@pool-162-83-233-103.ny5030.east.verizon.net) joined #forth 15:47:13 --- quit: ayrnieu (Remote closed the connection) 15:57:01 --- join: alexshendi (n=alexshen@dslb-088-065-238-224.pools.arcor-ip.net) joined #forth 15:58:48 sorry, was afk 15:59:19 I'm mobile; I'll have at it when I'm back. 16:00:13 ok 16:00:18 I probably have the gforth version already writ 16:00:33 it's a pretty simple bit of code. 16:02:09 maybe I'm getting in over my head for someone relatively new to the language 16:02:16 just a couple of float calculations, really 16:02:27 but I was actually trying to figure out where the quack the -1 was coming from 16:02:40 --- join: Snoopy_1611 (i=snoopy_1@dslb-084-058-132-083.pools.arcor-ip.net) joined #forth 16:03:05 --- quit: Snoopy42 (Nick collision from services.) 16:03:09 I don't know, after being butchered into the kforth pidgin it may do any odd thing on a real Standard Forth 16:03:21 --- nick: Snoopy_1611 -> Snoopy42 16:03:22 indeed 16:04:06 I posted it to comp.lang.forth back when I wrote it. There may be a version there. 16:04:30 I should have known something was up when I commented out six words already defined in gforth, and just hoping to whatever deities may or may not be watching that gforth's version was good enough 16:04:52 what kind of numbnut Forth implementation does not have pi predefeined? 16:04:58 (for example) 16:05:16 plenty. It's not a standard word. 16:06:14 what would you have it be? A float? A scaled integer calculation? 16:07:22 well it would make the most sense to me for it to be a float 16:08:07 it's trivially definable to the limit of the float precision using fatan 16:08:44 shoot, I've been away from programming that long that I forgot the old trick from BASIC days 16:09:19 something to the effect of pi=atan(1)*4 ... in Forth I guess that's something like: 1.0e fatan 4 * 16:09:45 not quite 16:10:47 I haven't really gotten into floating point math yet so... 16:11:11 what have you gotten into so far? 16:12:31 so far, basic integer math and stack manipulation, and trying to wrap my head around the output of "see" (yes I know it's assembler, but trying to figure out why it works the way it does) 16:15:54 anyway, meatspace errands call... will be back on in about a half hour 16:17:16 ok 16:19:55 1e fatan 4e f* fconstant fpi 16:20:45 --- join: ayrnieu (n=julian@pdpc/supporter/sustaining/ayrnieu) joined #forth 16:22:04 isn't Pi day coming up? 16:22:05 --- part: edrx left #forth 16:22:27 no, that was last month. 16:22:58 --- quit: alexshendi ("This computer has gone to sleep") 16:29:14 hi Quartus 16:29:19 i responded to the 'forth frustrations' post 16:29:27 its a classic case of a newbie putting everything on the stack 16:29:40 --- join: nighty (n=nighty@sushi.rural-networks.com) joined #forth 16:30:43 aynieu: oops! yes it IS April now... 16:34:19 slava, that's the one on some other forum you were mentioning? 16:34:56 c.l.f 16:35:01 ah, different on I guess 16:35:19 you were talking the other day about some fellow who was enamored of locals and named arguments 16:35:29 ah, yes 16:35:41 Monsieur Cat... 16:36:08 Quartus: he's building his own forth-like, and adding locals from the start. not that there's anything wrong with that, but his justification was off 16:36:24 personally, i think locals are poor man's OOP 16:36:38 oh that guy was on here, and he got really upset with me when I said his Forth wasn't very good. 16:36:45 Now about 20 other people have done the same. 16:36:57 who is it? 16:37:05 I'd have to check the logs now 16:38:07 imaginator. If it's the same guy. Think so. 16:38:25 here's his paste: http://forth.pastebin.ca/374026 16:38:49 that's about 4 lines of factor 16:39:07 doesn't even require 8dup 16:39:13 or 4rot, for that matter 16:39:23 nor does a reasonable Forth solution. 16:39:25 But here we are. 16:40:01 : gradify-line ( r1 g1 b1 a1 ) { addr width rdelta gdelta bdelta adelta } 16:40:13 can you explain why the stack effect has 4 values and then he has 6 locals? 16:40:21 does this word take a total of 10 inputs? 16:40:24 I must have really upset him for him to go seeking validation. 16:40:40 slava, I wouldn't spend too long looking at that code. It'll make you cry. 16:42:57 : gradify-line ( color delta width -- seq ) 16:42:59 dup [ / ] map-with [ v*n ] map-with [ v+ ] 2map ; 16:43:00 4rot made me very sad 16:43:23 i confess factor has 4rot, it is called roll. used a handful of times when dealing with C APIs 16:44:52 He's just got himself stuck in a dark corner, and has no wish to leave it. As you said on clf, you don't schlep around all your data on the stack. 16:46:34 I tried to steer him right at the time, but he started going off on the notion of using allocate, how to scope the lifespan of his temporary objects, etc. 16:47:10 He accused me of "Chuck Moore dogma". 16:47:47 This is why I prefer to teach via writing rather than real-time. If somebody doesn't want to learn, they can put the book down, and you don't ever hear from them. :) 16:49:07 Good reply on clf btw 16:49:20 -nod-, of anyone in this channel, I would most expect Chuck Moore dogma to come from Quartus 16:49:34 oh, hey Quartus. 16:49:51 I don't find myself often in agreement with Moore, particularly in his more recent forays 16:50:33 I'm not a radical minimalist, nor do I throw everything out and start anew with each go; I believe documentation is an important part of coding. I could go on. 16:52:37 Possibly you have a cloudy vision of either Moore's ideas, mine, or both. 16:54:05 'neither' is also a possibility. 16:54:38 In so far as I'm the authority on my own opinions, no, 'neither' is not a possibility. 16:55:32 There's a nice logical trick, here: hold 'neither' as the situation, and reason from there. 16:58:08 Uh, ok. Clearly you know better what opinions I hold than I do; how silly of me not to realize that. Are we done now? 16:58:42 I'm not going to argue with this kind of intentional stupidity, no. 16:58:54 Excellent. 17:02:07 --- quit: ASau (Read error: 113 (No route to host)) 17:02:17 Quartus: i posted another response. 17:02:34 : gradify-line ( color delta width -- seq ) 17:02:34 dup [ / v*n v+ ] map-with3 ; 17:02:38 that's his program. 17:03:28 in colorforth style, there's a word there not defined in the library 17:03:29 : map-with3 3 map-withn ; inline 17:03:42 and math-withn is itself in a contributed library. its like 'map' iteration but keeps n values around on the stack for you. 17:03:43 He'd need to know Factor to grok that, but I think I can follow it myself. I think the key for him is to realize what you posted last time -- he needs to encapsulate his data 17:04:07 You mean in John Drake style, don't you? :) 17:04:10 pacman 17:04:14 v*n is mnemonic. vector times number 17:04:18 v+ is vector plus vector. 17:04:23 i think it's resonably clear 17:04:39 'map' is found in lisp and other languages but the stack effect might not be entirely obvious. 17:04:48 it is ( array block -- newarray ) 17:04:53 Ah. 17:05:06 the block is ( elt -- newelt ) 17:05:10 elt? 17:05:12 make-with3 is (a b c array block -- newarray ) and the block is ( a b c elt -- newelt ) 17:05:15 yeah, the current element 17:05:17 ah. 17:05:25 map iterates over an array, computes new elements, makes a new array. 17:05:29 { 1 2 3 } [ dup * ] map . => { 1 4 9 } 17:05:29 Gotcha. 17:05:48 Neat. 17:05:53 you have 2map, 17:06:07 { 1 2 3 } { 0.5 0.4 0.3 } [ v+ ] 2map . => { 1.5 2.4 3.3 } 17:06:08 err 17:06:11 change that v+ to +. 17:06:14 we're adding scalars. 17:06:23 v+ is defined this way, : v+ [ + ] 2map ; 17:06:25 it is very powerful. 17:06:41 A stone's throw from APL. 17:07:03 in APL, the * operation does the work of factor's * v*n n*v and v* words. 17:07:15 it doesn't care if the LHS, RHS or both are vectors. 17:07:18 Right. 17:07:27 i chose not to overload arithmetic this way. 17:08:12 i think in many ways, C encourages poor data structures and factoring. 17:08:16 Of course you're still coding using archaic text, instead of with four buttons and an LCD panel attached to an ARM CPU. 17:08:27 you got that part wrong. 17:08:33 i input my text, with four buttons, as BCD ASCII. 17:08:45 That's awsome. :) 17:08:59 No luddite, thee. 17:09:10 found it with my metal detector. 17:09:44 Was it above, or below, the lost treasure of the Incas buried in the desert near Phoenix? 17:10:02 Or were you looking for huge meteors at the time? 17:10:08 a nickle's throw away from a penny. 17:10:21 still looking for the meteors -- but it will make me rich. 17:10:22 just you wait. 17:10:43 I once heard of a guy who knew a guy who once met another guy who found a meteor that was worth $100. 17:10:58 you know jim? 17:11:01 heh 17:11:22 I figure with a really good metal detector, you could have the world's best collection of rusty bottlecaps. 17:11:54 you'd need the really good one. 17:12:09 The Super Detector 3000. 17:12:28 Doubles as a fish locator. 17:15:19 --- join: brx` (n=brx@p57A79E98.dip0.t-ipconnect.de) joined #forth 17:16:55 please tell me it doesn't key off the mercury in the fish 17:17:07 No, the meteor particles 17:17:32 and yes that pastebin is some pretty crappy Forth 17:17:58 I think so too, but if you want my real opinion, check with ayrnieu. 17:18:43 dumb question... is the output of see supposed to be non-comprehensible if you don't have the source to the Forth engine itself? 17:18:57 well, depends on the forth, the see, and what you're looking at. 17:18:58 for words which break down to assembler code 17:19:31 In a native-code Forth, all words break down to assembler code. 17:19:34 no I am not trying to bring my old 6502-centric assembler knowledge up to speed to the i386/amd64 era this way 17:20:19 What are you SEEing? 17:20:25 in this case, / in gforth 17:20:41 ah. I see (no pun intended) how this works now 17:20:45 I just brought it up in mine. It revolves around an idiv instruction, which you'd expect 17:21:04 yeah I figured it out now. those addresses it jumps to are actually in the code it disassembles 17:21:06 The rest of it sets up for that idiv, and then assembles the result on the stack 17:21:54 and something in there checks for a divide by zero it seems 17:22:03 that's weird. 17:22:05 don't think so. 17:22:19 It relies on signals to trap errors in division 17:22:28 powerpc yields 0 if you divide by 0 17:22:31 3 0 / . 17:22:32 0 17:22:33 that's factor. 17:22:56 And here I thought 1 was the loneliest number that you'll ever do 17:23:17 mine throws a divide by zero error when you do that 17:23:26 on ppc? 17:23:36 no, on i386 17:23:51 --- quit: brx (Read error: 110 (Connection timed out)) 17:25:10 now, of course, the float equivalent gives me "inf" 17:25:20 yup. 17:27:39 Personally I would think delving into the disassembly of Forth words written using C generated by a target compiler to be an awkward way to learn Forth. 17:28:08 At least I think I would think that. It gets difficult to know. 17:28:09 well, I'm not learning Forth that way, just kind of looking "under the hood" to get an idea of the nuts and bolts 17:28:47 --- quit: ayrnieu () 17:28:49 it's kind of nice to know that something breaks down to, say, five screens' full of assembler by the time all is said and one 17:29:04 that'd be a long word 17:30:14 If you run gforth-fast, the assembler defnitions are somewhat simplified 17:32:03 In Gforth, + is eight instructions. In gforth-fast, it's six. In retroforth (which is native-code), it's three. 17:32:47 in my gforth-fast it's eleven instructions 17:32:53 curious 17:32:56 ... in factor, + goes through a 5x5 jump table, depending on the runtime types on the stack. :) 17:32:57 what version? 17:33:31 Quartus: gforth 0.6.2-20060527 17:34:44 My build is from '07, on win32 17:35:01 though ayrnieu is not here to check with to be sure 17:35:29 10 on gforth 0.6.2 release, 9 on gforth-fast 17:36:08 well, all the worse. Point being that you'd follow the native-code better if it were written by hand, rather than generated by a target compiler 17:38:40 Just looking at what my sunrise/sunset code became. Appears that that link, http://www.complang.tuwien.ac.at/forth/programs/sun.4th has another file jammed into the middle of it. 17:39:09 so the guy made a Frankenprogram out of it? 17:39:17 let me see 17:39:37 yes, rather than include a file, he just pasted it inline 17:39:39 it runs fine here 17:41:39 odd 17:41:47 do I have a defective build? 17:41:52 (of gforth) 17:41:59 I just copied the source to a file, included it in gforth. Compiles fine. Does it not compile for you? 17:42:01 and the checkout is much more recent than that date indicates 17:42:17 oh it compiles but once I actually run the sunset function that's when the trouble happens 17:42:32 oh. You're likely not doing the required setup, setting a location and a zenith 17:42:45 try 17:43:05 -79.4e 43.6e set-location official-zenith 17:43:18 21 august 2005 time>mh . . 17:44:38 I think you meant: 21 august 2005 sunset time>mh . . 17:44:42 right 17:46:03 So there you go. Runs like a champ. 17:47:56 In the Quartus Forth version, I use the calendar module to calculate the julian day. 17:48:08 In this version, Baden's julian calcluation stuff is jammed into the middle. 17:48:57 The Quartus Forth version also leverages Baden's OPG to include the formulas in the form the appear in the original document. 17:49:26 so this kforth version is in fact a bastard child of the original 17:49:30 yup 17:49:44 and I'm not doing the wrong thing by commenting out the words already defined in gforth? 17:50:06 I wouldn't bother with the kforth version at all if I were you 17:51:24 There are four choices for zenith available, btw -- official, civil, nautical, and astronomical 17:51:30 --- quit: madwork (Read error: 110 (Connection timed out)) 17:51:45 ah. that's the version I already have working 17:52:00 no offense intended to you 17:52:28 The version at the link above is from Ertl, a fixed version of the kforth code, with the Julian day code whacked into it 17:52:51 so if you start with that, at least you have something that works 17:53:00 yeah that is what I started with 17:54:03 It is (in my opinion, and here I'm totally on my own at present, so forgive me) miles away from the original in terms of clarity. 17:54:29 My goal was to port the algorithm as described in the HTML I provide in the .zip to Forth as clearly as possible. 17:54:32 maybe that should be my project, to make it clearer 17:55:15 To that end, I used Baden's OPG, my own calendar module, and module/private:/public:/end-module to modularize it 18:03:34 OPG is a very nice and portable bit of code. It ran unchanged in Quartus Forth, which pleased me greatly. 18:03:59 Were I to start to make a clear version for Gforth, I would begin with the Quartus Forth version and port the prerequisites across. Your methods may vary. 18:04:17 I'd keep OPG. 18:04:43 I think nothing is gained and much is lost by converting all the formulae to postfix. 18:05:30 my only gripe about GNU Forth is they supposedly have a way of making a version for embedded systems but only one works 18:05:34 and it's not the 6502 18:06:05 Is the 6502 a popular embedded target nowadays? 18:06:26 not as popular as it used to be 18:06:41 but it's not like they are not still being made. the Z80 is still being made 18:06:49 as well 18:07:00 You can still buy Nixie tubes. 18:09:02 well I know certain parts get discontinued over the years... one of the chips used on the KIM-1 is discontinued 18:09:24 to make a modern equivalent of the KIM-1 you have to use a slightly different chip and change the design a bit 18:09:45 I'm not terribly surprised that a slow, 8-bit CPU from the 70's doesn't have a Gforth port. 18:10:09 You should find the other guy who wants it, and get together and do the work. :) 18:10:45 I may well make a 65816 port if I get bored enough 18:10:56 (the 6502's 16-bit cousin) 18:11:43 there's a 32-bit version as well 18:11:58 segher: really? what chip would that be? 18:12:11 65832 i think? 18:12:21 and who makes them? 18:12:21 the c65 is built around it 18:12:27 dunno 18:12:52 but there's google :-) moment... 18:13:26 ah. wdc, but they never actually built it it says here 18:13:50 of course not 18:13:57 and that's a shame 18:14:14 or are they still working on it? 18:15:40 dunno. the design was finalised so it could be put into production whenever 18:15:56 order a million, and i'm sure they'll build it for you :-) 18:17:38 heh 18:17:54 the applications I have in mind, I doubt I would get up to a million 18:17:56 maybe 10,000 18:20:51 any reason you need a 6502? there are plenty more modern (cheaper, lower power, faster) micros around 18:23:22 segher: the main reason I'm interested in using it is I know the assembler language already 18:23:50 and for some applications i have in mind I do not need gobs of CPU power and certainly don't need gobs of power consumption 18:24:23 well like i said, there are other chips that are way lower power, although lots faster 18:24:56 i like the 6502 insn set though, yeah i understand you wanting to program in it :-) 18:25:22 first computer language i learnt, 6502 asm. oh the sentiment :-) 18:25:27 was it really? 18:25:38 I learned Atari BASIC first, then 6502 asm 18:25:52 yeah really. and second was forth :-) 18:26:01 then Pascal on Mac OS 7 or so 18:26:08 well okay, maybe i played with logo too 18:26:18 then C, then Perl, then bash shell scripting somewhere in there 18:26:30 then a brief excursion into Emacs LISP 18:26:45 i still don't know how to properly write shell scripts, heh 18:28:46 or maybe I need to learn a more modern assembler language 18:29:00 I taught myself 6502 assembler when I was 11 18:29:01 68K is a reasonable step from 6502 18:29:24 quartus: nah, 68k is horrible. just skip it :-) 18:29:34 I like it. 18:30:06 well if you know all details for all insns *already*, you can program in 68k asm i suppose 18:31:34 i recommend msp430 as a nice step up from 6502 18:37:39 hmm, made only by TI? don't know if I still have a reason not to buy from TI but there was a flap on the OpenBSD list about a lack of documentation on their wifi chips 18:37:47 not sure if that was ever resolved 18:38:28 i didn't know they made wifi chips, even. but figures 18:38:50 *no one* give out public information on any recent wifi chips fwiw 18:39:45 segher: Ralink does 18:40:13 I know the OpenBSD developers have been adding wireless hardware support for something, and they never work under NDA 18:41:52 does it require a firmware though? 18:42:20 "RT2500 adapters do not require a firmware to operate." 18:42:26 bull 18:42:34 quote from the OpenBSD ral(4) manpage 18:42:37 they just have it in flash 18:42:46 instead of the driver having to load it 18:43:21 but sure it makes things easier 18:43:36 you can't honestly call it "fully open source" though 18:45:06 I'm a big-time free software nut but I can understand somewhat not wanting to release source to the firmware 18:45:35 it's enough for me to at least know how to talk to the firmware on the device 18:46:16 right 18:46:27 just consider the thing a black box 18:47:25 now if the manufacturers don't let the device do what we want it to do for arbitrary self-serving reasons that's another story 18:48:33 sure 18:51:52 Quartus: i'm waiting for werty to add his two cents to the 'forth frustrations' discussion. 18:52:04 Patience. 18:52:40 mr. werty probably is too busy coding 18:56:28 How can he be? Whole applications in two days. 18:57:15 --- join: edrx (n=Eduardo@201.5.11.73) joined #forth 18:58:26 maybe today is one of those days ;-) 19:00:13 hey it _could_ be, okay? if mr. werty is allowed to fantasise, why can't i ;-) 19:00:20 Go for the gold. 19:01:00 :-) 19:06:31 --- join: brx (n=brx@p57A7AAB0.dip0.t-ipconnect.de) joined #forth 19:09:59 --- join: arke (n=f2@bespin.org) joined #forth 19:13:26 --- quit: brx` (Read error: 60 (Operation timed out)) 19:39:09 did someone mirror libffg2? 19:39:23 what's that? 19:40:50 Quartus: http://www.complang.tuwien.ac.at/forth/gforth/Contributions.html -- interface to g2 library from Forth 19:41:00 the site where it was appears to be gone 19:41:25 I suppose I can google to find out what the g2 library is 19:41:35 it's a graphics library 20:09:32 --- join: alexshendi (n=alexshen@dslb-088-065-227-094.pools.arcor-ip.net) joined #forth 20:12:54 --- quit: vatic ("*poof*") 20:14:44 --- quit: alexshendi ("Leaving") 20:21:51 --- quit: edrx (Read error: 145 (Connection timed out)) 20:23:31 --- part: azekeprofit left #forth 20:33:06 --- join: brx` (n=brx@p57a78f8c.dip0.t-ipconnect.de) joined #forth 20:41:52 --- quit: brx (Read error: 110 (Connection timed out)) 20:42:17 --- quit: yumehito_ (zelazny.freenode.net irc.freenode.net) 20:42:17 --- quit: slava (zelazny.freenode.net irc.freenode.net) 20:42:17 --- quit: arke (zelazny.freenode.net irc.freenode.net) 20:42:29 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 20:42:29 --- join: arke (n=f2@bespin.org) joined #forth 20:42:29 --- join: yumehito_ (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 20:42:29 --- mode: irc.freenode.net set +o slava 20:48:16 --- join: slava_ (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 20:56:55 --- quit: slava (Read error: 110 (Connection timed out)) 21:26:46 --- join: brx (n=brx@p57a783b0.dip0.t-ipconnect.de) joined #forth 21:33:50 --- quit: brx` (Read error: 60 (Operation timed out)) 21:56:15 --- join: nighty_ (n=nighty@sushi.rural-networks.com) joined #forth 22:00:32 --- quit: nighty (Read error: 145 (Connection timed out)) 23:22:44 --- nick: slava_ -> slava 23:22:44 --- mode: ChanServ set +o slava 23:59:59 --- log: ended forth/07.04.02