verstra

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

Yea, but socket is not a file. Maybe if you stretch the definition.

Well in any case, when people say that linux is great because everything is a file, they either mean that:

  • they can edit configuration of most things with a text editor, or that
  • in bash (and other shells) it is easy to work with byte streams, piping them from one process to another and compose complex behaviour from simple commands.
[–] verstra@programming.dev 12 points 1 day ago (2 children)

It could be a process, which you can talk to only via an IPC call. For example, dbus

[–] verstra@programming.dev 13 points 1 week ago (1 children)

You are either a crazy nutjob or a genius thinker. Interesting idea

[–] verstra@programming.dev 3 points 2 weeks ago

Wikipedia to the rescue:

However, some formats (ex., HDV, DVCPRO HD) use non-square pixels internally for image storage, as a way to reduce the amount of data that must be processed, thus limiting the necessary transfer rates and maintaining compatibility with existing interfaces.

Actual displays do not generally have non-square pixels, though digital sensors might;

TLDR; some formats use non-square pixels for reducing file size, some digital sensors has non-square pixels.

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

Does anyone know why anyone would want to encode their video using PAR != 1? Reducing the file size, by storing less pixels in one dimension, but not the other?

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

I'm assuming guacamole is communism? What avocado?

[–] verstra@programming.dev 1 points 2 weeks 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 2 weeks ago* (last edited 2 weeks 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 weeks 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 weeks 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.

20
submitted 3 weeks ago* (last edited 3 weeks ago) by verstra@programming.dev to c/programming@programming.dev
 

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 month 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

 

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 ›