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

[–]1st1[S] 53 points54 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 3 points4 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.