HNHacker News
TopNewBestAskShowJobs

ratboy666

226 karma · joined May 17, 2013

submissionscomments
ratboy666··on [dead]
"Flag me" -- um... hold on. The comment I replied to was rac ist. That was the most polite response. Now, please dang, or whoever, delete my account. Thanks in advance. I am out.
ratboy666··on [dead]
"All white people have privilege".

Thanks for that -- I'll tell you what I tell anyone who tells me that. Move to SA.

ratboy666··on [dead]
You quote

> A disproportionate share of the estimated 20 million police traffic stops in the United States each year involve black drivers, even though they are no more likely to break traffic laws than whites.

In response -- how do you know? In rebuttal:

https://www.nytimes.com/2002/03/21/nyregion/study-suggests-r...

ratboy666··on Backblaze cuts B2 download price in half
I use minio for this. I then use the minio node library to access minio, B2 and S3.
ratboy666··on The Makefile I use with JavaScript projects
just make "send" not be a phony target.

How about "touch send"?

Now "touch -t" will allow you to control the timestamp.

md5sum, diff would be your friends.

Anyway, my C compiler doesn't provide that info, anyway.

ratboy666··on The Makefile I use with JavaScript projects
Um... no it doesn't. It takes each space delimited name as a new name. You will need to add "" and quote the names -- but Windows shell only has one level of quoting, (") which means you can't easily type the command you need. Unix shell is a bit better. Unix only appears worse because people do attempt scripting.

Directory of C:\Users\fred

12/14/2017 04:44 PM 1,556 new 2.txt 1 File(s) 1,556 bytes 0 Dir(s) 75,989,876,736 bytes free

C:\Users\fred>dir new 2.txt Volume in drive C has no label. Volume Serial Number is BA05-C445

Directory of C:\Users\fred

Directory of C:\Users\fred

File Not Found

C:\Users\fred>

ratboy666··on Elm changed my mind about unpopular languages
1 + "1" => "11" is not the sign of an "untyped" language. I would expect 1 + "1" => 50 (ascii asm), 1 + "1" => 242 (ebcdic asm) or 1 + 1 => 2 (length tagged string, eg, untyped pascal-ish variant), or 1 + "1" => some seemingly random value (C lang) in an "untyped" language.

1 + "1" => "11" is strongly typed, dynamically typed, with a particular type conversion that favours "strings".

But, on reflection, I am probably an pedantic iconoclast.

ratboy666··on Gosh Darn Function Pointers
Whatever happened to cdecl?

  : fred@dejah sql $; cdecl
  Type `help' or `?' for help
  cdecl> declare x as pointer to function returning int
  int (*x)()
  cdecl> declare x as pointer to function returning pointer to function returning int
  int (*(*x)())()
  cdecl>
ratboy666··on Why Uber Can Find You but 911 Can’t
Since I wrote the software for a 911 CAD (computer aided dispatch) used by a primary PSAP (public safety access point) -- yes.

But... The 911 operator has to initiate the SMS exchange. Kind of strange. I believe that, in certain jurisdictions, TDD service for the deaf was a revenue stream for the incumbent telcom carrier. So, cell phones are specified to have to be "registered" to allow 911 SMS (this is just my speculation). The 911 operator has to initiate the exchange (in the areas that the system I work on is used).

Incoming 911 data already contains location data (from tower triangulation, etc.). More interesting is that the 911 operator must manually request location updates (secondary reports) and that these cannot be requested more frequently than 35 seconds apart (again, these regulations apply in my area). Again, stinking regulations.

Anyway, the data available (formats) are documented by NENA (National Emergency Number Association). www.nena.org. But... carriers (Bell, Telus here) use supersets of those formats.

The problem is not flexibility -- the systems are in place, and must inter-operate. IP networking for these systems is not completely in place (some use serial communications). The cut-over to IP networking is still on-going, and some places use parallel serial and IP networking.

And, of course, 911 operators get ANI/ALI (automatic number identification, automatic location identification) data for home phones (ALI by database, usually), and the mobile needs to be incorporated in such a way as not to confuse the dispatch operators.

ratboy666··on A simple makefile is a unicorn
Love me some make -- here is a session:

  : fred@dejah ~ $; cat >hello.c
  #include <stdio.h>
  int main() {printf("hello\n"); return 0;}
  ^D
  : fred@dejah ~ $; make hello
  gcc     hello.c   -o hello
  : fred@dejah ~ $; 
How about that? make with no Makefile. The unicorn doesn't even exist. Which is as clean as it can get. make only resolves dependencies. Which is as slim as it can get. Early we agree on.
ratboy666··on How does GDB call functions?
longjmp() (and friends) is trapped because it causes a non-local transfer of control. Basically, it can go anywhere. the "p foo()" would then not return to the prompt. What we know is that longjmp() will leave the function (it goes to where the setjmp() was called from).

Also, look into libffi for how to call a C function by building a call.

ratboy666··on The Silicon Valley paradox: one in four people are at risk of hunger
Yes... too many people. If a software eng or ceo wanted to eat out, someone has to prepare the food. The person, in turn, has to live there.

So, if 86,000 is "poor" (defined as the minimum needed to live in the area), the person doing the food preparation has to be paid at least that. The "burger flipper" has to be paid that.

If people moved out, quickly the "burger flipper WOULD be paid that". But that, in turn, would attract "burger flippers" who simply compare the money. Resulting in high unemployment, and the need for food banks again.

Its the concentration of rich people that is the problem.

ratboy666··on Shot by Cops and Forgotten
"What do we want?" "Dead Cops" "When do we want them?" "Now"

Sure, bombastic hyperbole. But... http://www.newsweek.com/police-line-duty-deaths-increase-201...

ratboy666··on Gerbil – An opinionated dialect of Scheme designed for systems programming
Based on Gambit-C: A scheme to C (or javascript... and I think there may be other targets) compiler. Comes with a Scheme->target compiler, then compile that code, and deploy. So, you write in Scheme, and deliver in C...

Comes with an interpreter. Supports macros, etc. and Gambit supports easy C FFI, option for infix syntax, massive threading, full numeric tower

Easy to hack on (in my opinion), and performs very well. Gambit-C has been my "goto" Scheme for the past decade.

Could be used as an "extension language", but not its main purpose. Mostly, a way to deliver Scheme code that runs fast.

Racket has a better IDE -- but I like the simplicity of Gambit-C.

ratboy666··on JavaScript: The Curious Case of null &gt;= 0
Come on! Tongue in cheek

  a += !!record.bool;
There now. Happier?
ratboy666··on JavaScript: The Curious Case of null &gt;= 0
No. In SNOBOL4 (one of the first dynamic typing languages) -- ident(x) yields true if x is "null", eq(x) is true if x is 0, gt(x) is ">" and ge(x) is ">=". The program "code" is a repl.

Notice -- free format dynamic typing, and, it gets it "right". This language/run-time was originally from the late '60s, last official update in 1975 (with some updates in the intervening decades).

Yes, according to the Javascript spec, the JS behaviour is correct. However, something as old as SNOBOL4 should have taught us that keeping type converting numerical operators dis-similar from object comparision would be good: "==" and "===" vs ident() and eq() and then relating ge() le() etc to the numeric class of operations consistently.

  : fred@dejah wittgenstein $; code
  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: ident()
  SUCCESS
  CODE: ident(0)
  FAILURE
  CODE: eq(0)
  SUCCESS
  CODE: eq()
  SUCCESS
  CODE: gt()
  FAILURE
  CODE: ge()
  SUCCESS
  CODE:quit
  Normal termination at level 1
  code.lss:660: Last statement executed was 938
  SNOBOL4 statistics summary-
          5.384 ms. Compilation time
         90.585 ms. Execution time
          20577 Statements executed, 121 failed
          20004 Arithmetic operations performed
            122 Pattern matches performed
              2 Regenerations of dynamic storage
         29.481 ms. Execution time in GC
              0 Reads performed
             10 Writes performed
       4402.237 ns. Average per statement executed
        227.157 Thousand statements per second
  : fred@dejah wittgenstein $; 
and, keeping in the spirit:

  CODE: ge('a')
  EXECUTION ERROR #1, Illegal data type
  FAILURE
Allow the explicit capture of "type" errors. We knew this in 1975. Why was this forgotten?
ratboy666··on Some Were Meant for C: The Endurance of an Unmanageable Language [pdf]
Tagged unions? -- please no... I could be convinced to completely lose unions in C, though (pointer to member or base of struct can be cast to another struct anyway, so losing unions doesn't gain anything; for the same reason tagged unions just would not be useful)

Boolean type? Sure, but that would be dependent on use. What is wrong with a bitfield one bit wide instead? What may be useful is "packed bitfield" type ("packed" in Pascal). Then, array of packed bit could be expressed.

Multiple return types - yes, "return a b;" (or something would be nice.

Lack of polymorphism - reference "void *" The main problem is that calls cannot be constructed in C (that is, the standard does not have a "C to C" FFI.

Anyway, just food for thought.

ratboy666··on Fastest Way to Delete Large Folders in Windows (2015)
That was CP/M-80 filesystem. The free-space allocation map was created when the disc was mounted, by scanning all file entries. Free space was available via STAT (afair).

DOS (FAT) used an allocation list on disc. CP/M couldn't corrupt the free-list (didn't have one). Unix is a different animal. CP/M didn't have "folders" (user areas instead).

ratboy666··on How former professional climate change skeptic Jerry Taylor changed his mind
Edmund -- that would be a "climate change denier" position.

Since climate is always changing, the effect of climate change cannot be, and will never be, fully realized.

The question then becomes "when will that retro-active action be allowed"? What triggers that certainty?

ratboy666··on Fedora dev: “HN feedback on what they want from their Desktop – We got it”
When the "windows" key (for me the "command" key -- I use a Mac BT keyboard), the visible windows are shrunk (but readable) and the I start to type. I can still read the window contents (1920x1080 11" display, 10 point touch). The desktop is not blanked out. On that selection screen, I have fast-start icons, and the desktop selector. Yes, it is "different" but I find it more usable than either Windows or Mac.

Of course, that may be due to familiarity. My primary platform is a mobile device, but I also use Gnome 3 (Fedora) on desktops. We use Mate on RHEL 7 on our larger display configurations (4x4K monitor in a 2x2 grid and 3x4K in horizontal configurations). But, on those configurations, we lock down and don't offer start menus to the end-user at all (kiosk style application).

I do like Gnome 3 for general use, though.

ratboy666··on GCC optimized code gives strange floating point results
I thought it was

(a / b) != (a / b)

ratboy666··on Scientists have detected a major change to the Earth’s oceans
I will (for argument sake) concede every point you made. Every point.

Two questions to ponder -

Is climate change "good" or "bad"? What causes climate change?

I suspect that the largest driver is solar activity.

Anyway, please keep "left" vs "right" out of this.

ratboy666··on Talking to C Programmers about C++ [video]
Sure, with an execution model that is so complex that it takes scientific experimentation to determine the /best/ (in terms of execution speed) to write code to manipulate a simple memory mapped device. (This, from the lecture).

That is so complex, it is the only language that I need the language at hand to read someone else's code. Not a library reference, a /language/ reference.

Indeed, I am maintaing one C++ application. This is a wrapper for CEF3 (https://cefbuilds.com/). This is the Chromium browser as a library. I have to support the library and wrapper on two platforms: Linux 64 bit and Windows 64 bit. Note that the usual Windows build uses the Microsoft C++ compiler. But, I am uses mingw. This requires source code edits to compile! I blame the complexity of the language.

Indeed, C++ is so difficult that the shop I work for (which is, by the nature of our product, very conservative) has gone to Java instead.

ratboy666··on A Simple Makefile for Medium-Sized C/C++ Projects
hello.c in a directory

make hello

Easier?

ratboy666··on PowerShell is open sourced and is available on Linux
If you meant Java, say Java please. Brand "J"? To me, that would mean J/K/APL/APL2 (MATLAB, Nial, S, R, and other array systems). But I guess Brand "J" is cute.
ratboy666··on PowerShell is open sourced and is available on Linux
I am not sure what your example does. How does it differ from

find . -name ".docx"

ls -Recurse | ? { $_.Name -match ".+docx" }

And, if these are the same, why type in twice as many characters as a command? Actually,

ls -R | grep "\.docx$"

is, I think, closer in spirit.

Now, the issue is things further in the pipeline, I imagine. The find solution allows selection on type name, type, date, depth, mounts, properties, file system type, ownership, relative age, inode, symbolic link. find actions include delete, exec, print, quit. This can pass on needed information to further pipeline commands.

However, an interactive shell is meant to allow expression of commands with a reasonable minimum of keyboarding (thus ls and not dir). I could argue that the "Unix" command should be

find . -n ".docx"

(because the most common -n... option used is -name).

I think, to be fully reasonable the find command you want is

find . -regex ".*\.docx$"

which is still shorter than the PS example. I am not sure that for most interactive tasks, PS is a win. It does appear to be more elegant, but only usage over time will show if it is indeed more productive. I am looking for academic productive studies to be done, now that both bash and PS are available on common platforms.

ratboy666··on GPLv4 – Starting the Conversation (2014)
Consider that the purpose of using the GPL is to ensure that the users of software have the right to examine and change the software. It also ensures that those rights cannot be removed.

That would be the "broad range of interpretation".

If that is NOT compatible with your goals, do not use the GPL. Also, do not include any software using the GPL. For example, embedded systems using BusyBox.

However, adopting the GPL (and those user rights) should give you an advantage -- code that works and provides a time to market advantage.

ratboy666··on Excel: Error when CSV file starts with “I” and “D”
Alrighty, then, on Linux, just for you.

[fred@dejah launch]$ chmod +x foo.txt [fred@dejah launch]$ ./foo.txt fixme:winediag:start_process Wine Staging 1.9.12 is a testing version containing experimental patches. fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. winevdm: Cannot start DOS application E:\launch\foo.txt because the DOS memory range is unavailable. You should install DOSBox. [fred@dejah launch]$

I have Wine installed. Same defect as Windows, which is either good or bad -- this is hard to determine.

At least, the hint of installing DOSBox is reasonable. So, let's do that:

[fred@dejah launch]$ sudo dnf install dosbox

and try it again:

[fred@dejah launch]$ ./foo.txt fixme:winediag:start_process Wine Staging 1.9.12 is a testing version containing experimental patches. fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. DOSBox version 0.74 Copyright 2002-2010 DOSBox Team, published under GNU GPL. --- ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

CONFIG: Generating default configuration. Writing it to /home/fred/.dosbox/dosbox-0.74.conf CONFIG:Loading primary settings from config file /home/fred/.dosbox/dosbox-0.74.conf CONFIG:Loading additional settings from config file /home/fred/.wine/dosdevices/c:/users/fred/Temp/cfgcbaf.tmp MIXER:Can't open audio: No available audio device , running in nosound mode. ALSA:Can't subscribe to MIDI port (65:0) nor (17:0) MIDI:Opened device:none [fred@dejah launch]$

ratboy666··on Show HN: Assembly to C code Decompiler
How do you deal with self-modifying code? My old FORTRAN compiler generated that 8080 target
ratboy666··on Ask HN: Oldest code you have written that is still in use?
My text editor (Assembler, then C), 1982. Some F18 Hornet software (C, ground station support), also 1982. Humphrey Utrasound Biometer (updates, Z-80 assembler), 1992. Kodak Spark-based picture kiosk (Solaris 8 upgrade, Solaris patches for FAT, USB, PCMCIA), 1999.

But why?

← PreviousPage 5 of 7Next →