I have yet to see an exploit that can be performed with a .txt file. PDF files can have all sorts of interactive junk and nested files embedded in them - you can get really crazy in that format.
Adobe added embedded javascript to pdfs. Its an option to turn it off but its enabled by default. I turned mine off a long time back and never notice any problems but I don't use a lot of pdfs with interactive forms.
At the same time they were doing this, I also iterated on an AI-built web browser with around 2,000 lines of code. I was heavily in the loop for it, it didn't run autonomously. You can see the current version of the source code here:
I'm posting from that web browser. As an easter egg, mine has a cool Tetris clone (called Pentrix) based on pieces with 5 segments, the button for this is at the upper-right.
If you have any feature suggestions for what you want in a browser, please make them here:
you're not meant to scroll ahead, the intention is to create a time sink in each chapter. I figured this out after reading the first chapter forever, then I was like "wait a second this is the concise book? how can I read the introduction forever?"
I've read the introduction part and I've seen no "time sink." I genuinely don't know what your comment means. Do you really have a hard time reading the introduction part?
you won't believe how powerful Python is with libraries. ChatGPT and Claude made a brand new browser, that isn't based on Chromium or Firefox, and yet still follows many aspects of layout correctly. I read the article we're discussing ("stop designing languages") on this browser and I'm currently using it to post this reply.
it doesn't look like it would be easily derived from Chromium or Firefox, because this code is Python and those don't use Python this way.
By the way is there any feature you'd like to see added to the toy browser? The goal is that one day it's a replacement for Chrome, Firefox, etc. It's being built by ChatGPT and Claude at the moment. Let me know if there are any feature ideas you have that would be cool to add.
>A python-based browser? What are you using for the GUI toolkit?
Great questions.
1. Yes, for the moment. Like the title of this article suggests - we're using a library! :)
It's great to iterate in Python, which has a large ecosystem of libraries. Believe it or not, there is a chance that in the future it would be able to translate the language into a different one (for example, C++) while using C++ bindings for the same gui libraries. This would speed up its actions by 40x. However, not all of the libraries used have C++ bindings so it could be harder than it looks.
you can have a quick read through. Originally it was using tkinter for the GUI toolkit. I believe it is still using tkinter, but the AI might be leaning on some other library. As you read it, is it using anything but tkinter for the GUI toolkit?
These libraries are doing a lot of heavy lifting, but I think it is still ending up drawing in tkinter (not handing off rendering to any other library.)
This is pretty relelevant to a project I'm working on - a new web browser not based on Chromium or Firefox.
Web browsers are extremely complex, requiring millions of lines of code in order to deal with a huge variety of Internet standards (and not just the basic ones such as HTML, JavaScript and CSS).
A while ago I wanted to see how much of this AI could get done autonomously (or with a human in the loop), you can see a ten-minute demo I posted a couple of days ago:
It's only around 2,000 LOC so it doesn't have a lot of functionality, but it is able to make POST requests and can read some Wikipedia articles, for example. Try it out. It's very slow, unfortunately.
Took a quick glance through the code, its a pretty decent basic go at it.
i can see a few reasons for slowness - you arent using multiprocessing or threading, you might have to rework your rendering for it though. You will need to have the renderer running in a loop, re-rendering when the stack changes, and the multiprocessing/thread loop adjusting the stack as their requests finish.
Second, id recommend taking a look at existing python dom processing modules, this will allow you to use existing code and extend it to fit with your browser, you wont have to deal with finding all the ridiculous parsing edgecases. This may also speed things up a bit.
Id also recommend trying to render broken sites (save a copy, break it, see what your browser does), for the sake of completion
thank you for your quick code review and for these many helpful tips! I'll take a look at them and see what I can put into practice.
EDIT: Unfortunately, it seems that the code is getting near the limit of the context window for Claude, so I'm not able to add several of the feature suggestions you added with the present approach. I'll look into breaking it up into multiple smaller files and see if I can do any better.
Just a note that you'll want to use the updated link, because the flies weren't able to navigate the more complicated maze - or at least, I couldn't get them to using the hyperparameters I tried.
I was wondering if the issue there is maybe the fitness function - the flies can get a higher fitness by avoiding the maze entrance early on by just heading straight up and early attempts to go into the maze early on will result in lower fitness.
why is pdf unsafe?
What format is safe then?
reply