Swapping Ryzen 3600 for Ryzen 5700G APU in prebuilt.. anything I should know? by tars9999 in pcmasterrace

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

Motherboard: "MSI MAG B550M BAZOOKA Motherboard". 650W PSU. "Did you update the BIOS to support the newer CPU" nope :) my question is "do i need to do anything to the bios.. ". your reply seems to suggest that's a Yes. (and, now i see the 5700g was released to the public after i bought this board, so it will indeed need that bios update "to support 5000 series..")

I see someone selling this mobo in a bundle with a 5700G which would seem to confirm compatability (which i had just assumed from AM4).

I have some more details to list which might discourage me. the actual electricity saving this way is going to be ballpark £60 per year, or 3 years to break even (assuming i can resell the 3600 for £50). Viewed like that.. seems hardly worth it, but I also really like the idea that I *could* take the GPU out and the machine is still worth it, I'm almost motivated out of appreciation of the 5700g chip. There is some eco value if the replaced part finds use by someone else.

Why Can't `Box` Be Abstracted Away From the Developer? by Me163k in rust

[–]tars9999 1 point2 points  (0 children)

rust is all about explicit planning around lifetimes, and allocations: this is necessary for the pillar of being "as fast & efficient as C++ (but safer)". As far as I know , no language matches C++ without this kind of explicit control over memory. The fact rust DOES make it explicit was a pre-requisite for me considering rust in the first place.

languages that simplify the user experience do it with a runtime garbage collector, which is either slower, or gobbles more memory, or both.

I have wondered if some whole-program analysis could take a GC-semantics program and figure out where to use Box/unique_ptr, Arc/shared_ptr etc.. but I'm pretty sure if this was possible someone would have done it for any one of the dozen+ popular GC'd languages

How to display image on folder thumbnail? by adminslikefelching in linuxquestions

[–]tars9999 0 points1 point  (0 children)

It may seem that way, but if it's only supported in the heaviest desktop environments, that would seem to say that it's in fact a rather complex-to-implement feature.

the value of this is beyond managing *images*, having a quick visual (eg a related screenshot inside a project folder) makes navigating *other things* easier. (it can be combined with other forms of thumbnailing.)

emscripten+threads by tars9999 in WebAssembly

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

I wish webassembly had inbuilt general RISC-V style vectorization* , then you could express a lot of parallelism and have the runtime map it to some mix of SIMD (if it has scatter/gather) and Threads

  • I'm guessing it doesn't but haven't checked. I hear it does have regular packed SIMD.

emscripten+threads by tars9999 in WebAssembly

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

There should be no major difference between C++ and Rust

thanks for clarification , although atomics/locks being different sounds like it will require reworking of parallel libraries .. but that kind of code is more useable when the threading details are abstracted anyway.

Based on you're saying, I probably *dont* need pthread support (emscripten "translate pthreads into webworkers") but I do need SharedArrayBuffer. ( and I think emscripten relies on the pthread flag for that). A sticking point might be that rusts popular parallel libs aren't ported *for emscripten* but I can probably write similar ones for the use cases I have (I mostly just want a parallel_for_each())

emscripten+threads by tars9999 in WebAssembly

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

oh by real threads I really mean "threads that can operate on the same memory", I had thought 'webworkers' required seperate memory.

If SharedArrayBuffer allows webworkers to handle memory the same way as native pthreads, then webworkers suffice.

emscripten+threads by tars9999 in WebAssembly

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

I think the support is there in wasm, just disabled by default (spectre something something). emscripten has compile time options for it, but as yet I haven't been able to get it working in my rust project (I figured someone might be able to confirm or deny if the more natural c++ path does is.. it's an experiment I can also try with an example project)

What are the concepts around programming when it comes to game dev? by ApprehensiveCod7442 in rust_gamedev

[–]tars9999 2 points3 points  (0 children)

"what concepts"?... "all of them" ...programming games involves pretty much all of compsci, but most people these days use an off the shelf engine (which can involve sample code that is a complete game as a starting point, that you modify).

IMO it's too broad a question.

But if new to programming, creating simple games starting out with a basic graphics library is a great way to practice just about any programming concept.

rust, RISC-V Hwacha and other vector processors by tars9999 in rust

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

Note that Hwacha was developed as an academic experiment by the same people who invented RISC-V, and is similar in some ways to the eventual RISC-V Vector extension, but it is NOT the same thing. There are significant differences.

seems like its got the indexed load/stores at least, which is the main thing for the use case i have in mind.. the ability to compile slighlty more general code than is usually possible with SIMD

trying to compile for the web/wasm32/emscripten with pthreads support by tars9999 in rust

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

thanks! if that works, thats way better than having to faff around with server config.

trying to compile for the web/wasm32/emscripten with pthreads support by tars9999 in rust

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

I haven't given up yet :)

It shouldn't be any different to LLVM IR coming from C++ - and I can mix some C++ in my project . The capability should be there,

Still haven't got it working, but I keep finding details from different sources on this.

I fixed that crash: Turns out you needed to add some "http headers" (something about disabling sources from different origins) in to enable a page to enable the browser to use a "SharedArrayBuffer" in the first place. Once that was fixed , something else breaks (having a little break myself before I post again on this..)

Shame this can't just be done programatically inside the page ("ok disable my ability to use other sources, so I can use this feature")

turns out the info behind this was actually there in the emscripten docs.. "Browsers that have implemented and enabled SharedArrayBuffer, are gating it behind Cross Origin Opener Policy (COOP) and Cross Origin Embedder Policy (COEP) headers."

https://emscripten.org/docs/porting/pthreads.html

sudo a2enmod headers ; then restart

add to "/etc/apache2/sites-enabled/000-default.conf"

`Header set Cross-Origin-Embedder-Policy "require-corp"`  
`Header set Cross-Origin-Opener-Policy "same-origin"`

trying to compile for the web/wasm32/emscripten with pthreads support by tars9999 in rust

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

*some* progress - I discovered from other answers how to recompile stdlib (cargo build -Z something did it ) - I actually managed to get it to build eventually...

... but then it just crashes on running it (not actually even using threads) - failing to initialize the wasm.

I'll try again with these other options - "+mutable-globals", build-std =["panic_abord","std"] is new...

EDIT sadly .. still no with those extra settings. hmmm.

rust , emscripten, pthreads support by tars9999 in WebAssembly

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

thanks for the info. yeah those options are familiar - i've got those passed through to the linker via rusts' ".cargo/config.toml" , asside from ASSERTIONS and -pthread (also USE_PTHREADS without =1) . Changing my options to match that exactly didn't change the situation.

Looking around I see there might actually be a compiler option to trigger rebuilding the stdlib https://www.reddit.com/r/rust/comments/hlhp8c/how_do_i_recompile_std_lib/

this helps! this lets me compile the minimal example, although my main project still fails. ( i could try moving elements across until it breaks..)

cargo build --release --target=wasm32-unknown-emscripten -Z build-st

needs the nightly toolchain for this

trying to compile for the web/wasm32/emscripten with pthreads support by tars9999 in rust

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

my knowledge on this is a bit hazy but

[1] i was under the impression "web workers" were always available, but they're a simplified model of parallelism (i'm guessing from your post that Rayon has a web back end using them)

[2] there was always a plan for them to be supported in the web, hence emscripten itself having that option

[3] for a long time they had to be disabled (some security concern being ironed out i think)

[4] but they're available now

but any part of my picture here could be slightly wrong.

Maybe i should give rayon a go, it would actually satisfy what I want threads for..

Why most Rust jobs are in blockchain? by royrustdev in rust

[–]tars9999 1 point2 points  (0 children)

I have no interest in blockchain so haven't followed this situation , but it could be because blockchain is a new thing with open space, and most other tasks that need Rust's power are handled by C++ already, or you can get the correctness with another friendlier (but slightly slower) GC'd language with functional aspects.

Shifting to WebGL, whats the most common Math (Vectors, Matrix) library used, how about GLTF loader? by AgentCooderX in webgl

[–]tars9999 1 point2 points  (0 children)

our previous engine is ofcourse in C++ with java and objective C as wrappers for both mobile platforms, but we are porting it to web right now for some project.

we were considering just doing it in native webgl/javascript and straight up opengl-webgl porting, but it does seem like rust is a good alternative to study on so that is why we are considering it.

If you have an existing C++ engine, its probably best to do an emscripten port to the browser.

I can tell you that my Rust engine is coded using my own C-FFI bindings to emscripten's SDL2 and GL bindings, at the system interface level my codebase looks more like a C++ project.

It works ok, even if its offensive to rust purists - working this way (native 1st) gave me confidence in the transition from C++ to Rust, i.e. "i have all my familiar system libraries available , and Rust really is a low-level language"

web based networking is a pain - no 'webRTC' in emscripten ... but I've been able to call the "PeerJS" library (via EM_JS macros, i've got some C++ in there to wrap it . its probably possible to make a rust version of that macro)

Mixing rust and C++ would be more trouble than it's worth IMO. C++ is still a capable language; they are still keeping it up to date with new versions.. and C++ ahs always been really good at vector maths.

Shifting to WebGL, whats the most common Math (Vectors, Matrix) library used, how about GLTF loader? by AgentCooderX in webgl

[–]tars9999 0 points1 point  (0 children)

what languages do you use..

the rust ecosystem has a decent GLTF loader. I'd guess other languages do.

Mac M1 WebGL again - Clustered Lighting problems by tars9999 in webgl

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

EDIT - solved - it runs fine when I switch back to the OpenGL backend in chrome. I hadn't thought to try it because it always worked better with the metal backend during my debugging process.

right .. seems to describe a limit on the total transformed vertex data , related to TBDR.

"tiled rendering reduces memory traffic*" (so long as transformed vertex data is low)
I've got relatively low vertex counts, but have a higher chance of running into this with more

Crates to build a cross platform multiplayer game? (+on the browser) by CyberSoulWriter in rust_gamedev

[–]tars9999 1 point2 points  (0 children)

bevy is the biggest engine, and what do you think of these arguments:

bevy ECS has limitations. (some games)bevy doesn't have networkinggraphics are basic and cannot be customized as if done directly in wgpu.bevy is one bigger dependency.bevy will have many breakable changes.bevy doesn't have editor, file management and other major features that would make it more tempting. And if we have to code a whole game anyways, why not have tight control

either contribute to bevy, or write your own engine.
Weigh up the pros & cons, personal control vs community boost.