Better HN
topnewbestaskshowjobs
Log inSign up

avg_dev

1,405 karma · joined Oct 28, 2016 (10y ago) · 474 submissions

Submissions

comment 4y ago · link · parent

I had this problem a while back where I would screen share on zoom and seemingly leftover memory from videos I’d watched in the browser showed up in certain circumstances to people viewing my screen. Utterly horrific.

I believe wayland does in fact fix this issue. Does anybody have more context on what’s going on?

comment 4y ago · link · parent

What did you hash? The name of the product? Or the UPC or something? I am curious.

comment 4y ago · link · parent

You can't leave us in suspense, we need to know whether you coughed up the dough or not.

394.

Reasons to check what the malloc function returned(pvs-studio.com ↗)

2 points · by avg_dev · 4y ago · discuss

comment 4y ago · link · parent

I'm curious how the performance of the two (grpc-go and connect) compare in benchmarks in terms of memory usage and so on. I know there is fasthttp in Go which sometimes people use as an alternative to net/http for performance sensitive code. https://www.sobyte.net/post/2022-03/nethttp-vs-fasthttp/

I also presume there are some reduction in bugs simply by reducing the LoC in this project compared to grpc-go.

comment 4y ago · link · parent

And here's another thought. I know very little of the space, again, but I've seen some headlines about smart contracts going wrong.

Do you think there's any space for low hanging fruit simple auditing of smart contracts? Maybe a linter?

EDIT: Here's what Ethereum suggests: https://consensys.github.io/smart-contract-best-practices/se...

In particular,

https://github.com/protofire/solhint/blob/master/docs/rules....

https://github.com/protofire/solhint/blob/master/docs/rules....

https://github.com/prettier-solidity/prettier-plugin-solidit...

comment 4y ago · link · parent

Wow, that's fantastic.

So basically: unit test fixture setup spanning multiple external services ("Chains?") in a scriptable build, with various common/comprehensive/programmable interaction flows, and then integrating with CI? I'm making some guesses here as I'm not very familiar with the space.

I think it's amazing that you have (had) made this into a career. I am a dev and spent a couple years as a QA developer. Do you think this is a space I could break into? (Decade plus of development experience plus the good fortune of growing up with a mother who was a software developer. I learned to code (badly) when I was 13. I'm more than double that age now :)

If so, I'm wondering if you'd be up for chatting some more like on IM (Google Chat or Whatsapp or whatever) to elaborate further if you think this is still a viable proposition for someone new. I'd be happy to pay you for your time if you think this could make me money. I know how to set up CI, I'm vaguely familiar with bitcoin (I used to own some), and I don't care for cryptocurrency but I'm happy to meet market needs with a smile to pay the bills and then some.

comment 4y ago · link · parent

Are non-US citizens allowed to sign?

EDIT: Looks like one of the signatures is from Tim Bray, I think he lives in Vancouver.

comment 4y ago · link · parent

Can you elaborate on the blockchain testing environments/CIs thing please?

comment 4y ago · link · parent

I just read this; I remember reading it a while back. It's a good article. Approachable and actually achieves its goal. Thanks for the link.

> Original online mode load time: ~6m flat

> Time with only duplication check patch: 4m 30s

> Time with only JSON parser patch: 2m 50s

> Time with both issues patched: 1m 50s

>

> (6 * 60 - (1 * 60+50)) / (6 * 60) = 69.4% load time improvement (nice!)

I would have loved to see someone swap out the parser for simdjson, especially without the code. That would be amazing. Maybe the 1m50s can be beaten.

Just thinking about that core heating up for 6m one can see that this sort of code improvement helps reduce electricity usage, heat generated, and so on. It's just less computation. I see now that people need to parse JSON in C++ as they would any other language, and someone has to do it, and it should be done as fast and correctly as possible. It's a different issue from defining a performant wire protocol with good developer ergonomics (which to be frank I am not sure why my brain even went there to begin with; I had protobuf on the brain).

Makes sense.

comment 4y ago · link · parent

Good thought. If you are coding in C++ maybe you can use some sort of binary serialization thing. Even in other languages if json parsing is a bottleneck it can possibly be optimized away through use of a binary wire format. That said vector operations available to programmers is always a welcome thing I’d say. And who knows how much production json parsing this library really does, it could be a ton.

I’m torn. I’ve worked at shops where we aim over time to reduce response time while serving business logic and using statistical models that get iterated on. Even there I haven’t seen a blatant need for non-JSON rpc. But I know my experience doesn’t mirror everyone’s. And I like seeing and learning about instruction sets. I’m currently taking a course in parallel computing and I just used a avx2 for the first time in a toy program to subtract one vector from another in a single instruction which while not particularly useful is a window into more interesting things and is still SIMD.

I think on the whole making json parsing for a large enough fraction of processors is probably a huge win for the environment. But who is parsing json in C++?

comment 4y ago · link · parent

I didn't know about the gas masks being ubiquitous during the war; that makes that part a little less surprising. History can be sad.

comment 4y ago · link · parent

> And in Turing’s case, it was further complicated by the fact that he always wore a gas mask as he rode, to prevent triggering his allergies. But the alarm clock he was known to wear around his waist might have helped.

What? Is that for real?

Edit: It is!

> He loved to ride his bicycle through the countryside. To time himself, he would simply tie an alarm clock around his waist. During the war, according to I.J. Good, a Cambridge mathematician, Turing suffered horribly from hay fever during the first week of June every year. So to keep the pollen off while riding, he wore a military gas mask.

- https://www.washingtonpost.com/archive/1999/06/09/alan-turin...

comment 4y ago · link · parent

I was thinking hard about this and truth is I did write code to do it.

From the README.MD in my private repo:

> `ec` prints out the elapsed time and exit code of a command after running it.

But the thing is, Bash supports this natively, using `$?` and you can even put it in your `$PS1` so you see it for every command, or use a function: https://wiki.archlinux.org/title/Bash/Prompt_customization#V...

Still, I like my solution. It was fun to write. If you want access to the repo let me have an email address I can write you at, or a GitHub username, and I'll let you have a look. https://i.imgur.com/DUf9gDc.png

405.

Ask HN: What developer tools would you like to see?

131 points · by avg_dev · 4y ago · 226 comments

comment 4y ago · link · parent

If I'm not mistaken, this is an April Fool's joke :)

comment 4y ago · link · parent

Hahahah as someone who just took a course using SML I am with you buddy.

comment 4y ago · link · parent

I wondered what his questions would be.

comment 4y ago · link · parent

I appreciate the author's pragmatism. I might be biased because I seem to share some of the author's worldview.

> One of the big points he made in that conversation is that if you don’t figure out the manual process you won’t have a clear explanation of the steps involved and if you don’t understand the thing you are doing you are going to end up in a mess. You’ll may even end up in the situation of “I don’t want to touch it, I don’t know why it works”. Kubernetes is that to me and I have no compelling reason to demystify it. I don’t operate at immense scale with a massive team. Regardless of the deployment system and underpinnings you work with, someone needs to know how to deploy your application, it needs to be well understood somewhere. At the human scale. Documentation is a good way of making that information transmissible. It is not a solution for immense scale, it is a solution for the human that needs to implement it at scale.

That really speaks to me. I have never understood Kubernetes; I have never worked on a team or project that employed > 100 developers at once, so it seemed unnecessary to me to read, say Kubernetes in Action (IIRC it's over 600 pages) when Ansible would do the trick. I'm not saying I'm a huge fan of Ansible but I have found it to work without a ton of knowledge, because it's fairly comprehensible. I would probably prefer some sort of deployment-via-source-code, actually, though I bet that could be relatively inflexible (after all, who is going to focus on code review and best practices for deployment source code when you have real feature development and customer-facing bugfixes to prioritize?) and is perhaps how things like Ansible came to exist in the first place.

comment 4y ago · link · parent

Do you have any resources for learning how to work on stuff? Any particular videos or books you'd recommend?

comment 4y ago · link · parent

https://en.wikipedia.org/wiki/Gmail#Automated_scanning_of_em...

comment 4y ago · link · parent

Having been demoted and fired, but never having been in a management/doing-the-firing position, it is nice to see the other side of this. I thought this was a relatively fair treatment to the employee being fired and also shines a light on what the title is indicating: sometimes there is some benefit to the people around.

--

> There are jobs that are bad fits, but not bad employees.

>

> Scenario 3: Summarily Dismissed

> OK, that’s not entirely true.

Made me chuckle. So did

> We were not asking for him to be fired. Except we were.

It's funny how the perspective shifts to reality given some distance and time.

--

I also thought he might be wrong about Bob; maybe Bob can and did or will learn good software development principles. Perhaps Mad Ned is being unnecessarily harsh. Or perhaps I'm overly optimistic. But I remember a time when I couldn't write code very well at all. Now, I can, at least when the stars align properly... and one of the nice things about code is the malleable nature of it: get it right once, and it is in source code management history forever.

comment 4y ago · link · parent

that was beautiful.

> bank: sir this conversation is recorded but I blinked my eyes very slowly twice

I laughed out loud at that.

Edit: Also, I never realized why Amazon stopped putting the name of the thing I purchased on the email receipt. Now it makes sense.

comment 4y ago · link · parent

I heard about this paper (which I haven't read) on the radio, where there was an interview with James Tour, who talked about it: https://www.cbc.ca/radio/quirks/mar-5-climate-change-and-hea...

Abstract:

> Rare earth elements (REEs) are critical materials in electronics and clean technologies. With the diminishing of easily accessible minerals for mining, the REE recovery from waste is an alternative toward a circular economy. Present methods for REE recovery suffer from lengthy purifications, low extractability, and high wastewater streams. Here, we report an ultrafast electrothermal process (~3000°C, ~1 s) based on flash Joule heating (FJH) for activating wastes to improve REE extractability. FJH thermally degrades or reduces the hard-to-dissolve REE species to components with high thermodynamic solubility, leading to ~2× increase in leachability and high recovery yields using diluted acid (e.g., 0.1 M HCl). The activation strategy is feasible for various wastes including coal fly ash, bauxite residue, and electronic waste. The rapid FJH process is energy-efficient with a low electrical energy consumption of 600 kWh ton−1. The potential for this route to be rapidly scaled is outlined.

--

Basically, there's a way to use https://en.wikipedia.org/wiki/Fly_ash (from coal power plants) and electronic waste to produce rare earth elements. I thought it was amazing.

One of the things that bugs me the most about computing is the disposable nature of our electronic goods and the waste it produces and the slave/child labor involved in mining these elements. I thought, maybe we won't have to any more.

Anybody who knows more have any thoughts?

415.

Rare Earth Elements from Waste(science.org ↗)

5 points · by avg_dev · 4y ago · 2 comments

comment 4y ago · link · parent

If you put it on GitHub, or anyone linked me to a similar tool, I'd be interested. Thanks.

comment 4y ago · link · parent

That was an excellent game.

comment 4y ago · link · parent

Wordle
1
1213141516