HNHacker News
TopNewBestAskShowJobs

mfsch

1,735 karma · joined January 31, 2013

submissionscomments
mfsch··on Julia 1.5 Highlights
Even for floats & ints, try doing some array operations without allocating memory for intermediate results. In Julia, I can write whole PDE simulations that never allocate intermediate values inside the time integration loop. I haven’t done serious work with NumPy in a while, but I’m pretty sure that’s impossible for anything non-trivial, even a simple FD stencil such as `du[2:end-1] = D * (u[1:end-2] - 2*u[2:end-1] + u[3:end]) / dx^2`.
mfsch··on Julia 1.5 Highlights
`view(v, 1:N)` did cause an allocation in previous versions, but the allocation was a small, fixed size while `v[1:N]` would allocate memory proportional to `N`. From what I understand, this was required to avoid garbage collection of `v` in cases where the view would be the only remaining reference to that array. In 1.5, changes to the GC allow views to be placed on the stack now.
mfsch··on Julia 1.5 Highlights
One thing to note is that it’s worth learning a little bit about how to write performant code in Julia and how to correctly measure its performance when evaluating the language. It’s common for people to underestimate the performance benefits in their first experiments.

There are a few common issues: 1) You measure compilation plus execution instead of just execution. 2) Your code relies on global values that limit optimizations. 3) Your code doesn’t allow the compiler to determine all the types. 4) Your code forces allocations for intermediate values.

Especially 4) makes a big difference when you’re coming from NumPy or MATLAB. If you have a chain of vectorized operations (e.g. “X = α * A + β * B + γ * C”), the performance is quite similar between the languages, but in Julia you can enforce that these happen in-place with a single fused loop and zero allocations (e.g. adding “@.” in front). This can often give you another ~2x–10x speedup and make the difference between “similar to NumPy/MATLAB” and “similar to C/Fortran”.

mfsch··on Julia 1.5 Highlights
Stack-allocated views are a big deal! Even in code where the direct cost of the view allocations is acceptable (e.g. because the work per view is high), they should help a lot. Unnecessary allocations are one of the easiest way to accidentally mess up performance in Julia, but having all the views allocated made it much harder to find “problematic” allocations that scale with the problem size. Now it should be more realistic to aim for zero allocations in performance-critical code without giving up the nice ergonomics of views.
mfsch··on TheirTube – How do the recommended videos look on their Youtube home page?
I’ve often wished that journalistic institutions would also publish a more long-term view on what they think is going on in the world. I think the most important effect of this could be that it would push them to consider how much their daily coverage is in line with what they actually consider to be important developments. If you explicitly state that climate change is one of the three most important challenges on the scale of the current decade, for example, can you justify the attention (or lack thereof) you give it in your daily coverage? A daily newspaper implicitly makes these judgements of how much attention each topic deserves, but they rarely have to explicitly state and defend these judgements.
mfsch··on Mozilla project exposes YouTube's recommendation 'bubbles'
I think for those it’s best to subscribe to the RSS feed of the channel. Feed readers are great for infrequently updated content!
mfsch··on Rewriting Fortran Software in Rust
For those sorts of scientific simulations, you probably want to use the MPI.jl package rather than the built-in parallelism – at least that’s the conclusion I came to when I started the fluids code I’m currently working on. MPI.jl is a thin wrapper around the C interface so you end up writing your programs pretty much the same way as in C/Fortran. This type of MPI support is still a bit rough around the edges but it works, and our code runs as fast as the Fortran code it is based on (we usually scale to ~1000 cores). You get the advantage of working with a very nice, modern language, but it is pretty easy to accidentally do things that are very expensive and killing your performance, such as allocating memory inside a hot loop.
mfsch··on Signal iOS Device Transfer
Does anyone know if this works if you change your phone number? The support article [1] still says you’ll lose your history in that case, but the scenario mentioned in the blog post (someone else scanning the QR code) seems to imply that the transfer doesn’t require both devices to be registered to the same number.

[1]: https://support.signal.org/hc/en-us/articles/360007062012-Ne...

mfsch··on Ask HN: Which tools have made you a much better programmer?
The way I do it is that I whenever I start working on some functionality and it’s not immediately obvious how to implement it, I open a text file and write down my thoughts as something between stream of consciousness and design document, usually formatted as a multi-level bullet-point list.

I start with what I am trying to achieve and list the different design approaches I can think of, adding advantages and disadvantages of each one as they come to mind. By the time I’ve written down all my thoughts on a design decision, it is often clear to me which approach I favor.

This can be repeated for more and more detailed aspects of the implementation (e.g. “which function should this be added to” or “what to name this function/struct/variable”) until I feel like I can come up with the remaining details as I’m writing the code. If I get stuck somewhere later on, I can always go back and add more details in the text document.

For larger or more important features, this list can be cleaned up and become documentation or perhaps a comment somewhere, but I often find that the writing is a useful tool to get unstuck and to clarify my thoughts even if I end up never reading it again.

mfsch··on Toto’s “Africa” Played on Tesla Coils
Perhaps a bit off-topic, but the chorus of “Africa” is almost exactly 20 seconds long, so it is a great song to wash your hands to if you’re sick of “Happy Birthday“.
mfsch··on NASA reveals what the final X-57 all-electric X-plane will look like
In the video they tout the X-57 as a contribution to the “urban air mobility market”, arguing that small aircraft can decrease commute times and avoid congestion. This seems very backwards to me. Cars are already very inefficient in their use of space, since they require large amounts of space around them when they are moving at speed. I expect this issue to be significantly worse for aircraft, with the speed they are moving at, the safety distances needed to avoid crashes, and the volume of air they are disturbing around them. While they can potentially make use of the vertical dimension for more space, they still have to move through the surface layer for take-off and landing and will want to stay close to the ground for short trips. And they potentially add a lot of noise to an already noisy urban environment.

I’m all for ambitious research projects pushing the boundaries of electric flight, and there’s probably reasonable use cases for planes like the X-57. But a sustainable urban transport future looks much more like buses and bicycles rather than small electric aircraft.

mfsch··on Zotero: Personal Research Assistant
I’ve recently started a little project for my own reference manager. Since I end up writing papers in Latex, I want my bib file(s) to be the ground truth and I’m slightly obsessive about things like consistent capitalization and author names. I’d rather not fight my reference manager to eventually produce the bib file I want if I can just create that bib file in the first place.

Everything I want from a reference manager can be done in a relatively simple command line tool with an interface similar to beets. Only the extraction of DOIs from PDFs looks like it will have to be a bit hacky, but if `ref im article.pdf` works for 90% of articles and asks me to provide the DOI for the other 10%, that’s good enough for me.

mfsch··on Signal is finally bringing its secure messaging to the masses
From what I understood of the article about secure value recovery [1], SGX is used to derive a more secure key from the password you provide, so a broken SGX alone is not enough to decrypt the data stored on the server, you still need to crack the user’s password. Of course this only helps those people with an actually secure password, which is why they go through all the trouble with SGX. This makes me feel a bit better about their reliance on SGX – as long as you use a long random password stored in my password manager, you don’t have to trust SGX at all.

[1]: https://signal.org/blog/secure-value-recovery/

mfsch··on Interested in improving your relationships? Try Nonviolent Communication
I actually find the “step-by-step instructions” the least useful part of the nonviolent communication books. I think the most important part of communication, especially in conflicts, is being genuine and authentic, which is very difficult if you’re following some sort of recipe.

I do find NVC extremely helpful as a tool to understand communication and conflicts though. There are many great insights on how conflicts appear and how having an empathic understanding of each other can help resolve them.

I’m not sure whether following the steps outlined by the method helps with that though, especially if a person sees the method as a “turnkey solution” to get other people to “behave” rather than trying to do the introspection of why you are bothered by something and to separate what the other person did from how you feel about it.

mfsch··on System76 Will Ship Linux Laptops With Coreboot-Based Open-Source Firmware
While I have no experience with System76 and the quality of your devices, I doubt you can make any claims about the number of incidents with confidence. I have owned many devices that have had various quality issues that didn’t rise to the level where I felt it was worth going through some warranty procedure that may or may not alleviate the issue after spending an unknown amount of time & money on it. I don’t like the idea that the manufacturers of those devices take the absence of a complaint as confirmation that the computer has lived a long life without any sort of incident, major or minor.
mfsch··on AirSim: open-source simulator for autonomous vehicles
That looks interesting, but I wonder how accurate the flight behavior is when they are not including any atmospheric dynamics. The wind in the atmospheric boundary layer is characterized by strong semi-random fluctuations that arise from the turbulent interactions of the air with the surface. These fluctuations occur on scales both larger and smaller than a drone, so they should have a significant effect on its aerodynamics.
mfsch··on Making email more modern with JMAP
From what I gather it should be possible to use 2FA with JMAP. I‘m looking forward to no longer having to decide between using third-party email clients and properly securing the account that’s probably most worth securing.
mfsch··on Standard Ebooks: Free public-domain ebooks, carefully produced
It looks like they’ve decided not to publish any non-English books [1]. It’s a pity – I much prefer reading books in their original language if I’m able to understand it, and I was even considering contributing some German books to their collection. Maybe it would complicate the publishing process a bit though since different languages have different practices for things like punctuation.

[1]: https://standardebooks.org/contribute/accepted-ebooks

mfsch··on Show HN: ZFS Implementation in Python
Does someone know whether it would be legal for someone to go through the ZFS code and write a specification of the features this author hasn’t figured out yet? I.e. could someone write a detailed description of the missing functionality that doesn’t include any details about the implementation so other people can implement it in non-CDDL code?
mfsch··on Bounty Hunt Announced on Swiss eVoting System
For a bit more background: The online newspaper Republik recently published a piece about this project and some of the problems with the company Scytl providing the system. They provide an English translation of that article:

https://www.republik.ch/2019/02/07/the-tricky-business-of-de...

mfsch··on Fortran is still a thing
As someone working with scientific codes in (relatively) modern Fortran, I agree that Fortran is still very strong in its niche. I don’t know any other language that makes it as easy to write fast numerical codes, and it’s relatively hard to accidentally mess up the performance.

That said, I still find it very much feels outdated as soon as you veer off its core features. Handling strings is a major pain, writing short functions feels overly verbose, and proper testing is difficult. The language is full of arcane details that require reading up on best practices even for simple things such as defining the precision of your numbers.

So while Fortran still is strong in some areas, I do see it as an outdated language, just one that doesn’t really have a good replacement yet. Hopefully Julia can replace it for most use cases, or maybe Rust if they figure out their HPC story.

mfsch··on When You Watch Sports, Your Brain Thinks You’re Playing
The whole notion of “your brain thinks …” is a common interpretation of fMRI studies, but I think it is not very accurate or useful. It contains the idea that what your brain does is somehow separate from what “you” are thinking and doing. In practice, what we see in fMRI pictures is just the what the current thinking and activity looks like in the brain. So even if you saw the same patterns of activity for people watching and playing sports, that wouldn’t mean that the brain “thinks you are playing”, it just means that your thinking might be similar during both activities. As others have mentioned the article does not reference the title, so this is a comment on the title only.
mfsch··on Addressing Your Concerns
Previous discussion about the acquisition: https://news.ycombinator.com/item?id=16989505
mfsch··on Asking members to support journalism, The Guardian raises more revenue than ads
There are also “De Correspondent” [1] in the Netherlands, which inspired “Krautreporter” [2] in Germany and “Republik” [3] in Switzerland. Both De Correspondent and Republik set new records for crowd-funding in journalism, with the latter raising on the order of 3.5M USD. These projects used crowd-funding as initial funding though, and not for individual stories. Their ongoing financing is based on paid subscriptions.

[1] https://decorrespondent.nl/ [2] https://krautreporter.de/ [3] https://www.republik.ch/

mfsch··on Research Debt
I agree 100% that it is way too hard to climb the mountains of knowledge, that it could be much easier, and that there is little incentive and cultural support in academia to work on these topics. Time and time again I see examples of where outcomes are not limited by the existing knowledge, but by the accessibility of said knowledge. I would gladly devote most of my time to distilling knowledge if I saw a viable career path for it.

Over the last years, I gave a lot of thought to the topic of conveying information. I see research as the process in which knowledge is created. This knowledge then has to be “encoded” in a format that allows for the transmission to other people. This encoding can be optimized in different ways. Research articles have the advantage that they are close to “lossless” in that they are supposed to contain all information necessary to build up that knowledge. This makes them well suited for archival, especially as they can be stored as a stack of paper.

However, research articles are often not optimized for building up that knowledge in an efficient way. I believe that the “encoding” optimized for learning & understanding should be more like a progressive image codec, in that it provides a comprehensive view as soon as possible, filling in further details along the way. This also makes it possible to stop whenever you have reached the level of detail that is relevant to you. The challenge in creating these encodings is to extract the information that provides the most clear & useful picture as soon as possible. I like the word “to distill” for that process, as it is really about extracting the essence of a body of information.

Doing this work for research articles is how I understand the goal of distill.pub, which seems extremely valuable to me. However, I think this is just the first step. What is the most useful distillation of all of deep neural networks? Of all of machine learning? Of all of computer science? As others mentioned, there are some forms of publications (review articles, textbooks) that do part of this distillation process, but they only cover part of the spectrum. Preciously few textbook contain a well thought-out summary of their contents and not just an introduction. In my experience, often the least amount of thought is given to the highest level of abstraction (e.g. what is the essence of mathematics?), even though they are the most fundamental ones.

It would be great if there was more focus on extracting useful understanding from the ocean of knowledge we already have (useful both in the sense of being applicable on its own as well as being a solid foundation to build more knowledge on). It looks like distill.pub is a step in that direction, and I really hope it will bring more attention and recognition to this kind of work.

mfsch··on Tips for Success in Undergraduate Math Courses (2002)
The issue I have with lists on how to be successful in a class is that they rarely provide much guidance on how to prioritize the work. Of course students are successful in a class when they read & understand the material before the lecture, follow the lecture attentively, redo all example problems, solve & understand all assignments and maybe read a few textbooks on the subject. The difficult part, at least for me, is how to decide what learning activity will help your understanding in the most any given moment and how to split your time between the different classes and other activities.
mfsch··on Regex Crossword
Cool game, it really helped me brush up my regex skills.

I think I found an error in “The Lektor Device“: The “I“ in “WITH” could also be a “T” from the rules, but only the “I” is accepted.

mfsch··on The dire state of WordPress
I too have moved from Wordpress to Concrete5 and was a huge fan. I appreciated the flexibility of the system, combined with the free availability. However, a few things have started to bother me about it:

* The CMS interface is very powerful, which can be a good thing in some cases, but for most sites I make it is more of a liability than an advantage. Users can easily format the headline red because they think it deserves more importance, they can add new layouts everywhere adding columns to pages etc. For pages that are carefully designed, this provides a lot of room for screwing up the site, both accidentally and on purpose.

* Due to the power of interface, it becomes a lot more complex than it should be. While this may not be a problem for advanced users, for small sites (small business, club, individual person etc) the person editing the site is often not too skilled and every new menu is a new opportunity to get lost and to click the wrong option. If I click a block, there are about seven options and only half of them should ever be used by the editor. Custom options for a site are hidden in a page properties menu somewhere and there are so many options that should never be touched on the way to get there.

* I have been disappointed by the lack of commitment to excellence and best practices by the Concrete5 team. There are so many parts of the system that are made to “just work” instead of being based on modern best practices. Half of the blocks produce HTML that you don’t want to have in a modern HTML5 based site. I know that you (jordanlev) have been working on some improved blocks, so kudos for that! Also, this is more of a general impression and I haven’t been using C5 for about a year, so things might have changed.

* Creating custom blocks comes with quite some complexity, so you either have to invest the time to create them or try to work with an existing block and work around their limitations. Try having a table on a page that can be edited by the user with the possibility to add a class to some rows so they can be highlighted with CSS.

* I’ve had a lot of performance issues, where a site would take ~10s to load the first page.

I would still use Concrete5 for projects where I know that a lot of flexibility without my intervention is needed and there are skilled people who will be able to edit the site without screwing everything up or when minimal costs are needed.

For all other (small) projects, I have started using Perch, which isn’t open source, but an absolute joy to use. It’s reasonably priced, gives you real control over the code and makes it possible to have a nice, well-documented interface for the editor where they can easily edit everything within the boundaries that are defined by the design. Where a custom block in Concrete5 needs several PHP files, an XML database schema etc you just create a HTML template file with some template tags in Perch and you have full control over the order, labels and help texts in the CMS back-end.

It took me a while to get my head around the concepts and see which problem should be solved which way in Perch, but now I finally have a CMS where I have full control over the code and can make the edit interface as easy to use as possible, with minimal effort on my part.

I realize that this sounds a bit like a sales pitch, but I have no affiliation with the developers. Of course, there’s a risk associated with using a closed-source product by a small company, but Perch has been around for a while and the development continues to be very active with a very responsive team.

mfsch··on Critical Thinking: Why Is It So Hard to Teach? [pdf]
Sure, a lot of what school does is teaching compliance. Yet, I have heard a lot of speeches about how school teaches children to be critically thinking citizens and you can probably find the term “critical thinking” in most mission statements of educational institutions. I would even say that school usually want to raise critically thinking students, they just don’t want to deal with the implications this has for running the schools. It is a lot easier to teach students when they don’t question what and how they are taught.
mfsch··on If you ever feel alone in this...
It’s funny how what you do (engineering in my case) affects the way you think about some things. I started to think of happiness not as a direct function of the different “happiness variables” (like wealth, relationships…) but as the derivative of those variables. For me it makes a lot more sense that how you feel is related to your perceived progress towards or away from happiness rather than your actual status on some arbitrary scale. It explains why rich people can get depressed and why people who have suffered extreme losses can be very happy a while after the loss.
← PreviousPage 3 of 4Next →