Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Julian Fondren Newsgroups: comp.lang.forth Subject: Re: The Lisp Curse Date: Sat, 30 Jul 2011 18:22:42 -0500 Organization: A noiseless patient Spider Lines: 168 Message-ID: <86ipqj4am5.fsf@gmail.com> References: <2011062716133234957-chrishinsley@gmailcom> <96rn58Fv50U1@mid.individual.net> <201106271655172796-chrishinsley@gmailcom> <9c50a06d-fd91-46bb-89cc-8ca83d167259@j15g2000yqf.googlegroups.com> <96fb04bf-96ef-4d49-84a1-fa2e43de56d9@s33g2000prg.googlegroups.com> <38fcdb0a-58b0-427d-989d-936c233589b4@em7g2000vbb.googlegroups.com> <1214302d-c778-4fbc-9485-00d297a1e4ee@t8g2000prm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="cO8zBIpB9LiP7q+vFZIJrA"; logging-data="24927"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++HMsfsIIejhmOIr4fhvuel865omW9nnU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:VlpBbQA0c2m9qiZLh2AY11eghOM= sha1:rdK6lHReYVihY4Uwd0zeoHuCwF4= Xref: x330-a1.tempe.blueboxinc.net comp.lang.forth:4506 Hugh Aguilar writes: > Well, that proves it! FFL is better than my novice package! lol > I've examined FFL, and I know that it isn't any good --- and no > application based on FFL is going to be any good either. Have you even > looked at FFL? Is this steaming heap of ugly Forth code really > something that you want to associate yourself with? : jis-parse-value ( jis -- i*x n = Parse a value ) >r r@ jis-skip-spaces s" true" r@ tis-cmatch-string IF \ Check for true value true jis.boolean ELSE s" false" r@ tis-cmatch-string IF \ Check for false value false jis.boolean ELSE s" null" r@ tis-cmatch-string IF \ Check for null value jis.null ELSE [char] " r@ tis-cmatch-char IF \ Check for string value r@ jis-parse-string IF jis.string ELSE jis.error THEN ELSE [char] { r@ tis-cmatch-char IF \ } Check for start of object jis.parse-first-pair r@ jis-push-state jis.start-object ELSE [char] [ r@ tis-cmatch-char IF \ ] Check for start of array jis.parse-first-value r@ jis-push-state jis.start-array ELSE r@ jis-parse-number \ Check for float, double or number THEN THEN THEN THEN THEN THEN rdrop ; Yeah, that's gross. FFL uses naming conventions instead of wordlists or smudging to manage its interface, and along with this decision has apparently come a reluctance to add lots of names. However, 1. It (probably) works. 2. It's well-documented. 3. It exists; it's available; it's pretty clear. 4. It's in an SVN repository. If you really can't take JIS-PARSE-VALUE anymore, why not fix it, send the patch upstream, and continue to not roll your own JSON library? The only stunner is that it's all GPL'd. Not even LGPL'd. Not MIT or BSD. Not 'Artistic'; not GPL with an escape clause. It's pure 100% infectious GPL. But for that I'd have no problem using FFL. I wouldn't use your novice package though, because that's a "steaming heap of ugly Forth code" without any of FFL's excuses for its ugliness. FFL achieves ugliness in creating something that's actually useful, and often (as in this case) somewhat inherently ugly anyway. While I wonder at the three-letter-names and the privacy-by-convention and the words that could certainly be broken up, none of this is in the same category as your "every single parsing word needs a non-parsing factor _just in case_", or the totally pointless words that you included in obvious fits of useless thoroughness macro: roll-third ( a b c -- a b c a ) \ same as ROT 2 roll ; macro: roll-fourth ( a b c d -- a b c d a ) 3 roll ; macro: roll-fifth ( a b c d e -- a b c d e a ) 4 roll ; macro: roll-sixth ( a b c d e f -- a b c d e f a ) 5 roll ; (Note that all of the stack comments are incorrect.) Or the utterly bizarre parameters that you just fight constantly : :name ( str wid -- ) ... ; $ egrep "get-current :2?name" *.4th|wc -l 53 $ egrep ":2?name" *.4th|egrep -v get-current novice.4th:: :name ( str wid -- ) novice.4th:: :2name ( prefix-str suffix-str wid -- ) novice.4th: :name ; novice.4th: :name ; \ :3name novice.4th:: :name! ( str wid -- ) novice.4th: c" !" swap :2name ; novice.4th:: :name@ ( str wid -- ) novice.4th: c" @" swap :2name ; $ # output edited for usenet and clarity; no lines omitted Or this: : ( adr cnt fam -- file-id ) open-file abort" *** failed to open ***" ; : ( adr cnt fam -- file-id ) create-file abort" *** failed to open ***" ; : ( file-id -- ) close-file abort" *** failed to close ***" ; Or this: char & comment \ Win32Forth doesn't allow more than 12 locals : <5array> { dim1 dim2 dim3 dim4 dim5 siz1 name | adr siz siz2 siz3 siz4 siz5 -- } dim1 siz1 * to siz2 dim2 siz2 * to siz3 dim3 siz3 * to siz4 dim4 siz4 * to siz5 dim5 siz5 * to siz align here to adr siz allot name get-current :name \ runtime: x1 x2 x3 x4 x5 -- element-adr dim5 siz5 lit*, swap, \ runtime: -- x1 x2 x3 x5*s5 x4 dim4 siz4 lit*, +, swap, \ runtime: -- x1 x2 x5*s5+x4*s4 x3 dim3 siz3 lit*, +, swap, \ runtime: -- x1 x5*s5+x4*s4+x3*s3 x2 dim2 siz2 lit*, +, swap, \ runtime: -- x5*s5+x4*s4+x3*s3+x2*s2 x1 dim1 siz1 lit*, +, adr lit+, ;, \ runtime: -- x5*s5+x4*s4+x3*s3+x2*s2+x1*s1 c" ^" name get-current :2name \ runtime: -- adr adr lit, ;, c" lim-" name get-current :2name \ runtime: -- adr-past adr siz + lit, ;, name c" -zero" get-current :2name \ runtime: -- adr lit, siz lit, s" erase ; " evaluate name c" -size" get-current :2name \ runtime: -- siz1 siz1 lit, ;, name c" -dim" get-current :2name \ runtime: -- dim1 dim2 dim3 dim4 dim5 dim1 lit, dim2 lit, dim3 lit, dim4 lit, dim5 lit, ;, ; ... : 1array ( dim1 size -- ) bl word hstr dup >r <1array> r> dealloc ; : 2array ( dim1 dim2 size -- ) bl word hstr dup >r <2array> r> dealloc ; : 3array ( dim1 dim2 dim3 size -- ) bl word hstr dup >r <3array> r> dealloc ; : 4array ( dim1 dim2 dim3 dim4 size -- ) bl word hstr dup >r <4array> r> dealloc ; char & comment : 5array ( dim1 dim2 dim3 dim4 dim5 size -- ) bl word hstr dup >r <5array> r> dealloc ; : 6array ( dim1 dim2 dim3 dim4 dim5 dim6 size -- ) bl word hstr dup >r <6array> r> dealloc ; & > What I'm saying is: > get a life --- find something to do with your time other than trying > to convince me that my novice package sucks Your own opening remarks betray that you're actually perfectly OK with very nasty comments about earnestly provided libraries of code. I know it's largely unrelated, but maybe reading this will help: http://mises.org/journals/jls/12_1/12_1_3.pdf