verstra

joined 2 years ago
[–] verstra@programming.dev 1 points 1 day ago

I do believe that it is possible to translate any SQL query to Lutra, that is Lutra can cover that last 1% of cases. There are a few caveats:

  • Some cases would produce very verbose Lutra code because they have special-case syntax in SQL, which makes them terse.
  • Lutra does not cover DDL (CREATE, ALTER, DROP, ADMINISTER). That's because Lutra is conceptually a "run-time" language for dealing with data and not schema modifications. Because of this, Lutra cannot be used for migrations.
  • Lutra is still in development, so you are likely to find cases that are not yet expressible. If you do, please report them, so they can be implemented. But I don't believe that there are cases that would conceptually clash with Lutra language design, like there are with most ORMs.
[–] verstra@programming.dev 2 points 1 day ago* (last edited 1 day ago)

Two great questions!

First one comes down to how database query optimization and predicate pushdown in particular. In this case, albums would probably have an index on albums.id column, which would optimize get_album_by_id into a single index lookup. Ideally, I would want to have an explicit function for this, something like sql::from_index("albums", "id", 3), but there is no such thing as explicit index lookup in PostgreSQL right now.

Regarding different function syntaxes:

  • curly braces { ... } construct a new tuple (think object, struct, record),
  • parenthesis are used for precedence. They are not strictly needed for function bodies, but they do give a better visual guide to multi-line definitions, especially when using pipe operator.

So:

func something() -> { ... }  # constructs a new tuple
func something() -> ( ... )  # returns a value
func something() -> ...      # equivalent to ( ... )
[–] verstra@programming.dev 1 points 3 days ago (2 children)

I think that ORMs work great for 90% of cases, and abismally for the rest. They are also limited by the syntax and semantics of the language they are embedded in. For example, if you refer to a non-existing column, it would take a call to database to figure that out, and a cryptic error message with non-helpful code span.

[–] verstra@programming.dev 1 points 3 days ago

Haven't thought about but yes - it solves a few of the same problems as ORMs. Maybe the front page does not mention it, but with Lutra, you don't get result.getInt(). You get generated Python classes / Rust structs that reflect the Lutra types.

 

For the last year, I've been working on a query language that aims to replace SQL and data frame libraries. It's continuation of my work on PRQL and EdgeQL.

Now I need feedback on usability, ergonomics and overall design. Read trough the examples, check out the CLI & tell me what could be better.

 

For the last year, I've been working on a query language that aims to replace SQL and data frame libraries. It's continuation of my work on PRQL and EdgeQL.

Now I need feedback on usability, ergonomics and overall design. Read trough the examples, check out the CLI & tell me what could be better.

[–] verstra@programming.dev 3 points 1 week ago

I'm currently looking into Concourse.

It does have steeper-than-average learning curve, but I really like that it has well-defined fundamentals (resources, jobs, tasks) and isolation with OCI containers. Before I adopt it fully, I want it to run my nix flake dev shell.

[–] verstra@programming.dev 6 points 1 month ago (4 children)

Also computer science, parsing

[–] verstra@programming.dev 3 points 1 month ago

Nice. I knew something was in the works for Material for MkDocs and it turned out to be exactly what I wanted. Which is a binary executable that you point to a repo and it gives you a static website.

[–] verstra@programming.dev 11 points 2 months ago

Meanwhile, I'm using Pixel 3a for my main phone (for quite a few years now) and consider it a relatively up-to-date phone.

[–] verstra@programming.dev 1 points 2 months ago* (last edited 2 months ago)

Cool, looks like garnix is fast. I wanted to use it, but home page and docs are hard to parse. Too big fonts, required scrolling and bad docs organization. Why can't all projects just use material for mkdocs?

[–] verstra@programming.dev 7 points 2 months ago

Ok, good point, most languages I know use "C-style sequential function-calling" paradigm. Is there a specific idea that you have for a language that would better utilize our CPUs?

Notation that treats asynchronous message-passing as fundamental rather than exceptional.

I'm pretty sure there exists at least one research paper about notation for the actor pattern.

You explain pretty well why you don't think C is a good fit for hardware we have today, but that warrants a proposal for something better. Because I for sure don't want to debug programs where everything is happening in parallel (as it does in pong).

[–] verstra@programming.dev 1 points 2 months ago (3 children)

Pigs is a blanket? Why, americans, why do you invent such strange names for normal food, such as "sausage in bread"^1?

[–] verstra@programming.dev 1 points 3 months ago (1 children)

I wouldn't say so - it's not streaming app views from the server, it provides containers for apps, segmented into "grains". So each open document gets it's own container. Other than that, it's just normal web apps (like immich or seafile).

 

Is anyone here running Sandstorm? If yes, what's your experience?

I really like the idea of "grains" where an instance of the app runs for each document/project/unit of data your app has. It does improve security a lot, because it is very similar as running root-less docker.

I also like the unified auth and user management sandstorm provides.

 

I don't have much to say, only that I expected flutter to be a bloated fragile abstraction on top of different native GUI APIs, but no.

It's quite fast, relatively easy to develop and it just works.

I'm working on a desktop app that needs a high-perf rust impl, and (for now) flutter looks like a much better choice than tauri.

 

When I was in high school I found Sublime Text and learned "multiple cursors". Since then, I've transitioned to vscode, mainly because I need LSP (without too much configuration work) for my work.

I keep hearing about how modal editing is faster and I would like to switch to a more performant editor. I've been looking at helix, as the 4th generation of the vi line of editors. Is anyone using it? Is it any good for the main code editor?

The problem that I have is that learning new editing keybindings would probably take me a month of time, before I get to the same amount of productivity (if I ever get here at all). So I'm looking for advice of people who have already done that before.

My code editing does involve a lot of "ctrl-arrow" to move around words, "ctrl-shift-arrow" to select words, "home/end" to move to beginning/end of the line, "ctrl-d" for "new cursor at next occurrence", "shift-alt-down" for "new cursor in the line below", "ctrl-shift-f" for "format file" and a few more to move around using LSP-provided "declaration"/"usages".

I would have to unlearn all of that.

Also, I do use "ctrl-arrow" to edit this post. Have you changed keybindings in firefox too?

 

Anyone using soucehut (sr.ht)? Can you please explain to me how you navigate the site?

I really like the minimalist approach and extremely fast website UI, but I just cannot navigate the site.

If I'm looking at source of a repo on https://git.sr.ht/ and want to see open tickets, how do I navigate to https://todo.sr.ht/ ? If I click on "todo" at the top, it takes me to my todo lists, not todo of the project I was just looking at.

 

I'd expect the state to have a list of all its citizens and their basic personal info (age) which could be used to determine their eligibility for voting. In my country, we get a "invitation" to the vote, with your voter station and info on how to change it.

Instead, I'm seeing posts about USA's "voter rolls", which are sometimes purged, which prevents people from voting. Isn't this an attack on the voting system and democracy itself?

So why doesn't USA have a list of voters? Are they stupid?

 

I know that the answer is yes, I should, but outlets near the setup are not grounded (even though they look like they are) and I don't want to have wires running though my living room.

The real question is what are potential problems ? Occasional system reboots? Permanent damage to PSU? Permanent damage to other components?

 
 

I'll just come out and say it: 50W. I know, I know an order of magnitude above what's actually needed to host websites, media center and image gallery.

But it is a computer I had on-hand and which would be turned on a quarter of the day anyway. And these 50W also warm my home, although this is less efficient than the heat pump, of course.

What's your usage? What do you host?

view more: next ›