skysight-inc/HackerNews huggingface dataset:
Under the hood I'm going to use Rust `Vec<T>`s to represent lists, so it'd be trivial to provide a FFI operation to append something to the end in constant time. However, we can treat the list like a linked list, and, using recursion, here's a tail-call-optimized implementation of append in linear time:

append = list value -> {
loop = acc rem -> match rem {
[] -> acc,
[head & tail] -> loop [head & acc] tail
}
loop value (List::reverse list)
}

I'm thinking of using something other than the `[a & b]` syntax, but that's besides the point. Note that `loop` does not close over any values other than itself, so it doesn't need to be inside `append`:

loop = acc rem -> ...
append = list value -> ...

The function really starts when we reach this line:

loop value' (List::reverse list')

I added `'` to indicate that this is the last occurrence of both `list` and `value` in this scope, which means that they're passed to `loop` without making a CoW reference. Let's look at `loop`:

loop = acc rem -> match rem {
[] -> acc,
[head & tail] -> loop [head & acc] tail
}

This is where things get complicated, depending on the definition of match. If it were defined as macro, it'd be laborious to write out how it all works by hand. But if we treat `loop` as a function with multiple heads, it's a bit easier.

Here, we have two arms. If the remaining list is empty, we return `acc`. note that each arm is independent, so this usage of `acc` is the last in the scope.

If the list is not empty, we match `rem` against `[head & tail]`. This is equivalent to, roughly:

[head & tail] = rem'

Note how this is the last usage of rem in this scope, meaning it's passed by actual value. This list is then split in-place, with head taking on the value of the first element of the list and tail taking on the value of the rest. Once passed to loop, note that all the values used are the last occurrence of the value in the scope:

loop [head' & acc'] tail'

This means that the actual value is passed down to the next level. Looking at this as a whole, we can see that nothing is ever passed by CoW reference, which means that this operation is performed in-place. And because it's done in a tail-recursive manner, `append` only uses constant space.

So to answer your question specifically: what if append is called with `xs` being a CoW reference?

append &xs y

When we reach the line:

[head & tail] = &rem'

`rem` is mutated, i.e. split in two, so a copy of it is made. This copy is it's own value, so head no tail are no longer CoW. we then call:

loop [head & acc] tail

Note that head and tail are now passed by value and not CoW - same goes for acc. Because nothing is CoW anymore, this tail-recursive implementation operates on the new list, mutating it in place.

In short: the first iteration in `append` makes a copy to the list, but in subsequent iterations the copy is used, and the list is mutated in place.

That was a big one, I'm practically writing the blog post out here, haha! Does this help clear things up?
So when they do it to the Japanese, it's racism, but when they do it to the Germans, it somehow isn't?
I'm guessing you're not the target market. The UK energy market has a huge huckster problem - sleazy door-to-door salesmen and cold callers tricking people who don't know better into switching their energy plans without realizing that's what they're signing up for, even outright faking signatures in some cases.
It is! ComputeSharp doesn't copy buffers automatically, and this is done on purpose to give you more control over when exactly to copy your data back and forth. You can either use normal resource types (eg. ReadWriteBuffer<T>) and manually copy data to/from them before and after running a kernel on the GPU, or you can also create some transfer buffers (eg. UploadBuffer<T> and ReadBackBuffer<T>) and use them to have more fine-grained control over all copy operations and also the allocations of temporary GPU buffers to control copies.

I'm currently writing some updated docs to go over all these details, since the ones currently on GitHub only refer to the previous v1 release of the library.
But electricity isn't inherently dirty, right? It's probably better to have the network shift to greener sources than have every consumer do that individually.
What will happen to the cards once the crypto boom is over? There was a lot of trashed AntMiners out there after the late 2017 bubble, and with it a good amount of CAPEX written down.
Not possibly working on Windows is, for some of us, a feature. I have no wish to support that ecosystem due to the past ethical violations that founded it, and making it impossible to do so would avoid having to deal with it.
The explanation of needing to pre-heat the air into the heat pump is strange. Modern A/C systems can pump heat at 500%+ efficiency even with very cold outside temperatures, no pre-heating needed. Replacing that with resistances is a 5x or more reduction in efficiency. That heat pump doesn't seem to have an outside unit so may be less efficient but it would need to be very poor to go down to only 100%. Installing a proper A/C system would provide both much higher efficiency heating in winter but also add the capability to cool in summer when the solar panels are actually providing a lot of energy.
And that's why there is no such thing as global warming.
Temp bans are there to stop bots. But only legit players suffer, bots just wait a few seconds.
Time until pubs open in England
I don't consider cryptocurrency mining as overall beneficial for humanity.

You know, humanity has this huge issue of CO2 in atmosphere, maybe you have heard of it?

We are building more and more renewable sources, but cryptocurrency mining is countering these benefits to a considerable extent.

Additionally, even if we are able to produce 100% energy from renewable sources it still requires energy to scrub carbon from our atmosphere and so any energy put in bitcoin could be used for like saving our planet.
I don’t think GP misunderstood what miners do. What I believe he means by wasted cycles is that the final product in crypto doesn’t have any practical purpose aside from what was agreed on by convention. For any other purpose it’s a wasted effort. This calculation power could instead be used to try to find new practical knowledge, like protein folding to use on new medicine etc.
Denmark debuts children's TV show about a man with huge and uncontrollable
Show HN: We wrote a manifesto for Developer Experience
Note that the fact that you can communicate during LDs through eye movements has been known and used for decades already.
I was on the Java hate train till I was forced to use it. It became my favorite language. For being so old, Java has avoided feature creep and bad decisions that make old code painful to deal with.

Sometimes I work on 10+ year old areas of codebase and it's fine. Compared to dumpster fire of 10 year old JS/Python/C++ it's paradise.

I use lombok judiciously to avoid getters/setters, the cruftiest part of Java. Newer versions of Java are quite pleasant.

Java is extremely mature. I pull in a library and it "just works" 99% of the time. No worries about the version of Java is was built for or missing native dependencies. Practically every language falls short of the polished user experience in Java.

I don't like Kotlin because the non-Android experience is an afterthought and it's a captured language by Google and Jetbrains. Java has a lot more hands at the wheel.
Where do you think electric trains get their electricity from?
Bas55: ECMA-55 Minimal Basic System
I agree, but in that case why bother? In replying with such a distinction, the assumption is that you're actually responding directly to the op, not just quoting truisms.
I too was skeptical at first, but it does look like this is a heat pump. Heat pumps take as "input" a stream of air at temperatures T_cold and T_hot (T_cold < T_hot) and output streams at temperatures T_verycold and T_veryhot.

You can see these four pipes here, around component (1): https://pictshare.net/1024/sbmusz.jpg

T_cold comes from outside and T_hot comes from inside; T_verycold and T_veryhot go to the outside and to the inside.

However, the efficiency of the heat pump decreases as T_cold lowers (see https://en.wikipedia.org/wiki/Heat_pump_and_refrigeration_cy... ).

So by "preheating" T_cold with the bitcoin miner, the efficiency of the heat pump itself increases.

However, the efficiency of the whole system (heat pump + miner) decreases when you have the miner on. (Otherwise, heat pumps would just have a built-in heater to do it.)

So adding the bitcoin miner decreases the power efficiency of the whole system; but it may increase the monetary efficiency, if the revenue generated by the miner is high enough to compensate for the increased power usage.
Welcome to digg.
That's what happened to them right before they went out.
It's been fun.
Hello HN!

At DX Heroes, we continuously push for the optimal conditions in teams for developers in order to maximise Developer Experience. It is a relatively newly coined term but essentially, it’s very much like User Experience… but for developers.

To help us achieve this goal and in order to standardise the best practices, we wrote out 9 principles into our own manifesto. The manifesto, is the result of our combined experience as a group of seasoned developers, who have experienced all the goods and the bads (including all the big fuck-ups). We would be grateful for your signatures, if you agree with our propositions for setting up the optimal Developer Experience.

Likewise, we would also appreciate your point of view on the matter and any sort of feedback. Whether that be some new principles that you’d like to add or even if you disagree with the listed points. Let us know in the comments, and we can discuss it!

P.S.: The Developer Experience Manifesto is, of course, available on an open source repository at https://github.com/developerexperiencemanifesto/dxmanifesto. Feel free to draft your own Pull Requests and we’ll make sure to review them.
Lucid Motors strikes SPAC deal to go public with $24B valuation
Any coins / tokens that implement this or something similar?
Tesla has made $1B profit on its Bitcoin investment
It's a fallacy that high hashrate means high security.

What matters is the % of miners that are honest. (See bitcoin.pdf)

High hashrate just means higher difficulty. (The difficulty controls the average time between blocks, so it's always targeting to be 10 min on average).

Also, for heating your home, mining bitcoin could end you up with a loss. For example, your heater needs an internet connection, and your heater is will become out-of-date very quickly as new more advanced bitcoin mining gear becomes available. You would also need to have your heater on 24/7 to break even, this it will cost you to turn off the mining heater due to warm weather or to cool it.

Not to mention the noise.
Not sure about FB as I'm not a FB user. But for Google that's was not the case long time ago. In the past Google was sending visitors to the source link/original location but that practice now becomes showing the visitor a digest by default and diminished the original link in small grey text and thus most visitor can hardly spot the original link and and the page visiting the original site deserves is not going to happen any more.
I'm not sure I understand the principle.

A heat pump achieves a COP (coefficient of performance) of approx. 3-4 (e.g. by investing 1 kWh of electricity, a heat pump generates 3-4 kWh of heat by extracting from the surroundings, air or sole, 2-3 kWh). In this example, by pre-heating the air, you supply the heat pump with ~0.9 kWh of thermal energy (the miner will convert 900 watt directly to heat I would assume). So instead of 1 kWh of electricity consumption from the heatpump, you have 1 kWh of electricity for the heat pump, plus 0.9 kWh for the mining, and you end up with a bit more than 3-4 kWh (since the COP of a heat pump increases if the source temperature is higher).

So in a nuthsell:
before: in 1 kWh, out 3-4 kWh
after: in 1.9 kWh, out 3.5 - 4.5 kWh

so you lose 0.4 kWh?
It makes sense from their perspective: they have datacentres upon datacentres of computing power that power their own endeavours, but are underutilized. So they monetize the remaining capacity in any way they can
Why? Judging from the photo his pack looks fairly light and minimalist. His clothing seems robust. Effective-looking head cover. Boots are probably heavy but nailed. Typical and practical working clothes of the time it seems to me.
They asked. I felt it was a distinction worth making.

You aren't the OP. Why do you care so much? Why do you feel compelled to engage with the words on the screen of some internet stranger who likely has a different cultural background from you and does things for reasons different from yours?
> I guess you could have this json+ convert into some custom javascript class that allows arrays/objects as map keys rather than the normal javascript object that only accepts strings as map keys.

Sure - why not? JSON doesn't have to map directly to JavaScript objects.
My Journey into Game Development
Maybe I studied too much topology in my youth, but the title of this article strikes me as nonsensical... How do you walk around an island? You can swim around an island, or walk around a lake. But you cannot really walk around an island (or, if you can, it seems very easy to do: just go to the island and turn around yourself).
All of these amendments favour Facebook. It also buys them time. I guess we will have to wait and see after the 2 month mediation period is up who has the upper hand.

I guess the answer to who won, Facebook or the Australian government depends on what you consider a win here. I personally would consider Facebooks strike and the forcing of the Australian governments hand to pass legislation that didn't want to pass a win for Facebook.
Not really. Green is used by school principals too.
Reddit is a leftist echo chamber
I chose mmap based on benchmarking. Writing a 2 GiB memory buffer to a file using write(2) was slower than directly constructing file contents to mmap'ed memory region.

What is more interesting is the real bottleneck was not about mmap vs write(v) but in the filesystem. If you create a fresh file and write 2 GiB of data to that file, it takes like 700 milliseconds on my machine (ext4 fs), but if you write the same amount of data to an existing 2 GiB file, the IO speed doubles. So, the filesystem's performance to allocate new disk blocks seems to limit the performance of my linker. That reminded me of the axiom: don't guess about performance but measure.
> 2nd law of thermodynamics as core security mechanism

LOL... this is the most ridiculous claim I've heard about crypto-mining yet. Might as well buy a truck-full of wine glasses, break them and use the shards of broken glass to prove that I've "expended effort". Now we're using the asymmetry of time itself as a security mechanism. Come to think of it, that may be actually less wasteful than burning the electricity to mine Bitcoin.
What is Reddit's value? There's no secret sauce, its popularity just comes from the network effect. The UI/UX post-redesign is horrible and slow, and the site is bombarded with politics and hatred.

I've had a few Reddit accounts over the years and always deleted them after a few posts. Nobody is capable of having a decent debate without ad hominems, strawman arguments, and downvote bombing. Any opinion against the grain will be silenced and probably just banned. For this reason I actually think Reddit is one of the worse social media sites. I only use it to consume content now and try to stay away from the main subreddits.
I think many health problems are related to not a few single causes, but to a cocktail of problems, some chemical, other purely lifestyle(sleep, food, exercise).

It's humbling how much AND little we know about processes in the body. Just read the article and comments some days ago about antidepressants. https://news.ycombinator.com/item?id=26197140
Many != All

So prices are numbers (if supplied in cents, the smallest unit). There is length/depth/height/weight/... A lot of things are actual numbers. Why supply them as string?

I agree partially with you but think ZIP are a very bad example because a zip itself may also contain letters.
An Asian 150cc is definitely not what you get in London.

It would be the most barebones scooter you can imagine, with motor making less than 10hp, body made from very thin metal, and it will rust to nothing in 5 years.
> Examples of lies and conspiracy theory parotted by GPT-3

How do you know they are lies? :)
The thing I find funny about HackerNews is how you see plenty of wasteful hobby projects hit the main page.

Yet someone using a crypto miner to generate heat / side money is somehow a terrible project.
You assume DCs are cooled by the whole volume of air inside when in fact you can put heat pipes on components and get closer to 70-90 degrees heat source. Even years ago when I worked in datacenters the air was circulated from outside to the server rack and then back outside, never crossing from the rack into server room.

Newer generations of CPUs are going to be exchange less frequently but will produce more energy as they offer more dense computing. This makes case for investing more in the server hardware.

Even then understand, that 7% of a huge amount of energy is still huge amount of energy.

Edit: Apparently "Facebook datacenter in Denmark is supplying around 10.000 homes with heating" -- source, another poster.

So... you need to rethink your expertise on defining what is and what is not viable.
It's mainly because they still behave more like airplanes. They can't hover (!), their turns have a certain radius, they have a take-off roll and usually a short landing roll, they need to actually fly a landing approach (albeit a very steep one).

Also they have a single large unducted rotor that's easy to destroy or hurt someone with, and you can't have automatic collision avoidance, because you can't easily stop an autogyro in mid-air.
To clarify the headline: Long Blockchain is a company that hasn't filed financial reports since 2018.
Is it better to leave Centos?
Our company moved all our Linux o.s. to Centos many years ago (it was my personal will and decision as senior sys admin): before we had a mix of linuxs and the move helped much a lot mainly for having everywhere the same o.s., but also on upgrading o.s. (always very easy and smooth: just one command with no configuration questions!)

Very happy so far! Centos in our dev and production servers, and Fedora in our laptops.

now you know what is happening: and I have to take a decision (and pretty soon since all our Centos are v.7)

Can you help us with our decision? If we leave Centos we'll opt for Ubuntu of course (but personally I do not like snap).

Thanks
> Examples of lies and conspiracy theory parotted by GPT-3

How do you know they are lies?
Personally, I’ve never understood why a society may punish somebody based on what they was doing with their body. That’s one of the most wide spread violences of the basic human rights.
I don't really love his shtick generally (a bit too try hard and salesman for my liking) but I think he's honest and not trying to con anyone. For example I tried the slow carb diet he proposes and I lost tonnes of weight.
Not that I find this idea useful for otherwise limited DTO format, which JSON is, but JS has Map, which may be used for such maps.
I've no idea what the official app is like, but they're pushing it so hard that I can't imagine it's for my benefit :)
> Success! I was able to lower my heat pump's electricity needs by ~50%

(didn't downvote you, just pointing out that you missed the point of the article)
Im not sure what it’s doing but “folding@home” is doing biology simulations as it’s useful distributed computing, that can probably generate some warmth.

https://en.m.wikipedia.org/wiki/Folding@home
While I basically agree, there‘s a difference between „always send numbers as string“ and „send something that looks like a number but is actually a string as a string“.

Why should i send a dimension as a string? How am I going to calculate the volume from 3 strings?
To "walk around" means to roam or wander. Most people understand this use of the phrase.

But in this case, the man seems to have actually walked the perimeter of the island.
A more complex plan isn't already more expensive in a way that captures how much work the JIT will need to do. I think I'll need to write a separate blog post about that, with details and examples.
Are you asking if mold can link an executable file and its depending .so files into a single binary? If so, neither mold nor other major linkers can't do that.
The symbol with three arrows in a triangle and a code does not mean an item is recyclable. The official name is a Resin Identification Code. It lets you identify what material an item is made of, but it does not say whether it can be recycled or not, as that varies depending on local facilities.

https://en.m.wikipedia.org/wiki/Resin_identification_code
> Asians are probably eating less GMO soy

I may be out of the loop here, but why do you say that? Are Asians particularly more GMO-averse than Americans?
AAL2292 Flown Over By Cylindrical Object
Everything we do impinges on someone else's freedom. Being legally allowed to walk in the street? Impinges on someone else's freedom to block me from walking in the street.

It is always a tradeoff. In the case of the particular tech discussed, it's a tradeoff between being able to somewhat control crime (e.g, making payment for human trafficking harder, making it possible to reverse theft) and financial privacy. It's freedom from having things stolen and freedom from being regulated.
From the Wikipedia article someone else posted:

In September 1921 he began a walk around the perimeter of Australia, from Sydney to Sydney, anticlockwise.

https://en.wikipedia.org/wiki/Aidan_de_Brune
I really hope Greg Isenburg is never given any power over any website I care about.

These are all awful ideas.
> terrible project

I think that's a terrible comment.
I salute everyone that tries to make the incredible inefficient third law of thermodynamics more efficient.

Sure, you can say that crypto mining is superfluid. But so is all human invented technology to a degree. I rather have someone building a cool heating system than enormous data centers wasting it.
Set aside the ethics issues for the moment, the criticism that Google is neglecting alternatives to neural networks is probably reasonably fair.

But on the other hand, research labs or not, Google is still a commercial entity driven by a shorter term horizon than your average academic.

Google Research has probably subconsciously drifted towards areas (or at least applications) that can tangibly benefit Google in the near future. Neural networks might not be The Answer (TM), but they can deliver results today, and there's still untapped potential. Speech recognition, search, speech synthesis - all core Google products - have all benefited from neural networks, not to mention the broader applications like protein folding for DeepMind.

I'm hesitant to find fault in a corporate group that's doubling down on the stuff that's actually delivering results, even if it's probably not the path to AGI.

I probably wouldn't be so lenient with OpenAI, because they are (were) purely a research outfit, openly committed to AGI.
I assumed they were talking about reused glass bottles. Here (so in Belgium) I buy cases of water bottles with a deposit and return them empty.

The bottles are reused, and the water tastes a lot better than at least my tap water (in Antwerp - the tap water comes from a stagnant canal used for merchandise shipping, and last year for example it turned green and smelled of algae for a while after a ship carrying fertilizer capsized).
I hope he uses a large air filter before GPUs.