@jix@mathstodon.xyz avatar

jix

@jix@mathstodon.xyz

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

gsuberland, (edited ) to random
@gsuberland@chaos.social avatar

[serious, no joke replies or guesses / autotranslation please]

do I know anyone native or otherwise very fluent in Chinese who can tell me the correct term for a plated edge connector, like you might find on a PCIe card? specifically the "gold fingers" style connector feature you would find on the PCB side, not the plastic connector it slots into.

I've had an absolute nightmare trying to communicate this feature to a Shenzhen-based PCB vendor and I would like it to be easier in future.

jix,
@jix@mathstodon.xyz avatar

@gsuberland I found this page https://www.jlc.com/portal/server_guide_10579.html and doing an auto-translate back to English the title consists of "金手指斜边" "gold finger bevel" and "设计注意事项" "design considerations". I also found the prefix "金手指" of that on the Chinese language quote form of pcbway (jdbpcb) and selecting that makes a dropdown appear where you can select something with 20°, 30° or 45° (which are the exact edge connector bevelling options pcbway has for the English form).

jix,
@jix@mathstodon.xyz avatar

@gsuberland Sorry, I was thinking that finding matching pcb quote forms is neither a guess nor an auto translate ... but I should have realized that it still wasn't at all what you were actually asking for

azonenberg, to math
@azonenberg@ioc.exchange avatar

Ok, this one is for the discrete gurus out there.

Let N = CRC32(X)

Given N, is it possible to efficiently calculate CRC32(concat(X, Y)) where Y is a known sized, but very long, sequence of 0xFF bytes?

Obviously you can just seed the CRC with N and iterate, feeding 0xFF in each cycle, but is there any kind of shortcut you can take if you know the input is always a 1 bit?

jix,
@jix@mathstodon.xyz avatar

@azonenberg @whitequark CRC32-UPDATE(N, 0xff) is an affine function in the input state N when you view N as a 32 element vector over GF(2), i.e. you can represent it as a 32x32 bit matrix for the linear part and a 32 bit vector for the constant offset. Like is common in 3d graphics we can use homogeneous coordinates to represent both together in a 33x33 matrix so we can easily compose things including translations by using only matrix multiplication. You can then use exponentiation by squaring to quickly compute any power of that matrix to get a matrix representation of the state update function for adding any given number of 0xff bytes.

Here is some python code that does that: https://gist.github.com/jix/6fe33ef0900d41f550cd52b33ab88d55

jix,
@jix@mathstodon.xyz avatar

@azonenberg also, if you squint hard enough this is what @whitequark suggested, but done for every power of 2 length (reusing the optimized function of the preceding power of two and exploiting some known properties of crcs to do the optimization) and then you pick the resulting functions for every bit that's set in the number of 0xff bytes you want to add and compose them

jix,
@jix@mathstodon.xyz avatar

@azonenberg is this useful to you? I could also write a verilog or C implementation (with a python script to generate a few small tables I'd use for those) if that would help. I wouldn't mind doing that even if you don't end up using that after all as long as you think it'd be worth giving it a try.

jix,
@jix@mathstodon.xyz avatar

@azonenberg Just pushed to https://github.com/jix/fast_fwd_crc

Has an example that can be run with make run that checks against zlib, and is 0BSD licensed.

Ended up using the polynomial quotient ring approach instead of the matrix approach as it's faster, doesn't need any tables, and, after figuring out the right bit order everywhere, simpler to implement.

The high level idea is still the same as for the matrix approach.

gsuberland, to random
@gsuberland@chaos.social avatar

T-20m until I'm live with @FieldFX providing some tunes for the byte jam!

head over to https://www.twitch.tv/fieldfxdemo at 2000 UK time (1900 UTC) to come check out the live coding ^^

jix,
@jix@mathstodon.xyz avatar

@gsuberland don't forget to record it locally, I really enjoy re-listening to your sets :)

ColinTheMathmo, to random
@ColinTheMathmo@mathstodon.xyz avatar

On the OEIS, what magical incantation do I use to say:

"These terms really are the start of the sequence .. honest."

jix,
@jix@mathstodon.xyz avatar

@ColinTheMathmo I don't know a way to specify that on the OEIS web search (I think there might be no way), but downloading all sequences (below 30MB compressed) from https://oeis.org/wiki/Download and doing a plain text search e.g. using

zcat stripped.gz | grep ' ,4,3,2,1,0,-1,'

works and takes half a second for me. The initial space in the search string makes sure it'll only consider the start and the trailing comma ensures that it'll match a full term.

joshuagrochow, (edited ) to random
@joshuagrochow@mathstodon.xyz avatar

The Hoffman-Singleton graph can apparently be constructed as the Cayley graph of a magma: https://en.wikipedia.org/wiki/Hoffman%E2%80%93Singleton_graph#Construction_on_a_groupoid/magma

It:

  • isn't a quasigroup
  • has a 2-sided identity (0,0,0)
  • isn't associatve
  • isn't commutative

What is this magma?? Anyone have any ideas?

I think when the first coordinate is zero, the corresponding 25 elements are a copy of the cyclic group of order 25 (generated by (0,1,1)).

jix,
@jix@mathstodon.xyz avatar

@joshuagrochow Did I make a mistake or does it not actually construct the Hoffman-Singleton graph?

https://gist.github.com/jix/fb54eb6ca746e0322643540b919382b9

If I change the magma operation in ways that seem like plausible typos to me, I can get it to generate a graph with the right number of undirected edges (i.e. it generates a directed graph where the edge set is closed under edge reversal) but it's still not the Hoffman-Singleton graph.

jix,
@jix@mathstodon.xyz avatar

@joshuagrochow That was among the potential typos I tried

jix,
@jix@mathstodon.xyz avatar

@joshuagrochow @ProfKinyon I found what I think is the formula the authors intended:

[ (a + x, b - bx + y, c + (-1)^axby + 2^az). ]

Deleting the first exponent (a) and moving the (x) right after it into the exponent gets us the paper's

[ (a + x, b - bx + y, c + (-1)^xby + 2^az). ]

I found this by trying to make it fit the construction at https://mathworld.wolfram.com/Hoffman-SingletonGraph.html

The vertex ((a, b, c)) is vertex (c) in row (a), cycle (b). The generators ((0, 0, 1)) and ((0, 0, 4)) move in opposite directions along each cycle with the (2^a) term selecting the step size on the cycle, depending on the row. The ((1, k, 0)) generators correspond to the edges between the rows for each (k).

jix,
@jix@mathstodon.xyz avatar

@joshuagrochow @ProfKinyon I did verify it using my local copy, but I also updated the code on GitHub now.

jix,
@jix@mathstodon.xyz avatar

@ProfKinyon @joshuagrochow I just got
[ (x + y, -2 a y + b + y, -2 a b y + 2 a y^2 + b y + 2 a z + c + z) ]
which is a loop and generates the H-S graph with generators
[ (0, 0, 2), (0, 0, 3), (1, 0, 0), (1, 4, 1), (1, 3, 4), (1, 2, 4), (1, 1, 1). ]

jix,
@jix@mathstodon.xyz avatar

@ProfKinyon @joshuagrochow This is what I used to check that we still get the H-S graph, that we have the all zero identity and that we can divide on both sides: https://gist.github.com/jix/10138118ba3b6f35e8f31d088934dfbe

It also outputs the Cayley table using GAP compatible syntax and GAP agrees that this is in fact a loop.

jix,
@jix@mathstodon.xyz avatar

@ProfKinyon @joshuagrochow I started with the pentagons and pentagrams construction that has one order 5 vertex permutation and 5 order 2 vertex permutations with the H-S graph as Schreier graph.

Using manual trial and error I then found a polynomial formula where using the same generators as before for (x, y, z) results in exactly those permutations on (a, b, c) which also guarantees that I get at least a one sided quasigroup. (The order 5 permutation and its inverse correspond to two of the generators.)

I reduced these polynomials mod the ideal of polynomials that evaluate to zero when (x, y, z) is a generator. I did this mostly to get simpler polynomials.

I noticed that with (x, y, z) = (0, 0, 0) we get (a, b, c) but with (a, b, c) = (0, 0, 0) we get (x, -y, 2z - y^2) so I substituted (x, -y, 3z - 3y^2) for (x, y, z) in the formula and adjusted the generators accordingly to still get the same permutations of (a, b, c).

At that point I noticed that I also get a permutation for every fixed (a, b, c), i.e. that I have a two-sided quasigroup (and even a loop).

I think I got lucky with reducing the polynomials, as adding random elements of the zero-at-the-generators ideal to the formula doesn't change the Cayley graph (pretty much by construction), but doesn't always produce a two-sided quasigroup as it does change the Cayley table entries where the (x, y, z) operand is not a generator.

jix,
@jix@mathstodon.xyz avatar

@ProfKinyon @joshuagrochow Regarding the question about adding terms from the zero-at-the-generators ideal, I haven't systematically explored this. The reduced polynomials (using sage-math's default degree-reverse-lexicographic term order) happen to result in a loop and for the few ideal terms I tried adding back in, I didn't get a loop.

I think the polynomial representation is mostly useful for finding a short formula that extends a given partial function and wouldn't expect a strong connection between the size or degree of the polynomials and whether the formula represents a quasigroup or whether the quasigroup it represents has nice properties.

I would be interested in trying to come up with some code to find and/or enumerate quasigroups that have a given Cayley graph, possibly restricted to nice quasigroups.

I think it makes sense to treat that separately from the (also interesting) problem of coming up with a short formula for representing such a quasigroup or of finding, among all sufficiently nice quasigroups, the one that can be represented with the shortest formula.

demofox, to random
@demofox@mastodon.gamedev.place avatar

New Blog Post
How To Make Your Own Spooky Magic Eye Pictures (Autostereograms)
To see them, blur your vision until the dots overlap, then a 3d shape should pop out.
https://blog.demofox.org/2023/10/22/how-to-make-your-own-spooky-magic-eye-pictures-autostereograms/

image/png

jix,
@jix@mathstodon.xyz avatar

@demofox I can only mange to make it work in such a way that the depth becomes inverted.

More precisely, there's the in-focus plane and the in-alignment plane. From the comments it seems that blurring your vision moves both planes back for most people? If I blur my vision I can move the in-focus plane further back than the object I'm looking at but the in-alignment plane stays on the object. I can also move the in-alignment plane nearer to me than what I'm looking at by going cross-eyed, but that does keep things in focus (which gives me a super crisp in-focus 3d shape, but with the depth inverted from what it's supposed to be). Can't move either plane in the other direction.

jix,
@jix@mathstodon.xyz avatar

@demofox That produces something broken, I think that would also require changing the other places where depthOffset is used? Anyway I replaced *srcDepthPixel with ~*srcDepthPixel since that's only used once, regenerated and with that it still works and is the right way around for me :)

And in case anyone else wants to build it on Linux, <direct.h> needs to be replaced with <sys/stat.h> and _mkdir("out") with mkdir("out", 0777);

christianp, (edited ) to random
@christianp@mathstodon.xyz avatar

I have a question: is it true that macros of the form @name are interpreted differently if you include a file with \usepackage{package} instead of \input{package.sty}?

With \input{package.sty}, I get "Command @ already defined" when it reads "\newcommand{@college}"

(I didn't write this file, I'm trying to get it to compile)

jix,
@jix@mathstodon.xyz avatar

@christianp In both cases you can still use \makeatletter and \makeatother to manually switch how @ is treated IIRC

aeva, to random
@aeva@mastodon.gamedev.place avatar

Something I think about a lot is how your nerves have propagation latency, and so the way your brain reconciles important signals with a range of lag to make it all feel simultaneous is it simply fudges your perception of time to make it all make sense.

I think it would be interesting if someone made a game that simulated having perfect reflexes by keeping a running snapshot of the game sim for say 10 frames so when you attack something it can project the attack back in time by 100 ms.

jix,
@jix@mathstodon.xyz avatar

@aeva Just a few days ago I watched this GDC talk about how to do that in a fighting game to hide networking latency when it made it to my timeline:

https://mastodon.social/@pervognsen/111188187303812495

Might all be old news for someone actually doing gamedev, but while I was aware of the general snapshot and replay approach I had never thought about how to do that in practice in a context where latency matters.

gsuberland, to random
@gsuberland@chaos.social avatar

mad props to anyone with ADHD who managed to get through a PhD. a years-long self-driven project with long-form writing and lots of paperwork sounds purpose-built to torture ADHD people.

jix,
@jix@mathstodon.xyz avatar

@gsuberland Yeah! I dropped out of a PhD program around 1.5 years in. I got diagnosed and started medication before that when I was supposed to do my BSc thesis but somehow couldn't despite being super excited about every topic I picked. After diagnosis I managed to finish my BSc and for a while was more optimistic about staying in academia, but that didn't last too long....

For me it wasn't actually the years-long self-driven project alone that was torture ... but the years-long self-driven project while also having various obligations mostly unrelated to that project + needing to get a small number of course credits to qualify without a MSc (+ an advisor that turned out to be quite toxic but that might have saved me from wasting more time there).

A few years later I actually did a self-driven research project (which got cited in TAoCP, so I feel confident in saying that it indeed was serious research even though I never tried to get it properly published because that'd be much harder for me than the actual research, writing it up at all was hard enough), but I don't think I could have done that or anything close to that if I had tried to stay in academia...

So yeah, I have a lot of respect for anyone with ADHD who managed to complete a PhD

TheQuinbox, to math

Blind math students, how do you handle matrices? I've gotten this LaTeX:
$$\begin{bmatrix}
-8 & 3 & 5 & 0 & 33 \
-3 & 1 & 2 & 0 & 12 \
7 & -2 & -5 & 1 & -26 \
4 & -1 & -3 & 0 & -15 \
\end{bmatrix}$$
It works, but is kind of hard to follow. Is this one case where Braille is helpful? Is there some sort of tool to help visualize where numbers are in relation to each other, and other spatial info? Or do I just have to grit my teeth and try to power through the LaTeX?

jix,
@jix@mathstodon.xyz avatar

@TheQuinbox Would it help to have the matrix as an HTML table? I'm reading that screenreaders do support cell based navigation, including reading out the row and/or column headers when moving between cells, and I imagine that would help with the spatial relation between the matrix entries.

Copying an HTML table into a spreadsheet for interactive editing also seems to work.

I quickly hacked together a website that performs such a conversion, so you can try this: https://files.jix.one/t/latexhtmltable.html

It uses JavaScript, but is self-contained, so if you save a local copy from your browser, that copy still works and then doesn't require an internet connection.

If this is almost useful, but would be better with some small changes, let me know.

If this isn't useful at all for you, don't worry about me having spent time on this. It was a good opportunity to read up on HTML table accessibility and refresh my JavaScript.

azonenberg, to random
@azonenberg@ioc.exchange avatar

Reworked all the bridges on the ESD diodes that I found during initial visual inspection, and tidied up a few bulk caps.

Did continuity tests to sanity check on each power rail and nothing is shorted.

Gonna start populating the front side after the little one goes to sleep. Should go faster than the back since it's mostly large ICs not hundreds of 0402s.

jix,
@jix@mathstodon.xyz avatar

@azonenberg I quite like https://hedgedoc.org/ (formerly known as CodiMD/HackMD CE)

It's a realtime collaborative markdown editor, so not WYSIWYG but with a side-by-side realtime preview. I consider that an advantage for most of my use cases. Getting formatted and/or structured content out of an etherpad lite into something else used to be somewhat annoying, but is trivial with markdown.

No experience with hosting it myself, but I also haven't heard any complaints from people I know that host one (who mostly moved away from etherpad lite).

gsuberland, to random
@gsuberland@chaos.social avatar

lmao it just finished right this second.

it reckons the minimised version of this definite integral is... 0.00186059

uh. I don't think that's right.

jix,
@jix@mathstodon.xyz avatar

@gsuberland What are the constraints on n and y?

azonenberg, to random
@azonenberg@ioc.exchange avatar

Well, I think I actually pulled it off! As usual the math was scarier than the implementation.

I now have a formally verified BSD-licensed Hamming(72, 64) SEC-DED FEC IP. Single cycle latency for both encode and decode, although I may add a pipeline register to the decoder depending on how timing works in hardware.

Properties proven:

  • Decoder output matches encoder input if zero or one bits are flipped in transit
  • Correctable error flag is set iff one bit is flipped in transit
  • Uncorrectable error flag is set iff two bits are flipped in transit

I'm pretty sure that's a full formal specification of a SEC-DED code.

Code: https://github.com/azonenberg/antikernel-ipcores/tree/master/fec

Proof: https://github.com/azonenberg/antikernel-ipcores/tree/master/tests

SystemVerilog source code snippet (from linked GitHub page) showing the formal properties proven on the code

jix,
@jix@mathstodon.xyz avatar

@azonenberg Looks good to me now

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