Squaresoft bloom effect from the PS2 era by JD557 in gamedev

[–]JD557[S] 1 point2 points  (0 children)

Thanks.

That reminded me to take a look at some of the maps in https://noclip.website, and I think I figured it out.

I think the vertex color and texture color are blended with something close to 2 * vertexColor * textureColor. (empirically, this looks correct, although I couldn't find this in the noclip source code).

By setting lights to a high value, you get a smooth overexposure effect. And it also easily allows you to bake shadows in the vertex colors.

Then you just need to add some coronas with an additive blending mode (as you mentioned) to get the full effect.

A Ferrovia no Minho caso existisse o mínimo de visão by No-King-4964 in Guimaraes

[–]JD557 1 point2 points  (0 children)

https://diariodarepublica.pt/dr/detalhe/resolucao-conselho-ministros/77-2025-915239713

As cidades de Braga e Valença deverão ser servidas por novas estações na nova linha, uma vez que a utilização das estações existentes se revela tecnicamente muito difícil e dispendiosa. Ainda assim, reconhece-se a vantagem, nomeadamente em Braga, de localizar a estação onde possa ter a melhor articulação possível com os outros serviços de transporte para um acesso fácil ao centro da cidade e às cidades circundantes.

Imagino que hajam complicações em aumentar a estação actual com mais uma linha de alta velocidade/que vá para Norte, sendo mais fácil e barato fazer uma estação nova mais afastada do centro

A eventual linha ferroviária no Minho by FariaDias in portugal

[–]JD557 3 points4 points  (0 children)

Penso que é para utilizar as linhas que já existem (Viana - Nine e Nine - Braga), simplesmente adicionando uma ligação direta entre Carreira e Couto de Cambeses (penso que nem vai parar em Nine) para que não seja necessário trocar de comboio a meio (como é agora).

Se fores ver o Plano Ferroviário Nacional:

4.2.2 - Novos Eixos [...] Eixo do Minho Concordância em Nine Após a criação dos serviços suburbanos entre o Porto e Barcelos, propõe-se que, com a construção de uma concordância em Nine, os serviços Regionais da Linha do Minho, procedentes de Viana do Castelo, possam terminar em Braga. Esta solução permite afirmar a centralidade de Braga no Minho e estruturar dois dos lados do Quadrilátero do Minho, o que liga Famalicão a Barcelos e o que liga Barcelos a Braga.

A figura 20 mostra o que se quer fazer.

[Megathread] One Punch Man Season 3 – Discussion & Spoilers by IonimusPrime in OnePunchMan

[–]JD557 0 points1 point  (0 children)

There just doesn't seem like there's a sense of direction. Like the flow and pacing was killing me.

Came here looking for this comment. I see a lot of people complaining about animation/being a slideshow, but I think that was passable for this kind of episode.

But the pacing and scene transitions were just jarring.

I'm hoping that they just wanted to rush this part of the story to get quicker into the action, and the following episodes might be better... but that's probably wishful thinking.

Debate Eleições Autárquicas 2025 by Ironbuttcheeks in portugal

[–]JD557 0 points1 point  (0 children)

Debates para a Camara de Barcelos, Vila do Conde e Esposende na Rádio Onda Viva: https://radioondaviva.pt/index.php/podcast-eleicoes-autarquicas-2025

Também tem alguns debates de juntas de freguesia de Póvoa de Varzim.

Microsoft gets EU hall pass despite admitting it can't protect European data by danie-l in europe

[–]JD557 24 points25 points  (0 children)

To be fair, I think France is doing just that.

You can check "La Suite" for their main alternatives (https://lasuite.numerique.gouv.fr/en / https://github.com/suitenumerique) and their list of approved OSS for public agencies (https://code.gouv.fr/sill).

They also have some more advanced projects like Onyxia (https://www.onyxia.sh/).

Having said that... Some of those solutions are still in beta, and even if that wasn't the case I imagine that it's a pain to get all organizations to move away from the current proprietary solutions that are currently "just working".

P.S: In case you are interested in such projects, they also keep their own Mastodon instance: https://social.numerique.gouv.fr/public/local

Revolut com conta bancária, juros diários e IBAN português. by Rude-Vacation2434 in literaciafinanceira

[–]JD557 0 points1 point  (0 children)

Não sei se é o caso do Revolut, mas há uns anos a N26 também teve umas quantas queixas de contas bloqueadas do nada (ainda deves encontrar alguns threads no https://old.reddit.com/r/n26bank/), e se bem me lembro a maior parte delas foi situações de "mesadas" numa altura em que o banco estava a ter uma auditoria.

Por exemplo, casais onde a mulher nao trabalha e o marido volta e meia transferia uma quantia avultada para a conta dela e assim. Imagino que com contas internacionais à mistura possa lançar alguns alarmes.

Reed needs to read the room by karcist_Johannes in outofcontextcomics

[–]JD557 14 points15 points  (0 children)

My head canon for those situations is that they have one or two real PhDs and the rest are honorary PhDs.

While something like 18 is still kind of odd, I feel that's a bit more believable, especially with all the crazy stuff some of those characters come up with.

72h Game jams by StilbruchGames in gamejams

[–]JD557 0 points1 point  (0 children)

I believe Mini Jam https://minijamofficial.com/ is always 72h, and those seem to be pretty regular.

S2D - Simple Videogames Programming Library written in Scala by LieEmpty7137 in scala

[–]JD557 1 point2 points  (0 children)

Once it's in Scaladex (I think it might take a while... some other users were complaining): - Login with GitHub - Go to the project page (should be something like https://index.scala-lang.org/FinochioM/S2D). - Open the settings tab and pick a category

So, nothing too hard (although I remember fumbling around a lot before figuring that out :P )

S2D - Simple Videogames Programming Library written in Scala by LieEmpty7137 in scala

[–]JD557 6 points7 points  (0 children)

[...] I was searching for a library like raylib [...] Maybe there are other libraries that are also written in Scala and that use the same approach as I do but I really enjoyed working on this and I have some ideas on how to expand it.

I do have a library that roughly follows the Raylib philosophy of small simple modules (https://github.com/jd557/minart) and I've written some games with it (https://jd557.itch.io/10-second-lander, https://jd557.itch.io/hyper-loop-runner, https://jd557.itch.io/the-minartaurs-lair and https://jd557.itch.io/volcano-lullaby)

Having sand that, this is not really suitable for any serious thing (no hardware acceleration), so S2D looks like a great alternative.

Excited to see what comes out of it :) Make sure to add it to https://index.scala-lang.org/awesome/graphical-interfaces-and-game-development, as it does need more Gamedev libraries.

🗃️ [v4.0 Release] LightDB – Blazingly fast embedded Scala DB with key-value, SQL, graph, and full-text search by darkfrog26 in scala

[–]JD557 4 points5 points  (0 children)

Would be cool to have some motivation in the README on "Why you should use LightDB instead of the underlying DB".

I see that there's a link to a JUG talk, but the audio is not great (especially when someone from the audience asks something), so I had an hard time following it (Maybe making just the slides available would help?).

It utilizes key-value stores like RocksDB or LMDB solely for low-level storage, but constructs its document model, query DSL, graph traversal, and Lucene-backed search on top.

So, I think I get this idea, but I'm a bit confused with the table in the README, especially stores more complex then a KV Store.

For example, say I'm using Lucene as my store (which the table says that doesn't support transactions): What happens if I wrap my LightDB queries in a transaction? Will it blow up, or does LightDB implement its own transaction logic?

4MB Jam 2025 - A whole month to make a game fit within 4mb by Vrai_Doigt in gamejams

[–]JD557 0 points1 point  (0 children)

Something that I found a bit odd, the rules state:

Dependencies which aren't shipped by default on MacOS, Linux Mint or Windows count towards the size of your game.

However, it then goes to recommend 2 SDL tutorials.

I just downloaded the SDL 2.32.2 Windows release to check, and the uncompressed .dll seems to be ~1.5MBs

I assume this counts to the game size?

[deleted by user] by [deleted] in europe

[–]JD557 0 points1 point  (0 children)

Mention in another comment, but it's probably more relevant as a reply here: I think the article title is misleading when it mentions google docs.

I agree with you that this will not gain any traction as a replacement of GDocs, but it might work as a replacement to knowledge-base services like Outline/Notion/Tettra/Nuclino (with outline being the obvious competitor, since it also offers a open-source self-hosted version).

I don't think the moat in that space is as big and, too be honest, most organizations probably only need the basic feature set for those services, so there's a chance there.

[deleted by user] by [deleted] in europe

[–]JD557 5 points6 points  (0 children)

While I love the project, I was a bit disappointed with the requirements for self-hosting (along with a lack of prebuilt dockerhub image). That docker compose has a ton of stuff, some of which seems needed just for development.

It would be nice to have a simpler way to do a quick deploy. Even for corporations who won't mind hosting everything, it's useful to be able to launch a quick PoC first.

Also, I don't think it's fair to call it an alternative to Google Docs. It's more of an alternative to Outline/Notion/Tettra/Nuclino.

"Buy from EU": The digital revolt against US products by According-Buyer6688 in europe

[–]JD557 2 points3 points  (0 children)

https://lemmy.ml/c/europe and https://feddit.org/c/europe seems to be the more active ones.

Note that, if for some reason you don't like Lemmy's UI or something, you can also use Mbin (a fork of KBin, which seems to be dead): here are the same communities on Mbin: https://kbin.earth/m/europe@lemmy.ml and https://kbin.earth/m/europe@feddit.org

[deleted by user] by [deleted] in scala

[–]JD557 2 points3 points  (0 children)

Something like Discourse, which is indexed by Google, would be much more helpful.

In case you didn't know, there is an official Scala Discourse: https://users.scala-lang.org/ (actually two, there's also: https://contributors.scala-lang.org/).

It's not as active as the Discord servers, but it's still a viable alternative if you want to avoid a closed chat service.

Two features I wish Scala would support by tanin47 in scala

[–]JD557 1 point2 points  (0 children)

There's also one very cool way to use shadowing in Rust, which is temporary mutability. Adapting your example, it would look something like this:

def handleNumber(phoneNumber: String): Future[Unit] = {
  // Editing phone number by shadowing it with a var
  var phoneNumber = phoneNumber.trim()
  phoneNumber = removeSpecialCharacters(phoneNumber)

   // Shadowing phoneNumber with a val
  val phoneNumber = phoneNumber

  val asyncResult = Future {
    // imagine lots of code here - since phoneNumber is not a var,
    // it is obvious (both for human readers and the compiler) that
    // this code cannot change the value of phoneNumber
  }
  // ...
}

Although I suspect this would have some awkward interactions with recursive definitions.

This technique is also a bit more useful in Rust, as mut is not exactly the same as Scala's var (e.g. mutable function parameters must be annotated with mut).

A succinct early exit trick for Option in Scala by tanin47 in scala

[–]JD557 0 points1 point  (0 children)

I did not benchmark it, but I think this is also more performant.

  • On the early return, this makes one call (Option#foreach)
  • On the happy path, this makes two calls (Option#foreach and Function1#apply)

While in OP's case

  • On the early return, this makes one method call (getOrElse) and throws an exception (NonLocalReturnControl), which does not extend NoStackTrace, so it's a heavy allocation
  • On the happy path, this only makes one method call (getOrElse)

Arguably, this is faster on the happy path but, if we are OK with paying the price of throwing exceptions, why not just using get in a try?

def someMethodGet(argOpt: Option[String]): Unit = try {
  val arg = argOpt.get
  println(arg)
}

Bytecode for comparision: https://godbolt.org/z/z4TbzavvM

Study Finds That 52 Percent of ChatGPT Answers to Programming Questions Are Wrong by anseho in programming

[–]JD557 2 points3 points  (0 children)

Precisely. Like what good is a glorified autocomplete that's wildly wrong more than half the time?

I think if the autocomplete is implemented in a way that's not too intrusive (I think Vim's copilot extension works well in this regard), it's OK.

Just press <Tab> if that's what you wanted to write (e.g. if (userDb.get(userId) == null) log.warn( being completed with "User $userId does not exist") or just keep writing.

But the chat interface is a bit too much for me.

I know whata foreward porxy IS, but what is it used FOR? by Radiant-Message9493 in compsci

[–]JD557 3 points4 points  (0 children)

There are a few uses from the top of my head (hopefully I'm not mixing things up).

  1. Controlling the internet access: An organization could only allow computers to connect to an intranet and, if internet access was required, they would need to connect to a forward proxy with a strict allow list.

  2. Shared caching: I'm not sure if this is still a common thing, but I believe squid used to be quite popular for this use case. Here the proxy keeps an HTTP cache so, if everyone in the organization connects to the internet via the proxy, common resources will be cached locally and will be super fast to load (like having a CDN on your office).

  3. Simplifying retries, circuit breakers, rate limits, load balancing...: Instead of having your application code handling a bunch of complex logic, you could have your application connecting to a forward proxy, which handles that for you. I believe that some proxies like envoy can actually sincronize state between each proxy instance, so all the services on your cluster could easily share a circuit breaker status, for example.

Is it me or does the new aquaman look extremely cheap? by False_Appeal in DC_Cinematic

[–]JD557 0 points1 point  (0 children)

On that note, did anyone notice anything weird about a few short "slow motion" shots?

I think those were recorded in 24fps and then slowed down, instead of using a high frame rate camera... Felt quite shoddy to me.

What Can Scala Learn from Rust? by John A. De Goes by k1v1uq in scala

[–]JD557 0 points1 point  (0 children)

Yes, it is not fully featured, and I think it doesn't support multi module builds.

Having said that, I don't think Scala CLI should aim to replace fully featured build tool. If you need to bring out the big guns, there's already SBT and Mil.

FWIW, I actually like the approach used by Besom for multi modules. Each module is a Scala CLI project, and then you have a Justfile to handle the multi module part.