HNHacker News
TopNewBestAskShowJobs

hornetblack

255 karma · joined June 2, 2012

submissionscomments
hornetblack··on Quora has blocked me because it doesn't think Theodore Ts'o is my real name
There's a few on this page: https://en.wikipedia.org/wiki/Facebook_real-name_policy_cont...

Eg: Robin Kills the Enemy

hornetblack··on A Generation Lost in the Bazaar (2012)
I've written build scripts in Rust. I take's flippin' forever (relative to shell or make). But at least it has proper error checking.

One of the guys working on Redox OS make a library called cake which provides macros for a Makefile style script: https://github.com/ticki/cake

hornetblack··on A x64 OS #1: UEFI
This is quite an old version of rust[1]. I tried this a little while ago (but got frustrated trying to link it)

[1] For example:

* `u16` would now be: `const u16` * `int` is no longer a type. * `slice::as_ptr` is now a method, so using transmute to extract the pointer from a slice is probably not ideal. * `core` is a crate that includes things like transmute so you don't need to manually include rust intrinsics etc.

hornetblack··on Should you be scared of Unix signals?
If you had a Green threaded program and one of the threads segfaulted. You would probably want to catch Segv and kill that thread. (Not killing the OS thread running it).

I've also seen is used to implement a distributed malloc. When a segfault occurs, the handler messages the programs peers asking if they have the data for that address. If so the peers sends the page and the handler maps in a new page for that address with the correct data in it. This is essentially implementing a page fault handler in user space. (For some network backed memory).

hornetblack··on Essential C (2003) [pdf]
https://github.com/charliesome/jsos
hornetblack··on Atari co-founder: mobile games make me want to throw my phone
> I have been so pissed off with some mobile games I’ve wanted to throw my phone, even if I’m only going to hurt my phone there, and not the game."

> some mobile games

Cutting a sentence in half is pretty silly.

His actual point is there are a lot of Games with poor game design. This is probably related to the barrier of entry of Mobile games. It costs very little to put together a App and launch it on Google Play or Apple's Store. Compared with building actual arcade machines (or paying someone else to build them) and shipping them to Arcades.

hornetblack··on Why Erlang Matters
One advantage is spinning up new green threads can be very quick. Starting a new Kernel thread requires at least 1 syscall.

For example: on a network service, you have 1 thread listening for new connections, when a new connection is made. It starts a new thread, which calls the handler. The listener thread then goes back to listening for new connections.

Now the advantages can depend on your green threading implementation. If a listener thread blocks on reading from Disk or a DB. Then the listener thread can still wait for new connections and other connection handlers can still operate. Making you network application responsive, without increasing latency on clone syscalls.

Of course you can achieve this in other ways.

hornetblack··on Show HN: Sensible Bash: An attempt at saner Bash defaults
> > Automatically correct spelling errors during tab-completion; > I'm terrified to put this in my shell.

I had it in once (it's one the options in zsh setup)

Once I was cleaning my home directory:

    rm -rf tec<Tab>
    rm -rf IdeaProjects<Ret>
I'm a bit too quick to press enter after tab. So i deleted the wrong folder.

I do still have it auto correct case. So `doc<Tab> -> Documents`

hornetblack··on f.lux for iOS is no longer available
Given the app involved would you say "Rose tinted screens"
hornetblack··on Intel x86 considered harmful – survey of attacks against x86 over last 10 years
I think x86 chips with Intel Active Management has the 'Management Engine' which runs an ARC processor with a ThreadX RTOS on it. It even has it's own network interface separate from the rest of the CPU. As far as I can tell this is for Enterprise users who need to manage the PC's and Rack computers remotely, even when the OS dies.

Most motherboard vendors also thrown stuff onto enterprise motherboards for doing things remotely. They can have issues: https://www.youtube.com/watch?v=GZeUntdObCA

hornetblack··on Facebook '2G Tuesdays' to better understand markets like India
I thought it was kinda funny when telstra had "NextG" in their marketing, because now it's essentially "PreviousG"
hornetblack··on New Chromecast 2015
The only thing I've seen people use it for is casting Netflix to the TV.
hornetblack··on Apparatus: graphics editor and programming environment for interactive diagrams
I think the Browser uses the under key for form fields. So the javascript doesn't see the ctrl+z events.
hornetblack··on Apparatus: graphics editor and programming environment for interactive diagrams
Even this image has Bret listed as author: http://aprt.us/editor/?load=doc/examples/Star.json
hornetblack··on Docker, CoreOS, Google, Microsoft, Amazon to Develop Common Container Standard
Microsoft is going have containers for Windows Server. It looks like it would would with Docker's client as well.

"Last October, Microsoft and Docker, Inc. jointly announced plans to bring containers to developers across the Docker and Windows ecosystems via Windows Server Containers, available in the next version of Windows Server."

http://azure.microsoft.com/blog/2015/04/08/microsoft-unveils...

hornetblack··on Android M Developer Preview and Tools
Kinda. My Xperia Z didn't update to Kitkat when it was available. I bought it at JB-HIFI and therefore it came with Telstra junk on it. In /system/build.prop there's a setting called Customisation Number. So I used towel root and changed it to a stock number and the system updated to Kitkat and removed the non-uninstallable Telstra junk.

Telstra didn't update because of a battery issue. Which was true... the battery died quickly if you left the GPS on. I didn't use the GPS much so I left it off. (This issue has since been resolved, then telstra enabled the update)

Considering I didn't even have Telstra as a carrier. it was because JB-HIFI is a Telstra reseller that this happened.

It's because the Manufacturer agreed to only update when Telstra updated. It's all through the Sony update software.

hornetblack··on Ask HN: What will be the future for email?
I found that group chat on Facebook doesn't work through XMPP.
hornetblack··on Racking Mac Pros
Although this depends on the country. If Apple says that you can't run your Mac Pro on Thursday, it would probably break some Australia Consumer Law.

Although the "Only run on Apple Hardware" would probably be fine.

hornetblack··on Larry Lessig’s Long Walk
In Australia the Party doesn't have a limit on funding. But all funding must be declared. The government will cover the campaign funding for their portion of the primary vote. So even if you live in a safe Liberal seat. Voting for the Greens will still get the Greens some campaign money for next election.
hornetblack··on iOS 8 Debugging Case Study
Plan 9, and therefore The Go Programming language use a different one, which is the same across all architectures supported by Plan9's assembler. (It's one reason why cgo call's are not cheap)
hornetblack··on High-DPI displays and Linux
Even with a 1920x1080@13" I needed to change settings. Mainly just changing the font size in gnome-tweak-tool. And I just zoom manually in Firefox because my external monitor is much lower res (1280x1024@19").
hornetblack··on Spidermonkey has passed V8 on Octane performance
The point in this one is SpiderMonkey is beating V8 in the benchmark designed such that V8 wins on it.
hornetblack··on A Doom Renderer written in Rust
It uses gl-rs. Which auto generates a rust wrapper around the C bindings using a compiler plugin.

https://github.com/bjz/gl-rs

hornetblack··on Full email validation regex (RFC 2822)
It's not a regular grammar. Regular expressions were designed to handle regular grammar, and there are cases where something that looks valid is actually invalid: ex@256.255.255.255.

(See the above posters link: https://nikic.github.io/2012/06/15/The-true-power-of-regular...)

hornetblack··on OpenGL in 2014
> with the various "bind" patterns

Nvidia have been pushing for bindless graphics.

http://developer.download.nvidia.com/opengl/tutorials/bindle...

hornetblack··on Whited00r: iOS Community Custom Firmware
There's a video called "Chain of fools" where a man updates Dos 5.0 -> Windows 7

In this way: Dos 5.0 Installes windows 1.0 -> windows 2.0 -> windows 3.0 -> windows 3.1 -> windows 95 -> windows 98 -> windows 2000 -> windows xp -> windows vista -> windows 7.

He skipped ME because he couldn't update ME to 2000. All through this he had Doom installed and it ran successfully on vista without modification.

hornetblack··on Yes, we’re being bought by Microsoft
That's mostly lwjgl. So they would need to move away from that before that goes away.
hornetblack··on The Road to Rust 1.0
Green threading used to be default. And used libuv for io. Then native threading was avaliable. Then it became default. Now green threading is being moved out of builtin libs.

Starting with green threads is really easy too:

    extern crate green;
    extern crate rustuv;

    #[start]
    fn start(argc: int, argv: *const *const u8) -> int {
        green::start(argc, argv, rustuv::event_loop, main)
    }

    fn main() {
        // this code is running in a pool of schedulers all     powered by libuv
    }
Edit: You can also start up a new libgreen scheduler pool at any time and add some native threads to the pool. So you can have some threads running with libgreen and some with libnative. (So you could theoretically embed a go program inside a rust program)
hornetblack··on Rust Guide
Yes it could be implied if left out. Due to type inference.

`5` would be signed or unsigned if left off. Depends on how you use it.

So you could try.

    use std::num::abs;

    let v = vec!['a', 'b', 'c', 'd'];
    let x = 3;
    let c = v[x];    // v.index (operator overload) constrains x to type uint.

    let y = abs(x);  // error: failed to find an implementation of trait core::num::Signed for uint.
                     // abs can't constain the type to an int because abs can take anything that          
                     // implements  `Signed` (eg BigInt)
                    
If you wanted to make sure that x was signed.

    let v = vec!['a', 'b', 'c', 'd'];
    let x = 3i;
    let y = abs(x);  // Ok as x is signed.
    let c = v[x];    // error: mismatched types: expected `uint` but found `int`
If you really wanted to index to try an index with an int you can use a checked cast.

    let casted = x.to_uint(); // Returns None if x is negative or Some(x) if it's postive.

Also a generic int doesn't have to be int or uint, it can be any integer value: signed: i8, i16, i32, i64 or int. Unsigned: u8, u16, u32, u64 or uint.
hornetblack··on JSON Web Tokens
Same with Firefox on Linux. The 'S' letters are very noticeable.
← PreviousPage 3 of 7Next →