HNHacker News
TopNewBestAskShowJobs

jpfr

1,706 karma · joined March 5, 2014

submissionscomments
jpfr··on Nonlinearsolve.jl: Fast and Robust Solvers for Nonlinear Equations in Julia
This article is about “solving” differential equations and not convex optimization.
jpfr··on Redis adopts dual source-available licensing
> 3 clause BSD gives everyone permission to use it in new works that are made available using license terms of one’s own choosing, so long as the obligations of those 3 clauses continue to be met.

But what I get from this is: The project switched away from 3 clause BSD to something that is less permissive.

jpfr··on Redis adopts dual source-available licensing
And this is why it is a bad idea for open source contributors to transfer their copyright.

If hundreds of commits are baked into a software - under an open source license but without the full copyright transferred to a central legal entity - then it becomes impossible to change the license post-hoc.

jpfr··on What Cannot be Skipped About the Skiplist
The address is scrambled (similar to a random-number generator) to produce the rank. So consecutive locations do not hurt performance.
jpfr··on What Cannot be Skipped About the Skiplist
Zip trees are great!

For a project I made a version that uses the memory location of the entries to construct the (random) rank on the fly.

So it’s a binary tree structure that requires the same memory as a linked list (two pointers) only!

https://github.com/open62541/open62541/blob/master/deps/zipt...

jpfr··on Python 3.13 Gets a JIT
The commit history looks pretty active...

https://github.com/LuaJIT/LuaJIT/commits/v2.1/

jpfr··on NY Times copyright suit wants OpenAI to delete all GPT instances
AFAIK the IP deal with Microsoft only covers development before AGI.

So at any point OpenAI could declare that a sufficient degree of AGI has been achieved and thus return to its philanthropic mission. With GPLed models and all.

However, at this point the employees expect a multi-million cash-out for each of them. So the philanthropic mission seems to be gone out the window.

And probably that’s also the way Sam Altman got back into the CEO role. By maximizing the expected eventual cash-out for the employees which threatened to leave otherwise.

jpfr··on MISRA C
Imagine how much worse the code would have been without all those rules.

If people don’t have taste, no rules will get you to good code. Only a bit less worse / better predictable behavior.

jpfr··on The bash book to rule them all
I think the question assumed that you can run go in a script-language mode. Because you do want the source of shell-scripts on the local machine.

So it is easy to make changes by system admins/non-developers. Scripting is for glue functionality after all…

jpfr··on MISRA C
The recent 2023 version of MISRA C costs just a few pound as PDF. So I got it from $WORK. I don't have a lot of experience with the previous versions. But the 2023 version reads quite okay.

It is not possible to mandate "though shall write good code" because it is not at all clear what that means. Instead they needed to come up with rules that can be checked with automated tools.

The rules are classified as mandatory, required or advisory. Only the mandatory rules cannot be overridden by explicit documentation. As an example, "The goto statement SHOULD not be used" is an advisory rule. Given the bad bad spaghetti code that beginner programmers produce with goto, this is quite reasonable. Even though some code is definitely better with goto. For example to jump to some cleanup before returning.

Similarly, "A function SHOULD have a single point of exit at the end" is an advisory rule only. The rationale for the rule stated in the standard is the following (slightly rephrased):

1. A single point of exit for a function is required by the IEC 61508 and ISO 26262 standards as part of the requirements for a modular approach. 2. Early returns may lead to the unintentional omission of function termination code. 3. If a function has exit points interspersed with statements that produce persistent side effects, it is not easy to determine which side effects will occur when the function is executed.

I'm also a big advocate for early return. But the points from the rationale are valid. And I don't have a good alternative rule that achieves the same goal and is checkable with automated tools...

jpfr··on milliForth
Well, he surely isn't doing it for the money.

The Moore Microprocessor Patent Portfolio was very lucrative. Eventually it ended up with a patent marketer. Nearly everyone doing processors had to buy in.

And as the inventor Chuck got his share out of it...

https://web.archive.org/web/20071226155608/http://www.linuxe...

jpfr··on A linear algebra trick for computing Fibonacci numbers fast
Yes! This is close the explanation I first encountered in Hubbard & Hubbard. One of the nicest math textbooks and going from zero up to differential forms.

https://matrixeditions.com/5thUnifiedApproach.html

jpfr··on A linear algebra trick for computing Fibonacci numbers fast
There are "bignum" implementations for every language. Though I never tested the performance impact on closed-form Fibonacci when a defined double precision >64bit is used.

https://gmplib.org/

Your code has an accidentally quadratic runtime (instead of linear). Since the array is appended to, the code regularly increases the memory region and has to move all the previous data over.

You could pre-allocate the memory as n is known ahead. Also you don't need all that memory. You only need to store the last two entries.

jpfr··on Berlin's famed nightclubs, losing customers, face an uncertain future
Well, you can also be a "tourist" as a German visiting Berlin. And be treated as such.

I think speaking English in itself was never a problem to get in. But of course the tourist vibes get stronger if the person doesn't know the "definition of cool" that is expected and appreciated in that particular club.

Take this example [1] of a tourist they probably let in by accident and regretted it. :)

[1] https://www.youtube.com/watch?v=cy9GregPIA4

jpfr··on Heat pumps can't take the cold? Nordics debunk the myth
We pay 12 cent/kWh in France. Still a lot.
jpfr··on Heat pumps can't take the cold? Nordics debunk the myth
I have a heat pump that used 200 kWh of electricity in a single day! Granted, it was the coldest day of the winter.

Is your house especially insulated to get that low?

jpfr··on 500 Lines or Less (2016)
Totally love the quest for elegant and minimal implementations. But I don't think line-counts are comparable across languages. The APL/K crowd has a very different opinion on the number of statements per line.

To give an impression of the style, this is the C-implementation of a K interpreter. Have fun deciphering that.

https://codeberg.org/ngn/k/src/branch/master/a.c

jpfr··on Overthewire.org
Nice. I recall there were .txt files in the filesystem where you could leave your name and a shoutout after completing a level. Mostly „Kilroy was here“ equivalents. But it felt oh so 1337 hacker to add yourself. Quite the motivation boost for a teenager. :-)

Also see https://microcorruption.com. You don’t need Linux-specific knowledge. It directly goes to MSP430 assembly. A nice and compact introduction to exploiting binaries and embedded systems.

jpfr··on 100 years of Le Corbusier: what does he mean to today’s architects?
I had the chance to visit „La Cite Radieuse“ in Marseille. All these years later it is still more stylish and … dare I say it … comfortable than all the apartment high-rises surrounding it.

He designed it as a village inside a single building. And the apartments are still sought-after.

jpfr··on The Matrix Cookbook (2012) [pdf]
You don‘t get funny points on technical topics. HN ain’t Reddit. ;-)
jpfr··on Show HN: RISC-V core written in 600 lines of C89
MSVC did a big rewrite of the C frontend around MSVC2013. I haven’t encountered C99 idioms that don’t work nowadays. Granted, I might not use every feature in my typical coding style…
jpfr··on Implementing Cosine in C from Scratch (2020)
The Taylor expansion locally fits a polynom based on the n first derivatives. If you want to find the "best" nth-degree polynom to approximate the sine function, functional analysis gives the tools for solving that optimization in closed form.

By selecting an appropriate norm (in function space) you can minimize either the maximum error or the error integral over some range (e.g. the 0-\pi range).

Here's a video on the subject. You might want to watch earlier ones also for more context.

https://www.youtube.com/watch?v=tMlKZZf2Kac&list=PLdkTDauaUn...

Full disclosure, this is my university lecture on optimization that was recorded during Covid.

jpfr··on 12-Year-Old to Graduate from College with Five Degrees
This is because you are measuring the entire cohort/generation of students.

Germany splits students into highschool (called Gymnasium, the academic track) and the vocational tracks at age 10.

Smart-kid highschool in Germany definitely moves faster than US highschools. Some even teach Greek and Latin for a well-rounded humanist education.

jpfr··on Kchat: Persistent group chat in <50 lines using kdb+/k/q web sockets, JavaScript
k and q are array languages in the APL tradition. APL is one the "ur programming languges". https://madhadron.com/programming/seven_ur_languages.html

Here's an open source implementation of k: https://codeberg.org/ngn/k/

kdb is a time-series database with deep integration to k. It is famously used in the financial industry.

jpfr··on Caravaggio Lost at Sea (2022)
The ArtHoles episodes on Caravaggio are likewise superb.

If you can stomach the bro-style presentation. The author conveys a much better picture on the circumstances at the time than typically dry textbooks or historical accounts.

https://artholes.podbean.com/e/caravaggio-ep-1-but-firsta-ta...

jpfr··on Writing a Simple Garbage Collector in C (2014)
Nice and tight.

For comparison, this is the malloc/free implementation of the original UNIX. Also nice and tight C code.

https://warsus.github.io/lions-/all.html#line2522

Although this isn’t very efficient for today’s memory sizes.

jpfr··on My Journey from R to Julia
So the 2 year old post by Jeff on discourse says that breaking changes would have to go into an eventual 2.0.

Whereas in the 6 month old keynote the same Jeff says there is no plan for breaking changes and hence no 2.0 is planned.

So Julia will remain stable. And maybe we get interfaces (or rather traits) at some point in the 1.x release family.

jpfr··on My Journey from R to Julia
I'm surpised. At JuliaCon ~6 months ago the message was that no 2.0 is in the works [1]. I.e. no backwards-incompatible changes to the language.

I checked the usual places and did not find any information on 2.0 and an interface mechanism. Do you have a pointer?

[1] https://youtu.be/N4h46_TCmGc?t=1656

jpfr··on DragonFlyBSD's HAMMER2 File-System Being Ported to NetBSD
Linus Torvalds says that the RCU mechanism in the kernel making filesystem access lockless is one of the greatest achievements in Linux.
jpfr··on Algebra, Topology, Differential Calculus, and Optimization Theory [pdf]
Shameless plug: I hold a lecture on "Optimization Methods for Machine Learning" that goes deep into convex optimization.

Video recordings from the corona period (+ slides) are available here: https://www.youtube.com/playlist?list=PLdkTDauaUnQpzuOCZyUUZ...

← PreviousPage 2 of 11Next →