News for hackers. Stuff that matters.

qcoh

Re:I cheated on my Microsoft interview (2019) on Sunday June 05, 2022 @06:23AM (#31629648)
How is it brittle? It solves the problem at hand, which is unambiguous (I think).
Re:Binary search with confidence on Monday March 07, 2022 @05:22AM (#30586094)
PBT is awesome but I would still like to have tests I can easily reason about when implementing a tricky algorithm. The way I see it, TDD is the specification, PBT is for finding gaps in my specification.
Re:Examples of common false beliefs in mathematics on Monday January 31, 2022 @03:22AM (#30145750)
> I'd have to look up what the "/" in "M/L" means in the 5th reply (I didn't)

M/L means that M is a field-extension over L. A concrete example would be C/R (the complex numbers over the reals).

Algebraic number theory, in particular Galois theory, studies field extensions by looking at the group of symmetries: the field automorphisms of the larger field that fix the smaller field. For the concrete example above, the Galois group is a group with two elements: the identity function and the function that maps i to -i and keeps real numbers fixed. It's not a coincidence that the dimension of C as an R-vector space is the same as the size of this group (or that the degree of the polynomial that has i (and -i) as roots has degree 2).

Same here. The universe tipped back into balance when they didn't bother to reply after me asking about the role. :)
Re:The age of machine learning as code has arrived on Saturday October 23, 2021 @07:09AM (#28967357)
To add to that my current struggle: Most stuff is geared towards conda and terrible engineering practices (requirements.txt and not even locked versions). If you want to actually build and deploy something on actual hardware, you are in a world of hurt. And even for training the dependency situation is so ridiculous that most repos come with their own Dockerfile.

I marvel at the cool machine learning demos but I'm kind of sick working on this stuff, tbh.

Some things I like:

* Frequent feedback from stakeholders and customers

* Retrospectives

* Standups

These can be annoying but they help make sure that the right thing is developed.

Things I don't like:

* Things get rushed to get them done before the sprint ends (even if there is no deadline pressure)

* On the other hand, everything takes at least two weeks to get done

I feel that this turns the output of a very high-performing developer into that of a mediocre developer. I'm not a 10x developer, so I can cope. ;)

Things I don't like but don't blame on Scrum:

* Jira

* Storypoints

* Estimating: All estimates beyond the current sprint are completely unreliable. Still, people use storypoints to derive release dates and worse, measure the productivity of employees using them.

FWIW, until I learn of better processes, I prefer Scrum without "buts" and with continuous deployment.

From the FAQ, I don't get why the code has to be GPL licensed. It talks about libraries, "entire combinations", "software modules that link" and "work as a whole".

On your second point: Can't they argue that they implement against an API, which could be provided by non-GPL software as well?

That worked, thank you!
Three reasons for me:

* It disconnects more than once per day, requiring me to enable the wifi hotspot again on the phone

* The phone gets very hot

* It is slower than usb tethering: In my measurements, I get about 4MByte/s over USB and around 2MByte/s with wifi, though I'm not too confident in the results. According to the mobile provider, I should get 10.

EDIT: A fourth one is that the wifi hotspot leaks my first name and phone brand to everyone in the vicinity.

Re:Twenty Proofs of Euler's Formula: V-E+F=2 on Sunday June 21, 2020 @11:27AM (#23592497)
If anyone else struggles with how the formulae "V-J=1" and "1+D-F=0" are obtained: You can think of the two different ways of joining bodies of water (join two separate bodies of water (J) and join the same body of water (D)) as algorithms for computing a spanning tree in the original graph (J) and the dual graph (D).
Out of curiosity, how did you do that in C++?
Re:Learn TLA+ (2018) on Sunday February 23, 2020 @02:34AM (#22395634)
There's a paper describing the use for railway applications [0].

A few years back I had an interesting discussion with one of its authors and was shown the real model and code. Interestingly, they generated C from the TLA+ spec and this code generator was "unproven". However, the software itself had high coverage requirements and needed to be tested extensively (100% code/branch/MCD coverage, I don't quite remember).

One of the points he made was that the upfront cost pays for itself by avoiding bugs that are hard to debug.

[0]: https://drive.google.com/file/d/1rAn3N5hViv3xNe2E55lMzpFFym1...

Re:Recursive Make Considered Harmful (1997) [pdf] on Sunday May 26, 2019 @03:08PM (#20016779)
I tried this once with multiple components (each being built into a static library), components "exporting" public includes (with correct dependencies across component boundaries) and tests for every component (as well as integration tests) and my conclusion: cmake it is.
Re:Ask HN: What are some of the best documentaries you've seen? on Thursday September 27, 2018 @02:18PM (#18087243)
I really like Alone in the Wilderness, which is about Dick Proenneke building his log cabinby hand and living a solitary life in Alaska.
Re:Writing a Game Boy emulator on Wednesday July 11, 2018 @03:24PM (#17509590)
I think you're right, see [0].

Furthermore E9 is not "JP (HL)" but rather "JP HL". If I remember correctly a few timings or instruction sizes are off as well.

[0]: http://www.devrs.com/gb/files/opcodes.html

Re:Linear logic and deep learning [pdf] on Monday January 29, 2018 @12:16PM (#16258871)
Sorry for the unrelated comment but I wanted to thank you for your nice lecture notes. I found them clear and very helpful during my studies.
Re:India demonetisation fails to purge black money on Thursday August 31, 2017 @12:06PM (#15141270)
From the article you linked: "The ECB says the €500 banknote remains legal tender and will always retain its value."
Re:C++11 FAQ on Thursday January 26, 2017 @06:15PM (#13496286)
Thank you for the explanation! I'll have to look out for that one...
Re:C++11 FAQ on Thursday January 26, 2017 @04:27PM (#13495385)
Sorry, can you clarify? Adding the template argument causes a crash on idone, but I have no idea why that happens. Moreover, the output on my computer is always b\n.

EDIT: Not sure if this is it, but after some digging I've found [0] on lifetimes of temporaries. As for the lacking template argument, presumably const char* is inferred and a temporary string is constructed in main?

[0] http://stackoverflow.com/a/2784304

Re:C++11 FAQ on Thursday January 26, 2017 @02:04PM (#13494239)
Works for me in both C++03 and C++14? https://ideone.com/KhfGaN
Re:Category Theory for the Sciences on Saturday July 23, 2016 @02:49PM (#12150537)
You need to know a few interesting categories and functors before you can appreciate it. Without that, it is really abstract nonsense.
Re:Tinnitus in relation to neck/head muscle tension on Sunday June 19, 2016 @12:07PM (#11933413)
Yes, it works for a (very) short time. Cool trick, thanks!
I had a similar situation just recently with an old Gmail account. Despite knowing the password, Gmail wants me to answer the security question or log in from a place I logged in ten years ago or list folder names (which didn't exist the last time I used that account) or ...

The whole point of this misery was to recover my Steam account to play a few games. Fortunately, Steam lets you recover your account if you can provide proof of ownership (like CD keys of physical copies).

I don't want Google to be the safekeeper of my digital identity.

Re:Automatic Differentiation (2009) on Saturday January 02, 2016 @06:07AM (#10825839)
Symbolic differentiation is what you learned in school and do by hand. Automatic differentiation is, as far as I understand it, you take your nice function, develop it into a Taylor series around x:

    f(x + h) = f(x) + f'(x) h + f''(x) h^2 / 2 + ...
Suppose that f is a really, really nice function (defined and holomorphic in a large enough domain in the complex numbers and a Taylor expansion with real coefficients). The curious thing happens when you think of h as just an indeterminate and you evaluate it, for instance, at i s, where i =sqrt(-1) and s is a tiny number. Then

    f(x + is) = f(x) + f'(x) is + f''(x) (-s^2)/2 + ...
Just looking at the imaginary part gives you:

    Im(f(x+is))/s = f'(x) + O(s^2).
This means you can compute the derivative with an O(s^2) error just by evaluating at a complex number. The only thing needed was that all operations are implemented not just for real numbers but complex numbers. Instead of the R-algebra R[i] = C, why not try to use the R-algebra R[ε] and evaluate at ε, where ε is a symbol with ε^2 = 0? Remember, i is also just a symbol with the property i^2 = -1!!!

    f(x + ε) = f(x) + f'(x) ε + f''(x) ε^2/2 + ...
Since 0 = ε^2 = ε^3 = ..., all higher order terms vanish and you get

    f'(x) = coefficient of ε in f(x + ε).
(Compare with the complex numbers: Im = "coefficient of i" but this time around, there is no error)

Everything that you need is to know how to implement arithmetic operations for numbers in R[ε], e.g.

    (a+b ε) + (c + d ε) = (a+c) + (b+d) ε
    (a+b ε) (c + d ε) = ac + (ad + bc) ε + bd ε^2 = ac + (ad + bc) ε
A problem occurs when you try to divide by ε. This is simply undefined in R[ε], which, unlike C is not a field. But not all is lost, suppose you want to divide (a + b ε) by (c + d ε), where c is not 0, then

    (a+b ε) / (c + d ε) = (a + b ε) (c - d ε) / (c^2 + (-cd + cd) ε) = something with ε in the numerator / c^2,
That is, division by ε only occurs when you divide by 0 in the first place.

To recapitulate: If you have a class DualNumber with overloaded +, -, * , /, ^, you can find the derivative of, say, the fourth-order approximation of e^x at x = 0.5, by computing

    DualNumber x = DualNumber(0.5, 1);
    DualNumber approx = 1 + x + x^2/2 + x^3/6 + x^4/24;
    cout << approx.EpsCoeff() << endl;
(Sorry if this not a good explanation but I've spent too much time on it :P)
Re:The category design pattern on Sunday November 08, 2015 @10:22AM (#10528694)
> Yeah, generic design pattern which is minimal, compact and simple.

A good argument for monads. Much better than the dishonest appeal to mathematics.

Re:The category design pattern on Sunday November 08, 2015 @09:12AM (#10528511)
It's useful because it's a generic design pattern not because of the mathematics behind it (of which virtually nothing is actually used, at least in everyday programming).
Re:The category design pattern on Sunday November 08, 2015 @07:11AM (#10528290)
But just using the definitions is cargo cult and using abstractions for the sake of using abstractions is not necessarily good mathematics. Currently it looks like "use this design pattern because mathematics".
Re:What Refugees Bring When They Run for Their Lives on Wednesday September 16, 2015 @03:19AM (#10225131)
>Like unless they have families that they're hoping to have evacuated (why didn't they bring them over in the first place?),

The reasons I've gathered so far are: The journey is dangerous not just because of the risk of drowning. If I recall correctly, there were stories of rape. There's also a law for family reunification (I don't know the details but at least in the case of minors this means they can bring their family). Lastly, many young Syrian men flee because they could be conscripted by the army.

>I don't know how the Europeans intend to get all of these refugee adults up to economic snuff at the same grade of Europeans who were trained in the ways of the West from birth.

I don't think we know either.

Re:Ask HN: What would you want in an ideal web browser? on Monday August 17, 2015 @05:32AM (#10072032)
Should work on an Atom 270 netbook without lagging. Currently I have to use either dillo or Opera 12.something.

Older »