Better HN
topnewbestaskshowjobs
Log inSign up

aetherspawn

4,974 karma · joined Apr 27, 2014 (12y ago) · 1,386 submissions

Submissions

1231.

Show HN: GitHub webhook server/bot in 40 LOC Haskell(github.com ↗)

3 points · by aetherspawn · 8y ago · 1 comment

comment 8y ago · link · parent

Would be good to preload the icons for the buttons. That was very confusing for about 5 seconds..

comment 8y ago · link · parent

I use the Firefox address bar to do this!

CTRL+A, CTRL+C, Alt + Tab, CTRL+T (new tab), CTRL + V, CTRL + A, CTRL + C, CTRL + W (close tab)

Or, CTRL + TVACW in that order does it <1 sec.

comment 8y ago · link · parent

.. does that come off?

comment 8y ago · link · parent

Hey, cool project!

I’m not sure I agree that the input is more readable, but good nonetheless.

If I had the choice, I’d move the syntax closer to Haskell do-notation than Python, but that’s just me.

comment 8y ago · link · parent

The programs are very uniform. There is not multiple ways of doing things (at a presentation level). So you get to use hundreds of thousands of existing apps written over the last N decades in your modern web application.

You just couldn’t write them all over again, there isn’t a team on earth that could, even with infinite money. You’d be talking, I think, more than high double digits, millions of LOC.

JavaScript by comparison .. today it’s React/Angular, but it is very fluid. Not much code will be practically reusable in 5/yr from now.

comment 8y ago · link · parent

Unfourtunately not, it’s part of a very expensive ERP package. But this article has a few screenshots:

https://www.scopesystems.com.au/whats-new-pronto-xi-740-scop...

comment 8y ago · link · parent

Ok, let me just say at work I’ve spent the last 4 years working on a product that interfaces with COBOL. In-house we:

- Generate native windows interfaces with COBOL, to the point where only a few lines of code create a control like a data grid, button or text entry with rich functionality. You’d never know these snappy native apps, with features like visual data validation and asynchronous menus/context popups, are COBOL.

- Render rich web pages with COBOL using a in-house DSL that automatically become somewhat responsive between devices. The presentation information streams over a web socket so it’s snappy and as responsive as the above desktop application

- Perform complex queries and rich data validation. A few lines of code can automatically be linked to grid view that has HEAPS of built-in functionality like export or data side-view (link applications/side panels to the currently selected row), app row highlighting and styling, auto pagination with range expand, column sorting, reorder, filtering, conditional highlight and more.

So yeah, COBOL isn’t dead. It’s actually the coolest damn thing Ive seen in a while. Because it’s pretty high-level we can build whatever we need on top as a runtime and the same apps can run on the web, native desktop, handheld tablet or on an old VT100 over SSH.

comment 8y ago · link · parent

It depends on ABI but for x86, x64 and ARM targeting Cortex, I got the same results on all using gcc-4.8.

comment 8y ago · link · parent

Yeah, this is a case where it matters. But you can also see the workaround is pretty straightforward here.

comment 8y ago · link · parent

Many people talking about portability of but fields, but;

The assumed behaviour of bit fields is well defined between gcc and clang with the proper pragmas. It is therefore probably a non-issue. You even get better aliasing optimisations* using union/bit fields over just using bit shifts.

*) this means, if your union contains a way to read the whole field as ie uint_32t and also to read each field individually and also write struct as u32 via pointer, compiler can properly detect which actions cause read/write invalidation of each other instead of having to assume all volatile-like.

Use case 1: https://gist.github.com/donkeybonks/8749545

Use case 2 (with asm showing better codegen with union): https://gist.github.com/donkeybonks/11103152

nb these gists are ~4 years old because I don’t much care about micro-optimisation anymore.

nb2 it’s a really good idea to static assert the size of all your structs below their declaration for confidence and splash a few unit tests for ordering.

comment 8y ago · link · parent

The build quality of my late 2013 MacBook Pro is a lot better than that of my early 2018 MacBook Pro with touch bar. When I picked it up in cantilever with one hand it felt less flexy. The latter has seams that don’t line up and such around the touch bar, and the fingerprint scanner seems to have seams from manufacture around the edge. Keyboard scrapes every now and then and the bottom of the laptop picks up dirt from the work area and makes an awful sound when you slide it around (with the old under-profile, I didn’t notice this).

Nethertheless, the new machine feels a LOT lighter and, as such, I forgive the engineering team who had their focus elsewhere.

I just wish they’d redesign the speakers so that you can’t tell when tiny skin flakes fall in the microscopic holes (which you can’t get out .. at all). It’s very obvious when a hole is missing due to the pattern of the holes.

comment 8y ago · link · parent

> Essential windsurfing equipment to fish?

> Any additional info will be suspicious, they've had the card

comment 8y ago · link · parent

I dont think any of the above social sites allow you to directly consume i.e. the hackers news rss stream on your timeline

comment 8y ago · link · parent

Would anyone be interested in an RSS social network that allows you to

1. Pull in RSS news streams

2. Automatically generate your own RSS streams from your posts (and re-shares)

3. Provides content curation over the RSS streams amongst your friends that are subscribed on the same streams

4. Presents previews with images and scraped data in a 3/4-column summary layout that is easy to skim

comment 8y ago · link · parent

Don’t get any ideas though. Whilst these instructions might make the output code smaller, it will probably make the program slower (1). Processors are optimised to run code generated by compilers fast, and compilers stopped outputting these a long time ago.

1/ There are edge cases like when the code is very big then less code might fit in the cache better or perhaps dispatch better .. but probably not many.

comment 8y ago · link · parent

To temporarily alleviate this issue, I created the following filter to stop my phone ringing constantly:

    from:(me@gmail.com|me@salesforce.com) to:(me@gmail.com) -{has:attachment}

    Mark as read
    Skip the inbox

Until I added this rule I was being pinged once a minute since lunch time yesterday.

This ignores: emails from me, or some sales force spammer they were using, to me, that doesn’t have an attachment (so I can still email myself files).

comment 8y ago · link · parent

You need to keep an eye on the temperature too as the cells are not allowed to go above 60-70C depending on brand before you risk venting.

comment 8y ago · link · parent

You can determine that by ie looking at the issues list and eyeballing whether there are pages of issues with no comments on them.

Not necessarily whether there are commits or not.

comment 8y ago · link · parent

I almost always opt for a library as long as

1. It is still alive

2. It is on GitHub so I can easily read the source and look for issues

3. People star it

4. It has traction ie >10k downloads preferably >50k

5. It occupies a name that makes sense ie I’d rather trust using “redux-immutable” than “steel-porcupine”, since it unofficially lends itself to the “vetted one true solution”

6. Then I look at the source quickly and make sure it looks well done under the hood

7. Finally, if it’s particularly confusing, I might run a quick google check to see if there’s blogs about it on the internet explaining how to use the advanced features and check the date on the blogs (1-2 years ago = good, it’s mature)

If any of the above are too dicey and there’s no good options, I put the relevant code in a top level folder called “modules” (or otherwise) with the intention that in the future I might get to delete it if the package ecosystem gets more mature in that space. Sometimes I even get to polish those files up and actually publish them.

comment 8y ago · link · parent

Perhaps it is, as cameras require looming and looming requires removing trim and finicking around which is expensive in man hours. Especially if literally every car that comes in is different.

Also fat looms the length of a car can still cost hundreds of dollars said and done.

Cost of installation is greatly reduced if all you need to do is line it up and rivet it on and there is no need to customise the power system to different cars (ie 12V, 24V) and loom layouts (ie old looms are crappy, hard to get apart for splicing, wires are old and might break during retrofit, some cars have +ive chassis)

1252.

Show HN: Simple P2P video sharing in Java(github.com ↗)

1 points · by aetherspawn · 8y ago · discuss

comment 8y ago · link · parent

Wow, I hadn’t imagined that because the coordinates are sent to the GPU as floats, that means triangles start voxelizing when you get further away from origin.

Seems like it could make an awesome shader-free animation if you translated the entire worlds position by a ridiculously large (increasing in value) float.

comment 8y ago · link · parent

Seems counter intuitive for a bunch of apparently smart people to write themselves out of the gene pool.

comment 8y ago · link · parent

> In fact they're usually better supported than any engineering is.

I don’t care who supports what in engineering. If you put a dozen [gauges, potentiometers, accelerometers] on a truck and drive it for 1,000,000km varying conditions and the data matches up with the cross derivation for each instruments relation to the other, it is no longer a case of “who supports” -> it is either _fact_ or not and completely indisputable.

But it doesn’t become “supported” data for dropping said truck out of a plane. That’s lunacy - a dozen things not accounted-for in the normal model will occur.

Our models might hold for a few thousand years, maybe even 10k .. but how many times have we dated an >20k year artifact under varying conditions and been able to validate it without relying on another model?

Or as they would say about FEA, crap in, crap out (even though multiple models may agree, none are validated in such a method).

comment 8y ago · link · parent

Thanks for the writeup. Makes sense, but requires some further thought on my part (re: comments below on validation using multiple methods).

Also I have no problem with the biology aspect as it is trivially verified what a human (or otherwise) bone looks like, composition etc

comment 8y ago · link · parent

This kind of comment is flammatory and against HN etiquette (and should be removed).
1
414243
47