Blog: 2025-02-22: Difference between revisions

From razwiki
Jump to navigation Jump to search
(Created page with "Lua is quirkier than I realized * 1-based indexing * iterate over string is kinda tricky .... * luarocks doesn't add itself to path * no builtin formatter for table * no built-in debugger ?? * repl doesn't have history * no socket support in stdlib (no stdlib?) * blocking io by default (for a project like socket)")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 9: Line 9:
* no socket support in stdlib (no stdlib?)
* no socket support in stdlib (no stdlib?)
* blocking io by default (for a project like socket)
* blocking io by default (for a project like socket)
* no continue in loops - gotta use goto or function call (function call good)
** actually continue is just a kind of goto ... function calls better
* lua repl local variables are not accessible after the command ends
** actually sorta lisp like
*** https://stackoverflow.com/questions/74630221/why-luas-builtin-repl-cannot-access-previously-delcared-local-vars


and a link roll up

* http://wiki.zeromq.org/bindings:lua
* https://www.lua.org/pil/9.2.html
* https://github.com/jupyter-xeus/xeus-lua
* https://ipython.org/ipython-doc/dev/development/messaging.html
* https://zguide.zeromq.org/docs/chapter1/
* https://cultureandempire.com/
* http://hintjens.com/blog:115

Oh one more think
<pre>
→ body, metadata = lcmark.convert('hello *world*', 'html')
"<p>hello <em>world</em></p>
"
→ body
"<p>hello <em>world</em></p>
"
→ metadata
{ -- table: 0x7fb8f761f340
}
</pre>

Latest revision as of 19:57, 22 February 2025

Lua is quirkier than I realized

  • 1-based indexing
  • iterate over string is kinda tricky ....
  • luarocks doesn't add itself to path
  • no builtin formatter for table
  • no built-in debugger ??
  • repl doesn't have history
  • no socket support in stdlib (no stdlib?)
  • blocking io by default (for a project like socket)
  • no continue in loops - gotta use goto or function call (function call good)
    • actually continue is just a kind of goto ... function calls better
  • lua repl local variables are not accessible after the command ends


and a link roll up

Oh one more think

→ body, metadata = lcmark.convert('hello *world*', 'html')
"<p>hello <em>world</em></p>
"
→ body
"<p>hello <em>world</em></p>
"
→ metadata
{  -- table: 0x7fb8f761f340
}