Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gilch
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
61.
▲
by
gilch
4y ago
Also check out Hissp: https://github.com/gilch/hissp
62.
▲
by
gilch
4y ago
There are a number of those. See https://www.reddit.com/r/whitespaceLisp for a more complete list.
63.
▲
by
gilch
4y ago
I'm not suggesting anyone stop writing tests. Rather I was referring to tools like Cider, which provide intellisense-like features by analyzing runtime state without static analysis: https://docs.cider.mx/cider/usa
64.
▲
by
gilch
4y ago
In that case, would the Hissp README https://github.com/gilch/hissp#readme be an appropriate introductory article in your view? It opens with some small examples and concludes with some design philosophy.
65.
▲
by
gilch
4y ago
Here's another way to do it: >>> def foo(): ... import __main__ ... a = __main__.a ... print(a) ... >>> foo() 1
66.
▲
by
gilch
4y ago
The Hy page had way too much syntax, but the Hissp Quick Start didn't have enough? Or not soon enough? One does have to understand the little pieces to make sense of the big ones. You want something in between? Can you point to an exam
67.
▲
by
gilch
4y ago
Python expressions are accessible in [Hissp][1]. In [readerless mode][2], you're writing in Python anyway, so it's trivial. In [Lissp][3], you can inject Python code strings with `.#`. In [Hebigo][4], you just put parentheses arou
68.
▲
by
gilch
4y ago
Static analysis becomes less important in a language with a REPL and dynamic reloading. Analyze the code by running it and inspecting the results.
69.
▲
by
gilch
4y ago
Python has pre-emptive threading too! The GIL makes it all but useless for CPU-bound tasks, but it works fine for IO. Keep your health-check tasks in a non-IO thread and communicate with queues.
70.
▲
by
gilch
4y ago
Even indenting properly goes a long way: (/ (+ (- b) (sqrt (- (* b b) (* 4 (* a c)))) (* 2 a)) The trick is that a trail of any number of `)`'s should also end the line. Like any langua
71.
▲
by
gilch
4y ago
Hissp is an alternative approach. Unlike Hy, which compiles to Python AST, Hissp compiles to Python, so it doesn't break with every Python release. Its read language (Lissp) doesn't have an Emacs mode (yet), but its syntax is so c
72.
▲
by
gilch
4y ago
Not Intellisense, but there is jedhy: https://github.com/ekaschalk/jedhy which can do completions. Last Hy version verified working for: Hy 0.16.0
73.
▲
Why Hissp?
(hissp.readthedocs.io)
3 points
by
gilch
4y ago
|
0 comments
74.
▲
by
gilch
4y ago
It works if you disambiguate your namespaces: >>> a = 1 >>> def foo(): ... a = globals()['a'] ... print(a) ... >>> foo() 1 Still yuck?
75.
▲
by
gilch
4y ago
You can still use `global` though.
76.
▲
by
gilch
4y ago
Would you prefer something like this? https://hissp.readthedocs.io/en/v0.3.0/lissp_quickstart.html
77.
▲
by
gilch
4y ago
Equivalent in Common Lisp: * (let ((a 1)) (defun foo () (setq a 2)) (foo) (print a)) 2 2
78.
▲
by
gilch
4y ago
I wonder if Hissp would be more to your taste? https://github.com/gilch/hissp
79.
▲
by
gilch
4y ago
Have you tried Hissp yet?
80.
▲
by
gilch
4y ago
No closures? Hasn't it always had them?
81.
▲
by
gilch
5y ago
You only need the parens when the arity can vary . It doesn't have to be binary. Red and REBOL are prefix languages like Lisp, but without the parentheses, and their calls can have more than 2 arguments. You do have to know the arity
82.
▲
by
gilch
5y ago
You might like [Hissp's][1] import system. It does compile down to Python. [1]: https://github.com/gilch/hissp
83.
▲
by
gilch
5y ago
Read the [Hissp][1] tutorials (find the docs). It shouldn't take a Python dev too long. It will deepen your Python knowledge and give you a gentler introduction to the world of Lisp because it uses the familiar Python vocabulary with L
84.
▲
by
gilch
5y ago
I think LoL is too CL-specific. If you know both languages first, you can pretty much translate, but since they'd be trying to learn Lisp in the first place, this is a bad idea. On the other hand, [Hissp][1] has a pretty good tutorial
85.
▲
by
gilch
5y ago
See also, Hissp: https://github.com/gilch/hissp
86.
▲
by
gilch
5y ago
That's really not true either. The lambda parameters are locals [a]. A let-binding is just a lambda that you call immediately. You can use defaults so the value doesn't have to appear as an argument [b]. Also, Python has assignmen
87.
▲
by
gilch
5y ago
Cacao. Theobromine is a stimulant, but has milder side effects than caffeine. YMMV.
88.
▲
by
gilch
5y ago
And Hissp.
89.
▲
by
gilch
5y ago
Where is the "no multi-line lambdas" myth coming from? I see this one a lot and its wrong. Python's lambdas can have as many lines as you want. Did you mean to say that lambda expressions can't contain statements? But no
90.
▲
by
gilch
5y ago
Hy actually compiles directly to Python AST, not to Python. For a Lisp that compiles to Python, see Hissp: https://github.com/gilch/hissp
More ›