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

PHP did extensions and PECL modules wrong, due to its roots as a web server language. With managed hosting, often PHP doesn't offer what we might think of as basic functionality, since the admin didn't install/enable it. So it makes sense that these little one-off packages exist to route around snafus.

It's still my favorite language though, since it comes closest to shell language but with C-style syntax (other than maybe Perl, which is a write-only language and hard to read, which unfortunately inspired Ruby to inherit some anti-patterns).

I often dream about writing a modern hacker language that combines the best of everything like functional programming, higher-order methods, const by default, parallelism, sync blocking rather than async nonblocking concurrency, etc. It would also undo the pass-by-reference footguns added by PHP 5+ and return to the pass-by-value copy-on-write style of arrays. That's why I really can't endorse attempts like Hack which just introduce a new standard with its own problems.

The insight being that LLMs work around the limitations of mainstream languages and frameworks, rather than challenging assumptions from first principles and building better foundations.


Same. pass-by-value copy-on-write. I always find other languages strange that they do not have this.

I fell in love with MATLAB (or GNU Octave for free since you really pay for toolboxes/packages) back around 2004, despite it warts. So I second Julia, which is similar, but is a more modern functional language instead of imperative.

I asked Google's Gemini if Julia can run on GPU unmodified without annotations, pragmas, intrinsics or similar manually-managed friction, and it said yes, but that data types must be swapped out for GPU-backed types:

If your code is written using vector/matrix operations, broadcasting, or standard linear algebra functions, it can run on the GPU entirely unmodified. You only need to change the input data type to a GPU-backed array (e.g., swapping a CPU Array for a CuArray from CUDA.jl).

  # A standard Julia function — completely agnostic to hardware
  function custom_math!(C, A, B)
      @. C = sin(A) + 2 * B  # Normal broadcasted operation
  end
  
  # Running on the CPU:
  A_cpu = rand(1000)
  B_cpu = rand(1000)
  C_cpu = similar(A_cpu)
  custom_math!(C_cpu, A_cpu, B_cpu)
  
  # Running on the GPU (Unmodified function!):
  using CUDA
  A_gpu = CuArray(A_cpu)
  B_gpu = CuArray(B_cpu)
  C_gpu = similar(A_gpu)
  
  custom_math!(C_gpu, A_gpu, B_gpu) # Automatically compiles to native PTX!
https://cuda.juliagpu.org/stable/

This is the direction we should be going. So while Nvidia's Rust port is an important first step, it's an evolutionary rather than revolutionary achievement. But that's all Nvidia can really do now, since it's locked into its own paradigm like Intel/Microsoft and has gotten too big to think outside the box.

Edit: PTX in its example stands for Parallel Thread Execution, the Virtual Machine (VM) Instruction Set Architecture (ISA) created by NVIDIA for its GPUs, which works similarly to Java byte code.

Edit 2: Broadcasting is a feature in Julia that allows you to apply a function or mathematical operation element-by-element across arrays of different shapes and sizes, without writing manual loops. In Julia, broadcasting is syntactically indicated by a dot (.) placed before an operator or function name (e.g., sin.(x) or .+). <- I was today years old when I learned the term for this


I've been calling for high-multicore CPUs (at least 100 cores) with local memories for a quarter century now. No winners so far.

A Pentium 4 hit 3.8 GHz longer than that ago in 2004, so that's not special. And the estimated price will be $7,000-10,000, which isn't special either since that's about 10x more than it should be.

Hot take: GPUs disrupted the CPU industry to such a degree that CPUs never recovered, and like the k-shaped economy, the current status quo only serves a small fraction of customers. We can and should do better, but sadly we won't. Still, it's good that Fujitsu did this, for the competition if nothing else.


Unless they are used for multi-processing in classical UNIX fashion, or proper microkernels, most applications will hardly take advantage of them.

Managed languages runtimes are probably the ones that would be better equipped to take advantage of them, for distributed JIT, GC and asynchronous code.

The Connection Machine style with StarLisp.

Very few devs can write optimal multi-threaded code that explores the single digit count of cores on their laptops or phones already.


IMO we are still far from discovering a truly usable concurrency paradigm (if one even exists).

Maybe if designing software like digital circuits, which are more parallel in execution.

However one could argue that FPGAs are already that, and still we come back to a skill issue.

I am also not an expert, cannot make heads or tails about SIMD algorithms, and in what GPUs goes, only traditional shading languages.

Let alone algorithms that on top of that, should take optimal advantage of all available CPUs.


Ya functional programming is key, as it's equivalent to a spreadsheet or digital circuit. In other words, it removes the element of time and often dynamic state, which imperative programming generally fails to do.

IMHO most concurrency problems don't actually need async behavior, they need higher-order methods and models which behave deterministically by encapsulating async behavior internally.

Another maturing solution is to use SAT solvers to prove that all exceptional behavior and failure modes are handled. I'm hopeful that AI will help with that and allow us to exercise programs fully, rather than rely on unit tests and fuzzing.

Personally I think that the UNIX model of orchestrating small async programs that do one thing well is the only proven mainstream solution. Erlang and Go come really close, but unfortunately we need a hybrid of the two, which doesn't currently exist. The pattern for that is functional core, imperative shell. Which mimics the real world where business logic can be formerly proven correct or constrained by types and categories, then we wire up programs cookie cutter style. That avoids the use of monads (promises/futures in imperative languages), which are the main footguns. The closest language that does that is ClojureScript, whose runtime is analogous to suspending and resuming a coroutine or green thread that makes Lisp calls (although that's a poor fit and I'm sure I'm wrong about it).

But you're right that we don't currently have a language that can recruit multicore CPUs. I used MATLAB/GNU Octave in the past, but think that Julia probably has a brighter future since it can already run on GPU mostly unmodified. I would not try to do it with a mainstream language like C# or Python, or even PHP for that matter. Although some of PHP's multiprocessing metaphors are pretty solid, since they intentionally use processes instead of threads like in Ruby. There the problem is latency introduced by poor process models used by Microsoft and Apple, not something fundamental with spawning processes. Real-time Linux attempts to unify the kernel under one process model to provide deterministic timing, which is hard enough for regular Linux and probably out of reach of the big OS companies, because money can't buy everything.


Chapel tries to do a bit that language, however it looks they only care about HPC workloads, that are not everyday programming anyway.

Very nice overview, also agree with the points that you presented.


This is great!

We need something like git blame to show how legislation evolved over time, who passed it, which lobbyists pushed for or wrote it, who benefited by receiving more money/power, and who had to foot the bill.

This is becoming urgent, now that there's almost no correlation between what laws get passed and their popularity with the public, since Congress mainly only listens to moneyed interests:

https://www.youtube.com/watch?v=5tu32CCA_Ig

Discussion:

https://act.represent.us/sign/problempoll-fba

By making corruption more transparent, we can make it so toxic that people participating in it get investigated and brought up on charges.

This will become inevitable due to the arrival of AI, but speeding up its delivery is paramount if we want to save our country.


Since creating AI is/was the last challenge in computer science, it makes sense that it would be the most disruptive to the people and systems behind it.

I imagine that many of us went into CS fields after growing up inspired by RD-D2 and C-3PO, Data, J.A.R.V.I.S., too many synthetic beings to list. Now there's a sense that it's all ending, that whatever reason(s) we went into tech have been rendered almost irrelevant overnight. That for the first time in our lives, there truly may be no path forward that's anything like what we trained for. Despite that, I want to leave some breadcrumbs of hope here anyway.

How many of us were nerds in high school? Then geeks when it became cool to be one from roughly 1995 to 2015? Then pariahs when tech bros captured everything we were working towards for personal profit, rushing us headlong into dystopia?

Somehow we went from armies of one to veterans of a spiritual war we didn't even know we were fighting, which in hindsight we were losing.

As a systems-level problem, we aren't going to solve this on our own. That's why so many of us are having an identity crisis.

I would propose that if we're facing the loss of opportunity as a society, then that cost must be borne by the people most able to bear it.

What does that mean? Well, lets do a root cause analysis. It's interesting that in a time of rising unemployment and underemployment, prices seem to only go up. Very interesting. Why is that?

Let's examine initial and steady-state conditions. Barter, trade and commerce kept us fed for centuries when we had a social contract and exchanged money for products and services in good faith. What does the plot look like on the long tail when the majority of people can't find work worth being compensated for, when AI can do everything faster/better/cheaper than humans, yet prices have not come down? How will people buy what they need to survive?

There seems to be a paradox with two schools of thought vying for the future: Alpha) we always find ways to innovate and enterprise will continue or Beta) automated innovation means that enterprise may end or fundamentally change.

Since HN mainly focuses on school Alpha, lets look at Beta. As the alternative narrative, understanding it requires questioning our assumptions. What is personal responsibility? What is heroism? What are we working towards? Those sorts of things.

I know in my life, I've had to continually level up after countless setbacks and failures. In one sense that's good: it forces us to become better people. But in another sense it's bad: we wake up one day to see that despite our best efforts, we aren't moving forward, only laterally. Without a win, that's about the time that midlife crisis hits, where in a very real sense it makes sense to exit the rat race. To hand things off to the next generation. To transition into being an elder, a teacher or even a hermit. That's where I find myself now.

Yet some people seem to have done well with shortcuts. Rather than leveling up, they went around problems, passing the burden of solving them onto others. Spiritual growth ended when money arrived. At which point profit-seeking became their priority to hide that fact, leaving affordability far behind. Those are the people who feel entitled to tell others what to do because they have more money. They're the ones whose reality can't accept school Beta, so they work to eradicate it. The ones who don't get consent before moving forward with their plans.

I can't answer what meaningful goal led each of us into tech. But I can propose a starting definition of progress across science, philosophy and religion: ensuring that no child starves or dies.

We've arrived at a crossroads where despite having tremendous power at our fingertips, we seem to have missed the forest for the trees.

If enterprise is taken from our reach by wealthy and powerful people who embrace apathy over empathy, then our power is in our connection with each other. Maybe we don't have to take the power back. Maybe through direct action and joining in meaningful work with others, we find that we already have the power, and that it has always been ours. That the conditions of our torment aren't fundamental, but a construct contrived by people so used to being in power that clinging to it is all they have. That the systems of control we live under are simply an illusion, and that by realizing that, we've already taken the first step in shrugging them off.

Making or doing something that helps others without regard for personal gain may be the most disruptive thing we can do.


When you accept reality, whatever it gives you, you're obviously going to have a far more rational population and better outcomes than one that insists on bending reality to fit a desired narrative, even when it obviously does not.

Uh, this is Hacker News, we literally reject others's realities and substitute our own.

When it comes to gains, you're probably thinking of average outcomes (which don't reflect wealth inequality) instead of median outcomes. In no universe does ignorance benefit one's financial situation, unless we're talking about looking the other way when it comes to exploitation. In which case, yes, ignorance helps the wealthy tremendously.


It's important to distinguish between spiritual energy like prana/chi and electricity.

Science will never show that grounding has any measurable effect on the chemistry of the human body. But it also can't show how conscious awareness may affect quantum wave function collapse probabilities, allowing free will to migrate to the deterministic timeline in the multiverse that most supports its well-being.

In other words, magic only doesn't exist if you don't believe in it.


> But it also can't show how conscious awareness may affect quantum wave function collapse probabilities, allowing free will to migrate to the deterministic timeline in the multiverse that most supports its well-being.

That’s true. Science can’t show a lot of things that aren’t real.


You're not wrong, but it's worth doing a deep dive into recent papers on multidimensional time and its relation to consciousness and free will.

I feel like the currency of the future could be shame. Specifically, that a search engine competing with google could show how poorly each result was found by google, or even use lack of representation on google to rank a site more highly since it contains the truth for example.

I also feel like shame correlates strongly with profit. That we're living in an era of lawless lack of accountability, where skirting the law for personal gain is rewarded handsomely. That anyone can make a deal with the devil and rise straight to the top, at least for now in the US until the political pendulum swings from liberty back towards justice.


I helped someone day trade 25 years ago and we made 40% in 4 months, mostly on AAPL, and it was easy. Way easier than working the 2 years moving furniture that it would have taken to earn that money, which I was foolishly doing to make rent for my defunct shareware business.

I've heard that high frequency trading eats market opportunities within milliseconds of spotting them now though, basically making the market even more random. The catch being that human nature isn't random, it's stochastic, so there will always be more money to be made on trades (or else trading firms wouldn't exist).

I'm thinking about getting back into trading because AI represents the end of buying software and we'll all be out of work soon, even if we're in denial about it. But everything I invest my time and energy into turns to crap. In a very real sense, as soon as I start trading, then karmically that could trigger recession, market reforms which ban what I'm trying, or even the end of money. I'm kind of joking and kind of not.

I've worked on a lot of really hard stuff over my brief but stupid career, and am basically used up mentally and physically, at least for now. Quant stuff is easy with AI. Should I try it?


No. If you could do it, with no remarkable skillset, that means people who are actually competent will be doing it orders of magnitude way better than you and you will be too far behind to really do anything significant except waste your time.

I know it looks bleak right now with wealthy and powerful men tearing down every institution that feminism, progressivism, etc built, but remember that the political pendulum inevitably swings the other way.

We can have justice, and we will.

Disregard for consent is driving the insanity at the highest levels. I hope anyone reading this remembers their own power in resisting the machinations of the greedy who can never have enough, and puts their energy towards organizing for a brighter future for people and planet.


ah, if only that were true. there's a whole quote about the 'arc of history bending towards justice' but it's not an inevitability, that's just confirmation bias from the times we live in. if you were to ask a normal person living through one of the warlord eras of Chinese history, they might have preferred greatly the times they considered ancient when the rule-of-law was more stable. similarly, I'm sure your average medieval peasant living through an Inquisition may prefer the centuries where they weren't scrutinized by their neighbors for any sign of heresy

justice is defined and propagated by the people in their time who show up and do the work. the overturn of Roe v Wade was a 40-year-old project and one of the driving forces that created the Federalist Society, a society which now dominates the Supreme Court and many other courts of law [0]. they are also responsible for things like Citizen's United, the rise in 'tort reform' (ie corporate escape holes from liability), and a lot of other anti-populist case law

they out-organized the progressive legal types (with the help, of course, of the ultra-wealthy who saw a lot to be gained from defanged tax and labor law)

there's no taking things for granted at anytime. you either grit your teeth fighting for your rights, out-organize your opponents, and stay fighting or you get trod on and lose it all. the parable of the tortoise and the hare does a lot of work here

[0] https://theintercept.com/2022/05/10/roe-v-wade-federalist-so...


> there's a whole quote about the 'arc of history bending towards justice' but it's not an inevitability

I think it probably is inevitable, but it probably happens the reverse of the direction that the quote implies.

That is to say, I think our definition of justice bends towards whoever wins historical conflicts.


You may be right about that but they’re tearing things down overnight that took decades to build. And it will take more decades again to rebuild and repair. We’ll be spending most of our lives doing it.


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

Search: