#realy #devstr #progressreport today mostly just finishing up polishing the rewrite, but this evening i wrote myself a nice HTTP path/header router and completed the publisher router i'm aiming to make this thing as lean and modular as possible, so now i can make packages that do http handling (eg like the nostr nip-01 websocket API, or relay information page, or whatever) that lets them self-register themselves and disable registering them, optionally, by using a build tag on the source file containing the implementation most likely i will roll that all into one base directory with a single file and build tag that pulls in the given type and registers it, and then the main relay will only call the router, which only will see the packages that got included by not being excluded from the build learning a lot more about how to write http stuff in #golang - man, http routers are unbelievably retardedly simple, i just wrote a router, HBU? lol no idea how much cruft i'm gonna be able to shred from the main realy codebase just yet, but this router i just made i know it shreds a big chunk of spaghetti and lets me isolate the parts cleanly... APIs will have their own handlers, and their own publisher, all linked to a main publisher, and then if the api is disabled, it just isn't used, and voila, legacy nostr, hybrid legacy/http or new-wave http i also don't know how long this is going to take but it feels really good just sitting quietly and calmly and building this or maybe this is #ragecoding because when you are rage coding, actually you are in such a state of mind that you could cut shit like your eyes are frickin lasers

0
0
3

0
0
3

0
0
3

0
0
3

0
0
3

2
1
3

0
1
3

#golang #devstr this is the best #openapi tooling i have found https://github.com/danielgtaylor/huma my vietnamese colleague who does smart contracts and backend servers in javascript uses some whizz-bang thing that lets him define the openapi spec in native code this is not what you expect when you first are looking at this swagger/openapi stuff, you see "needs a spec written" the dude literally didn't even know this was a thing, how bout dat i had to figure all of this stuff out for myself and i spent since friday trying to make one of the toolkits for it work, i tried swagger 2.0 i tried openapi 3, i tried like 4 different generators, all of them shit, except go-swagger, which locks you into an extremely limited framework that is hard to poke normal fucking things into without making it painful huma just does the job... literally just declare the function as a closure with a struct defined in situ and voila, wham, bam, thankyou ma'am, here's your json formatted spec and web GUI available at /docs to boot everything else has been a nightmare, i hope that i can move forward quickly with this because the people at my fiat mine think i'm incompetent even though i have literally written the almost entire underpinning of the server that i was assigned to and none of them can even understand how a recommendation engine works, and it's like, uh :cry: it's just a thing that mines user data and compares profiles to find similar profiles and then uses that to make evaluations or suggestions based on it well, anyway... it's a job, and it gets a bit frustrating at times being a back end dev, i have successfully won the bounties on several grant projects last year, despite incredible obstacles (mostly nostr obstacles) so now i'm moving towards more generic stuff, and coinciding with it is that i can now apply this knowledge to finally implement the nostr http api once they see the heroku endpoints up and running (and omg don't get me started on heroku what a shitshow) they will start to understand what's even more annoying is that they think i'm going slow and it's taken literally 4 weeks for the front end and back end guys to add like 4 small things and they aren't in production yet so i can't even test my algorithms on live data, so i'm trapped here in disregarded land while i can see what i have done but zero others can, i'm literally the only person in my company who can write an advanced algorithm, and this what i'm doing now isn't even nearly as complex as what i have done before the json data format shit though, i hope i'm gonna bump into some tricks to speed up how fast i adapt to their shitty lack of typing because the Go native json parser turns everything into generic interfaces and slices of interface and this means i have to write manual code to identify and unpack all of that to put it into strictly typed data structures and they think it's slow doing 400 million comparisons, created by the (n-1)n pattern of a recommendation matrix anyway, just venting but now time to hit this huma and regain some of my humor

0
0
3

0
0
3

0
0
3

today i am learning how to actually write a full, proper #http server using the #golang standard library for handlers and multiplexer (router) looking at all these silly things, gorillamux, go-ch, and i just wasn't even considering gin and all the rest idgaf i want to learn the base of this, i already have code that does this shit but i need to integrate this generated openapi 3 API i've designed correctly i'm doing it for #realy first, but next week i literally have to do this exact same thing for my #fiatmine job, so i'm killing two birds with one stone today, once i figure out how to plug in this generated code, then clients can be built from the same spec via code generators, which massively reduces adoption friction - i mean, this is why REST dominates the industry now, and it's really needed to eliminate adoption friction for #nostr because the way it stands right now, the SDKs that exist are awful, inconsistent, inefficient, and usually buggy NDK i a bastard piece of shit, so i'm told, and my colleagues have forked it and are superseding it with WASM based C++ generated code what i'm building here will be a huge icebreaker for nostr apps to integrate with web 2.0 i'm not so much concerned about the lefts running their own relays, idgaf about what those drones are doing, but what i am concerned about is leveraging the eventbus/pubsub architecture of nostr to facilitate real world deployments and have people paying nostr devs to build this stuff, instead of begging from bitcoin whales

0
0
3

0
0
3

0
0
3

#devstr #progressreport i made some fixes to #realy today instead of blocking clients asking for DMs when it's not authed, it sends auth and just doesn't return them until it gets auth in many cases, clients do that after i post a new note because the nip-11 says "restricted writes" and that makes them actually auth and once that socket be authed, i can read my messages, not that i use them, becos they don't work, nostr DMs are a joke because nostr sockets are a dumb idea and no client hardly barely implements auth properly still and the specification is as transparent as the lower atmosphere of jupiter. anyway, so, there seems to be some improvement, jumble is now happily posting and fetching notes properly again after it was broked for a bit of today i'm feeling quite exhaustage also on other fronts, i am close to finishing the JWT token verification, i am just gonna say that the #golang #JWT library is horribly documented and i basically had to poke at several things before i even could read a clear statement that i needed some function to return a goddamn key yes, that will be the one that fetches the 13004 event if it finds it, and decodes the pubkey and then uses that just writing the test at this point, using the key directly from the generation step compared to the btcec/decred bip-340 library, the API of the conventional "blessed" cryptographic signature algorithms are a pile of dogshit covered in shredded car tires that has been set on fire you think there could be anything more stinky than a tire fire? yes, a dogshit-and-tire-fire... that is the state of "official" cryptography, compared to bitcoiner cryptography, which is sleek and svelte and sane no, i'm just kidding, bitcoiner cryptography except the C library is abominable, because roasbeef is a jerk who has repeatedly stopped me contributing to either btcd or lnd because he is a smartarse jerk and you know he's a jerk because he isn't here to ask me for an apology fuckin assclown idk how he came to have anything to do with the invention of the lightning protocol but i'm sure as fuck certain it was only that he built LND and nothing more, because his code is awful, beyond awful, and i hate him also because he doesn't seem to care that his repos don't have working configuration systems anyhow probably i will finish making the JWT auth scheme validation code tomorrow and then wrap it into the http library and voila, normie clients with a token will be able to access auth-required relays without either websockets or bip-340 signatures, instead, a revocable key token bearer scheme that lets another key stand in for the auth purposes also, did i mention that roasbeef is a dick? i would love to have one of his fans rebuff me, that would make me feel like i actually had an interaction with him that wasn't him stopping me doing useful things for bitcoin

0
0
3

0
0
3

1
0
3

1
0
3

0
0
3

0
0
3

0
1
3

Showing page 1 of 14 pages