Searching txt.sour.is

Twts matching #US
Sort by: Newest, Oldest, Most Relevant

I’m this close to making an Android app for managing a shopping list.

I just accidentally deleted the wrong list in the app that I’m currently using, and now there’s no way to get it back. Recreating it is a major pain, because typing on a phone sucks ass. Fuck.

Maybe I should just go back to using pen and paper …

⤋ Read More
In-reply-to » QOTD: What do you host on your home server? How do you host it? Are you using containers? VMs? Did you install any management interface or do you just SSH in? What OS does it run?

@mckinley@twtxt.net for me:

  • a wall mount 6U rack which has:
    • 1U patch panel
    • 1U switch
    • 2U UPS
    • 1U server, intel atom 4G ram, debian (used to be main. now just has prometheus)
  • a mini ryzon 16 core 64G ram, fedora (new main)
    • multiple docker services hosted.
  • synology nas with 4 2TB drives
  • turris omnia WRT router -> fiber uplink

network is a mix of wireguard, zerotier.

  • wireguard to my external vms hosted in various global regions.
    • this allows me ingress since my ISP has me behind CG-NAT
  • zerotier is more for devices for transparent vpn into my network

i use ssh and remote desktop to get in and about. typically via zerotier vpn. I have one of my VMs with ssh on a backup port for break glass to get back into the network if needed.

everything has ipv6 though my ISP does not provide it. I have to tunnel it in from my VMs.

⤋ Read More

QOTD: What do you host on your home server? How do you host it? Are you using containers? VMs? Did you install any management interface or do you just SSH in? What OS does it run?

Mine runs Arch (btw) and hosts a handful of things using Docker. Adguard Home, http://mckinley2nxomherwpsff5w37zrl6fqetvlfayk2qjnenifxmw5i4wyd.onion/, and some other things. NFS, Flexo, and Wireguard (peer and bounce server in my personal network) are outside Docker. I have a hotkey in my window manager that spawns a terminal on my server using SSH. It makes things very easy and I highly recommend it.

I am thinking about replacing Docker with Podman because the Common Wisdom seems to say it’s better. I don’t really know if it is or isn’t.

Also, how much of your personal infrastructure is on IPv6? I think all the software I use supports both, but I’ve mostly been using IPv4 because it’s easier to remember the addresses. I’ve been working for the last couple days on making it IPv6-only.

⤋ Read More
In-reply-to » wat da fuq does being "woke" even mean?! 🤦‍♂️

@bender@twtxt.net It is the new “politically correct”. Something that was used to describe acting in a more civilized way with one another. Turned into a scapegoat for the other side to label, demonize, and attack.

⤋ Read More
In-reply-to » Not making THREADING the default view of e-mail clients and thus teaching users that e-mail is “chaotic” (if you get a lot of mail, it becomes unusable without threading) and “needs” full quoting all the time was one of the worst mistakes ever.

My email is such a cluster of noise. The only time i actually use it is to find out I have to do my security training or something. All communication is slack now days.

⤋ Read More
In-reply-to » yarn should define its own federation protocol that extends the basic twtxt in ways that twtxt doesn't allow. it's time. and i've got ideas!

yarnd does not do auto discovery via webfinger though.. i cant put @username and have it fetch the feed url from webfinger. to fully make feeds portable. would also need to be able to use that for hashing.

⤋ Read More
In-reply-to » yarn should define its own federation protocol that extends the basic twtxt in ways that twtxt doesn't allow. it's time. and i've got ideas!

@shreyan@twtxt.net What do you mean when you say federation protocol?

I’m not sure we need much else. I would not even bother with encryption since other platforms does that better, and for me twtxt/yarn/timeline is for making things public

⤋ Read More
In-reply-to » Yeah, the lack of comments makes regular JSON not a good configuration format in my view. Also, putting all keys in quotes and the use of commas is annoying. The big upside is that's in lots of standard libraries.

@lyse@lyse.isobeef.org its a hierarchy key value format. I designed it for the network peering tools i use.. I can grant access to different parts of the tree to other users.. kinda like directory permissions. a basic example of the format is:

@namespace
# multi
# line
# comment
root :value

# example space comment
@namespace.name space-tag 

# attribute comments
attribute attr-tag  :value for attribute

# attribute with multiple 
# lines of values
foo :bar
      :bin
      :baz

repeated :value1
repeated :value2

each @ starts the definition of a namespace kinda like [name] in ini format. It can have comments that show up before. then each attribute is key :value and can have their own # comment lines.
Values can be multi line.. and also repeated..

the namespaces and values can also have little meta data tags added to them.

the service can define webhooks/mqtt topics to be notified when the configs are updated. That way it can deploy the changes out when they are updated.

⤋ Read More
In-reply-to » Question of the day: What configuration file formats do you all like and use?

Yeah, the lack of comments makes regular JSON not a good configuration format in my view. Also, putting all keys in quotes and the use of commas is annoying. The big upside is that’s in lots of standard libraries.

I think the appeal with YAML is that is has comments, is kind of easy to write and read and also provides unlimited nesting levels. But it has all its drawbacks, no question. Forbidding tabs, thousands of different string flavors, having so many boolean options (poor Norwegians) etc. I use it, but I don’t particularly enjoy it.

Among simple key value pairs, I like INI files, but with # for comments, not ;. I never used TOML, read up on it yesteray before writing this question, but it looks a bit weird and has some strange rules. I guess I have to give it a try one day.

And yes, as mentioned by several of you, it always depends on the complexity of the configuration at hand.

I’m developing something for the scouts at the moment with rather simple requirements on the config. Currently, there are just four settings. Even INI would be overkill with its section. I selected JSON for now, because that’s readily available with Go’s std lib. But I do not like it.

Btw. what’s your own config format, @xuu@txt.sour.is?

⤋ Read More
In-reply-to » I finally found the NASM assembler.

@prologic@twtxt.net High five, I’m “generation Java” as well! 😂 There were some leftovers of C++, we used that in the computer graphics courses in Uni a lot. But pretty much anything else that involved programming was Java.

(There was nothing even remotely resembling CS in our “high school”. That school neither had the required teachers nor the equipment / PCs.)

⤋ Read More
In-reply-to » I finally found the NASM assembler.

I finished my data structures classes with C++ and the next year they changed it out with Java. When i transferred up after my assoc degree it was C++ using the counter-strike source game engine.

⤋ Read More

I finally found the NASM assembler.

https://nasm.us/index.php

I had heard that name before, many times, but somehow never looked into it. Weird. 🤨🤔

This is the kind of program I was looking for.

  1. It is free software. Especially in the DOS ecosystem, free/libre software is a very scarce resource.
  2. It’s a small command line program, not a huge behemoth.
  3. Documentation appears to be well written.
  4. It can even cross-compile DOS binaries from Linux.

⤋ Read More
In-reply-to » I noticed that some of my software projects have a rather long lifetime, so I made a little graph:

@movq@www.uninformativ.de its always fun to look back on old projects. I talked to an old coworker about a codebase i made back in 2010 that still has lots of the same architecture i built into it back then and is still in heavy use.

⤋ Read More

After getting used to it, I’m loving this date format:
2024-02-06

I liked ‘6feb2024’, although isn’t as international as the former.
And… ‘06/02/24’ is awful, don’t use it!

⤋ Read More

Twtxt spec enhancement proposal thread 🧵

Adding attributes to individual twts similar to adding feed attributes in the heading comments.

https://git.mills.io/yarnsocial/go-lextwt/pulls/17

The basic use case would be for multilingual feeds where there is a default language and some twts will be written a different language.

As seen in the wild: https://eapl.mx/twtxt.txt

The attributes are formatted as [key=value]

They can show up in the twt anywhere it is not enclosed by another element such as codeblock or part of a markdown link.

⤋ Read More
In-reply-to » (#fytbg6a) What about using the blockquote format with > ?

@eapl.me@eapl.me this is interesting. Is the square bracket something used in the wild for multilingual twts?

@prologic@twtxt.net what are your thoughts? Should we extend the parser to handle [lang] and [boost] ? Or a generic attribute spec. Single word is a boolean attribute. And one with an = is a string key/value.

⤋ Read More

What about using the blockquote format with > ?

Snippet from someone else’s post
by: @eapl.me@eapl.me

Would it not also make sense to have the repost be a reply to the original post using the (#twthash), and maybe using a tag like #repost so it eaier to filter them out?

⤋ Read More
In-reply-to » Google Chrome Gains AI Features Including a Writing Helper Google is adding new AI features to Chrome, including tools to organize browser tabs, customize themes, and assist users with writing online content such as reviews and forum posts.

What? You are still using chrome? Firefox is where its at. But if you need WebKit there is always chromium which strips out all the google nonsense.

⤋ Read More

Update on my Fibre to the Premise upgrade (FTTP). NBN installer came out last week to install the NTD and Utility box, after some umming and arring, we figured out the best place to install it. However this mean he wasn’t able to look it up to the Fibre in the pit, and required a 2nd team to come up and trench a new trench and conduit and use that to feed Fibre from the pit to the utility box.

I rang up my ISP to find out when this 2nd team was booked, only to discover to my horror and the horror of my ISP that this was booked a month out on the 2rd Feb 2024! 😱

After a nice small note from my provider to NBN, suddenly I get a phone call and message from an NBN team that do trenching to say it would be done on Saturday (today). That got completed today (despite the heavy rain).

Now all that’s left is a final NBN tech to come and hook the two fibre pieces together and “light it up”! 🥳

⤋ Read More

Feedback on why I didn’t choose Mattermost (lack of OIDC) · mattermost/mattermost · Discussion – My discussions/feedback on Mattermost’s decision to have certain useful and IMO should be standard features as paid-for features on a per-seat licensed basis. My primary argument is that if you offer a self-host(able) product and require additional features the free version does not have, you should not have to pay for a per-seat license for something you are footing the bill for in terms of Hardware/Compute and Maintenance/Support (havintg to operate it).

⤋ Read More

Today’s Advent of Code puzzle was rather easy (luckily), so I spent the day doing two other things:

  • Explore VGA a bit: How to draw pixels on DOS all by yourself without a library in graphics mode 12h?
  • Explose XMS a bit: How can I use more than 640 kB / 1 MB on DOS?

Both are … quite awkward. 😬 For VGA, I’ll stick to using the Borland Graphics Interface for now. Mode 13h is great, all pixels are directly addressable – but it’s only 320x200. Mode 12h (640 x 480 with 16 colors) is pretty horrible to use with all the planes and what not.

As per this spec, I’ve written a small XMS example that uses 32 MB of memory:

https://movq.de/v/9ed329b401/xms.c

It works, but it appears the only way to make use of this memory is to copy data back and forth between conventional memory and extended memory. I don’t know how useful that is going to be. 🤔 But at least I know how it works now.

Image

⤋ Read More

Starting Advent of Code today, a day late but oh well 😅 Also going to start a Twtxt/Yarn leaderboard. Join with 1093404-315fafb8 and please use your usual Twtxt feed alias/name 👌

⤋ Read More

Obligatory Twtxt post: I love how I can simply use a terminal window and some very basic tools (echo, scp, ssh) to publish thoughts, as they pop up, onto the Internet in a structured way, that can be found and perhaps even appreciated.

⤋ Read More

There is a lot of Black Friday promotion happening in Germany these days - I wonder however how many Germans really know where it comes from? Happy Thanksgiving to whoever is celebrating today - as it is one of the few US / Canadian festive days where families - really - try to enjoy their time together.

⤋ Read More
In-reply-to » wtf is going on with Microsoft and OpenAI of late?! LIke Microsoft bought into OpenAI for some shocking $10bn USD, then Sam Altman gor fired, now he's been hired by Microsoft to run up a new "AI" division. wtf/! seriously?! 🤔 #Microsoft #OpenAI #Scandal

@prologic@twtxt.net the new product was GPTs. A way to create tailored bots for specific use cases. https://openai.com/blog/introducing-gpts (fun fact: I did an internal hackathon where we made something like this for $work onboarding. And I won a prize!)

The competed project is poe https://quorablog.quora.com/Introducing-creator-monetization-for-Poe which is basically the same idea. Make a AI bot tailored to a specific domain of knowledge. And monitize it.

The timing fits very well as openAI announced it just a few weeks ago.

⤋ Read More
In-reply-to » @lyse I'm also on the e-mail wagon here. On http://darch.dk/timeline/conv/oe3howa I have added a "Comment via email" botten if uses are not logged in. This feature could be extend to other places in the various UIs. Like we already got the "Does not follow your" / "Follow you" on the profile page in yarnd, so this detection could be used to sugget the user to email that person, when mentioning them.

I have added a webmention endpoint to https://darch.dk using https://webmention.io - let see if it work from neotxt.dk to @sorenpeter@darch.dk

⤋ Read More
In-reply-to » I've been thinking of how to notify someone else that you've replied to their twts.

@lyse@lyse.isobeef.org I’m also on the e-mail wagon here. On http://darch.dk/timeline/conv/oe3howa I have added a “Comment via email” botten if uses are not logged in. This feature could be extend to other places in the various UIs. Like we already got the “Does not follow your” / “Follow you” on the profile page in yarnd, so this detection could be used to sugget the user to email that person, when mentioning them.

⤋ Read More

DeepMind AI can beat the best weather forecasts - but there is a catch
By using artificial intelligence to spot patterns in weather data, Google DeepMind says it can beat existing weather forecasts up to 99.7 per cent of the time, but data issues mean the approach is limited for now ⌘ Read more

⤋ Read More
In-reply-to » Spent a few hours the last two evenings fighting with tftpd. Party like it's 1999!

I feel for ya. I have used tftp for two things in the past. Copying an image to a Cisco router to flash. And doing a network install because I didn’t have a flash drive handy.

⤋ Read More
In-reply-to » So Youtube rea really cracking down on Ad-blockers. The new popup is a warning saying you can watch 3 videos before you can watch no more. Not sure for how long. I guess my options are a) wait for the ad-blockers to catch-up b) pay for Youtube c) Stop using Youtube.

Really?? I have not yet seen this warning. Using ublock origin.

⤋ Read More

Scientist Claims Quantum RSA-2048 Encryption Cracking Breakthrough
Mark Tyson reports via Tom’s Hardware: A commercial smartphone or Linux computer can be used to crack RSA-2048 encryption, according to a prominent research scientist. Dr Ed Gerck is preparing a research paper with the details but couldn’t hold off from bragging about his incredible quantum computing achievement (if true) on his LinkedIn profil … ⌘ Read more

⤋ Read More

So Youtube rea really cracking down on Ad-blockers. The new popup is a warning saying you can watch 3 videos before you can watch no more. Not sure for how long. I guess my options are a) wait for the ad-blockers to catch-up b) pay for Youtube c) Stop using Youtube.

I think I’m going with c) Stop using Youtube.

⤋ Read More
In-reply-to » Oh okay, so Youtube is cracking down on "Ad Blockers". Media Rightio. 🤔 And paying for Youtube Premium costs $14/month?! 🤯 Media Get fucked 🤣 I guess I won't be using Youtube anymore. #Youtube #Ads #Premium #Suck

@prologic@twtxt.net I have seen these screen shots. But have not yet seen them in actuality. I use ublockOrigin. Maybe it gets these too unlike adblock.

For android I have revanced.. The only place I get ads is on TV. I haven’t found a replacement there.

⤋ Read More
In-reply-to » fractalnetworksco/selfhosted-gateway: Route HTTPS traffic to local Docker containers through a cloud VPS over WireGuard. Ideal for self-hosting behind CGNAT.

@prologic@twtxt.net I do similar. Though probably much more simple.. I have CGNAT and use wireguard to VMs to punch through for stuff like HTTP/SSH from external.

And for SMTP I have smart hosts on the VMs that will store anf forward to my mailbox if the connection goes down.

⤋ Read More
In-reply-to » Hmm when I said "Wireguard is kind of cool" in this twt now I'm not so sure 😢 I can't get "stable tunnels" to freak'n stay up, survive reboots, survive random disconnections, etc. This is nuts 🤦‍♂️

@prologic@twtxt.net I find the L2 mode where you have one interface and multiple hosts to be tricky. Its best if you are trying to make a full mesh style. But then all hosts need to be able to see one another.

I have had more success using point-to-point connections where there are only two ends to each interface. It means you have a ton of interfaces and udp ports. but you can share the host IP across the interfaces. Add to that a simple router proto ala OSPF or RIP and you can navigate around not having a full meshnet.

I have dozens of localnet wireguard connections and many more connections to others that use bgp for route propagation.

⤋ Read More
In-reply-to » Li-Fi, light-based networking standard released Today, the Institute of Electrical and Electronics Engineers (IEEE) has added 802.11bb as a standard for light-based wireless communications. The publishing of the standard has been welcomed by global Li-Fi businesses, as it will help speed the rollout and adoption of the  data-transmission technology standard. Where Li-Fi shines (pun intended) is not just in its purported speeds as fast as 224 GB/s. Fraunhofer’s Dominic Schulz points ou ... ⌘ Read more

@abucci@anthony.buc.ci @prologic@twtxt.net neat.. I saw this one quite a while ago. it is strictly line of sight and blocked by walls or things. The use cases were to have it integrated in the lights in a room and provide super fast connections to devices in an office or coffee shop.

https://youtu.be/AKvvEqm9Nv4

⤋ Read More

Question to all you Gophers out there: How do you deal with custom errors that include more information and different kinds of matching them?

I started with a simple var ErrPermissionNotAllowed = errors.New("permission not allowed"). In my function I then wrap that using fmt.Errorf("%w: %v", ErrPermissionNotAllowed, failedPermissions). I can match this error using errors.Is(err, ErrPermissionNotAllowed). So far so good.

Now for display purposes I’d also like to access the individual permissions that could not be assigned. Parsing the error message is obviously not an option. So I thought, I create a custom error type, e.g. type PermissionNotAllowedError []Permission and give it some func (e PermissionNotAllowedError) Error() string { return fmt.Sprintf("permission not allowed: %v", e) }. My function would then return this error instead: PermissionNotAllowedError{failedPermissions}

At some layers I don’t care about the exact permissions that failed, but at others I do, at least when accessing them. A custom func (e PermissionNotAllowedError) Is(target err) bool could match both the general ErrPermissionNotAllowed as well as the PermissionNotAllowedError. Same with As(…). For testing purposes the PermissionNotAllowedError would then also try to match the included permissions, so assertions in tests would work nicely. But having two different errors for different matching seems not very elegant at all.

Did you ever encounter this scenario before? How did you address this? Is my thinking flawed?

⤋ Read More

An official FBI document dated January 2021, obtained by the American association “Property of People” through the Freedom of Information Act.

This document summarizes the possibilities for legal access to data from nine instant messaging services: iMessage, Line, Signal, Telegram, Threema, Viber, WeChat, WhatsApp and Wickr. For each software, different judicial methods are explored, such as subpoena, search warrant, active collection of communications metadata (“Pen Register”) or connection data retention law (“18 USC§2703”). Here, in essence, is the information the FBI says it can retrieve:

  • Apple iMessage: basic subscriber data; in the case of an iPhone user, investigators may be able to get their hands on message content if the user uses iCloud to synchronize iMessage messages or to back up data on their phone.

  • Line: account data (image, username, e-mail address, phone number, Line ID, creation date, usage data, etc.); if the user has not activated end-to-end encryption, investigators can retrieve the texts of exchanges over a seven-day period, but not other data (audio, video, images, location).

  • Signal: date and time of account creation and date of last connection.

  • Telegram: IP address and phone number for investigations into confirmed terrorists, otherwise nothing.

  • Threema: cryptographic fingerprint of phone number and e-mail address, push service tokens if used, public key, account creation date, last connection date.

  • Viber: account data and IP address used to create the account; investigators can also access message history (date, time, source, destination).

  • WeChat: basic data such as name, phone number, e-mail and IP address, but only for non-Chinese users.

  • WhatsApp: the targeted person’s basic data, address book and contacts who have the targeted person in their address book; it is possible to collect message metadata in real time (“Pen Register”); message content can be retrieved via iCloud backups.

  • Wickr: Date and time of account creation, types of terminal on which the application is installed, date of last connection, number of messages exchanged, external identifiers associated with the account (e-mail addresses, telephone numbers), avatar image, data linked to adding or deleting.

TL;DR Signal is the messaging system that provides the least information to investigators.

⤋ Read More
In-reply-to » Home | Tabby This is actually pretty cool and useful. Just tried this on my Mac locally of course and it seems to have quite good utility. What would be interesting for me would be to train it on my code and many projects 😅

@prologic@twtxt.net The hackathon project that I did recently used openai and embedded the response info into the prompt. So basically i would search for the top 3 most relevant search results to feed into the prompt and the AI would summarize to answer their question.

⤋ Read More
In-reply-to » @mckinley Yeah, that’s more clear. 👌

@prologic@twtxt.net that would work if it was using shamir’s secret sharing .. although i think its typically 3 of 5 so you get 3, one to the company, and one to the “third party”. so you can recover all you want.. but if the company or 3rd wants to they need one of your 3 to recover.

but still .. if they are providing them then whats the point of trusting they don’t have copies.

⤋ Read More

von Neumann: I came up with this new system that generalizes probability theory to consider convex sets instead of point estimates. I think that I could use this to prove regret bounds…

⤋ Read More
In-reply-to » @darch I think having a way to layer on features so those who can support/desire them can. It would be best for the community to be able to layer on (or off) the features.

We could ask them? But on the counter would bukket or jan6 follow the pure twtxt feeds? Probably not either way… We could use content negotiation as well. text/plain for basic and text/yarn for enhanced.

⤋ Read More
In-reply-to » 💡 Quick 'n Dirty prototype Yarn.social protocol/spec:

I’m not super a fan of using json. I feel we could still use text as the medium. Maybe a modified version to fix any weakness.

What if instead of signing each twt individually we generated a merkle tree using the twt hashes? Then a signature of the root hash. This would ensure the full stream of twts are intact with a minimal overhead. With the added bonus of helping clients identify missing twts when syncing/gossiping.

Have two endpoints. One as the webfinger to link profile details and avatar like you posted. And the signature for the merkleroot twt. And the other a pageable stream of twts. Or individual twts/merkle branch to incrementally access twt feeds.

⤋ Read More

💡 Quick ‘n Dirty prototype Yarn.social protocol/spec:

If we were to decide to write a new spec/protocol, what would it look like?

Here’s my rough draft (back of paper napkin idea):

  • Feeds are JSON file(s) fetchable by standard HTTP clients over TLS
  • WebFinger is used at the root of a user’s domain (or multi-user) lookup. e.g: prologic@mills.io -> https://yarn.mills.io/~prologic.json
  • Feeds contain similar metadata that we’re familiar with: Nick, Avatar, Description, etc
  • Feed items are signed with a ED25519 private key. That is all “posts” are cryptographically signed.
  • Feed items continue to use content-addressing, but use the full Blake2b Base64 encoded hash.
  • Edited feed items produce an “Edited” item so that clients can easily follow Edits.
  • Deleted feed items produced a “Deleted” item so that clients can easily delete cached items.

#Yarn.social #Protocol #Ideas

⤋ Read More

I played around with parsers. This time I experimented with parser combinators for twt message text tokenization. Basically, extract mentions, subjects, URLs, media and regular text. It’s kinda nice, although my solution is not completely elegant, I have to say. Especially my communication protocol between different steps for intermediate results is really ugly. Not sure about performance, I reckon a hand-written state machine parser would be quite a bit faster. I need to write a second parser and then benchmark them.

lexer.go and newparser.go resemble the parser combinators: https://git.isobeef.org/lyse/tt2/-/commit/4d481acad0213771fe5804917576388f51c340c0 It’s far from finished yet.

The first attempt in parser.go doesn’t work as my backtracking is not accounted for, I noticed only later, that I have to do that. With twt message texts there is no real error in parsing. Just regular text as a “fallback”. So it works a bit differently than parsing a real language. No error reporting required, except maybe for debugging. My goal was to port my Python code as closely as possible. But then the runes in the string gave me a bit of a headache, so I thought I just build myself a nice reader abstraction. When I noticed the missing backtracking, I then decided to give parser combinators a try instead of improving on my look ahead reader. It only later occurred to me, that I could have just used a rune slice instead of a string. With that, porting the Python code should have been straightforward.

Yeah, all this doesn’t probably make sense, unless you look at the code. And even then, you have to learn the ropes a bit. Sorry for the noise. :-)

⤋ Read More
In-reply-to » slides/go-generics.md at main - slides - Mills -- I'm presenting this tomorrow at work, something I do every Wednesday to teach colleagues about Go concepts, aptly called go mills() 😅

So. Some bits.

i := fIndex(xs, 5.6)

Can also be

i := Index(xs, 5.6)

The compiler can infer the type automatically. Looks like you mention that later.

Also the infer is super smart.. You can define functions that take functions with generic types in the arguments. This can be useful for a generic value mapper for a repository

func Map[U,V any](rows []U, fn func(U) V) []V {
  out := make([]V, len(rows))
  for i := range rows { out = fn(rows[i]) }
  return out
}


rows := []int{1,2,3}
out := Map(rows, func(v int) uint64 { return uint64(v) })

I am pretty sure the type parameters goes the other way with the type name first and constraint second.

func Foo[comparable T](xs T, s T) int

Should be


func Foo[T comparable](xs T, s T) int

⤋ Read More
In-reply-to » On the topic of Programming Languages and Telemetry. I'm kind of curious... Do any of these programming language and their toolchains collect telemetry on their usage and effectively "spy" on your development?

@prologic@twtxt.net I get the worry of privacy. But I think there is some value in the data being collected. Do I think that Russ is up there scheming new ways to discover what packages you use in internal projects for targeting ads?? Probably not.

Go has always been driven by usage data. Look at modules. There was need for having repeatable builds so various package tool chains were made and evolved into what we have today. Generics took time and seeing pain points where they would provide value. They weren’t done just so it could be checked off on a box of features. Some languages seem to do that to the extreme.

Whenever changes are made to the language there are extensive searches across public modules for where the change might cause issues or could be improved with the change. The fs embed and strings.Cut come to mind.

I think its good that the language maintainers are using what metrics they have to guide where to focus time and energy. Some of the other languages could use it. So time and effort isn’t wasted in maintaining something that has little impact.

The economics of the “spying” are to improve the product and ecosystem. Is it “spying” when a municipality uses water usage metrics in neighborhoods to forecast need of new water projects? Or is it to discover your shower habits for nefarious reasons?

⤋ Read More
In-reply-to » I've never liked the idea of having everything displayed all of the time for all of history.

@eldersnake@we.loveprivacy.club Several reasons:

  • It’s another language to learn (SQL)
  • It adds another dependency to your system
  • It’s another failure mode (database blows up, scheme changes, indexs, etc)
  • It increases security problems (now you have to worry about being SQL-safe)

And most of all, in my experience, it doesn’t actually solve any problems that a good key/value store can solve with good indexes and good data structures. I’m just no longer a fan, I used to use MySQL, SQLite, etc back in the day, these days, nope I wouldn’t even go anywhere near a database (for my own projects) if I can help it – It’s just another thing that can fail, another operational overhead.

⤋ Read More

I don’t use twtxt anymore, but I keep accidentally adding logs to it because the command I use to use !say is so similar to the shortcut I use to make !zet messages. So, some of my logs make no sense because they are out of context.

⤋ Read More
In-reply-to » Trying to wrap my head around webfinger..

@xuu@txt.sour.is that doesn’t seem to fit the spirit of the spec, at least by my read (I could be wrong obv). The example on Wikipedia’s webfinger page,

{
	"subject": "acct:bob@example.com",
	"aliases": [
		"https://www.example.com/~bob/"
	],
	"properties": {
		"http://example.com/ns/role": "employee"
	},
	"links": [{
			"rel": "http://webfinger.example/rel/profile-page",
			"href": "https://www.example.com/~bob/"
		},
		{
			"rel": "http://webfinger.example/rel/businesscard",
			"href": "https://www.example.com/~bob/bob.vcf"
		}
	]
}

and then the comparison with how mastodon uses webfinger,

{
    "subject": "acct:Mastodon@mastodon.social",
    "aliases": [
        "https://mastodon.social/@Mastodon",
        "https://mastodon.social/users/Mastodon"
    ],
    "links": [
        {
            "rel": "http://webfinger.net/rel/profile-page",
            "type": "text/html",
            "href": "https://mastodon.social/@Mastodon"
        },
        {
            "rel": "self",
            "type": "application/activity+json",
            "href": "https://mastodon.social/users/Mastodon"
        },
        {
            "rel": "http://ostatus.org/schema/1.0/subscribe",
            "template": "https://mastodon.social/authorize_interaction?uri={uri}"
        }
    ]
}

suggests to me you want to leave the subject/acct bit as is (don’t add prefixes) and put extra information you care to include in the links section, where you’re free to define the rel URIs however you see fit. The notion here is that webfinger is offering a mapping from an account name to additional information about that account, so if anything you’d use a "subject": "acct:SALTY ACCOUNT_REPRESENTATION" line in the JSON to achieve what you’re saying if you don’t want to do that via links.

⤋ Read More
In-reply-to » Trying to wrap my head around webfinger..

@prologic@twtxt.net Unfortunately the RFC’s are a bit light in this regard. While it makes mention of different kinds of accounts like mailto: or status services.. it never combines them. It does make mention of using redirects to forward a request to other webfingers to provide additional detail.

I am kinda partial to using salty:acct:me@sour.is, yarn:acct:xuu@txt.sour.is, mailto:me@sour.is that could redirect to a specific service. and a parent account acct:me@sour.is that would reference them in some way. either in properties or aliases.

⤋ Read More

One of the frustrating parts of using twtxt for conversations is the URLs are, well… ugly. Anyone (like y’all yarn folks) looked at using webfinger for translating user@domain accounts to URLs?

⤋ Read More
In-reply-to » Tutorial: Getting started with generics - The Go Programming Language -- Okay @xuu I quite like Go's generics now 🤣 After going through this myself I like the semantics and the syntax. I'm glad they did a lot of work on this to keep it simple to both understand and use (just like the rest of Go) 👌 Media #GoLang #Generics

@prologic@twtxt.net see where its used maybe that can help.
https://github.com/sour-is/ev/blob/main/app/peerfinder/http.go#L153

This is an upsert. So I pass a streamID which is like a globally unique id for the object. And then see how the type of the parameter in the function is used to infer the generic type. In the function it will create a new *Info and populate it from the datastore to pass to the function. The func will do its modifications and if it returns a nil error it will commit the changes.

The PA type contract ensures that the type fulfills the Aggregate interface and is a pointer to type at compile time.

⤋ Read More

A Modest Robot Levy Could Help Combat Effects of Automation On Income Inequality In US, Study Suggests
An anonymous reader quotes a report from MIT News: What if the U.S. placed a tax on robots? The concept has been publicly discussed by policy analysts, scholars, and Bill Gates (who favors the notion). Because robots can replace jobs, the idea goes, a stiff tax on them … ⌘ Read more

⤋ Read More
In-reply-to » @prologic: Reduced refresh interval to 7200 seconds :-)

@prologic@twtxt.net I guess that refresh field could be easily replaced with Expires HTTP header (I realize that users on neocities.org cannot control this header, for example). And clients should also respect headers like Last-Modified/If-Modified-Since (304), you’re right about that. P.S. twtwt doens’t have a caching mechanism for now, but I plan to implement it in generic way using HTTP headers.

⤋ Read More