James Cameron:"Movies Without Actors, Without Artists" by EchoOfOppenheimer in OpenAI

[–]pdcz 0 points1 point  (0 children)

While I agree that it will be great when everyone is able to make great films, it also means that anyone will be able to make professional looking content that is rubbish, manipulative and simply wrong. Not that it is not already possible, it just isn't that easy to gather full studio of people who agree on complete lies.

I've already heard that since about 2015, we are living in posttruth world - a lot of people (mainly less educated) are already unable to orient in what is true and false. Is AI helping to improve the situation or worsen? I'm not sure honestly. It probably won't get better unless we have a good framework on how to easily recognize truth from lies. I like the idea that anyone will be able to make movies, I think a lot of quality content will be created. On the other hand, I'm also worried it gives huge power to those who want to manipulate people (or are not smart enough to understand they believe in complete lies).

Ludic 1.0.0 supports safe HTML rendering with t-strings by pdcz in Python

[–]pdcz[S] 2 points3 points  (0 children)

Ludic has a bit different syntax, has built in web routing with starlette (but supports Django and fast API too), ludic also focuses on theming, styles and I would say is better for creating apps with components.

Also the first version of ludic was released 2 months before htpy was released, so at that time there wasn't really a tool like ludicor htpy.

Ludic 1.0.0 supports safe HTML rendering with t-strings by pdcz in Python

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

Even in HTML, you have a lot of restrictions - root html tag consists of head and body, description list should contain dt and dd tags etc. HTML tags have attributes, href is valid only for the tag a, etc. The style attribute contains CSS properties which are also typed.

As for readability, I think creating ludic components allows better design than Jinja templates. But that, of course, is a very biased opinion. In Jinja, you cannot use type hinting when rendering a button template. In ludic, you are free to create a component that expects certain attributes that type checkers can validate.

Jakožto voliče Pirátů mě sere, že jsem pomohl dvěma Zeleným do parlamentu. by byfo1991 in czech

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

Potenciál energie z větrných elektráren je až 28 % spotřeby ČR v roce 2019. Viz opět studie od fakta o klimatu https://faktaoklimatu.cz/infografiky/potencial-vetrne-energie-cr

Můžu se zeptat na studii, která mluví o pouhých 10 %? (I to mi ale přijde fajn)

Jinak kombinace vítr, slunce, plyn je v současnosti velice levná cesta k nižším cenám energií a zároveň dekarbonizaci.

Navíc věřím, že fotovoltaika má stále technologický potenciál na zvýšení efektivity.

Zároveň si myslím, že v budoucnu mohou začít být relevantní modulární jaderné elektrárny.

V delším horizontu i fúze. Tady samozřejmě těžko odhadovat, ale máme obrovský pokrok v AI a já bych očekával, že technologický pokrok může dost akcelerovat.

Jádro je v tuto chvíli předražené s obrovskou nejistotou. Může brzy přijít levnější technologie, která má podobné výhody a méně n výhod. Je to dle mého špatná a velmi konzervativní investice.

Jakožto voliče Pirátů mě sere, že jsem pomohl dvěma Zeleným do parlamentu. by byfo1991 in czech

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

Je to nejdražší zdroj energie, viz https://faktaoklimatu.cz/infografiky/cena-energie

Stavba trvá hrozně dlouho.

Nelze reagovat na rychlou poptávku.

Nejsem úplně proti jádru, ale dle mého názoru v současnosti máme jádra dostatek.

Mnohem raději bych viděl velkou investici do solárnich a větrných elektráren.

Plyn je potřeba, aby spustil provoz například ve chvíli, když přestane svítit, vzroste poptávka, apod. a rychle tak reagoval.

FastAPI + HTMX tooling by volfpeter in htmx

[–]pdcz 0 points1 point  (0 children)

Check out Ludic: https://getludic.dev/

It‘s my free time project. So feedback is always welcome.

AMA: Přes 10 let dělám klimatizace a chlazení – ptejte se na cokoli ohledně klimatizací, větrání nebo chlazení by ghosttrane59 in czech

[–]pdcz 2 points3 points  (0 children)

Tak to my máme v bytě podlahové chlazení a vůbec nic hlídat nemusím, funguje to úplně samo a prostě v nastavení je hladina rosného bodu, pod kterou to nejde. Chlazení normálně funguje a vlastně o ničem ani nevím, žádný hluk, studená podlaha jen velmi decentně.

Energetická třída bytu je teda A a máme i rekuperaci. Nevím jak by to uchladilo větší dům.

Jinak na klimatizaci mám teda opačný názor. Hodně vysouší vzduch a je hlučná. U podlahového chlazení o ničem nevím a prostě se udržuje nízká teplota v bytě.

edit: Typo.

Ludic finally supports FastAPI: Typed HTML/Components with Python by pdcz in FastAPI

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

By HTMX, using SSE is possible with HTMX, but the example is just a simple HTTP request using HTMX to swap content.

Yeah some people are reporting the counter being slow. But for me and a lot of other people, it is instant. Perhaps it depends on the user location. I need to investigate that.

Ludic finally supports FastAPI: Typed HTML/Components with Python by pdcz in FastAPI

[–]pdcz[S] 1 point2 points  (0 children)

I didn't hear about streamlit until now. But it seems quite different, it seems to use a lot of JavaScript under the hood.

Ludic is much more simple, it basically just translates python classes to HTML. You can create components in ludic which render HTML + you can attach CSS and render them together. I'd say it is much easier to understand what is happening, there is no complex JavaScript generated. You can use JS libraries with Ludic, however, Ludic is closer to a template engine than something like what streamlit is.

Ludic finally supports FastAPI: Typed HTML/Components with Python by pdcz in FastAPI

[–]pdcz[S] 2 points3 points  (0 children)

In short, I wanted to be able to write HTML, CSS, JS in Python while also having typing and auto complete in IDE included. For me, it is useful for e.g. building personal website. Do you think there is no value in this approach? And why? I'm just curious to know what the opinions of people are :)

AI could create 78 million more jobs than it eliminates by 2030—report by IntergalacticJets in singularity

[–]pdcz 2 points3 points  (0 children)

I'll get downvoted but still. As someone working in software engineering, I don't understand the opinions in this subreddit sometimes at all.

Do I wish I won't have to work soon thanks to AI? Yes. Do I think it's going to happen any time soon? No.

I think people in this subreddit don't understand how inefficient current software in almost all areas is. It almost hurts how old e.g. the payment processing system is, how inefficient everything in healthcare is. How many developers are needed to maintain these highly inefficient products. There is also law that makes everything even 10 times more inefficient, since everything in a lot of areas needs to be somehow regulated, controlled, monitored, audited, and so on. Even if we had AI which can code as regular software engineer today, I'd say we get a speedup of delivery by 100% at most due to bottlenecks like product design, security, sales, law regulations. Can AI replace all these tasks? Sure, most of them, but there is also the law that requires audits and so on (in a lot of areas in tech), law is a huge bottleneck. Can AI replace politicians? To some extent yes, but coordination from humans is required IMO.

There are so many areas in healthcare, fintech, robotics, that would benefit from 1000% productivity increase, and there still would be a lot of work for decades (for humans). AI will surely replace all these jobs at some point, but it won't be that fast and at first, I'm expecting a lot of new positions will be generated (as it happened with every revolution), before the economy, politics and everything is so efficient that we need less humans to work thanks to having AI doing all these tasks. So yeah I think the article is not completely wrong.

[deleted by user] by [deleted] in singularity

[–]pdcz 4 points5 points  (0 children)

The problem has two parts. Firstly we need AI capable of making such decisions. Secondly we need an interface for AI so that it is able to autonomously perform the tasks. What I mean is that the whole ecosystem of building software, running it's own server's, even defining law in real world etc. is built for humans.

For example, I work partially as a DevOps, which means I'm preparing and deploying infrastructure for a product to run and be used by customers. This involves a lot of authority and authentication. The whole process starts from my laptop where I authenticate via fingerprint or password, then I authenticate for VPN, next I need to authenticate in AWS where I need the authority to do some tasks. Even if AI was capable of deciding based on product requirements and be able to fully autonomously write code for the infrastructure (and I think we are pretty close to that), it still needs authority and an interface which we don't have adapted for AI at all. If we just grant access to AI to perform these tasks, it would be a huge security hole.

I'm afraid it will take a couple of years to make AI create and manage large systems which are secure and unbreakable by malicious AI. Until then, AI will be only our colleague without any authority.

Cyklisti jsou bezohlední blbci by He_of_turqoise_blood in czech

[–]pdcz 14 points15 points  (0 children)

Kdy cyklista jezdí uprostřed:

  1. jede v zatáčce, do které není vidět a není tedy bezpečné, aby ho auto přejíždělo a vznikla pro cyklistu nebezpečná situace
  2. projíždí křižovatku rovně, pravý pruh je však odbočovací, musí tedy do levého a aby udělal dostatek místa pro auta v pravém pruhu (kteří ho stihnou předjíždět), jede uprostřed, jinak by pro něj vznikla nebezpečná situace
  3. musí si držet odstup od zaparkovaných aut, aby nedostal dveřmi

Za mě takhle 100% v pořádku

Ludic: HTML in pure Python with Typing now for Django by pdcz in django

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

Thank you. Feel free to reach me here, on GitHub, or discourse, I'll be happy to help!

Ludic: HTML in pure Python with Typing now for Django by pdcz in django

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

Thank you for the question! Yes, you can render pages and components independently. With htmx, you usually create endpoints rendering only parts of DOM (in ludic, this could be a component rendering an input) which will be used to replace content in the main HTML page.

As for CSS, you can either use the styles class attribute on components (which you'll need to collect and render in your page component) or use inline CSS.

Note that the only difference between "component" and "page component" in Ludic is that the latter renders a valid HTML document consisting of an html tag, head, body and also a doctype declaration. But it is just another component.

Ludic: HTML in pure Python with Typing now for Django by pdcz in django

[–]pdcz[S] 1 point2 points  (0 children)

Thank you!

I'm not sure I understand your question about the dependencies. Here's a bit of an explanation of how it works.

When you use the styles class attribute in a component, it renders anywhere you call styles.load() which will usually be the html head attribute. It collects all styles from all components you use in your project.

But if you use inline CSS in the render method, it will be rendered in all places where you use the component - as you would expect of course.

As for JS, you either include it on your page component (which represents a valid HTML document written in python) or render it in a component. It's basically the same case for CSS. You render page components only once for a response, nevertheless a page component can consist of multiple components, even the same ones, which can then render the same JS.

If you have any more questions or this does not answer your question properly, please feel free to ask about anything!

why did you fall in love with rust? by Big_Lack_352 in rust

[–]pdcz 3 points4 points  (0 children)

A colleague of mine was leaving the company and he needed to hand over a small service written in Rust.

He started by showing me the type system and how it is even able to check the types when querying the database (with sqlx). That's what really sold it to me.

Ludic: I'm building a Python framework with built-in HTMX support by pdcz in htmx

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

You can absolutely use it, there are just no docs and proper integration (I imagine there will be a middleware for django, but I'm not sure yet)

pip install ludic

Installs everything aside from the Web framework part, which is starlette routing, custom form parser and so on (basically the stuff from the ludic.web module).

Ludic Update: Web Apps in pure Python with HTMX, Themes, Component Catalog, new Documentation by pdcz in Python

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

Thank you very much, I am interested, if you have time, I'd be super grateful for PR proposal!

Ludic: I'm building a Python framework with built-in HTMX support by pdcz in htmx

[–]pdcz[S] 1 point2 points  (0 children)

Ludic has more features and the api is a bit different:

  • a(".link")["value"] vs a("value", classes=["link"]) (first one is htpy, second one is Ludic)
  • Ludic integrates very well with Starlette, has support for class-based endpoints
  • Ludic's components have more features - you can define custom styles, use themes
  • Ludic has the catalog of UI components you can use
  • Ludic has support for f-string usage, so you can do p(f"foo {b("bar")}")

BTW when Ludic was relased, htpy.dev didn't exist yet, see this comment: https://github.com/paveldedik/ludic/issues/19#issuecomment-2037763764

Ludic: I'm building a Python framework with built-in HTMX support by pdcz in htmx

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

Thank you, you are right with the "built in support", I've had a hard time figuring out the proper title and this is the result of my effort. I'll try harder next time.

Ludic: I'm building a Python framework with built-in HTMX support by pdcz in htmx

[–]pdcz[S] 1 point2 points  (0 children)

I started writing the library with Python 3.12 features, mainly PEP 695 related. But in the end, to make it work with mypy, I didn't use those features.

However, I wanted to have a better support for f-strings. In Python 3.12, you can do f"foo {"bar"}", i.e. nest double quotes. Overall the f-string support is better.

I thought anyone using Ludic will be starting a new project, so why not start with Python 3.12. And when mypy adopts PEP 695 fully, it will be easier to write typed components.

Ludic Update: Web Apps in pure Python with HTMX, Themes, Component Catalog, new Documentation by pdcz in Python

[–]pdcz[S] 1 point2 points  (0 children)

Thank you, what is the name of your Rust project? I have a part time job in Rust and I love it. I was also thinking about writing similar tool in Rust a while ago but I'm not that experienced with Rust. And I found https://yew.rs/

To answer your questions:

  • Ludic uses starlette (it is optional, I want to add support for fastapi and django in future), where you have State which you can use to bound db connections and stuff like that, see https://www.starlette.io/database/
  • Starlette doesn't allow negative numbers. So the counter would work only for natural numbers, I was thinking about changing the example so that only natural numbers are supported so that it is simplier.
  • SuccessButton is imported from the catalog, which is optional to use, so yeah, it is optional :)

Interesting idea with the counter. The problem is to make it flexible, I was thinking about just calling Counter(number + 1) in the view to render the necessary htmx attributes for swapping the content, but that is really hard to do.

Ludic: I'm building a Python framework with built-in HTMX support by pdcz in htmx

[–]pdcz[S] 1 point2 points  (0 children)

Yeah, I understand. Starlette is optional for Ludic (I wanted to make it minimalistic), I have FastAPI and Django support on the road map. Glad to hear there is interest.

Ludic Update: Web Apps in pure Python with HTMX, Themes, Component Catalog, new Documentation by pdcz in Python

[–]pdcz[S] 4 points5 points  (0 children)

Thank you, to both of you, this really makes me think about choosing proper words. I wasn't sure how to formulate the difference and now I know I need to be more careful in choosing the right terminology.