Post ASRBDXkHNb6fmiD2p6 by john@sauropods.win
(DIR) More posts by john@sauropods.win
(DIR) Post #ASR3J18UjabWkidRgW by john@sauropods.win
2023-02-07T11:55:39Z
0 likes, 0 repeats
I've been thinking about re-writing my website, and making it compatible with the #Mastodon API. A kind of gallery wrapper around Mastodon. If it works well enough, I'll make it open source. I want to pick a tech stack other people are familiar with (rather than my current setup of custom insanity). What would be a good set of techs for a new open source project these days? Realistically I can only really know #Python and #Javascript well enough.#OpenSource
(DIR) Post #ASR3gZvvWbeTKozXQu by john@sauropods.win
2023-02-07T11:59:58Z
0 likes, 0 repeats
I remember when it was just #LAMP,* there were no frameworks for the backend, and there really wasn't any frontend programming at all. Those were the days!*Or if you were really fruity, LAPP. I was not that fruity.
(DIR) Post #ASR4NcVznlmZnIO144 by travelingflwr@raphus.social
2023-02-07T12:07:44Z
0 likes, 0 repeats
@john How about a 2fer? Laravel (framework + PHP). It's fun to learn too.
(DIR) Post #ASR4ppFU3GndOZ71eK by oliver_schafeld@mastodon.online
2023-02-07T12:12:49Z
0 likes, 0 repeats
@john Sigh, the good old days when frontend developers still prided themselves on mastering HTML and CSS. When frontends were supposed to be semantic, lean and readable instead of strongly typed, test-driven and tied to a 48-hour deployment pipeline.And hooks were for fishing... š¤ dev #humor š
(DIR) Post #ASR4qnZ3nc6sSejVUe by john@sauropods.win
2023-02-07T12:13:06Z
0 likes, 0 repeats
@travelingflwr Yeah, I'm not too keen on PHP, and haven't written any for over ten years.
(DIR) Post #ASR4xAyveCVKpGsF9c by john@sauropods.win
2023-02-07T12:14:10Z
0 likes, 0 repeats
@oliver_schafeld Mastering CSS is still a truly impressive feat. Good lord has it got complicated!
(DIR) Post #ASR5G7ERoSUKhNADKq by Colman@mastodon.ie
2023-02-07T12:17:34Z
0 likes, 0 repeats
@john ah, young people. LAMP? In my day we were glad of cgi scripts and images were an innovation. And tell young people that today and ⦠etcWould a static generator do the job? Lots of good looking versions of that these days.
(DIR) Post #ASR5Nefts6vmRkbESe by john@sauropods.win
2023-02-07T12:18:58Z
0 likes, 0 repeats
I've been looking at Python+Flask, but then realise I need to choose (whether to) ORM, the database, the templating engine. So I think 'just choose this for me' and look at Django. Then my eyes glaze over at the weight of the whole thing. The Javascript world is... well we all know what's wrong with that.
(DIR) Post #ASR5YGVM4lT4faj6NU by apsmith@fediscience.org
2023-02-07T12:20:43Z
0 likes, 0 repeats
@john Iāve been impressed with scholia (https://scholia.toolforge.org) - I believe itās Python flask plus a JavaScript framework, it might be a good pattern to follow.
(DIR) Post #ASR5clOFBeYZcKXrWq by travelingflwr@raphus.social
2023-02-07T12:21:39Z
0 likes, 0 repeats
@john What about NodeJS and all of the various frontend techs that plugin? Node is really just JS so should be easy to ramp up since NPX will get everything scaffolded for you.Plenty of ways to go with that.
(DIR) Post #ASR5dR97wFQ77bnNnU by john@sauropods.win
2023-02-07T12:21:46Z
0 likes, 0 repeats
@Colman No, a static site generator is not what I need to for this. It needs to be able to interact with the Mastodon client API. Personally, I also need user authentication, Patreon API integration, and possibly other things I think off down the line.
(DIR) Post #ASR5jqf5z7slzio1FA by john@sauropods.win
2023-02-07T12:22:59Z
0 likes, 0 repeats
@travelingflwr Yes, I currently use NodeJS. I'm considering it, but the churn in the Javascript world drives me crazy.
(DIR) Post #ASR5nNyUaKWYBIZ6Nk by af@dataare.cool
2023-02-07T12:23:34Z
0 likes, 0 repeats
@john ugh that P tho. Horrid horrid stuff.
(DIR) Post #ASR5nzNxUbsaCzlSiG by travelingflwr@raphus.social
2023-02-07T12:23:38Z
0 likes, 0 repeats
@john That's the problem with a lot of modern stacks. You can get complicated and bloated pretty fast.
(DIR) Post #ASR5qvAnbtUi0t0WTA by Colman@mastodon.ie
2023-02-07T12:24:19Z
0 likes, 0 repeats
@john yeah, then django is probably the way to go if Python is your thing.
(DIR) Post #ASR5zYIQ2ITdfRgf7g by john@sauropods.win
2023-02-07T12:25:49Z
0 likes, 0 repeats
@travelingflwr Yeah. I feel like learning stacks is more complicated than learning new programming languages.
(DIR) Post #ASR63DUfJy9WJAA9E8 by travelingflwr@raphus.social
2023-02-07T12:26:28Z
0 likes, 0 repeats
@john Just plain old Bootstrap maybe?
(DIR) Post #ASR6I9Rqe0706ZxyOe by slott56@fosstodon.org
2023-02-07T12:29:09Z
0 likes, 0 repeats
@john do you need an ORM? Having written a number of enterprise services I can safely say the relational database is an awful choice.
(DIR) Post #ASR6M4cCYTmQH3gAls by travelingflwr@raphus.social
2023-02-07T12:29:50Z
0 likes, 0 repeats
@john Why don't you look at building a Mastodon instance and modifying it to be a custom app? Then you have Ruby + Rails to learn for fun and excitement. šYou would need to figure out a way to build it so you can still upgrade when Mastodon release new versions (especially security fixes).That way you can focus on your app part and have the instance part near you while you learn.
(DIR) Post #ASR6TbBlqT7ZKJu9uS by john@sauropods.win
2023-02-07T12:31:13Z
0 likes, 0 repeats
@slott56 I hate ORMs actually, and the database is up for grabs (as is everything).My main concern is just picking something that isn't crazy.
(DIR) Post #ASR6kDI5x0Bi8Cmklc by john@sauropods.win
2023-02-07T12:34:11Z
0 likes, 0 repeats
@travelingflwr I thought of this! I don't know Ruby, so that would be a bit of stumbling block. But then I realised the idea isn't what I want anyway. I want this thing integrate with an *existing* Mastodon account. You shouldn't need to move servers to use it. So then came the idea of making it a Mastodon client with all the gallery features I want.
(DIR) Post #ASR6lrJicU5qYmKUSW by tshirtman@mas.to
2023-02-07T12:34:30Z
0 likes, 0 repeats
@john @slott56 fastapi is nice too, though more oriented as a backend solution for js frontends, or apis, so you'd be free to chose vue or react or whatever for that.I find ORMs like SQLAlchemy good to define models, but i like using SQL directly as soon as the things become a bit too hard to express through the ORM.I completely disagree with the notion that relational databases are a bad choice, they are *most of the time* the best choice. If you want something else, you need to explain why.
(DIR) Post #ASR6xPXHjeNbsCBR0i by travelingflwr@raphus.social
2023-02-07T12:36:11Z
0 likes, 0 repeats
@john I'm pretty sure Elk is opensource with enough in the tech stack to make it interesting. it really depends on how much new stuff you want to learn.
(DIR) Post #ASR6y4DWU1vw2mFjOq by travelingflwr@raphus.social
2023-02-07T12:36:48Z
0 likes, 0 repeats
@john "I don't know Ruby, so that would be a bit of stumbling block."But learning something new is part of the fun!!
(DIR) Post #ASR7gDZT4ClTnQZP60 by john@sauropods.win
2023-02-07T12:44:38Z
0 likes, 0 repeats
@travelingflwr Thanks, this looks interesting, it's Typescript, which isn't a big leap for me. But as always it's hard to tell how much work it would save.
(DIR) Post #ASR7pbeCv8N14fGPHk by john@sauropods.win
2023-02-07T12:46:26Z
0 likes, 0 repeats
@af Yeah, I mean the language wan't great. But I still quite like the model of applications being a collection of active templates. It was easy to understand.
(DIR) Post #ASR82xQhFLXuOXJJBI by Colman@mastodon.ie
2023-02-07T12:21:12Z
0 likes, 0 repeats
@john Iāve been having thoughts in that direction myself, but havenāt solidified exactly what I want from it. Publish to Fediverse and integration of comments etc back into the post.
(DIR) Post #ASR82y097Xu0ATtcR6 by john@sauropods.win
2023-02-07T12:48:50Z
0 likes, 0 repeats
@Colman Yes, this is what I want to do. My idea is do make it a Mastodon client, so that you can use your existing Mastodon account with it. If you were choosing a tech stack right now what would it be? Django?
(DIR) Post #ASR8FsJdZSq6IbATsu by Colman@mastodon.ie
2023-02-07T12:50:49Z
0 likes, 0 repeats
@john Rails, but thatās inertia as much as anything else. Though the new Hotwire stuff is fun to use with it. Django seems to be closest Python equivalent.
(DIR) Post #ASR8GkyGMdQDoEaghk by john@sauropods.win
2023-02-07T12:51:18Z
0 likes, 0 repeats
@tshirtman @slott56 That's not off the table. So thanks, I'll take a look.
(DIR) Post #ASR8Qm31DRDI2oakpk by john@sauropods.win
2023-02-07T12:53:09Z
0 likes, 0 repeats
@Colman I feel like Rails might be the obvious choice, but I'm worried learning Ruby might take too long and lead me to never getting the thing done.
(DIR) Post #ASR8pycTbvgoH7C7xg by Colman@mastodon.ie
2023-02-07T12:57:40Z
0 likes, 0 repeats
@john learning the framework really is the bigger hurdle for me, I think, especially if youāre not too concerned about writing āidiomaticā code. I still end up checking the detail of language features I donāt use much because this is language number 10 or something, not including minor scripting languages, and it all starts to merge at the edges.
(DIR) Post #ASR96Kq0lt17ojKFpw by john@sauropods.win
2023-02-07T13:00:38Z
0 likes, 0 repeats
@Colman Agreed, learning frameworks is harder. But if I went with Rails I'd be learning a framework and a language at the same time. š¤Ŗ
(DIR) Post #ASR9BrQL2rHmKQx5wO by af@dataare.cool
2023-02-07T13:01:38Z
0 likes, 0 repeats
@john thatās very true. My day to day is expressing data in a way which becomes the API itself. Similar concepts.
(DIR) Post #ASR9dCYmZMBBhSwGvY by mike@sauropods.win
2023-02-07T13:06:30Z
0 likes, 0 repeats
@john Wouldn't it be easier just to use https://en.wikipedia.org/wiki/Pixelfed?
(DIR) Post #ASRB382M6lix9hhMJM by john@sauropods.win
2023-02-07T13:22:25Z
0 likes, 0 repeats
@mike It doesn't do what I want it to do.What I want is something more like ArtStation, not Instagram. Other artist have expressed this too.My idea is to make it a Mastodon client, with a partial backend for data that is specific to the application. Which means it would work with people's existing Mastodon accounts, rather than replacing or supplementing them (which people find confusing or undesirable), as well as a providing a front-facing portfolio/gallery at whatever domain you choose.
(DIR) Post #ASRBDXkHNb6fmiD2p6 by john@sauropods.win
2023-02-07T13:24:20Z
0 likes, 0 repeats
@mike I'm rewriting my site anyway, so what I'm doing is providing it with Mastodon client abilities.
(DIR) Post #ASRByM2ihuAv6H9kSu by john@sauropods.win
2023-02-07T13:32:47Z
0 likes, 0 repeats
@helge Thanks, this looks quite like some of the components I would have to make myself. Looks like it's in a really incomplete state though, and I'd have to learn how it all works. My understanding is that client-to-server stuff is not as standardised as server-to-server, and I'd definitely want it to work with Mastodon first.
(DIR) Post #ASRC1dKStTzLa61Ho8 by mike@sauropods.win
2023-02-07T13:33:23Z
0 likes, 0 repeats
@john Interesting.
(DIR) Post #ASRCLk0jlE9a61NdgW by john@sauropods.win
2023-02-07T13:36:59Z
0 likes, 0 repeats
@mike I think it's rather clever!What tech stack do you work with mostly Mike?
(DIR) Post #ASRClfJPqwwj3JTkPI by mike@sauropods.win
2023-02-07T13:41:42Z
0 likes, 0 repeats
@john To my surprise I have found that I really like modern JavaScript (ES6). I use it to build pretty sophisticated front-end SPAs, but also for back-end modules. One language all the way down simplifies matters, and in my experience ES6 code tends to be literally an order of magnitude shorter that than the equivalent code written in Java (which a lot of people seem to use).
(DIR) Post #ASRF4TiNObnuUhFhYW by joshix@fosspri.de
2023-02-07T14:07:33Z
0 likes, 0 repeats
@john I personally use python with Tornado it is really cool
(DIR) Post #ASRG29WbaerbFeCXtg by john@sauropods.win
2023-02-07T14:18:16Z
0 likes, 0 repeats
@mike My current default is Javascript, because that's what I already have is written in. My site has been cobbled together for over ten years now, though, and has a lot of legacy stuff in the code. There's ES5 shim stuff in there for sure, maybe even ES4. I haven't kept up with how to write modern Javascript.
(DIR) Post #ASRG5Uh3LJDTlzgJQ8 by john@sauropods.win
2023-02-07T14:18:54Z
0 likes, 0 repeats
@mike On the other hand! I will be writing Javascript anyway because of the front-end.
(DIR) Post #ASRGJqO1U8oh6hcgK0 by mike@sauropods.win
2023-02-07T14:21:28Z
0 likes, 0 repeats
@john You can pretty much treat it as a separate language, I guess.
(DIR) Post #ASRHCvf7ZUcvOet3aq by john@sauropods.win
2023-02-07T14:31:26Z
0 likes, 0 repeats
@mike I find the syntax used for async incredibly confusing in Javascript, and I think that might be because I'm still looking at ES5 ways or doing it.I often have great difficulty using libraries because I don't understand the flow of their example code at all.
(DIR) Post #ASRHTOBfHgj0UxxRvk by john@sauropods.win
2023-02-07T14:34:24Z
0 likes, 0 repeats
@joshix Trying to figure out if the async stuff is something I want or need.
(DIR) Post #ASRHeEOg1YQLJvDKVc by joshix@fosspri.de
2023-02-07T14:36:25Z
0 likes, 0 repeats
@john it isn't difficult to use and (in theory) it really helps to speed up things like networking, as you spend most of the time waiting
(DIR) Post #ASRIn89mh6XOWk3Vc8 by mike@sauropods.win
2023-02-07T14:49:11Z
0 likes, 0 repeats
@john I admit I always find it hard to remember where to put the `async` in `const f = (x, y) => { ... }`, but it's not hard to get right by trial and error š It's worth investing a bit of time in getting used to async/await, they represent a real advance (albeit only cosmetic) of handling promises the Amish way.
(DIR) Post #ASRJI166zSSXbu47G4 by john@sauropods.win
2023-02-07T14:54:45Z
0 likes, 0 repeats
@mike I never even really learnt how to use promises or any of that stuff properly.
(DIR) Post #ASRL0MrvVT9TpQ8tcm by lazarukb@mstdn.ca
2023-02-07T15:14:00Z
0 likes, 0 repeats
@john When I decided to move away from wordpress I also decided to just go to a static site generator. I'm just not in a place where I have time to fret about hosting and frameworks and databases right now.Like you noted I had python familiarity so I chose to go with Pelican (https://getpelican.com/), for python based static sites. The source gets to live on github and when I add/edit the site rebuilds and I don't have to worry about it.Might move to django in a few years
(DIR) Post #ASRLD751WJ24coLVia by john@sauropods.win
2023-02-07T15:16:21Z
0 likes, 0 repeats
@lazarukb How would you interact with the Mastodon client API using a static site generator?
(DIR) Post #ASRLeiwiqJdHspd3Sq by mike@sauropods.win
2023-02-07T15:21:16Z
0 likes, 0 repeats
@john Well, thanks to async/await, now you don't have to š
(DIR) Post #ASRScKB8ejtUAVAuW0 by Vickysaurus@sauropods.win
2023-02-07T16:39:17Z
0 likes, 0 repeats
@john Excellent idea, ever since I stopped using RSS readers a few years back it's been pretty tough to get updates on non-social media websites as they happen unless the author is vigorous about updating their social media.
(DIR) Post #ASSMfY5N0ADZbNahQO by ianbeck@opalstack.social
2023-02-08T03:07:21Z
0 likes, 0 repeats
@john Falcon is my favorite Python web framework; extremely fast and flexible. FastAPI as already mentioned is a mostly batteries-included API framework with fantastic docs/onboarding. Similar route definition style to Flask, if thatās your jam. Iād choose either over Flask, personally.In both cases, I vastly prefer SQLAlchemy to the Django ORM. Havenāt dealt with templates in a long while because Iāve only been writing APIs recently. š