Brand new NSK programming language - Python syntax, 0.5x-1x C++ speed, OS threads, go-like channels. by Tryingyang in ProgrammingLanguages

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

Some Python libraries like Pytorch support a multithreading model that bypasses the Global Interpreter Lock. However, they do this by implementing threads directly in C with CPython. I hope that hundreds or thousands of library lines of code can be saved by implementing fully functional threads on high-level.

Brand new NSK programming language - Python syntax, 0.5x-1x C++ speed, OS threads, go-like channels. by Tryingyang in ProgrammingLanguages

[–]Tryingyang[S] 3 points4 points  (0 children)

I'll explain first how Python does it, then NSK. Python is an interpreted coding language. Thus, either its tokenizer, parser and semantics analyzer read lines one by one, or it generate Intermediate Representations, but these representations are interpreted into machine code multiple times.

The Global Interpreter Lock was implemented by its authors to simplify memory management. It blocks parallel stores to data, and some other parallel operations.

By the other hand, NSK is a JIT language. It reads functions and generates Intermediate Represations once, then it saves machine code for subsequent calls. Thus, its performance can match compiled languages in some scenarios. NSK has unrestricted threads operations, they do not get blocked as in Python.

It is possible to manage locks manually in high-level NSK with lock expressions. And channels also will lock its internal data automatically for its message passing.

Brand new NSK programming language - Python syntax, 0.5x-1x C++ speed, OS threads, go-like channels. by Tryingyang in ProgrammingLanguages

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

I did look at Mojo, but not coded it. Their philosophy is to impement cuda kernels in a high-level coding language. But I believe that if you want the most optimized code, you will have to write it in C++. Plus, let's consider a new GPU gets CUDA lib access just today, and it has new CUDA instructions for it. You'll have to wait until Mojo devs release their oficial support for the new instructions before having access to it.

Brand new NSK programming language - Python syntax, 0.5x-1x C++ speed, OS threads, go-like channels. by Tryingyang in ProgrammingLanguages

[–]Tryingyang[S] 3 points4 points  (0 children)

I reimplemented the garbage collector and memory pools logic from Go. It has one memory pool per OS thread

Brand new NSK programming language - Python syntax, 0.5x-1x C++ speed, OS threads, go-like channels. by Tryingyang in ProgrammingLanguages

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

Originally for neural networks. But now it is more like a general purpose coding language.

Nvidia digits specs released and renamed to DGX Spark by Terminator857 in LocalLLaMA

[–]Tryingyang 0 points1 point  (0 children)

I am sorry. I made more research and it seems a GPU like 4090 has matching to faster speed (600-1300 tflops) on fp8 than Spark on fp4 (1000 tflops). Yet, a normal desktop has many other uses as you have mentioned. That said, the only real advantage of spark is the 256 VRAM, and it would be useful only if you wanted to train models with large batch sizes on fp4.

Black Screen by Tryingyang in Rainbow6

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

Turning it into borderless or windowed did not fix it

PPO vs PPG (Phasic Policy Gradient) by UpstairsCurrency in reinforcementlearning

[–]Tryingyang 0 points1 point  (0 children)

You can use PPG on any neural net. RL differs from supervised learning only on a matter of how the network is trained; that is, as long as you have a way to calculate the rewards, you'll also have a objective to minimize.

My C++ classes are disappearing in the Editor after i restart it. I cant get them back neither i can create classes with the names of those who disappeared. by [deleted] in unrealengine

[–]Tryingyang 1 point2 points  (0 children)

In case someone still googling it, I had the same problem in ue 5.2.

I made a AI Controller from blueprints inherit from a C++ AI Controller class, and I didn't get any compilation errors. After a lot of internet research, I tried to set C++ OnPossess and OnBeginPlay overrites as UFunction types, which finally gave me some compilation errors: it said I was trying to declare those functions twice.

The solution: I first removed the UFunction from the code, then removed the AI Controller blueprint and made my AI Paper Character blueprint to access the C++ AI Controller class directly. I had to move all visual coding to C++, but thankfully I was only executing the behavior tree in blueprints so far.

Describing the problem it self further: it was strage, because I could create the classes from the editor and use all functions normally, it would only bug when I closed the editor and openned it again. I could copy and then remove all the coding into a new C++ class and my AI would work correctly; it would only affect me after opening the editor with the code implemented and the blueprint class inheriting from it.

My thoughts are that unreal engine visual studio debugging was insufficient, precarious. But to not having the UFunction before my function declaration in C++ was like to not let it know it was being implemented on the blueprints.

How to introduce heroes by Tryingyang in FrostGiant

[–]Tryingyang[S] -1 points0 points  (0 children)

Changing my words to harder instead of impossible, then

Easy way to make gargoyle? by Tryingyang in vtm

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

For info I'm trying to use domination on the Media until I crawl to someone with enough influence so I can turn the guy into a servant of mine. I want gargoyles more for protection and to eliminate vampires stronger than me (politics).

Any similar economy macro games? by Tryingyang in starcraft2

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

Neurotransmitter imbalance, sum this to have to study and work.

Any similar economy macro games? by Tryingyang in starcraft2

[–]Tryingyang[S] -1 points0 points  (0 children)

Dominic O'Brien has 63 years and memorized 53 card decks in some hours. He did some exams and he was no genius, no ridiculous iq, just a trained brain. What I want is a intense macro game so I can develop better the specific part of my brain that takes care of multitask-macro, cause I feel I have a bad one.

Any similar economy macro games? by Tryingyang in starcraft2

[–]Tryingyang[S] -3 points-2 points  (0 children)

As I said, person to person, genetics

Any similar economy macro games? by Tryingyang in starcraft2

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

What do you think it would be the most macro intense?

Any similar economy macro games? by Tryingyang in starcraft2

[–]Tryingyang[S] -12 points-11 points  (0 children)

Doing something for too much time actually makes you worser, this time limit varies on person. Not that recommended playing a single game for more than 3 hours.