LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-24-2019, 07:08 AM   #31
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled

I do not comprehend anything concerning RDoc, for the time. This part of the Rubyverse did never interest me.

The current issue must be discussed in a Ruby-centric community. As there is still a usenet-group I will try to get more information there.

Edit: Did it. Will report back. Over.

Last edited by Michael Uplawski; 05-24-2019 at 07:17 AM.
 
Old 05-24-2019, 09:42 AM   #32
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
This is just an idea a friend and I came up with a long time ago. Basically out of boredom, I wrote a very simple car game. It was a not very good one, and would look terrible today. Back then, the computer memory was very limited. So, instead of constructing roads, with curves and traffic, everything was completely random. Should the road go left or right, and how much, and other cars appear - all random.

The pseudo random generators have a seed function. If you give it a number, the next random numbers will always be the same. That meant, we got 2^32 different tracks, just by passing a different seed number to the random generator.

And by trying different numbers, we saw some was easy and some was difficult. After a while, we just made 3 lists of numbers - easy, medium and hard.

I'm not sure if you can use the same idea here. Instead of keeping a list of funny/boring proverbs, keep a list of seed numbers for the random generator.
 
Old 05-24-2019, 10:54 AM   #33
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by Guttorm View Post
I'm not sure if you can use the same idea here. Instead of keeping a list of funny/boring proverbs, keep a list of seed numbers for the random generator.
... in an attempt to avoid boring proverbs being generated way too often. I will make some experiments in that direction. Thanks for the idea.

Between chasing tree fungi, mixing mortar and weeding, the option parser is becoming functional and internationalization has been added.
 
Old 06-22-2019, 01:03 AM   #34
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by Michael Uplawski View Post
Edit: Did it. Will report back. Over.
Ignore. The group is dead.
 
Old 10-16-2019, 12:50 PM   #35
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Here is an updated version of the gem „Sprichwoerter”:
https://rubygems.org/gems/Sprichwoerter
Alternatively:
Code:
~$ gem install Sprichwoerter
I had not been able to communicate to rubygems.org for a while, but something has changed between June and now, and my account appears to work.

This release uses an option-parser for the first time.

Adding original proverbs is now done interactively, a user is prompted for each of the details, i.e. language, singular or plural, beginning and ending of the proverb. You can thus add English proverbs to the list of English proverbs and German proverbs to the list of German proverbs irrespective of the way that you call the program (either “proverbs” or „Sprichwoerter”). Just use the parameter --add (or --neu in German locale).

Apart from that, the randomness of generated “proverbs” is improved. It should be very rare now that the same phrase is generated twice in a row.

Here is the usage-message:
Code:
user@machine:~$ export LANG=en_EN.UTF-8
user@machine:~$ proverbs -h
Usage:	/usr/local/bin/proverbs <options>

Specific options:
    -a, --add                        Add real proverb to the base
    -f, --favorites                  Show favorites
    -q, --qualify                    Qualify proverbs
    -c, --color=COLOR                Use color in program-output (one of red, green, yellow, purple, cyan, blue, white, black)

Common options:
    -h, --help                       Show this message
    -v, --version                    Show version and program information
The documentation is updated and included in the Gem.

I have not yet changed the program-behavior upon “qualifying” a proverb, nor will the respective proverbs be handled in any special way, apart from their being added to the list of “favorites”.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to REALLY improve linux performance? tradingbr Linux - General 7 05-01-2004 11:38 AM
improve scsi hd performance? bdp Linux - Hardware 2 01-12-2004 11:37 PM
How to improve performance on laptop Toshiba. gmichel Linux - Newbie 4 12-09-2003 09:14 AM
ways to improve performance flipboi Linux - Newbie 6 10-25-2003 11:22 AM
how can i improve the display performance of my system? im using RH8... kublador Linux - Software 4 07-27-2003 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration