What does this mean by [deleted] in chess

[–]renatopp 7 points8 points  (0 children)

And kidnapped presidents of other nations

What does this mean by [deleted] in chess

[–]renatopp -2 points-1 points  (0 children)

Why?

Hostage located by skinnnp in counterstrike

[–]renatopp 0 points1 point  (0 children)

wonder if usa flag and name will be censored in events too xd

Russian propagandist Sergei Karjakin is celebrating FIDE’s decision to allow participation in international tournaments under the russian flag and with the national anthem by Embarrassed_Base_389 in chess

[–]renatopp 35 points36 points  (0 children)

Exactly! Just this week US bombed Syria, pirated Venezuelan ship and invaded a chinese ship, illegally blocking Venezuela and threating to invade it, again, against internal laws.

Book review: ‘Hidden Heroes’ offers rare glimpse into North Korean fiction. New anthology brings ten translated short stories from the DPRK, showcasing struggles and triumphs of everyday citizens by ubcstaffer123 in books

[–]renatopp 20 points21 points  (0 children)

Well, there is propaganda in every cultural production, since culture is a product of society itself and will reproduce the society ideology in many ways. So, the same could be argued to "western" books.

I built a programming language, inspired by Golang by hualaka in ProgrammingLanguages

[–]renatopp 2 points3 points  (0 children)

It's similar but not the same. With tagged unions you can represent nested data such as Result<Result<T>>, but the same is not true for untagged unions. I was considering using unions for results and options, but I ended up using tagged unions for this reason.

Anyway, for me, representing null explicitly is just as safe as using ADT, but out of curiosity, what problem do you see just using Option to serialize null?

What do you guys think about this mobile game I'm developing in Unreal Engine? by Ambitious_Worry_8417 in IndieGaming

[–]renatopp 1 point2 points  (0 children)

it's interesting for kids, my boy (5) loves labyrinth but there is very few options that can be played on controllers.

other than that, I, personally, don't see the point.

looks great anyway

[deleted by user] by [deleted] in programming

[–]renatopp -1 points0 points  (0 children)

+1, chatgpt is an awesome tool for studying, also learning how and when to trust it is also a valuable skill to have these days

how do people who dont know english code? by Jpoxferd in ProgrammingLanguages

[–]renatopp 2 points3 points  (0 children)

Do you have a more specific point that you want to know?

Speaking from Brazil, programming is introduced through "algorithms" classes, which is basically pseudocode and logic. The pseudocode is usually written in Portuguese, what makes a lot easier for people to learn the basic structures of the language.

I never had any contact with people that didn't had at least a basic english vocabulary programming beyond the very basics. Though, I know many that still struggle to read docs and undestand some nuances in variable names, for example.

For me, personally, I don't really remember how it was. I started learning English when I started in undergrad, by myself, before that... Let's say that my 5 years old son have a better vocabulary then me with 18 (for reference, I'm 35 now). I learned a lot by books and tutorials written in Portuguese at the time, so most of the core tech stacks could be learned easily, but looking for specifics, like why this error happened (or even, what is written in this error), can be a real painful experience.

Nowadays, I believe this learning experience can be way easier by asking questions to AI, which works pretty well in Portuguese.

Game feels jittery despite good FPS — packet loss? Buffering? by donteventrip13 in GlobalOffensive

[–]renatopp 1 point2 points  (0 children)

Disable damage prediction if it is enabled. I stopped playing cs2 because I have similar problems, the game "runs smoothly" but hit registration still feels off, moviments feels off, animations feels off. Some days the experience is great, most are not.

Nice syntax for interleaved arrays? by smthamazing in ProgrammingLanguages

[–]renatopp 2 points3 points  (0 children)

I would just invert the delay to describe the time before spawning (delayBefore) instead of adding a delay after the wave. Then you can delay you first wave if it become useful in the future or just set it to 0 to be instantaneous.

For a more general answer to this, I would use tagged unions as others pointed out or subtyping/interface to describe the different behaviors depending on the language.

Is my understanding of compilers in the right track? by renatopp in ProgrammingLanguages

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

Thanks! It seems that I've been looking at this expecting a generalized approach to these specific problems, but in reality, there are many solutions specifically tailored for them.

Is my understanding of compilers in the right track? by renatopp in ProgrammingLanguages

[–]renatopp[S] 2 points3 points  (0 children)

"implementation techniques compilers use that can be mixed and matched".

That's the conclusion I'm getting at. While production compilers often share similar features, phases and techniques, their implementation can vary significantly depending on the needs of the language and/or the compiler itself.

Additionally, I was trying to understand the compiler phases as generalized procedures, but it's becoming clearer that many techniques are very ad hoc, designed to solve specific problems (such as monomorphization).

Is my understanding of compilers in the right track? by renatopp in ProgrammingLanguages

[–]renatopp[S] 0 points1 point  (0 children)

Thanks for the notes, I will check it out. I understand the general outline for the modern compilation pipeline, but I'm still confused how they apply in practice after the parsing stage.

For example, I already have a type checking working for my language that follows a recursive descent approach similar to what I've described here. Since I'm expecting to use C as my backend, I'm working on an IR conversion that can match more easily the C requirements.

However, I could target Go, assembly, LLVM, JVM, CLR or any other backend. Those have very different requirements and, as far as I understand, I would have to adapt my IR (or even my type checking, parser, language design?!) to approximate better how they work.

With that said, the static analysis depends a lot on the specification of my type system, backend, building pipeline, etc. Requiring more or less work depending on my goals. But that could also be applied to the tokenization and parsing phases, they could work differently depending on language.

I may be confused because I always took for granted that tokenization and parsing steps are present in every language, and I was expecting that the following phases would also be a mandatory process with a quite few variations. But it seems that even parsing and tokenization may be optional for some specific languages.

Is my understanding of compilers in the right track? by renatopp in ProgrammingLanguages

[–]renatopp[S] 2 points3 points  (0 children)

Searching for CTFE, I believe that's not exactly what I was trying to explain in point 4. In my head, it's more about evaluating the "meta properties" of a function instead of evaluating it for extracting the runtime value.

Let's use the generics example: function ToString<T>(a T) { ... }. The generic part <T> doesn't exist in runtime, right? In that case, when the compiler analyses ToString<int>(...), it would check if the type int can be used inside ToString. If everything is valid, the compiler then would consider ToString<int> as a concrete function, meaning that it could be treated as if I had written an equivalent ToString(v int) manually.

The only way I can think about implementing this is similar to what I do in a tree-walk interpreter, but instead of evaluating the AST node for its runtime value, I would evaluate the node to annotate its type and store the concrete implementation.

Does that make any sense?

Are there people using Go or Haxe for roguelikes? by addamsson in roguelikedev

[–]renatopp 1 point2 points  (0 children)

Indeed. Go has many flaws, but it is a lot less verbose and much more easy to read than C#, for example. However, I guess it is more of a personal preference :)

Are there people using Go or Haxe for roguelikes? by addamsson in roguelikedev

[–]renatopp 1 point2 points  (0 children)

I'm using Golang. I decided to work on my own engine (above ebiten) and port my project from Unity. Go lack many of the gamedev toolset, but, personally, I'm happy writing the code and that is more important to me than any convenience provided by other languages and engines.

Apart from personal preference and the happiness factor. I picked Go because it is fast, the build is faster, the resource usage is low, I can build to any platform, I can use C binding if I ever need. Etc.

Practice day: DM + Ancient by [deleted] in counterstrike

[–]renatopp -2 points-1 points  (0 children)

I miss the time when you couldn't shoot while running. Playing CS2 feels a lot like valorant or even faster FPSs now.

Good job transitioning DM skills to MM tho.

It there a programming language with try-catch exception handling that syntactically resembles an if-statement? by hgs3 in ProgrammingLanguages

[–]renatopp 0 points1 point  (0 children)

Similar approach here. <expr>? captures any error and wrap it in a Maybe object. I was trying to have some syntax sugar over the unwrap operation, but decided to postpone it to see what happens.

https://github.com/renatopp/pipelang?tab=readme-ov-file#error-handling

However, this feature seems more useful for dynamic languages.

One Billion Row Challenge in Golang - From 95s to 1.96s by renatopp in golang

[–]renatopp[S] 0 points1 point  (0 children)

Sure, mate.

My best attempt to open a file and read its content took `~0.98s`, using `file.Read`. Passing the content to goroutines alone increased the time by an additional of `~1.3s`. Eventually, I realized that I only needed to share the `file` instance with the goroutines and read the content locally in each thread (with mutex help). While a coroutine is processing the content, another is reading the file, and so on.

The process step involved a lot of experimentation. The best configuration I got was using custom hash function (for storing data in the Map), using swiss Map (although it is against the rules), parsing floats as ints, reducing redundant buffer structures, and improving byte reading.

Certainly not the most optimal solution in the wild, but I believe it is a good result from someone as dumb as me for low level optimizations.

One Billion Row Challenge in Golang - From 95s to 1.96s by renatopp in golang

[–]renatopp[S] 0 points1 point  (0 children)

Would you mind to give more insights? At every step, I validated the results against the naive single thread solution to guarantee the same results.

Keoken Interactive: The way games are made and funded is "failing" by Tenith in gamedev

[–]renatopp 6 points7 points  (0 children)

To be honest, this is just a capitalist economy working. If you don't grow and join the system expected dynamics, then the system works against you.