[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/g/ the programmer

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 38
Thread images: 3

File: maxresdefault.jpg (54KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
54KB, 1280x720px
>VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO

If you were to design a C API, could you come up with a better name for that constant?
>>
vk_stpvisci
>>
>>62003270
Nope. It describes, in excruciating detail, exactly what it is and what it's for. You couldn't give it a better name.
>>
>>62003270
vk_vistate
>>
>>62003307
You do realize long names, besides looking retarded, are difficult to memorize and type out? Of course a CS graduate has no idea
>>
>>62003270
beautiful
>>
>>62003337
>memorize and type out
IDEs have progressed past Notepad.exe, anon.
>>
>>62003270
VK_STRUCT_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO


There is no such thing as a structure in C.
>>
>>62003351
>I can't code without autocomplete

You can't program period.
>>
>>62003337
If you knew what you were doing you would automatically know how to type something like that.
>>
>>62003359
>i'm stuck in the last generation

did you know threre's a 2nd edition of k&r? check it out.
>>
>>62003351
>>62003404

You're one of those programmers that type one or two letters and begin scrolling through the autocomplete window over 100s of macros with similarly looking names (as is the case with the Vulkan API) and finding what you're looking for eons later and repeating the process next time you need it again?
>>
>>62003337
Who's saying anything about having to memorize this shit? It's boilerplate stuff that you only have to deal with within the contexts where they appear, i.e. in the boilerplate code.

Also, if you haven't noticed, VK struct names follow a logical pattern that makes them easy to remember: The prefix describes type (VK_STRUCTURE_TYPE), the suffix (CREATE_INFO) describes what it's for, and the stuff in the middle describes which part of the API this one belongs to.

3rd, and while it's already been mentioned that IDE's can catch typos like this, modern compilers like clang and later versions of GCC can in many cases also catch them and offer the correct spelling as a suggestion.
>>
>>62003422
structs aren't real, they're just a compiler abstraction for byte offsets in a single monolithic block of bytes
>>
>>62003426
i'm one of those programmers that uses the best tools i can find to help me get my job done
>>
>>62003270
OP (who is a faggot) already tried this shitty thread yesterday.

>>61986924

Pretty obvious it's just another Novidya shill trying to push anti-Vulkan agenda because their hardware flat out runs worse on DX12/Vulkan games.

Their argument is fucking retarded and would only convince a complete drooler that Vulkan is "bad" because it has descriptive API function names.
>>
>>62003337
>memorize and type out
>implying that you're not the CS graduate
Don't they teach you about Vim/Emacs/FuckingEverything auto-complete.
>>
>>62003440
they're a bisonshit
>>
>>62003426
Sounds like you're using a shitty editor.
>>
Is it any worse than OpenGL?
You have to write at least 300 lines of boilerplate in gl before you can even open a gl context with a triangle in it.
>>
>>62003509
uh

if you have to ask, you're better off not knowing
>>
>>62003356
... lern2struct anon
>>
File: 9nohQh4.jpg (12KB, 478x361px) Image search: [Google]
9nohQh4.jpg
12KB, 478x361px
>>62003422
>>62003577
>They don't see that STRUCTURE was replaced with STRUCT

Not even those nice dubs can save you from the embarrassment.
>>
>>62003288
the dubs got the right answer
>>
>>62003337
>type out
Just use ur ide lol
>>
>>62003426
You sound like a retard that's probably not actually hireable anywhere
>>
>>62003270
> name > 31 characters
That's actually forbidden by some rules, and is non-portable.
>>
>>62003978
symbol names longer than 8 characters are non-portable
>>
>not using the official Vulkan.hpp which makes code a lot more cleaner
Bitch
>>
>>62003509
A vulkan triangle is like 1k lines of boilerplate.
>>
File: yellow kek 2.png (21KB, 110x112px) Image search: [Google]
yellow kek 2.png
21KB, 110x112px
>>62003270
>COMPUTER_THINGY_1
We make however many "COMPUTER THINGIES" for each method, function, object, etc. in the default library. We don't tell anyone what they do, we simply let them find out on their own. Eventually we will have entire books published about the "COMPUTER_THINGY" format for C, and people will be arguing about the meaning of each one. Then we sell our compiler/IDE for profit to all the normies who want to jump on the /g/ train because they saw a news title "COMPLEX AND MYSTICAL COMPUTER LANGUAGE, WHO CAN FIGURE IT OUT? INTERNET IN FLAMES"
>>
>>62003270
Every low level 3d rendering api in a nutshell
>>
>>62004112
This. It even sets the shitty create info automatically with some completime magic.
>>
>>62004216
>completime

I declare you retarded.
>>
>>62003978
Internal identifiers and macro names are allowed to be a maximum of 63 characters.

>>62003999
The ISO C11 standard, which has all mandatory features supported in full by GCC, Clang, and the Small Device C Compiler (SDCC), allows internal identifiers to be a maximum of 63 characters, and external identifiers to be a maximum of 31 characters. Considering that most platforms, including both obscure embedded platforms and mainstream platforms are supported by at least one of these three free-as-in-freedom compilers, there is no legitimate reason to restrict one's self to older standards of C for "portability".
>>
>got my head-less vulkan boiler plate setup in C++ using vulkan.hpp
>gotta implement a "screenshot" feature just to see if it actually rendered before I dig in and give it a little personal API
>all this shit involving memory locations and transfering between optimal to linear textures and shit

it's verbose as hell but in a way it's fun. "It's an API with no secrets" as Intel put it.

DirectX and OpenGL are made with such a software and games bias for their abstractions that having vulkan which is "to the metal" of the GPU just feels nicer knowing the only bias the API has is "do you want COMPUTE or GRAPHICS".

It's not for kids making engines. If anything it's the last API you would implement in your game engine or software's graphical layer but at least I can get the GPU to do "exactly what I want" rather than "how opengl does it" and "how directx does it". Hell you can implement opengl and directx in vulkan.
>>
>>62003270
why does it matter? i for one like pretty descriptive constant naming, its not like you have to know its name (any decent editor will have auto-complete) or care about its compilation (its a constant, its name wont matter for the release build)
>>
>>62003426
I'm with you I name each variable the next letter in the alphabet, then double/triple/etc them every time i pass z. that way my code is nice and efficient and the names are really quick to type out.
Thread posts: 38
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.