Automagically generated smilies

  • Thread starter Thread starter D H
  • Start date Start date
AI Thread Summary
Automagically generated smilies can disrupt the display of computer code in forums, particularly when typing sequences like "std::string" or array indices such as "a[i]". The presence of certain characters can unintentionally convert text into emoticons, leading to confusion and formatting issues. Suggestions include modifying BBCode to ignore code within specific tags, like [code], to prevent these transformations. Additionally, the ambiguity of certain character sequences complicates finding a straightforward solution. Overall, the current system poses challenges for accurately sharing code snippets.
D H
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Messages
15,524
Reaction score
769
A colon followed by a lower case s automagically results in a sad-faced smiley: :s .This means when someone types "std :: string" without the spaces (which is the canonical way to type that), they will get this: std::string.

I don't know what the solution is, but this bites when it comes to computer code.
 
Physics news on Phys.org
Greg Bernhardt said:
We can change that
There are a few other funny cases as well - for example, a simple smiley :) morphs into the jaw-drop smiley if you happen to put it at the end of a naturally parenthesized expression (such as this one:))

I doubt there is any easy fix for that one, as the three-character sequence is genuinely ambiguous
 
D H said:
I don't know what the solution is, but this bites when it comes to computer code.
Greg Bernhardt said:
We can change that
Maybe make it so that BBcode stuff inside [ code ] tags is ignored.

A different problem comes with C code that has arrays indexed by a variable i. The BBCode parsing turns the bracketed index in a[ i ] into the leading italics tag, and generally screws things up. I had to insert extra spaces here to keep this from happening.
 
  • Like
Likes Greg Bernhardt
I want to thank those members who interacted with me a couple of years ago in two Optics Forum threads. They were @Drakkith, @hutchphd, @Gleb1964, and @KAHR-Alpha. I had something I wanted the scientific community to know and slipped a new idea in against the rules. Thank you also to @berkeman for suggesting paths to meet with academia. Anyway, I finally got a paper on the same matter as discussed in those forum threads, the fat lens model, got it peer-reviewed, and IJRAP...
About 20 years ago, in my mid-30s (and with a BA in economics and a master's in business), I started taking night classes in physics hoping to eventually earn the science degree I'd always wanted but never pursued. I found physics forums and used it to ask questions I was unable to get answered from my textbooks or class lectures. Unfortunately, work and life got in the way and I never got further the freshman courses. Well, here it is 20 years later. I'm in my mid-50s now, and in a...

Similar threads

Replies
22
Views
3K
Replies
7
Views
2K
Replies
10
Views
2K
Replies
1
Views
2K
Replies
11
Views
1K
Replies
5
Views
2K
Back
Top