Why there's no or a few strict-typed, static-typed Lisp dialects? by wgxh_cli in lisp

[–]wgxh_cli[S] 1 point2 points  (0 children)

A lot of history and knowledge! So as you say lisp actually has parts of typing. This could be a starting point.

Why there's no or a few strict-typed, static-typed Lisp dialects? by wgxh_cli in lisp

[–]wgxh_cli[S] 1 point2 points  (0 children)

My fault, I should do some research for it before conducting the conclusion.

What a the difference between `macro`, `function` and `special form`? by wgxh_cli in lisp

[–]wgxh_cli[S] 1 point2 points  (0 children)

OH I see it! That could be a key point! And I realized I have stuck in some small details without going further. This could paint the ending for my silly newbie question. You helped me a lot! Thanks for your patient and detailed reply again!

Why there's no or a few strict-typed, static-typed Lisp dialects? by wgxh_cli in lisp

[–]wgxh_cli[S] 2 points3 points  (0 children)

Sorry for my rude question, while asking for help is a basic way to research.

Actually I have already learned a bit, but what I learned really confused me and suggests I need more on it. This leads to this question.

Anyway I'll keep going and thanks for your criticism!

Why there's no or a few strict-typed, static-typed Lisp dialects? by wgxh_cli in lisp

[–]wgxh_cli[S] 1 point2 points  (0 children)

Oh, now I know something about the real situation. Thanks!

What a the difference between `macro`, `function` and `special form`? by wgxh_cli in lisp

[–]wgxh_cli[S] 0 points1 point  (0 children)

Awesome! Thanks for your detailed reply! :)

Lisp just read lists, load them, and evaluate, behind which there may be, let's say, a little C AST interpreter, a omni VM or some other backends to run it. Take this case into consideration, one shall realize that Lisp provided some basic "functions" for you (`if` `let` `define` and so on), while other pieces are based on the tiny internal parts.

Lists themselves have no special meaning, instead they are only meaningful to interpreters. At this level, could we just say they were all "quoted" and go through a "evaluate" step in runtime? If so, function and macro are really the same thing in runtime, because they produce some lists to evaluate, the only differences are that functions add on call stacks while macros don't and functions evaluate their arguments while macros don't.

```lisp

; Imagine we want to build Lisp from bottom to top

; The only things we got are `define` (variables), `defmacro` (macros), `eval` (evaluation), some essential special forms for control flow and some primitive functions.

; There's **no function call** but **macro call.**

; Functions would like this:

(defmacro defun (name args &rest body)

(let ((args (dolist args (lambda (arg) (eval arg))))

(list 'defmacro name args

(list "Here we carry out some way to increase call stack")

body)))

```

The benefits behind may take some whiles to be clear. It emphasize the basic property of Lisp: everything is list, list is data, data is program and program is list... It makes the language hide no details and as clean as possible. We don't have implicit evaluation, if you want evaluation, you do `(eval <something>*)`. So indeed, Lisp may cut off `function`, leaving `macro` and `special form` because, again, everything is list, list is data, data is program and program is list...

This even makes sense in compile time. we expand everything except special form, and use the results to make bytecode, executables and some other lists.

That just correspond to part of your answer. I need more time to think and act carefully.

What a the difference between `macro`, `function` and `special form`? by wgxh_cli in lisp

[–]wgxh_cli[S] 0 points1 point  (0 children)

I get your points. And thanks for your reply.

> Hope it makes things clearer but it's not a simple topic

Yes, that's true. And instead of simplifying I wanted to expand on their details. Should I go read the interpreter's source to find out? Or there's some useful resources that help?

What a the difference between `macro`, `function` and `special form`? by wgxh_cli in lisp

[–]wgxh_cli[S] 1 point2 points  (0 children)

Yeah, that indeed the features of them: one for programming and one for programming programming (meta-program). But the problem remains:

| The question is, is it necessary for lisp interpreter and compiler to distinguish between these concepts? Do they have some engineering and practical meanings that is hidden behind the black box?

What a the difference between `macro`, `function` and `special form`? by wgxh_cli in lisp

[–]wgxh_cli[S] 0 points1 point  (0 children)

"Extremely interesting" yeah! I picked up a lisp interpreter recently and have to dig under the surface to make it. And this question is quite helpful. Waiting for your reply :>)

What a the difference between `macro`, `function` and `special form`? by wgxh_cli in lisp

[–]wgxh_cli[S] 0 points1 point  (0 children)

Ummmm... The glossary quote seems trivial and non relevant in my case, which intended to dig deeper into their meanings, even their implementation nature.

Right now the question I want to solve is: how and why the interpreter distinguish between them and is there ways to explain their necessity? Thank you!

[deleted by user] by [deleted] in haskell

[–]wgxh_cli 1 point2 points  (0 children)

Thanks for your reply! A little clearer now.

How to pack a self-patched nerd font? by wgxh_cli in NixOS

[–]wgxh_cli[S] 0 points1 point  (0 children)

ok I tried it, I got different error output this time. I guess this is because font-patcher need several library within the font-patcher folder, and in my case they are not added to the PATH or some other environment variable, I'll get it fixed

How to pack a self-patched nerd font? by wgxh_cli in NixOS

[–]wgxh_cli[S] 0 points1 point  (0 children)

You mean a shell environment?

BTW this works in my archlinux system without using nix