HNHacker News
TopNewBestAskShowJobs

mamcx

3,329 karma · joined June 18, 2012

http://www.elmalabarista.com.

Rust, F#, Swift, Python.

Experience building database engines and ERP software.

Open for work and custom development!

submissionscomments
mamcx··on Vendors that treat single sign-on as a luxury feature
And then if you need multi-tenant...
mamcx··on Left to Right Programming
That is what the syntax allow. And is the user that need to "patch" the meaning using other things like alias, renames or hopefully, proper names for fields (by the way "id, id, id" happens a lot in the wild!)

Is like "to control mutation I only need to append "mut" to the name!

mamcx··on Left to Right Programming
Even assuming that this is plausible way a user could think about it (that can be understood) it shows why is bad

Think: I have 20 tables with the column `id`

"I want 'id,id,id'"

is bad UX, and is what here is being argued, then when the syntax guide you: "I want 'FROM a: id'" is better

mamcx··on Left to Right Programming
> It's written that way because it stems from relational algebra,

A common misconception (that SQL is a realization of RA instead of barely based on it).

In RA, is in fact `Relation > Operator`

mamcx··on Making reliable distributed systems in the presence of software errors (2003) [pdf]
> it costs a ton to maintain your own platform

Truly? And considering here the option is C++?

I truly asking, how much cost is this, have been measured?

I suspect is like the issue with fail to measure the whole thing and is just like "my guys that work in the platform also work making my apps and fixing my printer, so when they work in the platform I can`t print" kind of situation, instead of "I have a platform team (that could be like very small) and a apps team, and I ditch the printer in the bin" that I suspect is just reorg correctly the same amount of people.

mamcx··on AI is impressive because we've failed at personal computing
Today is easy (finally we have Rust, Zig, Odin, Swift, Go etc that show marked improvements), but the op is correct: A lot of progress was stalled because people defend sub optimal tools.

Every time somebody suggest "but C is wrong" the answer was "You should not do the wrong, be careful every time and things will be fine!"

P.D: Yesterday we have pascal/ADA/effiel/ocalm and others, but the major issues is that C/JS should have be improved to remove the bad things, and add the good things. Is not as if what or why to do it was a mystery, it was just the fear and arrogance against change.

And this cause too much inertia against "reinvent the wheel" and too much hate against anybody that even try

mamcx··on Asyncio: A library with too many sharp corners
Because typescript is not python.

Look, is correct to understand that the BEST way, the BEST refactoring of all, is to change to a language + libraries that fix core issues (similar how you can't outrun a bad diet you can't outrun bad semantics)

BUT, also change it means lose a lot of nice things.

For example I move from python to F# and then Rust, for what I say that is now the best overall decision at all, BUT I miss dearly Django (and instant run and REPL)

IF I could get Django (that means transitively use python) and get better type system and perf from it, I could consider it and surely use it, like "python get as swift or go but with rust algebraic types, whatever it means to get here and yet is Django and python. ok?

Is unreasonable? but sincerely, it will nice if the best ideas get retrofitted in other languages because, well, I wish everyone get as more nice things as possible instead of keep with suboptimal options (that is what I say: breaking languages is not something that must be forbidden forever)

Is unreasonable? (I say again) could be, but I think is a good thing to explore. Maybe is not that much, and if at the end things get better, great!

mamcx··on Can Software Be Durable?
You need to answer this from many directions:

* Hardware * Network * Storage * Electricity

Before go to software, because if the hardware break then what?

After it, you need an OS where you can be certain don't depend on the cloud or phone home ever, then after that you probably need a decent set of:

* Solid programing lang: Like Rust * Or very barebones: Like C * A RDBMS like sqlite

Set of tooling like code editor, image, etc

mamcx··on Why you should choose HTMX for your next web-based side project (2024)
yeah, this weird.

You need to be catastrophically bad to mess something like htmx.

If you are doing things like eCommerce, form heavy, read heavy, websites (the majority) instead of full apps like a paint/game/code editor (that I say should start with htmx and small components with whatever), htmx IS so simple.

What kind of messy backend this projects have that failed it? Because this is the point: htmx is just html with a bit of more interactivity.

To fail with htmx then you MUST has failed to render html well, and if that is the case, with react will be even worst.

An outcome like this suggest that if the project were made in react or similar it will have failed even harder

mamcx··on Zig breaking change – Initial Writergate
I can relate, because I have so much things in years that broke left and right, but at the same time (except if you are talking about pre/alphas) I think is unhealthy to be vary of breaking changes.

A language, in special, should be able to do it. Extreme compatibility is the way to make the mistake that is C.

A breaking change that fix something is a investing that extend infinity to the feature.

Fear to do it, like in C, is how you accumulate errors, mistakes, millions of dollars wasted, because is also compound debt.

P.D: I think langs should be fast to break pre 1.0, and maybe have room to do it each 5/7 years. Despite the debacle of Python (that is in fact more reflective of python than of breaking), there should be possible to make a relatively painless sunsetting with good caring

mamcx··on When Your Exit Strategy Dream Is My Customer Nightmare
Others said don't work, but mainly if you aim too high.

THIS is exactly how you survive as small/solo company/consultant.

In fact, all my customers wish I have more time to redo most of the tools that they use. (Tipical scenario: "Hey your app that make invoices is neat, why you don't just add a module for our industrial process and because we want to integrate all and you need to add email capabilities then just add a word processor that is like excel, but good")

The "just add" is not only being naive or greedy, sometimes people dream that the few ones they can actually rely could do all already...

mamcx··on Features of D That I Love
Stressing the point, Rust ship very early with formatter, linter, cargo, rustup, and was not that behind in terms of editor support.

That is basically table stakes for a new language now.

mamcx··on Features of D That I Love
I don't use D but think that error handling is one major feature:

https://dlang.org/articles/exception-safe.html

In concrete, looks to me to be the only language that covers the major ways to do it.

(In concrete the `scope` way is the one I found inspiring. . I think the exceptions can go and be replace by it for langs where exceptions are removed)

mamcx··on Why email startups fail
Yeah. "No (real) customer has ever, or will ever, care about this. ", in fact means "No (real) customer has ever, or will ever, knows how to care about this".

And because they don't know, the heat is in somebody else. Like the tech support, or windows, or internet, or the anti virus or whatever (because even some tech support, if even exist, don't know but surely have a theory about it).

Let me tell you an example: When the local network, cloud flare, printer, windows, their firewall, etc fails and by coincidence they are using our app. they call US.

And blame US.

A sizable portion of the support calls that are handled by any provider of tech for small companies is about other peoples software.

mamcx··on Most ints are not floats
> but that allow int to float.

And not think what happened when people do `i64 as usize` and friends

(This is one are where the pascal have it right, including the fact you should do loops like `for I in low(nuts)..high(nuts)`)

p.d: 'nuts' was the autocorrect choice that somehow is topical here so I keep it.

mamcx··on Structuring Arrays with Algebraic Shapes
Can't find a repo of this lang...

Is compelling to me because I'm in the hunt for marry array + relational (https://tablam.org)

mamcx··on Microsoft Dependency Has Risks
Well. this is clearly just a example of a hard problem where MS tools are good for.

The MOST common developer that work on MS stack is in business apps and web, data, integration stuff.

There is much better fit for MS and there is NO good counterpart in OSX or Linux.

One of the major shocks I get when starting to work on OSX is how much less developed EVERYTHING is outside the ms stack.

The only good reason you have a life working in OSX and less in Linux is because the web lower the playing field.

But if this were a contest of "native" vs "native" is clear MS stack is ahead.

(Much more before, because of course the web change the equation so you can claim things FOR THE WEB are better on linux and even osx)

mamcx··on MUMPS
FoxPro(dBase family) was a much better take on the idea.

I also dream of something modern like this (https://tablam.org) but is certainly a significant undertaking. Accept partners!

mamcx··on Ask HN: What cool skill or project interests you, but feels out of reach?
I wish I could devote to build my dream programming language (https://tablam.org) that has several hard questions and troubles (mainly I wanna rebuild in full something like FoxPro).

But, there are things I truly have dream but have dedicated almost not effort trying:

* Play (rock) bass

* Draw comic/manga style. I wish to make histories and think I could do it but refuse to write plain words (idiot!).

Basically, art is my unreachable goal

mamcx··on (On | No) Syntactic Support for Error Handling
I understand that the decision could be correct for the situation (ie: if the stated goal is have a proposal with enough support and it was not reached not proceed is correct), that is different that the handling of error as-is is bad (that is the reason the people spend years to solve it)
mamcx··on (On | No) Syntactic Support for Error Handling
> is the problem just not being able to decide / please everyone,

Reading this article? in fact yes(?):

> After so many years of trying, with three full-fledged proposals by the Go team and literally hundreds (!) of community proposals, most of them variations on a theme, all of which failed to attract sufficient (let alone overwhelming) support, the question we now face is: how to proceed? Should we proceed at all?

> We think not.

This is a problem of the go designers, in the sense that are not capable to accept the solutions that are viable because none are total to their ideals.

And never will find one.

____

I have use more than 20 langs and even try to build one and is correct that this is a real unsolved problem, where your best option is to pick one way and accept that it will optimize for some cases at huge cost when you divert.

But is know that the current way of Go (that is a insignificant improvement over the C way) sucks and ANY of the other ways are truly better (to the point that I think go is the only lunatic in town that take this path!), but none will be perfect for all the scenarios.

mamcx··on (On | No) Syntactic Support for Error Handling
The problem is that error handling is far more complex than you think at first.

The idea that "the happy path is the most common" is a total lie.

    a + b
CAN fail. But HOW that is the question!

So, errors are everywhere. And you must commit to a way to handle it and no is not possible, like no, not possible to satisfy all the competing ideas about it.

So there is not viable to ask the community about it, because:

    a + b
CAN fail. But HOW change by different reasons. And there is not possible to have a single solution for it, precisely because the different reasons.

So, you pick a side and that is.

mamcx··on The Ingredients of a Productive Monorepo
And for small teams, what we want/need is the "all deps" mono-repo.

I wanna link other repos I depend on, but that repos can be read-only. And then all the tools work without extra friction

P.D: This could be another wish for jj!

mamcx··on A lost decade chasing distributed architectures for data analytics?
It will not happened. The problem is that people believe theirs app will be web-scale pretty-soon so need to solve the problem ASAP.

Is only after being burned many many times that arise the need for simplicity.

Is the same of NoSql. Only after suffer it you appreciate going back.

ie: Tools like this circle back only after the pain of a bubble. It can't be done inside it

mamcx··on The principles of database design, or, the Truth is out there
Sure. Data is not static. But is foolish to pretend is.

Adding surrogate keys not changed that, only add other column that COULD change.

mamcx··on The principles of database design, or, the Truth is out there
We can debate the first usage (small type for storage/cpu optimization) but the other 2 are actually good examples of natural keys!

Note the quotes:

> Every software project needs to represent the reality of the business he is embedded in...

> Such database needs to be designed to properly reflect reality. This can’t be automated, since the semantics of the situation need to be encoded in a way that can be processed by a computer.

Having the business need to share an ID, not give internal information, make some data opaque, use a 'arbitary' id to share as 'textual pointer' to the actual data, etc are valid natural keys.

What is wrong is just add a surrogate key just because, when the fact is that a natural key (to the domain, the business, the requirements) is the actual answer.

I discover this fact when doing sync. The moment I get rid of UUIDs and similar and instead keep data-as-natural things become MORE clear:

ulid: 01H6GZ8YQJ code: A1 name: A

ulid: 01H6GZ8YQK code: A1 name: A

ulid: 01H6GZ8YQJL code: A1 name: A

// All same, obscured by wrong key

vs

code: A1 name: A

(ie: The actual data and what I need to model a sync is NOT the same. Is similar to how in 'git' your code is one thing that is clearly distinct to the internal git structures that encode the repo)

mamcx··on Programmers Will Be Replaced by People with Ideas
Well, I don't deny the possibility, but...

Have you looked at the ideas people had?

mamcx··on The world could run on older hardware if software optimization was a priority
> the market buys bug-filled, inefficient software about as well as it buys pristine software

In fact, the realization is that the market buy support.

And that includes google and other companies that lack much of human support.

This is the key.

Support is manifested in many ways:

* There is information about it (docs, videos, blogs, ...)

* There is people that help me ('look ma, this is how you use google')

* There is support for the thing I use ('OS, Browser, Formats, ...')

* And for my way of working ('Excel let me do any app there...')

* And finally, actual people (that is the #1 thing that keep alive even the worst ERP on earth). This also includes marketing, sales people, etc. This are signal of having support even if is not exactly the best. If I go to enterprise and only have engineers that will be a bad signal, because well, developers then to be terrible at other stuff and the other stuff is support that matters.

If you have a good product, but there is not support, is dead.

And if you wanna fight a worse product, is smart to reduce the need to support for ('bugs, performance issues, platforms, ...') for YOUR TEAM because you wanna reduce YOUR COSTS but you NEED to add support in other dimensions!

The easiest for a small team, is just add humans (that is the MOST scarce source of support). After that, it need to be creative.

(also, this means you need to communicate your advantages well, because there is people that value some kind of support more than others 'have the code vs propietary' is a good example. A lot prefer the proprietary with support more than the code, I mean)

mamcx··on Matt Godbolt sold me on Rust by showing me C++
If you can live without much of the ecosystem (specially if has async) there is way to write rust very simple.

The core of Rust is actually very simple: Struct, Enum, Functions, Traits.

mamcx··on A senior Apple exec could be jailed in Epic case
> why we don't have the ability to make websites and web apps appear and operate like an app

The more we get this, the more dystopian thing will be.

Make the web more powerful is negative.

Is replace a 'wallen garden' with the most lock-down/monopolistic form of computing (the browser).

Is NOT possible to make your own browser. You can't. Make your own APP (from TUI and UP) is doable.

← PreviousPage 7 of 34Next →