Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

juliank, to random
@juliank@mastodon.social avatar

FWIW, this is the confusion matrix of characters that APT hashes the same.

0 '\x00' ' '
1 '\x01' !
2 '\x02' "
3 '\x03' #
4 '\x04' $
5 '\x05' %
6 '\x06' &
7 '\x07' '
8 '\x08' (
9 '\t' )
10 '\n' *
11 '\x0b' +
12 '\x0c' ,
13 '\r' -
14 '\x0e' .
15 '\x0f' /
16 '\x10' 0
17 '\x11' 1
18 '\x12' 2
19 '\x13' 3
20 '\x14' 4
21 '\x15' 5
22 '\x16' 6
23 '\x17' 7
24 '\x18' 8
25 '\x19' 9
26 '\x1a' :
27 '\x1b' ;
28 '\x1c' <
29 '\x1d' =
30 '\x1e' >
31 '\x1f' ?
64 @ `
91 [ {
92 \ |
93 ] }
94 ^ ~
95 _ '\x7f'

juliank, (edited )
@juliank@mastodon.social avatar

It simply does character | 0x20 to lower case it; so it loses some information ;)

That said this is still a perfect hash function; none of the left values are valid in the places we use the hash function.

juliank,
@juliank@mastodon.social avatar

I just realized there's a bug in the hash function in which we do needless unaligned multi-byte reads.

i.e. if we compare 5 byte strings, we read the first byte and then 4 bytes at once, rather than 4 bytes first and then the remaining byte.

This may well be faster, I don't know, it's certainly odd.

juliank,
@juliank@mastodon.social avatar

I haven't touched the hash generator (https://github.com/julian-klode/triehash) in 7 years and it is a Perl script because Guillem wanted it to be one so I'm not sure I can still fix it without rewriting it!

juliank, to random
@juliank@mastodon.social avatar

Shoot:

could not balance this transaction:
real postings' sum should be 0 but is: 0.0083659€

And my Go decimal class knows that there is a value != 0 left but it just prints out 0.

juliank,
@juliank@mastodon.social avatar

Ah well then I have a posting for missing bits but it is "0.00418296376 €" and hledger says it is 0.

juliank,
@juliank@mastodon.social avatar

Ah good, just tacking the 0.004€ on top of the other 1.50€ posting fixes it.

juliank, (edited ) to random
@juliank@mastodon.social avatar

I think I had a revelation about source-based pinning upgrading. It's path-dependent.

It's like if you add Breaks: binary (<< ${version-of-the-binary-in-the-source}) for each binary in your source package.

So you have three binaries A,B,C, they all depend on each other, e.g. A depends: B (>= 1), C (>= 1).

Now version 2 comes along and removes C; you are left with A Depends: B (>= 2), B: Depends: A (>= 2).

Upgrading either A or B will upgrade the other package, but C can remain installed.

juliank,
@juliank@mastodon.social avatar

The problem of applying this at the solver level is that you could have incosistent pinning.

i.e. you pin B=1 this prevents B=2 and also prevents A=2 despite A=2 being the candidate for A.

This is the right behaviour, but the annoying thing is we don't tell you that your pin is inconsistent and you should have pinned src:foo=1.

Anyway, this already is implemented in apt's existing solver to some extent (latter solving can override it...).

juliank,
@juliank@mastodon.social avatar

This works nicely with no strict pinning whereas shoehorning it into the candidate selection works a lot less well.

And the problem is that it is inherently dynamic: While we could ensure a static ordering of the versions of a package is consistent across source packages, we don't gain much.

Example: Let's say you have A=5|A=3|A=1 and B=5|B=3|B=1. A=3 is the only installable one, we would still try to install B=5. However we should limit ourselves to B=3 as well.

juliank,
@juliank@mastodon.social avatar

So what do we do? When we mark A=3 for install, we iterate over all binaries in the source package and reject other versions.

The annoying bit is only rejecting binaries still available in the latest source version; because a source version does not yet exist, so we can only iterate over all the binaries.

juliank, to random
@juliank@mastodon.social avatar

APT is a weird mix of pre-STL, pre-namespace C++ from the early 90s with C++17 and soon C++20 sprinkled all over.

juliank, (edited )
@juliank@mastodon.social avatar

Well you know std::remove_if, my predicate lambda isn't actually just a predicate, it also std::move()s the element content of an element that will be removed to a different container first.

This sounds totally ridiculous but yes predicates can modify the elements they are being called on, and this is a lot cleaner than writing an explicit for loop with iterators and deleting them.

foone, to random
@foone@digipres.club avatar

I wonder how hard it is to make a fake USB printer.
Like, a printer that takes any printout and goes "yep, that printed just fine" but nothing ever comes out anywhere

juliank,
@juliank@mastodon.social avatar

@foone that would be convenient as like a usb stick that you can print too and then read back pdf.

juliank, to random
@juliank@mastodon.social avatar

Why is the answer to "do you mind"

"Yeah sure"

And not "no"

juliank,
@juliank@mastodon.social avatar

@Conan_Kudo The usual structure I see/hear is

Do you mind if I do ...
Yeah sure[, go ahead]

(i.e. if they don't mind they reply positively)

juliank, to random
@juliank@mastodon.social avatar

OK, but where can I find pistacchio verde di bronte D.O.P.?

juliank,
@juliank@mastodon.social avatar

It's not like you can find the non DOP kind either

juliank, to random
@juliank@mastodon.social avatar

Xiaomi air purifier, green vs grey filter isn't all that clear what's better.

juliank,
@juliank@mastodon.social avatar

I gotta be honest, these purifiers are 2 and 3 years old and they didn't get any replacement filters yet.

The PM2.5 filtering still works adequately and they don't particularly smell much either.

zygoon, to random
@zygoon@fosstodon.org avatar

A family member has died recently and as a part of shuffling stuff around, I've recovered a thinkpad I used to use.

At the moment it's just wiped with a fresh copy of Windows, but I think I will put Debian on it later. I have not used raw Debian on bare metal in a while, I wonder if I should go with testing or stick to stable.

juliank,
@juliank@mastodon.social avatar

@zygoon tbh just do testing. Sadly the autopkgtests gate migration to testing and not to unstable, so even trivial failures directly end up in your machine if you run unstable.

Cherry pick if needed, but most stuff will migrate in 2 days if tests pass.

Mellcolm, to random German
@Mellcolm@mastodon.social avatar

Ich schreibe an der Uni Regensburg aktuell meine Masterarbeit zur Akzeptanz von GenAI in der Softwareentwicklung. Jeder Teilnehmerin bekommt einen Stein in meinem Brett. Gesucht sind Entwickler*innen. https://s2survey.net/genai_acceptance/ Pls. weitersagen! (Dauert keine 10 Minuten, schwöre!)

juliank,
@juliank@mastodon.social avatar

@Mellcolm Nur weil die AI den Code für dich klaut heißt das ja noch lange nicht, dass du keine Urheberrechtsverletzung begehst.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • Durango
  • ethstaker
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • Leos
  • osvaldo12
  • tacticalgear
  • cubers
  • cisconetworking
  • anitta
  • provamag3
  • modclub
  • mdbf
  • GTA5RPClips
  • tester
  • megavids
  • normalnudes
  • lostlight
  • All magazines