HNHacker News
TopNewBestAskShowJobs

arthur2e5

1,125 karma · joined April 29, 2016

zh-CN-N, en-US-5.
submissionscomments
arthur2e5··on This CTO learned how to build websites in Chinese internet cafes
As mentioned in this article, Chinese programming education is weird. Middle/high school students are usually learning outdated stuff like Visual Basic 6, while college students learn C from a book that is based on and undefined-behavior-compatible with Visual C++ '98. (The book also includes suggestions like "if it doesn't compile, change the extension to '.cpp'.")

In addition, I have heard that the National Olympiad in Informatics (NOI) still disables ALL compiler optimizations for fairness across Free Pascal, gcc, and g++. As a result, C++ STL becomes something to be avoided for performance.

arthur2e5··on German research institutions boycott Elsevier
> particularly taxpayer-funded ones

In the US there is a "Fair Access to Science and Technology Research Act of 2015" (S. 779, H.R.1477) that requires federal agencies to have a "public access policy" if they receive extramural research expenditures of over $100,000,000. https://act.eff.org/action/keep-publicly-funded-research-pub...

arthur2e5··on Godbolt: Enter C, get Assembly
Solus Linux builds some libraries into /usr/$LIB/avx and modified glibc's ld loader to load these libraries if the CPU happens to have avx2. https://github.com/AOSC-Dev/aosc-os-abbs/issues/522#issuecom...

(In that issue I am trying to figure out some FMV stuff.)

arthur2e5··on Dark corners of Unicode (2015)
Wikimedia is testing an IDS extension (https://www.mediawiki.org/wiki/Extension:Ids) for Wikisource at https://ids-testing.wmflabs.org. It is still preparing for production (https://phabricator.wikimedia.org/T148693).
arthur2e5··on Shinatra – A simple bash web server
> but that opens a whole can of worms

Someone has actually went that far: http://ctypes.sh/.

arthur2e5··on One Road Out of Depression
Made an archive in case it fails again: https://archive.fo/Vyz09 (https://archive.fo/20161108171830/https://thinkfaster.co/201...)

P.S. Someone took a snapshot of that error 2 hours ago.

arthur2e5··on WoSign's secret purchase of StartCom: WoSign threatened legal actions
Boring addition: 139 mail ("important user" listed on WoSign's [comparison] before the page's [removal]), azure.cn (who used CNNIC before switching to WoSign), and cnnic.cn (yes, CNNIC root CA) all switched to DigiCert for their sites. Great alternative it seems like.

[comparison]: http://wayback.archive.org/web/20160828045112/https://www.wo...

[removal]: https://groups.google.com/d/msg/mozilla.dev.security.policy/...

arthur2e5··on Understanding the bin, sbin, usr/bin , usr/sbin split (2010)
> lurking in the kernel. That way, Windows lies.

Windows implements many overrides (e.g. "My Documents") as NTFS junctions with some hidden (+ system?) property set. (Sometimes you will find a proper hidden property handy, like in this case.)

Stuff like CON, NUL in non-UNC paths do hurt, though. Device files from an age without directories....

arthur2e5··on A language that compiles to Bash and Windows Batch
> Microsoft recognizes this

MS also tried to improve PowerShell by installing the PSReadLine module by default.

Read https://github.com/lzybkr/PSReadLine for instructions on how to make PS a bit more usable.

arthur2e5··on Understanding the bin, sbin, usr/bin , usr/sbin split (2010)
> Establish a new, consistent filesystem hierarchy.

systemd is kind of enforcing this already, preferring /usr (where most of the packages go) over naked paths. This is the trend on relatively modern desktop systems, which thankfully preserves standard fs hierarchy while mostly keeping everything in one place. (Unfortunately there are bunches of non-desktop uses for Linux out there.)

See also https://freedesktop.org/wiki/Software/systemd/separate-usr-i....

> It would maybe be even easier if we could redirect writes (I'm not too versed in filesystem capabilities) from the legacy paths to the new ones.

Quite a few distros (and users like Rob Landley) use symlinks from /bin to /usr/bin and the same goes for /lib. sbin is sometimes linked to bin. This does some of the redirection.

(I am not aware of the /usr/tmp and /var/etc stuff mentioned in the message.)

> After even longer, delete the legacy paths.

Nah. Millions of scripts are writing she-bangs like #!/bin/sh and I don't really expect to see this being changed...

Workarounds using `env` is kind of crippled since a.) it introduces an extra level of dependency and indirection and b.) it stops the user from reliability passing options to the interpreter (Linux only cut at the first space, with all sorts of other *nixen doing different things with multiple spaces.)

arthur2e5··on In-browser FLV decoding via Fragmented MP4
The README is written in Chinese so here are a few points from this project's README:

# Rationale

Using Flash to watch videos on Macbooks generates a lot of heat. Many Chinese video websites have near-zero support for HTML5 videos on PC/Mac browsers. The old method of using <video> and streaming from the mobile version sites can't get you 1080p videos.

# Rough Implementation

This project plays FLVs in browsers by slicing them into fragmented MP4 (fmp4) files. A set of Stream operations are defined in mediaSource.js, which in turn depends on ./flvdemux.js for demuxing the FLV and mux.js (from videojs) for various other functions. Uint8Array is used for speed.

The rest of the project consists mostly of UI (keyboard only), file-sneaking functions for video sites and things like flash blockers.

# Performance

20~40ms transcoding time for a 10s video segment on i5 2.9G.

# Availability

Available as Chrome extension "hoihfdmeofbkbbjpieicemdhmjgfdihm".

← PreviousPage 10 of 10