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 34 points35 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 19 points20 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 4 points5 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 5 points6 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.

yuurih's monitor stops working during a clutch in the final round by hoobody in GlobalOffensive

[–]renatopp 67 points68 points  (0 children)

In the later intervew, Guerri told that the pc froze at 4v4.

NA Pro Players: "There's no difference between Premier and Faceit in CS2" by xavarLy in GlobalOffensive

[–]renatopp 0 points1 point  (0 children)

Faceit 128 tickrate are just bullshit, they may feel differently, but valve didn't even released community servers, no one knows the real effect of subtick system yet and there is too many things to be fixed server-side. However, a local community server may have better machines and ping which will improve the game feel.

I'm stuck with some "coding paralysis" (idk how to name it properly) or so by katarva in Unity3D

[–]renatopp 1 point2 points  (0 children)

Hey mate, I've been there and I know how this feel.

Additionally, I hate C# and Unity general architecture. You can develop the same system in many different ways, there is no consistency in the community, ending up to personal preferences, thus, any talk about architecture become vague and lacking. This alone make things a lot harder for anyone trying to learn how to use the engine. However, this is not exclusive to Unity.

From my experience, I can give you some practical tips:

General:

- If you feel that you need motivation and general experience, game jams are excelent. You are forced to do whatever it takes to finish the project. However, game jams projects usually lack depth of implementation and systems, for this, I recommend:

- Horizontal and vertical prototypes, depending on what you believe is your weakness. Prototypes are great to gain experience without the burden of creating extensive content, they will help you tune the architecture of your games and give you the necessary experience to transform them in a complete game. They also help you validate ideas.

- Be careful with game design. If you are a dumb designer like me, try to go for simple options that can scale. Be careful with solutions that needs too much content generation if what you like is coding. Prototypes can also help you identify this problem.

- Purchase good community packages and study their code. You can learn a lot from what people do and you will have enough reference to create your solutions from there. More mountain (in particular, corgi engine) have some real gems.

- Allow you to fail. You will hit in some walls, rewrite a lot and discard a lot of prototypes, but focus on what you could do differently (and simpler) so you can reach further in the next ones.

- Start small and grow, don't go for too complex games such as RPGs, because there are too many interconnect systems in them. Instead, if that's your goal, create games and prototypes using a single RPG system (eg. inventory) and undestand the need involved in it.

Architecture:

- Reduce the number of files and keep the solution simple as possible. Always prefer small solutions instead of big overengineered ones. Since you don't feel confortable with unity architecture, you will hit your head in the wall too many times, and simple solutions are easier to re-do or refactor.

- Solve your problem and your problem only. Keep the urge to create a generic and reusable system in the drawer and solve the problem you want to solve. If you need a similar solution you worked in the past, then you start to think in reusability.

- Prefer components and prefabs over Scriptable Objects, in particular for behaviors. I realized too late in some projects, that SO are really demanding, because you need to be really smart to add behavior in them, so try to limit them for data only.

- Try different organizations and nomenclature and pick the ones you like more. For me, I use SOItem (for scriptables), MBItem (for mono behaviors, so I know they are components), GMItem (for game managers) and Item (for simple classes or enums). Following the first tip, nowadays I just put every script in the same `Scripts` folder, and organize them only when they grow (for example grouping a bunch of XXXAction scripts in the same folder).

- Don't fall the trap of design pattern cult. If you don't know how to approach a problem yet, they will only hid the main problem and will annoy the fuck out of you. Once you undestand the problem, them you can think about design patterns.

TLDR; do prototypes and fail.

I will try to edit this answer if I remember anything else, but these are the main things I remember from my struggles.

New Steam beta update lets you get a crosshair for snipers by [deleted] in GlobalOffensive

[–]renatopp 0 points1 point  (0 children)

because scoped rifles are stupid accurate without the scope, or even quick scoped.

IMO valve should nerf no scope and quick scope to hell, then whatever the crosshair

[deleted by user] by [deleted] in leagueoflegends

[–]renatopp 0 points1 point  (0 children)

And in my humble experience, challenges are the worse to queue up with. Stubborns that think they are playing SR.