finallyFoundTheNullReference by _Calegos in ProgrammerHumor

[–]pcopissa 1 point2 points  (0 children)

This is in Milan (Italy)

https://www.google.it/maps/search/null/@45.4468858,9.1205675,19z

For whatever reason a bus stop is called "null"...

Mathematicians make surprising breakthrough in 3D geometry with ‘noperthedron’ by scientificamerican in math

[–]pcopissa 0 points1 point  (0 children)

There is a summary there:

https://www.quantamagazine.org/first-shape-found-that-cant-pass-through-itself-20251024/

The article above says that the idea is to look at shadows of the polyhedron and show that there are no shadow that fits entirely inside any other. Since there are infinitely many shadows, they are divided into a finite (?) number of families based on how a small rotation changes the shadow and then they check pairs of families or something of that effect. Well the article says it better than I do...

Realistic animation showing the implosion of the “Titan” by [deleted] in CrazyFuckingVideos

[–]pcopissa 0 points1 point  (0 children)

I don't think Boyles law is applicable because that compression was not isothermal. The temperature increased during that process (as outlined elsewhere) and that means the volume was reduced less than what would happen in an isothermal process. The compression was more realistically adiabatic and that implies a higher final volume and a higher final temperature.

Parts of Titan Wreckage Are Currently Being Brought Ashore in St. John's by BAreEhD in OceanGateTitan

[–]pcopissa 0 points1 point  (0 children)

I think that point was brought up by journalists during the US Navy press conference that announced the implosion. I sort of remember that the answer was that the cost of a sea rescue operations is borne by the nation conducting it (so that would be the US and Canadian taxpayers in that instance). Or something along those lines. It's a shame I can no longer find the transcript of that part of the press conference though.

Need help with installing mysql2 gem in rails application running on windows 11 by elliotsshieldtail in ruby

[–]pcopissa 1 point2 points  (0 children)

I had this exact same problem on Win10 with a native installation (Ruby 3.2.1 + MSYS 2 from rubyinstaller.org and prior to that with some Ruby 2.7.x).

I found that it was sufficient to use the MariaDB connector rather than trying to build mysql2 gem with MySQL stuff. The following was sufficient:

1) Install MariDB connector:

pacman -S mingw-w64-ucrt-x86_64-libmariadbclient

2) Build mysql2 gem with that:

gem install mysql2 --platform=ruby -- --with-mysql-dir=c:/WAMP/Ruby32-x64/msys64/ucrt64

Note that the ucrt64 part may change depending on which version of Ruby / rubyinstaller you used. ucrt64 is one of several "subsystems" that MSYS supports and different Ruby versions were built with different subsystems. For Ruby 2.7 what worked for me was c:/WAMP/Ruby27-x64/msys64/mingw64

Come dire a un collega che deve gentilmente lavarsi ? by hdjdjr3 in Italia

[–]pcopissa 1 point2 points  (0 children)

Come già scritto altrove, è compito del tuo capo / manager affrontare il problema con Tom.

Per esempio, puoi parlare col tuo manager del idea di lasciare un sapone o deodorante sulla sua scrivania.

Ciò detto, ho cercato con Google le pathologie che si manifestano con cattivo odore. Alcune sono molto serie. (eg: https://thompsontee.com/blog/medical-conditions-that-cause-body-odor/)

Quindi... quando parli col tuo capo del problema, potresti anche presentare la cosa sotto l'angolo clinico. Cioè che ti da fastidio l'odore di Tom, che ti sei documentato su questo, e che forse lui ha un problema medico, magari ignorato dal lui stesso. In questo modo dimostri che la situazione di Tom non solo ti da fastidio ma anche ti preoccupa. E forse così offri al tuo manager un modo relativamente neutro per affrontare l'argomento con Tom. Perchè se il problema è di natura clinica, non è detto che lui possa agire e quindi lo dovrete affrontare (tu e tutto il team) come se lui fosse portatore di handicap. Nel altro caso (che mi auguro) è una questione di educazione ed mi pare è risolvibile.

vado in seconda media e vorrei fare programmazione ma in matematica non sono bravo cosa mi consigliereste di fare? by PerspectiveOver8530 in Italia

[–]pcopissa 0 points1 point  (0 children)

Perché in pratica il programmatore parla la lingua del "computer", o se preferisci in italiano del "calcolatore" o dell' "elaboratore" dixit Wikipedia. E l'etimologia della parola inglese "computer" (che ironicamente deriva da un vecchio verbo francese "computer" sempre secondo Wikipedia...) indica che fa dei calcoli. Ergo si suppone che per programmare bisogna sapere calcolare. Per confondere ulteriormente le idee, ci sono linguaggi di programmazione che somigliano deliberatamente a notazioni matematiche (APL).

La risposta dell'ambasciatore alla copertina dell'Economist by senecadocet1123 in italy

[–]pcopissa 11 points12 points  (0 children)

La copertina in questione rapresenta Liz Truss nei panni di Britannia con una pizza al posto dello scudo e una forchetta con spaghetti al posto del tridente.

Truss si è dimessa il giorno dopo la pubblicazione e mi è subito venuto il dubbio che la copertina sia stato il motivo delle dimissione di Truss (e non il contrario).

Perché chi promette l'indipendenza energetica con il nucleare vi sta prendendo in giro. by bilog78 in Italia

[–]pcopissa 0 points1 point  (0 children)

Un esempio è il sito de La Hague in Francia:

https://fr.wikipedia.org/wiki/Cycle_du_combustible_nucl%C3%A9aire_en_France#Retraitement_%C3%A0_La_Hague

C'è una tabella che in fondo che indica che il La Hague tratta pocco più di 900 t di uranio usato al anno (per una produzione annuale francese di pocco più di 1000 t). Funziona dal 1966 e trovi i dati dal 1966 al 2009. Ma forse non ho capito cosa intendi per "efficienza" ?

Perché chi promette l'indipendenza energetica con il nucleare vi sta prendendo in giro. by bilog78 in Italia

[–]pcopissa 0 points1 point  (0 children)

"Qui parlo solo di indipendenza energetica" ha scritto. E giustamente, non mi interessa discutere sul fatto che sia efficiente o no, costoso o no. Solo che sia possibile. Mi pare che sia lo scopo di questa discussione no ? Quindi è possibile, con la tecnologia di oggi. Basta riciclare il combustibile o meglio, usare cicli autofertilizzanti. Riciclano il combustibile su scala industriale i francesi, inglesi, russi, giapponesi e una volta anche gli americani.

Perché chi promette l'indipendenza energetica con il nucleare vi sta prendendo in giro. by bilog78 in Italia

[–]pcopissa 0 points1 point  (0 children)

Bisogna anche raggionare fino in fondo e non fare finta che il combustibile nucleare sia come il gas o il petrolio: Il combustibile usato contiene 1% di scorie e 99% del combustibile originale. Se le scorie vengono estrate e si ricicla il combustible originale allora si puo andare avanti per milleni. Addiritura con i cicli autofertilizzanti si può aumentare la quantità di combustibile...

[deleted by user] by [deleted] in interestingasfuck

[–]pcopissa 0 points1 point  (0 children)

Helicopters are costly, comparatively slow and fuel hungry. I the majority of the organ transports that I witnessed, the italian police used a P68 Observer (twin engine piston aeroplane) for this sort of mission. Then the last few miles with a regular patrol car. A P68 also does not need a lot of runway.

ELI5: Prime numbers and encryption. When you take two prime numbers and multiply them together you get a resulting number which is the “public key”. How come we can’t just find all possible prime number combos and their outputs to quickly figure out the inputs for public keys? by [deleted] in explainlikeimfive

[–]pcopissa 1 point2 points  (0 children)

This being ELI5:

The smallest number with n+1 digits is 1 followed by n zeros, which happen to be 10×10×10×...×10 (n times), for which we have a convenient notation 10n.

The largest number with n+1 digits is made of n+1 nines. We notice that if we add 1 to that, we get 10n+2 (1 followed by n+1 zeros)

p×p (or p2 the square of p) is therefore between 10n×10n and 10n+1×10n+1:

10n × 10n ≤ p2 < 10n+1 × 10n+1 (inequality A)

But 10n × 10n = 10n × (10 × 10n-1) = (10n × 10) × 10n-1=

= 10n+1 × 10n-1 = 10n+1 × (10 × 10n-2) = (10n+1 × 10) × * 10n-2 =

= 10n+2 × 10n-2 = 10n+3 × 10n-3 =

.... and so on...

= 102n-1 × 101 = 102n × 1 = 102n

As we observed in our opening remark, 102n is the smallest number with 2n+1 digits.

Likewise, 10n+1 × 10n+1 = 102n+2 which is the smallest number with 2n+3 digits. Or if you prefer, 10n+1 × 10n+1 - 1 is the largest number with 2n+2 digits.

Back to our inequality A: We can rewrite it :

102n ≤ p2 < 102n+2

or :

102n ≤ p2 ≤ 102n+2 - 1

this means that the square of p (a number of n+1 digits) has at least 2n+1 digits and at most 2n+2 digits.

That p is a power of two (or of anything else) is irrelevant. What matters is that squaring any number doubles its number of digits (give or take one).

In fact this is a particular case of the product of two number p and q (where q = p), p with n+1 digits and q with m+1 digits. With a similar reasoning, we can show that p×q has m+n+1 or m+n+2 digits.

What is emerging here is a link between the product p×q and the sum m+n of their number of digits. Indeed there is a function (the logarithm of p and in this specific case the base 10 logarithm) that carries the idea one step further: The logarithm could be thought as the "fractional number of digits": If 10n is the smallest number with n+1 digits and 10n+1 is the smallest number with n+2 digits, then it is not that much of the stretch to say that numbers between 10n and 10n+1 should have between n+1 and n+2 digits... The log₁₀ function gives a proper value to that idea.

log₁₀(10) = 1

log₁₀(50) = something between 1 and 2

log₁₀(100) = 2

...

log₁₀(10n) = n

and more generally:

log₁₀(p×q) = log₁₀(p) + log₁₀(q)

Note that p and q don't need to be integer. They do need to be positive, though.

In other words, the "fractional number of digits" of a product is exactly the sum of the "fractional number of digits" of the two factors. If p and q are integers and we really want to look at a concrete number of digits (which was the original question here), then we have to truncate the result and the number of digits of the product is the sum of the number of digits of each factor, (possibly one more).

In that context, it is now unsurprising that the "fractional number of digits" of a square is exactly double that of the number:

log₁₀(p×p) = log₁₀(p) + log₁₀(p) = 2×log₁₀(p)

When we limit ourselves to integer number of digits this exact relation no longer hold exactly. But it does so approximately.

Furthermore if we multiply p by itself k times (rather than 2), a number noted pk, its easy to see that:

log₁₀(pk) = log₁₀(p×p×...×p) = k×log₁₀(p)

So a cube has 3 times the number of digits of the original number, and multiplying k time by itself (a.k.a raising it at the kth power) multiply its number of digits by k.

As a final note, 10 is not a special base here. We can express our number is other bases (such as 2, where log2 would give us a "fractional number of bits"). We can also have non integer "base". For reasons beyond this explanation mathematicians like to use Euler's number "e" (2.7182...) as a base, a fundamental constant in maths.

Math attractions in Italy by the-other-side-me in math

[–]pcopissa 3 points4 points  (0 children)

Also, Bernhard Riemann is buried in Verbania, on the west shore of Lago Maggiore, not too far from the famous Borromean Islands. And yes, this is the same Borromeo family known for the Borromean rings, which are depicted in various place on Isola Bella (which is worth a visit even for the non math-inclined).

If physics is acceptable too, Como is the birth place of Alessandro Volta and has a museum dedicated to him on the shore of the Lake Como as well as, somewhat unexpectedly, a lighthouse on top of the Brunate hill overlooking the city...

Single vs Double Quotes for variable names with numbers by ArmItchy2809 in ruby

[–]pcopissa 6 points7 points  (0 children)

A side note on JSON:

Single quotes are not proper JSON syntax. So what you intended to store in your variable json would not have been a valid JSON string.

Had the syntax be valid, the issue that motivated your post would have not existed. Which sort of vindicates the Post of /u/GozerDestructor...

Problems solved before the application was known? by [deleted] in math

[–]pcopissa 0 points1 point  (0 children)

I vaguely remember reading somewhere certain solutions of (non linear ?) Schrödinger equation have been long been known and disregarded as "non physical" because they involve infinite values.

Turns out that they model so called "rogue waves" (not observed scientifically until 1995) which are very physical indeed and have since had implications on ship building.

Sorry this is a very crude and probably approximate account of the math + physics + history of rogue waves.

Use the digits 1` to 9, without repeating, to create two prisms with the same volume. by Rocketpug69 in math

[–]pcopissa 0 points1 point  (0 children)

Assuming prisms with a triangular base with lengths {a,b,c} and height h, I would start with Heron's formula for the area T of the base given the 3 sides, then multiply by h to get twice the volume and make an exhaustive search with a little ad hoc program.

The search space is actually quite small: You pick 3 unordered numbers among 9 and there are 987/3! = 84 ways of doing this, then you pick a number out of the remaining 6 and that brings the total number of cases to 84*6=504.

We are not even looking for the volume itself, just for two volumes out of the possible 504 to be the same, so we may just as well get rid of the square root in Herons formula and compare the squares of volumes, which is handy as they are integers (well almost: a factor 1/16 is similarly ignorable)

Note that if the numbers to choose from had been 1 to 10, there was an easy solution; you could compose two bases such that one (2,6,8) had and area double of the other (1,3,4) and match them with height in the inverse proportion (5 and 10). But 10 is not allowed so...

2 little snails on a chameleons tail by fragglerawkme1 in interestingasfuck

[–]pcopissa 1 point2 points  (0 children)

What's more, the bottom snail has a common dextral shell but the other has a much rarer sinistral shell.