Today I Learned

  • Thread starter Thread starter Greg Bernhardt
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
6,973 replies · 541K views
TIL of the most extreme software optimization example I've ever come across.
Matt Parker from Stand-up Maths created a program in python to look for groups of 5 words that share no letters between them, meaning that each letter in the alphabet will be used one time only, leaving a single letter unused. His program was improved by over 40 BILLION percent by users, going from a run-time of about a month to less than 10 milliseconds. (The percentage graphic in the beginning of the video states an incorrect percentage. Matt explains in the video description that the 40 billion percent number is the correct one.)

 
Reply
  • Like
  • Love
Likes   Reactions: OmCheeto, mfb, collinsmark and 1 other person
Physics news on Phys.org
fresh_42 said:
Always reminds me of what I had read in a book about American history (pop science):
... but the French are pranksters. She's hollow inside!
And by night, a phalanx of mimes comes pouring out!
 
Reply
  • Like
  • Haha
Likes   Reactions: mfb, Bystander and BillTre
Today I learned that radiation from black hole accretion discs is mostly "soft thermal." So if one should fall inside of a black hole's event horizon, it's dark in there.
 
What will you see in your presumably short (whatever that means) lifetime there? E.g. some black holes millions or billions of light years away? maybe someone who learned before today knows.
 
Some pumpkins age better than others.
Screenshot 2022-10-30 at 6.13.48 AM.png
 
Reply
  • Like
  • Love
  • Haha
Likes   Reactions: pinball1970, Drakkith, collinsmark and 2 others
TIL that Winston Churchill said, "We know it will be hard; we expect it to be long".

He meant the war.
Of course.
 
Reply
  • Like
Likes   Reactions: BillTre
Swamp Thing said:
TIL that Winston Churchill said, "We know it will be hard; we expect it to be long".

He meant the war.
Of course.
Ukraine is in a similar situation these days.
 
Reply
  • Like
Likes   Reactions: Swamp Thing
epenguin said:
What will you see in your presumably short (whatever that means) lifetime there? E.g. some black holes millions or billions of light years away? maybe someone who learned before today knows.
I would see no light in my direction of motion. Some light behind, which would shrink into a dot. Gravity would focus the light, which would make it brighter. On the other hand the dot is red shifted and there isn't that much hard radiation around so the light grows dimmer for that reason.
 
The scary pace of AI advancements must mean the singularity is nigh

FaKO4mMXwAERmI_?format=jpg&name=medium.jpg
 
Reply
  • Haha
  • Like
  • Love
Likes   Reactions: pinball1970, Rive, collinsmark and 3 others
symbolipoint said:
Tell us how you created that spoiler which is blurry initially and turns focused when left-clicked?

Looks like he used [ ISPOILER ] [ /ISPOILER ] tags (without the spaces)...
 
Reply
  • Like
Likes   Reactions: BWV and jbriggs444
symbolipoint said:
Tell us how you created that spoiler which is blurry initially and turns focused when left-clicked?
You mean the [ispoiler] and [/ispoiler] tags?

Edit: When in doubt, use the Reply button to get the entire post in as a quote in your post window and inspect the tags therein. You can also use the "[ ]" (toggle BB code) icon if needed.

Edit 2: In order to avoid having to put blanks around your BB code to neuter it so that it does not render, one can use [PLAIN] and [/PLAIN] around the tags that you want to leave unrendered.
 
Last edited:
Reply
  • Informative
  • Like
Likes   Reactions: jack action, Bystander, hmmm27 and 1 other person
symbolipoint said:
Tell us how you created that spoiler which is blurry initially and turns focused when left-clicked?

1667409135528.png


1667409299697.png
 
Reply
  • Like
  • Informative
Likes   Reactions: BillTre, symbolipoint and berkeman
jbriggs444 said:
Edit 2: In order to avoid having to put blanks around your BB code to neuter it so that it does not render, one can use [PLAIN] and [/PLAIN] around the tags that you want to leave unrendered.
Ooo, when was that introduced? You mean we don't have to use the [ hack any more?
 
Reply
  • Wow
Likes   Reactions: berkeman
pbuk said:
You have to be more subtle than that to defeat MathJax: ##2+2=4##.
Oh, even more subtle (of course, BBCode tags are processed on the server, MathJax runs in the browser). Need to revert to the color hack: ##2+2=4#[/color]#.
 
Reply
  • Like
Likes   Reactions: fresh_42
pbuk said:
Oh, even more subtle (of course, BBCode tags are processed on the server, MathJax runs in the browser). Need to revert to the color hack: ##2+2=4##.
There is one opportunity where it might work: ##\mathbb{C}\cong \mathbb{R}.##
Let's test it: ##\mathbb{C}\cong \mathbb{R}[i]## although I think I will stick with the blanks: ##\mathbb{C}\cong \mathbb{R}[ i ].## Is shorter. Nope.
 
Reply
  • Like
Likes   Reactions: berkeman
Maybe the other way around, i.e. putting the misinterpretation at the end for a real test:
pbuk said:
Oh, even more subtle (of course, BBCode tags are processed on the server, MathJax runs in the browser). Need to revert to the color hack: ##2+2=4##.
There is one opportunity where it might work. Let's test it: ##\mathbb{C}\cong \mathbb{R}[i]## although I think I will stick with the blanks: ##\mathbb{C}\cong \mathbb{R}[ i ].## Is shorter. Nope. Yeah!

Edit: It works in that case! The PLAIN tag guarantees that ##\mathbb{R}## (color hack here) isn't misinterpreted!

Edit Edit: Color hack failed.
 
In summary, here is what you need to do:
  • To display BBCode as "plain", just wrap it in [PLAIN][/PLAIN] tags.
  • This doesn't work for displaying the [/PLAIN] tag itself so to display you still need to use the color hack: [PLAIN][/PLAIN]
  • Note you can also use the [ICODE] or [CODE] tags to display BBCode tags, this even works for [PLAIN] e.g.
    Code:
    [ICODE][PLAIN][/PLAIN][/ICODE]
  • To display MathJax expressions contining BBCode tags e.g. [i] you need to wrap the whole expression with [PLAIN][/PLAIN] tags.
  • If you want to display MathJax tags themselves (i.e. ## or $$) then you need to use the color hack to split up the tags as well as the plain tags inside them if necessary to protect e.g. [i]
    Code:
    ##[PLAIN] \mathbb{C}\cong \mathbb{R}[i] [/PLAIN] ##
Or just don't bother and save an hour of your life.
 
Reply
  • Haha
Likes   Reactions: DaveE and fresh_42
Some simpler options:

To display the plain tag you can break it up with plain tags or any other tag: [pla[plain][/plain]in] / [pla[b][/b]in] -> [plain]

If you have [i] in TeX you can write it as [ i] or similar - TeX won't care and the forum will stop interpreting it as BBCode: ##[/color]a[ i]##[/color] -> ##a[ i]##

One color tag is enough to break up MathJax tags: ##[/color]a^3##[/color] -> ##[/color]a^3##
 
Reply
  • Like
Likes   Reactions: pbuk
mfb said:
To display the plain tag you can break it up with plain tags or any other tag: [pla[plain][/plain]in] / [pla[b][/b]in] -> [plain]
Good point, much better.

mfb said:
If you have [i] in TeX you can write it as [ i] or similar - TeX won't care and the forum will stop interpreting it as BBCode: ##[/color]a[ i]##[/color] -> ##a[ i]##
That looks awkward, I think the new "plain" tag is better.

mfb said:
0
One color tag is enough to break up MathJax tags: ##[/color]a^3##[/color] -> ##[/color]a^3##
That will break if there is more than one section of ##\LaTeX## as MathJax will try to process the text between the two unobfuscated tags.
 
pbuk said:
Ooo, when was that introduced? You mean we don't have to use the [ hack any more?

I remember that, from back in the day. :smile:

Of course it wasn't (0,0,0) though, it was whatever PF's background happened to be at the time. That was what we did before Greg got spoiler tags. (Or if we wanted special punctuation like indenting paragraphs.)

The idea is that you had to take your mouse and drag across the text -- highlighting it -- and then you could
read it.

Something like this (take your mouse or finger or whatever and drag it over the line below):
I can see!
But even that might not work (it might already be visible, without highlight it), depending on your browser settings. (This example used [249, 249, 249].)
 
pbuk said:
This doesn't work for displaying the [/PLAIN] tag itself so to display
You do not need a hack to display [/PLAIN]. In the absence of a [PLAIN] opening tag, the closing tag will not render and will be displayed verbatim instead.