News for hackers. Stuff that matters.

jamesbrock

Re:Every Industry Is an Overcrowded Airport Lounge Now on Friday August 29, 2025 @12:03AM (#45060046)
This essay is a treatler manifesto, full of treatler clichés like “customer service simply no longer exists.”

https://knowyourmeme.com/memes/treatler-treatlerite

Note that the author does not ask for universal manners and courtesy, the foundation of a pleasant society. Instead he demands “customer service” in which dignity and respect flow in only one direction.

Does the author really want new shoes, or does he mostly want to feel like a very special boy in the shoe store? It is the latter. I suspect he would choose to burn down the world rather than live in a world in which his superior social position as a Customer is unrecognized. Soon the bond markets will neutralize the status conferred by this man’s credit card and we will see which he, and the millions like him, choose.

Re:Why Facts Don't Change Our Minds on Monday November 04, 2024 @02:52AM (#42039456)
David Remnick’s New Yorker is not really in a position to scold other people about facts.

Here is a fun exercise that David Remnick and other Americans can do to see if they can change their minds when presented with facts: https://benthamopen.com/contents/pdf/TOCPJ/TOCPJ-2-7.pdf

Re:Edifice: Declarative GUI Framework for Python and Qt on Wednesday August 28, 2024 @05:25AM (#41377658)
Yeah, “insisting on programming with Python” is exactly the reason why you would want to use Edifice.
Re:Edifice: Declarative Model-View-Update GUI for Python and Qt on Friday September 15, 2023 @08:23AM (#37521890)
Here is a bonus list of other Python declarative native GUI projects:

https://github.com/pyedifice/pyedifice/discussions/43

Re:Kei Car on Saturday September 04, 2021 @11:43AM (#28416053)
I have a Suzuki Palette kei minivan and I love it. It cost $8000 and I've driven it for nine years and it has never broken down. It has tall ceilings and huge windows and it seats four. I can fold down the back seats and haul sofas and refrigerators. It has continuous variable automatic transmission and gets 40 miles/gallon in the city. It has decent acceleration when fully loaded going uphill in a headwind at freeway speeds. It's only sold inside Japan.
Re:The compiler will optimize that away on Sunday May 02, 2021 @11:27AM (#27016083)
> What if a programming language would provide us with a structure that would act like an array of structs, but internally it would really behave like a struct of arrays? We could program in the typical object oriented way that is convenient for humans, while still enjoying in great performance due to playing nice with the hardware.

> So far, the only programming language I know of that supports this type of crazy data transformations is JAI,

Haskell supports this type of data transformation.

http://hackage.haskell.org/package/vector-0.12.3.0/docs/Data...

> unboxed vectors of pairs are represented as pairs of unboxed vectors.

Re:Colab Pro on Saturday February 08, 2020 @06:21PM (#22279319)
Yes, my understanding is that Theodore Gray invented the "computational notebook" for Mathematica in the 90s. Here is the best writeup of the history of the notebook that I've ever read. https://www.theatlantic.com/science/archive/2018/04/the-scie...
Re:Optics and Regex: Greater than the sum of their parts on Saturday September 21, 2019 @04:56AM (#21034254)
For pattern matching and search-and-replace in Haskell, some people might prefer monadic parsers to regular expressions. This library has a similar set of capabilities:

https://github.com/jamesdbrock/replace-megaparsec

Re:How do I modify a variable in Haskell? on Tuesday August 15, 2017 @11:28AM (#15019125)
Mr. Burge has written a nicely thought-out blog post showing an evolution of different ideas about how to write to an array in Haskell.

I don't want people trying to follow the evolution to get the impression that iterating and writing to an array is really hard in Haskell, so here is a complete Haskell program which

1. Initializes a 10x10 mutable array to 0.

2. Iterates in a for-loop from 0 to 9, setting the diagonal to 1.

3. Freezes the mutable array to an immutable array and prints it.

  module Main where
  
  import Foreign.C.Types (CInt)
  import Control.Monad (forM_)
  import Numeric.LinearAlgebra (toLists) -- http://hackage.haskell.org/package/hmatrix-0.18.1.0/docs/Numeric-LinearAlgebra-Data.html
  import Numeric.LinearAlgebra.Devel (runSTMatrix, newMatrix, writeMatrix) -- http://hackage.haskell.org/package/hmatrix-0.18.1.0/docs/Numeric-LinearAlgebra-Devel.html
  
  main = do
      putStrLn $ unlines $ fmap unwords $ fmap (fmap show) $ toLists aImmutable
    where
      aImmutable = runSTMatrix $ do
          a <- newMatrix (0::CInt) 10 10
          forM_ [0..9] $ \i -> writeMatrix a i i 1
          return a
Output:

  1 0 0 0 0 0 0 0 0 0
  0 1 0 0 0 0 0 0 0 0
  0 0 1 0 0 0 0 0 0 0
  0 0 0 1 0 0 0 0 0 0
  0 0 0 0 1 0 0 0 0 0
  0 0 0 0 0 1 0 0 0 0
  0 0 0 0 0 0 1 0 0 0
  0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 0 0 0 1 0
  0 0 0 0 0 0 0 0 0 1
Re:Ask HN: New attempt at mobile markup – keep or bail? on Monday November 02, 2015 @02:19AM (#10490501)
Keep! And increase all font sizes to at least 1em. And give this comments page the same treatment, please.
Re:Resigning from the Haskell Platform on Tuesday October 13, 2015 @08:37AM (#10379946)
> What's the future that Haskell brings?

That's a great question, paulsutter. The great computer scientist Peter Landin in 1965 asked a similar question about the future of programming languages. To answer the question, he imagined a wonderful futuristic programming language with lambda calculus at its core. He named that language ISWIM, and described it in a paper entitled The Next 700 Programming Languages.

Haskell is essentially ISWIM with a Hindley-Milner type system added to it.

https://www.cs.cmu.edu/~crary/819-f09/Landin66.pdf

Haskell is science fiction from 1965. The future that Haskell brings is right now, the 21st century future.