Better HN
topnewbestaskshowjobs
Log inSign up

TuringTest

4,482 karma · joined Sep 28, 2012 (14y ago) · 2,100 submissions

Send me a note at turingt+fromhackernews (at) gmail.com

I hope the spam filter will respect it!

Submissions

comment 3y ago · link · parent

If you already know that your model contains falsehoods, what is gained by having a chain of provenance? It can't possibly make you trust it more.

comment 3y ago · link · parent

It only appears simple because the layers of complexity to achieve that effect are hidden under the language runtime, and you're exposed to just the top of the iceberg.

If you had to build the whole runtime yourself from first principles, functional behaviour would be way simpler to define.

comment 3y ago · link · parent

Proof that type systems are nothing else that domain-specific languages that run at compile time. When seen like that, it should be no surprise that they can be coerced to do general computation.

comment 3y ago · link · parent

> Your comparison of mutable programming to the use of goto and unhygenic macros would suggest that mutation is a similar type of dinosaur to be culled.

Then you missed the point, which is that using mutation a.k.a. cells a.k.a. imperative code when it's not needed is a dinosaur to be culled. But you need to understand when it's not needed to realize this.

Functional reactive programming adoption is not something caused by the state of one particular stack; as it is also being adopted by game engines, big data analysis tools, development environments like web notebooks, etc. People throughout the industry are seeing the value and are simplifying their tools thanks to the paradigm.

> Functional programming claims to have abstractions that make the latter more simple than imperative programming, which may or may not be true.

Look, I get it, I really do. You don't see the possibilities of the functional paradigm and don't know how and where to use it effectively, so you keep criticizing the small part of it you do understand. I've been there, done that (though it was a long time ago).

With that attitude you can stay comfortably in a corner and be impervious to the changes the industry is undergoing, and miss out on a really cool programming style out of prejudice. Or you can accept the intellectual challenge (which it certainly is, especially for someone who has spent his entire career with a single style), and know concepts that those who learn them agree that they improve their programming even if they do not adopt them 100% for their work.

It's up to you. I don't gain anything with this, so I will not try to convince you of it.

comment 3y ago · link · parent

> This is a big step down from "All programmers should know and implement purity by default because mutability is the next goto."

Not something I said. I explicitly mentioned the functional core, iterative shell architecture, and explained how you need to understand functional enough to know when it's a good time to not use it.

At this point your posts look like someone making fun of a complex technology they do not understand, without really approaching any valid criticism of its real shortcomings, because such criticism require a thorough understanding of the thing being criticised.

> Functional programming that introduces or models state requires more abstraction, and then complexity.

I'm pretty sure I've said exactly that. Good thing we agree on it. But you don't seem to realize that this fact is only true for handling state, and not for other aspects of programming.

> Imperative programming with state is as simple as functional programming without state.

You've never tried to compose multiple asynchronous event streams of complex data types from different subsystems into one single user-facing unified presentation, have you? Your assertion is simply not true. Such feat is way simpler in functional reactive style, and a true nightmare in an imperative multithreaded program. That's why web frameworks are evolving to handle more and more reactive functional patterns for compositional asynchronous tasks.

comment 3y ago · link · parent

Claiming that functional programming is inherently more complex than imperative is also dishonest. Industry developers that criticise it without understanding the value and strengths of referential transparency are no better than your hypothetical academic groups.

All abstractions introduce complexity in terms of indirection and the need to particularise to different instances. Imperative and functional simply happen to have a different approach to where they place complexity and what parts they simplify.

Imperative makes it easy to update state, but then it forces you to keep in your mind every remote part of the program where your symbols may be modified (which is way harder than most developers recognize). Functional requires more work to keep track of state, but on the other hand it allows much better control of program composition and deep complex hierarchical data transformations.

As they say, use the best tool for each job. It makes no sense to deride a key wrench for being more complex than a hammer and being worse at hitting nails.

comment 3y ago · link · parent

'Purity' is advisable for the same reason that 'not using goto', 'hygienic macros' or 'structured programming' are highly recommended (to the point that nowadays they are taught as THE way to program, and nobody would think to ignore them without a good reason).

Sure you can create good programs without them, and the first developers often did; but nowadays a good programmer is expected to understand why those techniques are relevant and what kind of problems appear if you decide to ignore them on purpose.

For complex modern programs, specially on the web, the 'pure functional core with iterative shell' (possibly imperative, but it can also be funcional reactive) is an increasingly common architecture that the most popular frameworks are converging to.

comment 3y ago · link · parent

> I would really enjoy a class that was nothing but modeling various kinds of computation entirely with recursion.

I had the luck of having a whole semester doing just that with various functional and logic languages (Haskell and Prolog) with a great teacher.

You start by learning accumulator parameters and tail recursion, then you build and learn to use foldl and lazy functions; and then you may learn monads as a design pattern to reduce boilerplate for those techniques.

comment 3y ago · link · parent

Maybe you're thinking of the zipper data structure? [1]

Where you represent the composite structure hanging from the point you want to mutate, so updating that point is merely dropping the header and appending the updated value as a new prefix.

1 - https://en.m.wikipedia.org/wiki/Zipper_(data_structure)

comment 3y ago · link · parent

You can just use the classic temporal logic approach, where state is passed explicitly as a parameter and the new state is returned.

This is what state monads are doing anyway under a hidden syntax, and for simple cases it may be easier that building a full dedicated monad.

comment 3y ago · link · parent

That is unpredictable, but not a side effect. Side effects are changes that are not declared as part of the function parameters.

If you model the controller input as a function parameter, that's just a state argument, and FP can handle it declaratively just fine without having side effects.

comment 3y ago · link · parent

Monads are just one design pattern for handling state, and not the only way. It's no different than having an OOP using dependency injection everywhere - it's a design decision that you use only when it makes architectural sense.

A shell is not more imperative than a processor - both are Turing machines, a completely functional mathematical object. Seeing them as imperative is a semantic interpretation of the people watching it, not an inherent property.

comment 3y ago · link · parent

FP is not stateless, is state-aware. You need to declare what functions handle state, just like in Java you need to declare which functions handle exceptions.

comment 3y ago · link · parent

Faster and simpler coding with less learning wins every time against snappy but esoteric, at least in business applications. It's better for the client, better for the developer and better for the company, even if it doesn't squeezes every processor cycle

The pure advantage of iterating faster on requirements and deploying new functions beats having a very fast but very restricted and possibly incorrect feature set. And if an application takes off, it's always possible to identify its critical path and optimize it for speed, or even re-engineer it starting from a much clear solution to the business case.

comment 3y ago · link · parent

> Isn't it just showing your are in-group and well cultured?

Yes, but that is not necessarily a bad thing. Learning that different groups of people may have their own languages and customs is the first step to being able to blend in with a diverse group; it's great when you're able to adopt a register appropriate to the people you are with at any given moment.

Of course it's also possible that the child learns to be a snob and treating with disdain those who are not in your group. But I would say that's a character trait of the person, and it's still worth having the opportunity to learn how to adapt, rather than being unable to modulate your behavior and only knowing how to have a single posture. Having a culture of acceptance starts with knowing the customs of many different groups.

comment 3y ago · link · parent

The argument is not that you'd run your IDE on the AR device (although there's people who will want to do that).

The point is that you can hack the device to run your software, or distribute your software so that it's easy for others to use it as well, but not both.

comment 3y ago · link · parent

The point is that you're generating diagrams from code that's already been written, you're not modelling, do you? ;-)

Those are a different kind of diagram than the one you create from scratch to decide what goes in the program.

comment 3y ago · link · parent

No, that's purely destructive greed.

Ancient civilizations invented the jubilee (loans should be repaid in 7 years) to prevent speculation on them. But unfortunately, preventing extreme concentration of wealth has fallen out of favour

comment 3y ago · link · parent

If you're creating diagrams with graphvis, you're just coding on another language. The benefits of diagrams appear when you draw them by hand (or graphically by mouse).

comment 3y ago · link · parent

Apples to oranges comparison (no pun intended). SimulaVR aims to be a general computing platform allowing professional "desktop like" workflow, with the performance of a high-end laptop. For what has been revealed, Vision Pro is designed towards tablet-like content consumption.

comment 3y ago · link · parent

No shit. In the Spanish version, the column in Explorer showing the 'link target' of shortcuts is translated to the equivalent of 'connect the goal'.

comment 3y ago · link · parent

Scripted enemies are "non-player-controlled entity behavior", yet they are not AI. For NPC behaviours to be considered game AI, there needs to be some calculation depending on the current state of the game and objectives of the character. What makes a game behaviour "AI" is its feedback with the player actions and/or events evolving in the game.

Super Mario mushrooms and turtles are not AI controlled; Pac-Man ghosts are. (Possibly the earliest and simplest form of game AI, but quite effective for its purpose).

comment 3y ago · link · parent

It is useful when you use it like those knowledgeable of the field. Marketing departments are not using it that way.

comment 3y ago · link · parent

> Fancy abstractions, but what are they abstracting away precisely? What are the roots they are trying to hide? Is the foundation of logic itself logical?

Of course the foundations of logic are not logical themselves. Symbolic human thought grows from the natural capabilities of the brain, there are not universal axioms that can be extracted fully formed from the void. That's what rationalist philosophers for wrong (but then, they didn't have neuroscience and electric scanners).

> > It's not a high bar to achieve.

> I'm not sure I agree. It's not trivial at all to produce a system that can support what you call logic and formal processes

We're talking at different levels.

Building the concept of formal rational systems to order thoughts was a huge achievement of philosophers, first the Greeks and later XIX mathematicians like Bool and Russell and the computer builders.

But what I say that's easy is building a new specific system on top of those foundations. It may be as simple as writing a regular expression, which defines a full (if limited) formal grammar. I agree that their power to represent and order the patterns of thought you find in life is more limited than what engineers believe; but when you find a domain of science where it can be applied, it's a very powerful tool to explore consequences and avoid or fix biases and misconceptions.

comment 3y ago · link · parent

Rational system is anything that follows a mathematically formal process. This server where we post our messages is a rational system, as well as any deterministic software. It's not a high bar to achieve.

There may be limits to rationality (both for being incomplete to describe the world and for generating results that can't be demonstrated within themselves), but being rational by itself is nothing more than the capability to apply formal logic, i.e the capability to generate a sequence of sentences derived from the previous steps and a limited number of rules of inference.

comment 3y ago · link · parent

> Rationality’s building blocks are themselves not rational. I don’t know where this idea came from that logical thought somehow springs into life fully formed at once.

Certainly not from me :-P I'm fully aware that human rationality is one technique trained on top of our common diffuse thinking. Heck, we invented machines to perform rational steps for us without errors.

Once you build a consistent rational system though, you can trust that it will always produce internally coherent knowledge (as long as no bugs external to the system are introduced). That behaviour requires algorithms, not statistical inference.

comment 3y ago · link · parent

It has a model, but it is not a rational model. This difference is something that often throws engineers off track when thinking about generative AI.

LLMs models work more like intuitions. They are able to make statements about a problem in context, but they are generated from ideas that "instinctively" make sense given the prior statements and learned corpus (similar to Daniel Kahneman's fast mode of thinking), not logically constructed. These models do not have the capability to build formal inferences of careful steps that try to validate those ideas avoiding contradictions.

Those capabilities can be added outside the model to try to verify the generated text, but so far are not integrated in the learning process, and I don't think anyone knows how to do it.

comment 3y ago · link · parent

Don't cross the streams.

(Or maybe I'm mixing up my 80's nostalgia?)

comment 3y ago · link · parent

Classics are worth revisiting

http://www.pera.net/Stonesoup.html

comment 3y ago · link · parent

> Is compositing different bitmaps an embarrassingly parallel problem?

If you can make an initial approximate guess of the area for each section, you can split regions with lower and upper size constraints that can be laid out in parallel. A global branch and bound algorithm can coordinate those processes, tightening the upper constraints of one region when another connected region exceededs its minimum bounds.

Indeed there still may be degenerate cases where multiple regions need to be recalculated several times, but overall the default case should be able to finish without much conflict.

1
678
70