This was Intended to be a BSD only blog, but now it's about all Unix Like Free Operating Systems, Linux, FreeBSD etc.
Monday, June 29, 2020
Anders Hejlsberg
Everyone who has studied Computers knows who Bjarne Stroustrup, Ken Thompson are and maybe even Niklaus Wirth.
But one name I hadn't run across before was Anders Hejlsberg.
I can't tell you how much I loved Turbo Pascal in the late 1980s in to the 90's...
I tried to encourage my children growing up to program, showing then the unix shell and C.
I think asking for C++ would be some form of child abuse.
Then showed them a little python but these never really caught on.
Over the years I have really come to dislike MicroSoft. From having 6 different audio interfaces and having to try every one with all the example code broken, to eventually find not one of them supported full duplex audio, or the fact that the API to draw a bitmap to the screen was undocumented and took me years and money and many developers to find out the calls.
Or the sabotaged Winsock library. Or control alt delete for logging in to NT, or Wins DNS.
I am in my 50's and 2 of my son's are programming in C# and I was feeling rather bothered by that, and advocating the one learn Javascript.
He also wrote C#, So I guess I don't feel so bad.
https://en.wikipedia.org/wiki/Anders_Hejlsberg
Anders Hejlsberg (/ˈhaɪlzbɜːrɡ/, born 2 December 1960)[2] is a prominent Danish software engineer who co-designed several popular and commercially successful programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Microsoft as the lead architect of C#[1] and core developer on TypeScript.[3]
Monday, June 22, 2020
interactive computing in C++, with Jupyter
https://blog.jupyter.org/interactive-workflows-for-c-with-jupyter-fe9b54227d92
https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
Jupyter kernel for the C++ programming language
Minimal Jupyter C kernel
https://github.com/brendan-rius/jupyter-c-kernel
https://github.com/brendan-rius/jupyter-c-kernel
Ch is a C/C++ interpreter and scripting language environment.
http://www.softintegration.com/
Ch is a C/C++ interpreter and scripting language environment. It is used by teachers, students, engineers and scientists around the world to learn math, computing, C/C++, and write cross-platform code and embedded scripts quickly and efficiently. Ch is the most complete, cross-platform C interpreter and C scripting engine in existence. It is a simpler alternative solution to C/C++ compiler for teaching and learning, especially for Raspberry Pi, Arduino and Linkbot from Barobo.
https://www.drdobbs.com/cpp/ch-a-cc-interpreter-for-script-computing/184402054?pgno=2
Ch: A C/C++ Interpreter for Script Computing
January 01, 2006
Friday, June 19, 2020
a Browser on a Linux with X Windows in a Browser.
I have seen it All Now, Full Linux in a Risc Emulators in a Browser window, that can run X, and open a Browser in the emulator
http://s-macke.github.io/jor1k/demos/main.html
http://www.benjamincburns.com/2013/11/10/jor1k-ethmac-support.html
Adding DNS server 10.5.0.1 |
Adding DNS server 8.8.8.8 |
Adding DNS server 8.8.4.4 |
-login[80]: root login on 'ttyS1' |
******************************************************* |
* Don't know what to do? Type 'help' and press enter. * |
******************************************************* |
Note, you can exit most programs by pressing CTRL+C |
~ $ uname -a |
Linux openrisc 4.4.0-42578-gacba10ee627d-dirty #6 Thu May 25 20:53:14 UTC 2017 o |
penrisc GNU/Linux |
~ $ df |
Filesystem 1K-blocks Used Available Use% Mounted on |
/dev/root 1048576 2936 1045640 0% / |
devtmpfs 12904 0 12904 0% /dev |
none 12968 0 12968 0% /dev/shm |
~ $ ping 8.8.8.8 |
PING 8.8.8.8 (8.8.8.8): 56 data bytes |
64 bytes from 8.8.8.8: seq=0 ttl=118 time=39.279 ms |
64 bytes from 8.8.8.8: seq=1 ttl=118 time=36.067 ms |
64 bytes from 8.8.8.8: seq=2 ttl=118 time=37.068 ms |
64 bytes from 8.8.8.8: seq=3 ttl=118 time=35.070 ms |
^C |
--- 8.8.8.8 ping statistics --- |
4 packets transmitted, 4 packets received, 0% packet loss |
round-trip min/avg/max = 35.070/36.871/39.279 ms |
Back end internet connectivity is done through a websocket proxy.
https://github.com/benjamincburns/websockproxy
It can play Amiga Mod files on the Linux in the Emulator
-= MikMod 3.2.6 =- |
Open Sound System: 8 bit normal mono, 22050 Hz, no reverb |
File: /usr/share/mikmod/mod/enigma.mod |
Name: Enigma |
Type: Protracker, Periods: mod type, log |
pat:007/063 pos:3C spd: 6/125 vol:100%/100% time: 0:34 chn: 4/4 |
Help Samples [playList] Configuration Volume |
0 *.../share/mikmod/mod/spacedeb.mod 15 /usr/share/mikmod/mod/aurora.mod |
1 *.../share/mikmod/mod/GSLINGER.MOD 16 /usr/share/mikmod/mod/external.xm |
2 */usr/share/mikmod/mod/jt_911.xm 17 /usr/share/mikmod/mod/SATELL.S3M |
3 /usr/share/mikmod/mod/aryx.s3m 18 /usr/share/mikmod/mod/jt_letgo.xm |
4 ...mod/mod/celestial_fantasia.s3m 19 /usr/share/mikmod/mod/DEADLOCK.XM |
5 ...d/aceman_-_my_first_console.xm |
6 ...re/mikmod/mod/beyond_music.mod |
7 /usr/share/mikmod/mod/ELYSIUM.MOD |
8 .../share/mikmod/mod/stardstm.mod |
9 ...re/mikmod/mod/eternity-1553.xm |
10 .../share/mikmod/mod/strshine.s3m |
11 */usr/share/mikmod/mod/BUTTERFL.XM |
12 .../share/mikmod/mod/CTGOBLIN.S3M |
13 /usr/share/mikmod/mod/sweetdre.xm |
14 >/usr/share/mikmod/mod/enigma.mod |
-------------------------------------------------------------------------------- |
20 Modules |
It has networking and supports C++ and Lua compilers.
|
xx
Wednesday, June 17, 2020
Stupid web tricks
The basic idea was we could host a webpage or website at several locations, each having identical copies of the web page. ww1.x ww2 etc
This first page , which could even be coming from a referring web site will try to load several images off several web sites at once.
race.gif
See code at:
https://codepen.io/johnsokol/pen/PoZbXmj
In order to prevent caching and also address the issue of being able to steer traffic loads some we can add a small delay before serving the image as well as adding additional HTTP tags to prevent cache and force it to load freshly each time.
#!/usr/bin/perl
#
#
# print "HTTP/1.0 200 Okay\n";
print "Expires: 0\n";
print "Pragma: no-cache\n";
print "Content-Type: image/gif\n\n";
open (sendgif,"/cgi/race.img");
print ();
close sendgif;
exit(0);
#
Monday, June 15, 2020
Anti-pattern
https://en.wikipedia.org/wiki/Anti-pattern
An anti-pattern is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive.[1][2] The term, coined in 1995 by Andrew Koenig,[3] was inspired by a book, Design Patterns, which highlights a number of design patterns in software development that its authors considered to be highly reliable and effective.
The term was popularized three years later by the book AntiPatterns, which extended its use beyond the field of software design to refer informally to any commonly reinvented but bad solution to a problem. Examples include analysis paralysis, cargo cult programming, death march, groupthink and vendor lock-in.
I got here by looking at:
Inner-platform effect
The inner-platform effect is the tendency of software architects to create a system so customizable as to become a replica, and often a poor replica, of the software development platform they are using. This is generally inefficient and such systems are often considered to be examples of an anti-pattern.
JSLinux PC/x86 emulator in Javascript running Linux
run an emulated linux in browser:
https://bellard.org/jslinux/
Run Linux or other Operating Systems in your browser!
https://github.com/benjamincburns/websockproxy
Getting Started:
A Gentle Introduction to JSLinux
Let's take a Linux emulator in the browser for a spin
https://devpost.com/software/a-gentle-introduction-to-jslinux
https://bellard.org/jslinux/
Run Linux or other Operating Systems in your browser!
Linux distribution
It uses the Buildroot embedded distribution. Custom packages are added for vfsync, qemacs, riscvemu, x86emu, tcc, calc. Optional X Window support is available with the Fluxbox window manager.Networking
Access to Internet is possible inside the emulator. It uses the websocket VPN offered by Benjamin Burns (see his blog). The bandwidth is capped to 40 kB/s and at most two connections are allowed per public IP address. Please don't abuse the service.
There is even a WebSockets Proxy
Yo dawg, I heard you like browsing the web, so I put a browser in your browser so you can browse while you browse!
A websocket ethernet switch built using Tornado in Python
Implements crude rate limiting on WebSocket connections to prevent abuse.
https://github.com/benjamincburns/websockproxy
Getting Started:
A Gentle Introduction to JSLinux
Let's take a Linux emulator in the browser for a spin
https://devpost.com/software/a-gentle-introduction-to-jslinux
runtime.js is an open-source library operating system (unikernel) for the cloud
http://runtimejs.org/
https://github.com/runtimejs/runtime
Overview
runtime.js is an open-source library operating system (unikernel) for the cloud that runs JavaScript, can be bundled up with an application and deployed as a lightweight and immutable VM image.
It's built on V8 JavaScript engine and uses event-driven and non-blocking I/O model inspired by Node.js. At the moment KVM is the only supported hypervisor.
It tries to be compatible with npm module ecosystem and supports some of the Node.js API.
WARNING: project is in development and not ready for production use.
SF Node.JS Meetup: Jacob Groundwater, “Kernel Hacking with Runtime.js”
https://www.pubnub.com/blog/introduction-runtime-js/
Unix Shell and Node.js in a web browser.
UNIX IN YOUR BROWSER TAB
Run C, C++, Go and Node.js programs as processes in browsers, including LaTeX, GNU Make, Go HTTP servers, and POSIX shell scripts.
https://browsix.org/
https://github.com/plasma-umass/browsix
A Unix terminal exposing the dash POSIX shell lets developers compose functionality and inspect Browsix state in a familiar way. (view source)
https://unix.bpowers.net/
Run C, C++, Go and Node.js programs as processes in browsers, including LaTeX, GNU Make, Go HTTP servers, and POSIX shell scripts.
https://browsix.org/
https://github.com/plasma-umass/browsix
A Unix terminal exposing the dash POSIX shell lets developers compose functionality and inspect Browsix state in a familiar way. (view source)
https://unix.bpowers.net/
Star Trek, VT100 Terminal Animation.
This is a playback of:
http://artscene.textfiles.com/vt100/trek.vt
from
http://artscene.textfiles.com/vt100/
Played back using a perl script to slow down replay. This script simulates the slow dumb terminals or modems links of the day.
cat.pl
#!/usr/bin/perl
use warnings;use strict;
use Time::HiRes;
open my $f, "<", "trek.vt" or die($!);binmode($f);my $buf;while(my $len = read($f, $buf, 10 )){ print $buf; Time::HiRes::sleep(0.025); # usleep(1000);}close $f;
C++ Today: The Beast is Back - Jon Kalb [ACCU 2018]
I made the book available at : http://c-program.com/cpp/
This presentation will cover why engineers looking for performance choose C++. I will present a historical perspective of C++ focusing on what’s going on in the C++ community right now and where the language and its user base is heading. With a renewed interest in performance for both data centers and mobile devices, and the success of open source software libraries, C++ is back and it is hot. This presentation will explain why C++ is most software engineers' go-to language for performance. You will receive a rough historical sketch that puts C++ in perspective and covers its popularity ups and downs.
This talk is based, in part, on the book "C++ Today: The Beast is Back" published by O’Reilly.
Sunday, June 14, 2020
VT100 Animations
https://www.ibiblio.org/archive/2020/04/vt100-animations/
Our ibiblio files include some of these neat VT100 animations (https://www.ibiblio.org/catalog/items/show/3566) that were made in the 1980’s and early 1990’s for the VT100 terminals . The animations were created by writing code that instructs characters to appear on the screen in a specific order and time. Nothing fancy, but fun to watch.
Assuming you don’t have a functioning VT100 terminal laying around to run these on, the next best thing is to run this in a Linux terminal using this pipe viewer , and this code:
curl -s [URL] | pv -q -L 2000
(thanks ). Replace that url with any from ibiblio’s vt100 collection here: http://www.ibiblio.org/pub/multimedia/animation/vt100-animation/ . Example:
curl -s ibiblio.org/pub/multimedia/animation/vt100-animation/dont-worry.vt | pv -q -L 2000
If you don’t have a Linux terminal you can run the code in your Mac terminal, leaving off the ‘|’ and everything after. The timing will be too fast, but you can see what it does. If you have Windows you can install a Linux app from the Microsoft store to run these.
You can find more .vt animation here: http://artscene.textfiles.com/vt100/
Tuesday, June 09, 2020
Subscribe to:
Posts (Atom)