HNHacker News
TopNewBestAskShowJobs

plafl

652 karma · joined May 10, 2012

https://plopezadeva.com/
submissionscomments
plafl··on Why We Use Julia, 10 Years Later
Julia, because fast can be beautiful. I don't know how much it's going to grow but it doesn't look like stalling in the near future. The reason is simple: it fulfills a need no other language does.

I would guess there are some possibilities that could be a menace:

1. Someone manages to convince scientists to use a statically typed language.

2. Computing paradigm changes drastically. Everyone moves to quantum computing or similar.

3. In another 10 years someone learns from the lessons of Julia and improves on them to make a much better language.

plafl··on Why We Use Julia, 10 Years Later
I don't know why you cannot "overwrite" existing structs but to be fair whatever system you use to program in a stateful manner in the REPL will have some problems.

Just hit this one: after rewriting a function I don't see any change in behavior. Reason: I overwrote the function but the more specialized one was being called.

But there are plenty more. After some time it's just better to nuke the REPL and start clean. That said, I love programming in the REPL.

plafl··on Why We Use Julia, 10 Years Later
All valid complaints. Regarding the first one, redefining structs, you can wrap them inside modules and reload the module. It's not as ergonomic since you will need to qualify the structs with the module name.
plafl··on YSFlight – A free flight simulator where anything is possible
My mind exploded. I played that game on my first computer, a 286. I think it was the first game I owned, it came in a pack with Silent Hunter I think, maybe Panzer General and another game I don't remember...
plafl··on Meta Unveils New AI Supercomputer
There may be some possibilities. I'm not sure if it counts as AI but nevertheless a nice video:

https://m.youtube.com/watch?v=BTETsm79D3A

There is never enough compute power. Dwarf Fortress on a supercomputer?

plafl··on How to make Lisp go faster than C (2006) [pdf]
AFAIK, not since 1999:

https://en.m.wikipedia.org/wiki/Restrict

But yes, Fortran can be as fast, although I'm not sure compilers are given the same love as in C

plafl··on Kazushige Goto, a patent clerk who became one of the best assembly optimisers
Different people have different ideas of the meaning of "understanding". Take simple concepts like "time" and ask a physicist.
plafl··on How to make Lisp go faster than C (2006) [pdf]
It's great to be able to use an expressive language and to go low level and/or verbose to extract every bit of performance on hot code. I have written some amount of numerical code in C and it's not unusual to first prototype in Matlab, Python or whatever for the productivity gains and rewrite later in C (nowadays I'm using Julia and so far it's great) . That being said, the only way for language X to be faster than C is to not try very hard optimizing the C implementation.
plafl··on Novel flight style and light wings boost flight performance of tiny beetles
There are several videos at the end of the article under section Supplementary Information, for example:

https://static-content.springer.com/esm/art%3A10.1038%2Fs415...

plafl··on Nerd-dictation, hackable speech to text on Linux
It is a matter of time someone puts a dictation mode together. Given the design of Emacs key combinations you will be able (required) to use also rythm and tone.
plafl··on The λ-Cube
It's a good question. Intrinsically, there is no difference: you need to consider how both pieces of data are used. Consider these two "equivalent" 1D arrays:

  x = Vector{Float64}(1, 2, 3)
  y = SVector{3, Float64}(1, 2, 3)
Both store the same data, and as a matter of fact you probably can pass them as arguments to most functions that accept arrays (if the functions are well designed). The difference however is that `y` has a more restricted interface: you cannot resize `y`. This restriction allows the compiler to optimize better the code both in time and space: dynamic arrays for example may allocate more memory than strictly necessary to speed up resizing and may do more bounds checks. In an ideal world should also catch bugs like detecting that `y[4]` is an error. So, to summarize, when you use `y` instead of `x` you are telling the computer that `length(y) = 3` is an invariant of your code and that it's safe to make that assumption. Having the number "3" stored as a type has an special meaning.

Off tangent, but these reminds me the first time I read the phrase "everything in Python is an object". That got me puzzled because in my mind if "everything is an object" then the phrase has zero information content. You cannot understand what is an object in isolation, you need to consider how the interpreter uses them. Or the first time you try understand what is a vector in mathematics. You cannot understand a vector in isolation, you need to consider the vector space it lives in, what operations are allowed.

plafl··on The λ-Cube
Also not an expert, or even educated on it.

In the case of Julia for example static arrays can be created, at runtime or not, with a fixed length that is part of the type definition, to give a less trivial example than "is an instance of". It's actually a very practical example as static arrays are of great importance for performance on certain applications.

I think most people would dismiss dynamic language examples, and that's the reason I comment Julia is dynamic in my comment, because most people interested in types are interested in using them at compile time to prove, or strengthen at least, correctness. In the case of dynamic languages types feel like just another piece of metadata and if you have "eval" available you basically can do anything. Julia actually does not use types to catch bugs but to structure programs and to improve performance when possible (to great extent).

plafl··on In defense of flat earthers (2020)
I agree completely with the article.

It is actually a very natural thing to believe and when all we have are beliefs some people are simply wired to distrust consensus. I think having outliers is a survival strategy as a species, although it usually goes wrong against the individuals.

plafl··on Ask HN: Solving problems by mapping to other problems that we know how to solve
A pointer into what you are looking for may be duality:

https://en.m.wikipedia.org/wiki/Duality_(mathematics)

For example, in geometry, there is an equivalence between Voronoi diagrams, Delanauy triangulation, convex hulls and plane intersections. This is of very practical importance (for me at least!) because you can reuse non trivial algorithm/libraries that solve one problem to solve the other. Duality is also very important in optimization, where you transform a problem, the primal, into it's dual and solve one or both of them simultaneously.

I have not found a lot of info in "pure" duality, it's a meta-concept present in a lot of different mathematical areas but I'm sure there must be mathematicians looking at it

plafl··on Why isn't there a universal data format for résumés?
I think resistance to algorithms is about failure modes. If an algorithm becomes standard and you are an edge case then you are in trouble, much the same way you are in trouble today with companies that have automated customer support and make it hard to contact a human being. Losing your email account is annoying but not being able to have a job is worse. Automated systems are designed to avoid mistakes but are bad at correcting mistakes. I would argue that even with humans involved the hiring process is harder to some people, even discounting bias, just because it is more or less standard but at least they have hope in the variance that remains.
plafl··on SmallTalkUnix
I think there was a time where the GNU Smalltalk page contained the phrase "The Smalltalk for those who can type"
plafl··on The λ-Cube
If I understood the article correctly the four type of functions are present in Julia:

  julia> factorial(3) # term -> term
  6
  julia> typeof(3)  # term -> type
  Int64
  julia> one(Float32) # type -> term
  1.0f0
  julia> Vector{Float32} # type -> type
  Vector{Float32} (alias for Array{Float32, 1})
And actually more mixed:

  julia> using StaticArrays
  julia> SVector{3, Float32}(1, 2, 3)
  3-element SVector{3, Float32} with indices SOneTo(3):
   1.0
   2.0
   3.0
  julia> convert(Float32, 1)
  1.0f0
Julia is of course dynamic, so maybe it's cheating? I'm writing this comment because all the greek in that cube, and actually using a cube, makes this look like very abstract stuff but I consider Julia a very practical language.

> Untyped scripting languages are fine for scripts. Honestly idk why developers write big libraries in untyped languages like JavaScript and Python.

And yet it works

plafl··on The λ-Cube
I actually understood your article about the lambda cube much better. Also, very nice formatting and clean design, very readable on my phone.
plafl··on Sketch: A Common Lisp environment for the creation of electronic art
If like me scheme is more your thing I discovered this library for Racket today:

https://github.com/soegaard/sketching

plafl··on IRS: Stolen property must be reported as income on taxes
> many people feel much more strongly about welfare fraud than tax evasion.

Many people are way more against crimes which offer them little returns than against crimes that may happen in their social circles.

Edit: I want to clarify that it's not some kind of conspiracy, it's that we simply are more empathic with people in a similar position to us

plafl··on Mind-expanding books
There was a time where Amazon was great to explore books: "users who bought also bought". Good old collaborative filtering.

I feel bad for giving useless advice so as someone who read several times the whole foundation series as a teen may I suggest: A deepness in the sky, a fire upon the deep, the forever war, gateway (Frederick Pohl). If you like fantasy, or even if not: the blade itself. If you have an enemy recommend him/her "the name of the wind". It's a great book but it's the first of an unfinished trilogy.

Edit: how could I forget the cryptonomicon?

plafl··on Wingman for Haskell
I feel that there is some kind of link to duality in optimization. Like you are trying to bound the intended program from below and from above.
plafl··on Clever uses of pass, the Unix password manager
I don't know why, but I usually find the usability of anything crypto-related terrible like ssh or managing certificates. Granted I have no idea about security but I would say that I have some knowledge of computers, I use 2FA minimum everywhere, I use VPN almost daily, I ssh into machines frequently, I use a password manager, I update my software and I'm picky about what I install. You get the idea. And yet I dread having authentication problems, my only resort googling to see what other poor souls managed to do. I think some part of it is part of the nature of the problem since you have to assume some of your users are malicious but a good part is just not caring, like if you don't know what the problem is you should not even be close to a computer.
plafl··on Log4Shell update: second Log4j vulnerability published
> _can't reboot their servers_ because they simply don't know how to bring the app back up

A hundred years later IT priests will demand human sacrifices to appease the server gods

plafl··on Book: Discrete and Computational Geometry
I own the hardcover and looks great, but there is an ebook too:

https://press.princeton.edu/books/ebook/9781400838981/discre...

plafl··on Book: Discrete and Computational Geometry
Sample chapter: https://assets.press.princeton.edu/chapters/s9489.pdf

It's hard to not get motivated with this book. It's a math book, with proofs or proof sketches, but stays very fresh and agile and with a lot of gorgeous illustrations. I think the "unsolved problems" are great.

plafl··on Everyone on Earth is your cousin (2015)
> share zero genes

That would be impossible, unless one of you is some kind of bacteria. And even in that case I doubt it. According to Wikipedia[1] (yes, I invested some time to refute a random stranger on the internet, well, maybe a cousin) there is something like 0.1-0.4% of genetic variation between humans.

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

plafl··on Regularized Newton Method with Global $O(1/k^2)$ Convergence
(note: comments based on a superficial read)

I would say "interesting" more than "groundbreaking", in the sense that you will not solve problems that you were not previously solving.

The benchmarks provided show nice convergence. The interesting part is that the method will not fail, which is very good. The benchmarks seem to crush other methods but keep in mind that the plots do not show "time required" but "number of iterations required" and that with Newton's method you are doing much much more work per iteration: computing the Hessian instead of the gradient and solving a system of linear equations on every iteration.

plafl··on Fast CSV Processing with SIMD
Thanks, and I must say, very old school web page:)
plafl··on Fast CSV Processing with SIMD
CSV are nice for data interchange or even for storage if compressed (storage is interchange between the past and the future). But the very first thing one should do when working with CSV data is convert it to a binary representation. It will force you to make a full pass over all the data, understand it, think about the types of the columns, and you will increase iteration speed.

More related to TFA: does someone recommend a good book or other resource about modern code optimization? I have interiorized several lessons but it would be nice to dig deeper.

← PreviousPage 2 of 9Next →