otl

joined 1 year ago
[–] otl@lemmy.sdf.org 2 points 8 months ago

I feel this is a bit of a moot point from the White House. Memory-safe languages have been around for decades. I feel like the amount of C/C++ out there isn't so much that people think having dangerous stuff around is good, but more that nobody really wants to pay to change it.

[–] otl@lemmy.sdf.org 5 points 8 months ago (1 children)

Depends how you look at it! Here’s me accessing Mastodon and the fediverse via email: https://lemmy.world/post/11020167 I’ve written a a couple more prototypes to connect one to the other. If anyone is interested I could write up more about how it works or do a more public demo

[–] otl@lemmy.sdf.org 2 points 8 months ago

Not included in the above, but handy is also an alternative web UI for Reuters news: https://neuters.de

[–] otl@lemmy.sdf.org 4 points 8 months ago (1 children)

Link to the YAML spec, for the (very) brave: https://yaml.org/spec/1.2.2/

[–] otl@lemmy.sdf.org 6 points 9 months ago (2 children)

Good question! Sorry if this answer is weird :)

For me, I don't actually interact from Mastodon per se. I wrote a couple of read-only Lemmy & Mastodon clients. One for a weird text editing environment I use (https://lemmy.sdf.org/post/1035382) and via email (https://gts.olowe.co/@o/statuses/01HMQ9N4HQ2ETGZWJS49K5NG5Y). To reply to or create posts, I use a write-only Mastodon client I wrote.

My idea is to exercise the fediverse. In principal I don't think I should need separate accounts for Lemmy, PeerTube, Mastodon, Kbin, Akkoma, etc.

Right now I'm replying from an account on lemmy.sdf.org as I can't reply from GoToSocial (Lemmy and GoToSocial don't work well together right now) and my Mastodon server (hachyderm.io) has a post limit of 500 characters.

[–] otl@lemmy.sdf.org 4 points 9 months ago

Ah ha makes sense now! The "Replying to comments" section of that article explains exactly what's happening. If I understand correctly the community itself (!privacy@lemmy.ml in my above example) is not notified of my reply from Mastodon. If the community did know, then it would broadcast a notification of the activity to whoever else is subscribed to !privacy@lemmy.ml.

[–] otl@lemmy.sdf.org 2 points 9 months ago

I honestly find it worrying that someone would think it's some sort of deeply ingrained human trait when it's clearly not culturally universal (eg. small hunter-gatherer tribes wouldn't exist otherwise) and not present through all of history.

I think "growth" is a strong signal for people to put faith and trust into something. And that these emotions have influenced our behaviour for a long time.

Why did the Roman empire keep expanding? What made them want more? I'm not a historian nor an anthropologist (far from either!). But this feels like "line go up" behaviour. What would it mean for those in power to communicate that some part of the empire was receding? Even if, overall, the empire was objectivetly huge relative to other organised groups?

One thing I think about is there could be eroding confidence and trust of those in power by colleagues and the general population. If people lose faith, the powerful lose power; they lose ability to influence behaviour. Growth is obsessed over because it's a means to capture influence over the means of production (and capture profit).

The line has to go up because the current economic system demands it has to go up

What about outside of economics? Even metrics on https://fedidb.org: shrinking numbers are coloured red. Growing numbers green. Green = good, red = bad.

Another thought. The other day I was at a cricket match. Grand final. Because the home team was losing, the stadium started to empty. It wasn't about enjoying the individual balls/plays. Supporters were not satisfied with coming second (an amazing achievement, much "profit"!), it needed to be more.

To stretch this shitty metaphor further, when the supporters (investors?) lost confidence in their ability to deliver more, they just abandoned the entire match (enterprise?) altogether!

Again: I'm not stating anything here as fact. I'm just absolutely dumbfounded as to why "line go up" is, as you say, such an obsession. I hear you when you say that it's a consequence of how the modern economy works. That makes sense. I guess I wonder what would happen if we snapped our fingers and we could start again. I wonder what the economy system would look like. Would we still be obsessed with growth?

[–] otl@lemmy.sdf.org 2 points 9 months ago

Gotcha. I had a feeling something around how Mastodon doesn't support ActivityPub Groups (yet?) would be where things are going on. Congrats on piefed, by the way. I'll start studying the codebase now as I'm keen to understand how server-to-server communication works more deeply than I do now. Sending Announce(?) and fetching stuff from other servers...

When I look at the ActivityPub Note object (via curl -H 'Accept: application/activity+json https://hachyderm.io/@otl/111887721960075860) I see:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        {
            "ostatus": "http://ostatus.org#",
            "atomUri": "ostatus:atomUri",
            "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
            "conversation": "ostatus:conversation",
            "sensitive": "as:sensitive",
            "toot": "http://joinmastodon.org/ns#",
            "votersCount": "toot:votersCount"
        }
    ],
    "id": "https://hachyderm.io/users/otl/statuses/111887721960075860",
    "type": "Note",
    "summary": null,
    "inReplyTo": "https://ttrpg.network/comment/4965852",
    "published": "2024-02-07T01:59:08Z",
    "url": "https://hachyderm.io/@otl/111887721960075860",
    "attributedTo": "https://hachyderm.io/users/otl",
    "to": [
        "https://www.w3.org/ns/activitystreams#Public"
    ],
    "cc": [
        "https://hachyderm.io/users/otl/followers",
        "https://ttrpg.network/u/Neato",
        "https://lemmy.world/u/ForgottenFlux"
    ],
    "sensitive": false,
    "atomUri": "https://hachyderm.io/users/otl/statuses/111887721960075860",
    "inReplyToAtomUri": "https://ttrpg.network/comment/4965852",
    "conversation": "tag:hachyderm.io,2024-02-06:objectId=123754186:objectType=Conversation",
    "content": "<p><span class=\"h-card\" translate=\"no\"><a href=\"https://ttrpg.network/u/Neato\" class=\"u-url mention\">@<span>Neato</span></a></span> <span class=\"h-card\" translate=\"no\"><a href=\"https://lemmy.world/u/ForgottenFlux\" class=\"u-url mention\">@<span>ForgottenFlux</span></a></span>  I totally get how you feel. One use-case I think of is machine-generated image alt-text. These are often not added to images. But with image-to-text ML models, visually-impaired people could hear a descriptions of images that before were never annotated.</p>",
    "contentMap": {
        "en": "<p><span class=\"h-card\" translate=\"no\"><a href=\"https://ttrpg.network/u/Neato\" class=\"u-url mention\">@<span>Neato</span></a></span> <span class=\"h-card\" translate=\"no\"><a href=\"https://lemmy.world/u/ForgottenFlux\" class=\"u-url mention\">@<span>ForgottenFlux</span></a></span>  I totally get how you feel. One use-case I think of is machine-generated image alt-text. These are often not added to images. But with image-to-text ML models, visually-impaired people could hear a descriptions of images that before were never annotated.</p>"
    },
    "attachment": [],
    "tag": [
        {
            "type": "Mention",
            "href": "https://ttrpg.network/u/Neato",
            "name": "@Neato@ttrpg.network"
        },
        {
            "type": "Mention",
            "href": "https://lemmy.world/u/ForgottenFlux",
            "name": "@ForgottenFlux@lemmy.world"
        }
    ],
    "replies": {
        "id": "https://hachyderm.io/users/otl/statuses/111887721960075860/replies",
        "type": "Collection",
        "first": {
            "type": "CollectionPage",
            "next": "https://hachyderm.io/users/otl/statuses/111887721960075860/replies?only_other_accounts=true&page=true",
            "partOf": "https://hachyderm.io/users/otl/statuses/111887721960075860/replies",
            "items": []
        }
    }
}

So I'm assuming an Announce was posted to the shared inboxes at lemmy.ml, lemmy.world and ttrpg.network... hmm... I better start reading!

[–] otl@lemmy.sdf.org 3 points 9 months ago (1 children)

Ah! Interesting.

Which instances? Do you mean hachyderm.io with, say, lemmy.one?

 

My replies via Mastodon to Lemmy posts don't get distributed as expected. For example:

It seems my reply only shows in these Lemmy servers:

  • lemmy.ml (the server of the group to which the post was made)
  • lemmy.world (the server of the post's author)
  • ttrpg.network (the server of the comment's author)

From some other lemmy servers, my comment is not present:

I expected that my reply would show on any other Lemmy server with subscriptions to !privacy@lemmy.ml. Does that make sense? I'm hoping to help troubleshoot federation like this as I'm super excited about ActivityPub and what it means for the internet! :)

[–] otl@lemmy.sdf.org 5 points 9 months ago (3 children)

Growth might be impossible, but a steady and "boring" amount of profit should still be possible selling plain-ole-dishwashers. Yet ... for some reason, we don't see that.

God yes this bothers and fascinates me.

Instead companies throw everything into growth and we get the retarded bluetooth enabled dishwasher problem everywhere, and I'd like toknow more about why.

I think it's alluded to in the article:

They found a way to make consumers spend more money on dishwashing. The line goes up, for one more year. But it's not enough. It has to go up every year.

Digging deeper: why must the line go up? Pesonally I see it as a deeply emotional, human thing.

When you read those annual financial reports from big companies, they will do anything to make sure things look rosy. Bullshit terms like "negative growth" are used because "loss" or "shrink" sound bad. So what if it sounds bad?

Confidence. Trust. It's emotional. These are deep in our psyche. It's how governments get elected, contracts are won, and investments are made. It's what makes us human. If that line goes down... will it go back up? What's going to happen? Alarm bells! Uncertaintly. Anxiety. People abandon you. Money, power, influence fades. You could find yourself replaced by the up-and-coming who "show promise".

Our social emotional species has hundreds of thousands of years (millions?) of years of this stuff hardwired into us. Trust let us cooperate beyond our own individual or family interests. Would we be human otherwise? (I found the article Behavioural Modernity interesting).

[–] otl@lemmy.sdf.org 1 points 9 months ago

Not sure it’s capitalism per se. Perhaps rampant waste. Criticism of capitalism could include monopoly formation; massive tech companies buy small ones (obtain more capital = more control over production = more profit).

There’s despair over everyone, big & small, resolving the same recreated problems. Kelley doesn’t talk about breaking Microsoft up (i.e. redistributing their capital). He implies he’d be ok for Microsoft to maintain its market position if it just fixed some damn bugs.

[–] otl@lemmy.sdf.org 21 points 9 months ago

The art of turning a 500-line text file into a 50MB tarball. Welcome to the future :(

 

One of my favourite talks on programming. Just wanted to share for others who haven't seen this before.

 

I recently wrote a command-line utility lemmyverse to find communities indexed by Lemmy Explorer. A quick count shows almost 14%(!) of all communities indexed by lemmyverse are junk communities created by a single user @LMAO (reported here):

% lemmyverse . | wc -l
  30376
% lemmyverse enoweiooe | wc -l
   4206

Here's a python script, using no external dependencies, which uses Lemmy's HTTP API to delete all communities that @LMAO moderates:

#!/usr/bin/env python

import json
import urllib.parse
import urllib.request

baseurl = "https://lemmy.world"
username = "admin"
password = "password"

def login(user, passwd):
	url = baseurl+"/api/v3/user/login"
	body = urllib.parse.urlencode({
		"username_or_email": user,
		"password": passwd,
	})
	resp = urllib.request.urlopen(url, body.encode())
	j = json.load(resp)
	return j["jwt"]

def get_user(name):
	query = urllib.parse.urlencode({"username": name})
	resp = urllib.request.urlopen(baseurl+"/api/v3/user?"+query)
	return json.load(resp)

def delete_community(token, id):
	url = baseurl+"/api/v3/community/delete"
	params = {
		"auth": token,
		"community_id": id,
	}
	body = urllib.parse.urlencode(params)
	urllib.request.urlopen(url, body.encode())

token = login(username, password)
user = get_user("LMAO")
for community in user["moderates"]:
	id = community["community"]["id"]
	try:
		delete_community(token, id)
	except Exception as err:
		print("delete community id %d: %s" % (id, err))

Change username and password on lines 8 and 9 to suit.

Hope that helps! :) Thanks for the work you all put in to running this popular instance.

 

lemmyverse: search lemmy communities from the command-line. Thanks to the data HTTP API from lemmyverse.net! This is not really as polished as I like but, hey, in the interest of having a lively Lemmy I thought I'd share anyway :)

Usage

lemmyverse searches community names and descriptions using a regular expression:

lemmyverse pattern

Find communities about motorcycles:

$ lemmyverse motorcycle
120024@lemmy.world      All Things motorcycles
20hirnzelle@feddit.ch   All Things motorcycles
7810322@lemmy.world     All Things motorcycles
bmwmotorrad@lemmy.world Community for BMW motorcycles. A place to share
bootstrappable@slrpnk.net       A community to discuss all things BMW cars & motorcycles.\nFeel free to show off your new vehicle/parts
buell@lemmy.world       A discussion area for Buell motorcycles.
motorcycle_logistics@lemmy.world        A community for pictures and videos of people using motorcycles to transport things in a creative manner.\n\nThis includes
motorcycles@feddit.de   This community is for all things motorcycle related. At a later point and with enough traction gained
...

Find communities for the Plan 9 operating system:

$ lemmyverse '(plan9)|(Plan 9)'
plan9@lemmy.sdf.org     Discussions on the Plan9 operating system.

Why?

I run relatively slow hardware and I'm travelling in Bali, Indonesia at the moment. Loading lemmyverse.net in a web browser takes ages and gets the laptop fans spinning (it's hot here!). So I had some fun creating a tiny command-line program to find Lemmy communities using classic UNIX tools awk(1), tr(1), grep(1) etc.

More info

See the man page:

LEMMYVERSE(1)               General Commands Manual              LEMMYVERSE(1)

NAME
     lemmyverse - find lemmy communities

SYNOPSIS
     lemmyverse pattern

DESCRIPTION
     lemmyverse finds Lemmy communities indexed by lemmyverse.net using the
     given regular expression as interpreted by grep(1).  Both the names and
     descriptions of the communities are searched.

     On first run, a local community database must be generated.  The full
     community index is downloaded from https://lemmyverse.net using curl(1),
     transformed, then stored in the user cache directory.  To regenerate the
     database, remove the file and run lemmyverse again.

FILES
     communities
             Community database from lemmyverse.net.

ENVIRONMENT
     lemmyverse uses the following environment variables:

     XDG_CACHE_DIR
             The directory to store the community database.  If unset,
             $HOME/.cache/lemmyverse is used.

EXAMPLES
     Find communities for the Plan 9 operating system:
           lemmyverse '(plan9)|(Plan 9)'

     List all communities from the instance lemmy.sdf.org:
           lemmyverse '@lemmy.sdf.org'

EXIT STATUS
     The lemmyverse utility exits 0 on success, and >0 if an error occurs.

SEE ALSO
     grep(1), curl(1), https://lemmyverse.net
 

Go tech lead Russ Cox:

This post is about why we need a coroutine package for Go, and what it would look like.

With a post like this it usually means there will almost certainly be a new standard library package. But even more interestingly:

If we are to add coroutines to Go, we should aim to do it without language changes. That means the definition of coroutines should be possible to implement and understand in terms of ordinary Go code. Later, I will argue for an optimized implementation provided directly by the runtime, but that implementation should be indistinguishable from the pure Go definition.

 

Go project tech lead Russ Cox talks about a technique to make programs clearer using concurrency.

view more: next ›