@mathr@post.lurk.org
@mathr@post.lurk.org avatar

mathr

@mathr@post.lurk.org

making art with maths and algorithms

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

annika, to random
@annika@xoxo.zone avatar

Just laughed out loud at this poll where out of 5 issues, British people regard Environment as the least important (not to single out the Brits here, I expect this is common across "The West")

mathr,
@mathr@post.lurk.org avatar

@annika looks like they sum to more than 100% ?

mathr, to random
@mathr@post.lurk.org avatar

Just some playing around, hopefully will have time in a month or so to resume work on Fraktaler-3 v3...

yaxu, to random
@yaxu@post.lurk.org avatar

What are some nice tracks that have everything hard panned either left or right? Particularly tracks beyond the early stereo era when crazy panning was the default. Orbital's input out is one example but there must be more examples.. People should do this more

mathr,
@mathr@post.lurk.org avatar

@yaxu not sure if this is what you're after, but classic Amiga hardware has 4 sound channels, hard-panned in pairs. so maybe raid Aminet for MODs?

freebliss, to random
@freebliss@post.lurk.org avatar

musing on reducing server cost and resource usage: 1) Faircamp generates the site without any download files/archives at all (only streaming assets are written to the build directory). 2) Instead it generates an additional local/client-side directory - not to be deployed - that contains all releases for download with torrent files. 3) Visitors on the faircamp site can exclusively download releases via torrent/magnet links, and the artists seed the downloads from their own machine (whenever they're online).

Nothing about this is new (on the contrary - file sharing renaissance galore :)), but I really like the idea of mashing up a (cheaper and less resource-demanding) always-on streaming server with a P2P download delivery mechanism (which is entirely re-using existing computers and infrastructure, i.e. avoiding data center proliferation and idle infrastructure). Also fans are downloading music directly from the artist then - literally from their computer. ^^

(Thoughts anyone? Note that this would of course be an additional option, not a replacement of how faircamp handles downloads so far)

mathr,
@mathr@post.lurk.org avatar

@freebliss this is a feature that would make me investigate faircamp rather than rolling my own probably inferior version

what about an option for torrent webseeding for those with server bandwidth to spare? using the same URL as direct downloads (I suppose) to avoid duplicating the storage or needing special web server config

mathr, to random
@mathr@post.lurk.org avatar

@toplap

the forum seems broken... accessing from Firefox ESR on Debian Linux (both regular session and fresh private window)

https://forum.toplap.org/

> error 500

> Oops

> The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience.

> Detailed information about the error was logged, and an automatic notification generated. We'll take a look at it.

> No further action is necessary. However, if the error condition persists, you can provide additional detail, including steps to reproduce the error, by posting a discussion topic in the site's feedback category.

suricrasia, to random EN
@suricrasia@lethargic.talkative.fish avatar

how would you design a non-random, perfect information strategy game such that it can be implemented as a plastic mechanical contraption with no loose parts, so that you can take it while travelling and not have to worry about losing parts or running out of battery?

mathr,
@mathr@post.lurk.org avatar

@demofox @suricrasia oh I was thinking of a gaming device for two human players to use rather than a non-human adversary...

yaxu, to random
@yaxu@post.lurk.org avatar

Your annual reminder that music tech only defaults to 60 or 120 bpm to make the software easier to debug (as seconds align with beats), and that those bpms often sounds bad

mathr,
@mathr@post.lurk.org avatar

@yaxu 240 on the other hand

csepp, to random

Aaand I'm downloading another copy of the whole LLVM repo because WASI-SDK pulls is in as a Git submodule. Fuck dependency vendoring tbh. 🙃

mathr,
@mathr@post.lurk.org avatar

@csepp I had some fun times debugging crashes when combining PoCL (which used LLVM version X) and Clover (which used LLVM version Y) in the same program... Stack trace showed X calling into Y or vice versa.

That was with Debian packages, eventually it got fixed in Debian by making them both use the same LLVM version.

Just hoping your multiple versions don't conflict in unfortunate ways...

mathr, to math
@mathr@post.lurk.org avatar

A question[1] asked about a fast reciprocal square root implementation using binary floating point format magic number, following the famous trick in Quake 3, but extended to higher precisions.

The paper linked in the question is pretty good, I managed to grok the first part (finding magic exponent), but haven't found a good way to implement the second part (finding magic mantissa) yet (I'd need to implement minimisation of a function that has square roots, in high precision). Luckily the paper provides the magic mantissa to sufficiently many digits.

Using a float128 magic number, plus 5 iterations of Newton's method, gets an accurate reciprocal square root. Hooray!

However, it turns out to be pointless: it's both faster (about 2.3x in my test) and more accurate (denormalized numbers are handled correctly) to range-reduce float128 to float32, use the float32 trick, and use mixed precision Newton's method (ending with 2 iterations at float128).

But even that is pointless, unless perhaps if stopping early with an approximate result is the goal, because 1/sqrtf128(x) is 3.1x faster than my mixed precision implementation.

Everything tested with glibc on AMD 2700X CPU, with gcc version 12.2.0 (Debian 12.2.0-14).

[1] https://math.stackexchange.com/questions/4785346/is-there-still-a-fast-invsqrt-magic-number-for-float128

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

I'm really bad at programming... so:

Could someone work out the continued fraction expansion of ln(3)/ln(2) and use it to generate a bunch of good rational approximations of this number? Wolfram Alpha easily gives me the continued fraction expansion below, but for music theory I want the rational approximations it gives.

Like this:

1 + 1/1 = 2
1 + 1/(1 + 1/1) = 3/2
1 + 1/(1 + 1/(1 + 1/2)) = 8/5

The last one means that in a 5-tone equal-tempered scale, going up 8 notes is close to going up an octave and a fifth. This is one reason the 5-tone equal-tempered scale, called a pentatonic scale, is popular in places like Bali.

1 + 1/(1 + 1/(1 + 1/(2 + 1/2))) = 19/12

This means that in a 12-tone equal-tempered scale, going up 19 notes is close to going up an octave and a fifth. This is one reason the 12-tone equal-tempered scale is popular in the West - and by now everywhere!

What comes next? Well, I worked out the next one, but I'd really like to see dozens more of these fractions.

Also: if you're a number theorist, maybe you know theoretical results about how good these approximations get, i.e. how close to ln(3)/ln(2) a fraction with denominator N can possibly be. I fear only the usual facts are known, e.g. there are infinitely many fractions M/N in lowest terms such that

|ln(3)/ln(2) - M/N| < 1/N²√5

This is true for every irrational number, not just ln(3)/ln(2):

https://en.wikipedia.org/wiki/Hurwitz%27s_theorem_(number_theory)

By the way, the continued fraction expansion I'm getting from Wolfram Alpha is

[1; 1, 1, 2, 2, 3, 1, 5, 2, 23, 2, 2, 1, 1, 55, 1, 4, 3, 1, 1, 15, 1, 9, 2, 5, 7, 1, 1, 4, 8, ...]

in the usual shorthand. So, when we get to 23 and 55 we should get equal-tempered scales with really accurate fifths.

mathr,
@mathr@post.lurk.org avatar

@johncarlosbaez

a quick haskell hack

import Data.List (inits)

log_2_3 :: [Rational]  
log_2_3 = [ 1, 1, 1, 2, 2, 3, 1, 5, 2, 23, 2, 2, 1, 1, 55, 1, 4, 3, 1, 1, 15, 1, 9, 2, 5, 7, 1, 1, 4, 8 ]

cf :: [Rational] -&gt; Rational  
cf [] = 0  
cf [n] = n  
cf (n:ns) = n + 1 / cf ns

main :: IO ()  
main = mapM_ (print . cf) (inits log_2_3)  
johncarlosbaez, (edited ) to random
@johncarlosbaez@mathstodon.xyz avatar

If you draw all roots of all polynomials whose coefficients are ±1, you get an amazing picture that raises lots of challenging puzzles!

I really hope someone reads our short article:

https://www.ams.org/journals/notices/202309/rnoti-p1495.pdf

and solves the main puzzle: why do the fractal regions of this set look so much like "dragon sets"? We have a good heuristic explanation, but no proof yet.

People sometimes get excited about math when they learn about fractals, and then disappointed when they discover rather few professional mathematicians prove theorems about fractals. If you ever wanted to prove a cool theorem about fractals, this could be your chance!

If you read part 2, I'll show you what I'm talking about.

(1/2)

mathr,
@mathr@post.lurk.org avatar

@johncarlosbaez IIRC when I played around with drawing this fractal some years ago, I didn't calculate roots of polynomials at a fixed degree, but eliminated regions (pixels) that couldn't possibly contain a root of any series extended from a given finite prefix (with the number of distinct prefixes limited in practice by GPU memory).

I have no idea if this approach generates the same mathematical object in the limit, but it looked similar to my eyes.

https://code.mathr.co.uk/littlewood has probably bitrotted

mathr, to random
@mathr@post.lurk.org avatar

passing on...

Moving Image Festival for submissions

> Open call for one second movies and long off takes
> This year's theme suggestion is "Colour your dreams".

deadline October 10th, 2023

https://noemata.net/one-off/2023/

mathr, to random
@mathr@post.lurk.org avatar

passing on (belatedly)....

"Parallels" for submissions

deadline (no extensions) September 17th 2023

https://taper.badquar.to/10/about.html#submit

mathr, to art
@mathr@post.lurk.org avatar

Started a new series of #Mandelbrot #DeepZoom #fractal #art pieces.

Concept: stop zooming once the period of the central baby Mandelbrot set exceeds one million.

https://mathr.co.uk/web/millionaires.html#001

mathr, to random
@mathr@post.lurk.org avatar

tried Vosk (Python-based speech to text) on a field recording. mostly nonsense, as expected...

68
00:09:47,310 --> 00:09:47,880
sounds

mathr, to random
@mathr@post.lurk.org avatar

As seen on pd mailing lists, 0.54 is released

selected highlights:

  • Multichannel audio signals are supported for many objects. They may be created or split into component channels using the new [snake~] object.

  • [sigmund~] pitch tracker improvements

  • 64bit Windows build uses lower latency API limited to Windows 7 and newer. The 32-bit version
    can still run all the way back to Windows XP.

full changelog at http://msp.ucsd.edu/Pd_documentation/x5.htm#s1

yaxu, to random
@yaxu@post.lurk.org avatar

So it turns out if you order something from ebay, the seller uses the worst courier ever (evri aka hermes) who deliver the parcel into your recycle bin without leaving a note, which then gets collected.. That's your fault and you don't get a refund?

mathr,
@mathr@post.lurk.org avatar

@yaxu not my joke, just heard somewhere long forgotten: they're called evri because evri parcel goes missing

mathr, to random
@mathr@post.lurk.org avatar

Debian Bookworm host with Debian Etch chroot. Got xterm working (running in chroot displayed on host) using xchroot but glxgears fails with BadValue in GLX X_GLXCreateContext. Tried with ssh X forwarding (had to enable old algorithms on client), same error. glxgears works fine on host,

Next I'll try building with static linking and copying the binaries across to new OS. Unlikely to work as some dependencies are from the distro...

Then I'll try building the old dependencies of the old software (some of which I had to get from the wayback machine) on the new OS. The old program built ok on the old OS but running failed for the same reason as glxgears...

mathr,
@mathr@post.lurk.org avatar

Debian Bookworm host with Debian Bookworm chroot : glxgears works fine.

Rebuilding on Bookworm source debs from Etch is tricky as C++ compiler is different. Need to patch to add missing includes and other issues (eg return false as a pointer is no longer allowed).

mathr,
@mathr@post.lurk.org avatar

66mins in, a debuild failed because I put freetype-config in /usr/local/bin which must have been removed from PATH. Symlink in /usr/bin did the trick.

mathr,
@mathr@post.lurk.org avatar

Old software built on new OS, finally. Segfaults at runtime. Giving up for today..

mathr,
@mathr@post.lurk.org avatar

Progress at last.

Archive from author's website (source plus plus compiled binary objects), instead of a bzr source repository from Launchpad.

bookworm i386 chroot on bookworm amd64 host. Added etch to sources.list and installed dependencies.

Configured ARToolKit to use Video4Linux, no assembly code, yes debug symbols, yes texture rectangle; run make. Rebuilt the prebuilt osgart_artoolkit.so against it. (The default was gstreamer which I could not get to work correctly.)

Changed run script to use v4l with correct video device etc. Run with LD_PRELOAD v4l1compat.so and v4l2convert.so

Webcam is displayed with incorrect colours (my arms are tinted blue). Not sure if an RGB/BGR or RGB/YUV issue, probably not very important?

Need to print the markers to continue testing - will try on matte pastel-coloured card as I have some spare...

mathr,
@mathr@post.lurk.org avatar

I finally got @JulianOliver 's augmented reality spatial memory puzzle game levelHead (from 2008) working at home on my netbook.

https://julianoliver.com/levelhead/

Still some issues with my configuration that I need to resolve (webcam and/or screen is not mirrored making it unintuitive to control, webcam colours are wrong, aspect ratio is stretched, fps is low due to me using weak hardware, installation method had many false starts), so I want to try on a different more powerful machine and come up with a reproducible recipe.

Tip for printing the foldable cube SVGs with AR markers: modern SVG renderers interpolate the marker bitmaps into mush. Open each SVG with Firefox, open developer tools (ctrl-shift-k) style sheet editor, add stylesheet with rule "* { image-rendering: pixelated; }", then print to PDF.

mathr, to random
@mathr@post.lurk.org avatar

Taper is an online journal of browser-based computational poetry with size constraints, all free/libre open source software. Issue came out yesterday:

https://taper.badquar.to/10/

I have a piece in it called Ten Dust Tree:

https://taper.badquar.to/10/ten_dust_tree.html

View each page source in your browser to see the code and artist statements of each piece.

celesteh, to random

Is my dad dying? Nobody knows!

mathr,
@mathr@post.lurk.org avatar

@celesteh I'm so sorry.

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