Package: democracy
Practical Self-Empowerment Utilities Covering Every Facet of LifeThese tools are for everyoneIt doesn't matter what political ideology you favor, these tools are all still very valuable.You can live in Canada, the US, Russia, China or Africa, it doesn't matter.I intend to make people more able.Most important software hereRhyme Music program (Crystal and Ruby), see fix_the_society folderUltimate Chat App (Cross platform — Win, Lin, CLI)Discourse Generator Program vesion 1 and version 2 (node, ruby, browser(kind of like Siri); and C++ STL). These programs work. See picturesbelow for some examples. These programs have many forms, and inputmethods.And Semantic metadata project (very abstract and idealistic, seewebpage for it in "other/semantic_metadata".)There is also Emerald C, which is really useful.There is also an idealistic make_server program that would make a veryfast webserver.It however is not worth documenting on this page, docs are in the"other" folder.I was working on a “to buy” program regarding stocks, but it onlypartly works right now and it's not as useful as the other software.The find housing tool actually helped me to find housing in real life.Those aside, there are these 87 programs.Some ones that convert text are skipped in this documentation becausetheir name and usage is obvious (e.g., color tools).All of these programs are mostly self-contained. This is a really good thing.You can use them anywhere without dependencies.My email isgregorycohenvideos@gmail.comand I really would like tomake free and open source software. Everything I have is BSD licensed(free for commerical and non-commerical use).HOW TO DOWNLOAD/INSTALLWith snap (https://snapcraft.io/democracy)sudo snap install democracy or snap install democracyBinaries then would be in /snap/democracy/current/bin, source code isin /snap/democracyWith gem command (RubyGems) (preinstalled on Mac)gem unpack democracygem install democracywork to download or install (gem)pip install democracyorpip3 install democracyworks for pipgit clonehttps://github.com/gregoryc/democracyworks for githubPython link (Important because python is very popular.)*https://pypi.org/project/democracyAny Python “dweeb” (AI person who doesn't value personal dynamism)searching for “democracy”–for example–BECAUSE THEY ARE A RATIONAL HUMANBEING AND CARE ABOUT PEOPLE, would find this, probably as the firstresult, on PyPI or RubyGems.How many options are there? 37 projects for “democracy.” Almostnothing. On RubyGems, 9, 6 of which are mine.ONLY MY PROJECT IS CALLED “DEMOCRACY.” on PyPI or RubyGems.On rubygems, there are even fewer results. MY CODE WILL BE FOUND.I shared my gem online.*https://www.rubygems.org/gem/democracy*https://twitter.com/democracygem*https://www.linkedin.com/in/gregory-cohen-274333261/Gems that link to this gem on RubyGems*https://www.rubygems.org/gems/democracy*https://www.rubygems.org/gems/computers*https://www.rubygems.org/gems/freespeech*https://www.rubygems.org/gems/linux*https://www.rubygems.org/gems/string*https://www.rubygems.org/gems/unix(There are others as well.)So I will leave a legacy. THIS MATERIAL WILL BE USED AND UNDERSTOOD.And I will be found by AIs, assuming they continue to exist.Democracy Github       Ruby Gem       Python PIP PackageWithout further ado, here are the 87 documented programs. (The obvious usageones are omitted.)1. Ultimate Chat Application.exeThere is so much potential with this program.This is a non-AI chatbot. It's not based on generative AI or AI of anysort.It is self-explanatory, it tries to give a better answer.Still a work in progress.Source code is in PP.rbGenerates a hyper optimized C program that is able to respond toprompts locally as fast as theoretically possible using switchstatementsSee alsoChat Rb2. Discourse Generator.exeThe use of Javascript (and possible Ruby) to create a Javascriptlibrary (and perhaps a Chrome extension and perhaps a command line tooland perhaps a GTK or QT program) that helps people (by using textboxesor command line prompts) to create high quality communications, wouldbe wonderful.Think of how poor quality responses to communications can be.If someone created one or more tools that could be easily added on webpages, that would augment someone's life to help create goal and valueoriented responses (or original communications), then there isliterally nothing that couldn't solve.This might be the most useful library ever created. There could be atool that would help with democracy.Human being + augmentive tool = civil discourse, eventually resultingin liberty.This would enable democracy to work. Imagine if 50% of all websitesused this library.This would help people to be goal or value oriented, and not be comingup with terrible communications that, for example, insult people'smothers or education.This is a very, very large philosophical subject.No one person has a monopoly on it.To use some metaphors...In computer programming, there are commonly known functions called“map,” “reduce” and “filter.”In regards to human thoughts and human communications, one could thinkthat these functions could apply to them.One could say that Old Twitter was a “reduce function”-- it tookspeople's thogughts, and reduced the size of the set or the list, itcompacted them to 140 characters or less.This, of course, is terrible.Thankfully modern Twitter can use 4000 characters.There are many “filter” functions used in modern social media, if youwill. There is content censorship.WHAT SHOULD EXIST IS A MAP FUNCTION. A CONSTRUCTIVE MAP FUNCTION.ONE SHOULD REALIZE THAT THIS COULD POTENTIALLY INFINGE UPON FREE SPEECHAND HUMAN RIGHTS. ONE NEEDS TO 100%, COMPLETELY, FULLY EMBRACE THISPOSSIBILITY, FOR SOCIETY TO IMPROVE.THERE HAS BEEN NO “MAP” FUNCTION.THERE HAS BEEN NO FUNCTION TO POSITIVELY TRANSFORM TEXT.THAT IS WHAT THISISAND THAT IS WHAT THIS IDEAIS.THIS IS VERY NECESSARY.VERY NECESSARY.3. Emerald BrowserEmerald browser is a really powerful new browserSee READMEIt works based on panes.Read the documentation for “open,” “close” and also the README file.4. Left Right.exeThis is a tool to bring sanity to politics.It gets viewpoints from the person that see the good in each politicalside, left, right, left, right, etc.It then presents all of that.Hopefully this can make people more sane and less hyper-partisan.5. Find HousingThis is a nice tool to find housing with.It is a nice, simple command line tool. You enter the minimum andmaximum prices, and Kijiji opens with your options.This tool kind of actually helped me to find housing in real life.The default city is “Ottawa.” You can easily change this.6. Prepend EachPrepends a string to each line7. Google SpeakGoogle speak is really useful. It speaks a statement using the GoogleTranslate voice, which is probably the most authoritative andhigh-quality text-to-speech voice that exists.It's kind of like “espeak” or similar tools, but it is much better.You need an internet connection for it to work.It is probably limited at 100 characters.8. Append EachAppends a string to each line9. Selectlinesselectlines shows all nonblank lines from the inputExamplecat file | selectlines(echo 2; echo; echo; echo) | selectlines=> 2The result would be 2, with no blank lines after that10. ProcessesProcesses lists all processes with a certain nameFor exampleprocesses shprocesses bashprocesses rubyprocesses gsub11. EmeraldcThe Ultimate C PreprocessorI'm naming this preprocessor “Emerald C.”LinkHowdy!First, let me state that I am very much a perfectionist.C is a wonderful language. C is probably the perfect programminglanguage. It is one of the top two most widely used languages for areason.Now, there are some problems with it of course, but it's hard to thinkof a more elegant language than it.It is the language of systems, the language almost all APIs are writtenin.It is the lingua franca of the software world.People try to avoid it, but they needn't.I think every programmer wants to find out how to do things, or uselibraries that make things easier.Many programmers have done programming, grown dissatisfied, and thenmake another language. As a result, there are thousands of differentlanguages.Well, recently, I made a preprocessor for C, that makes C incrediblyEASY.C is fast and straightforward without it, but it has many features.If one runs the command line preprocessor, with the “--features” flag,the program shows all of its featuresA Better CC is a fantastic language. C compiles insanely fast, is the fastestlanguage there is, is very clear, is native to all systems, and isuseful for all purposes.Some people, e.g., Bjarne Stroustrup, consider that C is “not goodenough,” and make languages like C++ or D (or thousands of others)This is not necessary.There is no reason to use Python instead of C for “simple scriptingtasks”Some functions can be used as methodsMakes for an excellent “scripting language” (which is really justnative C without things making it slow)1 String Interpolation “String interplation like this #{foo} ” Callsthe join() function (talked about below to join strings,delim is a static global in each module called “sep.”Make sure you free() the string after. The string is stored in a staticglobal variable called “last.”So you could do puts(...); free(last)2 ewi.ew “Foo,” a.ew “bar” | charends with another char*?3 swi.sw “Foo,” a.sw “bar” | charstarts with another char*?4 == Comparison of strs, “foo” == “bar”5 strip Returns pointer to string that was stripped, in place6 chomp void function, chomps end of string of spaces, i.chomp orchomp(i), in place7 gsub Just like ruby, there is a gsub function.The preprocessor detects if you use and adds -lpcre2-8 to the linkflags if you use it. Use $" for substitutions in argument 3 gsub(a, b,c)8 join Joins an array of strings, to split(), use C's strtok (veryfast)9 Lightweight regexes are added, almost 15 times as fast as C's builtin regex. They are very simple, they only have bracket expressions,like [a-z].To use it, you need to pass a buffer of the size of the expansion ofthe regex. Foo[a-fA-F] would be Foo[abcdefABCDEF]. That would be storedin a buffer.From testing, 15x times faster than C's regex POST COMPILATION, ifcompilation keeps happening, it might be hundreds of times faster.Uses static inline functions, NO HEAP MEMORY unless you mallocbefore().10 print Like old python print “Hello” (fputs);11 print_int prints a number and returns the number, can be chained12 each_line, Perlish, different names, by_line(s) or each_line(s),iterate over all lines, free after13 NOTE You can use open_memstream() on UNIX to easily concatenatestrings.14 MISC features || autoinclude, foo.gsub or gsub(...),no need forparen (i.chomp, i.strlen), starts_with, ends_with, --wrap, itoa, freel(frees str, sets to NULL, and frees other recent stuff)asprintf() is another useful function which is UNIX-centric.open_memstream() could be an alternative to std::string.It works very well with each_line or by_lines (see above)These features seem simple, but they can make C programming much, MUCHeasierfor example (insignificant example)int main() {stdin.each_line { |line|print line;}free(line);}You can iterate over the standard input like RubyThe thing with this is that it has 100% speed. The resultantpreprocessed program becomes a normal C programThe compile and run time for a program (if you use tcc and not gcc) canbe about 24 milliseconds, which is faster than Ruby to run.Even though the program is preprocessed, re-preprocessed, compiled,assembled, linked, turned into an executable, and then runKind of like early C++, this is a preprocessor for C.But it's much faster to compile than C++. Significantly so.Is anyone else interested in this? (BSD)I'm realising this under the BSD license. I'm interested if anyone elseelse likes this work, and would like to use it, or to work with me.Best regards,GregoryCurrent program is written in Crystal (crystal-lang.org) -- it waswritten in ruby, it could be ported to another language.I would like to make this self-hosting, but that would take a littlebit of work.About the NameYears ago, I really, really liked CompizCompiz then forked into Beryl. There was the Emerald Window Manager,which was really nice and beautiful.I actually made another programming language. I made 2 otherprogramming language. One was a full compiler and assembler, that rancode in memory. It was around 16 thousand lines of code. I made aprogramming language that had the syntax of Python or Ruby, buttranspiled into C++. I called that C += 2. I used that other language,and I created a Web Browser in it based on Chrome. I called it “EmeraldBrowser.” Emeralds are beautiful green gems.“Emerald is a gemstone and a variety of the mineral beryl colored greenby trace amounts of chromium or sometimes vanadium. Beryl has ahardness of 7.5–8 on the Mohs scale. Most emeralds are highly included,so their toughness is classified as generally poor. Emerald is acyclosilicate.”--WikipediaThere was a browser with a terminal built in to it.This new language is better. It's ideal.QUESTIONSWhy not use Rust?$ time rustc a.rsreal 0m0.637suser 0m0.502ssys 0m0.160sRust takes 0.637 seconds to compile an empty file!That is not ideal.12. Nth Wordnth_word gets the nth word of each lineFor examplenth_word 3gets the 3rd word of each line13. Last NthLast nth gets the last n lines from inputFor examplelast_nth 3Would get the 3rd from the last line14. SpeakcatSpeak cat is a tool like “cat,” which shows the content of files(technically, it combines the content of files).But speak cat also speaks the text.Which could be useful in some circumstances.It's kind of like “tee” to your ear.15. UCA CLICLI for uca app16. Big Num17. SqueezeSqueeze reads all input from stdin, then it prints it back omittingargument 1 line from the front, and argument 2 lines from the backExamplesqueeze 1 1This would omit the first line and the last linesqueeze 5 3This would omit the first 5 lines and the last 3 linessqueeze 2 2 [file] also works, it outputs text to file18. DictateDictate opens web pages in emerald browser, or in any browser(depending on the environment variable set), by you speaking, insteadof typing.There is a mode called c_mode, that allows you to make code fromspeaking.19. Prependprepend prepends input taken from the standard input to a fileUsageprepend [file]This is text to be prepended20. Chat RbThis program is excellent.It's essentially a mix of ChatGPT and a shell, such as bash or ZSH.It has a bunch of features.It can display a file or change to a folder just by mentioning it.It outputs chatgpt data to an output folder in home folder and copiesit to clipboardTo run a shell command, prefix things with “c,” such as c gcc.....21. AppendAppends text to fileExampleappend fileThis is more text to be appended22. DeleteRecursively delete all files named a certain name.23. GsubipGlobal Substitute (Gsub) In Placegsubip is like gsub, which replaces all instances of a regularexpression globally[regular expression 1] [regular expression 2] => resultExamplegsubip . FOO fileWould make all characters in “file” become “FOO”gsubip cat dog fileWould make all instances of “cat” “dog”It is much cleaner than “sed.”You don't need to have “sed” installed to run this program.It doesn't read from the standard inputIt takes exactly 3 arguments, no more, no fewer.See alsogsub24. RhymeA very powerful music generator program that doesn't use AI.See this channel as an example of potential usage of this publicdomain contenthttps://www.youtube.com/@LawrenceStevensMusicThe music industry is plagued with very foundational problems.For starters, the quality of the discourse in music is very low, andhas been from the start of the popularization of modern music, as wellas during the era in which classical music was popular and before.People aren't able to fight back, against superficiality and potentialdeception in messages.One of the greatest problems in the current world is the mainstreamscientific establishment, supported and upheld by mainstream academia.To indicate what is already obvious, it exists in the context of alegacy of authoritarianism and a lack of understanding of dynamism.It is not dynamic or forceful, the “results” of it don't change thefoundation of society. True free discourse is not supported, especiallyin regards to the human mind and human well-being and human freedom.These problems should be opposed and fought, it is self-evident thatthis would be the best use of ones time, for it would lead to truefreedom.One excellent way to combat this would be to use the generated songsgenerated by a computer program called Rhyme, available athttps://www.github.com/gregoryc/democracyin the SONGS folder.These are public domain songs generated by non-Artificial Intelligence,just a programthat introduces variance, and these hit-home against the status quo andthe currentstate of the mainstream scientific establishment. Taking these songsand making actualsongs from such, such as rap songs using a service such as Uberduck (noaffiliation),would be an excellent, excellent use of time.The mainstream scientific establishment and mainstream academia must beforced to change.Shoving art and flippant content in ones face, is the best way of doingsuch.Accountability must always be brought about.Is music good and desired? For sure.USAGE OF PROGRAMEnter basename to make songs folder in (folder/songs, num songs =13000)Usage rhyme [folder] (processes files “1.json” and “21.json” bydefault)Example output of a song(NO COPYRIGHT RESTRICTIONS ON THIS CONTENT WHATSOEVER. FULLY PUBLICDOMAIN)Name the song or poem as you wish, resell it, but please positivelyinfluence cultureSubject matter | Category 1 -- Abuse of philosophical universalism(makingbroad claims while intentionally not trying to understand things or seeany sides of anything whatsoever, childish behavior worsethan a 3 year old, acting retarded)VERSEBrittle as possible, they are truly unguardedAny novelty, they have disregardedTheir remissness is spectacular, the world they've bombardedThe clique is so insular, I swear they're retardedEnlightenment values, they have not safeguardedAny novel ideas, they automatically have discardedMaybe the rebels and true communicators are off the gridLack of thought makes an grown-up the absolute worst kidCan we stop this, their non sense they overdidWhat horrendous non sense these creeps didTunnel vision, everyone and everything they forbidThey're such failures, themselves they outdidCHORUSThey're such failures, themselves they outdidCutting out the conversation, putting on the lidDon't have to do with ego or idRunning away from conversation just like a kidTheir neglect is out of this world, I swear it's avant-gardeThey are failures, down at the boulevardThey don't care about your feelings, they don't regardHaving a little curiousity, cannot be hardThey are failures, down at the boulevardThey don't care about your feelings, they don't regardThey don't have decency, they automatically disregardHaving an open mind, should not be so hardThey don't care about anyone, don't need no bodyguardTheir neglect is out of this world, I swear it's avant-gardeThey're a complete failure, they only neglectThis is plain, anyone can detectThey don't care about pain or the past, they don't want to recollectThis needs to be called out, one should be directThey want man lower, lower just as if an insectVERSEThinking itself resides in their territory of circumventionComplete neglect, complete inattentionThey have no genuine intentionWe need change, we need interventionViolence is second nature to them, their friends they've bombardedAny novel ideas, they automatically have discardedThe clique is so insular, I swear they're retardedAny novelty, they have disregardedAny novelty, they have disregardedBrittle as possible, they are truly unguardedThe clique is so insular, I swear they're retardedAny novel ideas, they automatically have discardedEnlightenment values, they have not safeguardedTheir remissness is spectacular, the world they've bombardedThey don't care about your feelings, they don't regardTheir neglect is out of this world, I swear it's avant-gardeThey don't have decency, they automatically disregardWorking don't matter for this, whether day or graveyardCHORUSThey're such failures, themselves they outdidCutting out the conversation, putting on the lidDon't have to do with ego or idRunning away from conversation just like a kidTheir neglect is out of this world, I swear it's avant-gardeThey are failures, down at the boulevardThey don't care about your feelings, they don't regardHaving a little curiousity, cannot be hardThey are failures, down at the boulevardThey don't care about your feelings, they don't regardThey don't have decency, they automatically disregardHaving an open mind, should not be so hardThey don't care about anyone, don't need no bodyguardTheir neglect is out of this world, I swear it's avant-gardeThey're a complete failure, they only neglectThis is plain, anyone can detectThey don't care about pain or the past, they don't want to recollectThis needs to be called out, one should be directThey want man lower, lower just as if an insectVERSEThe truth is what they wish to disregardTheir behavior is garbage, it should be thrown in the junkyardThey act like a retardBehaving just like in the schoolyardIn their ivory tower, with the castle and guardTheir behavior makes them charredThinking differently shouldn't have to be hardTheir neglect is out of this world, I swear it's avant-gardeWorking don't matter for this, whether day or graveyardThey don't care about your feelings, they don't regardThey are failures, down at the boulevardThey don't have decency, they automatically disregardThey're a complete failure, they only neglectThey don't speak the language of the people or their dialectThis is not right, this is completely incorrectThe only focus on “responses,” they just want to deflectThe lies are put forth, the lies they erectCHORUSThey're such failures, themselves they outdidCutting out the conversation, putting on the lidDon't have to do with ego or idRunning away from conversation just like a kidTheir neglect is out of this world, I swear it's avant-gardeThey are failures, down at the boulevardThey don't care about your feelings, they don't regardHaving a little curiousity, cannot be hardThey are failures, down at the boulevardThey don't care about your feelings, they don't regardThey don't have decency, they automatically disregardHaving an open mind, should not be so hardThey don't care about anyone, don't need no bodyguardTheir neglect is out of this world, I swear it's avant-gardeThey're a complete failure, they only neglectThis is plain, anyone can detectThey don't care about pain or the past, they don't want to recollectThis needs to be called out, one should be directThey want man lower, lower just as if an insectVERSEThey don't have decency, they automatically disregardThey don't care about your feelings, they don't regardHaving a little curiousity, cannot be hardTheir neglect is out of this world, I swear it's avant-gardeThey want the status quo, it's all they craveThe speeches of the past, they only wish to engraveThey act as bad as possible, they don't know how to behaveTheir sucked in their circle, they never waveAway from the truth, on the outskirtWith pre-thought of ideas, they automatically assertAny progress is fleeting with them, they revertDisingenuous to the extreme, the society they subvertThe society is the ones who hurt25. EmailThis currently doesn't work for gmail since 2022 due to policy changes.A simple and practical tool to email people using HimalayaHimalaya needs to be installed firstYou would need to configure the script by changing its source code.Modesemail [no arguments]Email [yourself]email [addr]Email one email addressemail [Subject] [addr] [option more addrs]Exampleemail 'Gregory, I love your software!'gregorycohenvideos@gmail.commy_friend@outlook.comperson@example.com26. FloorGets the floor of numbers e.g. 21.3 -> 2127. RgsubRecursively replaces text.Verbosely tells you everything that happens.Non-regex.Examplergsubmy_email@site.commy_second_email@site.comWould replace an email recursively in a directory.It tries to skip non-text files and hidden files.Usage: rgsub   [optional list of files instead of recursive search]  
     If a file is “-” or stdin, read from stdin and output to stdout.  
     Options  
     -r, rename files instead of replacing contents of files.  
     find and replace in file and dir names instead  
     -v, verbose mode  
     -- Indicate end of options.  

### 28. Lines  

Lines gets the number of files in the current folder that you are in.  
It can also act like “wc -l” if you pipe data into it.  
### 29. Clock  

clock is useful  
clock is a command line alarm clock  
It wakes you up at 8:14, or at a time specified  
Usage  
clock  
Runs clock  
clock 15 30  
Sets an alarm clock for 3:30pm  
clock 9 0  
Sets an alarm clock for 9 in the morning  
It uses flite to wake you up  
It speaks with a bunch of voices  
To stop it  
Run this command  
clock stop  
### 30. Emoji  

Emoji converts words to emojis from the standard input  
It can also speak the output  
It can also copy the output to your clipboard  
It is very useful  
![UCA](./images/6.png)  
### 31. Close  

“Close” is a simple program that closes “Emerald Browser,” a new web  
browser based on the same engine as Chrome. Currently, Emerald Browser  
only works on Linux and Mac (Or Windows with Windows Subsystem for  
Linux or a Virtual Machine, but getting it to work might be tricky).  
“close” closes the Web Browser, which is normally full-screen.  
More accurately, it kills the browser, and all other copies of Emerald  
Browser.  
Since they are normally full screen, presumably the user would only  
have one instance of the browser open.  
The browser can have multiple panes (kind of like tabs) open, depending  
on how the browser is compiled.  
The browser can also be transparent, depending on how it is compiled.  
“Close” is supposed to be used in tandem with “open,” which is a  
command line tool to open the browser.  
open [query] ----> [query] gets searched in google, and then opened  
When you are done, you can do  
close  
Which closes the browser. It is a simple command.  
Currently, Emerald Browser is incomplete. A program exists in this  
software project that allows you to open up multiple browser tabs (one  
or more tabs) simply by speaking.  
Voice recognition would google the multiple sites that you say in your  
query (separated by “and”)  
“facebook and youtube and google”  
It's hard to get more direct than that!  
Emerald browser has a built in the top. The terminal is the navigation  
bar.  
Some more work needs to be put into the browser.  
Currently, new tabs can't be opened, which might be a dealbreaker for  
some people.  
Currently, content, like YouTube videos, can't be made fullscreen.  
If anyone wants to contribute, feel free to!  
### 32. Copy  

copy copies the standard input  
Example  
ls | copy  
### 33. Ctit  

Capitalize Title  
A work in progress.  
Capitalizes the input and treats it like a title.  
### 34. Gsub  

Gsub is very powerful.  
Usage  
gsub [regular expression] [replacement text]  
Example  
cat text | gsub man dog  
cat text | gsub 'man|boy|cat|dog' food  
ls | gsub Desktop cat  
### 35. News  

Gets the news from bbc  
Usage  
news  
news speak  
uses google_speak to SPEAK the news, one story at a time.  
![UCA](./images/5.png)  
### 36. Args  

args is like a better xargs  
args works properly with spaces in the name of commands  
It takes exactly one argument  
Example  
ls | args “mv -t ../f”  
### 37. Rnip  

Replace Not In Place  
This is like gsub, but for strings, not for regular expressions  
Example  
echo .......... | rnip foo bar  
See also  
     gsub  
### 38. Trim  

Trims spaces of each line  
### 39. Quot  

Turns quotes in text into good text and makes text presentable.  
Example  
$ echo 'Joe said,        "One two three".' | quot  
Joe said, “One two three.”  
Example 2  
quot < essay  
Example 3  
(Quote the file and output it)  
quot text_file  
### 40. Open  

“open” is a very efficient program that searches a query from google,  
and then opens it in Emerald Browser.  
If you ever want something to “just open,” you can use it.  
Example  
open “cats”  
An earlier version of open worked like this  
open [site1] [site2] [site3] N  
site1, site2, and site3 would all be opened, and the top N queries were  
all shown in different panes  
An even earlier version of this program used Chrome to open the sites.  
The current version can open one or more sites.  
Example  
open “cats” “dogs” “frogs”  
All of those queries would open in Emerald Browser.  
Just make sure it is compiled in multipane mode if you want to open  
multiple new sites at the same time.  
See also  
     emerald-browser  
close  
### 41. Swap  

Swaps two files  
Example  
swap text1 text2  
### 42. Exp  

exp is an exponentiation tool  
(echo 5; echo 3) | exp  
=> 125  
(echo 2; echo 10) | exp  
=> 1024  
### 43. Div  

Divides numbers  
Example  
(echo 5000; echo 100) | div  
=> 50  
### 44. Mul  

Multiply numbers  
echo 1 > file  
echo 2 >> file  
echo 3 >> file  
echo 4 >> file  
echo 5 >> file  
cat file | mul  
=> 120  
### 45. Nth  

Nth gets the nth line from the input  
### 46. Abs  

Abs gets the absolute value of an integer  
The absolute value of a number is the value of that number without its  
sign  
echo -300 | abs  
=> 300  
echo 200 | abs  
=> 200  
(echo -2; echo -10) | sub | abs  
=> 12  
The last one would do -2 - -10, the result would be -12, and then the  
absolute value would be computed, and so the result would be 12.  
### 47. Add  

See the sub example  
add adds integers from the standard input  
(echo 1; echo 2; echo 3) | add  
The result would be 6  
### 48. Sub  

Sub is a simple command line program that subtracts integers.  
For some reason, no simple program did this.  
Which is weird  
Example  
sub  
(Input)  
10  
3  
1  
Result =>  
6  
Example  
(echo 5; echo 2) | sub  
Result =>  
3  
### 49. Rip  

Replace In Place  
rip tool replaces a string, not a regular expression, with another  
string  
Example  
rip cat dog file  
### 50. G+  

A compiler for C += 2. If you want to use C++ with Python syntax, you  
can use this.  
Usage is like g++  
Example  
g+ a.cpp -o out  
See also README file & emerald-browser and its source  
### 51. T  

“t” is incredibly useful.  
It can be used many, many times every day by computer power users.  
It is kind of like “sed,” or perl, python or ruby.  
It's the ULTIMATE shell “glue” tool.  
t reads every line from the standard input, and for every line, it  
evaluates a ruby expression  
t a + 2  
would add 2 to every line  
Number automatically get converted to numbers in Ruby.  
So one doesn't have to worry about that.  
The “value” of the line of STDIN is any letter of the alphabet.  
So choose any letter to do operations on and it will work.  
You can also do  
t a + 2 if a % 2 == 0  
And you get a Python list comprehension sort of thing from the command  
line  
It is a lot simpler and easier than using awk, Ruby, Perl or Python  
You could also have loops  
echo “One line” | t a while true  
The second line, again is a Ruby expression.  
You can have really complex expressions on the second line.  
You can even import modules.  
cat /usr/share/dict/words | t 'a + “ is a good word.”'  
That processes every word in the dictionary, and says that every word  
“is a good word.”  
There are other programs in this software project like “t.”  
But if you do command line text filtering, t might be the best tool  
that you will find.  
See also  
     gsub  
gsubip  
.  

Navigation  

 Top  
 Ultimate Chat Application.exe  
 Discourse Generator.exe  
 Emerald Browser  
 Left Right.exe  
 Find Housing  
 Prepend Each  
 Google Speak  
 Append Each  
 Selectlines  
 Processes  
 Emeraldc  
 Nth Word  
 Last Nth  
 Speakcat  
 Uca Cli  
 Big Num  
 Squeeze  
 Dictate  
 Prepend  
 Chat Rb  
 Append  
 Delete  
 Gsubip  
 Rhyme  
 Email  
 Floor  
 Rgsub  
 Lines  
 Clock  
 Emoji  
 Close  
 Copy  
 Ctit  
 Gsub  
 News  
 Args  
 Rnip  
 Trim  
 Quot  
 Open  
 Swap  
 Exp  
 Div  
 Mul  
 Nth  
 Abs  
 Add  
 Sub  
 Rip  
 G+  
 T  

References  

1. https://www.youtube.com/embed/Fx9x8cArK30  
2. mailto:gregorycohenvideos@gmail.com  
3. https://snapcraft.io/democracy  
4. https://pypi.org/project/democracy  
5. https://www.rubygems.org/gem/democracy  
6. https://twitter.com/democracygem  
7. https://www.linkedin.com/in/gregory-cohen-274333261/  
8. https://www.rubygems.org/gems/democracy  
9. https://www.rubygems.org/gems/computers  
10. https://www.rubygems.org/gems/freespeech  
11. https://www.rubygems.org/gems/linux  
12. https://www.rubygems.org/gems/string  
13. https://www.rubygems.org/gems/unix  
14. http://www.github.com/gregoryc/democracy  
15. http://www.rubygems.org/gems/democracy  
16. https://pypi.org/project/democracy  
17. https://cboard.cprogramming.com/c-programming/181160-hi-i-have-created-some-work-i-think-will-really-valuable-community.html?s=589b5504cd0e3c2dc90e9abd8b66906f  
18. https://www.youtube.com/@LawrenceStevensMusic  
19. https://www.github.com/gregoryc/democracy