Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ICWiener
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
ICWiener
12y ago
I am looking at one of the examples: https://github.com/feature-macros/clojurescript/blob/feature... But if I run Clojure on the JVM, the following fails: (def host nil) (defn foo [] (when (= :clj
32.
▲
by
ICWiener
12y ago
I can understand that debugging expanded code is not fun. On the other hand, LOOP allows to naturally express iteration patterns that can be error-prone with other languages: you hardly produce off-by-one bugs contrary to hand-crafted loops
33.
▲
by
ICWiener
12y ago
The common part is the special operator UNWIND-PROTECT. You can use it to define a function (not a macro). This is in fact a recommended way to design your program: define a CALL-WITH-X function and write a simple WITH-X macro that expand i
34.
▲
by
ICWiener
12y ago
The regex example is more about partial evaluation than constant inlining. So instead of commenting on "random one-liner snippets" and "structure", which I find boring, I'd prefer to share an example of partial eval
35.
▲
by
ICWiener
12y ago
Sure, macros can help define otherwise lacking features: you don't have promises in CL? (ql:quickload :cl-async-future). Here, you have promises. But that is not my point. What I tried to say is that macros are orthogonal to high-level
36.
▲
by
ICWiener
12y ago
I forgot about lenses, thanks. About non-locality of macros vs. functions: Macros, being functions, provide this kind of assurance, too at the syntax tree level: you only operate on the local, current subtree. They can indeed modify the mea
37.
▲
by
ICWiener
12y ago
Don't forget ONCE-ONLY
38.
▲
by
ICWiener
12y ago
It is true that macros are regarded as a last resort mechanism: whenever you can use functions, or generic functions, you are encouraged to do so. Also, macros are nothing more than functions: they operate on the syntax tree, at compile-tim
39.
▲
by
ICWiener
12y ago
This is a great achievement: bitwise-identical output of the compiler when bootstrapped with different CL implementations. It is inspiring to see people like Christophe Rhodes work on SBCL and make tremendous progress. He is sufficiently ho
40.
▲
by
ICWiener
12y ago
SCSH: http://scsh.net/
41.
▲
by
ICWiener
12y ago
Thanks, it is always nice to see a monospaced font available. I especially like the light version. I also like the fact that symbols that look similar (e.g. "1lI") are very distinct from each others.
42.
▲
by
ICWiener
12y ago
See ASDF, for example ( http://common-lisp.net/project/asdf/ ).
43.
▲
by
ICWiener
12y ago
If you want to use Make, read "Recursive Make Considered Harmful" first ( http://aegis.sourceforge.net/auug97.pdf ).
44.
▲
by
ICWiener
12y ago
> ... recognized the program was useless and boiled it down to a 3 instruction loop The loop itself is quite useless, why wasn't it also removed ? (Just kidding) I don't have anything agains Lua or hash tables in principle. An
45.
▲
by
ICWiener
12y ago
> I strongly doubt your compiler will transform all the literal alists in your program into hash tables, Time for experiment. SBCL doesn't, as far as I know. But you seem to imply that it is always better to use hash-tables, and I d
46.
▲
by
ICWiener
12y ago
> but a quick search didn't reveal a syntax for hash table literals, which I would consider to be a prerequisite for calling them first class citizens http://en.wikipedia.org/wiki/First-class_data_type Hash-tab
47.
▲
by
ICWiener
13y ago
Honestly, I understand; I am really bothered too when I see people applying techniques without even thinking about performance implications (and btw, this is also true for security, correctness, portability ... implications). C++ is viewed
48.
▲
by
ICWiener
13y ago
Does speed really matter? I still prefer the readable Lisp version (SBCL, no optimization): (defun square-vect (vect) (map 'vector (lambda (x) (* x x)) vect)) (setq *vector* (map 'vector (lambda (x) (random 3276
49.
▲
by
ICWiener
13y ago
Also, have a look at http://faust.grame.fr/
50.
▲
by
ICWiener
13y ago
This is nice, but there is however a little display problem with long labels.
51.
▲
by
ICWiener
14y ago
I spend a lot of time writing technical documentation, in Org-Mode, LaTeX, and so on. In order to collaborate efficiently with others, we need to have a strict line wrap policy (one line = one sentence), so that diffs are easier to understa