HNHacker News
TopNewBestAskShowJobs

vbarrielle

258 karma · joined December 7, 2016

submissionscomments
vbarrielle··on Again on 0-based vs. 1-based indexing
Indeed, months are 1 based, but it's never been a problem to eg compute which month it will be, say 9 months later: just sum and subtract 12, no need for a real modulo computation. It's probable I've never found it annoying because I don't need to perform this computation with more than 12 months.
vbarrielle··on Again on 0-based vs. 1-based indexing
> Our time counting is 1-based.

Not in every part in the world. Here in France, we use 24h time, and midnight is 00:00. Very convenient.

vbarrielle··on The values of Emacs, the Neovim revolution, and the VSCode gorilla
For vim users fugitive is a very good plugin that does at least some of these (I'm not using it to the full extent of its capacity so I cannot be sure).
vbarrielle··on I Bought Apple Silicon
Which browser are you using? I've got no issue with around 50 tabs in Firefox in a similar laptop. But maybe I don't visit the same memory heavy websites.

It's usually gcc that eats up all my memory, turns out with template metaprogramming a single gcc instance can eat 3GB of RAM, and I usually build with 6 parallel instances. Thankfully I've got plentiful SSD-backed swap so I don't feel the system becoming too unresponsive.

vbarrielle··on I Bought Apple Silicon
The unified memory actually means more RAM usage as textures that would only exist in the GPU RAM now have to live in the unified RAM. Unified memory is a great performance improvement but I don't think it translates into lower RAM usage.
vbarrielle··on Rust 1.48
Agreed, I find per-parameter docs useful in dynamic languages such as python, or to a lesser extent useful when the type system is weaker (in C), but in Rust I seldom find them useful. This can be useful to express constraints not present in the type system, for instance `fn matmul(a: Matrix<f64>, b: Matrix<f64>) -> Matrix<f64>` will benefit from a documentation describing the constraints and guarantees on the number of rows and cols of each matrix, since this cannot be expressed in the type system (yet).
vbarrielle··on The case for a learned sorting algorithm
This paper does not look like a strong paper, in particular it's very terse when describing the way the neural network is trained, which fails to convince that they did not train the neural network model on the sorted input. They are also not clear on their timings, it's not sure they include the training time in their benchmarks. For these reasons, it does not look very reproducible, and there's no obligation to cite non-reproducible work.
vbarrielle··on C++ the Good Parts (2014)
Haskell typeclasses are quite close to Rust traits, does Haskell count as OOP then?
vbarrielle··on Physicists argue that black holes from the Big Bang could be the dark matter
I suppose it has to do with the Schwarzschild radius of such a black hole being really small, I guess it would be something like 10^-8m according to https://en.wikipedia.org/wiki/Schwarzschild_radius which means almost nothing would fall inside its event horizon, and it probably would not collide with anything.

However, the gravitational pull of an asteroid would not be negligible, so I guess it would have a big impact pulling things towards it.

vbarrielle··on Embedded PDF viewer in Firefox 81 supports filling forms
Tried it a few months ago, it works.
vbarrielle··on I/O library 6x faster than fmt, 10x faster than stdio.h and iostream
You're completely right, I had forgotten about constructive geometry. Thanks for pointing it out!
vbarrielle··on I/O library 6x faster than fmt, 10x faster than stdio.h and iostream
This representation is useful to reason about products in general, but I don't see how it can be used to compute a specific product.
vbarrielle··on T5: The Text-to-Text Transfer Transformer
I missed that ellipsis cue, thanks for pointing it out. The complete excerpt is not in the complete paper though, but it's probably in their released data.
vbarrielle··on T5: The Text-to-Text Transfer Transformer
The example figure has a weird entry for the summary task. The input is:

"summarize: state authorities dispatched emergency crews tuesday to survey the damage after an onslaught of severe weather in mississippi..."

And the output is:

"six people hospitalized after a storm in attala county."

That's quite a bad summary, no mention of "six" people in the original text, no mention of hospitalization. And "attala" county is too specific, a precision not present in the original text.

If that's the result of their model, that's not good. If it's coming from the training set, it's an even bigger problem. I guess it's the result of the model, because some issues can be explained by correlations ("emergency" correlates with "hospital", "mississipi" correlates with "attala").

I'm wondering why they chose this example for the flagship figure of their paper.

vbarrielle··on Is Nuclear Power Globally Scalable? (2011)
In France 75% of our electricity is produced with nuclear power, and we're able to dynamically change its power to follow demand (though we also use hydro power plants to deal with shorter term variations). And we have one of the cheapet electricity in Europe.

Unfortunately that is changing, because governments want to reduce the share of nuclear down to 50%. But that's a political choice and not a technical limitation.

vbarrielle··on Making Python Programs Blazingly Fast
> The laziest profiler is to interrupt your program with ^C. If you do this twice and get the same stack trace, it's a good bet that's where your hotspot is.

I do that sometimes, but it has some pitfalls. If most of the time is spent inside a C module (for instance in numpy), then the interrupt won't be caught before the C module is exited, which can lead to a wrong stacktrace.

vbarrielle··on Comparing Parallel Rust and C++
The very popular C++ linear algebra library Eigen has bounds checking for matrices by default, but you can turn them off when defining NDEBUG. This means most out of bounds accesses are found during development.
vbarrielle··on Why Isn't Functional Programming the Norm? [video]
Not exactly shaders, but for GPGPU stuff, futhark [0] seems to show that a functional paradigm can be very good to produce performant and readable code.

[0] https://futhark-lang.org/index.html

vbarrielle··on Beating Decades of Optimized C with 80 Lines of Haskell
I setup it on my computer, used it to count the lines of 250 files, it is indeed faster than my system's (ubuntu 18.04) wc, but it doesn't compute the total. I don't think this should change the timings much though.

A best of five run of the system's wc takes 0.042s, vs 0.028s for the OCaml version.

vbarrielle··on Beating Decades of Optimized C with 80 Lines of Haskell
While I wouldn't be surpised that OCaml is fast, I'd like to be sure your disk cache was warm in both cases. I'd test it myself, but I don't have OCaml setup on my work computer.
vbarrielle··on Python vs. Rust for Neural Networks
There's a research language that supports compile-time checking of array dimensions: futhark [1]. It's an interesting language that compiles to CUDA or OpenCL. However it's probably not ready for production (not sure if there's even good linear algebra implementations yet). It does feature interesting optimizations to account for the possible size ranges of the arrays (the development blog is very instructive in that respect).

[1] https://futhark-lang.org/

vbarrielle··on Random Forest vs. Neural Network
Random forests can be applied to images. The RF algorithm only needs to be tweaked to split its trees by comparing the difference of two pixels to a threshold.
vbarrielle··on TaiChi: Open-source computer graphics library
Physics simulation is a very active computer graphics research topic (see e.g. the SIGGRAPH conference). The goal in computer graphics research will not be to have an exact result, but to have a visually plausible (and pleasing) result as fast as possible.
vbarrielle··on For Better Computing, Liberate CPUs from Garbage Collection
> Preallocate and pool what you might need, don't call new in your tight loop.

This piece of advice is also valid in languages without GC. In C++ it's well known one should avoid allocating memory in tight loops, and it's strongly advised to call e.g. `reserve` on vectors to avoid allocating.

vbarrielle··on Creating LFortran, an interactive Fortran compiler built on top of LLVM
The abstractions inside Eigen are there to enable powerful compile time optimisations, such as compiling the addition of three vectors `Eigen::VectorXf x = a + b + c;` in a single loop instead of naively allocating a temporary to evaluate `Eigen::VectorXf tmp = b + c;` then evaluating `Eigen::VectorXf x = a + tmp;`.

This logic is omnipresent in Eigen and is crucial to its performance. It is also used to have specialized versions of some decompositions when the matrix's size is known at compile time.

vbarrielle··on Git implemented in Rust
Rust can be compiled without glibc, by statically linking to musl, but it looks like it's still experimental as the only distribution of it is on the nightly channel: https://static.rust-lang.org/dist/rust-nightly-x86_64-unknow...
vbarrielle··on LHCb discovers matter-antimatter asymmetry in charm quarks
In french "un billion" is 10^12.
vbarrielle··on Backpropogation Is Just Steepest Descent with Automatic Differentiation (2013)
You can get closer to second order if your error is a sum of squares of the form 0.5 * f^T * f, in which case you case compute the jacobian J of the fitness f, and approximate your hessian as J^T * J. That's the Gauss-Newton method and it's very effective if a linear approximation of f holds locally.

That's an approximation but that's arguably a second order method, since it acknowledges the nonlinearity coming from the squared norm of f.

vbarrielle··on Backpropogation Is Just Steepest Descent with Automatic Differentiation (2013)
That theorem only implies global convergence for convex or pseudoconvex functions. For a generic function it only guarantees convergence to a local minimum.
vbarrielle··on Backpropogation Is Just Steepest Descent with Automatic Differentiation (2013)
No his bowl is convex, so it cannot be a saddle point, which are points where there is both a positive curvature and a negative curvature.
← PreviousPage 4 of 5Next →