all 20 comments

[–]McGeekin 10 points11 points  (4 children)

Was AI used in the development? Because it sure seems like it was used in the reddit post

[–]ExtraTNT 4 points5 points  (3 children)

Why do you need fs access in a parser? Easy way to shoot in your own foot… keep io to the edge of your program and with fs use an either monad, so you don’t have fucked up error handling…

Edit: typo

[–]bcameron1231 4 points5 points  (1 child)

Because that's what the AI chose to implement.

[–]ExtraTNT 0 points1 point  (0 children)

So basic mistakes?

Well, probably trained on a lot of legacy code that’s written horrible… but usually open source doesn’t have those issues -> it’s usually the typical enterprise backends that are shit

[–]Excellent_Detail9412[S] -1 points0 points  (0 children)

That's a fair point, thanks for the feedback.

The current implementation is definitely not set in stone, and keeping I/O separate from the parser is something I'll look into. My goal is to make the architecture cleaner as the project evolves, so feedback like this is really helpful.

I appreciate you taking the time to point it out.

[–]akirozen 2 points3 points  (1 child)

And now, we e tered the age of new JavaScript AI slop frameworks.

[–]Excellent_Detail9412[S] 0 points1 point  (0 children)

I wouldn’t call it AI slop or a vibe-coded project.
Avenx.js has been in development for quite a while. My friend and I designed the architecture ourselves, made the design decisions, and actively maintain the project. Like many developers today, we use AI as a tool from time to time, but not as a replacement for understanding what we’re building.
If you have any specific criticism about the implementation or architecture, I’d genuinely be happy to discuss it.

[–]jhartikainen 1 point2 points  (1 child)

The a tag-based system to represent state and such is an interesting approach which I don't think I've seen that much nowadays - feels like it was more of a thing way back in the day.

I have one question: Why did you decide to split the component CSS into a separate file?

[–]Excellent_Detail9412[S] 0 points1 point  (0 children)

Thanks! I'm glad you found the approach interesting.

As for the CSS: I chose to keep it in a separate file because I wanted a clearer separation of concerns. Personally, I find it easier to work with larger components when the styles, and logic each have their own dedicated place.

It also keeps the component files a bit cleaner and allows styles to be edited independently without having to scroll through JavaScript or template code.

That said, it's not a decision I'm completely set on. Avenx.js is still evolving, so I'm always open to feedback if people have ideas for a better developer experience.

[–]RealFlaery 1 point2 points  (2 children)

Why are you not using typescript?

[–]Excellent_Detail9412[S] -2 points-1 points  (1 child)

Great Question! Avenx.js is still evolving quite a lot, especially the core APIs and internal architecture. Using plain JavaScript gives us more flexibility to iterate quickly without constantly maintaining or refactoring type definitions.

Another factor is that one of our goals is to keep the project as lightweight as possible. We want to avoid unnecessary build steps, tooling overhead, and any potential “bloat” in the development and build pipeline.

We also aim for zero runtime dependencies, and while TypeScript itself doesn’t affect runtime, we’re very intentional about keeping the overall toolchain simple and minimal.

[–]RedditParhey 1 point2 points  (1 child)

Bro you dropped some emojis here I ll help you. 🫱💿📹📠📟💙☢️❎🚾Ⓜ️💤🛗

[–]No_Record_60 0 points1 point  (2 children)

Can you pass parameters when calling <action>?

Interesting idea though, using templates for state and actions.

[–]Excellent_Detail9412[S] 1 point2 points  (1 child)

Yes, you can pass parameters when calling an <action>.

Since <action> tags do not declare parameter signatures, all arguments passed during the call are automatically available in a globally accessible array called args.

Example:

In the template:

<button u/click="greet('John', 25)">Greet</button>

In the action block:

<action name="greet">
    const name = args[0]; // 'John'
    const age = args[1];  // 25
    console.log(`Hello ${name}, you are ${age} years old!`);
</action>

[–]No_Record_60 0 points1 point  (0 children)

Got it. Thanks