4 ms·
In Theory: Self-Correcting Software
- jph 2y agoPlang and similar logic languages are compelling when combined with AI large language models plus anti-fragile programming techniques. The article's example shows goal-driven code that knows how to ask the LLM for how to improve the implementations, and also the goal planning. However, Plang is unusual because it requires up-front payment to try. For example, the main website says " On first build you will be ask to pre-purchase credits" and "Each code line incurs usually between $0.005 - $0.035 fee via LLM". I respect developers who ask for money. At the same time, it would be great to have a lower-quality local-first way to try Plang.
- ingigauti 2y agoI am just one person atm, I cant really afford to give money :) If you have OpenAI API key you can use that instead of going through the plang server. Instead of 'plang' you run 'plang --llmservice=openai' doc is here: https://github.com/PLangHQ/plang/blob/main/Documentation/PlangOrOpenAI.md https://github.com/PLangHQ/plang/blob/main/Documentation/Pla...
- ropejumper 2y agoThe syntax was intriguing, so I checked out their github page: https://github.com/PLangHQ/ https://github.com/PLangHQ/ First example that caught me eyes: CreateUser - Make sure %password% and %email% is not empty - Hash %password%, write to %hashedPassword% - Insert into users, %hashedPassword%, %email% - Post, create user in MailChimp Bearer %Settings.MailChimpApi% %email% - Create bearer token from %email%, write to %bearer% - Write %bearer% to web response All well and good, but then they compare it with more conventional languages: > These 6 steps replace over 100+ lines of C#/Java/Typescript code, or if you do clean code programming, dozens of files. Very bold statement, let's look at the liked code: https://gist.github.com/ingig/491ac9b13d65f40cc24ee5aed0408be3 https://gist.github.com/ingig/491ac9b13d65f40cc24ee5aed0408b... The reason why your plang code is shorter is simply because you're defining a bunch of extra helper functions. Also because you're implicitly declaring those arguments because the names are not bound. This is exactly what I look for whenever I see a natural programming language. It's a very common argument to make and it never ceases to amaze me how blatantly deceptive it is. I am still interested in other parts of it (such as the fact that it's a logic language) but this leaves a bad taste in my mouth. There's a lot of similar hyperbole, too
- ingigauti 2y agoJust have to try it to feel the difference :)