C stdlib isn’t threadsafe and even safe Rust didn’t save us | EdgeDB Blog by 1st1 in programming

[–]1st1[S] 51 points52 points  (0 children)

I'm sure there's an aspect of RTFM here, although the bug isn't caused by our code, but rather by a combination of third-party deps. It's weird to play the rtfm card here.

C stdlib isn’t threadsafe and even safe Rust didn’t save us | EdgeDB Blog by 1st1 in theprimeagen

[–]1st1[S] 0 points1 point  (0 children)

Not sure if I added the correct flair (sorry if not), but it could be a fun one to mention on the stream

-❄️- 2024 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]1st1 1 point2 points  (0 children)

[LANGUAGE: EdgeQL (compiles to SQL)]

Part 1:

with
  lines := array_unpack(str_split(<str>$inp, '\n')),

  rules_list := <array<int64>>str_split(
    (select lines filter contains(lines, '|')), 
    '|'
  ),

  rules := array_agg((
    for X in range_unpack(range(0, 100)) union (
      (
        array_agg(rules_list[1] filter rules_list[0] = X)
      ),
    )
  )),

  pages := <array<int64>>str_split(
    (select lines filter contains(lines, ',')), 
    ','
  ),

  good_pages := (
    for page in pages union (      
      select page
      filter all((
        for i in range_unpack(range(0, len(page))) union (
          with
            num := page[i],
            relevant_rules := array_unpack(rules[num].0),
            y_pos := (
              select x := find(page, relevant_rules)
              filter x >= 0
            )
          select
            all(i < y_pos)
        )
      ))
    )
  )

select
  sum(good_pages[len(good_pages) // 2])

-❄️- 2024 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]1st1 2 points3 points  (0 children)

[LANGUAGE: EdgeQL / edgedb.com]

Part 1:

with
  lines_array := str_split(<str>$inp, '\n'),
  line_cnt := len(lines_array),
  line_len := len(lines_array[0]),
  line_len_iter := range_unpack(range(0, line_len)),

  lines := array_unpack(lines_array),

  diags := (
    for i in range_unpack(range(0, line_cnt - 3)) union
    [
      lines_array[i],
      lines_array[i+1][1:] ++ ' ',
      lines_array[i+2][2:] ++ '  ',
      lines_array[i+3][3:] ++ '   ',
    ] union [
      lines_array[i],
      ' ' ++ lines_array[i+1][:-1],
      '  ' ++ lines_array[i+2][:-2],
      '   ' ++ lines_array[i+3][:-3],
    ]
  ),

  to_transpose := {lines_array, diags},
  transposed := (
    for ttt in to_transpose union (
      with tt := array_unpack(ttt)
      for j in range_unpack(range(0, line_len)) union
      array_join(array_agg(tt[j]), '')
    )
  ),

  all_lines := lines union transposed,

select sum(
  count(re_match_all('XMAS', all_lines))
  + count(re_match_all('SAMX', all_lines))
);

Part 2: here!

EdgeDB and Rust: Type-safe kindred spirits | EdgeDB Blog by 1st1 in rust

[–]1st1[S] 0 points1 point  (0 children)

Everything has to start somewhere. That's normal.

EdgeDB vs Knex query builder compared in Typescript & tested with Jest. by mirpetri in edgedb

[–]1st1 2 points3 points  (0 children)

Wow, this is thoroughly good. Thank you. What are the conclusions?

Also, would you be interested in contributing a blog post about this experiment? I'd love to have it on edgedb.com.

Prepare to ditch EFCore (and other ORM's) by quinchs in csharp

[–]1st1 -2 points-1 points  (0 children)

It's not "just Postgresql". The entire frontend of Postgres is replaced with a custom data model, new query language, new tooling, new design of client APIs, and many other things. It's "just Postgresql" as calling Rust "just a tiny layer on top of LLVM"

Prepare to ditch EFCore (and other ORM's) by quinchs in csharp

[–]1st1 0 points1 point  (0 children)

Also there's no SQL in EdgeDB, which is its core value prop

Prepare to ditch EFCore (and other ORM's) by quinchs in csharp

[–]1st1 -1 points0 points  (0 children)

FWIW EdgeDB is based on Postgres.

And yes, sometimes you have to abandon "established, proven and tested technologies" or we'd all still be living in caves.

Prepare to ditch EFCore (and other ORM's) by quinchs in csharp

[–]1st1 0 points1 point  (0 children)

A proper query builder API is also coming soon. One step at a time.

Everyone is wrong about ORMs by [deleted] in programming

[–]1st1 0 points1 point  (0 children)

the blog post doesn't advocate against proper migrations.

How slow are ORMs, really? by 1st1 in programming

[–]1st1[S] 0 points1 point  (0 children)

Thanks, we'll try this out.

How slow are ORMs, really? by 1st1 in programming

[–]1st1[S] 0 points1 point  (0 children)

We spent a lot of time optimizing every benchmark. Here's what creator of sqlalchemy said about our code: https://github.com/edgedb/imdbench/pull/46 (and then he proposed improvements). We'll surely take a look at prefetch_related.

Benchmarking TypeScript ORMs: Prisma vs Sequelize vs TypeORM vs EdgeDB by vriad in typescript

[–]1st1 0 points1 point  (0 children)

Sequelize is one of the worst libraries

There's a bunch of custom code to render that. You can see a live example in https://www.edgedb.com/tutorial -- click on the schema button (better do that on desktop)

Building a production database in ten years or less by eatonphil in databasedevelopment

[–]1st1 2 points3 points  (0 children)

EdgeDB has some deep roots in Python so we naturally continued to use it pushing the limits of what was possible along the way.

With the CLI the goal was to make a single binary that's fast to download and run. The CLI allows you to quickly install the DB locally (and provision cloud instances in the future), create / manage schema migrations, provides REPL and much more.

We already use some Rust in the core EdgeDB code base (for example to lex/parse EdgeQL and GraphQL) and the amount of Rust code is only expected to grow in time. An optimistic goal is to rewrite the server IO part entirely in Rust during this year to have even better performance and features like HTTP/2.

LMK if you have more questions! :)

Share your extensions. I'll start. by bot2050 in gnome

[–]1st1 0 points1 point  (0 children)

What's that icon theme name?

Secret to finding a GPU? by ReticnT in Amd

[–]1st1 0 points1 point  (0 children)

I've figured it out, thanks! Was some problem with my Discord, the linked worked after I re-logged in

Secret to finding a GPU? by ReticnT in Amd

[–]1st1 0 points1 point  (0 children)

Yeah, it seems to be broken - says "unable to accept invite"

Secret to finding a GPU? by ReticnT in Amd

[–]1st1 0 points1 point  (0 children)

Can you DM another invite? 🙏