Results 1 to 27 of 27

Thread: Rewriting RC6

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Rewriting RC6

    When I first used DeepSeek, I immediately wondered if it was possible to use AI to rewrite RC6. So I did an experiment:

    Test Claude-Code: ReadTextContent

    Obviously, the experiment went really well. So, rewriting RC6 was added to my work plan. I didn't start on it right away, mainly for two reasons: on one hand, I don't have time to do things outside of my plan right now, and on the other hand, I want to know what Olaf thinks.

    If Olaf doesn't intend to continue upgrading RC6, would he mind if someone else used AI to rewrite it?

    Edit:
    I saw that someone in CodeBank has already rewritten RC6.WebView and RC6.Sqlite using AI, which is great. But the most important part of RC6 is RC6.Cairo, which is currently irreplaceable. If AI could accurately rewrite RC6.Cairo, that would be an amazing breakthrough.
    Last edited by SearchingDataOnly; Jul 20th, 2026 at 09:18 AM.

  2. #2

  3. #3
    Hyperactive Member
    Join Date
    Feb 2015
    Posts
    331

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    But the most important part of RC6 is RC6.Cairo, which is currently irreplaceable. If AI could accurately rewrite RC6.Cairo, that would be an amazing breakthrough.
    Maybe just me but I tried RC6/Cairo and although it was pretty good, I didn't find a single thing (for my needs anyway) that I can't also do with GDI32/GDI+. I use DIB back buffering and so most all of my graphics related stuff is very fast and very smooth.

    I personally found no compelling reason to switch to RC6/Cairo beyond perhaps the built-in SVG support.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by SomeYguy View Post
    Maybe just me but I tried RC6/Cairo and although it was pretty good, I didn't find a single thing (for my needs anyway) that I can't also do with GDI32/GDI+. I use DIB back buffering and so most all of my graphics related stuff is very fast and very smooth.

    I personally found no compelling reason to switch to RC6/Cairo beyond perhaps the built-in SVG support.
    Using RC6 is to prepare for possible 'cross-platform' use in the future.

    Attached is a code editor similar to VSCode developed with RC6.Cairo, and it has most of the features of a Web UI.
    Attached Images Attached Images  
    Last edited by SearchingDataOnly; Jul 20th, 2026 at 02:03 PM.

  5. #5
    Hyperactive Member
    Join Date
    Feb 2015
    Posts
    331

    Re: Rewriting RC6

    Ahh, ok. Cross-Platform makes sense. And that code editor looks very nice.

  6. #6
    The Idiot
    Join Date
    Dec 2014
    Posts
    3,017

    Re: Rewriting RC6

    RC6 is not just Cairo is more.
    I think the first thing is to create a "Cairo" only class.
    using AI it should be possible to create such thing.
    the rest of RC6 should be divided into separate projects.

    since I use direct2d/wic theres no plan to spend time on Cairo
    but Im sure, if I never started using Direct2d I would have a working Cairo without the reg-stuff u need with RC6.
    as u know Im anti-RC6 because of how heavy it is and the registration thing.

    the first step is PhotoDemon, as it uses Cairo, learn from it and create the class from it.
    Last edited by baka; Jul 21st, 2026 at 03:46 AM.

  7. #7
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,203

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    I saw that someone in CodeBank has already rewritten RC6.WebView and RC6.Sqlite using AI, which is great. But the most important part of RC6 is RC6.Cairo, which is currently irreplaceable. If AI could accurately rewrite RC6.Cairo, that would be an amazing breakthrough.
    Amazing breakthrough for AI not anything else. . .

    I’m rewriting parts of RC6 and posting in Codebank and everyone else is ripping me off with their feeble AIs :-)) but only parts that I’m personally using. I couldn’t give a monkey’s a** if you need Cairo for your glorious projects though.

    Bummer. . . for you!

  8. #8
    Fanatic Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    639

    Re: Rewriting RC6

    The trick created this, it could be a start.
    https://github.com/VBForumsCommunity/VbCairo/

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by baka View Post
    RC6 is not just Cairo is more.
    I think the first thing is to create a "Cairo" only class.
    using AI it should be possible to create such thing.
    the rest of RC6 should be divided into separate projects.

    since I use direct2d/wic theres no plan to spend time on Cairo
    but Im sure, if I never started using Direct2d I would have a working Cairo without the reg-stuff u need with RC6.
    as u know Im anti-RC6 because of how heavy it is and the registration thing.

    the first step is PhotoDemon, as it uses Cairo, learn from it and create the class from it.
    You and I have different hobbies; I prefer a complete and stable set of tools.

    IMO, rewriting RC6 with AI is totally doable, but 99% of the time will be spent on testing. So, for the next few years, I'll still keep using RC6.

    I'm glad to know that PhotoDemon uses Cairo. When I have time, I'll check it out and learn about it.

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by wqweto View Post
    Amazing breakthrough for AI not anything else. . .

    I’m rewriting parts of RC6 and posting in Codebank and everyone else is ripping me off with their feeble AIs :-)) but only parts that I’m personally using. I couldn’t give a monkey’s a** if you need Cairo for your glorious projects though.

    Bummer. . . for you!
    You continue to post useful stuff for others on CodeBank, which is really great, and I truly admire what you're doing.

    However, the code you post is of no use to me at all—I never use any of your code. Do you know why?

    Because you always have the habit of "making simple problems complicated," and this way of thinking makes it hard for you to find the best solution. Olaf, on the other hand, does the opposite. Olaf can always simplify very complex problems, which is a basic quality that all programming masters have, and I have that quality too.

    We can imagine it this way: if a top programming master can simplify a project with complexity 10 down to 1, then he can also simplify a project with complexity 10,000 down to 1,000. This way, he can develop the project with his own ability, meaning he can handle projects with a complexity of 10,000.

    But you always complicate simple things. You would take a project with complexity 10 and make it 30-50. Similarly, you would take a project with complexity 200 and make it 6,000-10,000. As a result, the complexity you can handle is limited to only around 200-300. So, you can never make very complex and large projects because your way of thinking limits the height of your technical skills.

    Your JsonParser and Lexer are typical examples of making simple problems complicated. They are good code, but not excellent code. Don't underestimate my standards and sense of aesthetics when it comes to software code.

    I truly respect your contributions to this forum, so I don't want to humiliate you. But if you keep provoking, the only one who gets hurt is yourself.

    Also, about the few threads you posted on CodeBank related to RC6, I only looked at the titles; I don’t have the time or interest to look at your code. Help those who actually need your help instead of wasting time in my threads.

    Edit:
    Of course, AI can now make up for some of your shortcomings, but AI can't help you be innovative. Some things can only be solved through innovation.
    Last edited by SearchingDataOnly; Jul 21st, 2026 at 03:28 PM.

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by yokesee View Post
    The trick created this, it could be a start.
    https://github.com/VBForumsCommunity/VbCairo/
    Based on what I've learned about AI recently, there's no problem rewriting RC6 with AI, but it would take a lot of time to test and optimize the AI-written code, which could discourage many people. And the biggest features of RC6 are stability and high performance, so for the next few years, I'll still continue using RC6.
    Last edited by SearchingDataOnly; Jul 21st, 2026 at 03:34 PM.

  12. #12
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,916

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    but 99% of the time will be spent on testing.
    I find that LLMs are pretty good at generating tests...you could prompt it to write tests that compare results of RC6 methods vs. your replacement classes and report discrepancies...feed those back into the AI that generated your replacement class and ask it to patch parts appropriately so results match RC6 exactly in those cases. Eventually you should get to "good enough" for your purposes.

    That said, if you're wanting to stick with VB6 @ 32-bit, then I don't see any reason the use anything other than RC6 - it works, it's well tested in the real world, and it's quite comprehensive in terms of what it offers (there's not much that it is missing that I can think of). The main purpose I can see for a rewrite is for twinBASIC 64-bit compatibility.

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by jpbro View Post
    I find that LLMs are pretty good at generating tests...you could prompt it to write tests that compare results of RC6 methods vs. your replacement classes and report discrepancies...feed those back into the AI that generated your replacement class and ask it to patch parts appropriately so results match RC6 exactly in those cases. Eventually you should get to "good enough" for your purposes.
    Very good advice. Right now, I'm indeed having DeepSeek help me write some compiler test code, and it's really efficient.

    Quote Originally Posted by jpbro View Post
    That said, if you're wanting to stick with VB6 @ 32-bit, then I don't see any reason the use anything other than RC6 - it works, it's well tested in the real world, and it's quite comprehensive in terms of what it offers (there's not much that it is missing that I can think of). The main purpose I can see for a rewrite is for twinBASIC 64-bit compatibility.
    At the moment, I don't have a need for 64-bit software, and RC6 completely meets my current work requirements. It's just that I've already built a lot of code on this closed-source third-party library, RC6, which makes me very uneasy. Especially as a Chinese person, we always face the risk of some tools being cut off. So sometimes I wish I could have a 'backup' option, so that if RC6 becomes unusable, my work won't be interrupted.

  14. #14
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,721

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    if a top programming master can simplify a project with complexity 10 down to 1, then he can also simplify a project with complexity 10,000 down to 1,000.
    OK, and what happens if that programmer simplifies that program twice, or three times... or n times?
    My question is if the simplification will stop on 1 or could go below 1.

  15. #15
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,673

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    Using RC6 is to prepare for possible 'cross-platform' use in the future.

    Attached is a code editor similar to VSCode developed with RC6.Cairo, and it has most of the features of a Web UI.
    At this point it's extremely difficult to imagine Olaf suddenly re-emerging with something that beats twinBASIC to VB6-compatible cross-platform.

    Also preparing for cross platform really should mean 64bit... Not a lot of 32bit support.

  16. #16
    Lively Member
    Join Date
    Feb 2013
    Location
    Brasil
    Posts
    68

    Re: Rewriting RC6

    Using RC5/6 and other routines that Olaf posts here... I'm impressed by the way things are usually done... generally aiming at resource economy, performance, and a far-from-trivial way of thinking... so, RC5/6 is something very special, definitely the result of a lot of dedication from someone with really special skills...

    Discussing a rewrite of RC6 is quite pretentious...
    I wonder what Olaf thinks about that...?

  17. #17

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by Eduardo- View Post
    OK, and what happens if that programmer simplifies that program twice, or three times... or n times?
    My question is if the simplification will stop on 1 or could go below 1.
    The more scientific something is, the simpler it often is. 'Simplification' usually comes from summarizing and abstracting general rules from a large number of complex cases.

    By simplification, I don't mean simplifying program features, but rather reducing complexity and improving quality and functionality through better design ideas and better solutions.

    If you have some time, you can take a look at the source code of VSCode, and you'll see just how incredibly complex it is. But a master programmer can simplify VSCode's architecture through a lot of innovation, ultimately achieving 90% of its functionality with just 1% of the code.

    Huawei in China applied a similar principle when dealing with 'chip manufacturing'; they could produce the 'world's most precise' chips with low-end equipment.

    Also, about VB6-Next, I've mentioned a viewpoint: a 5% increase in complexity, a 95% increase in functionality. That's my design goal.

    Actually, I've never thought that writing a compiler is a very difficult thing. What's been bothering me for a long time is finding the best solution to achieve the goals I just mentioned.
    Last edited by SearchingDataOnly; Jul 22nd, 2026 at 01:35 AM.

  18. #18

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by fafalone View Post
    At this point it's extremely difficult to imagine Olaf suddenly re-emerging with something that beats twinBASIC to VB6-compatible cross-platform.

    Also preparing for cross platform really should mean 64bit... Not a lot of 32bit support.
    IMO, Olaf has already given up on RC6, and he's also abandoned the VB6 community.

    Using RC6 can minimize dependence on Windows components and the Windows API. To be precise, it minimizes direct calls to the Windows API, which in turn reduces the workload for migrating to other operating systems in the future as much as possible.

    Also, I have my own ideas and plans for 'cross-platform' and I'm gradually testing them. I still don't know if they'll work. But I often experience situations where, just when I'm almost desperate, the best solution shows up.

  19. #19

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Quote Originally Posted by ThiagoPSanches View Post
    Using RC5/6 and other routines that Olaf posts here... I'm impressed by the way things are usually done... generally aiming at resource economy, performance, and a far-from-trivial way of thinking... so, RC5/6 is something very special, definitely the result of a lot of dedication from someone with really special skills...

    Discussing a rewrite of RC6 is quite pretentious...
    I wonder what Olaf thinks about that...?
    What you said is absolutely right. It's just that after AI appeared, a lot of things started to change.

  20. #20
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,413

    Re: Rewriting RC6

    Quote Originally Posted by fafalone View Post
    Also preparing for cross platform really should mean 64bit... Not a lot of 32bit support.
    I don't see any BASIC language being the future of cross-platform support.

    Even Microsoft, which kept VB.NET mostly in parity with C# until very recently, is struggling with cross-platform support; despite completely rewriting .NET.

    In my opinion, the best path forward is to use a hybrid approach by leveraging the native web-view engine to let HTML/CSS/JavaScript handle the presentation layer and have that communicate back to the VB6 (or twinBASIC) application. You would lose the RAD aspect of being able to drag-and-drop UI, but you'd be able to keep all of your business logic and data access in whichever flavor of BASIC you're using.

    .NET MAUI allows for this via the HybridWebView so that on Windows and Android it uses a WebView and on iOS it uses WKWebView. But even then, notice the missing penguin. Microsoft still hasn't figured out cross-platform with Linux yet.

    I guess what I'm getting at is that I'm very skeptical of any sort of leap towards cross-platform support in a 32-bit Windows based language where developers flocked towards it because of how easy it was to rapidly build the UI. Then again, I was also skeptical about 64-bit support for legacy VB until Wayne proved everyone wrong.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  21. #21
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,203

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    Edit:
    Of course, AI can now make up for some of your shortcomings, but AI can't help you be innovative. Some things can only be solved through innovation.
    We have AI coding agents for how long now? Where are all the enabling projects in the Codebank from “innovative” folks like you? You can call me what you want but I’m a guy who knows how to deliver.

    Can you imagine a 10x (or a 100x) developer with an AI machine gun how much more productive can become. Just watch me because I just found my new mojo and my plans are very ambitious.

    The truth is AI can produce value as much as you can understand its output — using it outside your bounds of understanding has risks. You don’t understand RC6, you have no idea how large parts of it are implemented, you are complete noob in crypto and system programming, you are staring at it in awe like native aborigen.

    Few people here have the capacity to reimplement RC6 from scratch without AI. Those are the ones which have most chance to reimplement it with AI in short terms.

  22. #22
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,673

    Re: Rewriting RC6

    Quote Originally Posted by dday9 View Post
    I don't see any BASIC language being the future of cross-platform support.

    Even Microsoft, which kept VB.NET mostly in parity with C# until very recently, is struggling with cross-platform support; despite completely rewriting .NET.

    In my opinion, the best path forward is to use a hybrid approach by leveraging the native web-view engine to let HTML/CSS/JavaScript handle the presentation layer and have that communicate back to the VB6 (or twinBASIC) application. You would lose the RAD aspect of being able to drag-and-drop UI, but you'd be able to keep all of your business logic and data access in whichever flavor of BASIC you're using.

    .NET MAUI allows for this via the HybridWebView so that on Windows and Android it uses a WebView and on iOS it uses WKWebView. But even then, notice the missing penguin. Microsoft still hasn't figured out cross-platform with Linux yet.

    I guess what I'm getting at is that I'm very skeptical of any sort of leap towards cross-platform support in a 32-bit Windows based language where developers flocked towards it because of how easy it was to rapidly build the UI. Then again, I was also skeptical about 64-bit support for legacy VB until Wayne proved everyone wrong.

    I take your point but that's in response to people who committed enough to the VB6 language they're preparing for cross-platform support *with RC6*.

    Also 64bit VB has been around for like 15y now in the form of VBA; people always underestimate how widespread VBA use is, and most is 64bit now. A lot of the advanced developers it matters beyond the Windows API-- they use Declare with functions from libc.dylib, especially one that's interchangeable with Windows CopyMemory (RtlMoveMemory).

    tB has demos of using both WebView2 and CEF built in controls for application-style UIs; and one thing you don't want is a browser-based UI with 32bit memory constraints. Then again there's nothing strictly impossible about drag and drop cross-platform UI, the main issue is making a complex one... you could replicate the primary features well enough but VB also became synonymous with using the Win32 API to extend it-- the perfect combination of RAD and low level access being what I've always thought made VB popular (also combined with the redistributable classes and activex controls that let people easily take advantage of what more advanced users have done).

  23. #23
    The Idiot
    Join Date
    Dec 2014
    Posts
    3,017

    Re: Rewriting RC6

    following TB in discord Im just amazed how good it is. I fail to see any usage of RC6 if you are "starting now", as right now, for anyone that want to get into "basic" again ,it should be twinbasic.
    for the rest, if u use RC6 and u like it, keep doing that, I will keep using VB6 as Im comfortable with it. "IF" I change it will not be RC6 but twinbasic as I see that as the "next thing".

    for TB a cairo implementation is enough, no need for any RC6 in TB.

  24. #24
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,413

    Re: Rewriting RC6

    I've cleaned up this thread a little bit. This is the second time in as many weeks that I've had to clean up unnecessary commentary that derails from thread because of the same actors and my patience is wearing thin.

    Please remember that everyone on VBForums is a volunteer and we give our time willingly. Disagreements are encouraged, but it crosses the line when it gets personal.

    In the immortal words of Gold Five: "stay on target"
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  25. #25

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,866

    Re: Rewriting RC6

    Every forum will have some arguments and mutual attacks, and the best way to reduce this is a 'Black-List'. IMO, a 'Black-List' is a stricter way of isolating each other than an 'Ignore-List.' I hope vbForums could provide a 'Black-List' feature.

    This is how I envision the 'Black-List' feature:
    If I put someone on the 'blacklist,' then:
    (1) That person can't see any of my threads and can't participate in discussions in threads I start.
    (2) That person can't see any of my comments in other threads.
    (3) I can't see any of that person's threads or comments.
    (4) I also can't see any code that person's posts in CodeBank.

    If the forum could provide the above 'Black-List' feature, there would be a lot less meaningless arguing here.
    Last edited by dday9; Today at 01:05 PM.

  26. #26
    Fanatic Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    639

    Re: Rewriting RC6

    And if you put Spain on the blacklist, Argentina would have another World Cup.

  27. #27
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,413

    Re: Rewriting RC6

    Quote Originally Posted by SearchingDataOnly View Post
    Every forum will have some arguments and mutual attacks, and the best way to reduce this is a 'Black-List'. IMO, a 'Black-List' is a stricter way of isolating each other than an 'Ignore-List.' I hope vbForums could provide a 'Black-List' feature.

    This is how I envision the 'Black-List' feature:
    If I put someone on the 'blacklist,' then:
    (1) That person can't see any of my threads and can't participate in discussions in threads I start.
    (2) That person can't see any of my comments in other threads.
    (3) I can't see any of that person's threads or comments.
    (4) I also can't see any code that person's posts in CodeBank.

    If the forum could provide the above 'Black-List' feature, there would be a lot less meaningless arguing here.
    Edited your post to remove an individual. There's no reason to name drop here.

    I recommend you requesting this in the forum support forum.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width