(he/they)
Self-taught maker with experience in Rust, C, JavaScript and TypeScript. I am interested in open source software, web development, and more generally making things to achieve a net good effect in the world.
Public Key
npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Profile Code
nprofile1qqsq2aznd5l0f4jl472mggunvy9cgawj9axzj3jf63k9p4wnda6jvlqpz3mhxue69uhhyetvv9ujuerpd46hxtnfduqs6amnwvaz7tmwdaejumr0ds4ax38y
Show more details
Published at
2025-02-17T11:06:05Z Event JSON
{
"id": "54eed6fe754823501c7c07f11ce739da65b375fa5fd2e4e57fd6f3975f3ca496" ,
"pubkey": "0574536d3ef4d65faf95b42393610b8475d22f4c294649d46c50d5d36f75267c" ,
"created_at": 1739790365 ,
"kind": 0 ,
"tags": [],
"content": "{\"about\":\"(he/they)\\r\\nSelf-taught maker with experience in Rust, C, JavaScript and TypeScript. I am interested in open source software, web development, and more generally making things to achieve a net good effect in the world.\",\"bot\":false,\"name\":\"Siddharth Singh\",\"nip05\":\"[email protected] \",\"picture\":\"https://image.nostr.build/a2be0d115eaedafa9ab380bcdf0bdf1e9fb9bcb107f73bf5500b40db3674dc8a.jpg\",\"website\":\"https://shantaram.xyz\",\"fields\":[[\"\",\"\"]]}" ,
"sig": "6415b0f4493b6a7828103b9da81937f0b2743e238020d0fffc6f27bcde34a87cce76e68157e738daf65209703489e1ebeb1435847749ca70a01a7d5dfad0dc45"
}
Last Notes npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh मै डिट्टो की नयी अनुवाद सुविधा को आज़मा रहा हूँ npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Honestly when he said "http client" I immediately thought he wrote something that talks raw http and not a client in the sense of axios etc npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh fwiw i do all my Soapbox testing in Firefox (im on stable though, not nightly), the captcha worked for me on gleasonator.dev. so it may also be a Ditto thing npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Because then i can do this directly in the browser: ``` import { Colle } from "https://deno.land/x/[email protected] /src/Colle.js" ``` (https://github.com/tc39/proposal-type-annotations when? 😔 ) npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Neat, I wrote something similar once for https://github.com/xyzshantaram/colle npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh ...why? npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh The local timeline shows posts by people that have a nip-05 from that Ditto instance. Of course, it doesn't matter what relay you post on, just your @ should be [email protected] for example @[email protected] or @[email protected] . npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Well you could set up an nginx forwarding rule to forward relay.notes.yoursite.org to notes.yoursite.org/relay npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Proton Drive doesn't have a public API yet, apparently. It could be interesting to allow another (say, self-hosted) cloud service but then it's kind of an xkcd Standards type problem where we have to pick one or two cloud services and have people be content with that. Great suggestion though, thank you, we'll look into it. npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Hi! 502 Bad Gateway is actually a good sign regarding your nginx conf, your original nginx conf with 127.0.0.1:4036 looks correct to me. It seems that the ditto process is unable to start - could you cd to /opt/ditto and then run ditto there directly with `deno task start` and let me know what happens? Also, if you wouldn't mind we can get on a Jitsi Meet or something at some point to figure this out, it would be much faster. Please let me know your availability (you can email me at [email protected] ) if that is acceptable. npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh wow i never thought a world leader would be taking notes from Modi but who else than Netanyahu #note1zeu…adwq npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Can also use `deno task nostr:pull` in the ditto repo, doesn't need nak npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh https://gitlab.com/soapbox-pub/ditto/-/merge_requests/492 password issue fixed, btw, thanks again npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh As for the final error you are getting where Ditto is refusing to start, the error message seems to be truncated to the right. Could you pipe the result of `systemctl status ditto.service` on your VPS into `curl -i -F 'file=@-' https://0x0.st` and paste the link here? The final command you would run is: ``` sudo systemctl status ditto.service | curl -i -F 'file=@-' https://0x0.st ``` It should spit out a link in response. npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh > if changing the access port for the server makes it more secure, could the database port be customized too? would it improve security or could it block some connections? Well, changing the port does improve security, but only marginally in my opinion. It's better to do the other things you did, like disabling root and password login (in the case of ssh) or setting up a firewall. > Since the program, the user, and the database are all named ditto, I had a hard time distinguishing them to learn more about the commands in this process. Yeah, it does get super confusing. I like to call the db `postgres` (if it's a server only being used for one thing) or `dittodb` to help a tiny bit. Moving on to your notes on `deno task setup`: > Is the 4036 an independent port, like the database port, or should it be the custom port used to access the server? The 4036 is the default port Ditto listens on. You can configure it by setting the PORT environment variable in the .env file. > Should the IP be left as is, or exchanged for the server's IP? It shouldn't be an IP at all -- it should be the _external_-facing address from which you want to access your instance. For example, if you were hosting it on ditto.freedomweaver.tech then you should enter `https://ditto.freedomweaver.tech`. The port number should be left out unless you are listening on some nonstandard port. > I left it as localhost, but since it is a VPS I don't know if I need to try * or something else , nor where to modify it after leaving it as is. This is fine. > If I enter a real password here, it shows in plain text, so I don't know if that's what it's requesting. I am guessing it is the name of the user that we need to enter (ditto). Is it? That was an oversight in our setup code, thanks for pointing it out! It'll be fixed in the next release of Ditto. > I'm guessing there should only be one database listed above, and that ditto should point to it in a database config file somewhere. It doesn't matter if there are multiple, Ditto only uses the one you enter when it asks you "Postgres database [ditto]:" during setup. > I entered the existing ditto user password, should it have been a password for a second ditto user? `createuser` handles _Postgres_ user creation -- different from the `UNIX` user ditto you created earlier. You can use the same or different passwords, it does not matter. Just be sure to use this same password when Ditto asks you for the postgres password in `deno task setup`. > Unsure on this one, as the docs point out to use a previously entered password, so it could be the one for the second ditto user, or maybe it is to fill in the database password where I just left the word ditto previously. Or perhaps the second ditto user and the database password are the same. I added what I'd like the database password to be. The `ALTER USER WITH PASSWORD` statement updates the password the db will accept when you try to connect as the ditto user. If you make this change you have to update the DATABASE_URL string in your ditto .env file. > chose to redirect all traffic to https, not sure if all traffic to ditto arrives so This is the correct thing to do. Hope this clears up your doubts! npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Hey @npub1a7n…vfnu I've been on vacation this past week, back at work now. I'll be responding to your questions in a couple of follow-up notes. Sorry for the delay! npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Just confirming, but is Ditto itself running? That's what a 502 Bad Gateway typically indicates, that the service being proxied to isn't active, and your triage list didn't actually mention that. Please don't mistake me, just eliminating the obvious. Next up, if you have some sort of firewall set up it may be blocking nginx's ability to communicate with Ditto. Also, if you've configured ditto to listen on a different port other than 4036, please check that your nginx config is updated to reflect that. There have been some issues with nginx configs in the past but as of latest ditto, nothing. Could you also confirm if you're on latest `main`? npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh Well, it depends how many users will be using it, and things like that. I have a testing instance over at https://metaman.space which i use as my primary client, it has 2vcpu/2gb of ram/60gb of disk and that is more than enough. Our bigger instances are 2 or 4 vcpu with 4 or 8gb of ram, gleasonator.dev is 4 vcpu 8gb of ram, and this has maaaany many users. metaman.space runs its own Postgres, the rest all share a single postgres with 320gb of disk, 8 cores, and 16gb of RAM. I wouldn't worry too much about CPU and RAM honestly, ditto itself is pretty lightweight. Try starting with a single vCPU and 1gb of ram + 1.5gb of swap and seeing how that goes. You can always trivially scale up your VPS if it feels slow. In my opinion, the bigger scalability problem is actually disk space -- the gleasonator database is like 30gb at the moment. metaman, a much smaller instance, is using about 10gb. So I'd keep an eye on your usage. Feel free to @ me if you have any more questions! npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh There are only two kinds of Nostr clients, the ones people complain about, and the ones they don't use :P Thanks for the bug report! We'll keep fixing them as they come <3 npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh can you please post your config? or email it to me at [email protected] npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh select [...] where exists (select 1 from blah where cond); npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh ah, fair enough i suppose npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh So I've been using time-tracker-cli (https://pypi.org/project/time-tracker-cli/) to track my hours for freelance work. It's great but it has a lot of rough edges, the UX is a bit ugly, it just feels unfinished and incomplete. I have some kludged together shell aliases to handle billing and stuff and the result is not super great but it's ...manageable. Well I finally had enough and channelled my inner Bender (except I didn't follow up with "ah, screw the whole thing..."). Presenting etu, the cool new time tracker on the block. https://github.com/xyzshantaram/etu https://image.nostr.build/50e5170aed2a7998b6b5307e1686e44556d142b22161550cc000ab4d189b63ca.png npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh doesnt your phone pop up a little toast saying there's so-many hours before your exam? npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh You can't edit notes unfortunately, I just realised. When I was talking about edits I meant replaceable events on Nostr, which is a concept somewhat analogous to editing. Ditto has an option to "Delete and re-post", though. npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh It's much the same, aiui. A rogue relay could just ... not honor your edits or deletions, but people would pretty quickly stop publishing to it if word got out. Much like a rogue Mastodon instance that won't honor deletion requests being defederated. npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh technically they can be, you just can't be sure other people will respect it :P npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh this is a test. you may safely ignore this, but if you got it it probably means the test succeeded. npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh I cannot believe that God plays dice with the cosmos. -- Albert Einstein, on the randomness of quantum mechanics (third time's the charm!) npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh hello nostr! npub1q469xmf77nt9ltu4ks3excgts36ayt6v99ryn4rv2r2axmm4ye7q3vnkqp Siddharth Singh haha, you should see campfirejs components