HNHacker News
TopNewBestAskShowJobs

senozhatsky

165 karma · joined April 10, 2015

Linux kernel developer. Japan.
submissionscomments
senozhatsky··on Libc on macOS invokes Perl as a subprocess for string processing (2017)
Shall somebody send a pull request [0]

    -    /* XXX this is _not_ designed to be fast */
    +    /* XXX this is _not_ designed to be safe */
[0] https://github.com/Apple-FOSS-Mirror/Libc/blob/2ca2ae7464771...
senozhatsky··on History of the Plan 9 kernel (1990 – 2003)
Pretty interesting. They use nil pointers everywhere, but also mention a NULL pointer:

    pc/ether82557.c:        NullPointer     = 0xFFFFFFFF,   /* 82557 NULL pointer */

Or qget():

    /*                                                                              
     *  get next block from a queue, return null if nothing there                   
     */

        if(b == nil){
                q->state |= Qstarve;
                iunlock(q);
                return nil;
        }
So null and nil pointers.

It was always interesting to me; there were null-terminated strings and null-bytes [0], but nil pointers. And then, occasionally, null and NULL pointers.

[0] https://www.unix.com/man-page/plan9/2/strcat/

-ss

senozhatsky··on The Largest Vocabulary in Hip Hop (2014)
Somewhat related, I learned a new word today - conversant :) Thanks.

-ss

senozhatsky··on A book list for OS kernel developers and device driver writers (2006)
Impressive! Did you read all of them? It took me quite a while to finish "Understanding the Linux kernel" and "Linux kernel development".

-ss

senozhatsky··on A book list for OS kernel developers and device driver writers (2006)
Speaking of the Linux kernel related books, I'd probably mention, Understanding The Linux Kernel [0] and Linux Kernel Development [1]. The LDDv4 is not going to happen any time soon; it seems there are no plans for a new edition at all.

  [0] https://www.amazon.com/Understanding-Linux-Kernel-Third-Daniel/dp/0596005652
  [1] https://www.amazon.com/Linux-Kernel-Development-Robert-Love/dp/0672329468
-ss
senozhatsky··on Tell HN: Amazon now owns 3.0.0.0/8
Wish it was 3.14.15.92

-ss

senozhatsky··on Programming Quotes
Love it! Do you happen to know who said it?

-ss

senozhatsky··on IBM acquires Red Hat
I am living in an alternate Universe now?

  - Linus is super polite here;
  - RedHat is IBM here;
  - IBM is still bad, tho.
-ss

P.S. Sad news.

senozhatsky··on Unix in East Germany (1990)
That's a really interesting read. Accodring to some reports the Russians had access to 2.9 or 4.2 BSD source code in 1980-1982(?) http://gunkies.org/wiki/DEMOS not sure if they had have to do "translation by hand into another language".

A bit unrelated: Wow, I can barely tell what I've been up to 2 years ago; how do people remember things that happened some 30-40 years ago...

-ss

senozhatsky··on Ask HN: What's your favorite elegant/beautiful algorithm?
Agreed. +1 for "Floyd's Tortoise and Hare".

-ss

senozhatsky··on Design Principles Behind Smalltalk (1981)
You have a great memory. Thanks for the pointers, very educational.

-ss

senozhatsky··on Design Principles Behind Smalltalk (1981)
No worries, I think I found it

https://www.youtube.com/watch?v=pQQTScuApWk

That's awesome.

-ss

senozhatsky··on Design Principles Behind Smalltalk (1981)
Thanks a ton, very interesting. I heard of Borland C++ Builder (never had a chance to try it out tho), have never heard of Lucid C++.

BTW I just found out that, apparently, C++ Builder is, sort of, still alive. The most recent release is "10.2 Tokyo / March 22, 2017". I thought it was dead for a decade or so.

-ss

senozhatsky··on Design Principles Behind Smalltalk (1981)
Oh, that's interesting indeed! Thanks. I speak zero Smalltalk (I must read a "Smalltalk book" after all), but somehow I expected to see C++ on the list, simply because Stroustrup said in his TC++PL book that Smalltalk has influenced C++ a lot. Do you think that Java and .Net are closer to Smalltalk than C++?

-ss

senozhatsky··on The rise and rise of JSON (2017)
Ah, got it. Thanks. I wasn't entirely sure, admittely not a very experienced json user. Does term "schema" apply to json in the same way it applies to XML?

/* Well... so... One can convert JSON to XML and apply XML schema verification. That's partly a joke :) */

-ss

senozhatsky··on The rise and rise of JSON (2017)
> would be nice to have a tool that could translate xml schema to json schema and back.

Hmm, after a quick search I found a bunch of json-to-xml and xml-to-json converters, including libraries. E.g. JSON-Java library [0]. May be same things exist for .Net. Is this what you meant?

[0] https://github.com/stleary/JSON-java

-ss

senozhatsky··on Design Principles Behind Smalltalk (1981)
I wonder - what do people who used to code in Smalltalk think of "modern" languages. Like Golang, Rust, etc.

-ss

senozhatsky··on How to Say “I Love You” When the Language Doesn’t Exist
In Belarusian language we have two different "love" words. There is one "love" [кахаю - ka-ha-you] for "I love [ka-ha-you] you / her / him", and there is another one which we use in any other case, like "I love English language". The latter cannot be used when you express your feelings for another person. Oddly enough, I don't think we use ka-ha-you in "I love myself" that often, most likely there will be the same "love" word as in "I love English language".

-ss

senozhatsky··on Intel Publishes Microcode Patches, No Benchmarking or Comparison Allowed
Does Google innovate?

-ss

senozhatsky··on Poll: How do you pronounce “tuple”?
"tuh-ple"

But TIL that "too-ple" is more common [98 pts vs 43 pts], apparently.

-ss

senozhatsky··on Traveling the World on a Third World Passport
> Not to mention that the US Visitor Visa will let you visit the US for up to 6 months at a time for the next 10 years for a reasonably modest fee of ~$200.

It depends. A multi entry B1/B2 validity period may differ from 1 year (Belarus, Afghanistan, etc.) to 10 years [0]

And, yeah, I hold a very weak passport too.

[0] https://en.wikipedia.org/wiki/B_visa#Validity_period_and_dur...

-ss

senozhatsky··on Google Maps is no longer a flat map
Thanks. I thought it was a "browser thing". My desktop firefox shows flat maps only.

-ss

senozhatsky··on New Video of F-117s Flying Out of Tonopah Despite Their Fates Being Sealed
Good ol' days. I miss Flanker 2.0/2.5. Sort of liked Crimea better than Caucasus.

-ss

senozhatsky··on New Video of F-117s Flying Out of Tonopah Despite Their Fates Being Sealed
> It is actually pretty sad that no good air combat simulators exist anymore

LockOn [0] (formerly known as Flanker, IIRC) and DCS World (never played that one) look quite cool.

[0] https://en.wikipedia.org/wiki/Lock_On:_Modern_Air_Combat

[1] https://www.digitalcombatsimulator.com/en/

-ss

senozhatsky··on It’s hard to have an unusual name in China
Koreans' full names usually consist of 3-4 syllables, thus, a large number of databases in Korea simply were not designed to store long [western] names. It does hurt sometimes. For instance, my company uses the first 3 characters of my _given name_ as my _family name_, and the last 3 characters of my _given name_ as my... well, given name. They simply could not store my full name (17 bytes) to their database.

-ss

senozhatsky··on Why Google Stores Billions of Lines of Code in a Single Repository (2016)
Good point. The way BSD people look at this issue - 3rd party apps are sort of out of consideration.

I think they actually consider it to be self-contained.

[UPD] But I haven't checked how NetBSD handled y2038. It might be that they didn't break the ABI. In some parts, I think, OpenBSD/FreeBSD/NetBSD just converted time_t to an unsigned 32-bit int.

-ss

senozhatsky··on Why Google Stores Billions of Lines of Code in a Single Repository (2016)
> Monolithic repository might have been a tool that helped enforce it, > but that's not what made it happen. It's the decision that ABI could > be broken that did.

Well, there are probably some subtle details which I'm missing, and may be you are totally right.

The way it looks to me is as follows: They are "happy to break kernel ABI compatibility" because the repository is monolithic - they break ABI, they immediately fix user space apps.

E.g. NetBSD time_t 64-bit commit: https://marc.info/?l=openbsd-cvs&m=137637321205010&w=2

They patched the kernel:

	 sys/kern       : kern_clock.c kern_descrip.c kern_event.c
	                 kern_exit.c kern_resource.c kern_subr.c 
	                 kern_synch.c kern_time.c sys_generic.c 
	                 syscalls.conf syscalls.master vfs_getcwd.c 
	                 vfs_syscalls.c vfs_vops.c

and fixed broken user space at the same time:

...

	 sys/msdosfs    : msdosfs_vnops.c
	 sys/netinet6   : in6.c nd6.c
	 sys/nfs        : nfs_serv.c nfs_subs.c nfs_vnops.c xdr_subs.h
	 sys/ntfs       : ntfs_vnops.c
	 sys/sys        : _time.h _types.h dirent.h event.h resource.h
	                 shm.h siginfo.h stat.h sysctl.h time.h types.h 
	                 vnode.h 
	sys/ufs/ext2fs : ext2fs_lookup.c 
	sys/ufs/ufs    : ufs_vnops.c 
...

There is no "transitional" stage, when the kernel is already patched, but no user space apps are ready for those changes yet. It all happens at once.

-ss

senozhatsky··on Why Google Stores Billions of Lines of Code in a Single Repository (2016)
Well, it's not so uncommon. For instance, OpenBSD, NetBSD repos are sort of monolithic. And, believe it or not, there are some advantages. For instance, let's take a look at OpenBSD 5.5 [0] release notes:

> OpenBSD is year 2038 ready and will run well

> beyond Tue Jan 19 03:14:07 2038 UTC

OpenBSD 5.5 was released on May 1, 2014. While Linux is still "not quite there yet" y2038-wise. y2038 is a very complex issue, while it may look simple - time_t and clock_t should be 64-bit. This requires changes both on the kernel -- new sys-calls interfaces [stat()], new structures layouts [struct stat], new sizeof()-s, etc. -- and the user space sides. This, basically, means ABI breakage: newer kernels will not be able to run older user space binaries. So how did OpenBSD handle that? The reason why y2038 problem looked so simple to OpenBSD was a "monolithic repository". It's a self-contained system, with the kernel and user space built together out of a single repository. OpenBSD folks changed both user space and kernel space in "one shot".

IOW, a monolithic repository makes some things easier:

a) make a dramatic change to A

b) rebuild the world

c) see what's broken, patch it

d) while there are regressions or build breakages, goto (b)

e) commit everything

[0] http://www.openbsd.org/55.html?hn

[UPDATE: fixed spelling errors... umm, some of them]

-ss

senozhatsky··on A Brief History of SourceForge, and a Look Towards the Future
> Why does it still exist?

Well, we are using Sourceforge... For one particular reason - free mailing list [for our open source project]. The code is on GitHub, but we want to do things the "old way" - send a patch to the mailing list, let people review it.

-ss

senozhatsky··on The libkern C++ Runtime
My guess would be: banning of namespaces and templates greatly simplifies name resolution and so on. For instance, look at https://en.cppreference.com/w/cpp/language/lookup and then remove namepsaces and templates from the picture.

Or maybe they just wanted developers to be "less creative".

-ss

← PreviousPage 2 of 3Next →