6 ms·
Input -> Process -> Output Somewhere a Haskell programmer is nodding.
by current_call 11y ago
Input -> Process -> Output
Somewhere a Haskell programmer is nodding.
- _RPM 11y agoI believe computing has 1 concept needed to be understood by programmers: Input & Ouput. That's all programming is.
- dragonwriter 11y ago> I believe computing has 1 concept needed to be understood by programmers: Input & Ouput. That's two concepts. So, the two concepts that need to be understood by programmers are Input and Output. And State.
- SapphireSun 11y agoAlso sequence.
- munificent 11y agoAnd a ruthless efficiency!
- antod 11y agoI didn't expect that.
- philipov 11y agoState is just emergent behavior caused by feeding your output back into your input.
- inopinatus 11y agoProgrammers therefore need to understand time.
- socceroos 11y agoHowever, time is shackled to space. Therefore, all programmers need to understand space.
- inopinatus 11y agoThat's interesting, we don't generally consider relativistic effects on computation. There could be an interesting synthesis between Minkowski spacetime, lambda calculus, and Lamport clocks that will either a) show that the fundamental unifying element in the universe is functions (and really annoy at least one side in the disagreements over the Black Hole Information Paradox), or b) make for a terrific Greg Egan novel.
- pjmorris 11y agoMy first programming (Fortran!) teacher listed input, storage, decisions, and output as the four concepts needed. Later I learned about Turing machines, same deal.
- eru 11y agoPoint to where the decisions are in SKI calculus. SKI calculus is as strong as Turing machines and lambda calculus. (If you squint right, you can see the decision making bit. But it's a tight squint.) --- (from Wikipedia:) The evaluation operation is defined as follows: (x, y, and z represent expressions made from the functions S, K, and I, and set values): I returns its argument: Ix = x K, when applied to any argument x, yields a one-argument constant function Kx , which, when applied to any argument, returns x: Kxy = x S is a substitution operator. It takes three arguments and then returns the first argument applied to the third, which is then applied to the result of the second argument applied to the third. More clearly: Sxyz = xz(yz) --- See https://www.reddit.com/r/haskell/comments/ypcu7/hello_world_in_ski_combinator_calculus https://www.reddit.com/r/haskell/comments/ypcu7/hello_world_... for an example program in SKI.
- otis_inf 11y ago> I believe computing has 1 concept needed to be understood by programmers: Input & Ouput. That's all programming is. No, programming is making output from input. Input is just a set of bytes, and output is also a set of bytes.
- vezzy-fnord 11y agoSomewhere a programmer is nodding.
- vvanders 11y agoNot really... AFAIK(I'm no Haskell guru) Haskell doesn't let you specify memory layout explicitly. Without that you won't see the massive gains that come from data-oriented design. The second half of this talk from Herb Sutter covers is succinctly: https://channel9.msdn.com/Events/Build/2014/2-661 https://channel9.msdn.com/Events/Build/2014/2-661
- ww520 11y agoNo, the lazy evaluation in Haskell would make it difficult to reason about the runtime performance in his case. The conclusion is to use tightly packed data structure to take advantage of the cache locality of the modern CPU for high performance requirement. That can be done in most languages.
- HelloNurse 11y agoIt can be done less easily in Haskell, because even if arrays are available (albeit as second-class citizens) and hopefully well packed, the actual structure and memory layout of their elements is an implementation detail (and, in practice, it tends to be unusually pointer-rich because it has to support lazy evaluation).