HNHacker News
TopNewBestAskShowJobs

candeira

913 karma · joined September 23, 2009

submissionscomments
candeira··on I used the internet to painlessly relearn a foreign language
Someone I follow on Twitter has found a very good sweet spot for improving her second/nth language: she follows online courses in her field (art and design) in her target language.

In her case, the target language is Spanish, so she does courses from Domestika: https://www.domestika.org/

candeira··on Zig's New Relationship with LLVM
> it's important to let the programmer be precise about whether they want locking (or not) or buffering (or not)

Or whether the function accepts naked types as parameters or error unions!

The debug namespace is indeed the right place for a wholly generic print. The first day I took Zig out for a spin, std.debug.warn briefly confused me by eating errors and printing their name instead of (as I expected for a short minute) giving a runtime error.

This is a good design decision for the debug namespace, but you don't want a regular call to print() to take an unwrapped error without complaint!

candeira··on Show HN: A basketball hoop to maximize shots that go in [video]
Ok, I can't read. My excuse is it was late and I was going to bed :)
candeira··on Show HN: A basketball hoop to maximize shots that go in [video]
I wonder if Greg Egan reads HN or whether he learnt about this in some other way, but this was his analysis of the same problem from five hours ago:

https://twitter.com/gregeganSF/status/1251390966356795392

candeira··on Secure by Design
Two ways in which this is helpful. The list is not exhaustive:

1. The system that gives a service to the public is publicly accessible by default. The system that rotates its credentials it doesn't need to be; it can sit behind your firewall listening only on one port for ssh, with firewall rules allowing access only from a bastion host.

2. The credential rotator also connects to your server and drops credentials into it; you don't call from your server to the credentials rotator, because see Point 1 above. This limits the attack surface.

You're right that everything is potentially vulnerable, and so would the credential rotator system. However, by rotating secrets this way, you shift the locus of security to a smaller place that you can defend much better.

candeira··on It never makes sense to use foldl on lists in Haskell (2019)
The bracketed "in Haskell" really tied the title together.
candeira··on It never makes sense to use foldl on lists in Haskell (2019)
How counterproductive.
candeira··on It never makes sense to use foldl on lists in Haskell (2019)
The linked comment is great. However, I think the HN heading is confusing, particularly for people who may not know about the existence of Haskell and its lazy-by-default semantics.

The linked comment recommends using strict/eager fold-left instead (`foldl'` in Haskell) of using lazy fold-left (`foldl`, with no trailing apostrophe). It's not saying that you shouldn't use fold-left in any language.

Reading the HN title alone, in its front-page context, it looks like it's saying that it's the fold-left generic operation that's wrong for lists, and not just `foldl`, Haskell's default lazy implementation of fold-left. Paradoxically, following the guidelines and re-using a boiled-down version of the linked comment's first line results in the line being misleading and/or link-bait (I guessed what it was about, but I still had to go and check).

For some time I've thought that the HN policy of disallowing editing of post titles, while correct, can be taken too far, and that many titles would be better with some annotation.

In this case, "It never makes sense to use [lazy] foldl on lists [in Haskell, use foldl' instead]" would be a better title. A bit awkward and maybe inelegant, but it says what the article means. Out of its original context, the HN title doesn't say what the posted article means.

Maybe "Lazy foldl versus strict foldl' in Haskell" would have been an even better title, if the guidelines allow for using one's discretion on when to disregard them.

Other common case is that of headlines in the first person: "My X ..." would often be improved by editing it to "[Name's] X ..." or "[Name of whatever X is] ..." while leaving it otherwise unchanged.

--

I don't know if @sama will get summoned to this comment like he would if this were Twitter, but it doesn't hurt to try.

candeira··on 4.2″ and 7.5″ NFC-powered e-Paper Displays Work without Battery
Yes, for now it is, but it's also stacked so it looks like it's "all screen". Maybe if you could spread components around, it could be thinner.
candeira··on 4.2″ and 7.5″ NFC-powered e-Paper Displays Work without Battery
If I worked at Waveshare, I'd partner up with a phone case manufacturer and sell user-customisable phone cases.

They could also offer a SDK so apps could publish high utility info with low update frequency on the case itself: weather, public transport realtime schedules, etc.

(Edit: had originally written "low-latency" instead of "with low update frequency", because of the strong conditioning to associate "low latency == good")

candeira··on The Polygons of Another World: Atari Jaguar
Thanks, I'd misremembered something read almost a decade ago.
candeira··on Nightmare – Guided Intro to Binary Exploitation/Reverse Engineering
https://microcorruption.com/
candeira··on The Polygons of Another World: Atari Jaguar
They also didn't use any texture memory for Crash; only shading. This went against all received wisdom, and shows how much they were ready to face every challenge posed to them by going back to first principles.

They also wrote a software-based Z-buffer implementation. And a custom compression system that allowed vertex-based animation. And scene streaming from disc. And...

https://all-things-andy-gavin.com/2011/02/02/making-crash-ba...

Previously: https://news.ycombinator.com/item?id=9278082

candeira··on Verlan: French slang that inverses words
In Spanish, if you ask "where from?" you'd say "¿De dónde?", which is also a triple composition.

The adverb "dónde" already has the preposition "de" embeded in it, as it comes from a condensation of Vulgar Latin "de unde", already meaning "from where". But Latin "unde" already is a composed form meaning "from where", and where the "-de" ending is not the preposition "de" but it's still a particle making "unde" a composed form...

So if you're Spanish and ask "¿De dónde?" you're asking

¿(from (from (where from)))?

candeira··on Dynamic type systems are not inherently more open
> But you can also do some very loose things with spec that aren't done in a type system (I speak with a cheerful ignorance of type systems). Eg, I can spec a function so that one argument is smaller than the second. This allows my testing system to automatically generate the correct data to test my function.

Check out dependent type systems. These allow you to define, mindbreakingly enough, types that __depend on the values you assign at runtime__, and functions whose type depends on the values passed as arguments.

Don't ask me how it's done; it's all dark magic to me. All I know is that people who use dependent type systems claim they are very good at certain uses involving incoming streams of unknown data, like parsing binary protocols.

https://en.wikipedia.org/wiki/Dependent_type

candeira··on The World of Statecharts
From memory, one of the things we did was set up an event bus to communicate between xstate and Vuex. We only used the xstate.org.js and vuejs.org documentation, which are both very good.

Sorry I can't help further.

candeira··on The World of Statecharts
No, sorry. This was contract work, and is closed source.
candeira··on The World of Statecharts
Yes!

Extremely same, but with Vue instead of React. In the last project I worked on, XState was a late addition, so it didn't control the whole application, but the part I wrote in it was bug free from the start.

My plan for any future JS/frontend project is to design the whole application's business logic around XState, and use Vue/React/Svelte/Whatever just for the rendering part.

candeira··on Things to Read to Become a Better Human and Developer
As https://news.ycombinator.com/item?id=21751079 said:

> And Greene's 48 Laws of Power is practically a manual of sociopathy.

candeira··on Things to Read to Become a Better Human and Developer
> And Greene's 48 Laws of Power is practically a manual of sociopathy.

Exactly this.

candeira··on Things to Read to Become a Better Human and Developer
Huge red flag also for Robert Greene.
candeira··on Pontevedra, Spain’s Happy Little Carless City
I grew up in Galicia, my sister still works for child services there. I'll give you some of the cheer and awe, but will dispute the lack of discordance.
candeira··on You Can Now Tell Facebook to Delete Its Internal Record of Your Face
I read this as "You can now 100% confirm to Facebook that, indeed, that is your face".
candeira··on USB4 Specification
The name needs a 1 in it too. Maybe "USB4 Gen 3x2 1st Class", so people can answer "yes, I guess?" when you ask whether it's USB 1.
candeira··on New Fast.ai Course: A Code-First Introduction to Natural Language Processing
Oh thank you, thank you!
candeira··on Why no max/min function for integer in Golang
The Oracle/Java trial:

https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google....

candeira··on EU government websites have undisclosed adtech trackers from Google and others
The Australian Tax Office, Aussie Medicare and the my.gov.au site all use Google Analytics! Unless you use countermeasures (I have Privacy Badger installed), Google is getting quite a bit of information from your use of the sites, even if all they get is the metadata. It's freaking nuts.
candeira··on Dynamic Programming for Technical Interviews
I understand that DP requires turning a recursive, top-down algorithm into an iterative one by yes, reusing the overlap in the subsolutions.

And Krishamurthi's definition is the clearer I've seen that doesn't include "memoized recursion" as a subset of Dynamic Programming.

candeira··on Dynamic Programming for Technical Interviews
Dynamic Programming and memoization are definitely related techniques, but they are emphatically _not_ the same. Memoization is a black-box approach that can be applied to a generic recursive top-down, depth-first algorithm. Dynamic Programming is about rewriting the recursive top-down algorithm in a bottom-up, breadth-first manner.

Shriram Krishnamurthi explains it best:

https://blog.racket-lang.org/2012/08/dynamic-programming-ver...

candeira··on Ask HN: Where should I start as a 34-year-old switching to software as a career?
I second "develop any software for your domain", with one addendum.

Do you use excel for anything at all? Whatever it is, you could start by building that.

- Do you put data into a spreadsheet and then email it to someone else? Make a web app where you put in the data using your account, and the someone else can view the data using your account.

- Do you have different spreadsheets with separate data than then gets aggregated/summarised manually into a single spreadsheet? That's a job for a computer program, not a person, and you can add that as a feature for your web application.

- Once you've done that, you have a website that can work with the new data, but some people will want it on spreadsheets, not on the website, so write a spreadsheet export/download feature.

- All your new data is in the website, but the old one is still in excel spreadsheets on your hard drive. Write an importer to read the spreadsheet data into your application.

- Is some of the data for your lab in a format that's also machine readable (barcode format?). Add to your app support for reading barcodes, either via phone cameras or laptop webcams: https://github.com/serratus/quaggaJS

I could go on, but I guess you know your next step better than I would.

A recommendation is also that you do all your development at home, not on company time, and not using any company resources. A lot of profitable business are website implementations of existing spreadsheet workflows. In the past three years, I've worked on two such applications, three if you count a physical device UI where the prototype UI was developed on Excel + Visual Basic.

← PreviousPage 2 of 9Next →