Better HN
topnewbestaskshowjobs
Log inSign up

minhm

24 karma · joined Jul 19, 2018 (8y ago) · 20 submissions

Submissions

comment 1y ago · link · parent

An alternative way would be pressing M-. (assuming one is using Readline for typing text in the shell, which is the default for my bash shell).

comment 3y ago · link · parent

> the impermanence of all things in life seems pointless and makes me sad

Wouldn't impermanence itself be impermanent then so we won't need be bothered by it too much?

comment 3y ago · link · parent

"split-string" works well for this situation but for a case where there are commas inside some of the strings it would chop in the middle of those strings. So for the latter case and assuming the commas are consistently formatted, a safer approach might be starting in front of the first s-expression and then traversing to the tail of each s-expression with "forward-sexp" and check to see if a comma is there as expected and then delete the comma there (except for the last item with no comma) .

comment 3y ago · link · parent

Beautiful (parenthese tree), powerful, energy efficient (http://greenlab.di.uminho.pt/wp-content/uploads/2017/09/pape...), standardized, battle-tested, and with a glorious past, Lisp reminds me of Gollum's "the precious" ring in Peter Jackson's "The Hobbit" series, and just like the ring, it can make one invisible just by using it too. Maybe it's one of those "precious" tools out there, being the best or not.

comment 3y ago · link · parent

> we'd give them a cup for that delicious sugar cane, then they'd pour it in a plastic cup

Perhaps it's for ensuring consistency (of product volume, ratio of ingredients, etc) for all their products.

comment 5y ago · link · parent

> but then you're the only one that knows your language

This only applies if the language implementation is complex, the language syntax is unlike anything in existence, and the language creator does not pick good names for functions and variables nor write any documentation, manuals, or papers to explain things nor he/she is available for any questions.

comment 5y ago · link · parent

If by "this domain" you mean "strong type-checking", I guess it is because the CL's feature of on the fly introspection/debugging/modification is not as emphasized in some static type-checking languages, the lack of compile-time strong type-checking feature in CL, the ease to modify CL's compiler behavior via macros/reader-macros/compiler-macros (which facilitates implementing compile-time features like strong type-checking at compile-time); and perhaps also due to CL having been used in language research and in production for some decades.

comment 5y ago · link · parent

> macros are bolted on

As I understand it, macro is at a metalanguage level above the current code (eg. C macros vs C "normal" codes). In lisp, this metalanguage is in lisp forms, and thus it is parsed by ... the very same lisp parser for the code. Therefore the whole language is available to you at this meta level, and for all the meta levels above this meta level (ie. for macros that build other macros), so it's lisp all the way up.

I am not sure why you see it as "bolted-on".

comment 5y ago · link · parent

  > much of the things that made Lisp attractive before are already available in Python, Java, etc. and I see no "enlightment" in learning Lisp.
I have not found englightenment either, but I could not find another production-grade language that can model anything like a tree (eg. abstract syntax trees) and let its user extend the language itself without the language authors.

comment 5y ago · link · parent

Perhaps those who misunderstand you also lack the cognitive empathy towards you!?

(edit: removed the phrase "your unintentional enemies" from my sentence above)

comment 5y ago · link · parent

magit is a good alternative, it's not exactly a TUI because it works entirely inside emacs

Emacs also has TUI (when running in the Linux terminal or run `emacs -nw') so magit should also has TUI (at least on GNU/Linux where I use Emacs on).

comment 5y ago · link · parent

The efficiency of developing software on GNU/Linux.

(edit: rewording)

comment 6y ago · link · parent

Emacs/slime.

comment 6y ago · link · parent

Try:

===

(package-install 'paren-face)

(global-paren-face-mode 1)

(custom-set-faces '(parenthesis ((t (:foreground "gray50"))))))

===

(edit: formatting)

comment 6y ago · link · parent

> I believe it's also 1 or 2 shortcuts, thanks to the IDE's understanding of the language syntax, unless I misunderstood your scenario?

I have not seen transposing, merging, splitting, annexing (moving a block into the inside another block), and de-annexing (the opposite of annexing) 2 blocks of codes in JS without using the mouse yet, so I just want to check.

> Besides, another languages can throw away the parentheses entirely

JS uses parentheses for grouping complex arithmetics and for function's argument lists (eg. func(arg) in JS vs. (func arg) in lisp). JS also uses curly braces to mark code blocks, which is similar to Lisp parentheses but at the cost of more complex parsing for the compiler and the mental distinguishing between functions' argument lists and code blocks on the coder (they are just lists).

JS statements use semi-colons, which makes editing them feel like editing lines of codes while editing Lisp statements is editing nodes of a tree, which is a very different experience.

comment 6y ago · link · parent

> it's the useless (unless you write an AST-rewriting macro) structure

In a good JS editor, how many key combinations and mouse clicks are required to jumping into, jumping out of, and cutting a block of code (eg. a function definition or a conditional expression), or transposing, merging, splitting, annexing, and de-annexing 2 blocks of codes? It usually takes me at most 2 key combinations with a Lisp editor (including navigating the cursor to the right place), thanks to Lisp's uniform structure.

> Say, naming a thing, a function definition, and a function invocation are all very visually different in, say, JS

Aren't these also visually highlighted in a Lisp editor as well?

Besides, a Lisp editor can optionally blur the parentheses so users don't mentally have to.

(edit: formatting, recounting the key presses required)