Gimp-Forum.net
Split Scripting questions into Python and Script-Fu - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: Other topics (https://www.gimp-forum.net/Forum-Other-topics)
+--- Forum: Gimp-Forum.net (https://www.gimp-forum.net/Forum-Gimp-Forum-net)
+--- Thread: Split Scripting questions into Python and Script-Fu (/Thread-Split-Scripting-questions-into-Python-and-Script-Fu)



Split Scripting questions into Python and Script-Fu - Gimphried - 10-22-2021

Hello admins,

Would you split "Scripting questions" into  Python  "Python" and "Script-Fu"? Any icon for Script-Fu?

Could we have colored syntax for these two languages? How?

Regards.


RE: Split Scripting questions into Python and Script-Fu - PixLab - 10-23-2021

(10-22-2021, 09:12 PM)Gimphried Wrote: How?

Don't know if the admins have access to the server, and source code of the MyBB forum and/or can install packages, but I did found this video https://www.youtube.com/watch?v=h_QhG-uAUS4 by googling "colored python syntax with html"
It can also be done with Javascript as well ➤ an example like there https://www.w3schools.com/howto/howto_syntax_highlight.asp (it needs to be adapted to python syntax, though)
Or include an external highlighter like the Google prettify https://github.com/googlearchive/code-prettify or here https://stackoverflow.com/questions/548466/whats-the-best-way-to-add-colored-sytax-code-snippets-to-a-web-page

Over all it might be a bit of work depending the solution and the possibilities than MyBB allows, in the end I don't know if there is a real need as you can copy/past in your favorite text editor like Atom which will highlight your preferred syntax, but would it be cool to have it? I would say ➤ it's always nice to have features Big Grin

EDIT: I di few more searches and discovered that MyBB forum do have a plugin for that https://community.mybb.com/mods.php?action=view&pid=1118 which should simplify the process, but I don't know if admins can have enough rights to implement it, or not.


RE: Split Scripting questions into Python and Script-Fu - Ofnuts - 10-23-2021

1) Definitely not. Scripting questions are mostly about the API, and it is mostly the same between the two languages, so many questions/answers apply to both languages. This also makes a few Python converts along the way ("What? There is a modern and usable programming language for scripts?"). If you provide me with a decent icon for Scheme (16x16 PNG) I'll add it to the post label icons.

2) We aren't StackOverflow, coding questions are a teeny-weensy part of the forum (2.5% by thread count, under 1% by postc count), and answers are normally a small bit of code. Plus From Pixlab answers there is no Lisp/Scheme highlighting.


RE: Split Scripting questions into Python and Script-Fu - PixLab - 10-23-2021

(10-23-2021, 08:58 AM)Ofnuts Wrote: If you provide me with a decent icon for Scheme (16x16 PNG) I'll add it to the post label icons

https://en.wikipedia.org/wiki/Scheme_(programming_language)#/media/File:Lambda_lc.svg Big Grin


RE: Split Scripting questions into Python and Script-Fu - Ofnuts - 10-23-2021

(10-23-2021, 09:13 AM)PixLab Wrote:
(10-23-2021, 08:58 AM)Ofnuts Wrote: If you provide me with a decent icon for Scheme (16x16 PNG) I'll add it to the post label icons

https://en.wikipedia.org/wiki/Scheme_(programming_language)#/media/File:Lambda_lc.svg  Big Grin

Which is totally a 16x16 PNG, and that everyone who isn't a functional programming aficionado will obviously associate with script-fu...


RE: Split Scripting questions into Python and Script-Fu - Ofnuts - 10-23-2021

(10-23-2021, 12:31 PM)Ofnuts Wrote:
(10-23-2021, 09:13 AM)PixLab Wrote:
(10-23-2021, 08:58 AM)Ofnuts Wrote: If you provide me with a decent icon for Scheme (16x16 PNG) I'll add it to the post label icons

https://en.wikipedia.org/wiki/Scheme_(programming_language)#/media/File:Lambda_lc.svg  Big Grin

Which is totally a 16x16 PNG, and that everyone who isn't a functional programming aficionado will obviously associate with script-fu...

OK, so we have a Python icon for posts...


RE: Split Scripting questions into Python and Script-Fu - PixLab - 10-23-2021

(10-23-2021, 12:31 PM)Ofnuts Wrote: Which is totally a 16x16 PNG, and that everyone who isn't a functional programming aficionado will obviously associate with script-fu...

Sorry ...

[attachment=6897]

(your sentence made me laugh so much, I can't stop, I'm sorry  Big Grin )


RE: Split Scripting questions into Python and Script-Fu - Jack Parker - 04-04-2022

OTOH, if one is using script-fu in 2021+, then one is likely a "functional programming aficionado". (self included)


RE: Split Scripting questions into Python and Script-Fu - Ofnuts - 06-20-2022

(04-04-2022, 11:17 PM)Jack Parker Wrote: OTOH, if one is using script-fu in 2021+, then one is likely a "functional programming aficionado". (self included)

OK, added the icon (see the header of this post)