HNHacker News
TopNewBestAskShowJobs

Koshkin

7,800 karma · joined January 28, 2016

submissionscomments
Koshkin··on C Is Best (2025)
> in exactly the same way

C is not known to the state of California to cause cancer.

Koshkin··on Rob Pike goes nuclear over GenAI
"What is going through the mind of someone who sends a thank-you letter typed on a computer - and worse yet - by emailing it, instead of writing it themselves and mailing it in an envelope? How can you be grateful enough to want to send someone such a letter but not grateful enough to use a pen and write it with your own hand?"
Koshkin··on Nabokov's guide to foreigners learning Russian
I have witnessed a child having learned it in one day.
Koshkin··on Nabokov's guide to foreigners learning Russian
With the exception of some "ligatures" like Ю (I + O) and special characters like Ъ, Cyrillic is largely based on Greek and some Aramaic (e.g. Ш). In the past it included pretty much the entire Greek alphabet.
Koshkin··on Nabokov's guide to foreigners learning Russian
Also compare the Polish 'chrząszcz' with its Cyrillic equivalent 'хрущ' (but take into account a difference in pronunciation).
Koshkin··on Nabokov's guide to foreigners learning Russian
> Learning the language of a nation

A nation doesn't own the language.

Koshkin··on The Ultimate Windows Utility (2022)
Funny you should mention Linux.
Koshkin··on The FreeBSD Foundation's Laptop Support and Usability Project
Darwin is a BSD derivative, yes.
Koshkin··on The Illustrated Transformer
> is just a synthetic human performing reasoning

The future is now! (Not because of "a synthetic human" per se but because of people thinking of them as something unremarkable.)

Koshkin··on The Illustrated Transformer
(Going on a tangent.) The number of transformer explanations/tutorials is becoming overwhelming. Reminds me of monads (or maybe calculus). Someone feels a spark of enlightenment at some point (while, often, in fact, remaining deeply confused), and an urge to share their newly acquired (mis)understanding with a wide audience.
Koshkin··on Egyptian Hieroglyphs: Lesson 1
Except (just to be clear) no native speaker would ever pronounce 'o' in 'yot' and 'foley' the same way.
Koshkin··on Egyptian Hieroglyphs: Lesson 1
Sure: “yaht” and “yot” sound virtually the same (at least in American English), only maybe slightly different in the length of the vowel; “folly” and “foley”, on the other hand, sound very different from one another.
Koshkin··on Egyptian Hieroglyphs: Lesson 1
Originally the aleph was intended to be merely a placeholder for a missing consonant at the beginning of a word, which effectively made it look like something representing (any) vowel.
Koshkin··on Egyptian Hieroglyphs: Lesson 1
Not even close.
Koshkin··on The Nova Programming Language
Prolog-style programming
Koshkin··on Emacs is my new window manager (2015)
https://news.ycombinator.com/item?id=45794553
Koshkin··on Python is not a great language for data science
At least in C++ you don't need 'matmul'
Koshkin··on Python is not a great language for data science
IDK it's become too verbose IMHO, looks almost like COBOL now. (I think it was Fortran 66 that was the last Fortran true to its nature as a "Formula Translator"...)
Koshkin··on Hollywood's vision of ancient Rome is all wrong, according to Mary Beard
Hollywood "vision" of everything is "wrong." This is because all they want is a story, one that is relatable, to the largest degree possible, to their audience, with all the stereotypes said audience has acquired over generations. Basically, it is nothing but Star Trek, over and over again. (Wanted to add, "... and that's OK" - but I am not sure.)
Koshkin··on Trillions spent and big software projects are still failing
“I love deadlines. I love the whooshing noise they make as they go by.” ― Douglas Adams
Koshkin··on TextEdit and the relief of simple software
IDK vim and emacs are probably not for everyone, they are like the "higher math" of editing...
Koshkin··on What do we do if SETI is successful?
Right; or, since they are not competing with us for resources, they could kill us just for sport.
Koshkin··on Greenland is a beautiful nightmare
Greenland may be a good place to put data centers on
Koshkin··on Is life a form of computation?
> terminal

Some prefer GUI

Koshkin··on Harvey Mudd Miniature Machine
Nice.

Here's one from (the younger) me:

  =======================
  Description
  =======================
  
  24-bit words (no bytes, so no endianness)
  
  <op> 5 <dir/ind> 1 <r1/cond> 3 <r2> 3 <val> 12
  r2 = 0 means zero value
  
  dir/ind:
  
  0 dir
  1 ind
  
  cond:
  
  001 eq
  010 lt 
  1000 gt
  
  8 regs
  
  r0 = PC
  
  op:
  
  00x xx0 - type independent
  01x xx0 - bitwise
  10x xx0 - integer
  11x xx0 - floating-point
  
  ST 00 ; store (ignores ind/dir)
  LD 02 ; load/move
  BR 04 ; branch (rel/abs)
  
  SL 20 ; shift left
  SR 22 ; shift right
  SA 24 ; shift right arithmetical
  OR 26 ; or
  AN 30 ; and
  OX 32 ; or exclusive (xor)
  NO 34 ; not
  
  AD 40 ; add
  SB 42 ; subtract
  MU 44 ; multiply
  DV 46 ; divide
  CP 50 ; compare
  
  FA 60 ; add
  FS 62 ; subtract
  FM 64 ; multiply
  FD 66 ; divide
  FC 70 ; compare
  
  example:
  
  LD r1, [4096] ; |03121000|
  AD r1, 1      ; |40100001|
  LD r2, r1     ; |02210000|
  SB r2, 33     ; |42200033|
  BR le, exit   ; |04300001|
  ST r1, [4096] ; |01201000|
  exit: .
  
  floating-point format - normalized:
  
  <sign> 1 <exp> 7 <mantissa> 16 + 1 implicit
  
  literals:
  
  decimal: -8,388,608 ... 8,388,607 (can use commas)
  binary (in octal): |42200033|
  floating-point: 1.23e-45
  character sequence 'abc' (3 characters per word)
  
  r0 can be used as a temporary
  
  =======================
  Implementation
  =======================
  
  #include <stdio.h>
  #include <ctype.h>
  
  #define n 1024
  #define trace(op) fprintf(stderr, "%04o %s\n", r0, #op)
  
  enum {
         ST = 000, /* store (ignores ind/dir) */
         LD = 002, /* load/move */
         BR = 004, /* branch (ignores ind/dir) */
  
         SL = 020, /* shift left */
         SR = 022, /* shift right */
         SA = 024, /* shift right arithmetical */
         OR = 026, /* or */
         AN = 030, /* and */
         OX = 032, /* or exclusive (xor) */
         NO = 034, /* not */
  
         AD = 040, /* add */
         SB = 042, /* subtract */
         MU = 044, /* multiply */
         DV = 046, /* divide */
         CP = 050, /* compare */
  
         FA = 060, /* add */
         FS = 062, /* subtract */
         FM = 064, /* multiply */
         FD = 066, /* divide */
         FC = 070 /* compare */
  };
  
  int main() {
         static int b[n];
         /* load image */
         int c, *p, s, z;
         static int r[8];
         for (s = 21, p = b; p < b + n && (c = getchar()) > 0;)
                 if (isdigit(c) && c <= '7') {
                         *p |= (~0x30 & c) << s;
                         if (s)
                                 s -=3;
                         else
                                 s = 21, ++p;
                 }
         /* run image */
         c = 7;
         while (r[0] >= 0 && r[0] < n) {
                 int i, o, d, x, y, v, r0;
                 i = b[r0 = r[0]++]; /* inc PC */
                 o = (i >> 19 & 31) << 1;
                 d = !(i >> 18 & 1);
                 x = i >> 15 & 7;
                 y = i >> 12 & 7;
                 v = ((i << 20) >> 20) + (y ? r[y] : 0); /* assuming 32-bit ints */
                 switch(o) {
                         case ST: b[v] = r[x]; trace(ST); break;
                         case LD: r[x] = d ? v : b[v]; trace(LD); break;
                         case BR: if (x & c) r[0] += v; trace(BR); break;
                         case SL: r[x] <<= v; c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(SL); break;
                         case SR: r[x] >> v; c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(SR); break;
                         case SA: r[x] >> (unsigned) v; c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(SA); break;
                         case OR: r[x] |= (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(OR); break;
                         case AN: r[x] &= (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(AN); break;
                         case OX: r[x] ^= (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(OX); break;
                         case NO: r[x] = ~r[x]; c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(NO); break;
                         case AD: r[x] += (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(AD); break; 
                         case SB: r[x] -= (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(SB); break;
                         case MU: r[x] *= (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(MU); break;
                         case DV: r[x + 1] = r[x] % (d ? v : b[v]); r[x] /= (d ? v : b[v]); c = r[x] == 0 ? 1 : r[x] < 0 ? 2 : 4; trace(DV); break;
                         case CP: c = r[x] == (d ? v : b[v]) ? 1 : r[x] < (d ? v : b[v]) ? 2 : 4; trace(CP); break;
                         case FA: trace(FA); break; /* TODO */
                         case FS: trace(FS); break; /* TODO */
                         case FM: trace(FM); break; /* TODO */
                         case FD: trace(FD); break; /* TODO */
                         case FC: trace(FC); break; /* TODO */
                 }
         }
         /* print image */
         for (z = 0, p = b; p < b + n; ++p) 
                 if (*p) {
                         int m;
                         if (z) {
                                 puts("00000000");
                                 if (z > 3)
                                         puts("........");
                                 else if (z > 1)
                                         puts("00000000");
                                 if (z > 2)                      
                                         puts("00000000");
                                 z = 0;
                         }
                         for (s = 21, m = 7 << s; m; m >>= 3, s -= 3)
                                 putchar(0x30 | (*p & m) >> s);
                         putchar('\n');
                 }
                 else
                         ++z;
         return 0;
  }
  
  =======================
  Example: Bubble Sort
  =======================
  
  0000 LD r1, 10              ; n = 8        02100010
  
  repeat:
  0001 SB r1, 1               ; n = n - 1    42100001
  0002 LD r2, 0               ; i = 0        02200000
  0003 LD r3, 0               ; f = false    02300000
  
  compare:
  0004 LD r4, [r2 + data]     ;              03420021
  0005 CP r4, [r2 + data + 1] ;              51420022
  0006 BR le, next            ;              04300004
  
  0007 LD r5, [r2 + data + 1] ; swap         03520022
  0010 ST r5, [r2 + data]     ;              00520021
  0011 ST r4, [r2 + data + 1] ;              00420022
  0012 LD r3, 1               ; f = true     02300001
  
  next:
  0013 AD r2, 1               ; i = i + 1    40200001
  0014 CP r2, r1              ; i < n ?      50210000
  0015 BR lt, compare         ;              04207766
  
  0016 CP r3, 0               ; f = false ?  50300000
  0017 BR eq, 2000            ; exit         04102000
  0020 BR   , repeat          ;              04707760
  
  data:
  0021 9                      ;              00000011
  0022 8                      ;              00000010
  0023 5                      ;              00000005
  0024 6                      ;              00000006
  0025 3                      ;              00000003
  0026 7                      ;              00000007
  0027 2                      ;              00000002
  0030 1                      ;              00000001
Koshkin··on Show HN: Term.everything – Run any GUI app in the terminal
> in the terminal

A note to myself: this won't work in the text mode.

Koshkin··on What Is the Fourier Transform?
> The waves that oscillate more quickly — meaning they have more energy

Isn't this essentially a quantum-mechanical concept?

Koshkin··on Anna's Archive: An Update from the Team
> the last good things

Last but not least?

Koshkin··on QNX: The Incredible 1.44M Demo
> one of the single

Exactly.

Koshkin··on Visualizing quaternions: An explorable video series (2018)
I am not familiar with this area, but see, e.g. https://link.springer.com/book/10.1007/978-3-0348-0622-0

There are also these notes: https://www.geometrictools.com/Documentation/Quaternions.pdf

← PreviousPage 3 of 34Next →