Better HN
topnewbestaskshowjobs
Log inSign up

tech2

506 karma · joined May 14, 2016 (10y ago) · 213 submissions

Submissions

comment 9y ago · link · parent

Try southern England - http://www.independent.co.uk/topic/southern-rail - it's comically bad.

comment 9y ago · link · parent

Regarding the big-endian nature of it: kinda, but also kinda not. Network endianness is generally big, so it'd work well in those instance without needing to do any juggling. Plus (speaking from experience many decades ago on the 68k) reading big-endian memory was so much easier that trying to decipher things in a hex editor on ix86. Though, granted, this is both apocryphal and a minor thing to worry about.

comment 9y ago · link · parent

Allow me to introduce you to the wizards of the Unseen University...

comment 9y ago · link · parent

Within the first year or so of having installed Linux (mid-90's), I made the mistake of accidentally deleting /etc (wrote a script to tidy /tmp at boot, but it hadn't cd'd correctly).

That was possibly the best unix/linux learning experience of my life. Rebuilding /etc sufficient to rescue my files I cared about before a reinstall. Rescue CDs weren't really a thing, USB was a new thing at the time, and I was on dial-up.

comment 9y ago · link · parent

Was this the OS that they were planning on replacing segments of AmigaDOS with to avoid needing to rewrite a modern kernel?

comment 9y ago · link · parent

Bringing back the Haast Eagle would perhaps be more entertaining.

comment 9y ago · link · parent

Every time I see headlines like these (likewise regarding Mac OS etc.) I'm left wondering if people realise where the software for these platforms come from.

Without Mac OS there'd be no iOS apps (or at least, many fewer). And without Windows there'd be many fewer Xbox and likely Android apps too.

Non-mobile computing is needed until (at the very least) the bulk of development for mobile is done _on_ mobile (hint: I doubt that will happen any time soon).

comment 9y ago · link · parent

Or, for the slightly more insane approach we (and by that I mean people in my organisation prior to my arrival) decided that XSLT was the right tool to transform XML to Python. XML to XML sounds like a walk in the park after that. :)

comment 9y ago · link · parent

Large-scale low-cost metal 3D printing. We're _very_ close and it could be a game changer for a number of industries since the price for one unit is very close to the mass-production per-unit cost. It could allow custom-fit application or modification of a design on a per-customer level for things that would in the past require significant outlay.

If I need a new part for something that's no longer supported, no problem. If I want to test an idea, fine. etc.

comment 9y ago · link · parent

Screen refresh rate (rate that each image is replaced) is a lot different to the frequency of the PWM applied to the backlight. If the backlight were pulsing at 60Hz people would be _very_ upset.

comment 9y ago · link · parent

And, just because I'm in a golfing mood:

    def gen_stats_tech2(dataset_python):
        start = time.time()

        totals = defaultdict(lambda: (0, 0, 0.0))

        for product_id, order_id, quantity, price in dataset_python:
            o_count, o_quant, o_price = totals[product_id]
            totals[product_id] = (o_count + 1, o_quant + quantity, o_price + price)

        product_stats = [
            [product_id, num_orders, total_quantity,
             round(total_price / num_orders, 2)]
            for product_id, (num_orders, total_quantity, total_price)
            in totals.items()
        ]
        end = time.time()
        working_time = end - start
        return product_stats, working_time
950x improvement. I think the former reads more pleasantly and you're likely to do better with something like pypy though rather than dragging the code through the muck.

Most improvements are from use of some of the builtins like dictionary's .items method rather than making a getitem call per loop, removal of references to globals (int) since the values stored already have an integer value, removing N calls to append and letting the list-comp manage, and removing a store-then-unpack.

Sadly I don't think the top loop can be reduced in a similar manner because it's self-referential. Still, that made for a fun hour or so, I was really hoping to hit 1,000x improvement :/

comment 9y ago · link · parent

Who doesn't like a good pointless optimisation day? In the same vein (and because what else was I going to do with my Sunday morning?) I ran yours under 3.x and came up with radim/iclaudiusx at ~430x, eesmith at ~600x, tech2 at ~850x. I didn't get a chance to try pypy. Thanks for the amusement!

    def gen_stats_tech2(dataset_python):
        start = time.time()
        product_stats = []

        # totals = (num_orders, quantity, price)
        totals = defaultdict(lambda: (0, 0, 0.0))

        for product_id, order_id, quantity, price in dataset_python:
            o_count, o_quant, o_price = totals[product_id]
            totals[product_id] = (o_count + 1, o_quant + quantity, o_price + price)

        for product_id, product_info in totals.items():
            num_orders, total_quantity, total_price = product_info
            avg_price = total_price / num_orders
            product_stats.append(
                [product_id, num_orders, int(total_quantity),
                 round(avg_price, 2)]
            )
        end = time.time()
        working_time = end - start
        return product_stats, working_time

comment 9y ago · link · parent

You may fulfill both roles, customer and product, but I think that would make you a bit of a rarity. They can upset you as a product and support you as a customer at the same time.

comment 9y ago · link · parent

So long as the trade-off doesn't upset too many, they may still end up ahead.

comment 9y ago · link · parent

Maybe, but like anything else there will be a calculation performed to determine how much it pisses people off as opposed to how much they might make by having people be suckered into^W^Wrejoin the fold.

It's like Ford in the 70's with the Pinto, trading off the cost of law suits vs. the cost of a recall.

So, yes. I agree with you in spirit, but not all users are as skilled, or upset, by this as others. And some may actually be lured back in.

comment 9y ago · link · parent

You're not the customer, you're the product.

comment 9y ago · link · parent

Except that new apple applications have to come from Apple users. If the devs aren't happy with what's available, that means fewer applications. Fewer applications means fewer users, fewer users means a less attractive base for devs... the spiral continues ever-downward.

comment 9y ago · link · parent

Now there's an editor I haven't heard about in MANY years :)

comment 9y ago · link · parent

In-office, the II seemed like a battleship.

I bought a 6MP second-hand at a university IT sale and that thing kept trucking for _years_ afterward. I'd still have it now if I hadn't moved countries.

comment 9y ago · link · parent

Rover has had its own failures though. Poor electrical build quality in a lot of older stuff (much like many British cars of the past, sadly. Never look behind the dash of a mini). The Rover 214Si for example had a _very_ common failure resulting in a warped head if you were only slightly unlucky because they decided to get cheap with the head gasket.

Shortcuts and money worries may lead to creative solutions, but they just as readily lead to heartbreak and failure.

comment 9y ago · link · parent

I was looking at the Pro-ject Carbon a while back but couldn't quite stretch to the price, beautiful bits of kit.

comment 9y ago · link · parent

Opti brand zippers are also very good (like, on the same level as YKK). Not sure why they don't get as much good press.

comment 9y ago · link · parent

Built-in colour management is really quite well done. Corner-to-corner evenness in illumination, true 10bit per colour. You pay for the privilege though.

Beyond the features they're also very nicely built.

Really not cheap though (for the high end ones I'm talking about). For a _lot_ less money if you weren't bothered about perfection then one of the Dell Ultrasharp displays would likely get you 95+% of the way there.

comment 9y ago · link · parent

The Faber Castell Alpha-matic pencil. Auto-feed, good cut-metal grip. I found this in a field in the early 90's, it still writes wonderfully, the feed mechanism is amazing. It's a device that's so perfectly fit-for-purpose. If I had to replace it I'd be looking at spending a LOT of money these days :(

Honda Civic SiR II (EG chassis) - Not hugely powerful, but great fun to drive, everything in the right place, fold-flat seats in the rear, plastic clamshell backs on the front seats, small pull-out tray in the rear, 6 speaker stereo, good suspension design, great little engine, rear gate design allows you to fit quite large items in there. An awesome little car from the early 90's.

The MX518 mouse, as mentioned elsewhere.

zip ties. I always have some on me. They've saved me countless times, from securing things in place to replacing a broken jubilee clip on one of my current car's hoses so I didn't have to limp home.

comment 9y ago · link · parent

I loved my 2000, but the 3000 was a step above (aside for the godawful choice of RAM chips). I loved the scissor-switch design on the keyboard switches though.

These days you should get hold of an A600 and Vampire II - http://www.kipper2k.com/accel600.html

comment 9y ago · link · parent

I just disassembled my MX518 to clean around (and under) the mousewheel. This is a mouse I've carried with me from NZ to the UK, I've owned it since 2005 and it's still going strong.

_Such_ a good mouse.

comment 9y ago · link · parent

The price for that 160k is horrifying though, esp. if the requirement is bursty rather than continuous.

comment 9y ago · link · parent

So long as you skip over the costs if you want any kind of performance (you need to configure a "number of accesses per time period" with costs scaling alarmingly the higher you go)

comment 9y ago · link · parent

That's a nice step in the right direction, thanks for bringing it to my attention. It does mean a fair bit of rewriting though which is mostly what my initial comment was trying to get across, it's a different world over there :)

comment 9y ago · link · parent

It took too long to go superscalar, pipelining was a bit of an afterthought, they _should_ have done more with the Apple contract. Because they didn't this meant Apple moved on to PowerPC and the bottom fell out of the 68k market.

It's sad overall really. The Amiga was a great machine with a fun and easy-to-use/manipulate operating system. Memory protection (beyond weirdnesses like Mungwall etc.) would have been nice.

For such a small team though they did very well. Commodore were desperate for a slice of that DOS/Windows PC pie though and that further drained the coffers :(

1
45678