I just changed all the code loading user shared posts and comments to directly query SQL, from the publications' shared table, and removed the duplicate user fields.

It's not huge, but it's a bigger change than it sounds, because some things assume this data is free and called those fields repeatedly in a loop, and thus needed changed to load from SQL once into a variable, and loop over the cached variable. Which sounds simple, but, nothing in Arc is simple.

The reason I'm doing this, is to reduce the (duplicate) data in the user structure, so saving users to SQL will take less time. If you recall, I created the users→SQL migration a couple months ago, and it blew up. Mostly because saving took to long, and sometimes failed, causing data to get out of sync. I still have that old code. My plan is to fix it up, and make these other changes to make saving users fast.

There were a couple other smaller issues with the users→SQL conversion, but the slow save time caused most of the big ones.

Once users are in SQL, it becomes a lot easier to convert Arc functions to Racket, one at a time, from the bottom up. (Because currently, users are loading from files, which would require Racket to load from files into data structures exactly as Arc expects, and those functions are called by many others, which can't be converted until the load functions are done first).

I'm currently in the process of buying a house, and if all goes well, moving in August 31. The house needs some work, which will likely take up most of the weekend time I've been putting into Hubski development, for a while. So, my current plan is to try to convert users to SQL before then. Then converting Arc→Racket becomes easy, and I can convert a couple functions whenever I have a spare half hour, even while working on the house.

If you see any new issues, make a #bugski post, or Github issue.

As always, questions and comments welcome.

Cedar:

Keep up the great work dude! Is the code ever going to go Open Source? If love to have a look at a non trivial arc / racket project!


posted 2833 days ago