Ask HN: Legal/tax issues while hiring remote workers from outside US? - <AUTHOR> For those companies that have hired full time remote employees from outside of US, is there any specific legal/tax related processes? Do they need a US Tax ID? Is the process any different if you are paying them cash + equity? <comment><USER2> Opposite: You need a tax id for the country the employee is in because you pay the employer part of their local health insurance, pension and whatever other benefit the employee is entitled to in their country. The contract needs to be bi-lingual (certified). All local laws like vacation days, sick days, maternaty leave rules, which public holidays are observed need to be respected.

Most companies don't want this extra hassle and instead make the remote person a contractor, basically receive a single monthly bill. The contractor is responsible to file their income tax, get health insurance etc.

An alternative is for the remote person to get employed by a local agency, who then sends a monthly bill to the US company.

Another option is to open a subsidary. Of course hardly worth it for one employee.

In Europe if a remote employee (let's say Greece) travels to their employer (let's say in France) to work or have meetings they have to pay taxes in France for those days. Not an issue if it's less than 5% of the working days per year. If it's more than 10% the employee has to file taxes in both countries. I've been in this situation. This is Europe, not the US, but shows how crazy complex tax situations can become.</comment>


Looks Like a Cow,Swims Like a Dolphin,Quacks Like a Duck,It Must Be Enterprise Software - <AUTHOR> http://www.subtraction.com/2007/10/19/if-it-looks-

<comment><USER2> The classic saying is if you buy SAP/Oracle, you don't customize the software suite to fit your company, you customize your company to fit the software.

<comment><USER3> I am not sure why that statement, in itself, is bad. I've been in the enterprise software industry for a while, and I have seen how customers have a tendency to request customizations on top of the base product that are huge in scope and would kill the project. My org always recommends 0 customization (never achieved, but intended) to shorten deployment time and go with codebase that is maintained by the product team and does not need a huge in-house IT staff post-deployment.

Of course, if the software is crap that statement would make sense, but if that is the case, you should throw the tool out rather than try to plug the holes.

<comment><USER2> I look at the statement as not good or bad, just a statement of truth. There is no such thing as shrink-wrapped enterprise software. I've worked with at enterprise software organizations where the customer does their own custom modifications and tries to politically lobby us to get them baselined (and take ownership).

Modifications form a lucrative and essential part of enterprise software, judging by what my co-workers and friends at other companies were billed out at an hourly basis (the consultant was always paid a mere fraction of the $100-$200/hr). Sometimes I wonder if paying for expensive consultants wasn't just a CYA-move by the client ("look, I hired the company to consult directly")

<comment><USER3> Then don't you mean that the original statement is false? You always change the software to fit the company, and never change the company to fit the software?

<comment><USER2> Yes, like motivational quotes, there is always a bit of untruth to a statement like that.

</comment></comment></comment></comment></comment><comment><USER4> "...or, heck, if you've ever tried to apply for a job at a big company...."

At a hospital near where I live that shall remain unnamed, I found a job that seemed perfect for me on their site.

Except when I went to apply for it -- not joking -- the application was so incomprehensible and novel-long that I just gave up.

I can't imagine they got the best people with such an application process, though perhaps they got the most persistent ones, and the ones with no better prospects.

</comment><comment><USER5> Lots of reasons why, but mostly because the buyers aren't the users in most cases. If users got to pick what they could use in a big company it'd be a WAY different story.

</comment><comment><AUTHOR> Worthy link from the site's comment section:

Zawinski's Law

 _Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can. Coined by Jamie Zawinski (who called it the Law of Software Envelopment) to express his belief that all truly useful programs experience pressure to evolve into toolkits and application platforms (the mailer thing, he says, is just a side effect of that). It is commonly cited, though with widely varying degrees of accuracy._

<http://catb.org/jargon/html/Z/Zawinskis-Law.html>

<comment><AUTHOR> More goodies from the comments section:

"Enterprise software" is a social, not technical, phenomenon

[http://lists.canonical.org/pipermail/kragen- tol/2005-April/0...](http://lists.canonical.org/pipermail/kragen- tol/2005-April/000772.html)

</comment></comment><comment><USER6> What a cock and bull story ( _sic_.)

You know how Fred Brooks said to "build one to throw away"? You just can't do that with Enterprise software because the businesses that use it need it to keep living.

You know all those little things you learn as you go along, and you begin to really understand the problem, and how to solve it properly? You can't do that with Enterprise software either, because everything else relies on what you choose already; and even worse, changes in the environment are coming in all the time that you must adapt to first. That's hard enough, even with a stable (if flawed) foundation to work from.

You can iteratively _adapt_ it, but you can't iteratively _improve_ it.

It's a problem of legacy, of network effects, of debugged/tested/working code and of something relied on so strongly that you can't afford to mess with it.

Joel says you can't improve these things. You _can_ \- but it's a research problem. "Things You Should Never Do, Part I" ( _rewrite code from scratch_ ) <http://www.joelonsoftware.com/articles/fog0000000069.html>

<comment><USER6> Incidentally, I often get _unknown or expired link_ when I submit comments, which is presumably HackerNews' way of saying that I took too long considering and drafting my comment. This seems to discourage thoughtful replies.

It seems to me that _intellectually stimulating_ discussion would be served better by a longer timeout.

(fortunately, the back-button and cut-and-paste circumvents this problem, but it gave me a start the first time).

</comment></comment><comment><USER7> There's no incentive for enterprise software to be sexy or provide a good user experience. Lotus Notes is the classic example: you connect to archaic server names, the idea of displaying messages as threads will never happen, menus are counter-intuitive, it's absurdly slow.. I could go on. Ok, so I get that once your organization has tied to Lotus Notes, the cost of replacing it is absurd -- especially if you build applications on the platform. What makes no sense to me is that the visual interface has remained virtually unchanged since I started using it (Jan '06), and the new Webmail pilot looks just as bad. There's a lot of things Lotus Notes can't easily improve. But there's just as many they -can- improve that they don't for some reason.

</comment><comment><USER8> So is the platypus God's version of Enterprise Software?

</comment><comment><USER9> A big part of it is that once you get to a system for many tens, hundreds or more people, the basic requirements are so big that there are no real choices beyond the main one or two competitors, and one will be ahead for one reason or another.

Users have no voice, but that's only part of the problem - the time it would take to evaluate New Competitor C just to cover all the unspoken requirements is prohibitive. You can be pretty confident that _because they claim_ nice sounding features and a simple interface, that's proof that they haven't been around to gain enough of the unspoken requirements - if they had, they wouldn't have nice sounding features and a simple interface anymore. Bit of a catch 22, really.

Unspoken requirements in the Windows world are things like "... and has a web interface", "... works on a terminal server", "reports integrate into central management program X", "has an Outlook plugin", "tolerable support for user permissions", "incomprehensible massive logfile", and so on. Either things that a program which incorporates all of them will be cumbersomly big by necessity, and/or an established competitor for several years with a few versions under its belt.</comment>


Julia as a CLI Calculator - <AUTHOR> https://krasjet.com/rnd.wlk/julia/ <comment><USER2> This seems to be a very neat intro into Julia and a practical use case. I've been postponing to learn the language for a while now, but from what I heard/seen it seems to be extremely well designed.

<comment><USER3> I used it as my CLI calculator, just like the articles title. I used to use Ruby for this, but Julia is more concise but still readable. Concise enough I have written useful applications that can fit in a tweet.

</comment></comment><comment><USER4> I love the julia language. I would love to use julia as a command line calculator. Unfortunately, starting the interpreter is excruciatingly slow, an order of magnitude slower than octave or python (and several orders of magnitude slower than bc or dc).

<comment><USER5> Simply loading the REPL takes half a second for me. I use it all the time as a simple calculator.

<comment><USER4> > Simply loading the REPL takes half a second for me. I juse it all the time > as a simple calculator.

Half a second is precisely what is meant by "excruciatingly slow". If I need a simple calculator, I expect to be able to use it to compute intermediary results in a shell loop. If my loop has one thousand iterations, you are spending about 10 minutes just initializing the interpreter. This is absurd. Of course, you can rewrite your whole loop upside down, so that the interpreter is called outside the loop. But this kind of defeats the goal of considering julia to be a general-purpose calculator, orthogonal with its usage patterns.

<comment><USER6> > If I need a simple calculator, I expect to be able to use it to compute > intermediary results in a shell loop.

No offense but that must be one of the dumbest ideas I have heard in a long time. The reason you write something in a shell script is because it is portable on all Unix systems. If you add a dependency to a particular programming language like Julia, then that portability is out the windows. You require installing users to install Julia first.

If you require users to install Julia, you might as well ditch the shell script all together. All shell languages suck anyway for anything non-trivial.

I have rewritten plenty of shell scripts to Julia. It is much faster to write. The code is easier to read and understand and it executes way faster than any shell script.

Running a complicated shell script that calls out to Julia 1000 times makes absolutely NO SENSE! It is a completely contrived example with no practical application.

Besides when people say "calculator," I think most reasonable people assume an interactive system for doing calculations, not a glorified math library. Julia offers a great interactive environment for doing calculations.

<comment><USER4> > No offense but that must be one of the dumbest ideas I have heard in a long > time.

Thanks. This is not the first time I've been told that.

> The reason you write something in a shell script is because it is portable > on all Unix systems.

This is definitely not my case. I write plenty of shell code at work, but rarely distribute it. It is just for arranging data around, preparing one-off experiments, and so on.

> Running a complicated shell script that calls out to Julia 1000 times makes > absolutely NO SENSE!

I agree that this may be a rare use case, but it is legitimate nonetheless. Moreover, the best tools are those that can be used successfully in ways that the creator of the tool would find abhorrent.

> It is a completely contrived example with no practical application.

This was a concrete example actually. I had a shell script that cropped, denoised and registered a collection of a few thousand photos scattered in a directory tree. It was a four-line pipeline that called a few command line tools from imagemagick and gmic to do the image processing work. At one point, I realized that I had to apply an homography to the images (given by a 3x3 matrix that was stored as 9 numbers in a text file) to map them to a different coordinate system. This involved a 3x3 matrix multiplication for each image. I did this multiplication in julia, my favorite calculator. The running time of the whole thing went from 10 to 20 minutes. Doing the "correct" thing and rewriting everything in julia would be extremely painful.

> Besides when people say "calculator," I think most reasonable people assume > an interactive system for doing calculations

When you say "CLI Calculator", you can also think about a calculator that you can call from your shell command line. This is the case for example for the classical calculators bc(1) and dc(1), which are non-interactive, and purposefully intended to be called inside loops in a shell script.

<comment><USER5> > Doing the "correct" thing and rewriting everything in julia would be > extremely painful.

Not necessarily: [https://docs.julialang.org/en/v1/manual/running-external- pro...](https://docs.julialang.org/en/v1/manual/running-external-programs/)

<comment><USER4> That's great! I didn't know about that

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> The typography in this post is beautiful (as well as the content), anybody know where this comes from? Did the author do it by hand or is it something off the shelf?

Asking for a friend...

<comment><AUTHOR> The styling is done from scratch.

For more information, see the colophon [1] and karasu [2].

[1]: [https://krasjet.com/colophon/](https://krasjet.com/colophon/)

[2]: [https://github.com/Krasjet/karasu](https://github.com/Krasjet/karasu)

<comment><USER7> Nice job!

</comment></comment></comment><comment><USER8> I use Mathematica as my advanced calculator. It's a functional language with an extremely vast and consistent mathematical and non-mathematical library, top notch symbolic capabilities (SymPy is just child's play in comparison), top notch numerical capabilities, and very decent performance. You certainly don't need to write your own rotation function — well, 2D rotation is trivial, but what if you want 3D rotation around a vector? Mathematica's got you covered. Got a command line mode too, see MathKernel.

The downside: it's not free (as in beer or speech).

<comment><USER9> I know it's a very general question, but can I ask what sort of calculations you perform using Mathematica? Every time it has a new release, I download the demo and play around with it, but I never get as far as using it to actually _compute_ anything that other CLI calculators couldn't do.

<comment><USER8> I'm a physicist so all kinds of numerical and symbolic calculations, e.g. very complicated integrals, differential equations, integral equations, and so on. I also work on math problems either seriously (way back when I was an undergrad I worked on some number theoretical problems where computational insight is very important) or for fun (think Project Euler style problems).

If you just need to a calculator to do everyday arithmetic or unit conversions, or even simple physics calculations with units, it's serious overkill... I certainly hardly ever need it when I'm wearing my programmer hat.

I guess to answer is that the boundary between a calculator and a full blown computational environment is very blurry to me.

</comment></comment></comment><comment><USER10> I've been using Julia as my CLI calculator for a few years now - cool to see this post! While teaching an online Linear Algebra class, I would use Julia to construct examples and quickly solve them. The syntax sugar of all the functional idioms make it very fun and easy to express more complicated ideas. This is a cool introduction- I was not aware (or had forgotten) about function chaining. Really curious about using more of Latexify as well :)

On an unrelated note, (as a mathematician) I have started using Maple a lot more as my analytic computational helper. Never really gave it the time of day in years past - it is quite powerful and intuitive. Funny note: I recently copied and pasted output of a Maple command into my Julia code and it was syntactically correct!

</comment><comment><USER11> Since this is a calculator topic, I'd like request your input on which calculators you use.

I use the Emacs calculator (M-x calc) and XCalc ([http://www.tordivel.no/xcalc/](http://www.tordivel.no/xcalc/)) as I like to use RPN calculators. The Windows 10 calculator is painful and slow. XCalc has a mini mode, where it will sit as a small, single line without distracting you too much. I like that feature very much.

One thing with Emacs is that I forget the shortcuts for non-frequent calculations that I'd have to go and search for it.

<comment><USER12> I use a function "ev" that wraps bc. It's crude, but handy:

        $ ev() { echo "scale=3; $*" | bc -l; }

        $ ev 22/7
        3.142

<comment><USER13> I do something similar, with a couple of convenience substitutions for commas and multiplication:

$ math() { echo "scale=2 ; $ _" | sed -e "s:x:_:g" | sed -e "s:,::g" | bc; }

$ math 5,382 x 48,927.3

263326728.6

<comment><USER14> You should put this into a codeblock by indenting by 2 spaces. The formatting converts asterisk-delimited text into italics.

      $ math() { echo "scale=2 ; $*" | sed -e "s:x:*:g" | sed -e "s:,::g" | bc; }

      $ math 5,382 x 48,927.3

      263326728.6

</comment></comment></comment></comment><comment><USER15> A problem with Julia is that it does not parse input numbers with arbitrary precision by default. Example:

      julia> sin(1.461920290375737576933544899379e+31)
      -0.9468766486679395

      julia> sin(parse(BigFloat, "1.461920290375737576933544899379e+31"))
      0.6864670207863400975666631018263839509022548965872940746039593018855528710432756

Fricas is better in this regard, some links:

[https://en.wikipedia.org/wiki/FriCAS](https://en.wikipedia.org/wiki/FriCAS)

[https://fricas.github.io](https://fricas.github.io)

[https://github.com/fricas/fricas](https://github.com/fricas/fricas)

[http://www.euclideanspace.com/prog/scratchpad/fricas/](http://www.euclideanspace.com/prog/scratchpad/fricas/)

EDIT: some info about FriCAS: it's implementation is currently based on Common Lisp, on top of which a language called "Spad" (short for Scratchpad) is implemented. Fricas is a fork of the Axiom computer mathematics system, which in turn is a continuation of Scratchpad. EDIT: and, at least with SBCL, it can use GMP for bignum.

I only skimmed the article, but I believe Fricas supports all uses of Julia mentioned in the article, and more, like advanced symbolic integration.

<comment><USER16> It seems like it would be pretty easy to make a REPL mode that did the big conversions automatically. Not sufficient to protect a naive user, but arbitrary precision floating point is never safe.

<comment><USER15> > arbitrary precision floating point is never safe

Care to expand on that? Are you advocating for interval arithmetic or maybe decimal floating point?

For what it's worth I think that one would rarely need to interactively deal with so much data at once that using, say, 10000 bit binary floating point would be prohibitive. It is difficult to lose the necessary significant digits with so much "safety margin", and one still has space for about a million of such high-precision floating point numbers.

<comment><USER16> I agree with your assertion that most users could get away with 10,000 bits. My point is only that there's always going to be somebody who still tries to do something that fails, so you have to pick some set of tradeoffs. Yours seems reasonable.

</comment></comment></comment></comment><comment><USER17> Oh, brilliant! This is exactly what I've been looking for. Didn't realize the syntax was so succint. So far I've preferred excel for my multidimensional calc needs but this fits my needs exactly (need to do simple back-of-the- envelope vector calculations time to time).

</comment><comment><USER18> I really wish there was a language based on Swift that would include most of the nice language, REPL and library characteristics of Julia (and perhaps few from Dart). That would get really close to a "perfect language" for me.

Overall I like Julia - and use it as a CLI calculator as well - but there are several things that prevent it from being a good general purpose language:

\- OOP support is "meh".

\- str.parse(Int).abs is more readable than abs(parse(Int, str)). And this is a very simple case, the readability difference is greater in more complex expressions.

\- 1-based indexing.

\- Lack of good support for nullability, think of "if let", "guard let", "??", "object?.property".

\- There are some more, this is just from the top of my head.

EDIT: A better example of why Julia's syntax is less readable:

`images.first.resize(100, 100).crop(25, 25, 75, 75)`

versus

`crop(resize(first(images), 100, 100), 25, 25, 75, 75)`

<comment><USER19>
        crop(resize(first(images), 100, 100), 25, 25, 75, 75)

this will likely get better when julia implements proper pipes, IIRC coming soon in the plans (like elixir does):

        images
        |> first
        |> resize(100,100)
        |> crop(25, 25, 75, 75)

If the language bothers to implement an inspect method (again, like elixir) this is vastly superior to . chaining because you can do this:

        images |> inspect
        |> first |> inspect
        |> resize(100,100) |> inspect
        |> crop(25, 25, 75, 75) |> inspect

trivially with multiline cursor (and also trivially ninja'd out with multiline cursor) and have full introspection on the evolution of your data through the pipeline. This is impossible in oo languages (well maybe you could do it in a prototyped language) because dispatch of the .inspect method would have to be implemented on each object.

<comment><USER20> I'm not sure what `inspect` does, but can you clarify what you mean by proper pipes?

      julia> x = [3,2,4,5]
      4-element Array{Int64,1}:
       3
       2
       4
       5

      julia> x |> sort |> x->reshape(x,(2,2))
      2×2 Array{Int64,2}:
       2  4
       3  5

works.

It gives a syntax error if the pipes are on the newline. Is that your gripe?

Or is it that it doesn't automatically partially apply the function, requiring you to use an anonymous function, like `x->reshape(x,(2,2))` instead of as you have it `resize(100,100)` implicitly. I prefer the explicitness.

<comment><USER19> Yes, by "proper pipes" I mean partial application. (I used to code julia but now I'm mostly living in elixir because that pays the bills) Yes, the explicitness of what you wrote is a marginal gain in preferability from an idealized point of view, but I promise you your eyes and brain will be more tired from that explcit form than if you just learn to read pipelines as passing into the first value (in elixirland we have lambdas that you can pipe into, too. Nobody does this.)

You don't know what you're missing by not having an inspect function. In elixir it's styled "IO.inspect", and it pretty-prints the value as a side- effect, and returns the value unchanged. You can pass a "label" option as your second parameter, and that will add a label to the pretty print. For example, assume I have a module M with the expected functions:

        value = 10
        |> M.add_3 |> IO.inspect(label: "A")
        |> M.times(4) |> IO.inspect(label: "B")
        |> M.minus_2 |> IO.inspect(label: "C")

will print:

        A: 13
        B: 52
        C: 50

and value will be assigned 50.

Now, the great thing about that is that you can blat a bunch of IO.inspects simultaneously using multiline cursors. That low friction 1) causes you to actually use it, and 2) cause you to also set your code up so that it's easy to IO.inspect, which typically also means cleaner, and easier to read code. It is IMO the most powerful debugging tool that I've ever used.

Example: [https://github.com/ityonemo/ex_dhcp/blob/master/lib/ex_dhcp....](https://github.com/ityonemo/ex_dhcp/blob/master/lib/ex_dhcp.ex#L355)

That small pipeline does a pretty complex set of actions - deserialize a raw binary to a structured datatype, then call a handler, then process a handler return result. There are four datatypes that run through that pipeline. Nonetheless, I can inject IO.inspects into that with six keystrokes (I have a vscode snippet), run the code, and watch as the data are transformed, and immediately identify what corner case I missed and write a proper test for it.

And yes, it is far less powerful if the pipes can't tolerate the newline. (though you usually can still multicursor on a single line).

Anyways, I'm not saying this to rag on Julia. I'm just saying I think julia can and SHOULD have this, and it would be awesome. Also, elixir needs to learn a thing or two from julia's repl.

</comment></comment></comment></comment><comment><USER21> One of my main gripes about matlab and that Julia unfortunately adopted is the dot syntax. Any other symbol would have worked, but the dot is just way too easy to overlook.

I think it is because it was initially developed for people primarily working with matrices.

Most of the things I do is actually based around multidimensional arrays so when I do operations I almost always want element-wise operations. Unfortunately you often don't even realise you do the wrong operation, just the result is wrong. So I have spend lots of time debugging, until I realised I had a missing dot somewhere, and then spending again significant time trying to find where the dot is missing.

I therefore always found the complaint about np.dot(x,y) being too verbose interesting, because I like that, it makes it explicit and is difficult to overlook.

<comment><USER22> You can use the @. macro to dot an entire block.

I personally like the dot syntax. It's ergonomic, and provides cool stuff like this: [https://julialang.org/blog/2017/01/moredots/](https://julialang.org/blog/2017/01/moredots/)

I don't know of an equivalent functionality in any other language.

<comment><USER21> The @. syntax is definetly an improvement. I don't have an issue with the principle of the dot syntax just with the symbol. The examples in your link perfectly illustrate the issue. If this was a line in a long code base maybe even with mixed element-wise and matrix operations it would be very easy to overlook a missing dot. It would be even worse if the constants were floats. It is just such a terrible choice of symbol for this operation, because it is so easy to overlook.

Everyone I know always looks for missing dots if they encounter a some nonstraight forward bug in matlab (I don't know any Julia users).

</comment></comment></comment><comment><USER23> I've been using Julia REPL as s scientific calculator for a few months. I'm impressed how wonderful it is. Thank you for the article!

</comment><comment><USER24> One thing I miss is RPN-string input. Unlike normal RPN where you load the "stack," for RPN string you can enter

> 2 3 + 4 *

as one line, press enter, and get 20. This lets you take advantage of the no- parens nature of RPN while viewing the expression on one line rather than flipping through the stack. Only Windows PowerToy scientific calculator had this mode, that I know of.

<comment><USER25> this sounds like "dc" except with dc you'd need to add a "p" at the end to print the top of the stack

<comment><USER24> I had never even heard of dc. This is a lifesaver.

</comment></comment></comment><comment><USER26> This is a great article - interesting, well-written and beautifully presented!

A minor quibble in the typography - the use of small caps for every initial letter is slightly catching my eye every time I see it. Perhaps I don't see enough similar typography on the web to make it feel more natural ¯\\\\_(ツ)_/¯ ...

</comment><comment><USER27> I use python CLI for exactly the same :)

<comment><USER28> I used to use Python REPL for that until I switched to fish shell. Now I just run

        $ math "999.999 / 3"
        333.333

Granted, I don't really do any complex calculations in my terminal.

<comment><USER29> > Granted, I don't really do any complex calculations in my terminal.

Same. I use insect — [https://github.com/sharkdp/insect](https://github.com/sharkdp/insect)

</comment></comment></comment><comment><USER30> Nice article! I'm the creator of the Grassmann.jl package, which was mentioned in the article :)

</comment><comment><USER31> I wonder if it'd be possible to have a blend between this and [https://calca.io](https://calca.io) where the repl output appears (and change dynamically) as specialized comments within a markdown-friendly format.

</comment><comment><USER32> Julia is nice for scientific serious work, but for cli calc J (jsoftware.com) really rocks!

</comment><comment><USER33> from EasyJ [https://www.jsoftware.com/books/pdf/easyj.pdf](https://www.jsoftware.com/books/pdf/easyj.pdf)

J in its simplest use acts just like a desk calculator.

If you are working at a terminal, type the following input, pressing the "enter" key after each line :

       3+4

7

       5*20

100

</comment><comment><USER34> My personal choice for this is Jupyter and Sagemath.

<comment><USER35> SageMath takes 3s to load for me (sometimes a lot more if my systems administrator has updated it recently, which seems to happen a lot).

I therefore use Pari/GP for my personal choice. I like the symbolic nature of Pari/GP over Sage or Julia, even though I spend nearly all of my life programming in Julia, and love the language a lot.

However, for computations of trivial things that I want to run really fast, I put them in a function in Julia (so that they are jit-compiled), since nothing will come close to that, by some orders of magnitude.

</comment></comment><comment> dan-robertson My main calculator is gnu calc which is the calculator built into emails. It tends to hit various ceilings where it can't go much further but it has lots of nice features:

1\. The data I want to work with tends to be in my text editor so it makes sense to have the calculator there too. Macros can be used to fix up formatting to input numbers

2\. Speed of input makes it so much nicer to use. If I look at the examples in the article, here is a comparison. Julia:

      7 / 4
      x = ans + 2 im
      exp(x)
      A = [...]
      A * [...]
      [a^2 for a \in A]

Emacs:

      7 RET 4 /
      (0,2) + s t x (but I probably wouldn't use a variable)
      s r x E (if I used the stack this is just "E")
      [(same but RET or , not SPC)] s t A
      s r A [...] *
      s r A V M I Q (that's vector map inverse square root)

These examples make emacs look bad because I've replicated saving things to variables it actually I'd just use the stack. I guess in Julia you can press the up arrow. There are other examples like 1 |> exp |> sin is just 1 E S in Calc (and those operations broadcast over vectors automatically, although I think emasculated does the right thing and doesn't broadcast exp over matrices).

Skipping the massive tangent of non-calculator things about Julia, we move on to a discussion of plotting. There isn't a Unicode-art plotting mode in emacs because we have had graphical terminals for over 30 years. In emacs you plot with g f and can then modify your plot with other commands. In just about every language you need to call a function called plot so you're already losing on characters before you've even started. If plotting is fast and easy then exploration is easy.

3\. The calculator has lots of useful features that fit well together. Plotting is built in. As are unit conversions, a bunch of symbolic algebra (simplification, differentiation, basic integration, curve fitting, solving equations, numeric integration/solutions, and a super nice facility for editing expressions). There's a bunch of other functions for stats, vectors (both linalg and things like map/reduce), number theory, physics, etc. There are language modes for things like latex output too. Most stuff works on a bunch of number types (bigints, rationals, arbitrary precision floats, infinity, intervals thereof, complex numbers, error forms, symbolic expressions, dates)

4\. I want to reiterate the point about speed. The thing I care about being fast is telling the computer what to do. It takes basically 0 time to do most mathematical operations so latency is dominated by input. So even though emacs uses interpreted emacs lisp and doesn't even use hardware floating point numbers, it still feels faster than Julia with its optimising JIT. If I want to do something with a large amount of data then I can either wait a few seconds or realise that I've gone beyond calculator work and use something better suited.

I think Julia is a great language and it has great advantages over emacs for numerical computing. A big one is that the language and type system is much more naturally extensible for this sort of thing. But I don't feel that it makes a particularly good calculator. The main reason to think that it is a good calculator is that the alternatives (bash/bc/python/matlab) are so bad.</comment>


Show HN: Anonymous, web-based bookmarking - <AUTHOR>

http://www.anomarks.com
Hey everyone,
I don't know about you, but my bookmarks somehow always get lost in weird nested folders that I never bother to organize properly. The stuff I eventually want to refer back to just becomes clutter, and then I can't find that sweet tutorial for photo editing a text logo, doing something cool with CSS, or whatever.
I took a look at Google Bookmarks and Delicious, but those two services are so cluttered with excess bullshit that I decided to do it myself.
Anomarks stands for anonymous bookmarks. You don't have to sign up or anything. You can just start with a URL and assign it to a list. Then you can add other bookmarks to the list and search them all really easily. That's it.
My goal was to make it supremely simply and a pleasure to use. Let me know how I did. Hopefully it'll be of use to someone beyond myself. <comment><USER2> I really like the idea. What do you think about a bookmarking site similar to google+? or maybe an add on? Wouldn't it be a neat feature to just "pull" the urls into "bookmarking-circles"?

<comment><AUTHOR> Hmm. What you're saying sounds cool, but I don't think I actually fully understand what you mean. Are you talking about more sharing between collections, and sort of adding other people's links to your own lists? I think if people start to really use the service, a lot of cool stuff would become possible. I'm definitely interested to hear more if you have ideas!

</comment></comment><comment><USER3> Clicky link: <http://www.anomarks.com>

If I don't have to sign up, why do I need a password?

<comment><AUTHOR> Good question. The password is so that you can maintain ownership of your bookmark collection and so other people don't add and delete the links you've stored.

<comment><USER3> So basically:

1\. I do sign up (but the sign up process is extremely streamlined)

2\. I retain some sort of anonymity (I don't give you any personally identifiable information --- unless there's some embedded in the links I store) (and presumably your web server generates logs)

3\. If I forget my password I can't have it reset --- I've lost control of my bookmark collection. Can I sign up again and make a copy of it that I can control?

<comment><AUTHOR> Yup.

There's no limit to the number of collections you can make. If the service is useful for people, I can create optional user accounts for easier management, but for now, just don't forget your password. Or make the password easy, because what's the incentive for people to even try to get control of someone else's list?

</comment></comment></comment></comment><comment><USER4> I don't use Google or Delicious for my bookmark but I liked your implementation as it doesn't require me to sign up.

<comment><AUTHOR> Yeah, that's a big one for me, too. I think this whole online identity thing is overrated. Thanks.</comment></comment>


Cool Runnings – PostgreSQL's 2nd strike at the Uber blog - <AUTHOR> http://blog.2ndquadrant.com/cool-runnings/ <comment><USER2> This looks like really good and well-timed reaction to Uber's case. And shame on Uber that it was absolutely not transparent, hiding its problems.

If you use FOSS, you must be open to communications with the Open Source community. There is a lot of ways to do it. If you're a giant, you can find resources to change the software and contribute with patches, but if you cannot do it, please at least speak openly (or at least privately to some core developers), explaining your needs and issues.

Using FOSS without that is the same as using pirate versions of Oracle or Microsoft products, without buying support subscription.

<comment><USER3> I think the sponsorship/bounty model is excellent. Instead of making one of your employees spend several months modifying a program or migrating to a different solution, offer to pay money ($5k? $10k?) for a solution to your particular problem.

LuaJIT used this for many of its ports to different architectures, where a company would pay $20k or so to sponsor work to make it run on their platform. Cloudflare sponsored string-specific optimizations for their WAF.</comment></comment>


Banks and Retailers Are Tracking How You Type, Swipe and Tap - <AUTHOR> https://www.nytimes.com/2018/08/13/business/behavioral-biometrics-banks-security.html <comment><USER2> Does anyone else feel a sense of overwhelming futility with respect to internet privacy? I'm at the point where I feel like I might as well just use all the fancy features and devices, privacy be damned.

It feels like it's a giant waste of time, even if you go out of your way to use "privacy protecting" expensive devices and software. Use an iPhone or LineageOS! Use Firefox! Don't use Google services! Don't use iCloud, back up everything to a local NAS! Pay for your email services!

It all feels mostly pointless. There's always another thing right around the corner. You're always defeated and tracked -- this time with "behavioral biometrics." For the average person, why not just give up? Throw an Amazon Echo in the corner and at least you can control your lights and play Jeopardy.

It's totally exhausting.

<comment><USER3> I deal with it mostly by asking myself what "privacy" I'm really concerned about. Let's see... I don't want anyone actually stealing my money. I don't want sensitive security information that can be used to steal my money (ie passwords) falling into unauthorized hands.

But my personal history? My photos? Words I've written? Oh well. If someone wants that stuff, they can probably get it. And the gaping maw of robotic commerce doesn't actually care about me personally, it only cares what it can sell me.

I'm not worried about the police or some authoritarian tyranny on a _personal_ level, on the level where what I say on the internet matters. I worry about it in an _impersonal_ way. When the robot overlords are rounding up the granola- munching people of south Minneapolis for extermination, they won't be checking our internet history first.

<comment><USER4> > But my personal history? My photos? Words I've written? Oh well. If someone > wants that stuff, they can probably get it. And the gaping maw of robotic > commerce doesn't actually care about me personally, it only cares what it > can sell me. > > I'm not worried about the police or some authoritarian > tyranny on a personal level, on the level where what I say on the internet > matters.

Yeah, but then 2016 happened. This sort of "tactical positioning" on internet privacy is where I was prior to that year. The fact of the mater is that "personal threat exposure", while not completely irrelevant, misses the forest for the trees.

It's not YOU they're trying to manipulate, it's the herd. And it works. And that eventually comes around to impacting you just as personally as if you'd posted your bank account number and ssn on facebook.

<comment><USER5> By "2016 happened" are you talking about the US presidential election?

<comment><USER6> I think he is... and if so, he either misspoke and meant to say 9/11 or PATRIOT ACT happened or he's young.

</comment></comment></comment></comment></comment><comment><USER7> After reading this one I'm not sure this is as bad as I thought it would be based on the headline:

"On new account applications, for example, behavioral biometric systems pay close attention to where and when applicants pause. A legitimate applicant typically types personal information — their name, their address, their Social Security number — fluidly, with few breaks. A scammer will often either cut and paste or take breaks to consult their notes."

It's currently used to do security checks. And it's being done while your interacting with the site/app. Seems like a useful security check, though I suppose there's some potential for abuse, somehow?

I think Google's CAPCHTCA thing does this too? It watches how your mouse moves and knows your a real person (or something close to that).

<comment><USER8> > though I suppose there's some potential for abuse, somehow?

One day you want to post online a video obtained through illegal means (for example you film animal abuse in a US abatory), you buy a burner phone and go to an open Wifi, but the behavioral fingerprint you left behind while using YouTube is used to track you down.

I guess this is still fair game, you were breaking the law after all, but you get the idea.

<comment><USER9> I really really doubt you could get such a specific fingerprint and even so, you could automate video uploading to YouTube in a script

</comment></comment></comment><comment><USER10> Journalists need to realize that likely every app is doing this. Look at the companies providing this data (FullStory, MouseFlow, AppSee etc etc), they are industry agnostic. It's as easy as installing a library or adding a few lines of code and voila, you have this same data.

<comment><USER11> This would be a huge improvement in the quality of these stories.

There's a meaningful difference between something like Red Shell, where a few games gathered data that most others don't collect, and the stream of "apps log events!" stories which find some examples and present them as company- specific outrages instead of a nasty practice across the industry. Without understanding that, it's hard to have a useful discussion about tracking.

</comment></comment><comment><USER12> Sigh... give them an inch and they take the universe. It seems like nearly every piece of local data an application can gather is being abused for privacy invasion, this time under the guise of fraud prevention. It's bullshit; we all know how this information will be used. Swiping, mouse movements, keyboard input habits, etc. will all be used to build a profile about you and target ads. What a sad, sad use of humanity's infinite ingenuity.

<comment><USER13> I think there's a fairly likely future that the banks and financial companies will try (and IMO succeed) to ban the providers of this data from using it for anything else. Aka: we will not use a biometrics service that uses our user's biometric data for anything other than fraud prevention and authentication.

The banks are ultra-sensitive about personal data at the moment at least, but they really want these kinds of solutions to stop fraud without interrupting your user experience. They have the scale to demand vendors stay in a particular use case and I think they'll succeed.

I would expect the future you're predicting to exist, but I expect it to come from e-commerce companies and others adopting tech from similar vendors but without demanding any restrictions on data use.

</comment></comment><comment><USER14> I understand these metrics are easy to capture, but only if the browser / device makes it accessible via APIs. How difficult would it be to notify users (like GPS use, or Notifications on a phone) that X information is also being captured and allow for an opt-in?

It's not trivial as obviously applications need to know at some level where users are clicking / tapping to function, but does the device need to share that with the code being executed and/or can it hide that layer?

I'd pay good money (or pay money to support) a browser that did this well on mobile / desktop. (Tails browser has similar prompts for this kind of thing)

Admittedly, I am not well versed in the lower-level workings of the browser, so this may be a stupid thing to ask for.

<comment><USER15> How would the browser know which to block?

`onClick(){fetchAllForumTopics();}` vs `onClick(){sendTrackingData();}`. Both are simple ajax calls.

Even if you somehow managed to know which calls to block, you could simply hack it by calling a jpg with extra parameters and then have the server save those:

`onClick(){body.css({backgroundImage: 'http :// mysite.com/ images/ logo.png?x=123&y=512&elementName=BankAccountNumber'});}`

<comment><USER14> I wasn't thinking of blocking specific function calls so much as that data not being available to the browser at all to send in the first place, providing the ability to selectively block mouse x,y coordinates tracking, etc before the code on the page was executed.

Again, this may not be possible without breaking the web given the structure of the browser and what pages need to render at a low level. Perhaps client- side middleware that only passes user data when an action is performed rather than constantly streaming coordinate and interaction data all the time?

<comment><USER16> This is a great idea! It's always a good idea to control carefully what information is available to a system you might not always be able to trust completely. It's especially important to be sure you're not leaking info through a channel you didn't consider, which at times means that an allowlisting approach is preferable to a blocklisting approach.

Your heart is in the right place. Keep iterating!

</comment></comment></comment></comment><comment><USER17> This is abuse and wrong. Just as it is abuse and wrong for every website or app that does something similar. And this couldn't exist if we as software creators didn't make it. We as the creators of software need to look at everything we create for its potential to be used against people and if it could potentially be used to abuse someone, like say exposing interfaces that can be used for biometrics, we need to refuse to make it. People have survived for ages without your software and they might be better off if it stays that way. Don't be a part of this.

<comment><USER18> But how would that work? If I work on a word processing application, that application can be used to write horrible lies and propaganda that many people would believe. Are you saying I shouldn't work on such a product because of that?

If you look at the story of how browser cookies came about[0], it wasn't for advertising and tracking people. It was just intended to be a simple way to allow users to keep state between web pages to provide services the people wanted. It was later hijacked by ad companies to do surveillance and then the government hopped on board.

[0] [https://en.wikipedia.org/wiki/HTTP_cookie#History](https://en.wikipedia.org/wiki/HTTP_cookie#History)

<comment><USER17> I think you make a great point. We _should_ question whether it's a good idea to make the word processor. I'm not saying it shouldn't necessarily be made but we should think about how it can be used and if the potential for harm is too high or if it can be mitigated. My point is these things should always be kept in mind and we need to not be afraid of not making the technology.

</comment></comment></comment><comment><USER19> _> Because your reaction is so individual, it's hard for a fraudulent user to fake._

Malware can record behavioral user data from a compromised device then replay/modify to simulate the human on that device or another. Yet another arms race for black marketable behavioral "signatures".

</comment><comment><USER20> Do newspapers have to start a privacy panic about every damn thing? there are other ways to frame these reports, it's like they won't be satisfied until everything done on an electronic device is outlawed.

<comment><USER21> Do we technologists need to build privacy invading tools on every damn thing?

They are reporting on a problem that we keep creating. I don't see any problems with this.

<comment><USER22> Huh? The customer ('banks') asked and paid for this functionality. Not the other way around.

You make it sound like software engineers lobbied Bank CTOs to install this under duress

<comment><USER21> A) Where do you think banks got the idea? They just copied an existing shady business model.

B) The developers could have said no. If my boss got a contract with a bank that said I had to track users against their will, I would turn it down.

The point is that the newspapers are bringing up a legitimate problem. It's not a "panic", it's a valid concern.

<comment><USER23> > Where do you think banks got the idea? They just copied an existing shady > business model.

Tracking user input methods is not a shady business model. I was doing this for web forms back in 2003/4 to fight fraud, improve the user experience, and find problems.

> If my boss got a contract with a bank that said I had to track users against > their will

But they aren't being tracked against their will, so you would have done this.

<comment><USER21> Just because you have done it before doesn't mean it isn't a shady business model. Are they being notified that they are tracked?

Just because you don't have a problem with this practice doesn't mean it is without problems.

<comment><USER23> > Just because you have done it before doesn't mean it isn't a shady business > model.

It's not a business model. It's a security mechanism. Willing to bet that you track people.

> Just because you don't have a problem with this practice doesn't mean it is > without problems.

Didn't say it was without problems. I just don't see any issue with using data people provide freely.

</comment></comment></comment></comment></comment></comment></comment><comment><USER24> Is this why the New York Times webpage scrolling stops working every time my mouse arrow ends up over an ad?

</comment><comment><USER23> This has been going on for more than a decade. I implemented something like this back in 2004 for a payments page. The goal was completely focused on 1) fighting fraud 2) finding problems with filling out forms and 3) improving the experience for users.

People can argue that these things can be used for nefarious purposes, such as serving up targeted ads, but that's literally every browser you've ever used. That's literally the internet, and how it works.

</comment><comment><USER25> "Then the visitor typed on the numerical strip at the top of a keyboard, not the side number pad the customer typically used."

How can a browser-based app detect whether I'm using the number pad or not?

</comment><comment><USER26> Banks have been reocrding you non-stop to use for "voiceprint," under the existing disclaimer and guise of "training purposes," also highly invasive.

<comment><USER27> FUD. Provide some proof when you make a claim like that. If you've ever worked outside of dev you know how a paper trail or physical recording is critical for everything that happens in a businesses. You think a bank would let a customer and rep make account changes over the phone and not have a recording of that? What happens when there is a disagreement about what was said?</comment></comment>


Python 3.7: Introducing Data Classes - <AUTHOR> https://blog.jetbrains.com/pycharm/2018/04/python-37-introducing-data-class/ <comment><USER2> As noted in the PEP data classes is a less fully-featured stdlib implementation of what attrs already provides. Unless you're constrained to the stdlib (as those who write CPython itself of course are) you should consider taking a look at attrs first.

[http://www.attrs.org/en/stable/](http://www.attrs.org/en/stable/)

<comment><USER3> Does attrs support type hints? I didn't see it in a quick skim...

One thing the stdlib implementation has going for it: better naming. attr.ib() is not exactly crystal-clear.

<comment><USER4> You can `from attr import attrib, attribs` and use those instead of `@attr.s` and `attr.ib()`.

</comment></comment></comment><comment><USER5> Raymond Hettinger had a pretty good presentation on Data Classes and how they relate to things like named tuples and a few recipes/patterns. It was linked on Reddit[0] but it looks like the video has been removed from YouTube. His slides are online[1], though.

[0] [https://www.reddit.com/r/Python/comments/7tnbny/raymond_hett...](https://www.reddit.com/r/Python/comments/7tnbny/raymond_hettinger_python_37s_new_data_classes/)

[1] [https://twitter.com/i/web/status/959358630377091072](https://twitter.com/i/web/status/959358630377091072)

</comment><comment><USER6> I love using attrs, like the idea of bringing something similar to the standard library, but strongly disagree with the dataclasses API. It treats untyped Python as a second class citizen.

This is what I'd prefer

      from dataclasses import dataclass, field

      @dataclass
      class MyClass:
        x = field()

but it produces an error because fields need to be declared with a type annotation. This is the GvR recommended way to get around it:

      @dataclass
      class MyClass:
        x: object

You could use the typing.Any type instead of object, but then you need to import a whole typing library to use untyped dataclasses. I highly prefer the former code block.

There's a big thread discussing the issue on python-dev somewhere. Also some discussion in [https://github.com/ericvsmith/dataclasses/issues/2#issuecomm...](https://github.com/ericvsmith/dataclasses/issues/2#issuecomment-353903594)

Anyway, it's not a huge issue—attrs is great and there's no reason not to use it instead for untyped Python.

<comment><USER7> Yeah, it seems strange to force people to use type hints when it has had such a mixed reception. I really tried to use type hints with a new project a few months ago, but ended up stripping it all out again because it's just so damn ugly. I wish it were possible to _fully_ define type hints in a separate file for linters, and not mix it in with production code. It's kind of possible to do it, but not fully [1], and mixing type hints inline and in separate files is in my opinion even worse than one or the other.

[1] [https://stackoverflow.com/questions/47350570/is-it- possible-...](https://stackoverflow.com/questions/47350570/is-it-possible-to- separate-all-type-hinting-checking-infrastructure-in-python)

<comment><USER8> I've always wanted a programming UI similar to RapGenius's UI. With annotations and docs being opened in a form panel.

</comment></comment></comment><comment><USER9> It's great that we have simple/clean declarations for NamedTuples an (Data)classes now. But I wonder why they chose two different styles for creating them. This for NamedTuples:

        from typing import NamedTuple

        class Foo(NamedTuple):
            bar: str
            baz: int

and this for DataClasses:

        @dataclass
        class Foo:
            bar: str
            baz: int

<comment><USER5> When you write it that way it makes me wonder why there isn't a DataClass type

<comment><USER10> The short answer is that the only way to do what dataclasses do as a base class is via python metaclasses, and you can only have one metaclass. So this way, you can dataclassify something that inherits from a metaclass.

</comment></comment></comment><comment><USER11> I love that Peter Norvig left an improvement to the __post_init__ method in the comments section of the JetBrains blog. I wonder if he uses PyCharm?

</comment><comment><USER12> I'm happy to see data classes. I think something like this exists in 3.6:

        class Person(typing.NamedTuple):
            name: str
            age: int

But I don't think it supports the __post_init__; however, constructors have no business doing parsing like this anyway, so unless I'm missing something, deriving from `typing.NamedTuple` seems strictly better than `@dataclass` insofar as it seems less likely to be abused.

<comment><USER13> Tuples are read-only.

<comment><USER12> Ah, of course. Good point. I tend to write things in an immutable style, so I don't usually pay attention to this.

<comment><USER14> I see immutability as a feature.

There _are_ uses cases for mutability, but it should be opt-in, not opt-out. So I'm not loving the fact that "frozen" (the mutability param for data classes) defaults to False.

<comment><USER15> Python is very much not immutable by default, it'd be weird to subvert it in a specific case.

</comment></comment></comment></comment></comment><comment><USER16> Coming from C++ it feels really weird that you can simply assign instance.new_name = value from anywhere without properly declaring it beforehand. You also never really know what you get or if somebody modified your instance members from the outside.

<comment><USER17> I can only imagine how weird it must seem that you can override methods of instance objects and even classes, or even replace a whole class of an instance with another.

        >>> class Foo:
        ...     def bar(self):
        ...         print('foo')
        ...
        >>> class Baz:
        ...     def bar(self):
        ...         print('baz')
        ...
        >>> f = Foo()
        >>> f
        <__main__.Foo object at 0x7fa311e7a278>
        >>> f.bar()
        foo
        >>> f.__class__ = Baz
        >>> f
        <__main__.Baz object at 0x7fa311e7a278>
        >>> f.bar()
        baz

<comment><USER18> Does that work even if the types had fields? What about it the fields had a different total size? What if Baz had no parameterless constructor (I.e only had a contractor that guaranteed arg > 0 for example)?

Is this like an unsafe pointer cast where "you are responsible, and it will likely blow up spectacularly if you don't know what you are doing" or is it something safer that will magically work e.g with types of different size?

<comment><USER19> Inline:

\- Does that work even if the types had fields? Yup!

\- What about it the fields had a different total size? Totally fine!

\- What if Baz had no parameterless constructor (I.e only had a contractor that guaranteed arg > 0 for example)? Then you throw an exception when you call the constructor.

\- Is this like an unsafe pointer cast where "you are responsible, and it will likely blow up spectacularly if you don't know what you are doing" or is it something safer that will magically work e.g with types of different size?

Mostly the former, but if you're coming from a strongly typed compiled language, it may feel like a bit of the latter too, since if you don't run into any obvious runtime incompatibilities, it'll all "just seem to work" even if the underlying classes are 200% different.

(Disclaimer, I've been using python for ~decade now but am still always nervous to speak authoritatively about it, since I work with peers who are FAR deeper in the actual implementation than I am, and I run the risk of being subtlety incorrect.)

<comment><USER18> > Then you throw an exception when you call the constructor.

I was assuming that doing

       myobj.__class__ = whatever

Would not call any constructors?

<comment><USER19> You're correct, sorry, I was not clear. The actual value setting that you cite will work pretty much regardless, you could do __class__ = "Q" for all python cares.

The problems would come later when you try to use any functionality of the new __class__ in the manner of the old __class__ for which the new one is not compatible. e.g.:

        class A:
            def go(self):
                print("A ran!")

        class B:
            def go(self):
                print ("B ran!")

        class C:
            def go(self, foo):
                print ("C ran!", foo)

        a = A()
        a.__class__ = B
        a.go()

        B ran!
        In [11]:

        a = A()
        a.__class__ = C
        a.go()

        </comment></comment></comment></comment></comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---
        TypeError                                 Traceback (most recent call last)
        <ipython-input-11-b67fe8fb94e1> in <module>()
              1 a = A()
              2 a.__class__ = C
        ----> 3 a.go()

        TypeError: go() missing 1 required positional argument: 'foo'

<comment><USER18> Thanks. The constructor thing can be illustrated similarly (found an online compiler, I don't normally python...).

        class A:
            i = -1
            def __init__(self, num):
                if num <= 0:
                    raise(Exception('noo!'))
            def go(self):
                print('A has value {}'.format(self.i))

        class B:
            def go(self):
                print ("B ran!")

        b = B()
        b.go()

        b.__class__ = A
        b.go()

</comment></comment><comment><USER20> I have to be honest, coming from Python 2.3 (2004ish), I don't recognize "new" Python anymore. I think it's mostly regarding type definitions.

<comment><USER21> It's relatively recent. IMHO Python 3.5 to 3.7 feel like the language is going in a different direction than it did before -- type hints and the handling of asynchrony in particular.

<comment><USER9> If been using a lot of Python/JS/TypeScript in the last couple of years and it seems like each new release brings them closer together.

<comment><USER22> which IDE do you use these 3 with?

<comment><USER9> VSCode

</comment></comment></comment></comment></comment><comment><USER23> Looks like how a lot of languages already work out of the box. E.g. whenever I create a data type in Julia I automatically have such a constructor.

Static languages such as Go and C already essentially let you do this through initialization through braces.

</comment><comment><USER24> Link to the PEP: [https://www.python.org/dev/peps/pep-0557/](https://www.python.org/dev/peps/pep-0557/)

</comment><comment><USER25> While 3.7 is not here, back-port: [https://github.com/ericvsmith/dataclasses](https://github.com/ericvsmith/dataclasses)

<comment><USER13> Also on PyPI.

</comment></comment><comment><USER26> I think it's because I'm working with elm right now, but this kind of thing scares me:

        created: datetime

But

       if type(self.created) is str:
           self.created = dateutil.parser.parse(self.created)

So basically, the type annotation cannot be trusted.

<comment><USER27> In Python, type annotations are (expressly) just a special type of comment that's been given a regularized format for the sake of both human and computer readability.

I don't know that it should scare you, but, like with many Python features, it's something that should be approached in a sensible manner. The Python philosophy is to leave you with the freedom to monkey around, and leave it to you to decide whether you want to abuse that ability.

(Look at me, all talking like someone who didn't spend 2 hours diagnosing a type error that a static language would have found and forced me to fix within half a second. :P )

</comment></comment><comment> david-cako This __post_init__ thing is shit IMO. Why does it make sense for the language feature to allow you to completely disregard the type hint and fix it later?

I have to imagine that the type checkers would factor in anything that occurs in __post_init__ when evaluating whether the class conforms to the type hints, but it still feels like this python static typing stuff is drifting in the wrong direction.

<comment><USER28> I don't like `__post_init__` either. Wouldn't it make more sense to just override `__init__` similar to:

        @dataclass
        class DataObj:

            some_date: datetime

            def __init__(self, **kw):
                kw['some_date'] = dateutil.parser.parse(kw['some_date'])
                super().__init__(**kw)

<comment><USER29> To allow you to override init that way, @dataclass would have to create an additional superclass with the generated init method, rather than generating the init method in the class intended for use, which seems to have more overhead.

<comment><USER30> You could attach the __init__ method to dataclass (as if it were a class) and call it like this, couldn't you?

      dataclass.__init__(self, **kw)

Like in the olden days before super().

<comment><USER29> From the description, the dataclass decorator _generates_ an __init__ method for the decorated class, which seems different than using a common generic __init__ method for all classes with the decorator.

</comment></comment></comment></comment></comment><comment><USER31> Would be convenient if it also supporting generating a to dict method with dunder hooks for customizing the translation ...

</comment><comment><USER32> Looking forward to having ORMs support this way of defining models

</comment><comment><USER33> It will be nice to have this but for data deserialization, which is the case in the example, I would still use drf serializers or marshmallow schemas.

<comment><USER34> Re: serialization, worth mentioning cattrs project (work with attrs classes, but would work the same way with stdlib dataclass):

[https://github.com/Tinche/cattrs](https://github.com/Tinche/cattrs)

</comment></comment><comment><USER35> I just hope the `__post_init__` method catches on and becomes a regular python dundermethod. I actually find it to be a very good quality in this new implementation.

Example from the PEP 557:

      @dataclass
      class C:
           a: float
           b: float
           c: float = field(init=False)

           def __post_init__(self):
               self.c = self.a + self.b

[https://www.python.org/dev/peps/pep-0557/#post-init- processi...](https://www.python.org/dev/peps/pep-0557/#post-init-processing)

I could use this all over the place.

<comment><USER36> Where would it be useful outside of an automagically generated __init__ method?

</comment></comment><comment><USER37> Is Python becoming more statically typed then?

<comment><USER23> Dynamic and static languages are fundamentally different. There is no more or less.

I've tried to elaborate here why annotating variables with type doesn't make a dynamic language static:

[https://medium.com/@Jernfrost/dynamically-typed-languages- ar...](https://medium.com/@Jernfrost/dynamically-typed-languages-are-not-what- you-think-ac8d1392b803)

You can't look at the presence of type information to determine if a language is static or dynamic. What matters is when and how that type information is used. In static languages expression have type. In dynamic languages values have type.

The implication is that you can't know the type of something in a dynamic language until the expression has been evaluated at run time. With a static language we can determine the type of every expression at compile time, which requires full knowledge of the whole program. It is why dependencies becomes much more problematic in static languages and why they are so poor as glue languages.

<comment><USER38> > In static languages expression have type. In dynamic languages values have > type.

I don't think this is true. In a dynamic language all values, including expressions, share a single type - a union of all possible types. In a static language you can limit which possible types a value may hold. A dynamic language is like if you cast every single type to Any in a static language.

In Python this is entirely possible with mypy - a static type system for the Python language, which works through annotations.

> in static languages they are used to prevent the compilation of programs > containing expressions where types don't match up.

This is already the case with mypy in Python. It seems very much static. It's like everything is statically determined to be Any, then you specify in certain areas a more limited type.

In your case with Julia, the type annotations are static. Even if by default Julia is dynamic, it allows for static annotations.

I disagree that there is no in-between. I think Julia is actually a great example of an in-between. And, in fact, it has a name - gradual typing.

<comment><USER39> > In a dynamic language all values, including expressions, share a single type > - a union of all possible types. In a static language you can limit which > possible types a value may hold. A dynamic language is like if you cast > every single type to Any in a static language.

No, you're thinking of a weakly- versus strongly-typed language. Python is dynamically and strongly typed - values have a definite type, but a variable can be assigned a value of any type.

<comment><USER38> As RussianCow said, I think you're misreading my post. A Python variable, from a type perspective, is a variable with a type Any/ a type that is a union of all possible types.

Using annotations you can then specify the type.

Nothing to do with weak/ strong, which merely imply some level of implicit casting.

</comment></comment></comment></comment></comment><comment><USER40> Finally! Attrs is great, but I'm glad to see this in the standard library.

</comment><comment><USER41> Looks great, too bad my project will forever be in 2.7

<comment><USER42> Presumably (hopefully?) not in 2020, when it stops getting security fixes?

[https://legacy.python.org/dev/peps/pep-0373/](https://legacy.python.org/dev/peps/pep-0373/)

<comment><USER43> It will probably be a fair bit longer than that before 2.7 stops being relevant. 2.7 is still the default system Python on a lot of Linux distros, which will be in vendor support for longer. It doesn't really matter if the fixes are coming from the PSF or someone else - nice thing about Foss.

RHEL/CentOS 6 is still reasonably widely used, and the system Python there is 2.6.

<comment><USER44> > 2.7 is still the default system Python on a lot of Linux distros

I will never understand why that matters. "ed" is the default system editor, but I'm only "{apt-get,yum} install {vim,emacs}" away from having something I actually want to use. That's the whole point of a distro. You don't have to use Python 2.ancient just because /usr/bin/paleolithic is written with it.

<comment><USER45> Not all environments have unfettered access to the internet to download whatever arbitrary packages the user decides they need that day. Sometimes you're stuck with whatever the distro shipped with.

<comment><USER42> Most distros have been shipping Python3 for years, just not set as the target for `/usr/bin/python`. You can run `/usr/bin/python3` currently, almost anywhere.

And "software that has been gradually going EOL for the last 5 years" is not "packages the user decides they need that day". I'd be very surprised if any distros that ship with Python2 do not ship with Python3 in 2020, and I'd even wager that most will default to python3 by then.

</comment></comment></comment></comment></comment></comment><comment><USER46> Reminds me a lot of the attrs module.

</comment><comment><USER47> I have used dictionaries for this for the longest time. The thing is I sort of rely on the type being flexible, so what can I do?

<comment><USER48> If you rely on your type being "flexible" I would argue that you have a design problem.

<comment><USER47> My working code beats your ideological purity.

<comment><USER48> This was really coming from practical experience, but no offense taken.

<comment><USER47> I asked for how this PEP could or could not be used for my use case, and your response was "your use case is invalid" without knowing why I do the things I do. No one should have to respond kindly to bullies.

<comment><USER12> Calm down, no one is bullying you.

</comment></comment></comment></comment></comment></comment><comment><USER49> attrs does a pretty good job, while also supporting older Python versions: [http://www.attrs.org/en/stable/](http://www.attrs.org/en/stable/)

</comment><comment><USER50> I'm piqued by one thing in this article. Using an object as a dictionary key. What's the use for that? I don't think it's ever occurred to me to do that.

<comment><USER36> Dynamic dispatching comes to mind.

      d = {Foo : do_something_with_foo,
           Bar : do_something_with_bar}

      d.get(type(x), default_function)(x)

Probably some more efficient way but honestly I've used this before instead of writing a whole if elif chain.

\--edit--

Makes python's lack of a switch operator sometimes less painful...

<comment><USER50> Oh, that makes sense. Not sure why this question rubbed people the wrong way. I was genuinely curious about when you would use an object as a key.

I guess my uses for dictionaries are pretty vanilla. But that's a kind of thing I do all the time. I set up dictionaries where the key is a possible value from some operation or query, and the value is the function I want to perform on that value.

This extends that concept. Thanks!</comment></comment></comment>


Geary Cube puzzle, another Bram and Oskar collaboration - <AUTHOR> http://bramcohen.livejournal.com/66270.html

<comment><AUTHOR> Their previous collaboration: <http://bramcohen.livejournal.com/57084.html></comment>


Show HN: Optic – Alerts on Business Metrics from Rails Apps - <AUTHOR> Optic (https://optic.watch) sends you a Slack alert when an important metric changes in your Rails application. For example:
1. Notify a channel when a new customer signs up.
2. Notify a channel when any customer has more than 5 items in their shopping cart.
3. Notify me via Slack DM when a particular high-value customer activates their account.
We've been building Rails applications for a decade now, and we've long wanted a zero-configuration system for alerting on business metrics, just like New Relic understands your application performance in terms of Rails MVC. Popular analytics tools failed us in two ways: they force you to duplicate your application logic in their tool and they don't have a simple way to generate alerts when metrics change.
Optic connects to your database through the ORM and uses ActiveRecord to give you smarter metrics and alerts without writing queries. And because Optic lives in your application, as your data model evolves you don't have to rewrite your analytics queries to keep up.
Right now Optic supports Rails 5+, and is tested with PostgreSQL and MySQL. We use it for monitoring several production Rails applications (including itself), and we've tested it with open-source Rails applications like Rubygems.org, Discourse, and Lobste.rs. Optic uses read-only database transactions and tight limits on transaction times to minimize risk to your application. Still, we recommend testing thoroughly in your staging environment before deploying to production.
This preview release is free for individual use, with an unlimited number of projects, metrics, and rules, and retention of up to 12 hours of data. Hit the green button in the application to contact us if you're interested in a multi-user tenant or longer data retention periods. We're looking forward to your feedback - and if you're not a Rails user, what framework would you like to see Optic support next? <comment><USER2> Looks interesting, didn't work for me on my local development app.</comment>


Why Windows Explorer in Windows 8 rocks - <AUTHOR> http://www.7tutorials.com/12-reasons-why-windows-explorer-windows-8-rocks

<comment><USER2> It took me some time to be sure it wasn't a satirical article.

I believe it might be nice for Linux users. But most "feature" are wrong for standard user and even more for beginners.

=== my feelings:

Reason 1: contextual ribbon. Without talking about the visual attractiveness it is a complete loss of space. It is like someone saying: "Hey, you know you could do this!" "Would you want to open this image?". "Hey would you want to see the size of you hard drive?". "Hey would you want to launch your movie inside Windows Media Player given by you by Microsoft(c) for the unique and incredibly user friendly Windows 8?"

Hey losing so much space for annoying possibilities. I don't know for whom it will be useful? Annoying for power users. Noisy for new ones.

Reason 2 - Copy: ??? Incredible I can have a screen displaying how I copy a file! I confess the ability to pause the copy can be nice for very huge files.

Reason 3 - Copy path button? Yes if you are a geek and want to use the command line.

Reason 4 - Up button! Whoa!

Reason 5 - Customizing How To View Files & Folders is Dead Easy!: Just look at the screenshot! There are at least 20 different widget! _EASY_? I don't think so.

Reason 6: The Quick Access Toolbar! Yes, we didn't had enought button!

Reason 7: Searching is fixed in windows 8? Good news! Just some years after Mac and Linux.

Reason 8: Open "cmd" on the current location. Great my son and my wife will feel like "UB3R 1337!".

Reason 9: Mount ISO Disc Image. You're kidding, it wasn't here before?

Reason 10: Multile instance in multiple processes. Incredible, when the five firsts windows will be stuck I could also stuck a new one :-).

Reason 11: Easy management of Favorite folder. Incredible! I should buy windows 8 just for this incredible new feature! On XP I used ie6 to mark my favorite folders.

Reason 12: Easy copying and moving files and folders. Super! I can now click on another buttons! I love button! Give me more! Yeah, drag and drop is boring.

\</comment><comment>

Sorry, for the general ambiance of this comment. I didn't want to hurt anybody. But seriously, it is a joke. I only hope it was really a satirical article in the end and I was trolled.

The only positives point are Reason 2, 7, 9 and Reason 10 which are bug fixes, not features.

"Make It Simple! Stupid!".

Seriously, most of these feature are anti pattern for standard user even if they seems good for many power users. Please, rename your finder: "pro-finder" and in the name of everything good in this world make a "nice, simple, minimal finder for the rest of the world!"

<comment><USER3> "Make It Simple! Stupid!" - they have such an UI - Metro.

If you read out all these new features, does it not strike you that they ARE building this for power users? I reckon Windows 8 is the transition OS, in the future MS will try get standard home users off the traditional desktop and onto Metro. There you probably won't even be able to see the file system at all...

<comment><USER4> Right.

Classic dekstop : Metro as DOS : Windows

<comment><USER3> In English?

<comment><USER4> I was just kind of doing a shorthand version of what you were saying, but in a different way.

DOS was the power users shell, and Windows was the easy to use simple shell.

Now the classic desktop is the power users shell, and Metro is the easy to use simple shell.

Very similar transitions.

</comment></comment></comment></comment></comment><comment><USER5> I went in thinking "Yeah right", and came out thinking "whoa! that's pretty cool!"

Some of these features I regularly add to Ubuntu (Terminal session here, or mounting ISO's, for instance), and others I think are insanely important (what is with OS X having no Up Folder button? I still have such a hard time getting around without it.)

<comment><USER6> Several ways to achieve "up a folder" effect, if you're curious:

1\. Right click on the folder (so-called "proxy") icon in the titlebar, which will give you links to all the folders up to the root

2\. Assuming you drilled-down into this folder from its parent, click the back button or (with a multitouch trackpad) three-finger swipe to the left.

<comment><USER7> The up button was removed in Vista/Windows 7 and has now been re-added. It's not a new feature it's just that most windows users moaned about its removal so much they've finally caved.

All the functionality you're describing is available in Vista/Windows 7.

But the up button? It's just better. You don't know what you're missing.

</comment></comment></comment><comment><USER8> A lot of these options are going in the absolute wrong direction, I think. They are cool for power users, but that is such a small portion of the population. My grandma can use a Mac specifically because there are like 2 buttons for her to press on any window.

<comment> dorian-graph Why is it going in the absolute wrong direction if they are good for power users? Also, why must we continue to treat the normal user as _dumb_? My mum now uses tabs in web browsers, knows a couple of shortcuts, etc. Let's promote this and not pretend they are unable to progress past using a one-button mouse. ;)

My Grandma gets along fine using Windows.

<comment><USER9> Because what you call dumb is in reality just complete lack of interest. Having that many buttons on the default view just adds to the feeling of "what in the world is all this shit"

</comment></comment></comment><comment><USER10> "Reason 10: Can Run Multiple Instances in Different Processes"

I'm not sure "open new window in a new process" really belongs in a windows menu. It's just more junk that only a tiny percentage of their users will understand.

I don't think the idea of a process is anywhere in the technical vocabulary of a typical windows user.

<comment><USER11> Worse than that tt's actually an option since windows 2000 and every windows version since then, so it's nothing new he just didn't know about it. Most of the other "power user" things like "open command prompt here" have been available through power toys or such.

<comment><USER4> How do you do that in Windows 7? It would actually be useful for me on occassion, but it never even crossed my mind that I could have a new window open up in a new explorer process.

<comment><USER12> Tools -> Folder options -> View tab -> Launch folder windows in a separate process

<comment><USER4> Thanks. Not very easy to use, since I'd typically like to just use it on occassion. But at least I know it's there now.

</comment></comment></comment></comment></comment><comment><USER13> It looks incredibly complicated.

</comment><comment><USER14> These are nice looking features. I don't always use a graphical file manager, but when I do...

...but seriously, the thing I'm the most struck by is how ugly this thing is. I guess MS blew all the design money on Metro.

</comment><comment><USER15> Several of these features are already available in current Windows versions (perhaps less discoverable, but there nonetheless):

\- "Add to favorites" is an option in the right click menu on Favorites in the left panel, works the same way as the new one on the ribbon shown in the article \- "Run each window in a new process" has been around since at least XP \- "Open command window here" is in the shift-right click menu already

On the other hand, several of the new features do look nice; (re)adding the Up button is good, and "Copy path" sounds very handy.

</comment><comment><USER16> My favorite feature, which he didn't mention, is that you can now copy/move items to ancestors of the current directory by dragging and dropping into the relevant section of the breadcrumb bar.

<comment><USER17> Yes, that's a very cool feature.

<comment><USER16> I remember trying it in Vista and being disappointed that it didn't work. There were a lot of times in my old job it would've been useful.

</comment></comment></comment><comment><USER18> I still use WinXP - I'm partly change averse, and partly find some things in Win7 (which I have on my laptop) more clunky than WinXP.

I happen to be in windows explorer a lot between everything I'm up to, and all of these features linked look terrific and will make me much more productive. So count me in as excited for a new Windows launch for the first time in a while.

<comment><USER19> I added Classic shell ( <http://classicshell.sourceforge.net/features.html> ) to Windows 7 to fix some of the clunkiness. With classic shell you can fix some of the weirdness/newest of Windows 7 explorer while getting to use some of the new features.

I'm so change averse that I still use the classic start menu (+1 for muscle memory) but Windows 7 is such an improvement over XP that's it worth moving to.

</comment></comment><comment><USER20> I wager "Finder" is gone by the next iteration of OSX. I think the file paradigm is on its last legs, and of all the things I wish, it is that Microsoft shored up their gumption to implement WinFS and the Cairo OOP file system work.

The fact that we're still dealing with tree/branch file systems (for the lay person) is kind of insane.

<comment><USER21> I think that "Finder" can become task / app / project centric with relatively little effort without losing the _ability_ to view things in a File-centric way.

That said, Apple doesn't do things in half-measures, so what I expect would be Finder to be deprecated ("hey, it's in Utilities") and replaced with something launchpad-like.

</comment></comment><comment><USER22> I don't have a problem with Windows Explorer in Windows 8, in itself, except for the way it is so jarringly different than Metro. IMO, it is recreating the X11 problem of too many UI tool kits.

Personally, I think Microsoft should consider creating a Metro based file management system.

<comment><USER23> Metro is content- and context- oriented. It will present a file browser when you need one, containing the kind of content you care about. For example, add a picture to a tweet in your Twitter app and get an image gallery. The idea is for you not to have to care where files are located.

<comment><USER22> The problem with that is many people DO care where their files are. And to have to use a jarringly different interface to manage them is asinine.

(Of course, if Microsoft doesn't do it, someone will; giving rise to 3rd party file managers just like we had back in the Windows 3.1 days.)

</comment></comment></comment><comment><USER24> Straight up these mostly seem like power user features, which has no place in an interface for every day users. I feel like they might maybe be onto something with Metro, but the new explorer is two steps backwards.

</comment><comment><USER25> > Uninstall or change a program

That's a terribly long label for an icon. This and other unnecessarily long labels are probably responsible for at least half of the "It looks cluttered" complaints.

I generally don't mind the ribbon interface -- I've gotten used to it somewhat -- but MS should really try to make the Explorer ribbon _appear_ less cluttered. In Word 2010, few of the labels take up more than one line, especially in the most commonly used tabs.

In other words, make the other ribbons look more like the "Search" ribbon (Reason 7). It just looks much better organized.

</comment><comment><USER26> It will rock when I can have tabs in my explorer

</comment><comment><USER27> Maybe windows power users might find all that stuff awesome, but I worry about having to explain it all to my dad over the phone

</comment><comment><USER28> [Reason 1: The Contextual Ribbon]

Your joking. Right?

</comment><comment><USER29> Most of this is in Win 7

</comment><comment><USER30> A a lot of buttons on those designs. One gets used to the opposite in OSX...

<comment><USER31> Yes, but you also need to get used to the complete lack of useful file management features in Finder.

<comment><USER32> What missing features are those?

</comment></comment></comment><comment><USER33> I read through the whole thing and honestly couldn't tell if it was being sarcastic or not. Just the name Explorer alone is all wrong... most users don't want to explore, they want to find. Maybe they should call it a Finder instead. Oh, wait...</comment>


Obsolete Technology in Unicode - <AUTHOR> https://shkspr.mobi/blog/2018/03/obsolete-technology-in-unicode/ <comment><USER2> \- tapes are still in use \- you can still buy optical discs in stores. They might be on the way out, but are still being produced and sold.

</comment><comment><USER3> I would love to see the fax machine to go away. But many government agencies still say that fax is the only secure method to send data. Even though documents travel over VOIP lines and often kept in public areas.

<comment><AUTHOR> It's depressing, isn't it? I wouldn't mind if fax was high-resolution, but most of the ones I'm unfortunate enough to see are a smeary mess.</comment></comment>


Ask HN: Launched. #1 app in my category. Now what? - <AUTHOR>

I've launched 2 days ago and it's going (and feels) great, and users are loving it. However no major blogs have really picked up the story yet (some of the friendlier ones have already run a story on my app within the last 2-3 months), which is a big downturn. The traffic will soon fade away, and the top-10 effect on the Mac App Store is probably not that significant. I continue trying to get blogs to cover me, but is there anything else I can do to help long-term success? <comment><USER2> patio11 has written extensively about his experience promoting and selling software apps, I'd recommend reading through his blogs.

<comment><AUTHOR> I've read all his stories that made it to HN homepage, but thanks for reminding me. Exploring his blog now.

</comment></comment><comment><USER3> What's your app?

<comment><AUTHOR> LiveReload.

<comment><USER4> I've made sure to tell all my friends about it. Gladly paid the tiny $10 (would have paid $50) and also wrote a glowing review for you on the app store. _LOVE THIS APP_.

I think one of the bits of hesitation for people to start using the application is how it will fit into an existing build system.

I personally don't use any of the neato 'compiler' features because I already have that setup with my IDE.

Also, I tend to be on the bleeding edge of the various compilers (Less/CoffeeScript), so I'd never use your app for the build step since I can't be assured that your version is the same version that I'm using.

Really, the only feature that is important to me is the live reload aspect.

Maybe one way that you can get more people interested in your application is to put a bit more focus on the live reloading. Show them how just pointing the app at the 'htdocs' folder and adding some JavaScript to the page is all it takes.

</comment></comment></comment><comment><USER5> Can I ask since you've given the name of your app: why does it "work with a great many [text editors]..." instead of all text editors?

<comment><AUTHOR> That is referring to the "jump to error line" functionality, which is editor- specific. I should make that more clear.</comment></comment>


Ask HN: What is a good way to track movement indoors? - <AUTHOR>

I'm looking to track the movement of people in an indoor office building (with their permission) over an extended period of time. I would like to know who is meeting whom, at what times, how often etc -- the basic idea is to visualize physical interaction.<p>My thought was to use cellphone signatures, mac addresses etc to make this happen. Can anyone think of a good solution? Do I have to build something myself or is there something out there? <comment><USER2> MAC addresses won't be good for some Android devices and any Apple iOS device running iOS 8.0 or later. Some Android devices and all iOS 8 devices randomize their Wi-Fi interface MAC addresses during polls.

You could do Bluetooth, but some percentage will have it turned off. Since this is a voluntary deal, you could just have them turn Bluetooth on when they want to be tracked and run periodic scans.

Trivia: I once ran something like this when I lived next door to a prostitute and was able to track her customer arrival and departure times (along with BT MACs, device names, etc).

</comment><comment><USER3> We at GiPStech are developing a solution based on anomalies of geomagnetic field (similar to Indoor Atlas) integrated with RF (wifi and beacons) to get precise to 1 meter / 3 ft with little or no infrastructure :-) In the meantime, depending on the localization accuracy you need you can resort to wifi tracking (10-15 meters) or Low Energy Bluethooth beacons (2-5 meters, perhaps adopting the Apple protocol called "iBeacons"). Some solutions are available "off the shelves" in the market, look at Indoo.rs or Estimote or Loctronix, but there are many others

<comment><USER4> Thanks for mentioning us. As you said we provide indoor navigation as a mobile SDK for Android and iOS based on iBeacons, sensors, etc. We do provide a free plan to test everything out. Just register at my.indoo.rs If you have an questions I am happy to help. Bernd (co-founder,indoo.rs)

</comment></comment><comment><USER5> There are turn-key RFID solutions for that purpose. Employee/visitor badges with RFID chips + RFID readers across the building.

</comment><comment><USER6> Navisens does this with a software-only solution, check them out [http://www.navisens.com/](http://www.navisens.com/)

</comment><comment><USER7> You could try iBeacons, though they only work with iPhones.</comment>


Planet discovered in extreme system with three suns - <AUTHOR> https://www.researchgate.net/blog/post/planet-discovered-in-extreme-system-with-three-suns <comment><USER2> Tri-Solaris!

[https://en.wikipedia.org/wiki/The_Three- Body_Problem](https://en.wikipedia.org/wiki/The_Three-Body_Problem)</comment>