News for hackers. Stuff that matters.

foodoos

Re:Generalized Macros on Wednesday April 19, 2023 @05:21PM (#35633472)
Thanks for sharing your experience with Ruby templates and for the links.

> I don't think the power/danger tradeoff is worth it.

The power/danger tradeoff might not be worth it for the overwhelming majority of programs. For some kinds of programs I don't see how this power can be got with anything less powerful than macros.

Re:Generalized Macros on Wednesday April 19, 2023 @03:00PM (#35631949)
I appreciate and I'm impressed you're gratuitously positive.

I think you mean within reasonable programs that's not a metric that matters because most programs solve problems that don't need much autogeneration to be solved. For problems that do need autogeneration macros are one of the strongest ways.

A good way to become convinced of the power of macros is to try and write a web app in Arc to generate lots of HTML.

IDEs that generate a lot of the code are proof macros are needed because when you want to change the autogenerated code you have to do it by hand. Autogeneration can be done with macros and is simpler with macros.

Re:Generalized Macros on Wednesday April 19, 2023 @02:26PM (#35631585)
The author is reaching for a code walker.
Re:Generalized Macros on Wednesday April 19, 2023 @01:02PM (#35630576)
There's a stronger abstraction than "generalized macros" and the author of this article missed it.
Re:I made my blog solar-powered, then things escalated on Wednesday April 19, 2023 @12:58PM (#35630523)
Magnets can generate energy.
Re:Generalized Macros on Wednesday April 19, 2023 @12:56PM (#35630494)
> the power of Lisp macros isn't actually ever worth the responsibility in my experience

Expand your experience.

> At the very least, you can just write the code the macro would expand into.

You can "just" get it wrong when the code is used in many places.

Consider this as the hot take: macros reduce the number of characters you have to type. I haven't seen anything that beats macros in this metric.

Re:The Inner Workings of Distributed Databases on Monday April 17, 2023 @10:39PM (#35609325)
> we chose our goal to be achieving multi-master replication with Async consistency. We believe that this approach strikes the best balance of fault tolerance and transaction throughput.

"SLOG: Serializable, Low-latency, Geo-replicated Transactions"

https://par.nsf.gov/servlets/purl/10126332

Re:Ask HN: Who is hiring? (April 2023) on Monday April 17, 2023 @09:41AM (#35600556)
I got ghosted by this company.
Re:Ask HN: Who is hiring? (April 2023) on Wednesday April 12, 2023 @05:12PM (#35547023)
Emailed in the past and never heard back.