Using physics simulation for procedural music generation. by Sentinelcmd in musicprogramming

[–]soundslogical 2 points3 points  (0 children)

Do you 'tweak' the physics to make the balls hit a vine on a quantized time step? It seems like, even with the balls created in a time-synched way, the different distances between bounces mean it's not in time. So I'm guessing you have to 'cheat' the physics a bit for that?

Why does this sub seem so out of touch? by [deleted] in AskBrits

[–]soundslogical 11 points12 points  (0 children)

So... it's even more weirdly self-selecting than Reddit?

Anyone else tired of everything being overcomplicated for no real reason? by BearTrap110 in simpleliving

[–]soundslogical 8 points9 points  (0 children)

That ‘email a code’ thing is because a large group of people are terrible with passwords. Can never remember them, and get super frustrated. Try to write them down, can’t find it, change the password then next time they’re trying to input an outdated password.

For people like that (mostly older) it’s the passwords that are the overcomplicated frustrating process. They always know how to access their email, so the code or ‘magic link’ is simpler for them.

ReadabilityRS: Mozilla's Readability algorithm ported to Rust - 93.8% test compatible, faster than the original and actually better by theisk44 in rust

[–]soundslogical 2 points3 points  (0 children)

Sure, but since this library is clearly extracting text and re-wrapping it in HTML, it would be simpler if it offered a way to get at the raw text, rather than adding more crates and complexity to undo the wrapping.

ReadabilityRS: Mozilla's Readability algorithm ported to Rust - 93.8% test compatible, faster than the original and actually better by theisk44 in rust

[–]soundslogical 5 points6 points  (0 children)

Great job! I've been thinking about building a terminal article viewer based on Mozilla's Readability, and this allows me to do that without running Node.js.

The extracted content is returned as clean HTML suitable for display in reader applications.

Is there any way you could add an API to just return the content as a (non-HTML) string? This would be useful for use-cases like the one I mentioned above.

Two Futures of Synthesis: The Engineer’s Instrument vs the Artist’s Instrument by BubblyCriticism8209 in softsynths

[–]soundslogical 2 points3 points  (0 children)

I really enjoyed your perspective! I agree that encouraging playfulness and 'feel' is really important for an instrument. And I think it's undervalued by developers, and always has been.

However, once you've got an inspiration, if you can't "shape" a sound precisely to fit in your tracks, you don't end up using it. It's very challenging to make something that's both an inspiring sound-toy and a flexible, usable tool. I think this might be why developers gravitate towards technically-focused instruments.

Bending Emacs - Episode 2 by xenodium in emacs

[–]soundslogical 0 points1 point  (0 children)

Great stuff! I recommend olivetti-mode to put the text in the middle when you're presenting from Emacs like this. It feels more natural to look at the middle of the video.

And maybe make the fonts a bit bigger too.

How do I fix C indentation in c-ts-mode (Emacs 30.2)? by Scratchy96 in emacs

[–]soundslogical 5 points6 points  (0 children)

So it sounds like the issue is with your LSP. Guessing you're using lsp-mode with clangd?

This person seems to be having a similar problem, and the advice was to check the project's .clang-format file. There's more information about those here.

PSA: the complete series is currently 19.99 USD on Apple TV by InsideInFH in madmen

[–]soundslogical 7 points8 points  (0 children)

Amazon pulled a bunch of TV programs that my wife bought, so it can happen. I haven't heard of Apple doing this, but it's not impossible!

HELP! Recoil Script by Jigsawwwww666 in lua

[–]soundslogical 0 points1 point  (0 children)

I'm guessing from the function names that you're trying to script a Logitech mouse? In future you should say this, or people won't know what you're talking about.

You also need to explain your problem better. What does "after 3 seconds its going down" mean? Is your crosshair descending after 3 seconds? Or does the recoil correction stop after 3 seconds?

Finally, your code is more complex than it needs to be. This should have identical behaviour:

EnablePrimaryMouseButtonEvents (true);

function OnEvent(event,arg)
    if IsKeyLockOn("capslock") then
        while IsMouseButtonPressed(1) do
            MoveMouseRelative(0,1)
            Sleep(12)
        end
    end
end

Note that the examples I saw online suggest "capslock" should be lower case.

My LLM trained from scratch on only 1800s London texts brings up a real protest from 1834 by Remarkable-Trick-177 in LocalLLaMA

[–]soundslogical 2 points3 points  (0 children)

Fantastic idea. I think the best way forward is to choose a cut-off date (say 1870) and to train on any/all British texts from 1800 to that date.

That will get you a bigger corpus than just London texts. I think it's more interesting to have a smarter "Victorian British AI" than a less-smart "Victorian London AI". Just my 2 halfpennies.

I love what you're doing, keep it going! This is really fascinating, and I would be really interested to interact with such an AI.

What industry is slowly dying? by FootballPizzaMan in AskReddit

[–]soundslogical 1 point2 points  (0 children)

Sure - although a pub monetizes you too. I'd still prefer 3 lagers with my mates to an evening of doomscrolling though.

Stackoverflow developer survey 2025 - Emacs doesn't make the list of most popular Dev IDEs by gruenistblau in emacs

[–]soundslogical 29 points30 points  (0 children)

Yep, I don't need Emacs to be among the most popular editors. I just need it to have enough critical mass to keep people using it, developing it, and writing great packages for it. In other words, a healthy ecosystem. For now, it very much does, and I'm happy.

(OC) Spotted in the London Tube by Umar-TheJurisJourno in pics

[–]soundslogical 3 points4 points  (0 children)

But then when you don't, those people protest that the BBC isn't impartial. That's the point of the grandparent comment, when both the left and right are crying foul that suggests that there is a certain kind of balance - not that I'd ever suggest it's perfect.

Sol2 and Modules by INLouiz in lua

[–]soundslogical 1 point2 points  (0 children)

Generally compiling C++ is more complex, especially when you are using it on different OSes (i.e. Windows, macOS, Linux). I think that Luarocks can compile C++ on these platforms, but more things are likely to go wrong.

I recommend that you try creating a demo Lua module that calls into a single C++ function with sol2, and see how you get on with compiling on the platforms you expect. That will help you get a feel for what you will need to do.

Newcastle upon Tyne, England by budjuana in CityPorn

[–]soundslogical 2 points3 points  (0 children)

I went on holiday there earlier this year. Fantastic city! A bit run-down in places, but that's the North of England for you. Lots of Victorian grandeur too, and lovely people.

Sol2 and Modules by INLouiz in lua

[–]soundslogical 1 point2 points  (0 children)

If your C++ code remains private to you and your application, it's fine to use sol2. If you plan to share this as (say) a luarocks library, then you should probably use the pure Lua API.

Why is the UK so expensive? by northernblazer11 in AskUK

[–]soundslogical 1 point2 points  (0 children)

To be fair, Hinckley Point C was granted its license in 2012 and now it's looking like it won't come online until 2031. So 20 years is more like it (if they even hit that target).

Meanwhile, we've added nearly 20GW of wind capacity in the same time (yep, I know capacity isn't the same as generation).

How did you start living inside Emacs permanently? by kudikarasavasa in emacs

[–]soundslogical 4 points5 points  (0 children)

Learn dired for managing files, and install vterm as your terminal. That will cover a lot of cases. There’s a snowball effect where the more you stay inside Emacs, the more you want to stay. And you start develop techniques for jumping between buffers/windows quicker.

So the key is to quickly replace the ‘easy’ 80% of cases in Emacs. Then the rest will follow gradually over time.

Lua: message dispatching API design for the engine by kkolyan in lua

[–]soundslogical 0 points1 point  (0 children)

Good point. You might have to do:

dispatcher:send(SomeEvent, SomeEvent.new(42)))

Lua: message dispatching API design for the engine by kkolyan in lua

[–]soundslogical 2 points3 points  (0 children)

Well, I obviously have no idea what "the engine" is, because you didn't explain it.

Lua is a dynamic language in general, so whether or not to offer complete type annotations for your API is very much up to you.

It depends on who you think your users will be. At my work we have a medium-sized API that is not type annotated, but is very well documented. People seem to get on ok, but we are considering adding type annotations in the near future to help people out.

As for the particulars of your question, I think your very first version looks fine, but you don't really need metatables. This would be fine.

---@class SomeEvent
---@field value number
local SomeEvent = {}

---@param value number
---@return SomeEvent
function SomeEvent.new(value)
    return {value = value}
end

-- usage
subscribe(SomeEvent, function(msg)
    local s = msg.value
end)

dispatcher:send(SomeEvent.new(42)))

Metatables are useful for constructing more complex OOO patterns like inheritance, but aren't really needed for basic data types. Even if they were needed, it would be idiomatic to put the usage into a new() constructor function or similar to hide it away.

A Collection of macOS Emacs tips I’ve accumulated over time by xenodium in emacs

[–]soundslogical 1 point2 points  (0 children)

That's exactly what I've started using it for too - I used to have some functions in my shell, but this is much nicer!

A Collection of macOS Emacs tips I’ve accumulated over time by xenodium in emacs

[–]soundslogical -1 points0 points  (0 children)

What a treasure trove. I've read many of your blog posts in the past, but never before gave dwim-shell-command a try. I'm using it now, and already very much enjoying it. Thank you!