[1] https://stackoverflow.com/questions/7616461/generate-a-hash-...
870 karma · joined June 15, 2011
[1] https://stackoverflow.com/questions/7616461/generate-a-hash-...
I.e.
XOR(x,y) = NOR(0, NOR(NOR(x,y), NOR(NOR(x,0),NOR(y,0)))))
(maybe not the most minimal version and maybe even wrong)But he wrote that he'd used "TCP over UDP". The first lines of the TCP over UDP spec already state
"It provides exactly the same congestion control, flow control, reliability, and extension mechanisms as offered by TCP." [1]
[1] https://tools.ietf.org/id/draft-baset-tsvwg-tcp-over-udp-01....
TCP is designed for encapsulation in IP, this is why it is called TCP/IP. And UDP is very similar to IP, only difference is that UDP gives you source and destination port numbers and a payload checksum, where IP only gives you a protocol numbers and non-checksummed data. None of these "features" is going to have any effect on how TCP is delivered.
So the only effect that use of TCP over UDP would have here is:
- increase the overhead used for headers, thereby decreasing the MSS (segment size)
- "cloak" the TCP traffic as UDP and thereby prevent any routers and/or middleboxes [2] from applying special treatment to TCP (i.e. traffic shaping, buffering etc.)
Maybe the latter effect is what made a difference for the link in question.
[1] https://tools.ietf.org/id/draft-baset-tsvwg-tcp-over-udp-01....
[2] https://en.wikipedia.org/wiki/Middlebox
edit: formatting
- weather is mostly about complex local interactions between air pressure / surface temperature / air flow (convection) / humidity etc. these are described by differential equations with very chaotic behaviour (small changes in inputs may have extreme effects on the outputs the further you run the model)
- climate is more about long-time effects of the energy input/output of the whole planetary surface and atmosphere. Mostly solar radiation (input) vs. black-body radiation (output). There are also some complex interactions and feedback cycles e.g. change of albedo (cloud cover), and changes of atmospheric composition (i.e. methane due to permafrost melting), but local weather patterns may cancel out when looking at the sum-total of surface thermal energy.
[EDIT] The following steps fix playback in Firefox for me:
- I press F12 to open the web-developer tools,
- select the "Console" Tab
- at the prompt at the bottom (marked by ">>") enter:
document.querySelector("pre#screen").setAttribute("style", "font-family:Monospace;")
- press Return. Renders correctly now.Here [1] is an alternative do..while loop implementation provided by Tcllib, written in pure Tcl.
[1] https://core.tcl-lang.org/tcllib/artifact/4f7e97706ff67a40
Handling binary data is pretty trivial, e.g. to read a full binary file into a binary string, you do:
set h [open "filename.bin" r]
fconfigure $h -encoding binary -translation binary
set data [read $h]
Then you even have a fantastic way to operate on low-level binary data of any endianness using Tcl's binary scan /binary format instructions [1] (basically what Javascript later invented as DataView).Tcl was one of the first languages I knew that properly and consistently supported multibyte text throughout the full language, including in Tk GUIs. I.e. writing a cross-platform GUI that could handle Japanese character input/output basically "just worked". You could even read ShiftJIS or ISO encodings of japanese text, which was at the time a prerequisite as Japanese Windows versions were non-unicode (everything done in ShiftJIS AFAIR).
[edit] here is a real-world example of a trivial script handling binary data [2]: reading binary RGBA 4 bytes/pixel image data and outputting RGB 3b/pixel into a pipe that finally outputs a .PNG image. It's difficult to find a programming language that can do that in less lines and with more clarity.
[1] https://wiki.tcl-lang.org/page/binary+scan
[2] https://stech.muecke.pw/opensvn/free/trunk/dkbin/nn-fbtopng
Just saying that there is precedent for licenses being used to protect against overreaching "IP" laws.
[1] https://www.gnu.org/licenses/gpl-faq.html#v3PatentRetaliatio...
(a) Smart pointers + static analysis + sanitizers make C++ pretty usable
(b) C++ usability requires brittle, half-baked add-ons such as smart pointers and non-deterministic/heuristic/unreliable/NP-hard development tools such as static analysis + sanitizers.
Everybody and their uncle had a lot of ideas about how they would fix "C++". Eventually all those contradicting ideas got merged into the C++ standard.
:)
auto self = shared_from_this();
document.onclick([self](){self->doit(); } );
I'm not sure there is a way to express that in C++ without use of enable_shared_from_this.It is very easy to accidentally run this kind of code from a constructor where shared_from_this() is a 0-ptr.
make_shared also only helps in 95% of cases. E.g. it does not allow specifying a custom deleter, which is a use-case that is allowed by the shared_ptr<> constructor. It also won't fix any of the problems WRT shared_from_this() being called in the constructor.
- C++ code where some method calls std::shared_from_this(), and that method ends up being called indirectly during the object's construction, leading to a 0-pointer dereference [1]
- accidentally creating two shared-pointers to the same object leading to an eventual double-free (that may just silently corrupt the heap while the program continues running)
- undetectable cyclic shared_ptr<> references somewhere deeply hidden in the code causing a memory leak
Modern C++ feels like a case of "but we can do that in C++, too" syndrome. Stuff that "just works" in Java or Lisp, can now be done in C++, too, however in C++ it will only work for 95% of all use cases, and break in a spectacular manner for the remaining 5%.
E.g. think about the template meta-programming madness (and efficiency WRT compile-time) and compare that with what Lisp offers (see also [2]).
[1] https://stackoverflow.com/questions/31924396/why-shared-from... standpoint
[2] http://people.cs.uchicago.edu/~jacobm/pubs/templates.html
You have a choice between multiple script languages (Lua, Javascript and more). The run-time library [3] only has a handful of simple functions but is feature-complete nonetheless (plus there is some address-based peek/poke API to do more advanced, low-level stuff).
I'd imagine learning javascript programming by starting game-development in TIC-80 to be much more straight-forward than attempting to wrestle with the complexities of HTML5+CSS+javascript+tooling for in-browser programming.
Also at intersections, being really quick at acceleration allows you to get out of the danger zone of cars crossing your path before there's a conflict. Think about right-turning trucks starting after a red traffic light.
I think fitness (and maybe reaction time) is some reason why severe cycling accidents seem to happen to older cyclist at a higher rate. In Berlin out of 15 cycling deaths this year, more than half of them are age 60 and higher [1], 3 are beyond 80 years of age.
[1] https://adfc-berlin.de/radverkehr/sicherheit/information-und...
Yeah, for Berlin at least it's a very difficult question trying to find out how to move forward from the current half-assed state of affairs.
There is some sort of new law/policy that defines how proper bike infrastructure should look like [1] defining minimum width and stating that bike-lines should not be put onto foot-walks. However not many actions where performed based on that law which was also drafted in a way that prevents bringing forward proper legal action when not adhered to.
Maybe also something needs to be done WRT driving school, where bike-related issues are not really taught as far as I'm aware of. Most drivers (and maybe most teachers at driving school) still believe that cyclists do not belong onto the road and do not understand how driver behaviour endangers them. Minimum car<->bike overtaking distance (1.5 m) for example is generally ignored by more than half of cars.
[1] https://de.wikipedia.org/wiki/Berliner_Mobilit%C3%A4tsgesetz
Berlin just got 15 more of those bikes this year already (which is more than usual, maybe due to corona).
In Germany there used to be a a general obligation to use bike-lanes when present, which was overturned by court, because of the safety argument.
As a cyclist I'm harassed at least once a weak by drivers who think I should use the non-obligatory bike-lane. This makes it very difficult to consciously chose the safer road instead of the (too narrow, too badly lit, too close to foot-traffic, too damaged, full of glass shards) bike-lane.
Erosion due to micrometeorites erodes the surface of the moon at 1mm per 1e6 years [1]. I wonder whether erosion of human-made moon artifacts will commence at a comparable rate.
Note that the hull thickness of the apollo lander is just 0.3 mm [2]. Part of the propulsion system, tanks etc. would be the components to last longest, butt 100 million years may be quite a stretch.
[1] https://mauricejscollins.wixsite.com/moonscience
[2] https://space.stackexchange.com/questions/924/what-would-hav...
I wish I could share your optimism. Climate change may be a slow moving disaster, however it is more a "high latency" moving disaster. In the sense that once the symptoms start hurting us, it will not be possible to administer any control inputs that will effect the course of climate change within an acceptable period of time.
And while we may be good at mitigating long term changes, I think "existential crisis" kind of long term changes may not have any modes of mitigation that would be acceptable to the current generation of humans (like accepting that 90% of world population just won't have a chance of long-term surivival).
> Obviously not true.
I think GP was referring to predictions of climate sensibility to changes in CO2 concentration appearing to track the predicted worst-case [1]. He was not referring to the predictions of CO2 concentration per se.
And the predictions about CO2 rise you refer to are not very comforting anyway. If the 2 degree line is crossed, as predicted by these data, then a cascade of tipping points [2] will likely put the earth into a permanently "hot" climate state.
[1] https://www.theguardian.com/environment/2020/jun/13/climate-...
[2] https://en.wikipedia.org/wiki/Tipping_points_in_the_climate_...
In such a climate, earth would possibly not be able to sustain a large multi-billion human population.
- We do control clouds and cloud cover albedo [1].
- Human-induced changes to composition of earth's athmosphere result in about 3 Watts of additional heating per square meter of earth's surface [2]. That's almost 1% of the normal solar heating, or > 2K of (eventual) equalibrium temperature increase, so maybe we should call that "climate control" after all?
[1] https://www.faa.gov/about/office_org/headquarters_offices/ap...
Unfortunately (for us) it does look like newer predictions predict worse outcomes with higher confidence [1].
PS: yes scientific consensus changes over time as a function of available measurement data and understanding. That's not a sign of failure but of improved scientific insight.
[1] https://www.counterpunch.org/2020/03/18/the-ipccs-worst-case...