Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #52779
| From | "Robert L." <No_spamming@noWhere_7073.org> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: I'm so conflicted... |
| Date | 2016-11-20 23:50 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <o0tcsk$1mvn$1@gioia.aioe.org> (permalink) |
| References | (6 earlier) <o08pjv$dqj$2@dont-email.me> <27cd21f3-bf17-4f81-9cd2-d78d33343a5d@googlegroups.com> <o0bdmp$gom$1@dont-email.me> <812eee8e-1b28-4353-94b4-44b7ce5379c3@googlegroups.com> <e8d5e097-bb3c-4750-af5e-4f35ab81c265@googlegroups.com> |
On 11/15/2016, Mark Wills wrote:
> How many languages do I have to know, for goodness sakes?!!
goodness' sake
> In Forth your specifying
you're specifying
> We're truly spoiled with what we have in Forth. What a shame that so
> many millions of programmers have no idea. They don't know what they're
> missing.
Show them what they are missing. Do the following task
in Forth.
One text file contains Poe's "Narrative of Arthur Gordon Pym";
the other contains Carroll's "Alice in Wonderland".
Extract the words from each file, rejecting words that have
fewer than 6 characters or that contain upper-case letters,
and keeping only words that occur exactly once.
Print the words that are found in both lists
in alphabetical order and in 4 columns.
Ruby:
def get_singleton_words file
IO.read(file).scan(/\w+/).
reject{|w| w.size < 6 or w != w.downcase}.
group_by{|w| w}.select{|w,ary| ary.one?}.
keys
end
pym = get_singleton_words "Pym.txt"
alice = get_singleton_words "Alice.txt"
words = (pym & alice).sort
per_line = 4; per_column = words.size.fdiv(per_line).ceil
short = per_line * per_column - words.size
(words + [""] * short).each_slice(per_column).to_a.transpose.
each{|ary| puts ary.map{|s| s.ljust 18}.join}
accounting failure louder rustling
accustomed faintly managing salmon
adding family modern scratching
affair favourite oblong shared
altered feather oldest shilling
arguments feathers onions slippery
askance fireplace oyster speaker
awfully flavour passionate splash
begged flinging patted splashed
blades folding picture spreading
branch gather pleasing stopping
cheeks gazing pretty strings
childhood gloomily processions subdued
complained growling pronounced subjects
condemn handsome proposal submitted
conger handwriting prosecute swallowing
consider helped protection theirs
consultation humble puffed tricks
contempt imitated pulling unwillingly
content impatient purple upright
contradicted inclined rabbits variations
crouched indignant recognised vegetable
cunning irritated refused velvet
disobey justice remembering wondered
dropping knuckles respectable wooden
exclamation lazily respectful
execute letters ridges
expressing locked roared
Of course, this isn't fair to those who use Forth. They don't
do much programming at all; mostly they just twiddle a few
bits.
--
Europe is not going to be the monolithic societies that they once were in the
last century.... They are now going into a multicultural mode. Jews will be
resented because of our leading role. --- Barbara Spectre
(https://www.youtube.com/watch?v=K0hD7IffTJs)
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-11 03:47 -0800
I'm so conflicted... foxaudioresearch@gmail.com - 2016-11-11 04:37 -0800
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-11 05:29 -0800
Re: I'm so conflicted... JUERGEN <epldfpga@aol.com> - 2016-11-11 05:33 -0800
Re: I'm so conflicted... JUERGEN <epldfpga@aol.com> - 2016-11-11 05:35 -0800
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-11 20:02 -0500
Re: I'm so conflicted... jim <anon@example.com> - 2016-11-12 10:59 +0000
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-12 11:21 -0500
Re: I'm so conflicted... jim <anon@example.com> - 2016-11-12 21:30 +0000
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-12 23:18 -0500
Re: I'm so conflicted... jim <anon@example.com> - 2016-11-13 12:28 +0000
Re: I'm so conflicted... Paul Rubin <no.email@nospam.invalid> - 2016-11-13 10:50 -0800
Re: I'm so conflicted... jim <anon@example.com> - 2016-11-13 19:14 +0000
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-13 23:11 -0500
Re: I'm so conflicted... jim <anon@example.com> - 2016-11-14 09:44 +0000
Re: I'm so conflicted... "Robert L." <No_spamming@noWhere_7073.org> - 2016-11-20 01:51 +0000
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-12 10:32 -0800
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-12 13:52 -0500
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-12 11:55 -0800
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-12 23:19 -0500
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-13 18:16 -0800
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-13 23:14 -0500
Re: I'm so conflicted... jim <anon@example.com> - 2016-11-14 09:51 +0000
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-14 04:04 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-15 03:11 -0800
Re: I'm so conflicted... "Robert L." <No_spamming@noWhere_7073.org> - 2016-11-20 23:50 +0000
Re: I'm so conflicted... albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-11-12 20:11 +0100
Re: I'm so conflicted... "HAA" <someone@microsoft.com> - 2016-11-12 00:34 +1100
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-11 16:19 -0800
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-12 10:34 -0800
Re: I'm so conflicted... november.nihal@gmail.com - 2016-11-12 12:35 -0800
Re: I'm so conflicted... "Elizabeth D. Rather" <erather@forth.com> - 2016-11-12 11:46 -1000
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-12 15:23 -0800
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-12 18:13 -0800
Re: I'm so conflicted... rickman <gnuarm@gmail.com> - 2016-11-12 23:23 -0500
Re: I'm so conflicted... "Elizabeth D. Rather" <erather@forth.com> - 2016-11-12 20:55 -1000
Re: I'm so conflicted... "Elizabeth D. Rather" <erather@forth.com> - 2016-11-12 20:46 -1000
Re: I'm so conflicted... Paul Rubin <no.email@nospam.invalid> - 2016-11-13 01:06 -0800
Re: I'm so conflicted... Mikael Nordman <oh2aun@gmail.com> - 2016-11-13 12:59 -0800
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-13 18:27 -0800
Re: I'm so conflicted... Mikael Nordman <oh2aun@gmail.com> - 2016-11-13 20:34 -0800
Re: I'm so conflicted... Howerd <howerdo@yahoo.co.uk> - 2016-11-13 17:56 -0800
Re: I'm so conflicted... "HAA" <someone@microsoft.com> - 2016-11-14 14:53 +1100
Re: I'm so conflicted... "Elizabeth D. Rather" <erather@forth.com> - 2016-11-13 22:04 -1000
Re: I'm so conflicted... albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-11-13 10:51 +0100
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-14 03:10 -0800
Re: I'm so conflicted... "HAA" <someone@microsoft.com> - 2016-11-15 01:03 +1100
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-14 07:31 -0800
Re: I'm so conflicted... foxaudioresearch@gmail.com - 2016-11-14 13:29 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-15 03:02 -0800
Re: I'm so conflicted... albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-11-15 13:39 +0100
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-15 18:22 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-16 01:32 -0800
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-16 13:00 -0800
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-16 13:04 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-16 13:42 -0800
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-17 12:28 -0800
Re: I'm so conflicted... Raimond Dragomir <raimond.dragomir@gmail.com> - 2016-11-17 22:14 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-19 15:01 -0800
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-19 16:55 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-20 10:36 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-20 10:43 -0800
Re: I'm so conflicted... Paul Rubin <no.email@nospam.invalid> - 2016-11-20 11:15 -0800
Re: I'm so conflicted... Mark Wills <markwills1970@gmail.com> - 2016-11-20 13:57 -0800
Re: I'm so conflicted... Walter Banks <walter@bytecraft.com> - 2016-11-28 13:26 -0500
Re: I'm so conflicted... Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-11-16 10:25 +0000
Re: I'm so conflicted... hughaguilar96@gmail.com - 2016-11-16 12:33 -0800
csiph-web