Telegram added auto-detection of the programming language used when monospacing a code snippet.
It does a pretty nice job, but there are issues with this approach due to similarity in syntaxes across a huge number of languages.
The guess can be different (wrong) from what the user actually intends.
For instance, language for this snippet is detected as "C":
Syntax wise, it is perfectly fine, but what about the actual code?
Is it a valid executable C code? No, it lacks the entrypoint, the
But the same piece of code is perfectly valid and executable in Ruby.
The first line
Conclusion: While the auto-detection of the snippet language is a very cool feature, you may not always see it detect what you intend, for such cases you can always explicitly mention the language you want and TG's auto-detection algorithm won't override it!
It does a pretty nice job, but there are issues with this approach due to similarity in syntaxes across a huge number of languages.
The guess can be different (wrong) from what the user actually intends.
For instance, language for this snippet is detected as "C":
#include<stdio.h>
printf("Hello World");
Syntax wise, it is perfectly fine, but what about the actual code?
Is it a valid executable C code? No, it lacks the entrypoint, the
main()
method and hence would not even compile, let alone execute.But the same piece of code is perfectly valid and executable in Ruby.
The first line
#include<stdio.h>
is ignored in Ruby because it is treated as a comment, the next line is executed and the program outputs "Hello World" on the screen!Conclusion: While the auto-detection of the snippet language is a very cool feature, you may not always see it detect what you intend, for such cases you can always explicitly mention the language you want and TG's auto-detection algorithm won't override it!
Thrilled to share this remarkable Padoru art crafted by a dear and highly proficient artist friend of mine. Heartfelt thanks to her for this cute arwork! π¨β¨
Also, explore my curated Padoru sticker pack designed exclusively for fellow anime enthusiasts: https://www.tg-me.com/addstickers/PadoruAniSysWOW64 π
Kindly note, the credits for the original artworks featured in this sticker collection belong to the respective artists. My contribution involves the meticulous vectorization and animation process. π
Enjoy spreading the holiday cheer! ππ
Also, explore my curated Padoru sticker pack designed exclusively for fellow anime enthusiasts: https://www.tg-me.com/addstickers/PadoruAniSysWOW64 π
Kindly note, the credits for the original artworks featured in this sticker collection belong to the respective artists. My contribution involves the meticulous vectorization and animation process. π
Enjoy spreading the holiday cheer! ππ
Sharing a nostalgic throwback β a low-poly snowy landscape render from my archives during my explorations with Blender, a journey I paused midway.
Wishing everyone a season filled with joy, peace, and treasured moments. May this Merry Christmas envelop you in warmth and sparkle with delight. πβ¨
Wishing everyone a season filled with joy, peace, and treasured moments. May this Merry Christmas envelop you in warmth and sparkle with delight. πβ¨
Language:
Code:
Output:
py
Code:
δΈ,ε=lambda γΌ:[ε("βββββγγγγβγγγβ"[int(δΈ):][:5])for δΈ in("0%d"%0x15fe6ad15acd24457d93f3e65ffc9d6450106ef14)[γΌ::0O12]]+[ε()],print;ε("H a p p y\n");[δΈ(int(ε))for ε in"%d"%0O3750]
Output:
H a p p y
βββββ
γγγγβ
βββββ
βγγγγ
βββββ
βββββ
βγγγβ
βγγγβ
βγγγβ
βββββ
βββββ
γγγγβ
βββββ
βγγγγ
βββββ
βγγγβ
βγγγβ
βββββ
γγγγβ
γγγγβ
This media is not supported in your browser
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM