226 karma · joined May 17, 2013
"Three-hundred and twenty nozzles spewed a cloud of nano-sized droplets engineered to brighten clouds and block sunlight — providing a bit of cooling shade for the coral colonies below."
How big is the Great Barrier Reef?
"approximately 133,000 square miles"
How big is Germany?
"137987.506 square miles"
In other words -- use "cloud brightening" for an area the size of Germany? I would wonder if this is actually a good idea.
How bad is the coral doing? Let's get input from the Australian government":
https://www.aims.gov.au/news-and-media/reef-recovery-window-...
Moderate to High -- without cloud brightening.
Actually, I don't oppose the research. Just be careful if deployments are going to be "at scale".
I would no longer purchase stocks -- I would then prefer bonds (loans). Which means I would take risk into account, and this would stifle (some) innovation.
I don't mind taxation at all!
Thank you the detail. The philosophy is that Gnome is NOT configurable, really, just does a VERY limited and consistent desktop thing. It doesn't even have icons on the desktop (by default).
I find that it is "easy" for most users -- there is really nothing there! If you want icons on the desktop, add an extension for that. And, the idea of extensions is that they are small programs that are easy to manage. It is possible to turn them all off with a click! (if they are getting in the way).
I just counted -- I have 36 extensions on my Gnome 41. Note that icons on the desktop = extension, start menu for programs = extension. You can certainly start programs without a start menu -- that is the default "Gnome Way".
On the other hand -- being able to consistently customize is very nice (I particularly like "argos" extension, which makes it delightfully easy to add buttons, gather and display information and more -- and as a bonus, is fully compatible with the MacOS bitbar plugin.
Yes, I use a lot of extensions, but I do have 4 or 8GB of RAM is my laptops, and i3 or better processors, so this becomes a reasonable fit for me.
I don't see desktop extensions as the "core of the computation stack". Can you expand on that idea, please?
Given all of this, I expect that the capital gain rate is specified as lower to encourage me to invest.
If the capital gain rate were higher than the income rate, I would not make risky investments. I could use my money to invest in my own business -- where I have expenses available. And, take an income. Any loss would then be an expense.
I just wouldn't invest in other business.
How would you encourage investment behavior?
I hope /s means "sarcastic".
https://github.com/ratboy666/string
(Microsoft F80 was a FORTRAN 66, slightly subset compiler -- no COMPLEX that Microsoft sold from the late 70s to early 80s).
In there find pop.mac which is a short 4 byte assembly routine to discard a stack level. That can be used as follows:
ASSIGN 1 TO I -- STORE ADDRESS OF LABEL 1 TO I
CALL F(I) -- PASS I TO SUBROUTINE F
... -- WE WILL NEVER GET HERE
1 ...
SUBROUTINE F(I)
EXTERNAL $POP
INTEGER $POP
JUNK = $POP(0) -- REMOVE RETURN ADDRESS
GO TO I -- GO TO ASSIGNED LABEL I
END
The ASSIGN command puts the address of label 1 into INTEGER I
GO TO I then transfers to that location. Note that we can pass I into the
SUBROUTINE, use $POP to remove a stack level (the return address), then
jump to the variable. Scheme is nicer, which continuations, of course, but
that hadn't been considered yet...The ASSIGN was deleted as a feature in FORTRAN 95 -- obsolescent by FORTRAN 90. I guess "very very old-school".
Now, the FORTRAN 66 standard doesn't mention if something like this is allowed... but, since no stack was involved in early implementations, and recursion was not allowed, I imagine that it would work more widely than might otherwise be expected.
https://oceanservice.noaa.gov/facts/carbon-cycle.html
https://pubs.acs.org/doi/10.1021/acs.energyfuels.8b02803
which is CO2 to calcium carbonate. This happens in nature and is used by coral.
So, all that CO2 in the atmosphere can become trees and coral.
Ok -- Empty out the North.
http://www.mappedplanet.com/karten/klima/januar_temp-na.png
How about it? I get to move to Memphis, where I no longer need to heat my dwelling in the Winter.
https://www.chatelaine.com/home-decor/environment-eco-home-h...
I pay 11.3 cents per k/w for electricy
https://www.torontohydro.com/for-home/rates
Natural gas costs 4.71 US/MMBtu
https://www.torontohydro.com/for-home/rates
Now
1 MMBTU = 293.07107 kWh
So with ALL of this, electricity is 7 times more expensive than natural gas.
Now, it costs $125 or so per month to heat a house here - Using electricity, that would be $875. Per month.
https://www.torontohydro.com/about-us/company-overview
Only 6.3% Natural Gas.
In a nutshell, I can't afford it. That's ok, I can just to Memphis for my retirement.
Made sense 50 years ago... makes sense now.
FredW
To meet your challenge, think about the problem. How about this?
file size + 1 => s
allocate char buffer b[s]
read file to b (all data must be in memory, or merge sort. if on linux and allocation worked, read may fail! oom will get us, or we bail on read failure)
add final newline if missing
count newlines => n
allocate line pointers p[n] (if line pointers will not fit, we bail -- we could use offsets and fancy virtualization, if this is not a Z80)
fill pointer array p
sort => sorted[n] (if sorting fails, bail)
output sorted lines
Same for C and C++. UTF-8 is ok.Do you want more data than will fit into memory? Even then, C++ doesn't bring much to the table. Separating the sort algorithm? Yes C++ BEGINs to pull ahead by a bit.
safe? yes. easy to write? yes. no fancy bits? yes. Transcribe to C C++ as you will. Java? won't be as pretty. Rust, Go? don't know. Javascript. Not even close.
Since this is a "beginning programmer" problem, give a design that works for another language that makes sense to a beginning programmer.
"ls" lists files. Sure. Simple interactive command. But, thinking about this, "echo " also lists files. "ls" provides information about files. Sure. Simple interactive command. But, "stat" specifically provides information.
So, I would reach for
stat --format "%n %a"
To get name and octal permissions. You are correct, and wrong at the same time. Easy enough to accomplish -- but using * instead of ls. Note that the "space in filename" becomes the big issue (use %N in stat format).
So your conclusion is 100% correct. Thank you for your post and insight
For example, my editor (which I use for work like this)
MODE-'COBOL'
72.b -.a -.t -.h 8.h 12.h
.r
Roughly: for COBOL - ring alarm bell if I type past column 72. Do not autoindent. Do not use tabs (spaces only). Remove all tabulation except at column 8 and column 12. For FORTRAN 66 (77) work, I just set a single tabulation at column 7.But that is just me. You should look into THE: The Hessling Editor on linux, etc. Look into Regina Rexx.
which would be all the "tooling" needed. You could run a mainframe emulator (look into Hercules)
How is 80 column "punch card" style editing and printer output terrible?
If it referred to SNA, it should be SNA/SDLC. Not referencing that (or VTAM) means Software Development Life Cycle.
: fred@tara ~ $; cat /etc/fedora-release
Fedora release 31 (Thirty One)
: fred@tara ~ $; make -p | grep FEAT
make: *** No targets specified and no makefile found. Stop.
.FEATURES := target-specific order-only second-expansion else-if shortest-stem undefine oneshell archives jobserver output-sync check-symlink guile load
: fred@tara ~ $;
guile available -- so, its enabled in Fedora. : fred@tara ~ $; ls -l `which make`
-rwxr-xr-x. 1 root root 248624 Dec 10 17:34 /usr/bin/make
: fred@tara ~ $;
and, just to validate guile availability: : fred@tara ~ $; ldd `which make`
linux-vdso.so.1 (0x00007ffce61cb000)
libguile-2.2.so.1 => /lib64/libguile-2.2.so.1 (0x00007fc423432000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fc42342b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc423409000)
libc.so.6 => /lib64/libc.so.6 (0x00007fc423240000)
libgc.so.1 => /lib64/libgc.so.1 (0x00007fc4230e1000)
libffi.so.6 => /lib64/libffi.so.6 (0x00007fc4230d6000)
libunistring.so.2 => /lib64/libunistring.so.2 (0x00007fc422f50000)
libgmp.so.10 => /lib64/libgmp.so.10 (0x00007fc422ed3000)
libltdl.so.7 => /lib64/libltdl.so.7 (0x00007fc422ec7000)
libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007fc422e8c000)
libm.so.6 => /lib64/libm.so.6 (0x00007fc422d46000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc4235ed000)
libatomic_ops.so.1 => /lib64/libatomic_ops.so.1 (0x00007fc422d41000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc422d25000)
: fred@tara ~ $;
Yes, libgc and libgmp are needed
(182k for libgc, 1.3mb for libgmp, 1.3mb for libguile itself) as opposed to 3.3m for python3. Seems comparable, including dependencies.A country cannot be rich. Its people can be. If you have a definition that differs, we can discuss. I am going to avoid "basic healthcare" for now. We can discuss "for all". Does that mean for people born in the country? Or does it really mean "for all people"?
FredW
No need for garbage collection, no need for "memory management". Not shoddy work. An expression of "YAGNI". The interesting thing (in my opinion), is the realization. The teller of the story went to the trouble of discovering that memory is leaking. She could have simply asked before engaging the work.
FredW
I interfaced CEF to Java in 2000 lines of C++
Simple, easy API. I run CEF in a separate process, and use the Window manager (Linux and Windows) to cause the Chrome windows to overlay the application windows. Standard pipes are used between the controlling process and CEF.
Email me if you are interested. As a ps -- I can use CEF from shell scripts as well. Anything with a C FFI works.
FredW
Yes, creating a parser with grep isn't usually desired. But, "plain text" is quite useful. And, with JSON and sqlite3 in easy reach, I don't see the massive issue.
Please -- I would like examples where you had issues with doing something even slightly complicated with "just text", and had difficulty. I really want to examine this. Either the text toolkits are not adequate, or I will be convinced that I am wrong, and will investigate structured CLI and OS interfaces.
FredW
Take /etc/passwd. It does have a query language. getpwent(), login, passwd
It has data types -- again getpwent() (man getpwent) needs pwd.h
It has "parallel writes". Multiple users can use passwd at the same time. It has "transactions" -- mostly because of inodes.
Similar comments apply to utmp and wtmp (note that utmp and wtmp are not ascii -- they are binary records). /etc/services is ALSO structured but is ascii. Less controlled, because it is almost always "read-only".
Of course, in a very strange sense, you are correct. Any structure imposed is NOT by the kernel -- this is "post init", or user level.
FredW
As to debugging -- many of these systems did not have "debuggers" -- an example would be Whitesmiths C in the late 70s and the 80s. We used a strategy of old-school paper validation, combined with function testing. Yes, things moved more slowly.
Code can be maintained. The above C89 code was just compiled with gcc 9.2.1 -- with gcc -std=c89 c89.c it compiled without warning, and ran (40 year old code).
The issue with (say) bring forward Whitesmiths C is that the Whitesmiths standard library is not POSIX. Not hard to convert, though. For example (as I recall) %d was %i
FORTRAN 77 (and FORTRAN IV) is in a similar category. As is COBOL and Common LISP.
SNOBOL4 is a bit of an outlier -- The original interpreter was written in macro assembler. That assembler is now converted to C, and the original interpreter can still be run:
The Macro Implementation of SNOBOL4 in C (CSNOBOL4BX) Version 2.0 by Philip L. Budne, January 1, 2015 SNOBOL4 (Version 3.11, May 19, 1975) BLOCKS (Version 1.10, April 1, 1973) Bell Telephone Laboratories, Incorporated EXTENSIONS (Version 0.25, June 16, 2015) Fred Weigel
No errors detected in source program
CODE (TUE AUG 4 10:28:58 EDT 2015) RUNNING ON CSNOBOL4 MAINBOL WITH SPITBOL, BLOCKS, EXTENSIONS ENTER SNOBOL4 STATEMENTS (TRY ? FOR HELP) 5,541,616 BYTES FREE CODE:
And, yes, I modified the original interpreter to add some extensions back in 2015. However, Budne has published the pattern matching engine in Javascript so there is an easy migration for those programs (https://github.com/philbudne/spipatjs).
In my opinion (and this is strictly my opinion), only Javascript appears to have this "lasting" property wrt modern languages. An important characteristic is simplicity, and forward-backward compatibility. As well, multiple implementations are important.
FredW
int main() {
func('a');
}
func(c)
char c;
{
char * s = &c;
printf("%c\n", * s);
}
is, um, dangerous. c is an int, not a char. So on a big endian machine, s may end up pointing to the high byte. Taking the address of a parameter is dangerous, unless the widening is taken into account.
This does work on a little endian machine (tried it). On a 68000, it likely doesn't print 'a' (\0 is most likely).
On little-endian, this is a lot safer. ANSI C takes care of this as well. Yes, we can "debug it". There is a chance that all knowledge of this is lost. But, for now, those of us "in the know" have experience to keep the old alive.