Why, oh why, does YouTube include upcoming videos in RSS feeds? âThis video premiers in 21 hours.â Oohhhhhhkay. I will long have forgotten about it by then, thank you very much.
Data Point
â Read more
@prologic@twtxt.net Error handling especially in Go is very tricky I think. Even though the idea is simple, itâs fairly hard to actually implement and use in a meaningful way in my opinion. All this error wrapping or the lack of it and checking whether some specific error occurred is a mess. errors.As(âŚ) just doesnât feel natural. errors.Is(âŚ) only just. I mainly avoided it. Yesterday evening I actually researched a bit about that and found this article on errors with Go 1.13. It shed a little bit of light, but I still have a long way to go, I reckon.
We tried several things but havenât found the holy grail. Currently, we have a mix of different styles, but nothing feels really right. And having plenty of different approaches also doesnât help, thatâs right. I agree, error messages often end up getting wrapped way too much with useless information. We havenât found a solution yet. We just noticed that it kind of depends on the exact circumstances, sometimes the caller should add more information, sometimes itâs better if the callee already includes what it was supposed to do.
To experiment and get a feel for yesterdayâs research results I tried myself on the combined log parser and how to signal three different errors. Iâm not happy with it. Any feedback is highly appreciated. The idea is to let the caller check (not implemented yet) whether a specific error occurred. That means I have to define some dedicated errors upfront (ErrInvalidFormat, ErrInvalidStatusCode, ErrInvalidSentBytes) that can be used in the err == ErrInvalidFormat or probably more correct errors.Is(err, ErrInvalidFormat) check at the caller.
All three errors define separate error categories and are created using errors.New(âŚ). But for the invalid status code and invalid sent bytes cases I want to include more detail, the actual invalid number that is. Since these errors are already predefined, I cannot add this dynamic information to them. So I would need to wrap them Ă la fmt.Errorf("invalid sent bytes '%s': %w", sentBytes, ErrInvalidSentBytes"). Yet, the ErrInvalidSentBytes is wrapped and can be asserted later on using errors.Is(err, ErrInvalidSentBytes), but the big problem is that the message is repeated. I donât want that!
Having a Python and Java background, exception hierarchies are a well understood concept Iâm trying to use here. While typing this long message it occurs to me that this is probably the issue here. Anyways, I thought, I just create a ParseError type, that can hold a custom message and some causing error (one of the three ErrInvalid* above). The custom message is then returned at Error() and the wrapped cause will be matched in Is(âŚ). I then just return a ParseError{fmt.Sprintf("invalid sent bytes '%s'", sentBytes), ErrInvalidSentBytes}, but that looks super weird.
I probably need to scrap the âparent errorâ ParseError and make all three âsuberrorsâ three dedicated error types implementing Error() string methods where I create a useful error messages. Then the caller probably could just errors.Is(err, InvalidSentBytesError{}). But creating an instance of the InvalidSentBytesError type only to check for such an error category just does feel wrong to me. However, it might be the way to do this. I donât know. To be tried. Opinions, anyone? Implementing a whole new type is some effort, that I want to avoid.
Alternatively just one ParseError containing an error kind enumeration for InvalidFormat and friends could be used. Also seen that pattern before. But that would then require the much more verbose var parseError ParseError; if errors.As(err, &parseError) && parseError.Kind == InvalidSentBytes { ⌠} or something like that. Far from elegant in my eyes.
Types of Scopes
â Read more
@prologic@twtxt.net Re: Chat system, What if the base specification included a system for per-user arbitrary JSON storage on the server? Kind of like XEP-0049, but expanded upon. Two kinds of objects: public and private. Public objects can be queried by anyone, private objects cannot and must be encrypted with the userâs private key. Public keys could be stored there, as well as anything else defined by extensions. Roster, user block list, avatar, etc.
Cloud Computing and Virtualization Company Citrix To Be Acquired for $16.5B
Citrix, a cloud computing and virtualization company used by companies including Microsoft, Google, and SAP, has revealed plans to be acquired by affiliates of global investment firm Vista Equity Partners, and an affiliate of Elliott Investment Management called Evergreen Coast Capital Corporation. From a report: The all-cash deal i ⌠â Read more
iOS has had a âShortcutsâ app for a while now which is very useful for scripting things on the device, and at some point grew the ability to run things via ssh, including piping input/output. Itâs how Iâve done twtxt from my phone for a while now. Iâll clean up these two examples and post to the examples Iâve shared. http://a.9srv.net/shortcuts
Jerome Powell Says the Fed is Prepared To Raise Rates To Tame Inflation
Jerome H. Powell, the Federal Reserve chair, told lawmakers on Tuesday that a rapidly healing economy no longer needed as much help from the central bank and that keeping inflation in check â including by raising interest rates â would be critical for enabling a stable expansion that benefits workers. From a report: Mr. Powell, ⌠â Read more
Oh hello again SSB - reinstalled ManyVerse on all my devices, including my PC
Siren
â Read more
Appleâs event on Monday is bringing, as always, speculation to the table. One thing most outlets seem to agree is the introduction of an âM1Xâ chip, thought Apple might call it differently. M1X might also mean, M1(we donât know what comes after, or next generation). Either way, I would really like to see the return of the 27â iMac, but I will not hold my breath. Nevertheless, Monday is going to be an exciting day for many, including me! đ
I need someone with a nice, and clean twtxt.txt feed. One that doesnât include muchâif anyâimages, and in which twts have more content. Just looking to see how formatting is handled in jenny and how to tweak it to my liking.
Whole lot of false statements here. The vaccines are well-tested & well-studied, and are safe and effective. Breakthrough cases exist with every vaccine. If you are able and the vaccine is approved for you, choosing not to get it puts everyone around you at risk, including risk of additional variants developing.
My finger server now includes the last post from tw that doesnât have a subject. âfinger a@9srv.netâ
myself included, some stuff was coming across corrupted because one of my servers did not have its charset set to utf8
@vain@www.uninformativ.dedd @lyse@lyse.isobeef.orgdd @prologic@twtxt.netdd Nope.. i have updated my gist to include the feeds listing. feeds.txt
#include âtweetnacl.hâ