General > General Technical Chat
How many people code in C these days, and if so, why?
Berni:
--- Quote from: engrguy42 on May 09, 2020, 05:33:29 pm ---Yes, you can use C# for raytracing. I was merely basing it on my experience whereby CUDA (NIVDIA's GPU API) is pretty much reliant on C/C++, and that's what I was using.
--- End quote ---
Not a problem. C# will import regular machine code DLL files made with C++ in a similar way it imports its own native .net CLR DLLs. Its just not quite as streamlined.
VisualStudio even lets you create split projects that combine C# and C++ code. The C++ part compiles into a DLL and the C# app imports it. Tho its not really all that great of an experience since some boilerplate code is involved to explain to .net exactly how it should use the functions inside the DLL. But it does work fine.
Most modern languages support these because it is required due to how prevalent these compiled machine code libraries are. Tho i will admit that doing something like raytracing in software using python would likely be ridiculously slow (But this is not what python is made for). Yet even things like JavaScript are rather performant these days (JIT compining and such) and run under the hood of a lot of things. Can't say i particularly like JS personally but it can do some impressive things regardless.
engrguy42:
--- Quote from: SiliconWizard on May 09, 2020, 05:54:54 pm ---You can obviously write raytracers without using CUDA, and that's probably what most people were thinking about here when you made that first statement.
But if I were using CUDA, I would personally indeed NOT bother (although it's certainly possible) using any other language than C or C++.
--- End quote ---
I suspect that those who have much experience with ACTUALLY writing raytracers would probably say "yeah, you can use other languages, but since NIVDIA rules the GPU world and they have so freakin' many C/C++ resources for CUDA, etc., it's more of a hobby/science project to use other languages".
And they probably wouldn't turn purple searching Google for exceptions as fast as they could. :D
Out of curiosity, has anyone here written a raytracer? Perhaps you can show some of your results?
bd139:
--- Quote from: engrguy42 on May 09, 2020, 05:46:33 pm ---
--- Quote from: bd139 on May 09, 2020, 05:41:26 pm ---https://documen.tician.de/pycuda/ :popcorn:
--- End quote ---
Hmmm...if I didn't know better I'd think that maybe the only goal of some folks here is to prove me wrong, and they'll go Google crazy to find exceptions to what I say....
Nah, can't be. :D
BTW, at the time I was starting to get into raytracing I was using C#, and wanted to stick with it for the GUI aspects. I wanted to do a raytracer, but have user control (buttons, windows, user controls, etc.).
Unfortunately, integrating the CUDA-related stuff for my NVIDIA GPU's was, as far as I could tell, a HUGE PITA. So I relented and did it in C++. When I saw all the support stuff available if I did it in C++ (including NIVIDA resources), it seemed clear that C++ was the way to go. For me.
Now I'm sure others were willing to use other languages, but I wasn't. Again, I apologize for not going the extra mile.
Bad boy.
--- End quote ---
Actually wasn't Google. I did some experiments with that and eventually settled on cuDF for what I was working on. However shite old rules engine based on 1988 tech written in C# won on price vs matching performance vs staff availability to maintain it :-//
GPUs have other uses...
The point is mostly making broad assumptions is not a good idea.
engrguy42:
--- Quote from: bd139 on May 09, 2020, 06:03:54 pm ---
The point is mostly making broad assumptions is not a good idea.
--- End quote ---
Huh? Are you new here? This place is all about broad assumptions and generalizations and unsupported opinion
:-DD
bd139:
I think the average standards are higher than yours personally.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version