frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

The Uber of the Underworld

https://www.economist.com/international/2025/05/29/the-uber-of-the-underworld
1•DyslexicAtheist•55s ago•0 comments

Show HN: Ethereum/EVM Event Pipeline

https://github.com/lbkolev/eventify
1•voicesz_•7m ago•0 comments

Kernel Mailing List flagging of contributor as potentially malicious

https://lore.kernel.org/all/CAHk-=wj4a_CvL6-=8gobwScstu-gJpX4XbX__hvcE=e9zaQ_9A@mail.gmail.com/
2•cbondurant•7m ago•1 comments

Rsync's defaults are not always enough

https://rachelbythebay.com/w/2025/05/31/sync/
2•ingve•10m ago•0 comments

The 2.7% Rule for Retirement Spending [video]

https://www.youtube.com/watch?v=1FwgCRIS0Wg
1•simonebrunozzi•10m ago•0 comments

No build front end is so much more fun

https://simonwillison.net/2025/May/31/no-build/
2•xnx•14m ago•0 comments

Emergence of emotional response from sensory experience in humans and mice

https://www.science.org/stoken/author-tokens/ST-2646/full
3•erichamc•15m ago•1 comments

RAG is dead, long live agentic retrieval

https://www.llamaindex.ai/blog/rag-is-dead-long-live-agentic-retrieval
2•gemanor•16m ago•0 comments

Why would the US government ever refuse the US dollar?

https://thehill.com/opinion/finance/5325863-cash-refusal-national-parks-controversy/
2•anigbrowl•16m ago•0 comments

Rick Rubin: Vibe Coding Is the Punk Rock of Software [video]

https://www.youtube.com/watch?v=7s9C92Pkcc0
1•zzzeek•17m ago•0 comments

ML models don't need that much data to be better than you

https://www.mlpowered.com/posts/ml-models-dont-need-that-much-data/
1•jxmorris12•18m ago•0 comments

Ask HN: Which framework/book to get started into GameDev?

3•recvonline•20m ago•2 comments

The Great Attractor

https://en.wikipedia.org/wiki/Great_Attractor
1•ajdude•21m ago•0 comments

The Sega Master System is still being made and sold in Brazil 36 years later

https://www.xda-developers.com/the-sega-master-system-is-still-being-made-and-sold-in-brazil-36-years-later/
3•rbanffy•22m ago•0 comments

I Lost My Backpack with Passports and Laptop

https://psychotechnology.substack.com/p/how-i-lost-my-backpack-with-passports
1•eatitraw•25m ago•0 comments

30 years ago, Apple fans met the Mac clone. This is the weird, wild story

https://www.macworld.com/article/2796769/the-weird-wild-story-of-the-mac-clone-era.html
2•rbanffy•27m ago•0 comments

Show HN: GitHub Action to track views, stars, and clones on my projects

https://github.com/timf34/github-engagement-stats
1•timf34•28m ago•0 comments

ASRock Rack AMPONEMD12DNO for AmpereOne M Arm Servers Shown at Computex 2025

https://www.servethehome.com/asrock-rack-amponemd12dno-for-ampereone-m-arm-servers-shown-at-computex-2025/
1•rbanffy•28m ago•0 comments

Ex150-14 review: More of the Same

https://www.exfatloss.com/p/ex150-14-review-more-of-the-same
1•paulpauper•31m ago•0 comments

CoInterviewer: A Hackathon Product

https://anilturaga.github.io/cointerviewer
1•anorak27•32m ago•0 comments

Quantum visualisation techniques could bring fault-tolerant quantum computers

https://www.ox.ac.uk/news/2025-05-30-new-quantum-visualisation-techniques-could-accelerate-arrival-fault-tolerant-quantum
2•gnabgib•33m ago•0 comments

Show HN: Purpose Reminders – One simple, positive act emailed monthly to all

https://purposereminders.com
2•purposereminder•34m ago•0 comments

Show HN: Dungeon Crawler on Demand Fork

https://7underlines.itch.io/quick-dungeon-crawler-on-demand
2•logTom•36m ago•0 comments

Planner: Generating Diversified Paragraph via Latent Language Diffusion Model

https://arxiv.org/abs/2306.02531
1•nathan-barry•37m ago•0 comments

White House Planning to Replace Musk's NASA Administrator Nominee

https://www.bloomberg.com/news/articles/2025-05-31/white-house-planning-to-replace-nasa-administrator-nominee
1•JumpCrisscross•37m ago•0 comments

Peter Kuper's Graphic Novel, Where the Insects Draw Us

https://www.thenation.com/article/environment/ecosystem-environment-biosphere-nature/
1•petethomas•38m ago•0 comments

Show HN: Watch by Team – Movie/Show Discovery through their creators

https://watchby.team
1•MCtheperson•39m ago•0 comments

Embedding Godot games in iOS became easy

https://christianselig.com/2025/05/godot-ios-interop/
1•goranmoomin•40m ago•0 comments

SweRank: Software Issue Localization with Code Ranking

https://arxiv.org/abs/2505.07849
1•PaulHoule•41m ago•0 comments

Review: Jesse Armstrong's 'Mountainhead' imagines a tech bro-pocalypse

https://www.sfchronicle.com/entertainment/movies-tv/article/mountainhead-review-20351688.php
2•andromaton•42m ago•1 comments
Open in hackernews

Ask HN: Lisp eval vs. Lisp macros. Are they the same underlying concept?

9•behnamoh•1d ago
Is my understanding correct that Lisp's powerful macro system stems from the ability to write the eval function in Lisp itself? From what I gather, Lisp starts with a small set of primitives and special forms—seven in the original Lisp, including lambda. I recall Paul Graham demonstrating in one of his essays that you can build an eval function using just these primitives. Those primitives are typically implemented in a host language like C, but once you have an eval function in Lisp, you can extend it with new rules. The underlying C interpreter only sees the primitives, but as a programmer, you can introduce new syntax rules via eval. This seems like a way to understand macros, where you effectively add new language rules. I know Lisp macros are typically defined using specific keywords like defmacro, but is the core idea similar—extending the language by building on the eval function with new rules?

Comments

andsoitis•1d ago
eval and macros both deal with code-as-data (homoiconicity), but they serve very different purposes and work at different times in the program lifecycle:

eval

Runs at runtime.

Takes a data structure (usually a list) and evaluates it as Lisp code.

Example: (eval '(+ 1 2)) ; => 3

Use case: Dynamically construct and run code while the program is running.

Macros

Runs at compile time (or macro-expansion time).

Transform Lisp code before it's evaluated. They return new code (a Lisp form) to be compiled/evaluated later.

Example: (defmacro my-unless (condition body) `(if (not ,condition) ,body))

(my-unless (= 1 2) (print "Not equal")) ; expands to (if (not (= 1 2)) (print ...))

Use case: Extend the language by defining new syntactic constructs. Enables powerful DSLs and optimizations.

uticus•1d ago
https://gigamonkeys.com/book/macros-standard-control-constru...

https://www.lispworks.com/documentation/HyperSpec/Body/f_eva...

timonoko•1d ago
If you have to ask about macros, you REALLY dont need macros.

Macros are really only instructions for the compiler, how to compile things faster.

The syntax improvement aspect is minuscule, because Lisp has no actual syntax perse.

timonoko•1d ago
Hey Grok: Write commonlisp macro "test", which is usually an addition, but when two parameters are already numbers, it is the sum of those numbers.

  (defmacro test (a b)
    (if (and (numberp a) (numberp b))
        (+ a b)
        `(+ ,a ,b)))
kazinator•18h ago
These are very strange statements, coming from you. Please teach the kids properly! :)
timonoko•13h ago
Bad memories. Some malformed macro may evaluate differently than compile and the problem is impossible to find.
timonoko•12h ago
Hey Grok: Does commonlisp have some mechanism to prevent malformed macro to do things globally, so that eval works differently than compile?

  Grok: Yes.
  < 5 pages of semi-incomprehensible explanations omitted >
kazinator•6h ago
This is a feature. It is something you want sometimes and don't want at other times.

Macros can stage calculations to compile time. Compile time can happen in a completely different environment from run-time, such as on a different machine. It only happens once, whereas run-time can repeat many times.

A macro can be designed to that it opens a specific file, reads the content and generates some code based on that (or simply includes the file as a literal constant). That file exists only on the build machine, perhaps part of the source tree of the program. Thus, compiled code containing the macro call can run anyhere, but source code containing the macro cannot be evaled anywhere.

fsmv•1d ago
They are subtly different. Macros are the only way to process s-expressions without first calling eval on them. This is necessary because without macros you could only generate and eval quoted code. Also practically it's cumbersome to work with everything being quoted when writing lisp code generators.

Without macros you could implement eval still but your internal lisp implementation could only work on quoted s-expressions, there would be no way to get back to the base unquoted level of lisp code (assuming you can't use the primitive eval, since you're trying to implement lisp in lisp).

Another use case is implementing a shortcutting boolean and function. You can't do the shortcutting without macros because all of the arguments get eval'd before passing to your and function.

frou_dh•12h ago
Given an eval primitive function that's a black-box, using it does seem somewhat similar to the use of a macro, in that a kind of "double evaluation" occurs (First, eval's argument is evaluated. Then the result of that is evaluated).

When a macro is used for any given purpose, what happens is a bit more general because it first "does something with" its argument (rather than necessarily straight-up evaluating it). Then the result of that is evaluated.