unix 0.0.3 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1058 -0
  3. data/unix.gemspec +3 -3
  4. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0333645f92a820ad747028351040106a730b445211a8b71af22c450c0182f3d0
4
- data.tar.gz: 2465b936fe6bd66abde11fa0596fdb2736cb95d6d3ad0fbe7c674195a9d23c2b
3
+ metadata.gz: 0a7a1535dd35af972024b6a2e25a28040fcde67d9ca13f68804122b377dc8900
4
+ data.tar.gz: 61901557f6b3ad9d2b7d68203200edb1603b5d4c42c47c14f35244a573c1ae58
5
5
  SHA512:
6
- metadata.gz: 34a6b74ec4d8b39525d69ecd322796465ebc9e08089875f2a98816a50660f019d383eaba0b245423f6beafa4cb85b58088a1759bacfd0877734d666b600ad185
7
- data.tar.gz: 51c81452cd3cb485e80b6c5e662997f0e9490af126a5a0475624af8fd96dcb69938cf8db31001f305fcc7a3395bc3a75fbfd67df0a69adbd80d6b4327f67349b
6
+ metadata.gz: bfb83a776dcad7a87650d232afb992b089d8485dd4cb5425f0ac5e9ca0ba3ae2d61be3d0bd4af244ca339091369ad464aab72bca322248df169a52fbd035811d
7
+ data.tar.gz: 4e83e36eb007ee6fbe47e0bf3663513ed49fa3aae6656ebd0ee834267646468625fd6e1e5491843378a3acb783aa392509412a49f01c200b053116df4375abad
data/README.md ADDED
@@ -0,0 +1,1058 @@
1
+ Practical Self-Empowerment Utilities
2
+ Covering Every Facet of Life
3
+
4
+ These tools are for everyone
5
+
6
+ It doesn't matter what political ideology you favor, these tools are all
7
+ still very valuable.
8
+ You can live in Canada, the US, Russia, China or Africa, it doesn't matter.
9
+
10
+ I intend to make people more able.
11
+
12
+ This lists all of the programs. Youtube channel here [1]Democracy
13
+ YouTube Channel (youtube.com/gregorycohen1) and
14
+ [2]facebook.com/democracygregoryc
15
+
16
+ Most important software here
17
+
18
+ Music program (Crystal and Ruby), see fix_the_society folder
19
+
20
+ Ultimate chat app (Win, Lin, CLI)
21
+
22
+ Discourse Generator Program vesion 1 and version 2 (node, ruby, browser
23
+ (kind of like Siri); and C++ STL)
24
+
25
+ And Semantic metadata project
26
+
27
+ And “Emerald C” (the “Best Programming Language”)
28
+ There is also a desktop widget for that site, and old random sentence
29
+ generator (useless) and an old compiler for my own programming
30
+ language. Those aside, there are these 93 programs
31
+
32
+ All of these programs are mostly self-contained. This is a really good thing.
33
+
34
+ Few or no dependencies!
35
+
36
+ My email is [3]gregorycohen2@gmail.com and I really would like to make
37
+ open source software. Everything I have is BSD licensed.
38
+ If this software gets you a job or makes you money or improves your
39
+ life or makes things easier for you, please consider donating. I have
40
+ released this software under the BSD license (a very liberal license)
41
+ for everyone to use and modify. I would appreciate it greatly if some
42
+ people could return the favor :)
43
+
44
+ [4]Democracy gem github [5]Ruby Gem
45
+
46
+ Without further ado, here are the 93 documented programs.
47
+
48
+ ### Ultimate Chat Application
49
+
50
+ ![UCA](./images/2.png)
51
+ Windows version of Ultimate Chat Application.
52
+ There is so much potential with this program.
53
+ This is a non-AI chatbot. It's not based on generative AI or AI of any
54
+ sort.
55
+ It is self-explanatory, it tries to give a better answer.
56
+ Still a work in progress.
57
+ Source code is in PP.rb
58
+ Generates a hyper optimized C program that is able to respond to
59
+ prompts locally as fast as theoretically possible using switch
60
+ statements
61
+ ### Discourse Generator
62
+
63
+ The use of Javascript (and possible Ruby) to create a Javascript
64
+ library (and perhaps a Chrome extension and perhaps a command line tool
65
+ and
66
+ perhaps a GTK or QT program) that helps people (by using textboxes or
67
+ command line prompts) to create high quality communications, would be
68
+ wonderful.
69
+ Think of how poor quality responses to communications can be.
70
+ If someone created one or more tools that could be easily added on web
71
+ pages, that would augment someone's life to help create goal and value
72
+ oriented responses (or original communications), then there is
73
+ literally
74
+ nothing that couldn't solve.
75
+ This might be the most useful library ever created.
76
+ There could be a tool that would help with democracy. Human being +
77
+ augmentive tool = civil discourse, eventually resulting in liberty.
78
+ This would enable democracy to work.
79
+ Imagine if 50% of all websites used this library.
80
+ This would help people to be goal or value oriented, and not be coming
81
+ up
82
+ with terrible communications that, for example, insult people's mothers
83
+ or
84
+ education.
85
+ ### Replace Not In Place
86
+
87
+ This is like gsub, but for strings, not for regular expressions
88
+ See also
89
+ gsub
90
+ ### Generate Do More
91
+
92
+ Generate the job search program from the inspect program.
93
+ See also
94
+ inspect
95
+ job search, job search, etc.
96
+ ### Replace In Place
97
+
98
+ replace_in_place tool replaces a string, not a regular expression, with
99
+ another string
100
+ Example
101
+ replace_in_place cat dog file
102
+ ### Emerald browser
103
+
104
+ ![UCA](./images/S1.png)
105
+ ![UCA](./images/S4.png)
106
+ Emerald browser is a really powerful new browser
107
+ See README
108
+ It works based on panes.
109
+ Read the documentation for "open", "close" and also the README file.
110
+ ### Job Search
111
+
112
+ job search is a work in progress, but it works, and it helps you to
113
+ progress, in life
114
+ job search automatically generates resumes and cover letters for all of
115
+ the jobs that you could have.
116
+ COVID makes life hard.
117
+ People are unemployed, etc.
118
+ People could have more jobs.
119
+ Job search is a graphical, cross platform program (generated from the
120
+ inspect_list program) that generates and downloads dynamic PDFs of
121
+ Resumes and Cover Letters that are tailored for each and every possible
122
+ job that you could apply for on Indeed. It is very freaking practical!
123
+ First, you need to click on the bottom part of it. It copies that code
124
+ into your browser. Then you right click on a browser page and go to
125
+ "Inspect" (the same can be done by doing Control + F12). Make sure you
126
+ are on Indeed.
127
+ Search for something on Indeed, like "labourer."
128
+ For each result, a new resume and cover letter will be downloaded, each
129
+ of which is geared for that specific job positing, with the company
130
+ name and copy role in both of them
131
+ This way, you can show employers that you really care!
132
+ The script will open up later pages on Indeed as well.
133
+ You can generate hundreds of resumes and cover letters as well
134
+ HTML documents will be downloaded.
135
+ You have to convert them to PDF, which chrome can do by doing
136
+ --print-to-pdf
137
+ Or you can do it manually
138
+ (On Windows, you can use Cygwin and do this)
139
+ (You need to be in the Downloads folder)
140
+ (Find it by doing “cd [folder]”, “cd ..”, etc. )
141
+ for i in Downloads/*; do ./chrome --headless --print-to-pdf-no-header
142
+ "$i" --print-to-pdf="$i.pdf"; done
143
+ Then you have to click on the second part, and run that in your command
144
+ prompt or terminal (Windows or macOS or Linux)
145
+ All of the generated resumes are numbered, starting from what you
146
+ enter, which is probably 0
147
+ They would look like 0_Business_Job.html
148
+ The pdfs would look like 0_Business_Job.html.pdf
149
+ When you run the second part, you will get notifications of the current
150
+ number
151
+ Then manually send all the custom resumes and cover letters to the
152
+ companies.
153
+ Chrome will be opened for you.
154
+ For each job, Chrome is opened.
155
+ When you close chrome, that job is considered applied for, and chrome
156
+ opens for the next job
157
+ You get a notification for each job.
158
+ It is REALLY streamlined.
159
+ For each job, that job positing gets searched on Indeed.
160
+ Oftentimes you will only see one result.
161
+ Which is what you want. Because it is THAT job.
162
+ This helps with so many things in life.
163
+ This program makes job searching easy.
164
+ When you click on the parts of the program, those TextViews get copied
165
+ to your clipboard.
166
+ You don't need to have anything installed on your computer.
167
+ The only requirements are
168
+ Ruby
169
+ Google Chrome
170
+ This program gives people a "buffer", because it allows people to
171
+ easily apply for more jobs.
172
+ People can RELY on this program. Job searching doesn't need to be
173
+ arduous. This program helps with job search management.
174
+ Indeed is the most popular job search website.
175
+ This program uses that.
176
+ Count on this program, because it is here to serve all of humanity.
177
+ This program can help fix unemployment problems of an economy, in a
178
+ nonpartisan way.
179
+ Have you ever thought, that people don't look for work, because it is
180
+ hard?
181
+ People can work 2 or 3 jobs
182
+ See also
183
+ find_housing
184
+ to_buy
185
+ ### Gsub In Place
186
+
187
+ gsub_in_place is like gsub, which replaces all instances of a regular
188
+ expression globally
189
+ [regular expression 1] [regular expression 2] => result
190
+ Example
191
+ gsub_in_place . FOO file
192
+ Would make all characters in "file" become "FOO".
193
+ gsub_in_place cat dog file
194
+ Would make all instances of "cat" "dog"
195
+ It is much cleaner than "sed".
196
+ You don't need to have "sed" installed to run this program.
197
+ It doesn't read from the standard input
198
+ It takes exactly 3 arguments, no more, no fewer.
199
+ See also
200
+ gsub
201
+ ### Find Housing
202
+
203
+ This is a nice tool to find housing with! Everyone needs housing. This
204
+ can help with that.
205
+ It is a nice, simple command line tool. You enter the minimum and
206
+ maximum prices, and Kijiji opens with your options.
207
+ Along with the resume program, these tools can be __VERY PRACTICAL__
208
+ for daily things.
209
+ World War III might be scary, but if you maximize daily things you can
210
+ be fine.
211
+ See also
212
+ to_buy
213
+ ### Faster Rhyme
214
+
215
+ Enter basename to make songs folder in (folder/songs, num songs=13000)
216
+ Usage faster_rhyme [folder] (processes files "1.json" and "21.json" by
217
+ default)
218
+ Example output of a song
219
+ (NO COPYRIGHT RESTRICTIONS ON THIS CONTENT WHATSOEVER. FULLY PUBLIC
220
+ DOMAIN)
221
+ Name the song or poem as you wish, resell it, but please positively
222
+ influence culture
223
+ Subject matter | Category 1 -- Abuse of philosophical universalism
224
+ (making broad claims while intentionally not trying to understand
225
+ things or see any sides of anything whatsoever, childish behavior worse
226
+ than a 3 year old, acting retarded)
227
+ VERSE
228
+ Brittle as possible, they are truly unguarded
229
+ Any novelty, they have disregarded
230
+ Their remissness is spectacular, the world they've bombarded
231
+ The clique is so insular, I swear they're retarded
232
+ Enlightenment values, they have not safeguarded
233
+ Any novel ideas, they automatically have discarded
234
+ Maybe the rebels and true communicators are off the grid
235
+ Lack of thought makes an grown-up the absolute worst kid
236
+ Can we stop this, their non sense they overdid
237
+ What horrendous non sense these creeps did
238
+ Tunnel vision, everyone and everything they forbid
239
+ They're such failures, themselves they outdid
240
+ CHORUS
241
+ They're such failures, themselves they outdid
242
+ Cutting out the conversation, putting on the lid
243
+ Don't have to do with ego or id
244
+ Running away from conversation just like a kid
245
+ Their neglect is out of this world, I swear it's avant-garde
246
+ They are failures, down at the boulevard
247
+ They don't care about your feelings, they don't regard
248
+ Having a little curiousity, cannot be hard
249
+ They are failures, down at the boulevard
250
+ They don't care about your feelings, they don't regard
251
+ They don't have decency, they automatically disregard
252
+ Having an open mind, should not be so hard
253
+ They don't care about anyone, don't need no bodyguard
254
+ Their neglect is out of this world, I swear it's avant-garde
255
+ They're a complete failure, they only neglect
256
+ This is plain, anyone can detect
257
+ They don't care about pain or the past, they don't want to recollect
258
+ This needs to be called out, one should be direct
259
+ They want man lower, lower just as if an insect
260
+ VERSE
261
+ Thinking itself resides in their territory of circumvention
262
+ Complete neglect, complete inattention
263
+ They have no genuine intention
264
+ We need change, we need intervention
265
+ Violence is second nature to them, their friends they've bombarded
266
+ Any novel ideas, they automatically have discarded
267
+ The clique is so insular, I swear they're retarded
268
+ Any novelty, they have disregarded
269
+ Any novelty, they have disregarded
270
+ Brittle as possible, they are truly unguarded
271
+ The clique is so insular, I swear they're retarded
272
+ Any novel ideas, they automatically have discarded
273
+ Enlightenment values, they have not safeguarded
274
+ Their remissness is spectacular, the world they've bombarded
275
+ They don't care about your feelings, they don't regard
276
+ Their neglect is out of this world, I swear it's avant-garde
277
+ They don't have decency, they automatically disregard
278
+ Working don't matter for this, whether day or graveyard
279
+ CHORUS
280
+ They're such failures, themselves they outdid
281
+ Cutting out the conversation, putting on the lid
282
+ Don't have to do with ego or id
283
+ Running away from conversation just like a kid
284
+ Their neglect is out of this world, I swear it's avant-garde
285
+ They are failures, down at the boulevard
286
+ They don't care about your feelings, they don't regard
287
+ Having a little curiousity, cannot be hard
288
+ They are failures, down at the boulevard
289
+ They don't care about your feelings, they don't regard
290
+ They don't have decency, they automatically disregard
291
+ Having an open mind, should not be so hard
292
+ They don't care about anyone, don't need no bodyguard
293
+ Their neglect is out of this world, I swear it's avant-garde
294
+ They're a complete failure, they only neglect
295
+ This is plain, anyone can detect
296
+ They don't care about pain or the past, they don't want to recollect
297
+ This needs to be called out, one should be direct
298
+ They want man lower, lower just as if an insect
299
+ VERSE
300
+ The truth is what they wish to disregard
301
+ Their behavior is garbage, it should be thrown in the junkyard
302
+ They act like a retard
303
+ Behaving just like in the schoolyard
304
+ In their ivory tower, with the castle and guard
305
+ Their behavior makes them charred
306
+ Thinking differently shouldn't have to be hard
307
+ Their neglect is out of this world, I swear it's avant-garde
308
+ Working don't matter for this, whether day or graveyard
309
+ They don't care about your feelings, they don't regard
310
+ They are failures, down at the boulevard
311
+ They don't have decency, they automatically disregard
312
+ They're a complete failure, they only neglect
313
+ They don't speak the language of the people or their dialect
314
+ This is not right, this is completely incorrect
315
+ The only focus on "responses", they just want to deflect
316
+ The lies are put forth, the lies they erect
317
+ CHORUS
318
+ They're such failures, themselves they outdid
319
+ Cutting out the conversation, putting on the lid
320
+ Don't have to do with ego or id
321
+ Running away from conversation just like a kid
322
+ Their neglect is out of this world, I swear it's avant-garde
323
+ They are failures, down at the boulevard
324
+ They don't care about your feelings, they don't regard
325
+ Having a little curiousity, cannot be hard
326
+ They are failures, down at the boulevard
327
+ They don't care about your feelings, they don't regard
328
+ They don't have decency, they automatically disregard
329
+ Having an open mind, should not be so hard
330
+ They don't care about anyone, don't need no bodyguard
331
+ Their neglect is out of this world, I swear it's avant-garde
332
+ They're a complete failure, they only neglect
333
+ This is plain, anyone can detect
334
+ They don't care about pain or the past, they don't want to recollect
335
+ This needs to be called out, one should be direct
336
+ They want man lower, lower just as if an insect
337
+ VERSE
338
+ They don't have decency, they automatically disregard
339
+ They don't care about your feelings, they don't regard
340
+ Having a little curiousity, cannot be hard
341
+ Their neglect is out of this world, I swear it's avant-garde
342
+ They want the status quo, it's all they crave
343
+ The speeches of the past, they only wish to engrave
344
+ They act as bad as possible, they don't know how to behave
345
+ Their sucked in their circle, they never wave
346
+ Away from the truth, on the outskirt
347
+ With pre-thought of ideas, they automatically assert
348
+ Any progress is fleeting with them, they revert
349
+ Disingenuous to the extreme, the society they subvert
350
+ The society is the ones who hurt
351
+ ---
352
+ ### Inspect List
353
+
354
+ This tool is really powerful
355
+ In an abstract world, there are lists of things [1, 2, 3]
356
+ There can be lists that contain other lists [[1, 2], [3, 4]]
357
+ This tool by inspecting a list
358
+ Does
359
+ * Generates HTML from the list, with divs and spans
360
+ You can then visually view that list.
361
+ Or you can use the HTML for something else
362
+ * Generates a GTK program for Windows and Linux, where that list is
363
+ converted into widgets
364
+ You are "inspecting" the list and turning it into other representations
365
+ A resultant c_program is created for both Windows and Linux. You need
366
+ to have MXE installed on a UNIX-like system to make it work (e.g.,
367
+ Linux)
368
+ The Job Search program was created by using this program!
369
+ You could make an entire website with that program from the command
370
+ line
371
+ inspect [File.read("page")]
372
+ cat list | args inspect
373
+ also would work
374
+ (See "args")
375
+ See also
376
+ args
377
+ job search
378
+ The usage of this program is like this
379
+ inspect [[“Hi there”, "This is text"], [200, "Man", 3.6]]
380
+ ### Google Speak
381
+
382
+ Google speak is really useful. It speaks a statement using the Google
383
+ Translate voice, which is probably the most authoritative and
384
+ high-quality text-to-speech voice that exists.
385
+ It's kind of like "espeak" or similar tools, but it is much better.
386
+ You need an internet connection for it to work.
387
+ It is probably limited at 100 characters.
388
+ There is a “singing program”, not really a tool, in this software
389
+ project that gets around that.
390
+ TODO
391
+ Make the alarm clock program in this software project use this voice.
392
+ It is quite reliable.
393
+ It is probably "unlimited".
394
+ I haven't had Google block me from using it ever.
395
+ Which is a good thing.
396
+ ### Make Server
397
+
398
+ make_server is powerful.
399
+ make_server takes expressions, either Javascript or C++, and generates
400
+ a resultant program from that.
401
+ The Javascript mode currently doesn't work.
402
+ Not only is a program made, the resultant program is an entire
403
+ webserver, that uses FastCGI to run really fast code.
404
+ The arguments work in an interesting way.
405
+ make_server [function_name] [iterable] [condition, it can be "true" to
406
+ do the following argument always] [code list separated by semicolons,
407
+ the last statement is an expression, and is returned by the function]
408
+ [function_name2] ...
409
+ You have to give 4 arguments every time.
410
+ There was an "otherwise" mode as an "else", but I don't think that's a
411
+ part of the program anymore.
412
+ It doesn't need to be.
413
+ You have to give 4 arguments for each function.
414
+ So you can do
415
+ make_server 4args 4args 4args 4args
416
+ And pass 16 arguments
417
+ The "iterable" has to be a list.
418
+ What is powerful is that it converts JSON into completely native C++.
419
+ It is very efficient.
420
+ It doesn't need to be a JSON expression though.
421
+ There is a test file.
422
+ You can run the tests and see if it works for you!!
423
+ You can also modify the code because it is open source.
424
+ The program generates a special array object. It is lightweight and
425
+ makes arrays act in C++ like arrays act in scripting languages, but
426
+ much faster.
427
+ The array class also has methods to apply things to every element of an
428
+ array, like surround
429
+ array.surround("", "")
430
+ for example
431
+ would surround all of the elements of array with XML tags and return a
432
+ new list
433
+ This program generates a lightweight Object System, with a BasicObject
434
+ class and an Object Class.
435
+ You can subclass these objects.
436
+ You can have Arrays of the Objects
437
+ The function argument syntax is really powerful.
438
+ Oftentimes people want to iterate through iterables or arrays.
439
+ Oftentimes people want to check conditions.
440
+ Python has list comprehensions.
441
+ This is kind of like that, but simpler.
442
+ You can have arguments as one argument, separated by ",,"
443
+ make_server arg1,,arg2,,arg3,,arg4
444
+ What's the point of using a scripting language when you can use C++?
445
+ This uses FastCGI, so you can have an ____IDEAL____ webserver.
446
+ You can have an IDEAL and very affordable website, that in a sense
447
+ would be faster than Facebook.
448
+ Facebook converts PHP to C++ (slow)
449
+ This produces REAL C++, and it is very fast, almost as fast as
450
+ possible.
451
+ Native STL classes are used, like vector.
452
+ Native STL classes are used, like vector and map
453
+ Do you not need to run and child processes or do slow, costly things.
454
+ You should want IDEAL.
455
+ This is free software, and is BSD licensed.
456
+ The function generation idea allows you to write in 1 line what other
457
+ people might write in 50 lines.
458
+ You do not need to compromise your ideals.
459
+ You should want fast, efficient, and memory light programs that are not
460
+ garbage collected (!!!) and that have reliable performance.
461
+ C++, as everyone knows, delivers that.
462
+ You should also want to not have to write a lot of code to do things.
463
+ And you should also want safe, compiled code that checks things at
464
+ compile time, so that bugs don't appear at run time.
465
+ This program delivers.
466
+ It uses NGINX ( a really, really common webserver) to help with the
467
+ FastCGI.
468
+ FastCGI, for the unfamiliar, is like normal CGI, but there aren't child
469
+ processes.
470
+ So the entire server could be written in idealistic C++ .
471
+ Then you just have to think about scaling.
472
+ There are some relevant links regarding scaling in the "scaling" file
473
+ in the democracy project
474
+ 1) Speed
475
+ 2) Ease of writing code
476
+ 3) Memory usage
477
+ 4) Monetary costs
478
+ 5) Elegance
479
+ 6) Practicalness
480
+ Those are 6 things.
481
+ You don't have to sacrifice on those things.
482
+ Contributions on this program would be really appreciated.
483
+ It is called "make_server" for now.
484
+ There was also a mode to generate javascript.
485
+ I have to make that work again.
486
+ The entire program is just one file.
487
+ My email is gregorycohen2@gmail.com
488
+ ### Selectlines
489
+
490
+ selectlines shows all nonblank lines from the input
491
+ Example
492
+ cat file | selectlines
493
+ (echo 2; echo; echo; echo) | selectlines
494
+ => 2
495
+ The result would be 2, with no blank lines after that
496
+ ### Communicate
497
+
498
+ Communicate is cool.
499
+ Communicate runs a Ruby expression after speaking a prompt (the first
500
+ argument) and getting your verbal answer (using something unfortunately
501
+ called "nerd-dictation", which is a wrapper around another program
502
+ which deals with speech recognition)
503
+ Communicate allows you to have conversations with your computer, and it
504
+ is cross platform
505
+ (Or it hopefully is)
506
+ communicate 'What is the best color?' 'case text; when /blue/; puts
507
+ "You are right!"; when /red/; puts "Red is a bad color"; end '
508
+ That would be an example of how one could use "communicate"
509
+ Make sure you have nerd-dictation on your computer
510
+ The name nerd-dictation is absolutely awful, and I have to criticize
511
+ him for not making it have a better name, but it works.
512
+ ### Super Trans
513
+
514
+ super_trans is an offline translation program
515
+ It uses "Apertium", which can do offline translation.
516
+ You can do translation anywhere with it.
517
+ It generates a webpage from the input text that not only has all
518
+ language translations embedded in it, it dynamically adjusts the
519
+ website page content to the web browser's “current language”.
520
+ You need to have a folder called "translation_folder" in your home
521
+ folder for it to work.
522
+ You can use the resultant HTML on your website, and if the user is
523
+ Spanish, French, German, etc., then that HTML element would
524
+ automatically be different.
525
+ This is really powerful.
526
+ Some notes
527
+ This is worse than t.js in this software project
528
+ The resultant HTML is really big. It is too big.
529
+ “Automatic translation” is really powerful.
530
+ This translates into literally dozens of languages.
531
+ See also
532
+ t.js
533
+ ### To Buy Old
534
+
535
+ Old to buy tool, not that good
536
+ ### Executable
537
+
538
+ Makes all the files in the current directory executable
539
+ ### Questions
540
+
541
+ This program allows you to communicate with all important people in
542
+ youife cycically and very easily. It's much easier than texting or
543
+ normal emailing.
544
+ See youtube.com/GregoryCohen1
545
+ See also
546
+ tb (to buy)
547
+ The youtube documentation video
548
+ ### Underline
549
+
550
+ Underlines text
551
+ ### Processes
552
+
553
+ Processes lists all processes with a certain name
554
+ For example
555
+ processes sh
556
+ processes bash
557
+ processes ruby
558
+ processes gsub
559
+ ### Emeraldc
560
+
561
+ The Ultimate C Preprocessor
562
+ I'm naming this preprocessor “Emerald C.”
563
+ https://cboard.cprogramming.com/c-programming/181160-hi-i-have-created-
564
+ some-work-i-think-will-really-valuable-community.html?s=589b5504cd0e3c2
565
+ dc90e9abd8b66906f
566
+ Howdy!
567
+ First, let me state that I am very much a perfectionist.
568
+ C is a wonderful language. C is probably the perfect programming
569
+ language. It is one of the top two most widely used languages for a
570
+ reason.
571
+ Now, there are some problems with it of course, but it's hard to think
572
+ of a more elegant language than it.
573
+ It is the language of systems, the language almost all APIs are written
574
+ in.
575
+ It is the lingua franca of the software world.
576
+ People try to avoid it, but they needn't.
577
+ I think every programmer wants to find out how to do things, or use
578
+ libraries that make things easier.
579
+ Many programmers have done programming, grown dissatisfied, and then
580
+ make another language. As a result, there are thousands of different
581
+ languages.
582
+ Well, recently, I made a preprocessor for C, that makes C incredibly
583
+ EASY.
584
+ C is fast and straightforward without it, but it has many features.
585
+ If one runs the command line preprocessor, with the "--features" flag,
586
+ the program shows all of its features
587
+ A Better C
588
+ C is a fantastic language. C compiles insanely fast, is the fastest
589
+ language there is, is very clear, is native to all systems, and is
590
+ useful for all purposes.
591
+ Some people, e.g., Bjarne Stroustrup, consider that C is "not good
592
+ enough", and make languages like C++ or D (or thousands of others)
593
+ This is not necessary.
594
+ There is no reason to use Python instead of C for "simple scripting
595
+ tasks"
596
+ Some functions can be used as methods
597
+ Makes for an excellent “scripting language” (which is really just
598
+ native C without things making it slow)
599
+ 1 String Interpolation "String interplation like this #{foo} " Calls
600
+ the join() function (talked about below to join strings,
601
+ delim is a static global in each module called "sep".
602
+ Make sure you free() the string after. The string is stored in a static
603
+ global variable called "last".
604
+ So you could do puts(...); free(last)
605
+ 2 ew *i.ew "Foo", a.ew "bar" | char* ends with another char*?
606
+ 3 sw *i.sw "Foo", a.sw "bar" | char* starts with another char*?
607
+ 4 == Comparison of strs, "foo" == "bar"
608
+ 5 strip Returns pointer to string that was stripped, in place
609
+ 6 chomp void function, chomps end of string of spaces, i.chomp or
610
+ chomp(i), in place
611
+ 7 gsub Just like ruby, there is a gsub function.
612
+ The preprocessor detects if you use and adds -lpcre2-8 to the link
613
+ flags if you use it. Use $" for substitutions in argument 3 gsub(a, b,
614
+ c)
615
+ 8 join Joins an array of strings, to split(), use C's strtok (very
616
+ fast)
617
+ 9 Lightweight regexes are added, almost 15 times as fast as C's built
618
+ in regex. They are very simple, they only have bracket expressions,
619
+ like [a-z].
620
+ To use it, you need to pass a buffer of the size of the expansion of
621
+ the regex. Foo[a-fA-F] would be Foo[abcdefABCDEF]. That would be stored
622
+ in a buffer.
623
+ From testing, 15x times faster than C's regex POST COMPILATION, if
624
+ compilation keeps happening, it might be hundreds of times faster.
625
+ Uses static inline functions, NO HEAP MEMORY unless you malloc
626
+ before().
627
+ 10 print Like old python print "Hello" (fputs);
628
+ 11 print_int prints a number and returns the number, can be chained
629
+ 12 each_line, Perlish, different names, by_line(s) or each_line(s),
630
+ iterate over all lines, free after
631
+ 13 NOTE You can use open_memstream() on UNIX to easily concatenate
632
+ strings.
633
+ 14 MISC features || autoinclude, foo.gsub or gsub(...),no need for
634
+ paren (i.chomp, i.strlen), starts_with, ends_with, --wrap, itoa, freel
635
+ (frees str, sets to NULL, and frees other recent stuff)
636
+ asprintf() is another useful function which is UNIX-centric.
637
+ open_memstream() could be an alternative to std::string.
638
+ It works very well with each_line or by_lines (see above)
639
+ These features seem simple, but they can make C programming much, MUCH
640
+ easier
641
+ for example (insignificant example)
642
+ int main() {
643
+ stdin.each_line { |line|
644
+ print line;
645
+ }
646
+ free(line);
647
+ }
648
+
649
+ You can iterate over the standard input like Ruby
650
+ The thing with this is that it has 100% speed. The resultant
651
+ preprocessed program becomes a normal C program
652
+ The compile and run time for a program (if you use tcc and not gcc) can
653
+ be about 24 milliseconds, which is faster than Ruby to run.
654
+ Even though the program is preprocessed, re-preprocessed, compiled,
655
+ assembled, linked, turned into an executable, and then run
656
+ Kind of like early C++, this is a preprocessor for C.
657
+ But it's much faster to compile than C++. Significantly so.
658
+ Is anyone else interested in this? (BSD)
659
+ I'm realising this under the BSD license. I'm interested if anyone else
660
+ else likes this work, and would like to use it, or to work with me.
661
+ Best regards,
662
+ Gregory
663
+ Current program is written in Crystal (crystal-lang.org) -- it was
664
+ written in ruby, it could be ported to another language.
665
+ I would like to make this self-hosting, but that would take a little
666
+ bit of work.
667
+ About the Name
668
+ Years ago, I really, really liked Compiz
669
+ Compiz then forked into Beryl. There was the Emerald Window Manager,
670
+ which was really nice and beautiful.
671
+ I actually made another programming language. I made 2 other
672
+ programming language. One was a full compiler and assembler, that ran
673
+ code in memory. It was around 16 thousand lines of code. I made a
674
+ programming language that had the syntax of Python or Ruby, but
675
+ transpiled into C++. I called that C += 2. I used that other language,
676
+ and I created a Web Browser in it based on Chrome. I called it “Emerald
677
+ Browser.” Emeralds are beautiful green gems.
678
+ "Emerald is a gemstone and a variety of the mineral beryl colored green
679
+ by trace amounts of chromium or sometimes vanadium. Beryl has a
680
+ hardness of 7.5–8 on the Mohs scale. Most emeralds are highly included,
681
+ so their toughness is classified as generally poor. Emerald is a
682
+ cyclosilicate." --Wikipedia
683
+ There was a browser with a terminal built in to it.
684
+ I show things off on my youtube channel, which I'm not going to link
685
+ here but is linked in my other repo.
686
+ This new language is better. It's ideal.
687
+ QUESTIONS
688
+ Why not use Rust?
689
+ $ time rustc a.rs
690
+ real 0m0.637s
691
+ user 0m0.502s
692
+ sys 0m0.160s
693
+
694
+ Rust takes 0.637 seconds to compile an empty file!
695
+ That is not ideal.
696
+ ### Last Nth
697
+
698
+ Last nth gets the last n lines from the standard input
699
+ ### Speakcat
700
+
701
+ Speak cat is a tool like "cat", which shows the content of files
702
+ (technically, it combines the content of files).
703
+ But speak cat also speaks the text.
704
+ Which could be useful in some circumstances.
705
+ It's kind of like "tee" to your ear.
706
+ ### Uca Cli
707
+
708
+ CLI for uca app
709
+ ### Big Num
710
+
711
+ big_num speaks really big numbers
712
+ Enter an expression, such as 2 ** 1000, and you'll see the result
713
+ ### Squeeze
714
+
715
+ Squeeze is kind of like "sponge" from "moreutils"
716
+ But squeeze is different.
717
+ Squ
718
+ Squeeze reads all input, then it prints it back omitting argument 1
719
+ line from the front, and argument 2 lines from the back
720
+ Example
721
+ squeeze 1 1
722
+ This would omit the first line and the last line
723
+ squeeze 5 3
724
+ This would omit the first 5 lines and the last 3 lines
725
+ ### Foreach
726
+
727
+ Reads a bunch of lines
728
+ Then a ruby expression is evaluated as the last line
729
+ The result is outputted in an argument.
730
+ You can enter /dev/null if you don't want an output file
731
+ "t" is better
732
+ See also
733
+ t
734
+ ### Dictate
735
+
736
+ Dictate opens web pages in emerald browser, or in any browser
737
+ (depending on the environment variable set), by you speaking, instead
738
+ of typing.
739
+ There is a mode called c_mode, that allows you to make code from
740
+ speaking.
741
+ ### Prepend
742
+
743
+ prepend prepends input taken from the standard input to a file
744
+ Usage
745
+ prepend [file]
746
+ This is text to be prepended
747
+ ### Chat Rb
748
+
749
+ This program is excellent.
750
+ It's essentially a mix of ChatGPT and a shell, such as bash or ZSH.
751
+ It has a bunch of features.
752
+ It can display a file or change to a folder just by mentioning it.
753
+ It outputs chatgpt data to an output folder in home folder and copies
754
+ it to clipboard
755
+ To run a shell command, prefix things with "c", such as c gcc.....
756
+ ### Undump
757
+
758
+ undump is the opposite of dump
759
+ Example
760
+ echo cat | dump | undump
761
+ => cat
762
+ echo cat | dump
763
+ => "cat“
764
+ echo '”cat"' | undump
765
+ => cat
766
+ ### Append
767
+
768
+ Appends text to file
769
+ Example
770
+ append file
771
+ This is more text to be appended
772
+ ### Email
773
+
774
+ A simple and practical tool to email people using Himalaya
775
+ Himalaya needs to be installed first
776
+ You would need to configure the script by changing its source code.
777
+ Modes
778
+ email [no arguments]
779
+ Email [yourself]
780
+ email [addr]
781
+ Email one email address
782
+ email [Subject] [addr] [option more addrs]
783
+ Example
784
+ Email 'Gregory, I love your software!' gregorycohen2@gmail.com
785
+ my_friend@outlook.com person@example.com
786
+ ### Floor
787
+
788
+ Gets the floor of numbers e.g. 21.3 -> 21
789
+ ### Query
790
+
791
+ This is the top part of the job search, job search, etc. program for
792
+ Linux. The Linux program itself is called "linux_c_program". The part
793
+ normally only works for Windows. This program works for Linux.
794
+ ### Lines
795
+
796
+ Lines gets the number of files in the current folder that you are in.
797
+ ### Clock
798
+
799
+ clock is useful
800
+ clock is a command line alarm clock
801
+ It wakes you up at 8:14, or at a time specified
802
+ Usage
803
+ clock
804
+ Runs clock
805
+ clock 15 30
806
+ Sets an alarm clock for 3:30pm
807
+ clock 9 0
808
+ Sets an alarm clock for 9 in the morning
809
+ It uses flite to wake you up
810
+ It speaks with a bunch of voices
811
+ To stop it
812
+ Run this command
813
+ clock stop
814
+ ### Emoji
815
+
816
+ Emoji converts words to emojis from the standard input
817
+ It can also speak the output
818
+ It can also copy the output to your clipboard
819
+ It is very useful
820
+ ### Close
821
+
822
+ "Close" is a simple program that closes “Emerald Browser”, a new web
823
+ browser based on the same engine as Chrome. Currently, Emerald Browser
824
+ only works on Linux and Mac (Or Windows with Windows Subsystem for
825
+ Linux or a Virtual Machine, but getting it to work might be tricky).
826
+ "close" closes the Web Browser, which is normally full-screen.
827
+ More accurately, it kills the browser, and all other copies of Emerald
828
+ Browser.
829
+ Since they are normally full screen, presumably the user would only
830
+ have one instance of the browser open.
831
+ The browser can have multiple panes (kind of like tabs) open, depending
832
+ on how the browser is compiled.
833
+ The browser can also be transparent, depending on how it is compiled.
834
+ "Close" is supposed to be used in tandem with "open", which is a
835
+ command line tool to open the browser.
836
+ open [query] ----> [query] gets searched in google, and then opened
837
+ When you are done, you can do
838
+ close
839
+ Which closes the browser. It is a simple command.
840
+ Currently, Emerald Browser is incomplete. A program exists in this
841
+ software project that allows you to open up multiple browser tabs (one
842
+ or more tabs) simply by speaking.
843
+ Voice recognition would google the multiple sites that you say in your
844
+ query (separated by "and")
845
+ "facebook and youtube and google"
846
+ It's hard to get more direct than that!
847
+ Emerald browser has a built in the top. The terminal is the navigation
848
+ bar.
849
+ Some more work needs to be put into the browser.
850
+ Currently, new tabs can't be opened, which might be a dealbreaker for
851
+ some people.
852
+ Currently, content, like YouTube videos, can't be made fullscreen.
853
+ If anyone wants to contribute, feel free to! :)
854
+ "Close" is a simple program that closes “Emerald Browser”, a new web
855
+ browser based on the same engine as Chrome. Currently, Emerald Browser
856
+ only works on Linux and Mac (Or Windows with Windows Subsystem for
857
+ Linux or a Virtual Machine, but getting it to work might be tricky).
858
+ "close" closes the Web Browser, which is normally full-screen.
859
+ More accurately, it kills the browser, and all other copies of Emerald
860
+ Browser.
861
+ Since they are normally full screen, presumably the user would only
862
+ have one instance of the browser open.
863
+ The browser can have multiple panes (kind of like tabs) open, depending
864
+ on how the browser is compiled.
865
+ The browser can also be transparent, depending on how it is compiled.
866
+ "Close" is supposed to be used in tandem with "open", which is a
867
+ command line tool to open the browser.
868
+ open [query] ----> [query] gets searched in google, and then opened
869
+ When you are done, you can do
870
+ close
871
+ Which closes the browser. It is a simple command.
872
+ Currently, Emerald Browser is incomplete. A program exists in this
873
+ software project that allows you to open up multiple browser tabs (one
874
+ or more tabs) simply by speaking.
875
+ Voice recognition would google the multiple sites that you say in your
876
+ query (separated by "and")
877
+ "facebook and youtube and google"
878
+ It's hard to get more direct than that!
879
+ Emerald browser has a built in the top. The terminal is the navigation
880
+ bar.
881
+ Some more work needs to be put into the browser.
882
+ Currently, new tabs can't be opened, which might be a dealbreaker for
883
+ some people.
884
+ Currently, content, like YouTube videos, can't be made fullscreen.
885
+ If anyone wants to contribute, feel free to! :)
886
+ ### Copy
887
+
888
+ copy copies the standard input
889
+ Example
890
+ ls | copy
891
+ ### Gsub
892
+
893
+ Gsub is very powerful.
894
+ Usage
895
+ gsub [regular expression] [replacement text]
896
+ Example
897
+ cat text | gsub man dog
898
+ cat text | gsub 'man|boy|cat|dog' food
899
+ ls | gsub Desktop cat
900
+ ### News
901
+
902
+ Gets the news from bbc
903
+ ### Dump
904
+
905
+ Dump surrounds its input with quotes
906
+ ls | dump
907
+ => "...."
908
+ Use undump to get the reverse
909
+ See also
910
+ undump
911
+ ### Bold
912
+
913
+ See other color programs
914
+ ### Args
915
+
916
+ args is like a better xargs
917
+ args works properly with spaces in the name of commands
918
+ It takes exactly one argument
919
+ Example
920
+ ls | args "mv -t ../f"
921
+ ### Open
922
+
923
+ "open" is a very efficient program that searches a query from google,
924
+ and then opens it in Emerald Browser.
925
+ If you ever want something to “just open”, you can use it.
926
+ Example
927
+ open "cats"
928
+ An earlier version of open worked like this
929
+ open [site1] [site2] [site3] N
930
+ site1, site2, and site3 would all be opened, and the top N queries were
931
+ all shown in different panes
932
+ An even earlier version of this program used Chrome to open the sites.
933
+ The current version can open one or more sites.
934
+ Example
935
+ open "cats" "dogs" "frogs"
936
+ All of those queries would open in Emerald Browser.
937
+ Just make sure it is compiled in multipane mode if you want to open
938
+ multiple new sites at the same time.
939
+ See also
940
+ emerald-browser
941
+ close
942
+ ### Swap
943
+
944
+ Swaps two files
945
+ ### Exp
946
+
947
+ exp is an exponentiation tool
948
+ (echo 5; echo 3) | exp
949
+ => 125
950
+ (echo 2; echo 10) | exp
951
+ => 1024
952
+ ### Div
953
+
954
+ Div divides integers
955
+ Example
956
+ (echo 5000; echo 100)|div
957
+ => 50
958
+ ### Mul
959
+
960
+ Multiply numbers
961
+ echo 1 > file
962
+ echo 2 > file
963
+ echo 3 > file
964
+ echo 4 > file
965
+ echo 5 > file
966
+ cat file | mul
967
+ => 120
968
+ ### Nth
969
+
970
+ Nth gets the nth line from the input
971
+ ### Abs
972
+
973
+ Abs gets the absolute value of an integer
974
+ The absolute value of a number is the value of that number without its
975
+ sign
976
+ echo -300 | abs
977
+ => 300
978
+ echo 200 | abs
979
+ => 200
980
+ (echo -2; echo -10) | sub | abs
981
+ => 12
982
+ The last one would do -2 - -10, the result would be -12, and then the
983
+ absolute value would be computed, and so the result would be 12.
984
+ ### Add
985
+
986
+ See the sub example
987
+ add adds integers from the standard input
988
+ (echo 1; echo 2; echo 3) | add
989
+ The result would be 6
990
+ ### Sub
991
+
992
+ Sub is a simple command line program that subtracts integers.
993
+ For some reason, no simple program did this.
994
+ Which is weird
995
+ Example
996
+ sub
997
+ (Input)
998
+ 10
999
+ 3
1000
+ 1
1001
+ Result =>
1002
+ 6
1003
+ Example
1004
+ (echo 5; echo 2) | sub
1005
+ Result =>
1006
+ 3
1007
+ ### G+
1008
+
1009
+ A compiler for C += 2
1010
+ Usage is like g++
1011
+ Example
1012
+ g+ a.cpp -o out
1013
+ See also README file & emerald-browser and its source
1014
+ ### Tb
1015
+
1016
+ [6]SEE THIS YOUTUBE CHANNEL AND SUBSCRIBE
1017
+ ### T
1018
+
1019
+ "t" is incredibly useful.
1020
+ It can be used many, many times every day by computer power users.
1021
+ It is kind of like "sed", or perl, python or ruby.
1022
+ It's the ULTIMATE shell "glue" tool.
1023
+ t reads every line from the standard input, and for every line, it
1024
+ evaluates a ruby expression
1025
+ t a + 2
1026
+ would add 2 to every line
1027
+ Number automatically get converted to numbers in Ruby.
1028
+ So one doesn't have to worry about that.
1029
+ The "value" of the line of STDIN is any letter of the alphabet.
1030
+ So choose any letter to do operations on and it will work.
1031
+ You can also do
1032
+ t a + 2 if a % 2 == 0
1033
+ And you get a Python list comprehension sort of thing from the command
1034
+ line
1035
+ It is a lot simpler and easier than using awk, Ruby, Perl or Python
1036
+ You could also have loops
1037
+ echo “One line” | t a while true
1038
+ The second line, again is a Ruby expression.
1039
+ You can have really complex expressions on the second line.
1040
+ You can even import modules.
1041
+ cat /usr/share/dict/words | t 'a + " is a good word."'
1042
+ That processes every word in the dictionary, and says that every word
1043
+ "is a good word."
1044
+ There are other programs in this software project like "t".
1045
+ But if you do command line text filtering, t might be the best tool
1046
+ that you will find.
1047
+ See also
1048
+ gsub
1049
+ gsub_in_place
1050
+
1051
+ References
1052
+
1053
+ 1. https://www.youtube.com/GregoryCohen1
1054
+ 2. https://facebook.com/democracygregoryc
1055
+ 3. mailto:gregorycohen@gmail.com
1056
+ 4. http://www.github.com/gregoryc/democracy
1057
+ 5. http://www.rubygems.org/gems/democracy
1058
+ 6. http://www.youtube.com/GregoryCohen1
data/unix.gemspec CHANGED
@@ -1,13 +1,13 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "unix"
3
- s.version = "0.0.#{File.read("VERSION_NUMBER").strip.to_i}"
3
+ s.version = "1.0.#{File.read("VERSION_NUMBER").strip.to_i}"
4
4
  s.summary = "Trying to help with democracy"
5
- s.description = "A work in progress"
5
+ s.description = "https://github.com/gregoryc/democracy"
6
6
  s.authors = ["Gregory Cohen"]
7
7
  s.email = 'gregorycohen2@gmail.com'
8
8
  s.files = `find -type f`.split("\n")
9
9
  s.homepage =
10
- 'https://rubygems.org/gems/unix'
10
+ 'https://github.com/gregoryc/democracy'
11
11
  s.license = '0BSD'
12
12
  # s.executables += Dir.glob("*/bin/*")
13
13
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Cohen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-15 00:00:00.000000000 Z
11
+ date: 2023-05-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: A work in progress
13
+ description: https://github.com/gregoryc/democracy
14
14
  email: gregorycohen2@gmail.com
15
15
  executables: []
16
16
  extensions: []
@@ -18,9 +18,10 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - "./LINK"
20
20
  - "./README"
21
+ - "./README.md"
21
22
  - "./VERSION_NUMBER"
22
23
  - "./unix.gemspec"
23
- homepage: https://rubygems.org/gems/unix
24
+ homepage: https://github.com/gregoryc/democracy
24
25
  licenses:
25
26
  - 0BSD
26
27
  metadata: {}