HNHacker News
TopNewBestAskShowJobs

linkdd

2,632 karma · joined June 19, 2019

email: david.jose.delassus@gmail.com

  - https://link-society.com
  - https://krouter.cloud
  - https://flowg.cloud
  - https://linkdd.github.io
  - https://david-delassus.medium.com
submissionscomments
linkdd··on Show HN: Header only C++23 library for gamedev (back end agnostic)
Author here.

FYI: I just published the SDL SDK: https://github.com/trollworks/sdk-backend-sdl

linkdd··on Htmx and Web Components: A Perfect Match
AJAX literally is "async request from the client to the server".

https://en.wikipedia.org/wiki/Ajax_(programming)#Technologie... XML (the X in AJAX) is not even necessary as JSON came in.

Any React/Vue/Angular/... client application using `fetch` to make a request, is making an AJAX request. Just because you haven't seen the term in a long time does not mean it is outdated.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
For performance intensive tasks, you could rely on Rust NIFs, there is this great project: https://github.com/rusterlium/rustler

My last project with Elixir was using Elixir merely as an orchestrator of static binaries (developed in golang) which were talking in JSON via stdin/stdout.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
The performance of the planning algorithm (which is a path-finding algorithm essentially, which can be costly).
linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
IANAPGD (I Am Not A Professional Game Dev) but,

Unreal Engine uses C++. You have boost, SDL, Ogre3D, Irrlicht, EnTT, ImGui, etc... aka: C++ has a good ecosystem for gamedev.

The "Zero Cost Abstraction" philosophy of C++ makes it easier to squeeze out the performance you want.

Unity (and recently Godot 4) uses C# but they are still relatively young in the field. We were making games long before those :)

I would not say it's "THE" popular language, but it does have an history.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
Nice use case about Elixir! You should definitely write about it, I'm getting sick of the "We used Elixir/Phoenix/LiveView" articles out there. MMOs are one field where Erlang/Elixir can shine a lot due to their concurrency model, their fault tolerance, and especially no-downtime upgrades thanks to hot code reloading (very attractive to upgrade the server without disconnecting people).
linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
The header-only part is actually accidental, I'm using C++ templates which requires to be fully defined at their declaration site (the header).

On top of that, the "Installation" instructions are just "copy the file in your project", no CMake, no Meson, not any kind of build system.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
Thank you for the feedback :)

Feel free to open issues or discussions on the repository if you have any difficulty.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
The "header-only" is actually accidental.

It's all C++ template classes, which must be fully defined at their declaration site (so the header). When using the template, the compiler will generate the code needed by "instantiating the template" (for lack of a better word).

The other advantage is that it requires no build system to include in your project.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
It's not an LLM. It's just Finite State Machines, Behavior Trees, Utility AI and Goal Oriented Action Planning.

This should cover all you need to make an NPC a bit smarter (but it is still "scripted").

LLMs are not what you would use to make a bot in Civilization, or Age of Empires.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
You can use Q-Learning which is simple enough to have an AI that "learns".

IANAPGD (I Am Not A Professional Game Dev), I haven't seen this as a gameplay mechanic either.

linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
Yup, conventional game AI is just bunch of ifs :)
linkdd··on AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
Author here, feel free to ask any question :)
linkdd··on Maze Generator
`clap` does have magic for enums:

  use clap::{Parser, ValueEnum};

  #[derive(ValueEnum, Debug, Clone)]
  pub enum Foo {
    Bar,
    Baz,
  }

  #[derive(Parser, Debug)]
  #[command(author, version, about, long_about = None)]
  pub struct Args {
    /// description
    #[arg(short = 'f', long = "foo", value_enum, default_value = "bar")]
    foo: Foo,
  }
The output of `--help` will look like:

  -f, --foo <FOO>  description [default: bar] [possible values: bar, baz]
This is with clap >= 4.4 with the derive feature.
linkdd··on Ask HN: Vite or NextJS?
If we were still on Next.JS 13, I would advise against it, that version saw the introduction of the "App router" which replaced the "Pages router", and as all new shiny things, it had a lot of warts and migration was painful.

Next.JS 14, which introduced server actions, is really worth it though.

But, IMHO, the main advantage of Next.JS is Vercel. You get a free platform to deploy your app just by "pointing it to your git repository". I've used it with Prisma and MongoDB (with a MongoDB Atlas free instance), so I have deployed my app completely, free of charge. Which for proof of concepts is a great thing.

linkdd··on Ask HN: Vite or NextJS?
One of the goals of making an API is to be able to implement multiple frontends on top of it.

In Next.JS server side, whether you query a database or a remote API with `fetch`, there are not much differences. And you'd still want Server Side Rendering to avoid having slow "first display" time.

linkdd··on An usable and maximally efficient C standard library
It's not a "standard" library though...

It's a nice "toolbox", but definitely not "standard" (word which has a very specific definition).

linkdd··on Switching to Elixir
Self promotion moment:

If you enjoy the Result/Either type and API in Rust, I made this project just for this: https://github.com/linkdd/rustic_result

I also made https://github.com/linkdd/rustic_maybe/tree/main for an Option/Maybe type.

NB: Those are not types, but I'm waiting for set theoretic types to update those libs :)

linkdd··on Omegle 2009-2023
Can you even call it a party then?

/jk

linkdd··on https://github.com/pnpm/pnpm: 404 Not Found
Missed pun: broke-le-build.jar
linkdd··on https://github.com/pnpm/pnpm: 404 Not Found
All repositories are currently 404.

Someone decided to deploy on a Friday, rookie mistake :)

linkdd··on Mypy 1.6
I'm not saying that static typing has no value, it certainly does.

But rejecting all dynamically typed language is a poor shortcut to take. Python, Ruby, Javascript, and others have a lot of success stories.

linkdd··on Mypy 1.6
> No amount of mypy, pydantic, pyright, ruff, black, can convert python into a production language.

Ah yes, because Python was never used in production ever, not at Google, not at Dropbox, not ever.

The "static typing above all else" cargo cult is getting ridiculous.

linkdd··on Unity's oldest community announces dissolution
That's fair, but if we consider the amount of game dev studio that have the resources (time and money) to do that, versus the amount of indie game devs and small studio who do not, I'm not sure that it's fair to say "you can just fork it".

The examples of successful forks are anecdotal, they are the exceptions not the rule. This is survivor's bias.

linkdd··on Unity's oldest community announces dissolution
If my business is making games, I don't want to fix/modify/add things to a game engine.

You do need to innovate on the foundation if you plan to maintain your game long term: new consoles support, new hardware support, obsolescence of old platforms, etc...

You do not need to innovate if you plan to let your game rot and become unplayable 10-20 years later.

Yes having a FOSS solution for the foundation would be ideal. That was not the topic of the discussion. The topic was about the claim "we can fork if we're not in agreement".

No, as a game developer you won't be forking and maintaining a game engine. No a "just fork it" is not a viable solution in the majority of cases as you need a strong community behind you and your fork to make it last long term and not rot after 2 weeks.

linkdd··on Unity's oldest community announces dissolution
More anecdotal examples of "survivor's bias" do not dismiss the initial argument.
linkdd··on Unity's oldest community announces dissolution
MariaDB, OpenTofu, etc... Those are the exceptions.

Forking is easy. Maintaining a fork, keeping the quality and innovation alive, and the community involved is hard.

There are many more failed forks than successful forks. So saying "you can fork" is utopist at best. Sure you can, but you'll probably be the only one maintaining it and it will slowly rot as there won't be a community to keep it bug-free and compatible with new hardware/standards.

linkdd··on “Make” as a static site generator (2022)
Something like this should do the trick:

  rm/%.html:
    @rm -f source/%.html build/%.html
Run with:

  $ make rm/page.html
linkdd··on I'm moving my projects off GitHub
> a double-bacon cheeseburger with extra sauce is bad for your heart.

What about my home-made cheeseburger with real cheese (not american cheddar), a 180g steak of locally sourced beef meat, pickle, tomato, salad, onions, all fresh and locally sourced, and some tasty mustard?

Is it still bad for my heart?

Because that's what Github taste to me, I'm a sucker for having everything in one place, with such polish. The only thing I don't quite like would be Github Actions, but that's because I hate that YAML became a programming language (all modern CI/CD platforms are guilty of this monstrosity).

When a CI/CD with a Typescript API? I tried to start working on that, but it's too much for me alone.

linkdd··on I'm moving my projects off GitHub
Text, images, all kinds of documents people use (maybe wrongly) Git for.

But Github is storing billions of those documents in millions of repositories with millions of users, all using bandwidth, CPU, RAM, hard drives, and they trust them to not lose data, and be always available.

Yes, your computer in your garage is not fit to handle that kind of traffic/load.

← PreviousPage 4 of 29Next →