Post ASptIkRcmaciWVhmuO by mike@sauropods.win
 (DIR) More posts by mike@sauropods.win
 (DIR) Post #ASocMoksnynUfj6l7I by john@sauropods.win
       2023-02-18T20:46:55Z
       
       0 likes, 0 repeats
       
       So it appears that I have avoided using an ORM by writing my own ORM. I'm not sure I can open source this thing...#programming #python #ORMs
       
 (DIR) Post #ASok4LTBkRbYGXXBWC by mike@sauropods.win
       2023-02-18T22:13:09Z
       
       0 likes, 0 repeats
       
       @john Ah, I've lost count of the number of times I've done that!
       
 (DIR) Post #ASolvujDUKk8v78eki by AggroBoy@mastodon.social
       2023-02-18T22:34:05Z
       
       0 likes, 0 repeats
       
       @john  best way to avoid ORM? Don’t use a relational database!
       
 (DIR) Post #ASotEG6dRcKA76mrNQ by cathodion@mastodon.sdf.org
       2023-02-18T23:55:50Z
       
       0 likes, 0 repeats
       
       @john Oops, wRoteMy-own
       
 (DIR) Post #ASotIQtpFyyGkNmmrw by john@sauropods.win
       2023-02-18T23:56:38Z
       
       0 likes, 0 repeats
       
       @AggroBoy Indeed! I'd quite like an embedded database though, so I'm using SQLite for now, but I have considered json files (which is how my current website works), or an embedded NoSQL, but I haven't found an obvious candidate. I actually like relational databases, I think they are a decent way to store data for the way my brain works, they just interface with programming languages SO badly.
       
 (DIR) Post #ASow2qfzx02hvEZwFE by AggroBoy@mastodon.social
       2023-02-19T00:27:27Z
       
       0 likes, 0 repeats
       
       @john that’s totally fair. I have nothing fundamental against rdbms-es (and they’ve been so persistently successful; I feel like if I did, that would be my problem, not theirs). I actually (like you) find them a very pleasing way to model structured data. I just wish they were less of a default in the industry, and they do have a tendency to encourage over-complex data models, but neither of those are criticisms of the technology itself.
       
 (DIR) Post #ASowLojXOldHOlHN20 by AggroBoy@mastodon.social
       2023-02-19T00:30:48Z
       
       0 likes, 0 repeats
       
       @john the lack of a good (or at least well-known) embedded doc db is an interesting one. I guess, ultimately, it ends up as a question of what you’re gaining over just using a dict (or language equivalent), or even the filesystem, both of which are pretty capable doc-dbs for low data volumes.
       
 (DIR) Post #ASowz6JtwiYREg1IH2 by john@sauropods.win
       2023-02-19T00:37:55Z
       
       0 likes, 0 repeats
       
       @AggroBoy Yeah well obviously what I need is persistence, so it has to come out of the language at some point!I can be quite concrete about the problem area for me, artworks and their associated toots could very naturally be a json file, but tags are a problem. If I want to get to the artworks associated with a tag, I need to look inside every single one, or have an index file. At which point I feel like I'm reinventing a database. Mongolite would work, but alas.
       
 (DIR) Post #ASox6s1oxwUJEBGf0i by john@sauropods.win
       2023-02-19T00:39:21Z
       
       0 likes, 0 repeats
       
       @AggroBoy And of course I do vaguely have an eye on scale. I'd like it to run pretty seamlessly with hundreds or thousands of users, it would be a more useful thin it it did.
       
 (DIR) Post #ASoxad3jBZHPUNLjdI by john@sauropods.win
       2023-02-19T00:44:40Z
       
       0 likes, 0 repeats
       
       @mike It just seems to happen, huh? I've decided to just steam on and get this thing working with the features I want, and _then_ think about its implementation structure. Honestly, it's actually a pretty simple CRUD application, re-writing probably isn't going to be that hard once I've pinned down the data structures and functionality,.
       
 (DIR) Post #ASpq1UvgukmncQqrB2 by mike@sauropods.win
       2023-02-19T10:54:36Z
       
       0 likes, 0 repeats
       
       @john "He-writing probably isn't going to be that hard once I've pinned down the data structures and functionality."Ha.Haha.HahahahahahaHAHAHAHAHBWBAHABHWBHBHAAAA!!!
       
 (DIR) Post #ASprIQ4OKs53QLYOYa by john@sauropods.win
       2023-02-19T11:08:52Z
       
       0 likes, 0 repeats
       
       @mike no I’m serious, it’s only a couple of few hundred lines of code. I might consider writing it in Nim to actually force a proper typed re-write.
       
 (DIR) Post #ASprODfhLSEYi0ll32 by AggroBoy@mastodon.social
       2023-02-19T11:09:55Z
       
       0 likes, 0 repeats
       
       @john I mean, don’t feel you need to justify anything to me! A) it’s your thing, and b) No-one ever got fired for using SQL, and I use it myself all the time; I was just making a provocative quip. 😄True story: back when TetZoo was hosted at Scientific American, and the rss feed broke for like 3 months, I wrote a scraper that looked for new posts and generated an rss feed for me on my own server, and I used MySQL for even that simple thing’s persistence. 😅
       
 (DIR) Post #ASptIkRcmaciWVhmuO by mike@sauropods.win
       2023-02-19T11:31:19Z
       
       0 likes, 0 repeats
       
       @john We'll see.