Readit News logoReadit News
alxmng commented on Show HN: Term-Lisp – A Lisp, based on pattern matching and term rewriting   github.com/abuseofnotatio... · Posted by u/boris_m
Jtsummers · a year ago
No, it can operate on a data structure as well. There's string rewriting which does operate on text (but this can be stored in a structure amenable to applying rewrite rules versus brute force copying it or something silly). For term rewriting, there are plenty of efficient ways to store and operate on the information besides just textually.
alxmng · a year ago
Hmm maybe I misunderstand. All the rules must be applied to fixpoint or elimination, for every input right? And the larger the program (rule set) the worse the performance since more rules must be evaluated at each “tick” of the program, unless you play tricks with ordering rules.
alxmng commented on Show HN: Term-Lisp – A Lisp, based on pattern matching and term rewriting   github.com/abuseofnotatio... · Posted by u/boris_m
BoiledCabbage · a year ago
I'm somewhat surprised there isn't a semi-mainstream language for it. It's incredibly simple, with very few core concepts yet very powerful.

Similar to LISP in that sense.

alxmng · a year ago
I think the issue is performance. A true term rewriting system has to essentially operate on text, right?
alxmng commented on The Elimination Strategy – Why More Makes Your SaaS Worth Less   slimsaas.com/blog/elimina... · Posted by u/NoSEVDev
PaulHoule · a year ago
I don't know about you but I dread looking for products on AMZN. If I know exactly what I am looking for it is not too bad but it seems AMZN has been overwhelmed with "AI Slop" quality product listings since before there was Generative AI.

One step on my quitting Prime journey was contacting AMZN about an obviously fraudulent product listing and them telling me they didn't want to hear any complaints about a product listing unless I'd bought the product.

alxmng · a year ago
What I've noticed is if there's 1 product, 500 sellers will buy the product on Alibaba, create 500 different "brands", and when searching Amazon it appears there's thousands of products but it's actually a handful of the same product white labeled by many different sellers. The actual number of unique products in many categories is quite low but there's thousands of listings.
alxmng commented on JSON Patch   zuplo.com/blog/2024/10/10... · Posted by u/DataOverload
brap · a year ago
This declarative approach is always limited compared to an actual programming language (e.g. JS), and so over time things get bolted on until it’s no longer truly declarative, it’s just a poor man’s imperative language. A good example is HCL which is a mess.

What about just stringifying a JS function?

alxmng · a year ago
This is essentially the RPC vs REST debate. Do you want your API to be a schema of data types (REST), or a list of function signatures (RPC)?
alxmng commented on A Georgist's Guerilla Gardening Guide   taylor.town/oh-trespassin... · Posted by u/surprisetalk
alxmng · a year ago
There's plenty of available gardening space in unused yards. Ask your neighbors if you can garden their unused yard in exchange for them getting a cut of the produce or flowers.
alxmng commented on Reactive Relational Algebra   taylor.town/reactive-rela... · Posted by u/surprisetalk
alxmng · a year ago
Check out the paper "Dedalus: Datalog in Time and Space". It formalizes a Datalog to include time, specifically to handle async behavior. It explores exactly what you seem to be doing here.

Deleted Comment

alxmng commented on Zb: An Early-Stage Build System   zombiezen.com/blog/2024/0... · Posted by u/zombiezen
alxmng · a year ago
Did you consider writing a nicer language that compiles to Nix? A "friendly" tool on the outside with Nix inside.
alxmng commented on Why Haskell?   gtf.io/musings/why-haskel... · Posted by u/mesaoptimizer
joshlemer · a year ago
What kinds of things led to multiple types of URL's in the same codebase?
alxmng · a year ago
When I first started the project, URLs needed certain constraints enforced in my business logic. So I thought "Great, let me create a type for URLs". This is the type that parses URLs from user input and gets marshaled/unmarshalled to the DB.

Then I needed to ingest RSS feeds. So I found a library that handled that for me. Except that library uses another type for URLs. Uh oh. What should I do? I could change my URL type to be a wrapper type around both types, or write code to convert between the types. I chose to convert. Now I'm writing code to shuffle between the types where this RSS parsing module is used.

Then I needed to make HTTP requests. So I pulled in a library to handle HTTP requests. Of course, that library uses another type for URLs (from another library it depends on). Great. Now I have 3 types for a URL.

Then I needed to parse XML... and you know where this story is going.

So now my codebase has many different URL types.

The type-a-holics will say: "This is actually good! Each implementation of the URL type might have slightly different constraints, and the type system makes this all explicit. You should be grateful you spend half of your development time fiddling with types. The fact that `unpack . decodeUtf8` is littered around your codebase isn't code smell, it's the splendor of a type system that's saving you from yourself. You should learn to love the fact that you have to deal with String, Text, and ByteString and 4 URL types to fetch and parse an RSS feed. Otherwise your software would be full of bugs! Silly developer."

One day I finally woke up from this type nonsense. There's integers, rationals, strings, lists, and maps. The end.

alxmng commented on Why Haskell?   gtf.io/musings/why-haskel... · Posted by u/mesaoptimizer
jes5199 · a year ago
in general, I am in favor of language features that make it easy to prove that common errors will not happen. Conversely, I am against language features that make it easy to make new classes of errors that are hard to reason about.

Haskell manages to do a lot of both. The kinds of problems I ran into in my Haskell error were much, much weirder than the problems I run into in other environments - things that when I explain them to other programmers they often don't even believe me.

On balance, for me, the new problems were worse than the old problems, but your mileage may vary.

alxmng · a year ago
This is my experience as well. Referential transparency and immutability have many advantages, with few disadvantages (if any). Type checking is great as a way to enforce constraints. However, nominal types create unnecessary incompatibility and endless type shuffling every time you want to make even simple changes. I maintain a web app written in Haskell and there’s 3 or 4 different types for URLs in the codebase, even though there’s no real difference between them. Nominal typing is terrible for code reuse via third-party modules. So many hours wasted wrapping types or shuffling between them.

A functional language with a simple set of structural types would be the sweet spot for me. Clojure is probably the closest to this.

u/alxmng

KarmaCake day2532August 3, 2014
About
Ship software that matters. I'm happy to help.

https://www.alexmingoia.com

--

News junkie? Don’t miss a headline: https://sumi.news

View Original