HNHacker News
TopNewBestAskShowJobs

redbar0n

953 karma · joined November 27, 2012

freelance full stack developer (javascript and ruby)
submissionscomments
redbar0n··on Hacking millions of modems and investigating who hacked my modem
«Absence of evidence is not evidence of absence», seems to apply here.
redbar0n··on After 6 years, I'm over GraphQL
There’s a good response to this article here:

https://news.ycombinator.com/item?id=40536581

redbar0n··on Bend: a high-level language that runs on GPUs (via HVM2)
`bend` is a convenience syntax that "just creates an in-place recursive function, immediately calls it with an initial state, and then assigns the end result to a local variable" ... "in a single statement, rather than needing to name a separate external auxilliary function that you'll only use once", according to the original author on Twitter: https://x.com/VictorTaelin/status/1791964640533958924 and https://x.com/VictorTaelin/status/1791996185449791932

But contrary to this, I think explicitly separating function declaration and function calling, in the following kind of syntax, would make it much clearer and less complected where the initial condition `tree = fork(0)` comes from. In the original example it came from `bend x = 0`, but here the function declaration is separate and the call more explicit: so it more obviously comes from `createTree(0)`:

    type Tree
      Branch { left, right }
      Leaf { value }

    def main():

      createTree(x):
        x < 3 ?
          Tree.Branch { left: createTree(x+1), right: createTree(x+1) }
        Tree.Leaf { value: 7 }

      createTree(0)
Besides not needing a local variable `tree` here, the unique thing here is the elimination of the else-clause, to reduce unnecessary nesting, and a rule that the language just early returns the last result of any nested condition. If it doesn't go into any nested condition, then it just returns the last result in the main function body (like Ruby). Without any `return` keywords needed in either case. Wouldn't this be quite beautiful?
redbar0n··on 0.1 plus 0.2
Thanks for a masterfully written article, with an excellent overview of the problem and the language design choice.

It makes sense to have to opt-in to floats for performance in domains like scientific computing or graphics (where silent precision loss matters less). But in all other cases business logic (money etc.) would give you normal arithmetic as you would expect.

It also makes sense to not allow numbers to overflow to the Heap, but rather have the programmer take special care for exceptionally high numbers.

Having no shenanigans between the compiler output and the runtime output is also a sane choice (staying true to predictability / determinism).

All in all, it sounds like good language design choices for a Web Server and Business Applications focused language such as Roc.

redbar0n··on From Logic to Functional Logic Programs (2022 Paper)
Background:

While predicate logic (first-order logic) provides the logical foundation for logic programming (Prolog etc.) and databases, functional programming is based on the different formalism of the lambda calculus.

There are proposals to combine functional and logic programming paradigms into "functional logic programming" languages, but these involve mapping between the two rather than being purely based on predicate logic.

Abstract:

«Logic programming is a flexible programming paradigm due to the use of predicates without a fixed data flow.

To extend logic languages with the compact notation of functional programming, there are various proposals to map evaluable functions into predicates in order to stay in the logic programming framework.

Since amalgamated functional logic languages offer flexible as well as efficient evaluation strategies, we propose an opposite approach in this paper.

By mapping logic programs into functional logic programs with a transformation based on inferring functional dependencies, we develop a fully automatic transformation which keeps the flexibility of logic programming but can improve computations by reducing infinite search spaces to finite ones. «

redbar0n··on Debian on xz-utils: revert to version that does not contain changes by bad actor
Maybe combined with biometrics like FaceID?
redbar0n··on Debian on xz-utils: revert to version that does not contain changes by bad actor
Passkeys?
redbar0n··on The unique algorithm behind rewind in Braid
That’s very funny satire!

Released over a year after Braid.

redbar0n··on The unique algorithm behind rewind in Braid
I couldn’t tease out from his tweets if he meant that every object in the game was comprised of particles like some kind of VOXEL game or whatnot. If the whole rewind system was based on particles?

«Waaaay back in 2010 I gave a talk at the GDC detailing exactly how rewind was implemented in Braid, including e.g. how does it reproduce all the particles perfectly without using tons of data.«

But I was able to find his original blog post, which show the particle system code and crucially shows the animation of what parts of the visuals the particle system (with the random number seeding etc). was actually for:

http://number-none.com/blow/blog/programming/2016/07/07/brai...

(The particle system - recreate particles from scratch every time, and just go one step less, N-1, when rewinding - reminds me of Redux’ time travel algorithm, as demoed by Dan Abramov.)

I also found the original GDC talk Blow referenced, where he details the rewind system more fully, with illustrations. It becomes more clear that the world state is comprised of regular game objects in addition to particles. His overall approach was:

«Record full world state for every frame, always. Do not drop frames. Compress data somehow.»

(Reminds me of React’s «rerender whole UI, but virtual DOM diff afterwards», approach.)

Skip to 3:00 for the various rewind approaches he considered but dropped (including the StarCraft replays like approach of capturing actions and playing them back): https://www.gdcvault.com/play/1012210/The-Implementation-of-....

redbar0n··on In Mongolia, a killer winter is ravaging herds and a way of life
Feedback from a friend who lives in the very West Mongolia who read this article:

" This concerns mostly East Mongolia, and it can be a good thing for the nature, even though it is disastrous for many shepherds/herders. It's now more than 3x as many livestock animals in the country compared to when communism fell in 1990. Over-grassing kills the steppes and makes the desert spread in record speed. So if half of the livestock animal population would die, it would be, as said, good for the nature, but crap for the shepherds/herders.

If you want to see the official animal statistics check out http://1212.mn/en "

redbar0n··on Technocensorship: When Corporations Serve as a Front for Government Censors
Freedom of speech is irrevocably tied to how information actually spreads in a society. Inhibiting someone from accessing the superhighways of information is effectively suppressing their speech. In practise, if not in pedantic principle.

If you weren’t allowed to drive on the highway, but everywhere else, would your freedom of movement not be suppressed, to some degree?

If in North Korea they’d allow you to say whatever you want as long as you only shouted it from the top of a mountain when alone, or wrote it on a note and buried it in your backyard, would they have freedom of speech?

redbar0n··on JavaScript Bloat in 2024
Expected JIRA to be a worst offender, tbh. In any category, really.
redbar0n··on JavaScript Bloat in 2024
I think he means ‘should be’, and then goes on to show that it in reality isn’t.
redbar0n··on A Terribly Serious adventure: Philosophy and war at Oxford
«In 1889, Charles H. Duell was the Commissioner of US patent office. He is widely quoted as having stated that the patent office would soon shrink in size, and eventually close, because…

“Everything that can be invented has been invented.”»

redbar0n··on Misty Programming Language
then you can go further, ask perplexity.ai to:

use the documentation at https://www.crockford.com/misty/actors.html to show an actor code example

redbar0n··on Misty Programming Language
to see how the language (likely) looks like, try this input into perplexity.ai :

show me the 3 simplest examples of rosettacode implemented in crockford's misty programming language

redbar0n··on Roc – A fast, friendly, functional language
Since the type is inferred, why can't the module name by convention be inferred from the data type in pipe operations?

So instead of:

["a", "b", "c"] |> List.append "d" |> List.append "e" |> List.append "f"

You could have:

["a", "b", "c"] |> append "d" |> append "e" |> append "f"

Since Roc knows that the type returned from each function is a List.

redbar0n··on Roc – A fast, friendly, functional language
Even coming from Ruby, which uses snake_case, I've come to prefer camelCase over both snake_case or kebab-case. Since camelCase compacts more into a single token (separating it from what comes after), and it better passes the squint test.
redbar0n··on Roc – A fast, friendly, functional language
Carp - https://github.com/carp-lang/Carp - "A statically typed lisp, without a GC, for real-time applications." where it's "Ownership tracking enables a functional programming style while still using mutation of cache-friendly data structures under the hood".
redbar0n··on Roc – A fast, friendly, functional language
Yes, it was exceptionally well written and argued! Did you find any of the arguments faulty, or lacking counterweight? Or do you just weigh some drawbacks less harshly so you want some of the features they decided against?
redbar0n··on Roc – A fast, friendly, functional language
Lol. But it beats Scissors. :)
redbar0n··on How to Do a TypeScript Conversion
But then you effectively won’t be able to build on what you already have?

Or, you’d have to continue expanding the old code using only the old language/methods (here: JS instead of TS).

redbar0n··on Using spaced repetition systems to see through a piece of mathematics (2019)
They realized so many things!
redbar0n··on Using spaced repetition systems to see through a piece of mathematics (2019)
> Kolmogorov discussed this in loving detail, and made many beautiful points along the way, e.g., that the invention of the equals sign helped make possible notions such as equations (and algebraic manipulations of equations).

And then programmers came along and mangled the mathematical notion of the equals sign with the imperative notion of assignment. And here we are. Using = for assignment when we ought to have been using : instead, if we were to rely on people’s intuitions from reading and writing.

Which of course is difficult now that : has been co-opted by type systems.

redbar0n··on Waku: The Minimalist React Framework with Server Components
see also RakkasJS which is also Vite based but slightly more opinionated.

vite-plugin-ssr (soon called Vike) and RakkasJS comparison: https://dev.to/redbar0n/comment/28nbg

redbar0n··on Waku: The Minimalist React Framework with Server Components
The main use case for RSC is reducing the JS bundle size sent to clients. You can now use npm modules only server side if you want (markdown formatting being a popular example).
redbar0n··on Waku: The Minimalist React Framework with Server Components
being invested in something is not necessarily equal to having financially invested in it as an investor…
redbar0n··on Kevin Mitnick has died
«Can you see the number I’m calling from? Just to make sure, could you read it aloud to me. Slowly, please. … Thanks, yes it’s correct.»
redbar0n··on Tamagui Takeout: React Native, NextJS, Supabase starter that updates with PR bot
Tamagui just released a starter kit called Takeout which integrates:

* React Native & Expo * NextJS * Tamagui (styling + prebuilt UI components + tree-flattening compiler) * Supabase preconfigured w/ auth, login screens etc.

With 100% code sharing between RN and web. So you effectively get an iOS, Android and SSR’ed app on the Web from a single codebase.

What’s particularly interesting is that it goes further than a normal starter / bootstrap repo in that they have a GitHub bot that gives you automatic updates via Pull Requests.

A new model to fund open source?

My estimation is that fully integrated starter kits like these potentially saves weeks of integration time.

See also the previous HN post on Tamagui v1.0 release: https://news.ycombinator.com/item?id=34186742

redbar0n··on TS to JSDoc Conversion
..and why was that?
← PreviousPage 2 of 10Next →