187 karma · joined January 28, 2010
https://kruzenshtern.org https://twitter.com/oneearedrabbit
Just a few minor updates to my original post:
- Low-res photos are perfectly fine for my purposes
- I don't need Google Maps when I'm on the go
- Quick fact checking is not important
- One day, I ripped off the band aid and migrated all auth keys to Yubikey
- Tethering is occasionally useful
Edit: some things never change--I still haven't learned how to format a bulleted list here. : COUNTER
CREATE ,
DOES> DUP 1 SWAP +! @ ;
0 COUNTER PK
PK . \ => 1
PK . \ => 2
A semi-equivalent in Javascript is: const counter = init => {
let x = init;
return () => { x += 1; return x; };
};
const pk = counter(0);
console.log(pk()); // => 1
console.log(pk()); // => 2- Notes function similarly to tweets, and, by definition, cannot by customized much. They are like cute little memos or a river of news where less is more.
- I thought it would also be cool, if within Notes I could subscribe to memos from my friends. Whoa, Apple Notes as a social network! As you are already familiar with Apple Notes structure, it won't be a surprise that it is not difficult to add content to special folders automatically (I built a prototype, which sadly never published.) However, this topic raises a bunch of important questions, and I don't remember whether I found all the answers. It's been a while.
I thought this was a cute idea; however, as I started using it more, I inevitably learned that there are features that are hard to mingle in Notes alone, i.e. custom themes, metadata, automatically generated home page, top/side navigation, cross-references, etc. These features could be implemented with an external system that helps you to manage a blog, yet that ruined the idea that I wanted a tool that puts local & privacy above everything else, a tool that has as little dependencies as possible.
Long story short, I started working on the second iteration that I thought wouldn't sacrifice privacy, but eventually shelved and haven't completed it. I guess it is time to open-source it.
[1] https://devlog.notespub.com/2022/08/site-generator-for-apple...
Can you try generating 1/8 or 1/4 curves to check the partial generation? Or these rules--should produce the triangular shape:
A=AFFFB-F-FB+F+A
B=B+F+AF-F-AFFFBSpace-filling curves are ridiculously easy to implement with L-system rules, and I spent a few days developing a set of axioms to express it in a rewrite system. This was a fun puzzle [2].
A => BF-F-BFFFC-F-FC+F+BF-F-BFFFC-F-FC
B => BFFFC-F-FC+F+B
C => C+F+BF-F-BFFFC
[1] https://www.sciencedirect.com/science/article/pii/S0166218X0...Back in March I used a bit more elaborate multi-step prompts for GPT3.5 to generate amusing pictures and published a gallery [1]. However, I eventually reached a point where changing prompts did not consistently improve the final results. At the end of the day, the quality of images are only as good as the training dataset, and GPT is a black box.
For something different, to test whether it is possible to "compress" visual content specifically for GPT, I ran another experiment. SVG, being a verbose format, takes time to generate a detailed image, and it also becomes expensive over time. I translated a subset of SVG elements into Forth words [2], which has a nice synergy with GPT tokens--this allowed me to progressively render pictures and produce smaller outputs without sacrificing much in quality.
Finally, I training my own GPT2-like model on the QuickDraw dataset [3]. It's not surprising that a sequence transformer can be trained to produce coherent brush strokes and recognizable images as long as there is a way to translate a graphical content into a sequence of tokens. That said, I found myself with more questions than I started, and trying other ideas now.
[1] https://drawmeasheep.net/pages/about.html
y=Wx_0
y=W(x)x_0
A couple of months ago I learned that GPT is capable of creating rudimentary drawings, and since then I poured my heart into tinkering and improving GPT and algorithmic steps until I reached a point where images became recognizable.
GPT3.5 doesn't always generate the most artistic illustrations, but once in a while it may draw surprisingly delightful sketches. GPT4 is more creative, but is also more expensive. I selected a few images and prompts to demonstrate what GPT3.5 can do right out of the box: https://kruzenshtern.org/23-draw-me-a-sheep.html
Next, break it down into steps. Write everything down like a brainstorm meeting.
This is a preliminary plan. Identify any known unknowns and research topics until they become known knowns. In the end, there is a list of steps to be done to achieve the goal. Can't crack it yet? Not a problem, put it in the reserved zone and move on.
Tackle step #1, or perhaps start with the most troubling one, then reassess the remaining parts. Is the goal still stand, or has something changed? No? Excellent--proceed. Yes? Take a half step back and adjust the plan.
Repeat.
Don’t forget to take breaks, drink water, and, please, be forgiving.
If you are willing to go the extra mile, it is not that difficult to export Notes with media files from Sqlite and templatize them, and I am happy to help.
I am sure that Apple won’t be making any substation breaking changes to a database structure unless they have to, there is a price to pay. Such changes will always be tied to a major macOS/iPhone release, and it doesn't happen very often.
That said, I had to put this project on the back burner, it was not immediately clear what is the ROI especially considering there is a long tail of databases to parse. It starts with Mountain Lion and then adds up quickly.
I need to release my source code to Github--ORM approach was worth exploring, it is a concise declaration that is relatively easy to update and manage.
User::Account.server(database: "tmp/test.sqlite").first.
folders_dataset.offset(1).first
notes.
map(&:attachments).flatten.
find { |el| el.is_a?(User::ObjectTypes::EmbeddedPublicJpeg) &&
el.height > 700 &&
el.summary[/animal/i] }.
media_filepath
=> "Accounts/<uuid>/Media/F669B83A-0C47-408E-9645-015737F3B11F/Pasted Graphic.jpg"
Apple Notes' database structure is a fascinating product story. Notes started as a simple note-taking application that stored its content as raw HTML in a few simple tables. However, as the product grew and needed more features like collaboration, they had to make changes and add new columns and tables. They also implemented two flavors of CRDT-like algorithms that evolved over time: one for plaintext chunks and the other one for embedded objects like tables. On top of that, every change that Apple makes must be backward compatible to support legacy devices and systems; but backward-compatibility was not always possible and users had to go through “Migrate your Notes” steps, but it is again a product story.I wish that one day, someone from the development team would write an article about it.
[0] https://devlog.notespub.com/2022/08/site-generator-for-apple...
You might want to check out Kagi to summarize articles: https://labs.kagi.com/ai/sum. It does the heavy lifting of producing nice outputs for you.