News for hackers. Stuff that matters.

abqexpert

Re:I hear you, but can we solve electricity (in Africa) first? on Thursday November 26, 2020 @09:56AM (#25220513)
I don't know if you can really fix 'electricity in Africa', there are ~56ish countries depending on which you recognize, all with competing interests and governments. Some have reasonable electrical systems and no real motive to potentially lose that by tying into some larger grid. As a whole Africa has a lot of sunlight and potential for solar power, it also has a huge amount of coastline with the potential for offshore wind and tidal energy.

I would think the issue would be how large it is, and how many tiny settlements there are that are detached from the cities. It would take a lot of effort to build out electrical lines to all of them. And the people who have the least access are the least likely to be able to afford to pay enough for it to be worth it to a company.

Re:Drag-and-drop version of JavaScript to learn to code on Thursday November 26, 2020 @09:50AM (#25220452)
I like the idea of color coding the components as chunks. I think it might be even easier for a beginner to understand that way compared with syntax highlighting.
Re:Little's Law on Wednesday November 25, 2020 @09:52PM (#25216431)
Somewhat interestingly it can be applied to distributions as well.

This anecdote in the article, was also pretty interesting: > The form L = λW was first published by Philip M. Morse where he challenged readers to find a situation where the relationship did not hold.

You can use https://www.wireshark.org to see HTTP traffic and MITM yourself for HTTPS(https://unit42.paloaltonetworks.com/wireshark-tutorial-decry...). That will only work for the data that you send to them yourself. You can't possibly see any data that they send to third parties that they send through their servers.
Re:Str: Yet another string library for C language on Wednesday November 25, 2020 @06:56PM (#25215617)
Thanks for that! I hadn't seen it yet, https://en.cppreference.com/w/c/string/byte/strdup says it will be C23 as well.
Re:Str: Yet another string library for C language on Wednesday November 25, 2020 @05:40PM (#25215094)
>"phat pointers"

I don't know if that is a typo given you normally call them "fat pointers", but they are "pretty hot and tempting".

Re:Str: Yet another string library for C language on Wednesday November 25, 2020 @05:38PM (#25215079)
C2x is expected to gain the char8_t type and almost certainly will not gain any new string handling routines. In the year 2030 I am expecting to still see more rounds of posts comparing string libraries for C. With more than 4 decades of development, we still don't have a great solution to string handling in C.

Every library like this is incompatible and most make slightly odd choices like in this library ownership of the string is denoted by a bit in the info/size field. Not that that is a bad choice or anything, but it is one reason someone might decline to use it and decide to write their own.

The lack of namespacing in C doesn't help, this library chooses str_ as its prefix, which is a bit likely to collide with other libraries. It also makes it harder to try to write libraries that allow for the string library to be switched out.

Re:Str: Yet another string library for C language on Wednesday November 25, 2020 @05:29PM (#25215002)
If you wanted to slice at an arbitrary point, then you would either have to lose some data in the original string, move or copy the original string to make space for the extra delimiter/null character, or have set up the string ahead of time to contain the delimiter in the desired position. If you are using strtok.
Re:Google Photos – Bait, meet switch on Wednesday November 25, 2020 @05:24PM (#25214963)
I mean it never said you could continue to upload for a lifetime, just that you could store a lifetime of memories. The old photos don't count against your storage.
Re:Pain is not the unit of effort on Tuesday November 24, 2020 @09:06PM (#25205221)
I think part of the reason why pain is so often used as a proxy is that it is universal and it is often very visible. If there were another way for people to show effort aside from sweating, then it would probably be used less often.
Re:Ask HN: Algo for 2D Diffs? on Tuesday November 24, 2020 @09:03PM (#25205205)
I don't think I have seen one, but if you can add some other delimiter yourself or modify the file that might help. You can always use a binary(non-line) based diff. I think cperciva's thesis was on one that became bsdiff.
Re:The Error Model (2016) on Tuesday November 24, 2020 @09:01PM (#25205190)
It would be nice if C++ could really settle on one single error handling system like this. I know the contracts proposals have been shot down several times, but those I think would help a lot. People will only really code defensively if there is a some gain. Having the compiler enforce and use contracts for optimization would be the only way to ensure adoption. If people thought they could get a 5% speed boost, they would annotate their code with more of their assumptions.
Totally crazy that they didn't know where they were for 20 years and now call them stolen.
Re:K0s – Zero Friction Kubernetes on Monday November 16, 2020 @11:14PM (#25120201)
I read it as k-aughts and k8s as k-eights, and all my juniors have at first as well. These aren't great abbreviations, we just get used to them. My main issue with this project is that if you want to use k8s and are using it, you want some measure of control. Unless you are just using it "because", your business goals intersect with the k8s philosophy and you need some element of it. In every case I have deployed it in there is a lot of fine tuning.
So one issue I can think of with this, would be that you often mold a work to be a podcast, by adding in extra auditory elements that wouldn't work in a pure text format. Listen to the BBC world service, often in their longer pieces they add in auditory clues like a busy street with the sounds of people bustling and so on to clue in the audience about what is happening. I can't imagine a straight rock bottom priced translation to a podcast working super well.
Re:Exotic Programming Ideas, Part 2: Term Rewriting on Monday November 16, 2020 @11:05PM (#25120165)
To a large degree you could imagine most of prolog programming as a set of term rewriting steps. As well as most lisp style macro programming languages. I thought the focus on Wolfram was a bit myopic. Even earlier meta and Tree-meta languages used this as well.
Re:Final Exam on Monday November 16, 2020 @11:01PM (#25120146)
This reminds me of the story of a competition at a university to solve some problem using a computer the fastest. The winning solution wound up just overwriting the memory where the solution would be output with a hard coded answer. If anyone else remembers this event, please correct me and provide a source please.
Re:Creating Tiny Executables in D on Monday November 16, 2020 @08:32PM (#25119364)
This is just a quick post I made after I was started working on a small operating system in D and ran into issues with the linker. I wondered how small of an executable I could make without using any unusual tools or anything outside of the blessed language and tool constructs.