Person interested in programming, languages, culture, and human flourishing.

  • 1 Post
  • 20 Comments
Joined 3 years ago
cake
Cake day: June 17th, 2023

help-circle




  • One alternative that seems promising is Nebula. It only fills a small part of the role YouTube currently occupies, since it focuses on being a platform for high quality professional content creators to make unfiltered content for their audience, but it’s funding model seems to be much more honest, stable, and so far viable than an ad-supported platform or the other alternatives. I don’t think anything could realistically replace all facets of YouTube (and I think the internet might be healthier if it were a little bit less centrally-located). A self-sustaining, straight-forwardly funded platform like Nebule seems like the best path forward to me.


  • Ah ok I think I get you now. To be clear, fall through is implicit - when the case being fallen through is empty. I forgot that, if you want to execute some statements in one case, and then go to another case, you need gotos. To be fair, I’ve never needed that behavior before.

    I absolutely see your point on break not being the default. It is sad, although I will say I don’t mind a little extra explicitness in code I’m sharing with a large team.


  • I’m not sure I understand your point about fall through having to be explicit, but I agree that switch statements are lacking ergonomics - which makes some sense considering they were added a looooong time ago. Luckily, they added recently the switch expression, which uses pattern matching and behaves more like Rust’s Match expression. It’s still lacking proper exhuastiveness checks for now, but that’s a problem with the core design of composition in C#’s type model and one they are looking to solve (alongside Discriminate Unions in all likelihood).



  • I certainly see where you’re coming from, but I think the designers of C# have done fairly good job evolving the language to balance backwards compatibility, simplicity (in terms of having “only one way” to do things), and the ergonomics expected of modern languages. I think C++ and JS are great comparisons because C++ has at this point added everything and the kitchen sink to it’s language and standard library, whereas C# has gone much more like JS introducing features that evolve the best practices for writing but still feel and read like essentially the same language. For example, primary constructors still look just like regular C#, it’s just a nicer way to define simple POCOs when desired.

    As far as important language features, I think it’s easy to pick on discriminated unions because it seems like C#’s users unanimously want that. However, if you read through proposals and discussions, it’s obvious that there’s a lot of nuance and trade offs in deciding how and what form of discriminated unions should exist in C# (and the designers are very active in working through that nuance and trade off - they said they have a working group that meets weekly to discuss it I believe*). And to be fair, they have introduced a LOT of other important features (like records and the vastly improved pattern matching) in just the last few years. Without those features, discriminated unions wouldn’t be nearly as appealing, and those features are great for the language even without DUs.

    *Edit: Source for my claim is the recent Languages & Runtime Community Standup on the official dotnet YouTube channel. Mads talks about the working group at 21:05, but the discussion of discriminated unions begins at 7:09.




  • I’ve been daily driving for right around a year now. There have been less breaks and difficulties than I expected from pre-1.0 software and it has made my shell experience so delightful!

    I find that when I want to do something simple quickly, nushell enables me to do it with no context switching, little to no friction, and no googling. I can just open/http get my data, pipe it through a really straight forward pipeline that practically writes itself with how clear the commands are, and save it in whatever format is convenient to me. I don’t have to monkey around with Python and packages and virtual environments, and I don’t have to spend 75% of my time googling and debugging insane bashisms. Nushell just works, and the help is so convenient I almost never have to go to the docs.

    My absolute favorite feature is that it’s truly cross-platform. I don’t have to install a compatibility layer like minGW on Windows, I can just make it my default shell and it works great. Then I can use it the exact same way in WSL, macOS, and Linux.

    The reasons to not be interested in nushell imo are:

    1. You’re already comfortable to the point of mastery with bash/zsh/fish, so the ease of use and quality of life improvements from nushell won’t be as valuable to you compared to the cost of switching.
    2. You spend more time in the shell on random servers you don’t want to customize than you do in your own shell. Obviously we are (infinitely?) far away from nushell becoming a default on any platform, so if you aren’t gonna be able to install in the places you would want it most, you’ll just end up infuriated that nothing else is as good as it.



  • “the only primary difference was that one happens before the aggregation and the other happens after, and all the other implications stem from that fact.”

    This is correct. The biggest implication of that difference is that, when you filter rows via a HAVING clause, the query will first select all the rows and aggregate them, and only then begin to filter them. That can be a massive performance hit if you thought that the filter would prevent filtered rows from ever being selected. Of course this makes perfect sense, there’s no logical way to filter an aggregate without first aggregating, but it’s not obvious.

    “PRQL’s simplification, rather than obscuring, seems like a more clear and reasonable way to express that distinction.”

    My main point is that PRQL makes no distinction. If you didn’t inspect that SQL output and already know about the difference between WHERE and HAVING, you would have no idea, because in PRQL they’re both just “filter”. Hence, PRQL is not simplifying the complexity (you still need to learn the full SQL syntax and the specifics of how it works), but it does obscure (you have no hints that one of your filter statements will behave completely differently from the other).

    As far as removing arbitrary SQL features, I agree that that is it’s main advantage. However, I think either the developers or else the users of PRQL will discover that far fewer of SQL’s complexities are arbitrary than you might first assume.


  • Because at the end of the day, SQL it what’s being run by the database. For example, in the Showcase on the front page, they have an “Orthogonality” example that demonstrates filtering both before and after an aggregation, which compiles to a WHERE clause and a HAVING clause respectively. WHERE and HAVING have very different impacts on SQL queries, and vastly different performance implications, but the simplification in PRQL obscures that complexity.

    At the end of the day, the transpiled langauge will have to either support only a subset of SQL’s features, or else be at least as complex as SQL. It cannot support all of SQL’s features and yet be less complex, because it is just a wrapper around SQL.

    I suppose for the right crowd, possibly people who run queries only once and do not care about performance implications, data integrity, etc., this could be a really useful tool. And in all fairness, they mention exactly that on their homepage:

    "PRQL’s focus is analytical queries

    PRQL was originally designed to serve the growing need of writing analytical queries, emphasizing data transformations, development speed, and readability. We de-emphasize other SQL features such as inserting data or transactions."

    But for developers who need to maintain an application database, I don’t foresee this becoming a useful substitute for SQL.


  • I don’t know anything about the newsletter. The core of the article seems to be observing a shift in AI/ML/LLM opportunities. Where before, most people in the field were developing the base models and doing the arduous and highly complex work of training models (what the author calls ML Engineers), now the majority of this field will be people who use those pre-made and pre-trained models, tweaking and applying them for more and more specific and quantifiable uses (what the author calls AI Engineers). He drew a malleable line between the two as whether you’re interacting with the model directly or via an API.


  • This seems nice in theory, but the tradeoffs make me question it’s real world viability. It has to be a transpiled language, because SQL is so ubiquitous is may never die. And yet, because it’s a transpiler, I’m skeptical that it will actually be easier to write than SQL, because you’ll still need to know all the gotchas and eccentricities of SQL.

    Maybe for users who already experts in SQL this would be a quaint alternative syntax. However, personally I’ve already invested so much time developing familiarity with SQL that I see no advantage in moving to a new syntax that would take more time to become deeply familiar with, and that my co-workers won’t understand.



  • Have been using it since early Alpha days, and I like it a lot but it definitely is still lacking some of the polish of more established tools like Notion.

    1. Does it work offline? Yes, it does. Your changes are saved locally and synced at the next opportunity. Obviously this can occasionally cause conflicts but in practice I’ve never had issues.
    2. Does it have databases like Notion? Not exactly. I was never a Notion power user so I can’t say how well they compare, but Anytype lets you define your own custom objects with custom relations (sort of like database columns) and link any objects together, as well as creating Sets of objects of the same type and Collections of objects of any kind. So I think in principle it can replicate all the features of Notion databases but in practice you’d want to change how you think about it to fit Anytype’s model more easily.
    3. Nothing like that yet, although they just open-sourced all their code and the devs are very active on the official forums receiving feature requests.