Better HN
topnewbestaskshowjobs
Log inSign up

bArray

7,485 karma · joined Mar 14, 2016 (10y ago) · 2,314 submissions

Why jump in one pond when you can dip your foot in many?
Submissions

comment 5y ago · link · parent

I think your argument for de-funding the BBC is heard loud and clear!

(sarcasm)

comment 5y ago · link · parent

Seems to have had the kiss of death:

    Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0
    
    Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/index.php on line 54
    
    Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebStart.php on line 63
    
    [..]
Seems kinda weird this stuff isn't cached?

comment 5y ago · link · parent

I've spoken to multiple people employed at tech companies that believe they were 'token' hires, I can summarize their thoughts as thinking the situation was "awful". Biased hiring practices are in quite a few cases hurting the people they aim to help.

comment 5y ago · link · parent

> whatever string you use to represent the null value EG

> "null" is now a keyword that needs to be enforced.

So in the JSON itself, you literally remove the field. In another comment I make is the point that NULL itself could be considered a proper value, you're just pushing the problem down the line. The library making such a decision for you is what may ultimately trip you up.

Instead, you could have something like:

    string name = jobj.get("name", NULL)
So that it does return NULL in this case if a name hasn't been given.

But consider an example where you're loading some code into a VM's RAM:

    int location = toint(jobj.get("address"))
NULL in this case is a perfectly valid place to load a program in a VM, or was it that there was an error? Or is it that no address was given in the JSON configuration?

Instead, we can specify our own "NULL" value:

    int location = toint(jobj.get("address", "-1"))
So now you're asking to load something before the first position of the VM memory, which indicates an error.

comment 5y ago · link · parent

I have a few points I roughly use:

1. What is the most simple representation of the idea? What in the MVP (minimal viable product)? How can you reduce this to it's simplest form?

2. What sub-problems or sub-ideas need to be tackled in order to realize this larger project? Try to figure out which ones must be solved first and which ones can be solved independently.

3. Try to find existing solutions to your abstractions - there's a good chance you're not the first to ask these questions. If there isn't something existing, repeat from step 1.

A ridiculously important part to solving these smaller tasks is to figure out how they can be tested. You don't want to get to the end and figure out some part doesn't work as it needs to.

comment 5y ago · link · parent

One thing I would add is that it's much easier to appreciate existing solutions when you try to build your own. Often these "I could code something better in a day" thoughts turns into thinking "it's a tougher problem than I though".

Other times, though, either I learn something, or end up making something that is much better for me to use. I would suggest at some time every programmer try build their own limited scope library if they find existing solutions do not meet their requirements.

comment 5y ago · link · parent

I think booleans might even be the most problematic, as it's _really_ implementation specific. In C for example you might expect 1 == TRUE, but in other languages this is not the case.

The real problems come in when you handle unexpected cases - and there's no real answer as to whether you return true, false or an error. Personally I think the responsibility should be thrown back at the coder. E.g. I will sometimes do:

    if(!(jobj.get("key", "true").contains("f")))fun();
Where "true" is considered safe and default. Generally you need to make some effort to switch it off by making sure an "f" exists somewhere, but either case is fine.

Imagine for example that the value "true" turns on something potentially dangerous, you might want to guard against accidentally switching it on with:

    if(jobj.get("key", "false").equals("true"))fun();
So you for sure have to make sure the string is "true" to switch it on, nothing else.

comment 5y ago · link · parent

To me the "NULL" of JSON is really the lack of a value. I think having a NULL value could introduce problems.

For example: Did you set `{"address":null}` or did you set `{"address":0x00000000}`? It's important to know the difference, do you need to throw an error or warning? If your NULL value maps to something that is also valid input, how are you supposed to know how to handle the case? If you removed the "address" key on the other hand, you can simply do some exists() functions check.

I think putting types into the JSON spec only serves to create confusion. I think the JSON libraries should offer common helper functions for doing these conversions (e.g. string -> int), but ultimately it's the responsibility of the coder.

comment 5y ago · link · parent

I would think that you would use a lack of a string to encode a NULL value, e.g.:

    { "name":"null", "age":"44" }
vs

    { "age":"44" }
In the first example, your get function would return "null" for "name" and in the second example it would return the value of default, which would be implementation specific.

comment 5y ago · link · parent

> Even null and booleans?

I would say so yes.

Pick null for example, depending on your language of choice, you might choose to utilize: "null", "NULL", "", "undefined", "\0", etc.

The same with booleans, are we speaking "true", "True", "TRUE", "1", "0xFFFFFFFF", or anything that isn't a false is true, etc.

Really how you want to handle these situations is entirely up to you. Personally I prefer some functions like:

    string s = jobj.get(key, default)
The default value being used if a valid string could not be found. Your default could of course be null or equivalent (handle the error), or it could be some known safe value (the show must go on).

comment 5y ago · link · parent

I'm of the opinion that any types other than strings in JSON is a mistake - any parsing assumptions will _never_ be future sufficient. It should be the user of the library's responsibility to implement their own string->type conversions.

comment 6y ago · link · parent

It's tempting to say "yay, there was some silver lining behind the pandemic", but a growing/recovering economy will easily pollute much more to catch up (look at India and China for example during pre-COVID times).

Even if that wasn't to happen, the only thing we successfully did was delay the problem. There is no shortcut. We need to encourage change from the bottom, all the way to the top. Ideally it shouldn't have a drastic impact on daily life.

I think given the diverse and mostly intelligent crowd here on HN it should be possible to really look at creating proper solutions that drive real change. It doesn't even need to be revolutionary, you can start today by cutting down on waste, find efficiencies in your work, switching to sustainable resources, etc. The little things add up.

comment 6y ago · link · parent

Checkout CPU Freq Utils: http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils

You can tune all these things, the trade off is of course performance and battery life.

comment 6y ago · link · parent

> Unless you actually need the GPIO there is no need to go

> SBC.

Or form factor, or weight, or power consumption, or cooling - or a multitude of other reasons.

I do agree though that an old desktop PC can be miles better in terms of performance per dollar, but you'll probably pay for it in electricity bills in the long run.

comment 6y ago · link · parent

I quite like using this distro for simplistic VMs as they have a small footprint and are very fast. An example may be to have some people in a workshop compile and run some code, or perform some networking tasks. As some here will know, having 10+ Ubuntu VMs really starts to eat some disk space!

comment 6y ago · link · parent

I would also like to add that Youtube have relatively recently removed OPML output (which can be used for an RSS feed). This is after they also removed emails for the channels you press the "bell icon". If they do not bring back the RSS feed I'm leaving. I do not want to spend time on their dark-pattern user interface wasting time.

Between this and not paying creators because of some "glitch", showing ads on videos that the creator cannot get paid for (if that be because they don't have "enough" followers or because they got the yellow checkmark), the bullshit preferential treatment of news agencies I could not care less about, becoming the arbiter of truth with "fact checking", randomly deleting channels, zero customer feedback or recourse with a human - the list goes on.

These days, if I want to watch somebody like EEVBlog I can just go to BitChute or Library. Content creators and users are fed up.

comment 6y ago · link · parent

> They wont find anything of interest.

I imagine the hackers of tomorrow will reverse engineer the M1 for the same reason they reverse engineer the chips of yesterday - nostalgia. In any case this will be an interesting note in computing history.

comment 6y ago · link · parent

I agree, it's highly unlikely they would give away their competitive edge. A lot of their speed-ups may even come directly from dedicated silicon anyway, and that would likely be under lock-and-key for quite some time (until hackers of the future reverse engineer the M1).

comment 6y ago · link · parent

The reason they continue to do this is because they know without doubt other Countries will not treat their fishing vessels in the same way. There is zero consequences for their actions and they have zero reason to change their policy.

You might say "the consequence is that they look bad", but they don't, at least not to the people they care about - mainlanders. They own and/or control the news media in mainland China. To produce an anti-CCP news piece in China is suicide for these companies.

External "free" media have their own interests and biases, meaning they may or may not publish articles depending on whether they coincide with their goals. If a bad China news piece makes the current President they support look bad, do you really think it makes headline news?

Honestly, I'm not really sure what to suggest here. Some HN users will post some ideas no doubt, but ultimately the most concerning thing is that none seem to have naturally emerged dominant so far.

comment 6y ago · link · parent

> This isn't a YouTube video.

You can get high-resolution copies of the Big Buck Bunny film and play it locally in the same what.

> What are they going to do?

Obviously this would be a malicious use of DMCA (as it has been with other cases of open source software), but they could:

* Tie them up in long and expensive legal battles, using the system itself to punish them

* Have their repositories DMCA'd

* Contact their service providers and have them revoke their services

I am just suggesting caution.

comment 6y ago · link · parent

I see what you're saying, but isn't showing screenshots of obviously copyrighted material just another form of testing?

comment 6y ago · link · parent

I would suggest they remove the screenshot of the Avengers movie given the amount of DMCA going on for such things... (loosely suggesting some open source software could be used for viewing pirated material.) Big Buck Bunny by the Blender Foundation could be a good replacement [1].

[1] https://www.youtube.com/watch?v=aqz-KE-bpKQ

comment 6y ago · link · parent

Haha, I do like the word "ether"!

I personally think of the water as space, rather than spacetime. I think time is a byproduct of space-mass interactions. I could of course be very wrong!

comment 6y ago · link · parent

> This is not really an accurate analogy sorry.

Well of course, it's an analogy, it only needs to be roughly correct. The idea is simply to build a mental model that many people can picture.

> It's best understood with the reflecting-mirror-as-clock

> thought experiment.

It's good, but not something that really resonates with people's first-hand experiences.

comment 6y ago · link · parent

> I don't think taking it down to an atomic level is useful,

> since it breaks the analogy

It was simply a suggestion as to why things might start behaving weirdly at the quantum level. My understanding is that very small things seem to act as if time doesn't really have any real favoured direction.

Of course the analogy is not perfect and does not measure correctly the scale of forces involved, or even how they behave at different extremes. It's just a rough and ready mental model to begin to see things in this framing.

comment 6y ago · link · parent

The way I like to think of it is like moving your hand through water in a swimming pool; the faster you try to move, the more the water (time) pushes against you. If you don't try to move your hand at all, the water (time) has seemingly no affect on you. In this analogy the water itself is space and time is the measurement of movement resistance.

Of course there are nice little things to explore with this, like moving through running water, currents (localized loops), deep water (dense space), resistance on small vs large things, etc.

If we imagine on the small enough scale where we're looking at single water molecules, resistance (time) doesn't even mean too much. As long as your water is liquid, your little molecules are bouncing around in all directions, only tending towards a given direction with some probability. Otherwise each direction is near and damnit equally easy to travel in.

That's my two cents anyway.

comment 6y ago · link · parent

I have been thinking about chess for a while now as an indicator of cognitive health. Not that a single number can define how smart a person is relative to another, but instead how my own cognitive ability is doing.

I had been using the game of 2048, but given the random element and how easy the game is, it's just not a great measure anymore. I have recently started a different diet and I want some measurable way of knowing how well my own brain is affected by it.

The only real problem with chess as a measurement is that if you do the online games for example you get cheaters, etc. Does this detriment your ranking or do people generally find this not to be a problem?

comment 6y ago · link · parent

Worth also mentioning smaller game engines for devices like the GameBoy (Color): https://github.com/Zal0/ZGB

comment 6y ago · link · parent

> After developing on her laptop, she just SSH’s into her

> cluster at work and schedule’s her job on whatever queue

> she needs.

Then I would imagine your partner is understanding. I would imagine most situations would be where one partner is computing orientated and the non-computing partner might not understand why there is this massive electric munching air breathing rack in their house.

> That’s just the wrong argument.

Clearly I was responding to the points in the parent comment, not specifically the article.

comment 6y ago · link · parent

> 1. Using pre loved (= second hand) rack servers in the

> living room with redundant PSUs will cause a lot of

> trouble with every female living in the same household. It

> is too noisy....

A great time to remind your partner that these projects put the bread on the table. Also remind them how much money it is saving.

There is of course always the possibility to move it elsewhere.

> 2. Consumer grade hardware is pretty reliable nowadays.

It really de[ends on what you're running and how much a crash with affect you. For example, a bit flip in RAM could be catastrophic. Or hard drive failure could be a serious problem (despite backups), in which case you might want some commercial grade RAID.

You also get some nice server specific silicon on your dedicated hardware that you might not otherwise, that could seriously speed up your application under high-load conditions.

1
444546
78