Hacker News new | past | comments | ask | show | jobs | submit | sivizius's comments login

For the record:

    let squares: Vec<_> = numbers.iter().filter(x => x >= 0).map(x => x * x).collect();
is not valid Rust, but this is:

    let squares: Vec<_> = numbers.iter().filter(|&&x| x >= 0).map(|x| x * x).collect();


The above seems more like valid TypeScript instead.


yes, because watching molecules is easy…right?


Issue with unconstrained template-based approaches: Only static dispatch is possible which means, the compiler has to duplicate the procedure for all actual type-combinations and a procedure cannot return objects of different types, even though your are only interested in the interface they implement.

Well, you could if you either ensure, that the layout of the inherited part of a structure is the same for all structures, that inherit the same structure. Or you could return a tagged enum. However, with interfaces or traits, you just have to ensure that the table of interface/trait-methods of different types, that implement the same interface/trait. This table is constant and therefore a reference to it can be shared by every instance of the interface/trait.

Yes, it might be slower, because instead of direct method-calls, you have a layer of indirection, but you only need one copy of the method, not one for every type-combination. If all copies of this method have to fit in the L1-cache simultaneously but cannot, it might actually be faster.


You seem to be the only one here pathologising ADHD.


Pathologising ADHD? Can you actually read? Im saying the opposite in my comment


There is also another term for this: ADHD. Even though ADHD does not really have anything to do with attention, it is more of a motivation-issue, which can led to starting new, promising projects instead of finishing projects, because you find more and more obstacles.


And he is talking about the diesel effect. This implies the presence of an oxidiser like oxygen. Yes, CH₄ + 2 H₂O does react to CO₂ and 4 H₂, but not under high pressure and it is endothermic, so nope. And this pipeline has an diameter of more than a metre, so this plug must be quite large. Yes, the pressure was 105 bar which is more than enough for the creating of these clathrates but this must be a lot of water o.o…anyway, I am not an expert, but this articles sounds a lot like he took a lot of knowledge from here: https://petrowiki.spe.org/Hydrate_plug_removal. But I like the idea. An deliberate attack is somewhat unsound for me, I do not see a reason for Russia to destroy both pipelines. NS1: ok, Russia tried to pressure Germany to open NS2 anyway. All 4 of them at different spots? At almost the same time? And if they maintained them all simultaneously (Why so fast? They have time now.), if one broke, they should have stopped anything on the other one, which exploded 17 h later. And this articles assumes a lot of incompetence on the Russian side…I do not buy this.


KOH is not soap, it is used in the production of soap and KOH will make your skin to soap. Destroying anything organic by cooking it in strong lye at 120 °C with quite polar solvent is not something unexpected. It might be optimised with crown ethers or other phase-transfer catalysts, but I cannot see how this is a milder treatment than simple heating it until decomposition. To make this reaction affordable one has to extract/purify these forever-chemicals first. Otherwise, mostly other stuff will be destroyed. Lime (Ca(OH)₂) is somewhat cheaper in this quantities, maybe this reaction can be done with it. This will also bind any fluoride ions, which would make this way less toxic.


Asbestos is a silicate…


And, in quantity, even the "harmless" silicates aren't.

https://en.wikipedia.org/wiki/Silicosis


I meant naturally occuring ones like sand. Even glass is kind of related. Didn't want to elaborate too much. But indeed it is.


RSA is bad, because developers do not implement it as specified and ECC is good, because most developers will not implement it themself, because they do not understand ECC and therefor use libraries? IMHO a huge advantage of RSA over ECC is it is easy to explain. After you have explained the different kinds of elliptic curves and their pitfalls, you have to explain the integrated encryption scheme to actually use it for encryption. But ok, you want hybrid encryption with RSA too, but in theory, you do not have to.


The article's argument is that because RSA is easy to explain, developers are more likely to roll their own and do it wrong. But that's mainly an argument against "roll your own", for those who aren't expert or aren't willing to take the time to learn all the pitfalls.


So, a RegEx (melody syntax) to RegEx (unspecified syntax) compiler? I mean, the syntax is nice, but 1. please specify which kind of regular expression it compiles to, 2. are those really regular expressions or a language higher in the chomsky hierarchy? 3. I suggest to add a graphical output of the state machine, e.g. with graphviz.


As for 1: "The current goal is supporting the JavaScript implementation of regular expressions." Right on the readme :). 2: I couldn't tell you, but does it matter if it has a practical use? I for one never understood why regexes have the notation they have, and always struggle because I use them next to never. This looks like an attempt to make something that would suit me better. 3. What do you mean exactly?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: