What Might Adding Emojis and Pictures To Text Programming Languages Look Like? 83
theodp writes: We all mix pictures, emojis, and text freely in our communications. So why not in our code? That's the premise of "Fun With Python and Emoji: What Might Adding Pictures to Text Programming Languages Look Like?" (two-image Bluesky explainer; full slides), which takes a look at what mixing emoji with Python and SQL might look like. A GitHub repo includes a Google Colab-ready Python notebook proof of concept that does rudimentary emoji-to-text translation via an IPython input transformer.
So, in the Golden Age of AI -- some 60+ years after Kenneth Iverson introduced the chock-full-of-symbols APL -- are valid technical reasons still keeping symbols and pictures out of code, or is their absence more of a programming dogma thing?
So, in the Golden Age of AI -- some 60+ years after Kenneth Iverson introduced the chock-full-of-symbols APL -- are valid technical reasons still keeping symbols and pictures out of code, or is their absence more of a programming dogma thing?
why??? (Score:5, Informative)
Re: (Score:2)
I was thinking it might look stupid.
Yes, you are correct.
Re: why??? (Score:2)
It would look like Scratch [multiwingspan.co.uk]... Duh.
Re: (Score:2)
Re: (Score:2)
Yeah who the fuck wrote this and how does it make it onto Slashdot?
We all mix pics emojis in our communications .. (Score:5, Informative)
No we don't, unless we don't want to be taken seriously.
Re: (Score:3)
With the way things are going, we don't need to worry about 'pictures for retards' being added to text - we need to worry about them replacing text.
Re: (Score:2)
I can see it being used in strings and comments.
Many times in code you'd draw primitive ASCII art to document things, which is a form of rudimentary image used to help illustrate your point.
And I've seen it used in output to make text fancier - we had a git hook that needed to process the code to prevent a bad checkin and while it was processing it would output an animation using Unicode Braille characters to work as a spinner. As each item on the list got checked off it checked it.
Of course, it requires a
Re: (Score:1)
Re:We all mix pics emojis in our communications .. (Score:5, Funny)
Some of us even use a web site that limits posts to using an eight-bit character set with only text-oriented markup.
Re: (Score:2)
> We all mix pictures, emojis, and text freely in our communications ..
No we don't, unless we don't want to be taken seriously.
Eh, I do (unless I'm emailing some stodgy unknown who might be offended)
A smile indicates that I am, you know, smiling. A laugh indicates that I am joking. Context is provided; communication is improved.
My coworkers and our clients seem to take me seriously {shrugging faux emoji here, lol}
Re: (Score:3)
That is great and all. But:
1) You know there are ways to express happiness and humour in text right?
2) Your simple example is possibly acceptable but there are so many emoji in use I have no idea what they are supposed to mean.
3) Often they are so small I cannot make them out with my eyesight.
The only emoji I use, is U+1F4A9 :)
Re: We all mix pics emojis in our communications . (Score:2)
What, who doesn't use zapf dingbat font [identifont.com] to write their CV cover letter?
No. Just no. (Score:2)
Re: (Score:2)
Except it works in pretty much anything, including C. Slashdot is one of last holdouts.
Try this, replacing U+1F4A9 with the actual symbol:
int main() { int U+1F4A9=0; return U+1F4A9; }
Re: (Score:2)
To elaborate: the C standard never mandated any particular character set except for a basic "portable subset" smaller than ASCII; implementations could freely add more or less, possibly necessitating trigraphs. Later revisions disambiguated what character classes can be used in identifiers and string constants, but in principle you were allowed any symbol supported by your platform since day one.
That's the standard; implementations differed. In particular, GCC was hesitant to allow non-ASCII (in a bid to
When will it be added to the Linux kernel? (Score:1)
If Rust can be added, than anything can be added.
Emoji won't be as much of a security risk as Rust.
Re: (Score:2)
That is so silly. Rust is the same safe/unsafe from a security perspective as C. What is really bugging you about Rust?
I'd switch languages immediately... (Score:2)
...if I could find one that would support :facepalm: emojis in comments.
Re: (Score:2)
April 1st falls early this year (Score:2)
Maybe those python guys can fix that spaces schema?
Re: (Score:3)
You might be onto something; replace the spaces with emojis.
Re: (Score:2)
That would be improvement. At least characters that are required to be there are not totally invisible and have some appearance so one can see if they are there or not and how many there are.
Sidewalk chalk art (Score:2)
Cute but not very pretty.
Already happening (Score:2)
Swift allows emojis as valid var, const and func names. And a few weeks ago there was a Slashdot (I think) story about AI "written" code that had been pasted in to a programme. The return codes were emojis - sad face for error etc.
Re: (Score:2)
Aren't they allowed in C++ and Java as well? I think as soon as a language allows Unicode in variable names, you can use Emoji.
APL? (Score:4, Informative)
Re: (Score:1)
I thought MindF..k was daft ... (Score:2)
Re: (Score:2)
Python gets even worse: it uses WHITESPACE for syntax!
hold on there (Score:5, Insightful)
We all mix pictures, emojis, and text freely in our communications.
No, we don't. Some of us still know that the purpose of communication is to convey information, not force the other party into a guessing game.
Re: (Score:2)
Now, code should not
Re: (Score:2)
That is correct. We've been using smileys for 50+ years.
The difference is that smileys convey a bit of emotional add-on to a factual message expressed in proper words. They are the equivalent of a raised eyebrow or a smile - which are also not expressions of specific meanings but context to the words you are saying.
Re: (Score:2)
Re: (Score:2)
Back before there were Japanese style emoji, we made little faces out of ASCII characters. They conveyed a lot of information, such as the tone in which something was being said.
As for programming, syntax highlighting greatly improves readability, so I'm not ruling out that certain emoji might too.
Re: (Score:1)
Yes, BBSers invented a useful thing to add to text communications so that people who weren't good language communicators could express emotion in online conversations conducted in ASCII. But we have keys for those characters. Inserting emoji means using additional software. Even on a phone it's irritating when you're inserting a little-used emoji and you have to go find it, and it gets more irritating as their number increases.
As for the comparison to syntax highlighting, it might well make sense for an IDE
Re: (Score:2)
Already using this "additional software", because I use non-latin characters for Japanese language. Unicode is of course mandatory.
Re: (Score:2)
Yes, BBSers invented a useful thing to add to text communications
Yes, but it did not have very specific meanings. A smiley - any smiley - indicated that you're not too serious and factual. Slightly different interpretations of what ;-) means compared to ,-) didn't make a difference to the actual message because that message was still in the text and the smiley just added a bit of emotion.
And frankly speaking, given how subjective and unclear emotions tend to be, NOT having a specific meaning is probably the best way to express emotions.
Re: hold on there (Score:2)
Â\_(ãf)_/Â -- brought to you by Unicode (hope /. Doesn't bork it up)
Re: hold on there (Score:2)
It did... it was the smiling shrug
Re: (Score:2)
Yes, but we didn't particularly intend a very specific meaning. The fact that there was a :-) or any of its variations was the sign that I'm not meaning this too seriously. Your interpretation of the fine details doesn't matter much.
As for programming, syntax highlighting greatly improves readability, so I'm not ruling out that certain emoji might too.
I do. I've code-reviewed code with emoji (in the comments). It does nothing to improve readability.
Re: (Score:2)
We all mix pictures, emojis, and text freely in our communications.
No, we don't. Some of us still know that the purpose of communication is to convey information, not force the other party into a guessing game.
You are absolutely as correct as the middle finger your biggest fans are silently holding high in defiant validation.
>;-)
Re: hold on there (Score:3)
Re: (Score:3)
I had to educate one of my daughters on this very idea just the other day with its two implications. First, if you want to be understood, use the tools that best allow that. And second, if you are too lazy to make that low-level effort, you are implicitly insulting the recipient of your message with the subtext that the effort they spend trying to figure out the meaning of what you wrote is less important than the miniscule time you saved.
For me, as someone whose professional career is built upon communica
Re: (Score:2)
if you want to be understood, use the tools that best allow that.
I would add: Use the language that the recipient understands. If your best friend understands your emoji - fine. But if you talk to someone you don't know that will, use these things we invented recently that really make it very clear what you mean. You know, when pictograms failed civilization the first time and we wanted something better, more clear... I think it's called "words".
Re: (Score:2)
No, we don't. Some of us still know that the purpose of communication is to convey information, not force the other party into a guessing game.
Related news: a thumbs up emoji can signify legal acceptance of a contract [google.com].
NO (Score:2)
No, NO, no, and NOOO.
What level of stupid, pointless, and literally useless idiocy is this?
42 :) 69 = 420
Can we just ... not? I know pols always need to "do something." Dev managers...also yes. But can the people writing the fking compilers just...NOT?
Ok, plan B. If you're making a language that accepts emojis, it must ONLY accept emojis and classis operands. No text. Have kind kiddies. Let me know when you manage 'hello world' while the rest of us do something - anything - vaguely more useful.
Re: (Score:2)
Re: (Score:2)
If you're going to allow Unicode, should you arbitrarily disallow certain ranges/glyphs because they're in a list of those assigned to emojis?
Well, that's already the case. You cannot start an identifer with a "number" in many languages (C included). A "number" is an arbitrarily defined subset of all glyphs. Also, one might not use a "whitespace" in an identifier. Guess what a "whitespace" is? An arbitrarily defined subset of all glyphs.
So what you are describing as utter nonsense is exactly what is going on under the scene right now with pretty much all languages.
Re: (Score:2)
All that is fine, but one always reads the code in our mind. Thus int i = 0 will be read as 'int i equals zero'. Now pray how do we read emojis - unless there is a universal dictionary it will be fruitless discussing code with others or remembering.
Re: (Score:2)
emojis belong in comments,such as: :-)
# The following code is 100% reliable
I could see that idiom appearing in lots of my code. :-(
Like this (Score:2)
https://i.imgur.com/D0Uonre.jp... [imgur.com]
Thanks to the Monaco editor (also used by VSCode) and twinBASIC, a language in development backwards compatible with VB6... that can also be used to write kernel mode drivers... I'll add some to my next driver project, see how many aneurysms I can cause with emoji-filled BASIC running in km. Abomination!
Wordstyle editor? (Score:2)
Add headings like in word. I do this in ASCII art to easily navigate around, but just a big fat title would be great.
Add a copy of the flow chart drawing in the spec to your program.
I used to do hardware design in the past. A timing diagram would make the code much more readable.
Too bad vim will not support that.
It's been done (Score:1)
What? (Score:2)
Keyboard support (Score:2)
Re: (Score:2)
Re: (Score:2)
What would you use them for? (Score:5, Insightful)
Before suggesting them, I'd say list out the use cases for them. I've seen some suggestions, but none of them require adding anything to the programming languages themselves because they're about documentation which can (and should) be done separately from the programming language itself. Diagrams in documentation comments, for instance, merely requires Unicode in the comments and every language I know of supports that.
As a counter-argument, I'd suggest looking at APL. It did just this, using a myriad of symbols for operators and keywords rather than conventional text like most languages. That produced a language that was concise, elegant and utterly unusable by 99% of developers (the remainder not-jokingly referred to it as a write-only language due to the difficulty of reading and understanding even your own code, let alone anyone else's). Before going this route, explain how you're going to prevent the multitude of difficulties apparent in APL first.
Re: (Score:2)
I've only experienced two useful things about emojis scattered through text:
1. It tells me that the text was written by an LLM (before the propter explicitly requests it to stop doing so).
2. It also tells me that the text was potentially written by someone between the ages of 12 and 22 (and probably written by AI).
Accessibility (Score:2)
debug this! (Score:1)
try :(
confused face emoji
catch
poop emoji
that is what jumping the shark of coding will look like.
Re: (Score:3)
No, no, no... blocks need to start with the correct type of face. Smilies for the happy path, sad face for the exception handling. Semi-colons will be replaced by ;). You need to, of course, close with a neutral face. Something like this... Logging functions, of course, will be named after the appropriate emoji.
try :) ;) :- :( ;) :-
serious-emoji("thumbs-up, all is well")
catch
poop emoji("omg wtf")
Re: (Score:2)
Slashdot ate some newlines... poop emoji.
Back to APL... (Score:2)
Back to APL with emojis, emoticons, and pictures; the Kenneth E. Iverson language that used symbols to write code.
https://computerhistory.org/bl... [computerhistory.org]
--JoshK.
Re: (Score:3)
Pointless (Score:2)
The Art of Girl Math. (Score:2)
I’ve been making smiley emojis wink since the semicolon met the colon and the right parentheses on the typewriter. Is that considered Shakespearean prose compared to the 3D make-my-face emoji of today?
Dunno what it looks like, but I’d imagine it should be accepted about as well as girl math at your local community bank.
Emoji is plural. (Score:2)
"Emojis" is not a word.
Hieroglyphics (Score:2)
I'd love to post my thoughts. (Score:2)
I'd love to post my thoughts, but... Slashdot... ©*??
Who is this "we" you speak of? (Score:1)
(said in my sweetest gentle-parenting voice)
what I would rather see in my keyboard (Score:2)
where is the eggplant emoji key? (Score:2)
What a stupid question.
Record yourself typing and . How long did it take? Did you reach out for the mouse? :laugh: and :check: how long did it take?
Now record yourself typing
Adding emoji to a programming language would just destroy productivity. Even in the "Golden Age of AI" you still need to type a lot of code.
Going for gold (Score:2)
...in the olympics of stoopid ideas
Easy (Score:2)
Chris Lattner, Lex Fridman on Emojis + Code (Score:2)
Chris Lattner: Future of Programming and AI | Lex Fridman Podcast [youtube.com]. FRIDMAN: "What's been the response [to emojis] so far?" LATTNER: "Somewhere between, 'Oh, wow, that makes sense. Cool, I like new things,' to 'Oh my god, you're killing my baby.' Like, what are you talking about? This can never be. Like, I can never handle this. How am I gonna type this? (imitates bees buzzing) like, all these things. And so this is something where I think that the world will get there. We don't have to bet the whole farm on
Emojis and pictures have a purpose for messaging (Score:2)
Emojis can communicate emotion more efficiently than text. Pictures can communicate scenes, environments, and identifications much more efficiently than text.
These things have a purpose for messaging between people. They don't solve a problem of any kind for programming languages.
Show me the purpose for emojis and images in programming, and I'll happily use them. But so far, no.