hacker news with inline top comments    .. more ..    28 May 2017 News
home   ask   best   3 months ago   
1
A Practical Guide to Linux Commands, Editors, and Shell Programming [pdf] umn.edu
29 points by lainon  31 minutes ago   1 comment top
1
godmodus 0 minutes ago 0 replies      
removes shades mother of god. 1000+ pdf.
2
Introduction to ARM Assembly Basics azeria-labs.com
96 points by ingve  6 hours ago   17 comments top 4
1
wyc 2 hours ago 0 replies      
In case you're interested in seeing a project that does something, I wrote an IRC bot in ARM: https://github.com/wyc/armbot
2
mishurov 3 hours ago 1 reply      
Why don't people use AT&T syntax for ARM?
3
lacampbell 2 hours ago 6 replies      
Does any one here use a lot of assembly in their job? If so, what do you do?

I started getting fascinated about computer architecture a while back, but then I saw how dead embedded programming was in my area.

4
unixhero 3 hours ago 0 replies      
Nice

I enjoyed the read!

3
ReactOS 0.4.5 Released reactos.org
63 points by ma2rten  6 hours ago   4 comments top 2
1
SyneRyder 49 minutes ago 0 replies      
A definite improvement over 0.4.3. I just tried it with a Windows graphics program I make, and while it isn't perfect, it works and is usable. Looks like you can actually run Photoshop plug-ins on ReactOS now.
2
slazaro 1 hour ago 1 reply      
I know this is such a little nitpick for a huge project like this one, but every time I see ReactOS screenshots I notice that the taskbar looks off. Comparing this [1] screenshot from the article to this [2] random Win98 screenshot, the start button and app buttons seem to have different margins, padding and dimensions.

Again, it's such a small thing, but I (and I guess other people do as well) tend to focus on this kind of graphical details. I wonder if it's easy to fix...

[1] https://reactos.org/sites/default/files/imagepicker/23908/Ex...

[2] http://www.guidebookgallery.org/pics/gui/desktop/firstrun/wi...

4
Exploring Flutter for Cross-Platform Mobile Development sethlopez.me
99 points by amarokaz  7 hours ago   39 comments top 11
1
svdev 3 hours ago 1 reply      
I had high hopes for flutter but gave up after a while. It feels like their design meetings were spent arguing about grammar and splitting hairs, rather than thinking about ergonomics and how people would use it.

In Flutter, everything is a nested pile of objects with too many APIs to keep track of. Take this example: https://github.com/flutter/flutter/blob/master/examples/stoc...

Why do I need to care if something takes a `child: (single object)` argument or a `children: [LIST of objects]`?

Flutter would be better with JSX: JSX hides how the puzzle pieces fit together. I don't care if it takes a child or children; just make everything connect the same way.

React Native's Flexbox also beats how Flutter did things. Why do I need to memorize which objects take which styling arguments? You want to center items on the screen? Re-nest everything inside a Center object! You want a column or a row of elements? Use a Column/Row object!

For a framework that's trying to bill itself as a great tool for prototyping, it feels like I'm sifting through a mountain of minutiae. I was able to guess my way through a React Native app and be right 99% of the time. With flutter, my luckiest guess would lead me to an abstract base class... Then I'd have to dig around to figure out what the hell I need to use to make a view scrollable. Seriously:

https://github.com/flutter/flutter/blob/c6b0f833af9e431df1e6...

Why?

2
mythz 3 hours ago 0 replies      
Definitely interested in seeing how Flutter progresses, IMO it has the optimal architecture for developing native, x-plat iOS/Android UI (https://flutter.io/technical-overview/):

 - High perf Skia based UI for pixel perfect rendering and high-level Material design widgets - React inspired, productive development model - Fast dev/iteration cycles with hot reloading - Productive and high-performance Dart language, natively compiled (AOT on iOS) - Enable native interop with underlying iOS/Android APIs - Actively developed by Google
Overall I think it has a superior architecture to React Native where it will enable higher-perf native iOS/Android Apps in a single code-base but still enables a productive development model with Instant UI updates and hot reloading. I've done Java and Kotlin Android Apps as well as Obj-C and Swift iOS Apps but I find React Native's dev model a lot more productive.

Unfortunately I've run into a few issues with React Native that I've had to workaround which I've submitted repros to months ago but received no response from the React Native team except in the last couple of days where they've closed it without even looking at it because it didn't receive comments/activity from other devs. In the last 2 days React Native has closed 773 other issues because they consider it low priority:

https://github.com/facebook/react-native/issues?q=label%3AIc...

This gives me low confidence that React Native will be a high quality platform with current low-priority issues lingering indefinitely so I welcome competition from Google with Flutter and will be anxiously looking forward to trying it out when it gets out of alpha.

3
bschwindHN 2 hours ago 0 replies      
> Though Flutter doesnt use the native UI widgets, its a cross-platform framework and has widgets for both Android and iOS

Hot-reloading and good performance are very attractive parts of Flutter, but they really should have reconsidered the decision to make their own UI widgets. When you use the native UI elements, you get that native look-and-feel for free, and you don't have to dump man hours into replicating that behavior. They could have a "UI backend" which calls out to the native UI elements for each platform. The great thing is that since they use these UI widgets natively on Fuchsia, they can use their existing code as just another backend on that platform without having to throw the work away.

4
TheAceOfHearts 5 hours ago 1 reply      
Nice write-up. I've been popping my head on over to their project every few months to check out their progress. Something that's pretty cool is that they're using Flutter to write Fuchsia's UI [0].

My favorite thing about Flutter is that it looks like they took some heavy inspiration from React. If anyone reading this isn't familiarized with React, or they don't really "get it", I'd highly suggest reading the Removing User Interface Complexity, or Why React is Awesome [1].

One of the big problems with implementing a UI toolkit is having to re-implement everything relating to accessibility. Although it's totally understandable that they're still focusing on the core.

Something I'd be interested in seeing is how Dart and Flutter might affect battery life. I'd expect the stock UIs to be pretty well optimized by now, but I have no idea how Dart stacks up in performance.

[0] https://github.com/fuchsia-mirror/sysui

[1] http://jlongster.com/Removing-User-Interface-Complexity,-or-...

5
fauigerzigerk 50 minutes ago 0 replies      
>Though Flutter doesnt use the native UI widgets, its a cross-platform framework and has widgets for both Android and iOS. [...] On iOS, the biggest thing that stuck out to me was the scrolling. It didnt quite feel right because of the physics, but Im sure that would just require a little tweaking by the Flutter team.

Count me a skeptic. This is the same approach taken by Java's Swing (now JavaFX) toolkit and apparently it has exactly the same issues. Swing never felt quite right even after decades of tweaking.

6
bitmapbrother 1 hour ago 0 replies      
That chat app demo they coded at the I/O 2017 presentation in under 400 LOC was pretty ridiculous (in a good way) considering all of the functionality it included. The demo code was run on an iOS and Android device and each used its respective look and feel.
7
htormey 5 hours ago 2 replies      
Nice article. The lack of native iOS looking components would be a deal breaker for me.

I wonder how stuff like navigation is built? If that's all in dart I'd be interested in seeing how the back stack looks in the hierarchy explorer. I.e are precious screens rendered still.

8
themihai 4 hours ago 1 reply      
This may be off-topic but I'm wondering if there is any chance to see cross platform and cross language toolkits any time soon. Something based on WebAssembly so that we don't have to worry or bash about programming languages. Dart is cool but should we all learn Dart now?
9
jeffjose 4 hours ago 0 replies      
How does flutter compare to weex? (Native VueJS)
10
twotwotwo 3 hours ago 0 replies      
I also played with Flutter recently. Timeline: heard Kotlin announcement at I/O, went through some Kotlin exercises, wanted to compare with Flutter/Dart.

Dart feels somewhere in between JavaScript on the one hand and a more-static OO, GC'd lang w/type inference (like Kotlin!) on the other. You can probably look closely at some sample app code and start doing some basic stuff quickly if you've worked much with JS and something more static. (Further study seems worth it if you plan to do a lot, heh!)

As others note the UI model seems Reacty--you write "builder" methods that recreate a widget tree when things change, and something behind the scenes sorts out an efficient way to update the screen with just what really changed. I'm not hugely worried about performance: your UI rebuilds should be separated from your animations, and anyway, building your virtual widget hierarchy ideally shouldn't be too CPU intensive in the first place.

Hot reload is pretty great. I can't actually compare with "real Android" dev, but changes to my little app showed up in under a second in an Android phone, emulated or real. There were a couple surprising things about the basic libs, e.g. Flutter master only recently added a convenience object to bundle together a radio/checkbox and its associated label-stuff (RadioListTile).

The Flutter Gallery app is available on Google Play and its source is in the Flutter git tree. You can see a lot of the Material widgets implemented, including rich list types (e.g. tiles w/photos), pull-from-the-side drawers, top-of-screen tabs you can swipe through, bottom-of-the-screen nav bars etc. Even on iOS Google seems to follow Material guidelines a lot (or at least, the Daring Fireball guy complained that they do; I don't have iOS to check), so maybe it's the easiest fit if you're prepared to do the same. Someone who works on Flutter mentioned elsewhere in these comments that they're working on components that look more like the iOS-native ones, though.

Although Android Studio is _based on_ IntelliJ, you need to get actual IntelliJ if you want to use the plugin (Studio's component versions don't match the ones that the Flutter plugin works with, I think). Also, if you have Studio 3.0 canary installed (like to futz w/Kotlin, heh!), you need to either configure Flutter to look for the stable Studio 2.3's copy of Gradle (flutter config --gradle-dir=...) or just make sure 2.3 is located where the flutter tools look by default (~/android-studio for me on Linux). People working on Flutter helped some of us through this at https://github.com/flutter/flutter/issues/10236#issuecomment...

You get a lot of IDE-ish luxuries (as OP notes): Control-Space to offer identifiers, methods, or params available; autoformatting with dartfmt (right-click menu); lots of quick feedback when you mess something up.

Hixie (Ian Hickson) of the HTML5 spec works on Flutter which is kinda neat (he did RadioListTile just now! and there's a milestone on GitHub named 'Make Hixie Proud' haha :D). Outside of the tech specifics, Dart's an interesting creature in that it seems like it's got some key customers in Google (AdWords, so, like, the part that makes money) but comparatively little pickup outside. On Flutter GitHub you see people paying attention to outside-adopter issues (or even passerby issues such as my Gradle-version thing recently). There's apparently lots of tooling available publicly, e.g. a package manager (pub), dartfmt, IDE plugins, a playground (dartpad.dartlang.org) etc. Curious to see if there's any more pickup on the outside.

11
invalidname 5 hours ago 3 replies      
Codename One (https://www.codenameone.com/) runs circles around fluttr.
5
The Fifth Protocol (2014) startupboy.com
39 points by IA21  7 hours ago   10 comments top 4
1
b1daly 1 hour ago 0 replies      
I can't see how this squares with the scalability problems of proof-of-work systems.

Given the big problems with these limits currently happening with bitcoin, this seems impossible to use in a high bandwidth system. Already bitcoin transactions are shockingly expensive, with the bulk of the cost hidden from the user by the payout of coins to the miners.

2
lerie 5 hours ago 2 replies      
It's in the app layer, we dont need a "fifth" layer.
3
mechanical_berk 1 hour ago 1 reply      
> Cryptocurrencies like Bitcoin are already trustless any machine can accept it from any other, securely. They are (nearly) free.

I believe it currently costs ~$1.50 in fees for a single Bitcoin transaction, assuming you want it confirmed reasonably quickly. Not what I would call nearly free!

4
kurthr 5 hours ago 0 replies      
Of course there will be DOS attacks on the currency protocol too... unless we design it just so.
6
Airbnb Employees Talk About 'Toxic' Work Environment and Terrible Management brokeassstuart.com
64 points by rblion  3 hours ago   35 comments top 8
1
gaius 2 hours ago 1 reply      
Whether its illegal sublets or unlicensed minicabs, you can't operate a business designed to evade regulation without that attitude eventually permeating its entire corporate culture. Welcome to "disruption".
2
chx 1 hour ago 2 replies      
One data point does not make a whole lot but let me point this out: https://www.airbnb.ca/rooms/8618464 this here is a shit road side motel. I cancelled it when I realized and I reported it but it's still there more than a year later. It's trivial to check what it is: there are no houses at the junction. https://goo.gl/maps/WsPwXxa22ho

If you check the hosts' reviews it turns out he is airbnb'ing out the hotel rooms of his father all over Israel. This is blatantly visible and yet Airbnb lets it. Samples: "The staff at the hotel" "The place is more like a cheap hotel or a hostel (not a "home" like other Airbnb places I've rented in the past). "

My trip was awesome nonetheless, brief report http://www.flyertalk.com/forum/25981843-post8.html here.

3
nikanj 1 hour ago 2 replies      
Are our standards for "toxic" and "terrible management" too low, when the only company without these is Etsy? Is their level of pampering the only acceptable environment now?
4
ubikretail 2 hours ago 0 replies      
It makes sense, if you compare it to the conditions of the hosts. I got people for a year and this is remarkable:

Not host, nor guests are legally related to AirBnB. Hence, none of the parties is really protected, even if ABnB talks about "insurance".

Not even the help desk is AirBnB. As they call them, they are "community helpers", and their help is not legally linked to AirBnB.

They changed the conditions just because, and they place them as you go in for you to accept them. If you disagree, you have to remove yourself from the platform via email.

They promise a plan of prizes for good hosts. It seems that most of your ratings should be high. It turns statistically impossible once your go into the real conditions: must be evaluated by +80% of your hosts, and +80% of your score must be five stars (or similar).

They don't pay your social security, welcoming time, help, and after all anything we call "added value".

Nevertheless, they added surreptitious-yet-public evaluation for things nobody is paying for, like being the tourist guide of someone who is getting a room for 10/night.

They do not care about hosts opinions, in spite they are the ones putting the real value on the platform, paying taxes for it, doing the face-to-face with the end client, etc. If your guests arrive 8 hours early and they complain you didn't received them, the bad scoring is on you (happened). If your hosts leave a mess behind, AirBnB evaluates if they should cover it for the shake of their public image, or if they rather claim that according to the rules that is not covered.

Everybody is free to do whatever, but after my experience I trust hotels more than anything.

5
abhinai 2 hours ago 1 reply      
Heard similar stuff from a friend who used to work at AirBnb. He was an ex-Facebook engineer who quit AirBnB even before his stocks vested because we was so unhappy at this company.

I am really surprised. Things are going well for them as a company. Why do they want to screw it up for themselves?

6
rl3 2 hours ago 2 replies      
I've often heard that it's extremely difficult to maintain any real culture or ethos beyond the amount of employees the CEO can personally manage, and that number is around 40-50. AirBnB is far beyond that, so it's no wonder.

The larger the company, the more it's going to decay and suck. The degree to which it does is a function of management style and org structure.

Of course, Kool-Aid doesn't help mattersespecially at scale where it rings hollow.

7
MichaelBurge 1 hour ago 1 reply      
Large companies have enough disgruntled employees that even the laziest journalists can find a few to generate some outrage, which drives views/clicks to their site. Since AirBNB is a well-known name, people on HN will tend to upvote it and commenters will self-select for people who want to rant about AirBNB.

That's 3 selection biases here: Visibility on HN(selects for an "interesting" story, not truth), disgruntled employees, comments will want to rant about AirBNB. It's almost certainly a mistake to judge them negatively based on this story.

> In 2015, Glassdoor ranked the company as the #1 place to work, in 2017 that ranking dropped to 35th, and many employees are speaking out.

35th "best place to work" and "people are treated like cattle"? Somebody's giving you misleading statistics: Either it's Glassdoor.com, or the managing editor of "broke-ass stuart".

I don't think there's a single company above 10,000 employees that you couldn't force a similar framing on.

8
coo 6 minutes ago 1 reply      
If you feed the SJW monster, don't be surprised when comes to eat you.
7
Free Ideas for UI Frameworks, or How to Achieve Polished UI chrislord.net
14 points by robin_reala  4 hours ago   2 comments top 2
1
panic 54 minutes ago 0 replies      
As careful as you may be, its practically impossible to write software that will remain perfectly fluid when the UI can be blocked by arbitrary processing.

Well, that's what they did! All UI events and layout on the original iPhone were handled on the main thread. I doubt asynchronous layout or event handling would have improved the experience on its single-core CPU.

The key technical advantage the original iPhone had was Core Animation, which composited the laid-out views and applied animations to them in a separate process. It ensured that all views would appear at the correct position in their animations each frame with no jitter, and kept most of the per-frame work in one place. But the animations were all initiated on the same main application thread that handled events, performed layout, and so on.

2
korijn 10 minutes ago 0 replies      
Reminds me of common practises in game engines.
8
VisUAL: A highly visual ARM emulator bitbucket.io
104 points by ingve  13 hours ago   8 comments top 6
1
userbinator 11 hours ago 0 replies      
The one thing that immediately caught my eye is the lack of fixed-width-ness (for lack of a better term) in the value displays. IMHO besides being somewhat annoying to read it can be rather misleading, which is bad especially for something "designed specifically to use as a teaching tool". It's misleading because it doesn't show that the storage for the values is fixed-width. For example, this clearly shows that the registers are 32 bits and never anything but:

 R0 0000BEEF R1 000BEEF0 R2 000000BE R3 00000001 R4 BEEF0000 R5 00005F77 R6 00000000 R7 00000000 ...
I've taught Asm before and seen so many students get this wrong that it's worth calling out. In fact the right example under the "Error Correction Suggestions" section gets this wrong too --- that's an assembly/syntax error, not a runtime error. (ARM's immediate value encoding is also worth looking at if you haven't seen it before, since it's not just a single 32-bit value either: https://alisdair.mcdiarmid.org/arm-immediate-value-encoding/ )

The other thing that I'd suggest as an improvement is a 16-byte-hexdump mode with ASCII on the right for "View Memory Contents". Other than that, with perhaps the exception of "infinite loop detection", the other features look useful.

2
Exuma 9 hours ago 0 replies      
Is there a video we can see this in action? I wouldnt ever use a tool like this because my work doesn't require it, but this stuff still fascinates me and I'd like to watch someone use it.
3
molticrystal 2 hours ago 0 replies      
This simulator since it is based on the unicorn,keystone,capstone framework, has a lot more instruction support(and architecture support): https://github.com/hugsy/cemu .

Its front was just thrown together though, and it has a few issues. It would be nice if it ever develops into having a rich front end and progresses towards what VisUAL has.

4
zimmund 6 hours ago 0 replies      
This was posted here some time ago; in that thread there are links to other tools that you may find interesting: https://news.ycombinator.com/item?id=10787226
5
tototomtoboro 8 hours ago 0 replies      
What is the license of this program? I couldn't find it on the website.
6
partycoder 10 hours ago 1 reply      
I like this project, and really appreciate that there's a Linux version. Looks very polished, friendly and inviting, so kudos.

Maybe some code samples could be a good addition.

I used a similar program to learn assembly, GNUSim8085, targeting the Intel 8085 architecture and is packaged for most distros.

9
Doctor who fought a risky medical procedure has died nytimes.com
80 points by MyHypatia  14 hours ago   11 comments top 5
1
hinkley 8 hours ago 2 replies      
I remember when I first heard about that equipment, how cool it sounded that you could remove large pieces of material through a tiny hole, effectively with a tiny hand mixer and a hose.

The smaller the holes the simpler the recovery, but clearly the consequences are a lot more dire than they lead on. I was under the impression that the material was extracted at the point of removal, not through a separate mechanism. Sounds like there's some significant contact time and loss of material.

Which makes one wonder what kind of surgery one of these would be useful for. Precancerous cells? Nope. Infection? Same problems.

2
toolslive 37 minutes ago 1 reply      
Am I the only one who started reading this as"Doctor Who (famous doctor who regularly battles Daleks) fought a risky ... " ?
3
davidgerard 47 minutes ago 1 reply      
Actual title:

"Amy Reed, Doctor Who Fought a Risky Medical Procedure, Dies at 44"

Why was her name removed?

4
supercheetah 6 hours ago 1 reply      
It surprises me that a community so reliant wouldn't have at least pushed for some studies until the FDA stepped in, and even then, it wasn't enough.
5
jaimehrubiks 5 hours ago 1 reply      
you just spoiled me 10 seasons
10
TLA+ in Practice and Theory Part 1: The Principles of TLA+ pron.github.io
30 points by pramodbiligiri  8 hours ago   1 comment top
1
plinkplonk 2 hours ago 0 replies      
Very nice. I really appreciate you placing TLA+ in context with alternate approaches. I look forward to seeing the followup posts.

PS: How are you generating these pages? Jekyll? something else?

EDIT: This probably needs editing -- "nor will reading the posts will not teach you how to write good specifications;"

I think you probably meant to write "nor will reading the posts teach you how to write good specifications;"

11
The Gilectomy How's It Going [video] youtube.com
38 points by varunramesh  7 hours ago   21 comments top 6
1
thomaslee 2 minutes ago 0 replies      
If any Python devs are out there reading: my understanding is that removing the GIL itself isn't the hard part so much as removing the GIL while satisfying certain constraints deemed necessary by GvR and/or the rest of the community. I know some of those constraints relate to compatibility with existing C extensions -- but there must be others too?

The reason I ask is Larry's attempt buffered ref counting surely has implications for single-threaded code that maybe relies on the existing semantics -- e.g. a program like this may no longer reliably print "Deallocated!":

 Python 2.7.13 (default, Mar 5 2017, 00:33:10) [GCC 6.3.0 20170205] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class Foo(object): ... def __del__(self): ... print 'Deallocated!' ... >>> foo = Foo() >>> foo = None Deallocated! >>> 
A bad example in some ways since in this particular case we could wait for all ref counting operations to be processed before letting the interpreter exit, but hopefully my point is still clear.

Similarly, what about multi-threaded Python code that isn't written to operate in a GIL-free environment -- absent locks, atomic reads/writes, etc.? At best, you might expect some bad results. At worst, segfaults.

Are these all bridges that need to be crossed once a realistic solution to the core GIL removal issue is proposed? As glad as I am that folks are still thinking hard about this problem, I'm personally sort of pessimistic that the GIL can be killed off without a policy change wrt backward compatibility. Still, I do sort of wonder if some rules of engagement wrt departures from existing semantics might help drive a solution.

2
comex 3 hours ago 0 replies      
If you're the type that prefers to read text, here's LWN's writeup of the linked talk:

https://lwn.net/SubscriberLink/723514/f674d4a807264ba1/

3
WaxProlix 3 hours ago 4 replies      
It's funny, I've written a lot of python in quite a few domains and haven't really struggled directly because of the GIL before. Is this more of a 'data scientist' problem? I feel like if I had a huge pile of data to crunch, python wouldn't be my first choice really.
4
amelius 54 minutes ago 1 reply      
Can't they use the GC techniques used in other languages? I've heard that Golang has a very efficient concurrent garbage collector.
5
ars 3 hours ago 0 replies      
Gilectomy project: the removal of Python's Global Interpreter Lock, or "GIL".
6
chairmanwow 3 hours ago 2 replies      
Is he being serious when he says he only has one test case? That really doesn't seem like a reasonable thing to do. Furthermore, would a recursive implementation of Fibonacci even benefit from multithreading?
12
View Counting at Reddit redditblog.com
368 points by strzalek  15 hours ago   100 comments top 13
1
haburka 13 hours ago 3 replies      
I love the article on hyperloglog! It is really quite good to read even if you're not interested in algorithms. I always liked number theory and I think that it's very interesting that you can guess how many uniques there are by counting how long your longest run of zeroes in a hash is.

I suppose this could be broken by injecting in a unique visitor id that would hash to something with an absurd amount of zeroes? That's assuming that the user has control over their user id and that I'm understanding the algorithm correctly.

2
nyar 8 hours ago 3 replies      
"We want to better communicate the scale of Reddit to our users."

If that's true why did they hide vote numbers on comments and posts? It used to say "xxx upvotes xxx downvotes" now it just gives a number and hides that.

3
noamhacker 13 hours ago 3 replies      
How do you test a system like this for accuracy? Is this done by simulating millions of unique requests?
4
stoicking 13 hours ago 4 replies      
Given how much simpler it is to count total views than unique user views, why is it more valuable to count unique user views?
5
tudorconstantin 13 hours ago 5 replies      
Wouldn't it had been easier to simply increment a counter for each visit and then set a short lived cookie in the browser for that post?And put the spam detection system before the counter increment
6
alzaeem 11 hours ago 3 replies      
So how do they determine whether a user has viewed a post already? I would think that unique counting is accomplished using the hyperloglog counter, but the article says that this decision is made by the Nazar system, which doesn't use the hyperloglog counter in Redis.
7
tsukaisute 13 hours ago 3 replies      
Weird thing I have been seeing on Reddit is comment upvotes being off-by-one periodically on page refreshes. Reload, you get 3. Reload again, you get 4. Again, you get 3. Seems like a replication issue?
8
federicoponzi 4 hours ago 1 reply      
Probably noob question, but:

>> Nazar will then alter the event, adding a Boolean flag indicating whether or not it should be counted, before sending the event back to Kafka.

Why don't they just discard it instead of reputting the event back to Kafka?

9
hellbanner 13 hours ago 3 replies      
Slightly OT; but I wish reddit would use traditional forum style replies to push threads up, instead of the positive feedback loop of votes with opinions that agree with majority getting upvotes giving views which give proportionally more upvotes
10
fiatjaf 14 hours ago 0 replies      
At https://trackingco.de/ we store events on Redis and compile them daily into a reduced string format, storing these on CouchDB.
11
golergka 2 hours ago 0 replies      
A beautiful example of how a feature that seems so easy to an end user can be complex at scale.
12
ugh123 12 hours ago 4 replies      
Forgive my ignorance, but isn't this what Google Analytics is for?
13
qrbLPHiKpiux 13 hours ago 2 replies      
Not applied to /r/the_donald however.
13
My Awful Life as the Internet's Janitor gq.com
75 points by lnguyen  4 hours ago   16 comments top 8
1
nudpiedo 2 hours ago 2 replies      
I thought this kind of job should be highly paid because of the evident risks on mental health... when your physical health is on risk your contract reflects that with additional money, benefits, therapy and earlier retirement... (not just in Europe right?)

I guess what would happen if this person becomes permanently burnout or suicides because of this long exposure; my understanding is that the employer is responsible for that unless the contract has some compensation and mitigation for the effects on the worker's health...

2
tofflos 59 minutes ago 0 replies      
There is usually a group within the police who has to review this type of content. I couldn't find a reference to it but I'm fairly certain that the Swedish police places a hard limit, expressed in months, for how much time a person is allowed to do this type of work.

Perhaps Google should consider doing the same?

3
PappaPatat 53 minutes ago 0 replies      
Compartmentalization. Learn it. I've always made sure my team got trained and mentally supervised to prevent this exact problem (we're in... hmm call it "CERT for hire". We see shit), it makes no sense to me that Google seems not to do this. Might be because you're "just a contractor" or because they get away with burning people by the law in that particular part of the world.
4
bgammon 3 hours ago 3 replies      
After reading this, I'm just wondering about two possibilities for the development of Internet culture:

Increased policing -- people fear repercussions for posting disturbing content. The darkest corners live on.

Increased exposure -- people share the psychological burden of knowing disturbing content exists, and develop meaningful discussions and coping mechanisms.

5
nzjrs 48 minutes ago 0 replies      
It's worth remembering this is why Google's AI will always be better than yours - annotation annotation annotation. Only they can afford to throw this much money at a problem
6
cannonpr 51 minutes ago 0 replies      
Moderators and professionals in this area, like police officers, are often the least psychologically prepared to cope with this, they also often receive the least support in quality and time to do so.Psychiatrists receive a lot more training to cope, and are monitored by other psychiatrists them selves to ensure that they get the help they need.Yet there are too few psychiatrists and psychologists for this job and they are too expensive, so we just burn out regular individuals.
7
miiwq 2 hours ago 1 reply      
Here's the weird thing about"policing the internet" narrative...youtube, twitter, facebook, reddit etc nobody in these companies talks about how the shadier parts of their networks are the main draw. We hear more about the great firewall of China and transparency needs of our police departments than how these companies are policing the net.If China needs hundreds of thousands of people to monitor it's content why should we believe YouTube and Facebook don't? I mean the content is so diverse the networks are global. How is some 20 year old kid going to know what vid is going to trigger a riot in Nigeria, or what tweet is promoting cannibalism in Uruguay.

These companies have just been hiding behind the free speech folk with their heads buried in the sand about the long term effects of all this content.

If we can figure out ways to get our govts to tell us know how many policemen we need and the process it takes to become one, there is no reason Silicon Valley should be doing this vital policing in secret.

8
stock_toaster 3 hours ago 0 replies      
That job sounds horrifying -- surprised it doesn't come with some kind of a minimum therapy hours requirement.

Aside: After reading that article, henceforth every time Google drops a product or weirdly changes focus/direction, I am going to say "Google is shaking the bear again".

14
Show HN: Quantum Game with Photons quantumgame.io
38 points by stared  11 hours ago   16 comments top 11
1
sideshowb 1 minute ago 0 replies      
hi again stared, great to see you finished this at last! Will have a play later.

We met on here last year discussing my quantum game. Shameless plug for everyone else:

http://tropic.org.uk/~crispin/quantum/

(Sorry about expired security cert!)

2
benjamincburns 14 minutes ago 1 reply      
I assume there must be some way to rotate the mirror? Maybe I'm crazy, but I can't seem to figure it out.

Edit: Seems it's mobile only, or the mouse drag event handling is masking the click event. That is, it rotates for me on mobile, but not on my desktop browser (chrome 58.0.3029.110).

3
pmontra 2 hours ago 1 reply      
Great game. Two note

1) you should add some explanation about why making light to through a number of crystals (they slow it down by 1/4 wavelength) lets the beam go though a beam splitter in one or two directions.

2) Pinch to zoom works but the photon beam moves on a path that's not affected by the zoom. Firefox Android, I didn't check with other browsers. But it works on a 4,7" screen, which is great.

4
anchpop 5 hours ago 1 reply      
Another good web game about advanced physics is VelocityRaptor [1]. In the game the speed of light is set to 3 miles per hour, and you have to use relativity to solve puzzles

[1] http://www.testtubegames.com/velocityraptor.html

5
tomsmeding 3 hours ago 0 replies      
This game needs lots more education and explanation. Through the levels, I understood reasonably well how polarization works, but interference is still a complete mystery, and I haven't been able to get past level 25 (interfrenzy).

If someone plays past the first few levels, you can be quite sure he/she is not afraid of some explanation about how stuff actually works, and having that would have made the game a lot more fun for me.

Also, in the Sagnac-Michelson-Morley level, you're supposed to place a "Sagnac-interfRerometer" somewhere (hint: it's the vacuum jar, and that's a different thing). ;)

6
Lramseyer 3 hours ago 0 replies      
I really like the idea of this game. But while it seems to simplify certain aspects of optical tables (like adjusting mirrors and other optical elements,) it makes other things way more complicated than they should be due to the visual simplicity.

It's mostly the polarization (and phase to a lesser degree) that I am referring to. That stuff is way more intuitive on a real optical table.

7
6nf 5 hours ago 0 replies      
I have a solution for #22 with 2 mirrors left over: http://i.imgur.com/XB4QwLy.jpg
8
sliken 4 hours ago 1 reply      
Is level 16 (three polarizers) broken? There's only one piece you can place, and only 5 places you could place it (that would make sense). Not placing it doesn't work either.
9
sliken 2 hours ago 0 replies      
Any hints for 21? I can get 100% to one detector or 98% to 2.
10
tbabb 4 hours ago 0 replies      
I hope it wasn't on purpose that the "bomb" tile crashed my browser when it exploded...
11
ADanFromCanada 6 hours ago 0 replies      
This is awesome!
16
Linux Inside How the Linux Kernel Works gitbooks.io
377 points by SebNag_  19 hours ago   17 comments top 5
1
classybull 13 hours ago 2 replies      
Every time I start to fall into the conceit that I'm an exceptionally good developer, I look at things like kernels or low level hardware programming and eat a big ol' slice of humble pie.
2
WhoBeI 15 hours ago 0 replies      
Nice. Way back in the day, maybe 20-25 years ago, I had a first look at the boot process and wish I'd had something similar to the first chapter then. Man, it was hard to find information and ones you did you realized understanding it meant learning an entirely new subject.

Those were the days really. Barely having started my English studies I went looking for a single piece of information and found so much else on the way.. The tinkering and nights of frustration gave insights and a feeling of accomplishment that set me on the path to the profession I have today.

Then I started high school and someone showed me a shaded and textured cube they had rotating on their screen and I found out what math is good for :)

3
dom0 14 hours ago 1 reply      
Besides some scattered text files and the Linux man pages, there is this: https://www.kernel.org/doc/html/latest/

It's fairly new - started about a year ago, but there's quite a lot of stuff in there already (bootstrapped from the old XML stuff, I believe).

4
i_have_to_speak 2 hours ago 0 replies      
Oh my God, the first article has a link to Ralph Brown's Interrupt List. Good ol' days!

[1] http://www.ctyme.com/intr/int.htm

5
chris_wot 17 hours ago 1 reply      
I love this work, it inspired me to work on Inside LibreOffice.

https://www.gitbook.com/book/chrissherlock1/inside-libreoffi...

17
How Bayesian Inference Works (2016) brohrer.github.io
212 points by amzans  17 hours ago   25 comments top 10
1
bjornsing 15 hours ago 6 replies      
> Bayesian inference is a way to get sharper predictions from your data.

Funny, if I had to summarize it in one sentence I'd describe it in the opposite way: Bayesian inference is a way of making less sharp predictions from your data, with quantified uncertainty.

2
robterrin 3 hours ago 0 replies      
There are lots of discussions and explanations of what it means to be "Bayesian," but I think the best thing to do is jump in and start building models. That is how I came to understand the utility of Bayes.

If you're looking for a place to start I'd go to Andrew Gelman's introduction for the Stan Language:https://www.youtube.com/watch?v=T1gYvX5c2sM

There are Stan implementations in R, Python, Julia or you can run it in C++ since it's written in C++. I think this has greater potential to change how we deal with the unknown than AI or other machine learning.

3
amelius 13 hours ago 2 replies      
I wonder how many people have reinvented Bayesian inference without knowing it.
4
jamii 9 hours ago 1 reply      
In case anyone is wondering how Bayesian inference works on non-trivial problems:

https://arxiv.org/pdf/1701.02434.pdf

5
jonloldrup 12 hours ago 2 replies      
But how do I incorporate my level of confidence in my prior? I haven't seen any treatment of this question, even though it is a quite essential one: priors that you are not so sure about should be given less weight than priors that you are very certain about.
6
anythingbot 7 hours ago 0 replies      
What you actually want in this context is some code that generates random deviates of probability distributions chosen randomly and a "guesser agent" that tries to guess which distribution was chosen. Then you can ask questions like,

> given some condition on a distribution of distributions, when do we feel that a guesser is taking too long to make a choice?

This is like a person who is taking to long to identify a color or a baby making a decision about what kind of food it wants and waiting for it to do so. For a certain interval, it makes sense, but after a point it becomes pathological.

So for example if we have two distributions,

> uniform distribution on the unit interval [0,1]; uniform distribution on the interval [1,2]

then we get impatient with a guesser who takes longer than a single guess, since we know (with probability 1) that a single guess will do.

Now, if we have two distributions that overlap, say the uniform distribution on [1,3] and [0,2], then we can quantify how long it will take before we know the choice with probability 1, but we can't say for sure how many observations will be required before any agent capable of processing positive feedback in a neural network can say for certain which one it is. As soon as an observation leaves the interval (1,2) the guesser can state the answer.

Now, things can get more interesting when the distributions are arranged in a hierarchy, say the uniform distribution on finite disjoint unions of disjoint intervals (a,b) where a < b are two dyadic rationals with the same denominator when written in lowest terms.

If a guesser is forced to guess early, before becoming certain of the result, then we can compare ways to guess by computing how often they get the right answer.

Observations now give two types of information: certain distributions can be eliminated with complete confidence (because there exists a positive epsilon such that the probability of obtaining an observation in the epsilon ball is zero) while for the others, Bayes theorem can be used to update a distribution of distributions or several distributions of distributions that are used to drive a guessing algorithm. A guess is a statement of the form "all observations are taken from the uniform distribution on subset ___ of the unit interval".

Example: take the distributions on the unit interval given by the probability density functions 2x and 2-2x. Given a sequence of observations, we can ask: what is the probability that the first distribution was chosen?

The answers to these questions can be found in a book like Probability : Theory and Examples.

7
ice109 14 hours ago 1 reply      
fails to mention the implicit assumption of conditional independence in the measurements (weighings)
8
lngnmn 3 hours ago 0 replies      
OK, but this "inference" is not a valid substitute for a logical inference because it produces a different type of result - probabilistic, not certain.

The crucial difference is that statistical inference does not consider any causation, its domain is observations only, and observations only cannot establish a causation in principle.

Correlation is not a causation. Substituting a Bayesian inference for a logical inference should result in a Type Error (where are all these static typing zealots when we need them?).

This is, by the way, one of the most important principles - universe exist, probabilities and numbers does not. Every causation in the universe is due to its laws and related structures and processes. Causation has nothing to do with numbers or observations. This is why most of modern "science" are non-reproducible piles of crap.

Any observer is a product of the universe. The Bayesian sect is trying to make it the other way around. Mathematical Tantras of the digital age.

9
genpfault 10 hours ago 0 replies      
Priors go in, posteriors come out. Can't explain that!
10
awptimus 5 hours ago 0 replies      
Did he just assume their gender? Did I just assume his gender?
18
Show HN: ObjectCropBot Interactively Crop Objects from Photos with AI andreykurenkov.com
19 points by andreyk  7 hours ago   4 comments top 2
1
andreyk 7 hours ago 1 reply      
I post this now (the project is a few months old) purely inspired by this post: https://blog.photoeditorsdk.com/deep-learning-for-photo-edit...

They basically took the same idea and instead of just producing a hack finished a nice full version of the idea - very nice write up!

But, they don't have any web UI for it yet, so I am getting tempted to revive my dormant side project and likewise make a proper polished version of it with a web interface. If anyone on here is a talented web dev with an interest on working on this as a side project (for free, and for fun, though we could explore monetization if it works), feel free to get in touch! (ps extra get in touch if you are near south bay area/Stanford)

PS Incidentally, I independently came up with the same idea as in Deep Interactive Object Segmentation (https://arxiv.org/abs/1603.04042) and implemented it for my Stanford CS 229 (Machine Learning) project first - the hack came later. The ObjectCropBot hack allows only cropping and not clicking because it was faster to hack in that, but I think it is ideal to allow both cropping to constrict around target object and clicking (clicking alone leaves too much ambiguity , eg do you want to crop the person, or their shirt, or a subset of that shirt).

2
shimon_e 4 hours ago 1 reply      
Looks nice. May I recommend getting free credits from OVH.https://www.ovh.com/us/dlp/

Are you available for consulting? I have a project in this domain that you may be interested in.

20
WebGL Water madebyevan.com
21 points by joubert  8 hours ago   6 comments top 4
1
rasz 15 minutes ago 1 reply      
Judging by how it runs on the desktop(4 year old gpu) and YT clip it was developed on anemic laptop and never speed tested, reminds me of Wing Commander or Test Drive 3. Learn from the past and dont link main loop speed to framefate.
2
ge96 1 hour ago 0 replies      
Just wanted to point out not working on Chromebook

Uncaught Error: This demo requires the OES_texture_float extension

I've seen this before though on Reddit, pretty cool how well it works on Mobile.

Also I realize OP may not be related to the post/created it and I should file a bug or whatever, I'm just posting it here.

3
hyperpallium 1 hour ago 1 reply      
Why aren't there floating-point textures on mobile GPUs? (To me) it seems a pretty straightforward addition, and many more GPGPU tasks become easier.

Sure, you can en/decode yourself, but faster in silicon.

Sure, there's openCL, but it's more fiddly, gives worse performance, and no-one uses it.

4
tehsauce 1 hour ago 0 replies      
His webgl pathtracer is very cool also!http://madebyevan.com/webgl-path-tracing/
21
Too many prisons make people worse economist.com
316 points by sohkamyung  22 hours ago   203 comments top 21
1
cubano 12 hours ago 10 replies      
Prisons not only make the convicts inside them worse, but from my experience and POV, it makes the people observing and interacting with them worse as well.

I say this because while I seem to observe this prison-is-terrible-the-convicts-need-compassion, not one person here has offered to help me in any meaningful way, even though I have documented my trials and tribulations over and over [0][1][2].

I have a 30 year history of software development, with 14 or so with the LAMP-stack. No one reading this is willing to even talk about some side project or prove-yourself 2 week gig? Ok right I get it...this isn't a help wanted or job board fine that's cool.

But still, I'm not getting it anymore...is everyone just into some sort of bullshit social signalling exercise or, perhaps worse, are willing to try to help ex-cons as long as they are funneled into low paying exploitative back-breaking jobs with no future that almost surely will lead 95% back into crime?

If so, can we start being honest about that's what all this discussion is about..."boy someone should sure do something about how screwed these people are but hell no it won't be me."

Yeah, so I'm frustrated and scared and broke and all that, so try to forgive my rant...I'm sure I'll come to regret it as I do so much else in my life.

[0] https://postmoderncoder.svbtle.com/fear-and-jaywalking-in-la...[1] https://news.ycombinator.com/item?id=14394324[2] https://news.ycombinator.com/item?id=14302656

2
hackermailman 18 hours ago 3 replies      
Unsurprisingly people who have done long stretches of time in Norway's prison system disagree with this article. Only a few prisoners enjoy the freedom of this island, which is equivalent to a trustee camp in a US min security prison. The rest who were given 10+ year sentences are in complete isolation in what the media loves to refer to as hotel prisons. In these cells everything is provided for you including your own shower, therefore there's no reasons for the guards to ever let you out and you stay in there 23hrs per day. Because the media calls them hotels, it prevents any prisoner from being able to complain and be taken seriously, so often these guys will either light their cells on fire and hopefully get transferred to one of the older style jails so they can talk to other inmates, or they just kill themselves.
3
renegadesensei 16 hours ago 6 replies      
Is it possible to punish and rehabilitate at the same time? I ask partly because I have small kids. When they do bad things, I try to focus on educating them and not punishing. Then again, most of the bad things they do (making a mess, being too loud, etc.) are relatively benign. If they were to do something really horrible and victimize some other kid, I would probably punish them, but at the same time I would hope I could teach them never to do such a thing again.

I think that's the moral dilemma with prison systems. It's easy in abstract to say that we should just focus on rehabilitation and take this utilitarian argument about what's best for society. But I know that if, for example, someone were to harm my children, I would have trouble being convinced that that person needs free college and housing (partly paid for by me). Even if that statistically led to a better outcome for society, it would not seem like justice; rather it would seem that person is being rewarded for harming my family. This I think is a general problem with utilitarianism - that when we just focus on group outcomes, we sometimes lose sight of things like individual rights and justice, messy moral concepts that don't always create optimal group results.

Maybe there is some way to do both things or differentiate between types of criminals. I don't really have a solution. Just posing the conundrum.

4
gtirloni 20 hours ago 7 replies      
A few weeks ago, running the subway in a major North American city, I kept admiring how people were polite and waited for other people to leave the trains before entering, how many times I saw someone give up their seats for the elderly (not that they really needed, there were a lot of empty seats elsewhere). That got me thinking if those same people would be as polite if they were in the same train but with 20x more people around. I think extreme situations are a great equalizer in crowded situations and it's my feeling they would behave the same: not wait for anyone, not give up seats, etc.

My point is, what works for Norway (population: 5.2m, prison population: 3874 or 0.0745% [0]) is never going to work for Brazil (population: 207m, prison population: 659020 or 0.31% [1]).

I like the idea of these idyllic prisons but inmates that will fit those are the exception here. Nevertheless, the system should offer them and help good inmates to be removed from the terrible traditional prisons so they don't become worse. It's often said that prisons are like college for criminals.

I don't know if this system could handle things like this: http://www.aljazeera.com/news/2017/01/60-killed-beheaded-gri...

In summary, I love the idea but let's not pretend that by just having those prisons that things will change drastically. It's a complex situation and there are problems everywhere (bad laws, slow courts, poverty, etc).

0 - http://www.prisonstudies.org/country/norway

1 - http://www.prisonstudies.org/country/brazil

5
crucini 16 hours ago 2 replies      
This article is a fine example of IYI - "intellectual yet idiot" as Taleb terms it. Verbal cleverness + plausible statistics + apples/oranges comparison = what? Equals: "We have the answer to everything, but sadly the rulers and electorate aren't as wise/clever/compassionate as us." Others in this thread have pointed out specific fallacies in this article - for example there are prisoners in the US using chainsaws and axes; there are prisoners in Norway in solitary confinement who would be in general population in a US prison.

But let's zoom up to the bigger syndrome. Notice the author quotes at least one offender, but doesn't bother talking to any corrections officers. Did it occur to him that someone who worked in a prison for 20 years might know a little bit more about corrections than someone who read a bunch of studies and statistics?

Symptomatic of a broader problem - the chattering classes, who consume and generate information, are increasingly cut off from the real world, and increasingly influential. Of course it's easy to have opinions about how something "should" work when you have no experience and no skin in the game.

6
OliverJones 16 hours ago 1 reply      
The author wrote: "In America some prisoners are released after long sentences with little more than clothes and a bus fare."

Rubbish. In the county where I live, Essex in MA, inmates are given the clothes they were wearing when arrested and a ride to the courthouse where they were convicted, and turned loose. Pity the guy arrested in May who gets out in January. They shoplift at the local Marshalls on their way home. I wonder why?

7
tuna-piano 16 hours ago 3 replies      
Why are we looking at Norway? Because it is doing something right, or because it fits the authors preplanned narrative?

Singapore has much lower crime stats than Norway and the USA [1,2]. Let's take a look at how Singapore treats its prisoners.

The punishment for even minor crimes (like graffiti) includes caning[3]. They stick you in a prison cell for months, and on some random morning, they will wake you up and give you the sentenced number of hard beatings to your backside. The beating is done by someone with specialized training to inflict maximum pain (while remaining safe). So for months, every day you are scared, never sleeping soundly, as you don't know if this will be the night of your beating.

-Would the graffiti rate in the USA go up or down if the USA imposed the same penalties as Singapore?

-Would reducing recidivism rates by 20-50%, as the article claims possible, really be enough to lower crime in the USA to a OECD average level [4]?

-Norway and Singapore each have ~5M people. Singapore has 130 rapes a year, Norway has 1,000. How do you justify leaving the Norway justice system in place to the additional 800 rape victims in Norway, when a better system for reducing crime has been invented?[5]

Maybe the US is stuck in middle-no-mans land that leads to bad outcomes. To address this, they could either make prisons into hotels/universities (Norway) or impose stricter penalties (Singapore). But if someone did something terrible to one of my family members, I know which system I'd prefer.

[1] http://www.nationmaster.com/country-info/compare/Norway/Sing...

[2] http://www.nationmaster.com/country-info/compare/Singapore/U...

[3] https://en.wikipedia.org/wiki/Caning_in_Singapore

[4] https://en.wikipedia.org/wiki/List_of_countries_by_intention...

[5] Of course, it's never fully accurate to measure systems by comparing numbers across different cultures/measurement systems. The main point remains though.

8
hl5 18 hours ago 0 replies      
The better way is to reduce poverty. You can build whatever "rehibilitation" program you want, but if the future holds no promise, why follow the rules?
9
MarkMc 15 hours ago 0 replies      
From a related Economist article [0]:

"Oregon, which insists that programmes to reform felons are measured for effectiveness, has a recidivism rate less than half as high as Californias."

Assuming it's not a statistical blip, I wonder why Oregon is so different to California. Seems to me that a politician who promises to reduce the recidivism rate and thereby save taxpayer dollars would get more votes.

[0] http://www.economist.com/news/leaders/21722642-lot-known-abo...

10
dmh2000 19 hours ago 1 reply      
The US has minimum security prisons also and just like this one, you have to qualify one way or the other.

https://www.forbes.com/2009/07/13/best-prisons-cushiest-mado...

11
lerie 17 hours ago 1 reply      
The USA has "boys homes" that do this. As a child, I attended one such place where we all had to grow our own vegetables, to this day I can grow vegetables.

Privatized prisons (in the USA) are money makers, holding mostly low to medium risk offenders, you can even buy shares on the stock market.

With more police on patrol there will be less crime. Spend less money on prisons and more money on local police force.

12
Overtonwindow 19 hours ago 6 replies      
The American system of justice is not to rehabilitate, but to humiliate, punish, and torture. Worse, we outsource this to the private prison system which has an incentive to keep people in prison. You go to prison in America you will be brutally tortured, humiliated, and will emerge far worse than when you went in. That is the fault of every American citizen - not the politicians - but the people. Because it is the citizenry who punishes the politician that appears even remotely soft on prisoners, or supports prison reform. America is a vengeful society, overflowing with righteous indignation.
13
tormeh 18 hours ago 3 replies      
Would a prison dichotomy be a good idea? That is, the reformable criminals go to rehabilitation, and the ones for which there is no hope go in for life (or at least until old age)?
14
rectang 19 hours ago 1 reply      
This doesn't apply in the USA, since for our citizens the purpose of our prison system is not to rehabilitate, but to inflict savage vengeance.
15
m3kw9 18 hours ago 0 replies      
American prison is actuall not a system but a culture. Think of how hard it is to change a culture, you probably need new leadership with enough power like a CEO at Microsoft to do something drastic in a reasonable amount of time, say 10 year frame.
16
Shivetya 18 hours ago 1 reply      
prisons are just the beginning. when you get out you can find yourself prevented from obtaining a job, a residence, and even assistance, because of local, state, and federal laws.

The Renew Act of 2017 is trying to expand the age limits for expungement of records of first time offenders.[1] its a start but there are more opportunities to fix the system post prison too. you don't even have to go to prison to have a record that prevents you from being productive in society.

one of favorite examples are the volunteers for smoke jumping, putting out forest fires. there are states where its illegal for a person who did this job in prison to obtain the same outside. if we keep up the barriers where do we truly expect people to go?

[1] http://dailysignal.com/2017/05/24/heres-smart-modest-increas...

17
adrianlmm 19 hours ago 2 replies      
Who wrote that article? I can't find the source anywhere.
18
darpa_escapee 10 hours ago 0 replies      
It should be well known that the public, and often the judicial system, see prison as punishment and not rehabilitation.

Another portion sees at as constitutionally-granted slave labor or an opportunity for profit.

19
chrshawkes 9 hours ago 1 reply      
So what is the solution keep criminals in society?
20
hnaparst 19 hours ago 0 replies      
A discussion about disenfranchisement conducted by the least disenfranchised people on earth. Pretty funny.
21
carsongross 18 hours ago 3 replies      
One advantage the Norwegian prison system has is that it is filled with Norwegians, I would be careful generalizing conclusions from it.

That being said, one concept I rarely see discussed is the use of basic income as an incentive against crime, particularly violent crime: if you lost your citizens dividend after conviction and slowly earned it back every year upon release that would act as a powerful and immediate incentive to avoid violence.

22
Our understanding of the way the body handles salt may be wrong nytimes.com
143 points by mherrmann  16 hours ago   51 comments top 10
1
givan 26 minutes ago 1 reply      
Salt as far as I know is the only mineral (non plant) spice we use, it's purpose is to enhance taste.

There is a common confusion between salt (sodium chloride) and sodium, many falsely believing salt is not used only for taste but it's essential for health.

Sodium is a vital element that is found in almost all plants and animals and there is no need for an extra sodium intake because our food has plenty.

Sodium and potassium balance in the body is essential for cell physiology and our healthhttps://en.wikipedia.org/wiki/Na%2B/K%2B-ATPase

I don't add salt in my food and avoid products with salt for more than a year, "heavy food" doesn't feel as heavy, my skin is not as dry as before and looks better and injuries seem to heal faster.

2
dottrap 10 hours ago 0 replies      
This needs to be paired with Scientific American: It's time to end the war on salt

https://www.scientificamerican.com/article/its-time-to-end-t...

3
jrapdx3 8 hours ago 0 replies      
For the past year I've been on a low sodium diet, not so easy to achieve. After reviewing the renal physiology I learned about years ago re: sodium and calcium regulation, I'll testify it's every bit as complex as I remember and then some.

I'll be interested in reading the articles the newspaper report is based on, but ATM not sure how much the new findings contradict (vs. extend) what's thought to be true about the physiological roles of sodium. In terms of implications for health issues, conditions like hypertension are enormously heterogeneous in origin, salt intake being only one factor among a huge number of factors involved.

I was interested in the comment that high salt intake was potentially adverse for bone health via glucocorticoid stimulation. One thing I've recently learned is how high dietary sodium negatively affects bone calcium balance via mechanisms within bone cells, and in some people, excessive renal calcium excretion as well. These issues aren't AFAIK primarily mediated by elevated cortisol. So it seems to be suggesting another way high sodium intake promotes bone loss.

Goes to show we know a lot less than we think we know, in this case about body regulation of essential minerals like sodium and calcium. When we realize that also applies to every other factor we think related to high blood pressure or osteoporosis, it's very humbling indeed.

4
scandox 10 hours ago 3 replies      
This didn't surprise me so much. In several hot countries I have noted people taking salt to relieve thirst. In Mongolia I drank heavily salted tea (the usual there) all summer and it becomes quite natural.

Maybe I'm missing some of the subtleties here?

5
runeks 6 hours ago 1 reply      
I have a hypothesis that all the negative effects associated with increased salt intake are really negative effects of overeating. If we measure the salt intake of people who primarily eat fast food -- which has a constant salt content -- the amount of salt ingested will be proportional to the amount of food ingested. So the person who eats five Big Mac meals a day will ingest, roughly, five times as much salt as a person eating only one, but I would claim the adverse effects associated with this are related to overeating, not the increased salt intake.

Is anyone familiar with studies that study the health effects of salt with this in mind? I.e. keeping food amounts constant over different groups, while varying only salt content?

6
reitanqild 11 hours ago 1 reply      
I think Thor Heyerdahl or someone on one of his crews noted that when they added seawater to the freshwater to make it last longer it also made them less thirsty.

IIRC they thought it was an interesting observation since it was against all common understanding, but I don't think they ever came close to a solution to why.

7
vmarsy 9 hours ago 1 reply      
> Instead of drinking more, the crew were drinking less in the long run when getting more salt. So where was the excreted water coming from? There was only one way to explain this phenomenon, Dr. Titze said. The body most likely had generated or produced water when salt intake was high.

That's odd, what if simply a high-level of sodium reduces your perspiration? Wikipedia[1] says "The volume of water lost in sweat daily is highly variable, ranging from 100 to 8,000 mL/day." so between 0.1 and 8 liters per day! [2] even says 10 to 12 liters per day!

If on average over a long period the subjects drank let's say exactly 1 liter per day and peed strictly more than 1 liter of water, then I'd agree with what this Dr. said, but neither this nytimes article, nor the 2 papers mentioned [3][4] mention the word perspiration or sweat in their abstracts/summaries, why not?

Off-topic: Did nytimes.com made it hard on purpose to select text from their article? On Chrome and Firefox I can't select text easily, only Edge lets me.

[1] https://en.wikipedia.org/wiki/Perspiration

[2] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2267797/

[3] https://www.jci.org/articles/view/88530

[4] https://www.jci.org/articles/view/88532

8
xaedes 15 hours ago 1 reply      
That is interesting. I see an advantage this adaption offers when trapped with only salty sea water. Excessive salt intake may occur naturally when in the ocean for whatever reason.When this reduces thirst and offers an (internal) alternative for water this may help you survive until you strand somewhere to find fresh water.Not the worst trait evolution could select for.
9
tetraodonpuffer 10 hours ago 3 replies      
my n=1: I am on an extremely low sodium diet (around 500mg/day) and I didn't find any difference in thirst or hunger levels compared to when I was on a more typical 4000-5000mg/day one.

The only change for me (besides of course a period of adjustment where food didn't taste like much) has been a significantly lower blood pressure (from typically 145/85 to 105/65), everything else has remained pretty much the same.

10
Mz 11 hours ago 1 reply      
And, Dr. Titze said, high glucocorticoid levels are linked to such conditions as osteoporosis, muscle loss, Type 2 diabetes and other metabolic problems.

And cystic fibrosis, which is perhaps best tldr'd as a salt wasting condition, frequently leads to Cystic Fibrosis Related Diabetes, which is neither type 1 nor type 2 diabetes.

23
Better than Free (2008) kk.org
162 points by _pius  15 hours ago   39 comments top 12
1
incompatible 8 hours ago 1 reply      
"Once anything that can be copied is brought into contact with internet, it will be copied, and those copies never leave."

Not really true at all. So many times I've found a dead link, archive.org doesn't have a copy, it's gone. Entire domains loaded with content have disappeared. In general, people don't copy and save other people's material, except temporarily for viewing.

2
01572 14 hours ago 0 replies      
"The internet is a copy machine."

This truth is often hidden by some given abstraction.

(file, save, download, streaming, etc.)

Businesses have been built on such abstractions. Success stories.

On the flipside, existing businesses that were built before the internet who do not know the truth have been fed these abstractions. These businesses may stand nothing to gain from participating in the copy machine. Whomever is feeding these businesses with abstractions that hide the truth are not helping these businesses. They are helping themselves and watching these businesses being destroyed by a copy machine.

3
teach 11 hours ago 0 replies      
Thank you so much for posting this! I saw this when it was originally posted back in 2008 and think of it often but could never craft the google-fu needed to unearth it again!

(Findability, anyone?)

4
davidgerard 48 minutes ago 1 reply      
> A couple of high profile companies, like Red Hat, Apache, and others make their living doing exactly that.

Apache??

5
superasn 6 hours ago 1 reply      
This guy gets it. This is one of the reasons that the best way to sell product online is to create a cheap front-end product that delivers insane amounts of value to the Customer and then make profits with the back-end sales over and over, i.e. Repeat customers (because now you have their trust and good will).
6
b1daly 1 hour ago 0 replies      
A nice essay generalizing about what people might be willing to pay for, in a world where the marginal cost of production of products that people used to pay for has dropped to zero.

One category that he missed is embedding digitized products like software into dedicated hardware. It's a form of DRM that is harder to crack (I think).

Here's some examples from the audio world, that are variations of this idea.

The main audio software platforms, known as Digital Audio Workstations (DAW) have all evolved to a point where they have to support open plugin formats. Plugins are implementations of digital signal processing software, that are used in combination within the DAW to produce the end result, which is a complete, finished sound file,

Because audio production and engineering is hard (basically, things tend to not sound good) there is constant development, and fierce competition, in this niche market.

Various forms of DRM, or licensing systems, are almost universally used. This provides enough friction, meaning you can get cracked versions of most plugins, but it comes at a cost of inconvenience, malware, or compromised stability, that a modest number of small companies have built business in the market.

But the competition is fierce, and the trend in license prices has been steadily down. The cracks do hurt the sales.

One company that has thrived in this market is Universal Audio. They put heavy development into making premium, we'll respected plugins, but they only run on their proprietary DSP systems. For a while, this could be seen as a genuine advantage, as users commonly ran up against the limitations of their CPUs.

This is no longer the case, but the company has steadfastly stuck to their proprietary system. One technique they used was to embed their DSP in dedicated sound interfaces.

The sound interface market is also hotly contested, and companies are constantly fighting against commoditization. So they developed high quality sound interfaces, which is something all audio producers have to have, and use their catalog of exclusive software plugins as a "value added differentiator."

CEDAR is the pre-eminent developer of specialized software dedicated to challenging issues of noise reduction. For a long time, they limited the use of their algorithms to their own DSP hardware. If you wanted these industry best algorithms, you had to buy their, relatively, expensive systems. While they now do offer some of their software as plugins, they continue to use dedicated hardware as part of their product strategy.

One interesting possibility is the embedding of otherwise unremarkable software into dedicated hardware, because of the user interface advantages. By giving the user access to physical controls, that do nothing but mimic their virtual cousins, the goal would be to dramatically increase the usability of the software. There has been some movement in this direction, which is actually a kind of throwback to how the first generations of audio DSP devices, back when dedicated hardware was the only way to implement such processing.

You can see this tension around user interface play out in the realm of audio mixers for life performance. They use dedicated interfaces to run the real time DSP, but combine various virtualization strategies. Some of the biggest audio plugin companies, like Waves, have released versions of their popular software plugins to run on some of the modern live mixing hardware systems, thereby generating new revenue streams from existing products.

At this point, while it is entirely possible to run an entire mix of a live show on a PC with a mouse and keyboard, it is such a sub-optimal user experience, that I have never witnessed anyone do this. (Though I'm sure some foolish, Braveheart do, and budget challenged audio engineers have done it!)

7
mortiester 9 hours ago 0 replies      
Thus whoever can seize control of things that can be copied and stop the copying can sell them at any price as long as people need it...an internet monopoly.
8
dang 8 hours ago 0 replies      
Discussed (a bit) at the time: https://news.ycombinator.com/item?id=108559.
9
majewsky 11 hours ago 0 replies      
tl;dr: Reasons why people will still pay for digital content even though it can be reproduced at no cost: immediacy, personalization, interpretation, authenticity, accessibility, embodiment, patronage and findability. Advertising is notably absent from the list. Quoting:

> Careful readers will note one conspicuous absence so far. I have said nothing about advertising. Ads are widely regarded as the solution, almost the ONLY solution, to the paradox of the free. Most of the suggested solutions Ive seen for overcoming the free involve some measure of advertising. I think ads are only one of the paths that attention takes, and in the long-run, they will only be part of the new ways money is made selling the free. But thats another story.

Since this is (2008), does anyone know if that blog covered that "other story" at some point? I'm currently digging through a Google search for

 advertisement site:kk.org inurl:thetechnium
...but cannot see anything useful so far.

10
danboarder 13 hours ago 3 replies      
Published January 31, 2008
11
m-j-fox 11 hours ago 1 reply      
12
amelius 11 hours ago 5 replies      
Immediacy -- who really needs it?

I mean, for a movie, just wait a few months and you can download it.

If you don't want to wait, you still have to wait for the next movie to come out, so it makes no difference really.

To say it another way: no matter where you are in the pipeline, you still have to wait the same amount of time for new data to arrive.

24
A Year of Google and Apple Maps justinobeirne.com
332 points by almostdigital  20 hours ago   96 comments top 23
1
gumby 15 hours ago 2 replies      
This is the most significant fact:

> Over the course of a year, Google quietly turned its map inside-out transforming it from a road map into a place map.

I've long been amazed how we somehow transitioned during the early 20th century from a mental model of roads and paths running through locations to places (house lots, etc) being the spaces between the roads. It's a natural thing to happen, but one of those invisible flips that happens on a timescale longer than a human lifetime.

But this anticipates the opposite: if you can stop worrying about how to get somewhere (because you don't have to drive or plan much -- self-driving or Lyft-style services can take care of the route planning) you can focus on the destination.

We see this phenomenon in subway maps which are famously schematic and not geographical.

(BTW the transformation is visible in literature, which is how I noticed it. The sense of geography in, say, Jane Austin is completely alien to today).

2
serhei 12 hours ago 2 replies      
It's also interesting to see how maps evolve (or fail to evolve) for places that are not San Francisco.

At the moment, Apple Maps seems to have a more thought-through design for public transit than Google Maps. Which is to say, transit view in Apple Maps is either visually clean and uncluttered, or completely nonexistent, depending on whether they got around to adding your city. Clearly a lot of by-hand design work goes into it, which isn't a very scalable approach.

On the other hand, transit data in Google sometimes appears to have been munged with no human intervention and never received even a cursory check by a graphic designer. For example, turning on Transit view in downtown Toronto will show a mess of ungodly rainbow spaghetti which is meant to represent the streetcar system. There are lines on non-revenue tracks where no streetcars actually run, lines on streets that don't have streetcar tracks, random artefact lines that appear and then vanish two blocks later, and lines drawn diagonally through the middle of High Park where there is no street at all. Somehow, the data behind this spaghetti is diligently updated year-after-year (e.g. the new Cherry streetcar was added in 2016) without anyone involved in the process noticing that the results are hideously garbled.

It also took them about a decade to realize that the SkyTrain in Vancouver is a rapid transit system.

3
maheart 4 hours ago 0 replies      
I was curious to see how well OpenStreetMap (OSM) had these locations mapped: http://www.openstreetmap.org/#map=19/37.77620/-122.42455
4
BatFastard 15 hours ago 3 replies      
One thing I think Google has going for is it "Guides" program. Where user get "points" for correcting mistakes, adding new places, and publishing pictures. I have been in it for a few months and it feels good to contribute.
5
peterburkimsher 2 hours ago 1 reply      
How can I configure OpenStreetMap to use the old Google Maps colours with an emphasis on roads?

I'm currently using some offline cached maps tiles downloaded with MOBAC, and waiting for Google to change their colours back again. Now I realise that it's a place map, and places generate advertising revenue, I think that Google is unlikely to fix that.

Another problem that happened recently in Taiwan was when Google removed pinyin (latin letters) from the street names, leaving only Chinese characters. Foreigners living here couldn't find their way around. I threw together a quick alternative to GMaps, and told people about it - until Google put the pinyin back about a week later.

6
sixothree 15 hours ago 1 reply      
My biggest problem with google maps is that it doesn't respect the font size settings of my device. A four point font is not ideal for my eyes in the best of conditions, much less when travelling and navigating.
7
JumpCrisscross 15 hours ago 5 replies      
> This all seems to suggest that Googles location data is more precise than Apples. (Or that Apples geocoder is buggy.) And perhaps here were seeing the fruits of Googles decade-long Street View project.

How can Apple catch up? Is there an obvious acquisition?

8
puzzle 16 hours ago 1 reply      
Additional data point about the missing "coastline dropshadows", on top of the general "bleaching" trend: that kind of effect is also not free to implement in WebGL or in mobile apps. Plus the folks that were involved in designing it have since left.
9
nicoboo 16 hours ago 2 replies      
Justin O'Beirne's articles are extremely detailed as always. It's definitely a must-see for mappers whatever the company or products you're working with.
10
bitmapbrother 15 hours ago 0 replies      
I was surprised by how out of date Apple maps were. I guess TomTom doesn't update their data that much.
11
Steko 13 hours ago 0 replies      
The At a Distance blog has extensively covered Apple Maps' deficiencies (and progress) in Japan where Yahoo maps is the best option.

https://atadistance.net

12
krzyk 1 hour ago 0 replies      
It's a pitty he doesn't compare it to OpenStreetMap also.
13
twhb 9 hours ago 0 replies      
It can't be coincidence that Google's increased focus on areas and places brings it closer to Apple Maps. It's easy to miss because of Apple's poorer data, but I think their app legitimately bested Google in some areas (heh), and this is Google absorbing those characteristics.
14
mcphage 16 hours ago 5 replies      
The thing I still don't get is, why don't any of these map services indicate traffic lights? When navigating to an unfamiliar place, counting the lights, or looking for the next traffic light, is much easier than using distance or street names.
15
627467 6 hours ago 0 replies      
My main complaint is the decrease is display priority of personal labels except for the stars.

Back in the day before labels I would star places I needed to "bookmark" regardless of importance in time and how ephemeral that mark was. Then when labels appeared I thought that was ideal to mark places which are always important (because I can personalize the label) as opposed to a generic star which most likely meant a temporary bookmark.

It seems that with this new Google maps, the stars always get display priority (it's shown even at smallest zoom level) whereas labels only appear at a algorithmically defined location (which seems arbitrary).

All this time wasted in personalizing my map.

16
GabeN 20 hours ago 3 replies      
It seems that with the increasing attention given to 'places' and less emphasis on the actual roads we are looking at Google getting Maps ready for the roll-out of self driving cars where the focus is on the destination rather than the journey.
17
Gustomaximus 10 hours ago 1 reply      
Id love to see them compare Here maps. I use Here for all my driving. Its much better interface, directions timing and has some unique features.Also I like the idea of supporting an independent player. While Google Maps is better when looking for businesses like a restaurant etc.
18
microcolonel 1 hour ago 1 reply      
I can't for the life of me understand why Apple pays TomTom for maps of places where OpenStreetMap is unequivocally more accurate. OpenStreetMap also has the correct layout of the footpaths at the north and south of the park, points of interest for every bench and a marked area in the location and correct shape of the playground, making the data (at least assuming Google renders their best data) considerably higher quality. I think this says a lot, especially considering the default leg-up that Google has here. They have images of the contours of every one of those paths, they have GPS traces, they have photogrammetry-quality photography and location, they have lots of people writing photogrammetry software; and yet for some reason they still don't appear to fuse the streetview, aerial, and satellite imagery, or seem to do feature detection for points of interest.

The big problem which seems to make it not worth expanding your dataset for graphical maps, is that it is quite difficult to display a lot of data, and still be easier to read than an aerial photograph.

19
Doctor_Fegg 13 hours ago 1 reply      
> And as of 2014, Google had already driven 99% of U.S. public roads

Nope. Try dragging Pegman over anywhere in the rural Midwest and see what you get. 99% of US _paved_ roads, perhaps.

20
curyous 13 hours ago 0 replies      
Great in-depth analysis that goes beyond what's obvious on the surface.
21
swrobel 11 hours ago 0 replies      
This guy is a Real American Hero
22
51Cards 16 hours ago 1 reply      
In response to the very last lines of the article:

"Three different looks? Whats going on with Google Maps design?"

A/B testing perhaps?

23
lucb1e 15 hours ago 0 replies      
I'm a little disappointed that the "Cartography Comparison" only looks at two commercial maps. Not even all commercial maps, let alone including OpenStreetMap. A big post detailing the minute differences between two of the big ones are not that interesting...
25
T-Mobile wants to give your phone number superpowers washingtonpost.com
11 points by natejackdev  7 hours ago   8 comments top 6
1
ohthehugemanate 1 hour ago 1 reply      
Wait, you mean I'll be able to use my phone number just like my username on popular free services like Facebook Messenger, Skype, or Google Talk? Those have been free for a decade or more, and this will only cost me $10 per month per account? Sign me up!

Now if only they would sell all my communication data behind my back, or at least give it away to the NSA, this would be the PERFECT deal. Do you think there's a way to make sure my money goes to fight net neutrality?

2
Mathnerd314 1 hour ago 0 replies      
> Google was among the earliest to experiment with this idea. Google Voice Released in 2009

Pretty sure the earliest was Grand Central in 2005-2006: https://techcrunch.com/2006/09/25/grandcentral-could-make-ph...

Google bought them and relaunched, but it wasn't an "experiment" so much as a rebranding / UI refresh.

3
MR4D 17 minutes ago 1 reply      
My iPhone already has this functionality. And I don't have to pay $10 per month for it either.

Probably a poor copy of iMessages, but without the encryption.

4
voidz 27 minutes ago 0 replies      
Is this an ad? It sure looks like an ad.
5
kalleboo 37 minutes ago 0 replies      
Instead I wish we could kill phone numbers... who remembers a phone number other than their own these days? Email addresses are much easier to remember.

Around here everyone has LINE, and I make more Skype and LINE voice calls in a month than I do phone network ones. The phone network is basically reserved for calling business for me.

6
kbar13 58 minutes ago 0 replies      
I think this is great and it's a long time coming. I have a bunch of google voice numbers that I use for various applications, but it's such a terrible service that I welcome any alternative.
26
What's the difference between the com and exe extensions? (2008) microsoft.com
225 points by empressplay  21 hours ago   79 comments top 21
1
codeflo 18 hours ago 4 replies      
Back when I was a kid, in the days before Google, you tried to figure out how things worked just by poking around your computer. For example, I noticed that professional programs were always .com/.exe files, but I only knew how to edit simple batch scripts. So of course, the "logical" thing to try was to write a .bat and save it with a different extension and see what happened.

.exe files created this way wouldn't launch, but a .com created this way would instantly reboot the computer. Even more weirdly, this only worked for the specific command that happened to enter in my first attempt -- it might have been something like "cd games". If I changed anything at all, it no longer worked. Only years later I realized that the characters I typed were directly executed as machine code, and that I must have stumbled upon a set of instructions that caused a CPU exception!

For several years, this weird file was the only way I knew to programmatically reboot a computer, so I renamed it "reset.com" and kept it around. I think it stopped working only in the Windows XP era when DOS programs were finally sandboxed to some extent.

2
gerard 8 hours ago 0 replies      
> The format of a COM file is... um, none. There is no format.

This makes any small file a valid COM file as far as Windows is concerned. NTVDM doesn't care, it will happily execute your holiday snaps if given the chance. It's not difficult to craft a valid GIF, PNG, etc that does something useful when executed from byte 0.

Such an image will pass most mime-sniffing protections. For example, given such an image and a "foo.png.exe" Content-Disposition header, Internet Explorer used to skip all security warnings. Combined with "Hide extensions for known file types" it would ask you where you'd like to save "foo.png", preserving the executable extension behind your back.

Upon double-click the loader notices the MZ signature is missing, fires up NTVDM, and starts executing the image from byte 0. If running under NTVDM is too restrictive, it can always break out with BOP instructions.

The lack of structure also makes COM files a simple vector for exploiting hash collisions. Any two prefix blocks with matching hash that can survive execution can be used to create two variants of an program with matching hashes. Bit differences in the two blocks can be used as switches to control program behaviour.

3
xg15 18 hours ago 1 reply      
Nice info. My suspicion is this also explains why many corrupted EXE files cause the cryptic error "program is too large to fit in memory" error if you try to execute them:

The corruption mangles the header, removing the "MZ" magic number -> Windows thinks the file is a COM executable and attempts to load it into memory, COM style -> the file is not actually COM though and thus is far too large to fit into the memory available to the loader -> that error appears.

4
molticrystal 12 hours ago 2 replies      
I miss being able to make small programs in debug on a Dos prompt and just dumping the machine code to a com file. It was a great way to test out and learn assembly language, and you didn't need a compiler or any other programs to make something that executed other than what was built in and a nice printed list of interrupts.

Some simple things I remember playing with in middle school, might work in a dosbox emulator window?:

pc speaker:

 out 61,1
change video mode:

 mov ax,0x13 int 0x10
Then there were cool msdos debug scripts, where you had text listings of assembly with debug commands that when piped into debug it wrote out a com file:

https://www.google.com/search?q=dos+debug+script&ie=utf-8&oe...

Some could low level format hard drives, and there were lots of other fun utilities and amusements, much more so than batch files. I'd say the modern analogue is python scripts.

5
berlincount 16 hours ago 1 reply      
My favorite .COM-file still:

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

(yes, you can just copy-paste it into a .COM-file and it will execute and just show a text - unless you've got a correctly working virus scanner)

This is a Virus Scanner test signature (https://en.wikipedia.org/wiki/EICAR_test_file), so the fact alone that you can read this comment might be meaningful ;)

6
mojuba 19 hours ago 4 replies      
If I remember correctly, not just the files themselves but the entire memory available to COM programs at run time was limited to 64k.

It's funny how engineers think those times are long gone whereas the demand for very compact systems with low energy footprint is still there. So mastering programming within kilobytes is still a thing, don't disregard it!

7
Waterluvian 19 hours ago 3 replies      
So why not do something like make a shim COMMAND.COM that handles compatibility and calls the new COMMAND.EXE?

From my novice view, it seems like it would be generally simpler to reason about.

8
NewSystems 7 hours ago 0 replies      
The days of .COM/.EXE got me started in programming. I thought, gee, I have some game ideas. So I looked into BASIC, seemed great, but the distributed files required a certain flavor of BASIC. After looking into C for developing standalone binaries, I switched to C. Programming something like DOOM required 'vertical strips' calculated across the screen and other graphics gems, so I learned about graphics gems and programming. C++ and TurboPascal and then Delphi and VB6 were released. Seemed like a never ending journey!

Today we have CocosX for cross-platform sprites so games can be quickly deployed on multiple platforms, plus Unity and Unreal engines for 3D development. It's much better today, but I wonder what it's like to not have the kind of background of learning that I did.

9
oneplane 18 hours ago 1 reply      
Too bad that things back then done for 'compatibility' meant that things now suck because breaking changes back then weren't done. This is probably why UTC time on Windows is still broken.
10
pjc50 11 hours ago 0 replies      
Note that lots of other extensions can be interpreted as executable: https://superuser.com/questions/228680/on-windows-what-filen...

(and you can also run code out of DLL and CPL files)

11
TazeTSchnitzel 19 hours ago 1 reply      
Ah, so DOS did this too! I was aware that Windows NT similarly has a few .COM command-line utilities that are actually Portable Executables (the successor to the successor to the MZ format), for compatibility's sake.
12
justin66 8 hours ago 0 replies      
My first experience with truly low-level programming was when I was a teenager. I saw a list of PC interrupts in BYTE magazine and was interested in the one that brought you to the ROM-based BASIC (18h), something I'd never seen. I stuck it into a text editor, saved it as a .com file, and boom! Something that took you to BASIC, which turned out not to be very useful compared to the Apple II (and its DOS) that I was used to at school, but still.
13
ajdlinux 17 hours ago 1 reply      
IIRC, when the DOS/Windows shell needs to resolve "program" to either "program.com" or "program.exe", the .com file takes precedence - ISTR this being abused by malware once upon a time.
14
return0 18 hours ago 1 reply      
But wait what does "MZ" stand for ?
15
tomcam 14 hours ago 0 replies      
For years I made a living off a batch file and compiler named Combat, then Son of a Batch, and finally Builder.
16
johnchristopher 19 hours ago 0 replies      
Ah! I used to wonder about that when I was a kid playing with DOS. I had the vague notion that com programs were 'dumber' than exe or less complex and were often part of the operating system. And if a 'big' application was a com then it means there were a bunch of additional com or exe files in the directory.
17
unethical_ban 18 hours ago 0 replies      
>So when did the program loader change to ignore the extension entirely and just use the presence or absence of an MZ header to determine what type of program it is? Compatibility, of course.

Either "Compatibility" is a time, or they should have asked "why".

18
mungoid 18 hours ago 0 replies      
Huh.. This was one question i have always wondered but never thought to look up even after 15 years of coding..
19
minikites 17 hours ago 0 replies      
20
graycat 8 hours ago 2 replies      
Good stuff. Good to know. Thanks, I needed that. Always wondered. Good explanation, 20 years late for me to read this, but better late than never.

Yes, it sounds like a COM file, with no relocation dictionary, etc., would have to be loaded at the same virtual memory address. IIRC one of the OP comments mentioned this.

Uh, more of the same, piled higher and deeper?

Okay, for my startup I decided to use the .NET Framework 4 with Visual Basic .NET and the usual acronyms SQL (structured query language) Server, ADO.NET (active data objects for using SQL Server), ASP.NET (active server pages for writing Web pages), IIS (Internet information server, which actually makes the TCP/IP calls for moving the data on the Internet and runs my VB.NET program that writes the Web pages), etc. Okay.

But eventually it dawned on me that there is a lot of code running on my Windows machine that very likely is not from Visual Basic and .NET; I'm concluding that there is an older, say, Windows 95, 98, NT development environment based on C++ and a lot of library calls, a message queue for inputs, some entry variables and call backs to them, and quite a lot of functionality not also in .NET.

E.g., when my HP laser printer quit and I got a Brother laser printer, my old HP/GL (Hewlett Packard graphics language, a cute, simple thing for printing and drawing on pages) program to print files didn't work -- the Brother printer didn't do with HP/GL just what my HP printer did.

So, via .NET I wrote a replacement for such simple printing. Well, for writing the characters to the page, object, image, whatever it was (I don't recall the details just now), all I could see to use was some GDI+ (graphical data interface or some such?) calls, but those seem not to be the usual way old Windows programs write to paper, graphics files, or the screen and instead there's something else, maybe back before .NET, and I don't know what that older stuff was. E.g., the GDI or whatever it is didn't let me actually calculate accurately how many pixels horizontally a string of printable characters would occupy when printed and, thus, all my careful arithmetic about alignment became just crude approximations -- no doubt Firefox, Chrome, Windows Image and FAX Viewer, etc. all use something better, more accurate.

So, what am I missing? Am I supposed to get out some 20 year old books by Petzold or some such, get a Windows Software Development Kit or some such, review C and C++, get lots of include files organized, etc., start with some sample code that illustrates all the Windows standard things of a standard Windows app or some such?

Okay, but it appears that .NET does not yet replace all that old stuff?I mean, is it possible to write a full function Windows app with just .NET, VB.NET/C#?

Q 1. What really is that old stuff? Where is it? Are there good tutorials? E.g., if we are to explain COM files, then let's also point to explanations of some of the other old stuff also still important?

Q 2. Is the functionality of that old stuff, for user level programs, maybe not for device drivers, by now all available via .NET but I've just not found it all yet? If so, where is it in .NET, say, for graphics and printing the .NET presentation thingy or whatever?

The code for my startup looks fine, all seems to work, does all I intended, but still I wonder about that old stuff. E.g., eventually I noticed that my favorite editor KEdit, apparently likeany well behaved old standard Windows program, will let me print a file. And the printing works great! I get a standard Windows popup window that lets me select font, font size, bold or italic, etc., and it works fine with the Brother printer. KEdit knows some things about writing to a printer I didn't see in .NET. So, with just .NET, I'm missing a lot of Windows functionality?

21
bitwize 13 hours ago 0 replies      
COM is a binary image that just gets copied into memory. Because it is a holdover from CP/M it can only occupy one 64k segment for code, data -- everything.

EXE files have a header which tells the loader whether and how they use different segments in memory. They can have much larger memory footprints than COM programs.

27
Plotnine: A grammar of graphics for Python github.com
156 points by carlosgg  18 hours ago   37 comments top 9
1
peatmoss 15 hours ago 1 reply      
I feel like a lot of attempts to recreate ggplot2 end up being superficial because they don't recognize / duplicate the power of the underlying Grid graphics that ggplot2 uses.

I know that web technologies are all the rage these days, but at least for static, publication-ready graphics, Grid is really nice substrate, with well thought out lower-level abstractions.

EDIT: I should also add that it's documented within an inch of its life should anyone feel that it's worth recreating: https://stat.ethz.ch/R-manual/R-devel/library/grid/html/grid...

2
has2k1 14 hours ago 2 replies      
Surprise to see this at the top, I am the creator* of plotnine. The most common question seems to be, what to expect of plotnine? The answer; a high quality implementation of a grammar of graphics with an API that closely matches ggplot2, and more.

I also want other packages to be able to build off of plotnine, e.g. a package with the functionality of Seaborn could be built off of plotnine. The only constraint should be whether the backend -- in this case Matplotlib -- does stand in the way. Matplotlib is evolving (though slowly) and has a very receptive community so there is lots of hope.

* - Many people contributed to its history.

3
sirrice 17 hours ago 0 replies      
Recreating and keeping up with Hadley's hard work is challenging, particularly because ggplot2's layout and extensions are really nice and continue to evolve.

As an alternative that preserves the full power of Wickham's implementation, pygg[1] is a Python wrapper that provides R's ggplot2 syntax in Python and runs everything in R.

[1] https://github.com/sirrice/pygg

4
skierscott 16 hours ago 0 replies      
Another grammar of graphics: altair[1]. The altair are simpler and easier to read, i.e.

 Chart(df).mark_point().encode( x='age', y='height', color='sex')
Also, see Jake Vaderplas's talk on an overview of Python visualization tools at https://youtube.com/watch?v=FytuB8nFHPQ

[1]:https://altair-viz.github.io

5
vignesh_m 17 hours ago 4 replies      
If this is an implementation of ggplot2, what does it offer over http://ggplot.yhathq.com/?

I don't mean to undermine your project, just wanted to know about significant differences.

6
stared 11 hours ago 0 replies      
I get it is ggplot-based, by as it is Python, why not being more idiomatic and using chaining instead of adding?
7
Waterluvian 15 hours ago 2 replies      
What is meant by "a grammar"?

Is it the way we concatenate functions to create what's essentially a sentence of what we want the plot to be?

8
coldtea 17 hours ago 4 replies      
This is nice and all, but the syntax and names are totally unintuitive.

If I'm to dig in the manual, I might as well build my plots with the standard syntax of any random plotting library.

Is this "grammar of graphics" any good if you invest more time in it?

9
lorenzfx 12 hours ago 0 replies      
This looks interesting, but I find the documentation somewhat lacking. Is the user supposed to know ggplot?
28
What Self-Driving Cars See nytimes.com
38 points by natejackdev  7 hours ago   44 comments top 10
1
theprop 4 hours ago 0 replies      
1. There are supposedly new lidar systems coming out in the hundreds of dollars.

2. You can be "superhuman" with just image sensors (i.e. without lidar).

That said, I believe lidar is effective for precise object determination e.g. whether a small thing on the road is soft or hard which would help determine if it's a stuffed animal or a real one or a plastic bag in the shape of an animal.

2
friedman23 4 hours ago 4 replies      
I really do not believe lidar is going to be the right answer for self driving cars. We already know that you can be successful at driving a car in various weather conditions with two stereoscopic cameras on a swivel and limited sonar (humans). Cameras, infrared cameras, and sonar will likely be much cheaper and just as capable as lidar.
3
jweir 4 hours ago 3 replies      
Reflections. How many self driving cars can see these? Every day that is what I have to look for when leaving a garage - the reflections, or shadows, of people and pets, as I come out of a parking garage.

The edge cases for self driving cars are massive - unless we dictate our roads and street to be machine friendly.

4
ge96 56 minutes ago 0 replies      
Is there a reason most lidars still use the rotating design and not phased array (faster).

- cost- redundancy- depth

Just a thought, not a scientist/engineer

edit: then imagine it could be made into strips and that goes around the car... no rotating-delay and full-view all the time.

5
candiodari 5 hours ago 3 replies      
This video convinced me that self-driving cars are definitely going to beat humans at safety. Freaky how early the thing gets that there's going to be a crash and the distance at which it responds:

https://www.youtube.com/watch?v=WZ-d9k6JFA8

6
deepnotderp 5 hours ago 1 reply      
LIDAR is quite interesting. If there's anyone who has more information about automotive lidar, I'd love to chat with them, my email is visible on my tag :)

It'll be interesting to see how SDC makers handle the computational complexity of deep nets operating on these massive point clouds generated from LIDAR. It seems like these aren't getting any easier with Luminar claiming ~10 million points. Running that through a hefty 3D ConvNet could easily soak up a petaflop...

7
DonHopkins 2 hours ago 0 replies      
Will a bunch of self driving cars all using LIDAR interfere with each other?

Busy intersections could have strategically placed high resolution LIDAR "base stations" that wirelessly transmit the model to cars as they near the intersection.

8
ruleabidinguser 4 hours ago 3 replies      
Sorry, I know very little about this stuff, but how does LIDAR avoid interference with other cars emitting LIDAR?
9
nerfhammer 5 hours ago 1 reply      
Does any of this work in rain or snow?
10
wnevets 4 hours ago 1 reply      
> You cant afford to miss a single object because that object could be a person.

Humans do all the time and we accept that risk, why are self driving cars held to a higher standard?

29
Ask HN: Does anyone use Nim language in production?
140 points by sharmi  15 hours ago   31 comments top 8
1
dom96 10 hours ago 5 replies      
Judging by the upvotes there is a lot of interest in hearing answers to this question and yet there are few comments so far. I will share my thoughts but keep in mind that I am (extremely) biased as I am one of the core Nim devs.

> How has your experience been compared to your previous tech?

Previous to using Nim I was primarily using Python. This was a few years ago now, but recently I was working on a project in Python and found myself yearning for Nim. There were multiple reasons for this, but what stuck with me was how much I missed static typing. The Python project used type hints which I found rather awkward to use (of course the fact that we didn't enforce their use didn't help, but it felt like such a half-baked solution). Dependencies very often required multiple guesses and searches through stack overflow to get working. And the resulting program was slow.

As far as I'm concerned, Nim is Python done right. It produces fast dependency-free binaries and has a strong type system with support for generics.

Of course, that isn't to say that Nim is a perfect language (but then what is). For example, JetBrains has done a brilliant job with PyCharm. Nim could use a good IDE like PyCharm and with its strong typing it has the potential to work even better.

> How mature is the standard library?

To be honest the standard library does need some work. In the next release we do plan on making some breaking changes, but we always lean on the side of keeping compatibility even though Nim is still pre-1.0. Of course, sometimes this is not possible.

> How abundant are third party libraries?

Not as abundant as I would like. Great news is that you can help change that :)

The Nimble package manager is still relatively new, but you can get a pretty good idea of the third party libraries available by looking at the package list repo[1].

Hope that helps. Please feel free to AMA, I'd love to introduce you to our community.

1 - https://github.com/nim-lang/packages/blob/master/packages.js...

2
girvo 9 hours ago 0 replies      
I did, and do at my new place of work too. Usually for tooling, automation, etc. As of 0.17, I'm quite happy with the standard library, though I still think the Futures impl needs a bit of work.

I'm now using it extensively for a confidential computing and block chain project, which is quite exciting.

3
nimmer 10 hours ago 1 reply      
> How has your experience been compared to your previous tech?

Having used Python, Go, C, Perl, Java, Nim is a breeze to code in. Occasionally the compiler glitches and you have to delete nimcache. Very rarely it fails to compile something and you have to rewrite few lines differently. Not an issue. Build frequently to avoid any surprise.

> How mature is the standard library?

Not that much: it lacks examples and helper procedures that you would expect, yet I still feel more productive with Nim than other languages.

> How abundant are third party libraries?

Look at the packages. Most of the basic stuff it's there. For small and medium projects it's usually not an issue, occasionally I have to wrap functions from a C library.

If you are looking for big, fancy libraries like Pandas and Sklearn, they are just not there. Use Nim for tool and services instead.

4
PudgePacket 7 hours ago 0 replies      
Not myself personally, but I know this game was written with nim: https://impbox.itch.io/vektor2089.
5
galfarragem 52 minutes ago 0 replies      
Noob question: differences between Nim and Crystal?
6
jboy 4 hours ago 1 reply      
Yes, my startup Object AI uses Nim code in production. We have in-house implementations of machine learning, computer vision & image processing code in Nim, using a library called "Nim-Pymod" to integrate with Python's Numpy: https://github.com/jboy/nim-pymod

(As you can see, I was one of the authors of that library in a previous startup. We haven't worked on Nim-Pymod in a while, alas -- I've been focused on the new startup! -- but Nim-Pymod is sufficient for our needs right now.)

Our webserver main-loops are in Python; our number-crunching ML/CV/img-proc code is Python extension modules written in Nim.

As a C++ & Python programmer, I'm a huge fan of Nim, which to me combines the best of both languages (such as Python's clear, concise syntax & built-in collection types, with C++'s powerful generics & zero-cost abstractions), with some treats from other languages mixed in (such as Lisp-like macros and some Ruby-like syntax). I find Nim much more readable than C or C++, especially for Numpy integration. I also find Nim much more efficient to code in than C or C++ (in terms of programmer time).

And Nim is a very extensible language, which enables Nim-Pymod to be more than just a wrapper. For example:

1. Nim-Pymod uses Nim macros (which are like optionally-typed Lisp macros rather than text-munging C preprocessor macros) to auto-generate the C boilerplate functions around our Nim code to create Python extension modules.

2. Nim-Pymod provides statically-typed C++-like iterators to access the Numpy arrays; these iterators include automatic inline checks to catch the usual subtle array-access errors. Nim macros are themselves Nim code, which can be controlled via globals, which in turn can be set by compiler directives; by compiling the Nim code in "production" mode rather than "debug" mode after testing, we can switch off the slowest of these checks to get back to direct-access speed without needing to make any code changes. (And of course Nim's static typing catches type errors at compilation time regardless of the compilation mode.)

3. Nim exceptions have an informative stack trace like Python exceptions do, and Nim-Pymod converts Nim exceptions into Python exceptions at the interface, preserving the stack trace, meaning you have a Python stack trace all the way back to the exact location in your Nim code.

Earlier on in our development of Nim-Pymod, there were some occasional headaches with Nim due to its in-development status. Occasionally the Nim syntax would change slightly and that would break our code (boo). We've also debugged a few problems in the Nim standard library. I suppose these problems are an unfortunate consequence of Nim having a small set of core devs contributing their time (rather than being supported by Microsoft, Sun, Google or Mozilla). Fortunately, these problems seem to have stabilised by now.

The Nim standard library is reasonably large, somewhere between C++ STL (data structures & algos) & Python stdlib (task-specific functionality). I recall that the stdlib could use some standardisation for uniformity, but I haven't been watching it closely for the last year or so.

Third party libraries are not abundant, aside from a handful of prolific Nim community-members who have produced dozens of fantastic libraries (eg, https://github.com/def- , https://github.com/dom96 , https://github.com/fowlmouth , https://github.com/yglukhov ).

I'm happy to answer any other questions about using Nim in production!

7
throwaway7645 9 hours ago 2 replies      
I've just started writing a few scripts I'd normally use Python for (no production) and have been impressed with the speed and binary sizes. Nim in Action (book) is really good and what is missing to get the beginner started. I'd like to see a PyCharm like IDE for Nim as well, but Vim seems to work well.
8
u2227 4 hours ago 0 replies      
One outsourcing company named Xored have choosen Nim as their primary language few years ago, at least that is what a company owner have declared.
30
Storing Drinking-Water in Copper Pots Kills Contaminating Bacteria (2012) nih.gov
142 points by Red_Tarsius  20 hours ago   120 comments top 16
1
vram22 17 hours ago 5 replies      
Using copper vessels to store water for drinking is somewhat common in parts of India. Seen it in Maharashtra.

Lead vessels were traditionally used (and may still be) to make certain dishes (like rasam, a watery lentil-based sour soup) in South India. No idea about any benefits or the reverse.

Update: Also, I've seen relatives of the previous generation to mine (in India), sometimes eating from silver plates. Not sure, but I think that may have been for some supposed health reason too (seeing sibling comment about silver reminded me of it).

2
batter 19 hours ago 8 replies      
I will just leave it here in case someone will want to employ copper pots: https://www.ncbi.nlm.nih.gov/pubmed/10383875
3
ComputerGuru 18 hours ago 2 replies      
Silver is also known to have antibacterial/antimicrobial properties and is used both as a coating on handles, surfaces to prevent bacterial buildup and also in typical creams as an antibacterial option (however, I do believe a recent study showed it to be no better than a control when applied topically to burns, which is/was one of its primary uses).

Both copper and silver oxidize unpleasantly very quickly, though.

4
emptybits 18 hours ago 0 replies      
"We had also reported the benefit of using a copper-based device, contrived by us, which was as effective as the pot but at a fraction of the cost." [12]

[12] https://www.ncbi.nlm.nih.gov/pubmed/19230946/

(Device spoiler: Water in glass bottles with copper coils.)

5
gumby 14 hours ago 1 reply      
Copper pots have interesting properties. For a long time I had read (and scoffed) that eggs should be whipped in a copper pot for best results. But it turns out that when you do that, striking the side of the pot liberates electrons that bond with the albumin and make the protein stiffer.

As for the comment about silver: it does have some antimicrobial properties. I'm amazed the effect is noticeable at the macro level of eating utensils.

6
Overtonwindow 19 hours ago 2 replies      
The antibacterial properties of copper are well known, and were proven long ago. I think this is just someone looking for something to research and write a paper on.
7
theprop 4 hours ago 1 reply      
Probably a good idea thus to use all copper pipes in your home!! Using copper vessels would've been great in an era where there weren't industrial pollutants like lead or PFOAs or other things...nowadays in India just a copper vessel wouldn't be sufficient.

In the US as well there are various contaminants in water supplies all over the country from PFOAs to lead so it's a good idea to use a water filter or such. I don't think there's much danger of bacteria in US drinking water.

8
CalChris 8 hours ago 0 replies      
Copper has been used as a biocide in antifouling paints on boat bottoms for decades. The USS Constitution was copper bottomed in 1797.

https://ussconstitutionmuseum.org/2015/08/12/copperbottomed/

9
newyankee 18 hours ago 0 replies      
Many families in rural India use copper pots for this reason
10
tokenadult 5 hours ago 0 replies      
What follow-up has there been on this since the 2012 publication in a rather obscure journal? Most importantly, is there a source of copper vessels in most countries that is as inexpensive as other means of reducing bacterial load in drinking water?
11
epmaybe 10 hours ago 0 replies      
Makes me wonder, is there a way to make sure that no copper is still present after the microbes are all dead? Like throw some penicillamine in there to chelate the exact quantity of copper dissolved?
12
freeflight 5 hours ago 0 replies      
Sounds like a way more expensive version of SoDis [0]Why use expensive copper when you could instead recycle, otherwise useless, PET bottles to do a similar job?

The only potential drawback I can think off is that some PET bottles seem to leak "hormone-like chemicals" [1]. Tho, reading trough the comments copper pots also seem to have some toxic effect on the water.

[0] https://en.wikipedia.org/wiki/Solar_water_disinfection

[1] http://www.npr.org/2011/03/02/134196209/study-most-plastics-...

13
redm 16 hours ago 1 reply      
Because of copper's antibacterial properties, I investigated putting copper sink faucets in my house remodel. While it's true that it works well initially, over item film builds up on the surface preventing the benefits. You have to clean them constantly to get the benefit.
14
nashashmi 14 hours ago 0 replies      
Anyone wanna theorize why? Seeing some of the comments here about silver and gold tells me it might have something to with the high conductivity of these metals.

As electrons flow through them, the germs are dying.

15
jschwartzi 16 hours ago 3 replies      
So could we also make door handles out of copper, or does it only work for water storage?
16
samstave 16 hours ago 2 replies      
I have a copper water bottle that I bought online from India:

https://i.imgur.com/3k2QBQI.jpg

I love the thing, and I was drinking water out of it...

But one time I put alcohol in it... and I took a few sips from it and I almost immediately started feeling nauseous and weird... now I'm scared to use it, even for water.

       cached 28 May 2017 10:02:02 GMT