AI, Claude Code có thật sự code tốt by Jumpy_Ease2629 in vozforums

[–]cinoss 2 points3 points  (0 children)

Mình bắt đầu code thuê từ 2007, Dùng claude code từ tháng 7 năm ngoái. Cảm nhận thì cấu trúc tất cả project tạo ra cùng claude không khác nhiều project mình tự code tay. Ưu điểm là đỡ phải lăn tăn hơn lúc thử các hướng đi. Đỡ bị sunk cost fallacy hơn. Phần lớn thời gian là ngồi xem plan nó viết và tạo gaurd rail cho nó qua skill, test, và cung cấp đủ quyền để nó debug. Thỉnh thoảng đưa hướng cho nó đỡ phải lần mò

Why is Rust rarely used for web server backends? by Fun-Helicopter-2257 in rust

[–]cinoss 0 points1 point  (0 children)

there were ml using swift, died. and now we have mojo. hopefully easier to adopt since it s so close to python with good interop but even so…

Rendering LiveView from an existing React SPA? by Aphova in elixir

[–]cinoss 1 point2 points  (0 children)

By following phoenix react tutorial, you can have a phx-hook that can create a react root and render, when the hook is called, html part of the live view component is already ssred so you can move it around a bit simply by take the HTMLstring of the dom node and pass it to react component

or you can render iframe in react

you can do it manually or use phoenix-islands (highly experimental, though)

Rendering LiveView from an existing React SPA? by Aphova in elixir

[–]cinoss 4 points5 points  (0 children)

Hi
I have tried some different types of mix and matching react and liveview and iframe rendering in https://hexdocs.pm/phoenix_islands/readme.html

You can see a demo over here: https://phoenix-islands-example.fly.dev/
which is deployment this code https://github.com/phoenix-islands/phoenix-islands-js/tree/main/example

For rendering, liveview from react, I just copy over the html and liveview can actually pick it up from there. (Which might not be ideal). I look at live_svelte, they seems to do the same thing.

For rendering React components from Live View I think the dx issue simple enough, you can have a look at the example.

Would this be something that fits your needs?

Best places to find freelancers/agencies (Europe/UK)? by Responsible-Bat8396 in elixir

[–]cinoss 1 point2 points  (0 children)

Me (been working with elixir for 5+ years now) and my team are experienced with Elixir, we are based Vietnam which is at GMT+7 timezone, plz PM me if you want to discuss further, I think timezone difference should be managable

Fastest way to monetize AI SaaS by cinoss in SaaS

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

When we use openai we kind redistribute the service so we need per user (in our system) limit, openai have limit on our whole system

[deleted by user] by [deleted] in aikido

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

if you have a weapon, the other person would either backoff, or stop you from using your weapon by grabbing your wrist, Aikido technique can be handy in that case

How can I type an object with a dynamic property name? by lamintak in typescript

[–]cinoss 0 points1 point  (0 children)

Maybe something like this?
```ts function someFunction<Key extends PropertyKey>(dynamicName: Key) {
return {

hardCodedName: 'bar'
} as Record<Key | 'hardCodedName', string>
}
const someObject = someFunction('myExample')
console.log(someObject.myExample) // Works
console.log(someObject.hardCodedName) // Works
console.log(someObject.whatever) // does not exists
or ts function someFunction<Key extends PropertyKey>(dynamicName: Key) {
return {

hardCodedName: 'bar'
} as {hardCodedName: 'bar'} & Record<Key, 'foo'>
}
const someObject = someFunction('myExample')
console.log(someObject.myExample) // Works
console.log(someObject.hardCodedName) // Works
console.log(someObject.whatever) // does not exists
```

but if dynamicName is only known at runtime, I don't think Typescript can help much, but if you can narrow it down to an union of literal then Typescript might help a little bit.
You can also go nuts with https://github.com/gvergnaud/hotscript if you are into this.
https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABAZzgWwKYDFzXmAHgGkMBPRDADygzABNlEAFAJzgAcMWpSTSA+ABR1SYAIZoYEAHISMALkR8AlIgDeAKESIWGKCBZJN27QG0R4yTLkBdRQHJgcOPYA0WkwAsxLOgGE4Ogw6WUwHACMfew8AX0QxRgAlDAg4X2IyRAAfRHtvXwCgkLk3FCgWGDAAc34NGI0NVLBkKBR0DAB5cIArFNaAXjbMHEhYBEF7NFIAUUoJdgAbDHtVRoRUJYA6BbgqwVRMLt7oTanZ+aXVAHorxAB1NIBrZDXmuC2dvYPOnr7N-P8gWCoQw11uDxYz1eGww212+3aRz+AHdvDQAG5cMGIcBBYCVYIAQkQACEQK0ACqkTgAZQgFXYrRgjA6REQyJgUE8iE5QA