HNHacker News
TopNewBestAskShowJobs

jpfr

1,707 karma · joined March 5, 2014

submissionscomments
jpfr··on New IPython release drops Python 2.7 support

   forcing pretty much all computation no matter how trivial
   into contortions via numpy incantations so that the inner
   loops can run in native extensions
That's actually a big plus in my book.

Welcome to the development of Matlab-style code. It can be pretty disheartening to see a complicated hand-crafted algorithm replaced by, say, a matrix multiplication. Try to find Matlab/numpy implementations from paper authors. This programming style is a bit difficult to get used to initially. But it will become incredibly powerful as you start thinking in algebraic operations.

Also, don't do debug runs on the full data. Implement ideas with a subset that computes fast. Then simplify the code and make it fast. Then run it on the full dataset.

If you absolutely need to combine linear algebra operations with fast imperative code, have a go at the Julia language [1] or use a C++ library like Eigen [2] or Armadillo [3].

[1] https://julialang.org/

[2] http://eigen.tuxfamily.org/index.php?title=Main_Page

[3] http://arma.sourceforge.net/

jpfr··on I Stopped Attending Programming Meet-ups
You need to ask why the organizers of the Meetup are doing it. If they are corporates, of course they will plug their products. That's the sole reason for them to invest their time. With this in mind, one can easily distinguish between good and bad meetups before attending.

This post is not helpful for those who genuinely try to build a community in their domain. Also, a good talk compresses many days of reading and a-ha moments into one hour. It's just a lot of work to prepare a good talk.

Background: I'm one of the organizers of a machine learning meetup in my area. We (organizers) are PhD students, so building a strong and connected ML community in our surrounding is an intrinsic motivation. We decided not to affiliate ourselves with a company. Otherwise our quality control for talks would inevitably be overruled at some point.

jpfr··on Blockchain: A Better Way to Track Pork Chops, Bonds, Bad Peanut Butter?
> Fwiw JP Morgan tried to create a global supply chain database back in the 80s but it never took off.

Interesting. Do you have some pointers for more information on these efforts?

jpfr··on Ode to a Vyukov Queue
Aah. Sorry. The non-intrusive version is different substantially and corresponds to the code shown in the post.

http://www.1024cores.net/home/lock-free-algorithms/queues/no...

jpfr··on Ode to a Vyukov Queue
That looks like a dangerous misrepresentation.

The original implementation is a bit more involved [1]. Here, the stub entry is not considered at all during the pop.

[1] http://www.1024cores.net/home/lock-free-algorithms/queues/in...

jpfr··on Google’s not-so-secret new OS
Driver support should not be a problem for Google. They can reuse existing drivers with a rump kernel approach [1].

And on mobile devices, many hardware component vendors provide custom drivers (with binary blobs) anyways. It will not be hard to convince them to support Fuchsia for new hardware releases. If they loose access to Android otherwise...

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

jpfr··on Industrial-IOT: Introduction to MODBUS protocol
Hey Kevin, It's a small world, apparently. :)
jpfr··on Industrial-IOT: Introduction to MODBUS protocol
Why use modbus, a protocol that is nothing more than remote access to a bitfield, when you can have OPC UA, a semantic object-database with an (encrypted) meta-object protocol for remote access and real-time notifications.

If you look at the offerings of GE, Siemens, and the like, all signs point towards OPC UA as the TCP based protocol for industry that everybody agrees to use.

jpfr··on Ask HN: What's the best computer science book you've read recently?
The source code and commentary of xv6, a simple Unix-like teaching operating system. By far the best book on operating systems I have encountered so far.

https://pdos.csail.mit.edu/6.828/2012/xv6.html

(The alternative is learning PDP-11 assembler and reading the original Unix v6 sources with Lion's commentary.)

jpfr··on The Crimes of SEAL Team 6
I am sorry if you feel your friend was offended.

I did not say all members of elite military units are psychopaths. Some are.

And after all I've seen, the concentration seems higher in those military units than in the general population. We are talking percentages here.

jpfr··on The Crimes of SEAL Team 6
The article basically says that some members of elite military units are psychopaths and acting as such.

How ... unsurprising, given their choice of occupation.

jpfr··on The fourth industrial revolution: a primer on Artificial Intelligence
Nothing new to discover here.

Bits of AI history and the current state. But no current or future applications of AI in industry.

The guy who discovers the first killer application in the space will be rich and famous. Until then, most efforts will go the way of scheduling theory.

Theoretical results are nice. But 90% of effort for building applications goes into domain and project specific details. So every new client project is starting nearly from scratch.

This is a consultant project-business. Not a startup product-with-market-fitness business.

jpfr··on LuaJIT: New Garbage Collector (2012)
Still committing regularly to the 2.1 branch.

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

jpfr··on A love letter to s7 Scheme
That's not difficult at all. You can just say

    env['f'] = myfunc
and the function will be available as f within the environment.
jpfr··on A love letter to s7 Scheme
Assuming f is a function, just do

            local env = {}
            env['args'] = {...}
            setfenv(f, env)
            return f()
jpfr··on Fast Fibonacci Algorithms (2015)
Constant time fibonacci is derived as an example for linear basis change in the superb book "Vector Calculus, Linear Algebra, and Differential Forms: A Unified Approach".

It's all contained in the sample pages http://matrixeditions.com/VC5.Chap2.219-221.pdf

However, even though the formula is O(1), the runtime of the algorithm might be larger.

Simply because a standard 64bit integer might be too small. And the BigNum implementation needs more time to multiply all the bits.

jpfr··on Oliver Hart and Bengt Holmstrom Win Nobel in Economics for Work on Contracts
The Nobel price for economics was awared to quite a few mathematicians.

Leonid Kantorovich won it for applying his results in Operations Research [1] to planning the Russian economy.

John Nash won it for .. of course .. Game Theory.

[1] He proved criteria for the convergence of the Newton Method and quite a bit more. Those results are applied really everywhere nowadays.

jpfr··on The Julia Programming Language for Number Crunching
Optionally. OpenBLAS and LAPACK are the default.

See here: https://github.com/JuliaLang/julia

  OpenBLAS — fast, open, and maintained basic linear algebra subprograms (BLAS) library, based on Kazushige Goto's famous GotoBLAS.

  LAPACK (>= 3.5) — library of linear algebra routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems.

  MKL (optional) – OpenBLAS and LAPACK may be replaced by Intel's MKL library
jpfr··on The Julia Programming Language for Number Crunching
Julia and Matlab use the same (Fortran-based) linear algebra codes in the background.

I think it is great to see that a port of the Fortran code in Julia is nearly as fast as the Fortran code itself. So you can take Julia and write concise Matlab-style code (vectorized everywhere) or write imperative code (loops everywhere) and be equally fast.

Note that the graphs in the post are biased. The Fortran version uses a different algorithm for the solver.

Edit: The Matlab code is highly obfuscated. That is not good for the sake of comparison.

https://github.com/precisesimulation/julia-matlab-fortran-fe...

jpfr··on Project Cybersyn: Socialism Through Cybernetics
The book Red Plenty [1] is about why centralized planning didn't work in the USSR. It is not a very technical book. But it shows quite well the reasons why central planning of an economy does not work.

Cybersyn is basically the same thing. Only that it got wrapped in control theory and less in operations research (optimization theory).

[1] https://www.theguardian.com/books/2010/aug/08/red-plenty-fra...

jpfr··on An Introduction to Machine Learning in Julia
Julia has a lot of room for improvements. For example with better type inference (programs get slooow when the type cannot be inferred, they are working on it) and stack-allocation of arrays.

Currently, all arrays require a malloc. Once the JIT-compiler is sufficiently smart, Julia could use stack-allocation of temporary arrays (that cannot escape the current context). Algorithms making use of temporary arrays will become faster by possibly an order of magnitude.

Julia might become competitive with C / Fortran for general purpose computing. And that is a level of speed all your other examples cannot hope to reach.

jpfr··on Germany Says No Bailouts for Deutsche Bank or Any Other Struggling Lenders
Different from 2008, we now know the ramifications of a failing bank pretty well. The EU is conducting yearly stress tests to that effect. [1]

We now see the effect of this new knowledge about a previously opaque sector. Politicians and buraucrats are not as afraid any more. So banks cannot get away by having the tax-payer carry their risk.

[1] http://www.eba.europa.eu/risk-analysis-and-data/eu-wide-stre...

jpfr··on TTIP trade deal could be re-launched under a different name, say EU ministers
An optimist might read that to mean "Europeans found out that trade deals can be a lot better than what TTIP offered. Such as CETA which the EU is about to close with Canada".
jpfr··on Epsilon Programmer's Editor
The idea of GuileEmacs is not to move away from the elisp language. The idea is to use an elisp implementation based on the Guile virtual machine.

Elisp will not go away. So any arguments for lisp and against scheme are void in this context.

jpfr··on FemtoEmacs: Tiny Emacs clone with configuration in FemtoLisp
Lua has great support for cross-compiling. It is written in the subset of features available in both (ANSI and more recent) C and C++.

https://www.lua.org/manual/5.2/manual.html

jpfr··on Unexecute
> Guile Emacs is dead, isn't it?

Emacs-guile is working today. That's a first after many many years of talk and proof-of-concept stage efforts.

I hope the development will pick up speed once guile 2.2 and emacs 25.1 are out. Both projects underwent some big changes/improvements lately.

One sign of live is that bpt's improvements to guile elisp were rebased on a recentish guile-master. This branch lives in the main repository now.

http://git.savannah.gnu.org/cgit/guile.git/log/?h=wip-elisp

Also, I have seen some recent commits from emacs developers to guile. So the two projects are talking to each other.

Now, imho, the success if emacs-guile strongly depends on whether they manage to share the load across several developers. A more open development culture surely would help.

jpfr··on A Scenario Where Brexit Does Not Actually Happen
http://www.tradingeconomics.com/united-kingdom/balance-of-tr...

See the trade-deficit of +3 billion bounds every month? Britain is bleeding dry. And now the money won't "stay in the family".

jpfr··on UK votes to leave EU
You're talking cars.

The EU is talking survival. The UK will get indeed a bad deal. And the rest of the EU will stick together even closer. I hear "fiscal harmonization", e.g. common taxation is the new big thing.

jpfr··on OpenJDK source code (C++) check by PVS-Studio tool
http://clang-analyzer.llvm.org/

http://cppcheck.sourceforge.net/

jpfr··on “Gtk 4.0 is not Gtk 4”
The post says that gtk4 will be API stable after ~18 months of minor releases.

It all boils down to naming conventions. Dot-zero is the new beta...

← PreviousPage 8 of 11Next →