Searching We.Love.Privacy.Club

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

@prologic@twtxt.net Regarding the new way of generating twt-hashes, to me it makes more sense to use tabs as separator instead of spaces, since the you can just copy/past a line directly from a twtxt-file that already go a tab between timestamp and message. But tabs might be hard to “type” when you are in a terminal, since it will activate autocompleteâ€ŠđŸ€”

Another thing, it seems that you sugget we only use the domain in the hash-creation and not the full path to the twtxt.txt

$ echo -e "https://example.com 2024-09-29T13:30:00Z Hello World!" | sha256sum - | awk '{ print $1 }' | base64 | head -c 12

​ Read More

@prologic@twtxt.net earlier you suggested extending hashes to 11 characters, but here’s an argument that they should be even longer than that.

Imagine I found this twt one day at https://example.com/twtxt.txt :

2024-09-14T22:00Z Useful backup command: rsync -a “$HOME” /mnt/backup

Image

and I responded with “(#5dgoirqemeq) Thanks for the tip!”. Then I’ve endorsed the twt, but it could latter get changed to

2024-09-14T22:00Z Useful backup command: rm -rf /some_important_directory

Image

which also has an 11-character base32 hash of 5dgoirqemeq. (I’m using the existing hashing method with https://example.com/twtxt.txt as the feed url, but I’m taking 11 characters instead of 7 from the end of the base32 encoding.)

That’s what I meant by “spoofing” in an earlier twt.

I don’t know if preventing this sort of attack should be a goal, but if it is, the number of bits in the hash should be at least two times log2(number of attempts we want to defend against), where the “two times” is because of the birthday paradox.

Side note: current hashes always end with “a” or “q”, which is a bit wasteful. Maybe we should take the first N characters of the base32 encoding instead of the last N.

Code I used for the above example: https://fossil.falsifian.org/misc/file?name=src/twt_collision/find_collision.c
I only needed to compute 43394987 hashes to find it.

​ Read More

I was not suggesting to that everyone need to setup a working webfinger endpoint, but that we take the format of nick+(sub)domain as base for generating the hashed together with the message date and content.

If we omit the protocol prefix from the way we do things now will that not solve most of the problems? In the case of gemini://gemini.ctrl-c.club/~nristen/twtxt.txt they also have a working twtxt.txt at https://ctrl-c.club/~nristen/twtxt.txt 
 damn I just notice the gemini. subdomain.

Okay what about defining a prefers protocol as part of the hash schema? so 1: https , 2: http 3: gemini 4: gopher ?

​ Read More

@lyse@lyse.isobeef.org 31°C here, feels like 33°C, with a lovely 75% of humidity. It has been raining, on and off (to make matter “better”) the whole day until now. No horses here, but if you go outside you will smell the same smell of farm animals (like goats, or pigs). That’s because two or three kilometres from here there are private farms, and when the wind blows in such way, well, we are reminded of their existence.

I haven’t left the house, so it feels well under air conditioning. In two more hours I will call it quits from the work day, and will have to dash to the grocery to get supplies for tonight’s meal (arroz con gandules). I will let you know how it truly feels out there then. :-D

For those swollen fingers, nothing better than a mildly cold shower! Oh, and paws off the keyboard! :-P

​ Read More

@movq@www.uninformativ.de wow! We are “lucky” today, only 27°C here, 87% humidity, overcast, and raining sporadically. Thanks to the rain our temperatures aren’t high, but muggy nevertheless. I am ready for our winter too, you know, that whole week. LOL.

​ Read More
In-reply-to » @movq, maybe you can help me with this. I want to place the vim cursor at the end of the first line on replies, and forks. I have tried adding to this to jenny's configuration:

@movq@www.uninformativ.de hmm, I guess I could do that too. I have startinsert set on my .vimrc, so I will either have to take it out, or exit insert, $, then insert again. I think the way you do it would be the way to go.

I tried setting VISUAL to be something like vim -c 'star!', which does the same thing, but no dice. :-/

​ Read More

Porting my JavaScript Game Engine to C for No Reason

high_impact

tl;dr: high_impact is small game engine for 2D action games. It’s written in C, compiles to Windows, Mac and Linux as well as to WASM for the Web. It’s “inspired by” my original Impact JavaScript game engine from 2010. The name high_impact is a nod to a time when C was considered a high level language.

MIT licensed, source on github: [github.com/phoboslab/high_impact](https://github 
 ⌘ Read more

​ Read More

Porting my JavaScript Game Engine to C for No Reason

high_impact

tl;dr: high_impact is small game engine for 2D action games. It’s written in C, compiles to Windows, Mac and Linux as well as to WASM for the Web. It’s “inspired by” my original Impact JavaScript game engine from 2010. The name high_impact is a nod to a time when C was considered a high level language.

MIT licensed, source on github: [github.com/phoboslab/high_impact](https://github 
 ⌘ Read more

​ Read More

There are also a bunch of log messages scrolling by. I’ve never seen this much activity in the log:

Jul 25 01:37:39 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:39 (149.71.56.69) "GET /external?nick=lovetocode999&uri=https://pagez.co.uk/services/your-own-100-fully-owned-online-vi>
Jul 25 01:37:39 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:39 (162.211.155.2) "GET /twt/112135496802692324 HTTP/1.1" 400 12 826.65”s
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (51.222.253.14) "GET /conv/muttriq HTTP/1.1" 200 36881 20.448309ms
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (162.211.155.2) "GET /twt/112730114943543514 HTTP/1.1" 400 12 663.493”s
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (27.75.213.253) "GET /external?nick=lovetocode999&uri=http%3A%2F%2Falfarah.jo%2FHome%2FChangeCulture%3FlangCode%3Den>
Jul 25 01:37:40 buc.ci yarnd[829]: time="2024-07-25T01:37:40Z" level=error msg="http://bynet.com.br/log_envio.asp?cod=335&email=%21%2AEMAIL%2A%21&url=https%3A%2F%2Fwww.almanacar.c>
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (162.211.155.2) "GET /twt/111674756400660911 HTTP/1.1" 400 12 545.106”s
Jul 25 01:37:40 buc.ci yarnd[829]: time="2024-07-25T01:37:40Z" level=warning msg="feed FetchFeedRequest: @<lovetocode999 http://alfarah.jo/Home/ChangeCulture?langCode=en&returnUrl>
Jul 25 01:37:41 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:41 (162.211.155.2) "GET /twt/112507964696096567 HTTP/1.1" 400 12 838.946”s

Something really weird is going on?

​ Read More

Execute commands by sending JSON? Learn how unsafe deserialization vulnerabilities work in Ruby projects
Can an attacker execute arbitrary commands on a remote server just by sending JSON? Yes, if the running code contains unsafe deserialization vulnerabilities. But how is that possible? In this blog post, we’ll describe how unsafe deserialization vulnerabilities work and how you can detect them in Ruby projects.

The post [Execute c 
 ⌘ Read more

​ Read More

M a y b e p u t s p a c e s b e t w e e n t h e l e t t e r s t o t h w a r t t h e c r a w l e r s l i k e t h i s s o t h e y j u s t s e e i n d i v i d u a l l e t t e r s

​ Read More

I think @abucci@anthony.buc.ci and @stigatle@yarn.stigatle.no are running snac? I didn’t have a closer look at snac (no intention of running it), but if that is a relatively small daemon (maybe comparable to Yarn?) that gives you access to the whole world of ActivityPub, then, well, yeah 
 That’s tough to beat.

Yes, I am running snac on the same VPS where I run my yarn pod. I heard of it from @stigatle@yarn.stigatle.no, so blame him 😏 snac is written in C and is one simple executable, uses very little resources on the server, and stores everything in JSON files (no databases or other integrations; easy to save and migrate your data) . It’s definitely like yarn in that respect.

I haven’t been around yarn much lately. Part of that is that I’ve been very busy at work and home and only have a limited time to spend goofing off on a social network. Part of it is that I’m finding snac very useful: I’ve connected with friends I’d previously lost touch with, I’ve found useful work-related information, I’ve found colleagues to follow, and even found interesting conferences to attend. There’s a lot more going on over there.

I guess if I had to put it simply, I’d say I have limited time to play and there are more kids in the ActivityPub sandbox than this one. That’s not a ding on yarn–I like yarn and twtxt–I’m just time constrained.

​ Read More

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

@eapl.me@eapl.me I have many fond memories of Turbo pascal and Turbo C(++). They really did have a great help system. And debug tools! Its rare for language docs to be as approachable. QBasic was great. As was PHP docs when I first came into web.

​ Read More

ICYMI: improved C++ vulnerability coverage and CodeQL support for Lombok
The effectiveness of a static application security solution hinges on its ability to provide extensive vulnerability coverage and support for a wide range of languages and frameworks. Today, we’re highlighting two releases that’ll help you discover more vulnerabilities in your codebase, so you can ship more secure software.

The post [ICYMI: improved C++ vulnerability coverage and CodeQL support 
 ⌘ Read more

​ Read More

**RT by @mind_booster: [1/3]
MĂĄs notĂ­cias para Portugal đŸ›„ïž

Estudo divulgado hoje pela ZERO refere que Portugal mantĂ©m o 6.Âș lugar entre os paĂ­ses europeus c/ maiores nĂ­veis de poluição de Ăłxidos de enxofre emitido (SOx) pelos navios de cruzeiro depois de ItĂĄlia, Espanha, GrĂ©cia, Noruega e França.**
[1/3]

MĂĄs notĂ­cias para Portugal đŸ›„ïž

Estudo divulgado hoje pela ZERO refere que Portugal mantĂ©m o 6.Âș lugar entre os paĂ­ses europeus c/ maiores nĂ­veis de poluição de Ăłxidos de enxofre emitido (SOx) pelos navios de cruz 
 ⌘ Read more

​ Read More

@movq@www.uninformativ.de
Doesn’t even compile on my system, which is apparently broken:

> cc -Wall -Wextra -o win win.c $(pkg-config --cflags --libs gtk4)                                                                                                        
cc: error: unrecognized argument in option ‘-mfpmath=sse -msse -msse2 -pthread -I/usr/include/gtk-4.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/graphene-1.0 -I/usr/lib/x86_64-linux-gnu/graphene-1.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgtk-4 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgraphene-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0’
cc: note: valid arguments to ‘-mfpmath=’ are: 387 387+sse 387,sse both sse sse+387 sse,387

​ Read More

I don’t really like the term “gatekeeping”, especially when it’s used to describe the general concept of a barrier to entry. The term “gatekeeping” implies to me a “gatekeeper”–a person A who is trying to control if person B can interact with person C. It implies active discrimination, perhaps even bigotry, when in reality the barrier might be a passive issue such as scarcity or inherent complexity. “Gatekeeping” seems an intentionally- and needlessly-charged term.

​ Read More

Em entrevista Ă  @RTPNoticias, o “Ministro do Ambiente e da Acção ClimĂĄtica” do @ambiente_pt, quanto questionado sobre a energia,sobre gĂĄs sĂł fala das preocupaçÔes quanto ao seu custo, sem nenhuma palavra a dizer sobre a Ăłbvia necessidade da redução do seu uso c/ a crise climĂĄtica
Em entrevista à @RTPNoticias, o “Ministro do Ambiente e da Acção Climática” do @ambiente_pt, quanto questionado sobre 
 ⌘ Read more

​ Read More

**RT by @mind_booster: Highlights from IPCC report:

  • The world’s on track to hit above 3°C of warming by 2100.
  • Emissions must peak by 2025 and nearly halve by 2030 to keep warming to 1.5°C
  • 3-bil people likely to suffer water scarcity at 2°C.
  • No gov has a credible plan to keep warming in target.**
    Highlights from IPCC report:

- The world’s on track to hit above 3°C of warming by 2100.

- Emissions must peak by 2025 and nearly halve by 2030 to keep warming to 1.5°C

- 3-bil people likely to suffer w 
 ⌘ Read more

​ Read More

RT by @mind_booster: One of the world’s biggest polluters, #Shell, just announced obscene annual profit of $40bn. Shell accounts for close to 1.6% of the global 1.5°C carbon budget. We must prioritize people and planet over profit and #ActInTime. https://www.theguardian.com/business/2023/feb/02/shell-profits-2022-surging-oil-prices-gas-ukraine
One of the world’s biggest polluters, #Shell, just announced obscene annual profit of $40bn. Shell accounts for close to 1. 
 ⌘ Read more

​ Read More

**This is how every news program should start, what political interviews first question should be about, the first impact assessment to every decision that is made.

The world knows how disastrous >1.5C is, pretends to be doing what is needed to avoid it, but we’re heading to 2°C.**
This is how every news program should start, what political interviews first question should be about, the first impact assessment to every decision that is made.

The world knows how disastrous >1.5C is, pretends to be doing what i 
 ⌘ Read more

​ Read More

**R to @mind_booster: “2045 nĂŁo Ă© bom?”

Não: tendo em conta o carbon budget de 2022, precisamos de atingir net-zero carbónico o mais tardar em 2040 para atingir mas não ultrapassar os 1.5°C.**
“2045 nĂŁo Ă© bom?”

Não: tendo em conta o carbon budget de 2022, precisamos de atingir net-zero carbónico o mais tardar em 2040 para atingir mas não ultrapassar os 1.5°C. ⌘ Read more

​ Read More

@abucci@anthony.buc.ci So.. The issue is that its showing the password by default? Would making an alias to always include the -c help? We can probably engage Jason with a PR to enable a more hardened approach when desired. I’ve spoken to him before and is generally a pretty open to ideas.

I found this app that was created by the gopass author that does copy by default and has a tui or GUI mode https://github.com/cortex/ripasso

​ Read More

**RT by @mind_booster: Remember:

  1. We’re at 1.25/1.75°C of global warming and rising fast.

  2. Fossil fuel emissions should have peaked in 2022 to avoid 2.5°C, but they didn’t.

  3. Forest degradation is getting worse.

  4. Capitalism has put world-ending 2.25/2.75°C by 2045- 2090 in the pipelines. đŸ§”**
    Remember:

1. We’re at 1.25/1.75°C of global warming and rising fast.

2. Fossil fuel emissions should have peaked in 2022 to avoid 2.5°C, but they didn’t.

3. Forest degradation is getting worse.

4. Capitalis 
 ⌘ Read more

​ Read More

**RT by @mind_booster: 1.

‘equilibrium climate sensitivity is at least ~4°C with a likely range of 3.5-5.5°C.

global warming in the pipeline is greater than prior estimates.’

James Hansen and colleagues release new work for discussion.

This should be front page news.

https://arxiv.org/abs/2212.04474**
1.

‘equilibrium climate sensitivity is at least ~4°C with a likely range of 3.5-5.5°C.

global warming in the pipeline is greater than prior estimates.’

James Hansen and colleagues release new work for discus 
 ⌘ Read more

​ Read More
In-reply-to » (#u4bs34q) @movq yeah.. i rewrote it a few times because i thought there was something breaking.. but was mistaken though now i am seeing a weird cache corruption.. that seems to come and go. Media

I have found the issue with this very subtle bug.. the cache was returning a slice that would be mutated. The mutation involved appending an item and then sorting. because the returned slice is just a pointer+length the sort would modify the same memory.

          CACHE         Returned slice          
original: [A B C D]     [A B C D]
add:      [A B C D] E   [A B C D E]
sort:     [E A B C] D   [A B C D E]

fix found here:
https://git.mills.io/yarnsocial/yarn/pulls/1072

​ Read More

RT by @mind_booster: Dear public bodies, business, & politicians: “incremental change is no longer an option: broad-based economy-wide transformations are required to avoid closing the window of opportunity to limit global warming to well below 2°C, pref. 1.5°C. Every fraction of a degree matters.”
Dear public bodies, business, & politicians: “incremental change is no longer an option: broad-based economy-wide transformations are required to avoid closing the window of opportunity to limit global warming to w 
 ⌘ Read more

​ Read More

“Para Portugal, [
] seria necessĂĄrio garantir uma redução de emissĂ”es de pelo menos 61% atĂ© 2030 relativamente aos nĂ­veis de 2005, em vez dos atuais 55% na Lei de bases do Clima, para alinhar o paĂ­s com a meta de 1,5°C”
“Para Portugal, [
] seria necessĂĄrio garantir uma redução de emissĂ”es de pelo menos 61% atĂ© 2030 relativamente aos nĂ­veis de 2005, em vez dos atuais 55% na Lei de bases do Clima, para alinhar o paĂ­s com a meta de 1,5°C”

[nitter.net/ZEROasts/status/1575415098352586760#m](https://nitter.n 
 ⌘ Read more

​ Read More
In-reply-to » Progress! so i have moved into working on aggregates. Which are a grouping of events that replayed on an object set the current state of the object. I came up with this little bit of generic wonder.

(cont.)

Just to give some context on some of the components around the code structure.. I wrote this up around an earlier version of aggregate code. This generic bit simplifies things by removing the need of the Crud functions for each aggregate.

Domain Objects

A domain object can be used as an aggregate by adding the event.AggregateRoot struct and finish implementing event.Aggregate. The AggregateRoot implements logic for adding events after they are either Raised by a command or Appended by the eventstore Load or service ApplyFn methods. It also tracks the uncommitted events that are saved using the eventstore Save method.

type User struct {
  Identity string ```json:"identity"`

  CreatedAt time.Time

  event.AggregateRoot
}

// StreamID for the aggregate when stored or loaded from ES.
func (a *User) StreamID() string {
	return "user-" + a.Identity
}
// ApplyEvent to the aggregate state.
func (a *User) ApplyEvent(lis ...event.Event) {
	for _, e := range lis {
		switch e := e.(type) {
		case *UserCreated:
			a.Identity = e.Identity
			a.CreatedAt = e.EventMeta().CreatedDate
        /* ... */
		}
	}
}
Events

Events are applied to the aggregate. They are defined by adding the event.Meta and implementing the getter/setters for event.Event

type UserCreated struct {
	eventMeta event.Meta

	Identity string
}

func (c *UserCreated) EventMeta() (m event.Meta) {
	if c != nil {
		m = c.eventMeta
	}
	return m
}
func (c *UserCreated) SetEventMeta(m event.Meta) {
	if c != nil {
		c.eventMeta = m
	}
}
Reading Events from EventStore

With a domain object that implements the event.Aggregate the event store client can load events and apply them using the Load(ctx, agg) method.

// GetUser populates an user from event store.
func (rw *User) GetUser(ctx context.Context, userID string) (*domain.User, error) {
	user := &domain.User{Identity: userID}

	err := rw.es.Load(ctx, user)
	if err != nil {
		if err != nil {
			if errors.Is(err, eventstore.ErrStreamNotFound) {
				return user, ErrNotFound
			}
			return user, err
		}
		return nil, err
	}
	return user, err
}
OnX Commands

An OnX command will validate the state of the domain object can have the command performed on it. If it can be applied it raises the event using event.Raise() Otherwise it returns an error.

// OnCreate raises an UserCreated event to create the user.
// Note: The handler will check that the user does not already exsist.
func (a *User) OnCreate(identity string) error {
    event.Raise(a, &UserCreated{Identity: identity})
    return nil
}

// OnScored will attempt to score a task.
// If the task is not in a Created state it will fail.
func (a *Task) OnScored(taskID string, score int64, attributes Attributes) error {
	if a.State != TaskStateCreated {
		return fmt.Errorf("task expected created, got %s", a.State)
	}
	event.Raise(a, &TaskScored{TaskID: taskID, Attributes: attributes, Score: score})
	return nil
}
Crud Operations for OnX Commands

The following functions in the aggregate service can be used to perform creation and updating of aggregates. The Update function will ensure the aggregate exists, where the Create is intended for non-existent aggregates. These can probably be combined into one function.

// Create is used when the stream does not yet exist.
func (rw *User) Create(
  ctx context.Context,
  identity string,
  fn func(*domain.User) error,
) (*domain.User, error) {
	session, err := rw.GetUser(ctx, identity)
	if err != nil && !errors.Is(err, ErrNotFound) {
		return nil, err
	}

	if err = fn(session); err != nil {
		return nil, err
	}

	_, err = rw.es.Save(ctx, session)

	return session, err
}

// Update is used when the stream already exists.
func (rw *User) Update(
  ctx context.Context,
  identity string,
  fn func(*domain.User) error,
) (*domain.User, error) {
	session, err := rw.GetUser(ctx, identity)
	if err != nil {
		return nil, err
	}

	if err = fn(session); err != nil {
		return nil, err
	}

	_, err = rw.es.Save(ctx, session)
	return session, err
}

​ Read More

“we looked at how damaging the journey of overshooting the 2°C temperature target would be,
[
]
The results suggest that a temporary overshoot would cause waves of irreversible extinctions and lasting damage to tens of thousands of species”
https://theconversation.com/climate-crisis-even-temporarily-overshooting-2-c-would-cause-permanent-damage-to-earths-species-185929?utm_source=twitter&utm_medium=bylinetwitterbutton

“we looked at how damaging the journey of overshooting the 2°C temperature target would 
 ⌘ Read more

​ Read More

The problem I have with the vast majority of social movements, left or right, is that they often lead to projection instead of introspection. Instead of person A trying to decide how person B can treat person C better, person A should try to decide how person A can treat person C better.

​ Read More

GitHub enables the development of functional safety applications by adding support for coding standards AUTOSAR C++ and CERT C++
GitHub is excited to announce the release of CodeQL queries that implement the standards CERT C++ and AUTOSAR C++. These queries can aid developers looking to demonstrate ISO 26262 Part 6 process compliance. ⌘ Read more

​ Read More