Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
caligian
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
1.
▲
by
caligian
2y ago
The URL points to my shoddy attempt at getting a not-so-useless REPL. This thread will attempt to explain my opinions on the state of REPLs in IDE. My REPL fever started from a rather quaint encounter with VSCode wherein I realized that you
2.
▲
Editor frameworks are not frameworks
2 points
by
caligian
2y ago
|
1 comments
3.
▲
Emacs Lisp is pleasant after hash-table and list libraries and plenty of macros
(github.com)
7 points
by
caligian
2y ago
|
1 comments
4.
▲
by
caligian
2y ago
I have begun to liken elisp more after spinning some of my own utils.el. I am currently replicating my libraries from https://github.com/caligian/nvimconfig (only adding URLs for code examples) The godforsaken perrenia
5.
▲
by
caligian
3y ago
My bad. What i meant is that code execution is alright rather than dealing with macro magic in yaml or excessively verbose nesting like in toml
6.
▲
by
caligian
3y ago
There is no 'corruption' happening anywhere. When you register local variables, they are merely defined as register locations and have a default value of nil which is absence and hence memory saved. They would have to mark nil exp
7.
▲
by
caligian
3y ago
As far as security is concerned, consider this example. I want to use erlang with lua. Those two are miles apart but not really when you boil everything down to a lua table. All containers are tagged tables such as having a metatable key sa
8.
▲
by
caligian
3y ago
If lua is used only as an adapter, that is an intermediary between the client and host converting objects to table and vice versa. You cannot dump function definitions (hence only serializable) except in bytecode. Who'd pass that aroun
9.
▲
Lua is a viable alternative for JSON
8 points
by
caligian
3y ago
|
13 comments
10.
▲
by
caligian
3y ago
Let's take another example. Consider structs as tagged tables with a metatable key that distinguishes it from ordinary tables. You can implement inheritance as chained __index closures for parent tables or simply chained tables. Or you
11.
▲
by
caligian
3y ago
Far from defending the lang's honour. There are many noteworthy things about lua. Firstly it encourages you to use query-able data structures. Lack of first class objects makes marshalling extremely easy. This is similar to using elixi
12.
▲
by
caligian
3y ago
function mod0(x, y) return (x % y) + 1 end Something like this? You replace % with mod0()
13.
▲
by
caligian
3y ago
https://github.com/caligian/nvimconfig https://github.com/caligian/lua-utils The former uses the latter for nvim. And the latter makes lua perl with structs. We all loved perl for its lispy functi
14.
▲
by
caligian
3y ago
It is constantly called one of the worst programming languages. Coders i know want to touch lua with a 10-feet pole.
15.
▲
by
caligian
3y ago
While attempting to teach callbacks to a room full of C# devs i figured lua was the easiest for creating readable examples. The language has very good teachable aspects. I'd pick lua over python as a teacher to teach data structures
16.
▲
by
caligian
3y ago
I agree with your criticism. I could not properly use lua without creating my own set of table utils and structs (they are faster than classes)
17.
▲
by
caligian
3y ago
Yes. My point is that it should not matter because you can stick to table indexing with +-1 or create a function for the same
18.
▲
by
caligian
3y ago
Using a table is still simpler because people literally use dicts everywhere without actually thinking of them as containers but only as 'lookup containers'
19.
▲
by
caligian
3y ago
This is one of the things i was talking about. You cannot map nil to a key because nil means absence. The compiler can only infer such absence at a control flow level aka passing arguments to functions or checking nil-variables. You are sup
20.
▲
Lua Criticism Is Unwarranted
15 points
by
caligian
3y ago
|
27 comments