Re: [stack] Abstracting away the complexity is the goal.
"William Tanksley, Jr" <[email protected]> Sat, 20 Feb 2010 13:35:39 -0800
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
chris glur <[email protected]> wrote: > I refute the contention that human readability is NOT the most important > attribute of programs. I assert that saying something neither makes it so, nor constitutes a refutation. But this is beside the point. > Here's a real-life task, for which I'd like to see the cat-like skeleton code:- Sure, why not; go ahead. Factor is a good language for this, I'd think; unless Joy's gained a lot more of a web library than I'd thought, you'll be happier with Factor. > With Usenet, individual articles could be indexed. With blogs the whole > article and comment set is an atomic unit. > Usenet was designed by engineers via RFCs. Blogs evolved chaotically > like natural language. Blogs and Usenet share much in common -- Usenet evolved chaotically (in the hands of engineers), just like blogs. To index individual articles in blogs, we use two basic types of technology: an article feed, and a backlink registry.Article feeds use RSS and Atom XML formats (about equally commonly, many sites provide both), and they're used to let you know when the blog you're watching has a new article (or comment) posted to it. Backlink registries use TrackBack or Google Backlink, and they let you know when someone other than the author of a post has written a blogpost that links to the post. > So, for the professor's blog that gives 4 new topics per week, where I've > asked a question ca. 2 weeks ago, to find possbible answer/s; since blogs > have removed the reader's capability of originating a topic, I had to slip my > question, into the comment-set of one of the blog-owner's topics. Does this prof's blog support comment feeds? If so, you don't have to do any programming -- I'd just log into Google Reader (reader.google.com), press 'a' to add a subscription, and paste in the URL of the comment page you posted on. With any luck, Google Reader will give you a list of all comments; you can mark the uninteresting ones read, star the interesting ones, and then when a new comment is made you'll see it. > How will cat-like help me find possible answers to my query? Start first by knowing your "enemy" -- the blog page that holds the info you want. What standards does it support? Obviously it's written in HTML, of course, but does it have an RSS feed? Is there a comments RSS feed? Does it perhaps support email updates (not the greatest way, but possible)? Better yet, rather than "hijacking" a blog post to leave an unrelated comment, find a forum where people discuss similar things, and then without insulting them, ask your question. > First I'm trying to find my query that a scribbled in a open file on my PC. > Here's how algol-like does it: > FOR AllFiles in dir-tree X FOR AllFiles < 15DaysOld > FOR Allfiles containing GuessWord1 > FOR Allfiles containing GuessWord2 > FOR Allfiles containing GuessWord3 Why is your pseudocode so wrong? That's horrific. > I speculate that if I can guess 3 uncommon/key words that I'd put in my post, > it might reduce the search to less then 10 files -- on my PC. > With some difficulty, via usenet queries, I previously found [and often use it] > that the first 3 of the 5 steps listed above, can be done easily by:-- > find $dir -ctime -$daysOld -exec grep -l $String {} \; > What I like about this is that I can percieve it as BLOB with 3-args: > 1. the dir-tree, 2. how many days old, 3. the Search-word. > So now to further reduce the files needing to be to manually searched, I > need to 'pipe' the results through 2 further stages of `BLAB GuessWordn`. You can use the same 'grep' command. > I'm dreaming of a cat-like/dataflow language which looks like:- > DirTree DaysOld String `DASfind` | GuessWord2 `ListFilesWithString` > | GuessWord3 `ListFilesWithString` Yeah, Factor has all that. Read the manual. If you have questions, the Factor mailing list is excellent. Try not to insult them, though. > What appeals to me about this 'programming style' is that you can just put > the utilities in a library, and grab them whenever you need them. Wow, it's just like programming. > AFAIK Haskell and others have the mapcar-concept of: > DoTask (TheTask, ListOfFiles) -> ListOfFiles > Does joy have a mapcar-type as 'native' ? > Where are joy's reserved words listed ? I think Joy calls it 'map'. It's not a reserved word; it's a function, and it's listed in Manfred's Joy page, in the "Atomic Programs of Joy" paper (I admit that I'm not sure why he called it that), in the "Operators for Aggregate Types" section. If you have more questions, this is probably the best place to ask, although not everyone here knows anything about Joy itself; this is a more general-purpose group. Given your entire task, though, you may want a language with a more developed library, like Factor. Its documentation is available from its home page, or from its interactive graphical console. > == Chris Glur. -Wm