Jump to content

User talk:Chkas

From Rosetta Code

Syntax highlighting

I notice that you have been modifying the syntax highlighting for EasyLang entries. Quoting an excerpt from the syntax highlighting guide:

The standard markup to highlight a block of source code in Mediawiki is

   <syntaxhighlight lang="languagename"> Code </syntaxhighlight>

where languagename is the lowercase name of the lexer for Pygments to use to do the parsing. There is not a default parser. The language parameter must have a value.

   <syntaxhighlight></syntaxhighlight>

is an error. If Pygments doesn't have a lexer for your language, or you don't know which one to use,

   lang="text"

is a safe, if boring choice.

Having the bare <syntaxhighlight> is just adding parsing errors to the page. --Thundergnat (talk) 12:16, 18 July 2024 (UTC)

I'm sorry. I thought that the lang option would not be necessary and it would then behave like an unknown language. I will then change everything back to lang="text". --Chkas (talk) 18:54, 18 July 2024 (UTC)

EasyLang "fastfunc"

Hi Chkas, what does fastfunc mean in EasyLang ? I tried looking in the documentation on the site but couldn't find a mention of it (sorry if I missed it). I like the minimalist approach of the language, BTW. --Tigerofdarkness (talk) 11:12, 22 September 2024 (UTC)

Hi Tigerofdarkness, thank you for your interest in Easylang.

Easylang is executed in the browser by an interpreter written in C, which runs with WASM in the browser. Functions marked with “fastfunc” are not translated into the AST tree, which is then interpreted by Easylang, but directly into WASM code, which is then executed directly by the browser, which is significantly faster. However, this does not work for all statements - e.g. not for strings or arrays or for most built-in functions - and I am not so sure that all of this is guaranteed to be translated correctly, which is why “fastfunc” is currently undocumented.

[[1] Time a function]

--Chkas (talk) 15:11, 22 September 2024 (UTC)

Interesting - thanks. --Tigerofdarkness (talk) 16:00, 22 September 2024 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.