1,405 karma · joined Oct 28, 2016 (10y ago) · 474 submissions
comment 4y ago · link · parent
I believe wayland does in fact fix this issue. Does anybody have more context on what’s going on?
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 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
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
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
> 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
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
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
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
> 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
--
> 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
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