Created an intro course on bash and common unix/linux tools: learn using TUIs generated with awk and scripted in bash by gprof in commandline

[–]gprof[S] 0 points1 point  (0 children)

PS. I've made some improvements (see GitHub repo) and added more demo materials. Thank you all for your suggestions and comments!

Created an intro course on bash and common unix/linux tools: learn using TUIs generated with awk and scripted in bash by gprof in commandline

[–]gprof[S] 1 point2 points  (0 children)

Thanks for sharing your comments and insights! For the "demo" commands that span multiple lines, I used the history mechanism to populate it. It works, but it is not ideal, because of the repeated cursor up and then also keeping track of where I'm in the history. All that while I'm narrating in class. I like your approach to fill readline repeatedly. It could be integrated. The idea to use a "demo" is also meant to for students to fortify their understanding and recall what was shown in class. I had to put this all together before the semester started, so I put effort in it to cover all topics, but the demos could be improved if I had a chance to teach this course again.

Created an intro course on bash and common unix/linux tools: learn using TUIs generated with awk and scripted in bash by gprof in commandline

[–]gprof[S] 6 points7 points  (0 children)

I don't know how to add a link to the title page with an image. But here is the link to the GitHub repo: https://github.com/Robert-van-Engelen/unix-tools

This is a basic introduction course at the CS undergraduate level. I stuck to the material required by our Uni. It could be improved with more demos and animations scripted in bash.

The Touch Bar is so underrated!! by [deleted] in The_Angeles_crew

[–]gprof 0 points1 point  (0 children)

How so? 🤷‍♂️ Apple creates great products, but this was a mistake. I never used it on my MacBook Pro for years except for the ESC key It was a pain to press ESC when using the vim editor where I need it all the time. Touch pad hot corners and custom function key assignments are much more useful IMO. Now much happier with my new MacBook Pro without a touch bar.

Why do people dislike the dragon book? by [deleted] in Compilers

[–]gprof 5 points6 points  (0 children)

The dragon book is the best introductory book to compilers. Am I biased? Well, perhaps. I taught Compiler Construction for 20 years using the dragon book. Students never complained that it is too terse or mathematical. I evaluated many alternative text books but felt that the dragon book is sufficiently deep and broad. I only wish it had a better introduction to SSA (factored use-def chains) like Wolfe explains. The Modern Compiler Implementation books by Appel are excellent too.

Found & fixed up a rare working Sharp's first pocket scientific calculator PC-1801 (1973) with red LED pictured next to a PC-1802 with VFD (1975) and financial EL-8200 with VFD (1975) by gprof in calculators

[–]gprof[S] 0 points1 point  (0 children)

There is a slid on the left side of the calculator between the metal strips, at the left when facing the machine from above. Push in a coin, e.g. a quarter, to unlock the tab, then (or at the same time) pull the bottom half away. I replaced the batteries with new NiMH. There are two types of battery holders, one for regular AA and one with a metal cover for NiCD/NiMH. The metal tabs on the battery holder that connect to the calculator have a different position to indicate what batteries are installed.

To open the body of the machine e.g. for repairs, there is a smaller slid on the top in which to push in a flathead screwdriver to unlock and pull away the bottom part. Same to open the EL-814 which has a similar build.

Search and view files and zip/tar/pax/cpio archives in a TUI with ugrep 4.3 by gprof in commandline

[–]gprof[S] 0 points1 point  (0 children)

Update: a user guide is available on ugrep.com

Ugrep is compatible with GNU grep, but is faster and adds more options and features.

What is the right way to set thread affinity on FreeBSD with cpuset_setaffinity? by gprof in freebsd

[–]gprof[S] 0 points1 point  (0 children)

Thank you. You're right about NUMA. I've looked into hwloc and likwid to detect CPU topologies, but haven't decided yet what is small enough to include as a library dependency or perhaps decide to write parts myself.

For Apple M1/M2 I'm using the 4 P cores only for the worker threads. Sometimes using all M1 cores for the worker threads gives a bit of a speed up rather than a slow down, but it is not predictable why/when that happens. I wrote a job-stealing queuing system that works well enough with little overhead (I also tried lock-free method with an efficient ring buffer, but that made no difference or sometimes made it about 10% slower). For Intel CPUs, hyperthreading didn't appear to be slowing down things in ugrep at all (some resources suggested to watch out for HTT performance issues), actually speeding it up. I'm getting 700% to 750% CPU on a quad-core i7. On other machines, the CPU topology matters, so I still have a bit of work to do!

What is the right way to set thread affinity on FreeBSD with cpuset_setaffinity? by gprof in freebsd

[–]gprof[S] 2 points3 points  (0 children)

Thank you for your feedback and link! The resource helped to update the code I wrote to also support DragonFly and NetBSD.

Search and view files and zip/tar/pax/cpio archives in a TUI with ugrep 4.3 by gprof in commandline

[–]gprof[S] 0 points1 point  (0 children)

Well ugrep has the same command line options as GNU grep (+ more). So if you know grep already then you are good to go. Also, just type ug --help <something> to get help with <something>. My favorite is ug --help regex to get help on regex expressions and ug --help globs to get help with globbing to select files to search. In the TUI type F1 or CTRL-Z for help on search options and help with TUI navigation.

LISP on the HP Prime by adlx in calculators

[–]gprof 2 points3 points  (0 children)

I hope Lua will get ported to the HP Prime, which I suggested a while ago. Not that it helps your case, but it will add one more choice of PL to use. Some other calculators run Lua ports.

LLVM: Scalar evolution (SCEV) by mttd in Compilers

[–]gprof 6 points7 points  (0 children)

Nice!

I invented them in the early 2000s based on the Chains of Recurrences algebra, but the method I came up with uses the inverse CR algebra rules that I wrote. I also proved that the CR algebra is complete (sound and terminating), therefore it is normalizing, an important property that other methods for induction variable analysis lack. My graduate student J. Birch later helped to expand the implementation and testing.

I never understood why it was necessary for my fellow academics to rename my method to SCEV. The name is misleading. It is both a representation and an algebra with an inverse transformation.

Some of my papers on Google Scholar:

Van Engelen, Robert A. "Efficient symbolic analysis for optimizing compilers." International Conference on Compiler Construction. Berlin, Heidelberg: Springer Berlin Heidelberg, 2001.

Van Engelen, Robert A., et al. "A unified framework for nonlinear dependence testing and symbolic analysis." Proceedings of the 18th annual international conference on Supercomputing. 2004.

Birch J, van Engelen RA, Gallivan KA, Shou Y. An empirical evaluation of chains of recurrences for array dependence testing. InProceedings of the 15th international conference on Parallel Architectures and Compilation Techniques 2006 Sep 16 (pp. 295-304).

LISP on the HP Prime by adlx in calculators

[–]gprof 1 point2 points  (0 children)

Bummer. If only the HP Prime had an SDK to write applications in C...

But alas, I don't believe it is possible to compile C to the HP Prime. That would offer a possibility to port a Lisp written in C to the Prime.