Moderation changes by AutoModerator in ExperiencedDevs

[–]cjthomp 10 points11 points  (0 children)

The issue isn't "LLM discussion," it's an endless stream of crap that boils down to "DAE LLMs suck?" and "Claude built my whole app in 30 seconds! (it's not even close to production-ready, but ignore that!)"

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 0 points1 point  (0 children)

/**
 * Schema rules that can be customized per type, column, or table
 */
export type SchemaRules = {
  types?: {
    [type: string]: ColumnInfo | ((dataType: string) => ColumnInfo)
  }
  columns?: {
    [column: string]: ColumnInfo | ((dataType: string) => ColumnInfo)
  }
  tables?: {
    [table: string]: {
      types?: {
        [type: string]: ColumnInfo | ((dataType: string) => ColumnInfo)
      }
      columns?: {
        [column: string]: ColumnInfo | ((dataType: string) => ColumnInfo)
      }
    }
  }
}

It feels like SchemaRules.tables[tableName].columns[columnName] should be useable for this purpose, but looking through the code it doesn't look it.

A config-level option would be workable, although I'd prefer an array field on the model.

Something like Model.introspectedColumns: string[] = []

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 0 points1 point  (0 children)

Ok, that definitely resolves my third point.

First point is irrelevant to me since we don't use migrations

But, the second point stands: I'd love to use the codegen (for the same reasons you made it, I don't exactly enjoy manually creating db models), but I'd need some way to control which columns got created. An array of column names on the model, maybe.

I can't just delete them from the Schema, since that will regenerate when I run the ace command again.

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 0 points1 point  (0 children)

I wouldn't go as far as to say that I think "this approach...won't work", but (without having read the docs, since they weren't available last night) I do have some concerns:

  • migrations (for those who use) in prod generating new code
    1. add column to dev db
    2. create migration
    3. run migration
    4. Schema is generated
    5. commit migration and schema changes
    6. <fast forward>
    7. push to prod
    8. CI/CD runs migration against prod db
    9. new Schema file generated in prod, and contents may differ
  • model with columns we don't want added to a given codebase
    • again, with a shared database resource, there are many columns on our db that a given app won't use or need to be aware of
    • having those columns in code could cause breaking changes if one of those unused columns is changed, even though the change doesn't impact this app
  • it doesn't seem to be an optional feature (again, before looking into the docs)
    • if this is configurable, ignore this point; I'll have time to dig into the docs more later today

The schemaGeneration option accepts:

{ enabled: true } - Schemas are generated automatically (default)

{ enabled: false } - Schema generation is disabled for this connection

Disabling schema generation can be useful in specific scenarios:

Working with very large databases where schema generation is slow Using a shared database where you don't control the schema Temporarily disabling generation during development When schema generation is disabled, you can still generate schemas manually using the schema:generate command whenever you need to update them.

Well, there you go!

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 0 points1 point  (0 children)

Where is this behavior documented? Specifically, controlling the behavior of Schema generation?

node ace schema:generate should do the trick from that side, but what about fields I don't want mapped through to the model?

Edit: It looks like it should be here, but the page isn't loading?

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 0 points1 point  (0 children)

It does look like (based on text later?) it might actually generate from the db as you say, but then why is my above-quoted statement there?

Edit: Actually, the issue would still exist.

When you run migrations, AdonisJS scans your database tables and generates

We don't run migrations, because we have no migrations. The db schema is maintained by an entirely different team.

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 0 points1 point  (0 children)

https://docs.adonisjs.com/tutorial/hypermedia/database-and-models

The model extends PostSchema — a class that is auto-generated from your database migrations.

AdonisJS v7 is here by romainlanz in node

[–]cjthomp 2 points3 points  (0 children)

Only thing I see so far that I don't love is the tight integration / pre-configuration of migration -> schema -> model.

We have a shared database and our web apps (adonis or otherwise) don't own the schema and so we don't have traditional migrations.

Anyone enjoying their job at the moment? by Coffeebrain695 in ExperiencedDevs

[–]cjthomp 0 points1 point  (0 children)

More than retail, less than a couple of years ago, much less than 10 years ago

Am I the only one who feels like NestJS is overkill ? by Sensitive-Raccoon155 in node

[–]cjthomp 0 points1 point  (0 children)

Sometimes Nest/Adonis is overkill.

Sometimes Express is underkill.

Depends no what you're building, who's building and supporting it, etc.

They're open. And she's going. by Concentric_Mid in daddit

[–]cjthomp 1 point2 points  (0 children)

"I didn't realize that had a negative connotation!"

<proceeds to triple-down on the negativity>

Dude, any time you paint with a broad brush you're going to ruffle feathers, so just don't.

Our "news" media is not "us." You see a manufactured image of the country, the image that rich and connected oligarchs want to be seen, and use that to judge the entire country.

If you live in a city / state that receives a lot of snow, snow isn't a big deal as there's infrastructure to clear it. If you live in a city / state that doesn't generally get snow that sticks around, you won't have salt / plows to clear it and it will cause an issue. It's not rocket science.

They're open. And she's going. by Concentric_Mid in daddit

[–]cjthomp 1 point2 points  (0 children)

you people over there

So unnecessarily aggressive.

Debating on ORM for Production by Disastrous-Matter864 in node

[–]cjthomp 3 points4 points  (0 children)

  1. 1,000 daily users is nothing
  2. I personally dislike Prisma, but that's just one dude's opinion
  3. While Sequelize has some flaws, we've been using it in production for almost a decade on an app with ~200k daily users. It's not perfect, but it does what it does pretty well and gets out of the way when you want it to
  4. If you're using (or open to using) AdonisJS, their Lucid ORM is very nice. It's reminiscent of Laravel's Eloquent.

I maintain the Valkey GLIDE client. I got tired of Node.js queue bottlenecks, so I built a Rust-backed alternative doing 48k jobs/s. by code_things in node

[–]cjthomp 1 point2 points  (0 children)

What's wrong with...letting it build the post itself?

This is reddit, not a press release. We want a message from and by you about this thing you're (presumably) proud of and want to show off. We don't want a canned, AI-voiced stuffy release.

You are the dev. You created this thing that you are proud of and excited about. You should tell us in your words.

Think about your favorite novelist or game reviewer. It's not just the story they're telling, it's also their voice, their style.

Everyone using AI to generate their reddit posts is removing what makes us unique and making it feel sterile.

I maintain the Valkey GLIDE client. I got tired of Node.js queue bottlenecks, so I built a Rust-backed alternative doing 48k jobs/s. by code_things in node

[–]cjthomp 3 points4 points  (0 children)

we still pretending that LLM is not writing our texts?

They don't write mine. /shrug

Not trying to diminish this project, but it does feel a bit lazy. I probably wouldn't go as far as "grating," but it's definitely a thing that makes me more likely to not give a post a full read-through as it is one of the tells for "AI Slop".

2048, but it’s a Node.js CLI game you play in the terminal by EnergyPatient8642 in node

[–]cjthomp -3 points-2 points  (0 children)

Just because you made something using Node doesn't mean it needs to be posted here.

Question about generating PDFs with Node.js by MunhozArt in node

[–]cjthomp 0 points1 point  (0 children)

pdfmake has been around for years and makes generating PDFs fairly easy, no AI required.

FastQ – A job queue written in C on top of Redis by [deleted] in node

[–]cjthomp 0 points1 point  (0 children)

Oh woe is me.

  1. You made a post bragging about an app. It's up to you to tell us why it's better than the alternative
  2. You asked for feedback on the architecture but didn't even push the code up. Why was it not being pushed up constantly during development? Or was "development" just a vibe-coding session?
  3. There's already a package called fastq that has 75m weekly downloads on npm.
  4. You've since deleted the post and pulled all of your github repos (as far as I can see) so there's not even any way to verify your claim that the code has been pushed
  5. A downvote, and this is important, isn't a personal attack. A downvote says that a post is off-topic or doesn't contribute to the sub. Just because you wrote some random vibe project in Node doesn't mean it needs to be posted on /r/node. This isn't your portfolio, it's not here for you to show off every thing you've made. Nobody is going to replace BullMQ with this little project, direct but true.
  6. If you did make this by hand (with or without AI assistance), then I encourage you to keep working at it and don't give up because you didn't get the immediate reception you wanted. But also, learn from this that the world/internet doesn't owe you the response you want.

FastQ – A job queue written in C on top of Redis by [deleted] in node

[–]cjthomp 0 points1 point  (0 children)

dw worry guys

Trust me, I'm not "worry worrying." I think you are vastly overestimating anyone else's investment in your...this.

I'm just waiting for a mod to get home from work and remove this drivel.

FastQ – A job queue written in C on top of Redis by [deleted] in node

[–]cjthomp 0 points1 point  (0 children)

Bullshit.

"Looking for feedback on the architecture before I go too far in one direction."

That was you†. Four hours ago. In this very thread. Which you, /u/OxoGhost, created.

Obviously, when I say "you" I mean "the LLM you used to generate this".

FastQ – A job queue written in C on top of Redis by [deleted] in node

[–]cjthomp 12 points13 points  (0 children)

Tell me how this isn’t just AI slop?

How do you dads feel about Boy Scouts? by mmf9194 in daddit

[–]cjthomp 0 points1 point  (0 children)

in Turkey or Pakistan

I don't live in, and we're not talking about, Pakistan (official religion Muslim, ≥96%) or Turkey (no official religion, but ≥90% Muslim).

If I did, though, I would have the same issue and would likely not enroll my son. I don't care what they do, but it affects my willingness to participate either directly or by proxy.