Hacker Newsnew | past | comments | ask | show | jobs | submit | xipix's commentslogin

You can't use spaces to align because you can't assume a monospaced font will always be used. You can't use tabs either for that matter. If you need structure, use the language's punctuation and line breaks.


I can and do assume a monospaced font when using spaces to align code. Folks using variable width fonts will get what they deserve.


Really please stop aligning with spaces!


You can use tabs, that’s exactly their role, but only in theory since in practice elastic tab stops that would work with proportional fonts aren’t implemented anywhere in code, only word processors


no, i can't. i want to be able to align on arbitrary columns, not on tab stops. and when i add or remove character that break the alignment, tabs mess everything up. spaces don't.


No, you can't do that with spaces because spaces have a fixed width, which can't always be aligned to a variable width column. Only in the primitive environment of fixed width fonts does this work, but even there the tabstops can also be placed at an arbitrary column position, check Word out


anyone writing code with variable width font deserves the hell they put themselves in.


Sticking to historical limitations can be kind of silly. I used to have a computer with 40-column text display, and I don't feel any need to limit myself to that anymore.


i agree with you in principle, but i am not sure that this is simply a technical limitation. it feels to me more than just a preference. i can't explain it, but looking at the apple systems font example in this article: https://storck.io/posts/proportional-programming-code-fonts/ i find it much harder to parse (visually scanning the structure) than the monospace one below. perhaps it is simply what i am used to. but i feel like i am having a more violent reaction than i should have if mere preference and habit were the issue.

perhaps the issue is the specific choice of fonts. the author in that article exclaims that if you allow proportional fonts then any font can be a programming font, while the author of the following post claims otherwise and set out to make their own proportional font that is suitable: https://timgord.com/2024-01/lisnoti-a-proportional-font-that... . there are other such projects like https://input.djr.com/info/ and https://go.dev/blog/go-fonts

one issue is that of distinguishing similar characters, which the above projects try to address while some people claim it's not an issue at all: https://alexkutas.com/posts/non-monospace-font

there is also the issue of alignment mentioned in the first article, that could possibly be addressed by limiting character widths to multiples of the smallest width.

but there is still the issue of interacting with other programmers, mentioned in this article: https://nelsonslog.wordpress.com/2021/09/12/proportional-fon... we would all have to agree on the same font if there is any kind of alignment needed apart from indentation. right now we can say that you can choose any monospace font, and things will look as intended, but with a proportional font things will look different depending on the font choice. whether that is an issue or not needs further study i think.

more discussion of pros and cons can be found here: https://stackoverflow.com/questions/218623/why-use-monospace...


I definitely do not enjoy the font choice in your first link. The Go font has been pretty good for me. My editor is configured to use "Go" (not "Go Mono"), I don't even notice when I switch from editing prose to editing code.

"Distinguishing similar characters" is just as much of a concern for me when I'm editing technical documentation as when I'm editing source code. Once again, the Go font has served me well. Previously I used some other humanist style font from from the Ubuntu people that had that classic IBM slash-through zero. Some fonts have overly-aggressive ligatures and such, but those fonts should not be used in any technical context, source code is not special.

Alignment is a non-issue because wanting alignment is bad. There, solved that ;-) Arbitrary diff noise over multiple lines because you added one line at the end is a problem, not a goal!

I interact with other programmers just fine. Your linked article seems to be re-engaging in the tabs-vs-spaces flamewar in an era of gofmt rustfmt et al. It's a total non-issue.

Give it two weeks.


Can it handle "nodes" that emit a different number of audio samples than they consume?

I'm thinking of time stretch effects like mine https://github.com/bungee-audio-stretch/bungee


It's basically just a wrapper around WebAudio, I've generally just used the builtin nodes, but I think you could do sample-level processing with this? https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkle...

love the demo https://bungee.parabolaresearch.com/change-audio-speed-pitch

have you thought about wrapping it as an audio unit or vst via juce/clap/iplug so its usable in a daw?

https://juce.com/ https://cleveraudio.org/developers-getting-started/ https://github.com/iPlug2/iPlug2


Nice analysis, for 1x playback speed. If you're playing back at a different speed, for example, for music practice, YouTube audio is awful.

Why doesn't this huge AV platform use a better audio time stretch algorithm?


I think time stretching is done natively by your browser, not by Youtube at all. I use https://github.com/igrigorik/videospeed on sites...allows any media to be stretched. Did you try another browser?


That's no excuse for YouTube because (a) audio processing can be done in JS/WASM and (b) they have the influence to improve browser playbackRate implementations to something better [1].

Besides, their Android and iOS apps do slow music as bad if not worse than on web.

[1] https://bungee.parabolaresearch.com/compare-audio-stretch-te...


> audio processing can be done in JS/WASM

If there's reason to believe this is a useful way to handle time stretching, then there's reason to believe the same browser could do it natively just fine.


There is no reason to believe that browsers do it just fine if you have evidence for the contrary.


Which one in that list is better than the default one in Chrome? What media serving sites that you know of intentionally don't use native browser APIs?


Because this is such a niche use the number of users taking advantage of this "feature" would be so small as to not get anybody a promotion


Changing playback speed is a heavily used feature. They’ve also refined it several times, recently adding 0.05 speed increments not just 0.25.


took me a while to recognize you can long press on mobile yt to 2x, maybe even more than 2x but I ain’t figured out the finger incantation


Keyboard commands still make it jump in 0.25 steps.

Does anyone know a youtube-frontend that lets me change the playback speed in smaller steps using keyboard?


How did you become this convinced that it's some niche, unused feature? I'd go as far as to say it's essential. So many videos, especially of courses, out there that really need that 1.25x playback rate boost.


The niche was for the people using YT to learn to play a song. You’re now applying to something else, so that’s a bit of goal post moving.

Also, your use of need is odd as well, and seem to have convinced yourself that the world is wrong and only you’re right. If it needed, the creators would have made it that way


> Also, your use of need is odd as well, and seem to have convinced yourself that the world is wrong and only you’re right. If it needed, the creators would have made it that way

It's called having personal experiences and an opinion. You should try them sometime. It's almost as if appropriate tempo was in the "eye" of the "viewer", and so I was very clearly not suggesting my needs and essentials are universal objective truths in the first place. Getting extremely tired of having to insert "I think", "I believe", "in my opinion" to signal subjectivity in what - I think - are ostensibly subjective contexts, just so that I can avoid subsequent bikeshedding like this.

> You’re now applying to something else, so that’s a bit of goal post moving.

This will be crazy I know, but instead of this delightfully malice-assuming explanation, I simply missed the words where they said "music practice". Didn't help that "timestretch for music practice" is not a feature of YouTube, only timestretch is (as part of the playback rate adjustment feature), so when you were (according to my personal impression of the wording of your previous comment) generally addressing the feature, I replied in kind.

If I was being extra prickly, I'd accuse you of intentionally writing in a way so that you could accuse me of strawmanning you later (goalpost moving is a very loose fit here) for an easy dunk, but of course as someone who reaches for fallacies immediately, you wouldn't do that, right?

This is what distrust sown between people, as well as just plain not being able to know your discussion partner looks like. It's been increasingly frustrating me, and it looks like it's having an effect on you too.


> If I was being extra prickly, I'd accuse you of intentionally writing in a way so that you could accuse me of strawmanning you later

That’s the most bizarre comment I think I’ve ever seen. You didn’t have to reply to my comment. You’re now saying that I assume that the reading comprehension of everyone is so bad that I make comments specifically as gotchas. WTF is that logic? People that post comments in threads without taking the whole thread into consideration are like people that butt their way into a conversation based on the last sentence heard. It never goes well. It’s called social etiquette.

Just admit you didn’t read the full thread and that based on now understanding the full context of the conversation that your comment is out of place and have a nice day


It's also basic etiquette to not assume malice or that the other party is lying, but you explicitly and proudly continue to fail at that. So it's a bit tough for me to accept criticism from you regarding this.

> the reading comprehension of everyone is so bad

No, I am not saying this. This is just your headcanon, it is not even a remotely necessary presumption to have.

> You didn’t have to reply to my comment.

I felt compelled to after being told that I'm "moving goalposts". Obviously. Again, a subjectively perceived need.

> based on now understanding the full context of the conversation that your comment is out of place and have a nice day

Even with the additional context your original comment still rings unreasonable and self-absorbed. It is true however that I do not need you to explain why anymore. Have a nice day indeed.


Its the browser that does this on the client, not YouTube on the server.


Let's be fair, for anything music related, you'll be doing 1x speed... higher than that is usually speech only, where it doesn't matter as much.


If you're learning guitar, drums, piano, trumpet, etc, you'll want to start playing along at about 75% speed then work up until you can play 110% faster than you need to. YouTube's built in audio time stretch makes this a painful exercise.


What's the benefit of learning to play faster than you need to? I understand wanting to play slower, but why faster?


You want to play within your abilities, not right at the very edge of them. This technique nudges the edges out.


Fair enough. Never heard this technique before. Note that such a technique wouldn't translate to other skills like dancing, singing, sawing a piece of wood. Doing those things faster I can't imagine would be of any help in improving how you do them at normal speed.


Reliability builds on skill redundancy.


> Fun fact: Unlicensed stations began streaming jungle music from onboard ships off the coast of Britain, hence the expression "pirate radios."

Didn't pirate radio broadcast from boats predate Jungle by about 20 years?


It's weird things like using "streaming" instead of "broadcasting", let alone the fact by the time Jungle was invented pirate radio was no longer happening on the seas but had moved to having the "studio" in one high rise block of flats with a point to point link to the actual broadcast site on another, coupled with the general structure and other fantasies makes me question how much of this was LLM generated. I couldn't continue reading after a while.


Hi there. Author here. Thanks for the heads up. I would never even consider using LLMs for this, this is just a subject that was always interesting to me so I thought it would be a good idea to write some of it down. Some of these mentions look like shortcomings of English not being my first language; I'll try to review it and change the words or terms that you suggested.


From the mid 60s


Two thoughts.

Suppose I deem it safe and useful for my 6yo to drive for a while, using his Xbox controller from the passenger seat.

It is illegal in many countries for a device (or anything else) to obscure any part of the driver's forward view (area swept by wipers). So even without actually controlling the car, we have an unlawful vehicle.


I'd be even more gleeful if I was in car insurance. "Openpilot's not covered, your insurance is invalidated."


Most likely not legal to invalidate in EU. There is laws that’s say that ev everything you can do manually, you are allowed to automate. Any rules against that is null and void.

The “horse winning race” case is a known one where they go into this.


Geico will cover you. You can disclose ahead of time that you have an aftermarket ADAS if you want. If it drives you off the road, it will be as if you drove off the road and you will be declared at-fault, of course.


Insurance is a non-issue with openpilot.


Has that been tested in court? In my jurisdiction?


Many OP users have asked insurance about it and gotten the a-okay. Believe it or not insurance likes safety devices.


Neat, love it.

Now try synchronising the music to the game.

You could use our Bungee library for the audio processing.


Bungee is our audio stretching library. It can change music tempo and pitch effortlessly in real time on all common devices and browsers.

Bungee is unique in its quality, performance and controllability. Every media player, DAW, video editor should use something like Bungee for smooth scrubbing and audio slomo.

Try it with one click: https://bungee.parabolaresearch.com/bungee-web-demo

So far we have several licensees of the Pro edition with more on the way.


The biggest challenge here isn't the tech/standards problem.

It's what this signals for the future of the planet's climate.


Indeed. Just reduce the number of flights already. That should give room in your 4-digit space.


The correct solution to this optimization problem is to write the integers raw, not as ASCII.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: