Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions

Submissions

comment 6y ago · link · parent

My understanding is that music gets decompressed on the Apple headphones, the original AAC stream is sent over the wire. Most Bluetooth headphones will just effectively transcode the audio, such that for example AAC gets decompressed then recompressed into AptX/LDAC. For music listening, it's completely suboptimal. I use FLAC sources for my Sony headphones which makes them very listenable (along with copious EQ to tame the +5db excess bass). Bluetooth headphones have a lot of room for improvement.

comment 6y ago · link · parent

AptX is lossy compression which when applied to already compressed sources (e.g. Spotify), still gives noticeably inferior audio (it's effectively transcoding). Most people listen to compressed music and so the right thing to do with limited bandwidth is to send the original compressed data over Bluetooth (as Apple/Bose do with AAC). AptX is probably fine if you have non-lossy compressed sources like FLAC.

comment 6y ago · link · parent

This isn't true. It was never as good as Intel's Connman, which was designed to be modular from the start. NetworkManager started out as a UI app and then was evolved into what it is now. It's still not as fast as connecting to WiFi as Connman. I guess it was adopted instead of Connman because RedHat.

comment 6y ago · link · parent

I, personally, wouldn't use VBA at all, ever. I would only consider Excel and Word for very simple use cases. For example, I refuse to use Word for technical documentation. But Office and Excel are everywhere in large corporates; and simple tactical spreadsheets turn into monsters over time. One former employer had a spreadsheet "application" where triggering a sheet recalc (accidentally) would take out an entire grid of machines. I've never been in any position to stop this stuff from happening.

comment 6y ago · link · parent

Yes and "on error resume next" is what I usually see in VBA code

comment 6y ago · link · parent

Yes, every statically-typed language has a dynamic language as a subset. It is up to the author to use and apply types. One can certainly write Haskell where everything is in IO and everything uses Strings.

comment 6y ago · link · parent

If you use String for all your data types than you are no better than a dynamic language. There are many string like things that benefit from their own types, e.g. currency, identifiers, post codes. Such types should only be created from a parse of valid strings, i.e. no empty strings, whitespace, illegal values etc. They do not have to be Alan Kay "objects", despite what your language or thought leadership is telling you. They should be values with value-based equality. A modern statically typed language should let you define such a type in a few lines. This is all done in order to make illegal states unrepresentable, which is what type systems are for.

comment 6y ago · link · parent

The language and notation is inconsistent with hundreds of years of use in maths and confusing for kids learning both maths and programming (at least it confused me).

Regarding your skeptism of immutable data structures, it's best to think of immutable data and data structures as copy-on-write instead of update-in-place. This is a technique that is currently very underused, for example most programming languages do not come with "persistent" copy-on-write collections.

Here is an example text editor built using immutable data structures in C++: https://github.com/arximboldi/ewig

Advantages are excellent support for concurrency (background save works while you edit) and trivial support for undo/redo.

comment 6y ago · link · parent

It's worth pointing out that Haskell has always overloaded the dot. It is used for module namespace disambiguation, e.g Set.fromList

comment 6y ago · link · parent

That's a bad choice of name from one or more old languages that misused established mathematical terminology (e.g. C misuses void, constant and variable). An immutable variable (or in maths, just "variable') has a value that is unknown at build time but is constant at runtime. A constant has a known value at build time.

What nearly every language calls a variable today, is probably better described as a "reference" or "assignable", but sadly that ship has sailed and we'll forever be inconsistent with the math terminology for that one. Immutable variable is therefore a useful synonym for "proper variable".

comment 6y ago · link · parent

Well Brexit caused the pound to plummet and supposedly made ARM tempting. I find it ironic that the current UK Brexiteer government talk constantly about soveignty and control, yet were quite happy to allow this sale.

comment 6y ago · link · parent

Objects don't have to have mutable state. And even if they do, it can be unobservable. This is true "state encapsulation" but the OOP definition of encapsulation does not require this. Such objects are still very useful as "first-class modules", i.e. modules that can be passed around and switched at runtime.

comment 6y ago · link · parent

On my Kinesis Advantage I can type any letter whilst keeping my wrists straight, hands still and with much less finger movement than a regular keyboard. It completely cured my RSI and it hasn't returned in over 4 years. I realise this is anecdotal, but it's not really a surprise that a better key layout leads to less stretching and contortion and less RSI.

comment 6y ago · link · parent

> I don’t know why everyone wants keyboard with a long throw,

Because one does not need to hit the bottom and "shock" the fingers in order to activate the keys. With a mechanical switch the keys can be activated by partially pressing them.

comment 6y ago · link · parent

> What's the difference between mutating state on the inside and hiding state on the inside? Aren't they practically the same?

You can mutate state on the inside, but still provide a "pure" mathematical function on the outside. For example, a root finding solver. The general problem/feature with objects, is that when a method returns, the object may be in a different state (and often is). Such state changes are hidden but not "encapsulated" as they still contribute to the global state of your application. In other words, the global variables are still there, you've just organised them into modules.

comment 6y ago · link · parent

No, the biggest benefit is first-class modules. This is a feature that for example FP languages have struggled to incorporate. "Encapsulation" with OOP is a bit of a misnomer, as state is not encapsulated, it is just hidden. Such hidden state then interferes with composition. With true state encapsulation, a function can use mutation on the inside, but appear pure on the outside.

comment 6y ago · link · parent

I feel like even "soft real time" is too generous for Android.

comment 6y ago · link · parent

That depends on the programming language, for example C# with LINQ and functional programming languages are pretty good at expressing queries. SQL has no capability for abstraction and so only the simplest queries will be succint, if you want to e.g. union two similar queries then you'll have to copy and paste.

comment 6y ago · link · parent

I recommend reading the original "Monads for Functional Programming" paper by Phil Wadler, it's in a tutorial style and IMHO still better than any blog post explanation I have seen:

https://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/b...

comment 6y ago · link · parent

> should the language catch us making a type error here?

With a statically typed language, the choice is up to you. Every statically typed language is just a "dynamically typed" language with the ability to statically assign types. For example, you can type the variable as an "Int" or for more runtime flexibility, a "Variant" (if using C++).

comment 6y ago · link · parent

> people have been conditioned by years of robocalls to ignore out-of-area calls.

This is so true!

comment 6y ago · link · parent

The problem with the Archimedes was that it arrived late on the scene and was very expensive. My school purchased only one; and none of us kids got to go anywhere near it. The Atari ST is what I moved to after my BBC micro, in about 86 or 87.

comment 6y ago · link · parent

The Play Store has very little for tablets. The Android tablet market is effectively dead.

comment 6y ago · link · parent

Because opening pubs was the top priority of the government, not holding exams.

comment 6y ago · link · parent

Many people buy Apple hardware because that's where most of the apps are, especially the iPad. I purchased an iPad for my kids for precisely this reason, and regarding the actual software that Apple provides, I am not at all impressed (e.g. app store is a mess, app approvals for kids is very broken). I am also aware that this extortionate 30% transaction cost is likely being passed on to me.

If I could get all the games and educational apps we use on the iPad on another platform, I would ditch Apple in a heartbeat.

comment 6y ago · link · parent

It's perhaps less important because software can still be installed on Android without Google Play. Don't forget that Apple has already cut special deals with Amazon, so the extortionate 30% is negotiable, if one is big enough to fight.

comment 6y ago · link · parent

> it's not the underlying query language,

SQL and it's implementations do not support nested relations. The parent is suggesting that e.g. nested relations would enable better ORM solutions.

comment 6y ago · link · parent

The "expression problem" from Wikipedia (quoting Phil Wadler):

"The expression problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type safety (e.g., no casts)."

With a sufficiently expressive language, the expression problem can be solved, sometimes in multiple ways. However, the solutions often involve boilerplate, trickery or advanced type system features. A proposed solution to the expression problem may be impractical, but that is subjective and really a separate discussion.

I guess you could view the problem as a sort of lens with which to evaluate a language. E.g. Can this language solve the expression problem and what does the best solution look like?

comment 6y ago · link · parent

This paper on "Object Algebras": https://www.cs.utexas.edu/~wcook/Drafts/2012/ecoop2012.pdf

is a great example of using ideas from functional programming and category theory to improve on the visitor pattern, such that the expresson problem can be solved.

The value of such mathematics is that it enables us to formalise some of these patterns and generalise them.

1
293031
69