HackerTrans
トップ新着トレンドコメント過去質問紹介求人

dgentile

no profile record

投稿

Nvidia DLSS SDK Now Available for All Developers

developer.nvidia.com
1 ポイント·投稿者 dgentile·5 年前·0 コメント

コメント

dgentile
·5 年前·議論
Edited: Looks like they have safe alternatives: "

  - strlcpy() if you really just need a truncated but
    NUL-terminated string (we provide a compat version, so
    it's always available)

  - xsnprintf() if you're sure that what you're copying
    should fit

  - strbuf or xstrfmt() if you need to handle
    arbitrary-length heap-allocated strings
"
dgentile
·6 年前·議論
Agreed. Ownership would be way too confusing to start out with.
dgentile
·6 年前·議論
I think starting with a language with static typing would be better. With Python or Javascript you still need to know how the types work otherwise you can run into unexpected "defined behavior". Something like Golang makes a fair compromise between C and Python: it is statically typed, compiled, and has a garbage collector.
dgentile
·6 年前·議論
C++ is really nice for low-level OOP, and compared with C it adds generics and classes. Compared to Python, C++ is lower-level and can have significant performance gains with a well written program. With regard to Julia, if you write your code in "the right way", it is also compiled and low-level.
dgentile
·6 年前·議論
The problem is that fundamentally we always have types. We must define different types of bytes and the different things we can do with those bytes. If you can generate a binary from your programming language, it must use a form of static or inferred typing to know what assembly code to generate. A dynamic language just checks at runtime, and adds a bunch of overhead, which isn't always necessary, and is more likely to result in weird "defined" behavior like we get from javascript and php. Typescript is very popular because you can make certain guarantees at compile time, instead of a vague hand-wave of "the code looks good".

As an example of the benefits of type-checking, in the Vulkan api, there are a lot of handles. VkRenderPass, VkPipeline, VkSwapchain, VkDevice, etc. All of these are just pointers. If we take a function like:

    void vkDestroyCommandPool(VkDevice,VkCommandPool,const VkAllocationCallbacks*);`
And remove the type checking:

    void vkDestroyCommandPool(void*,void*,const void*);
It is the same API, but without type-checking. Even if the parameters are labelled, with this new API I could mess up and pass the wrong thing.
dgentile
·6 年前·議論
This exactly. That she's returning home from school at 6:30! The author didn't give their daughter's age, but we can assume it's right before 14, so maybe 12-13. I'm in high school, and I take a couple HL IB classes, school always gets out for me at 3, and then I do cross country until 5. That is already a long day. Then I go home, eat, do homework, and depending on the workload it could be anywhere between 8:00-12:00. Finally I'm able to go to bed, and redo the whole thing. I am a high schooler, and I'm taking high level classes for credits in college. The author's daughter is probably a middle schooler.

The issue is the daughter doesn't have time to be creative. I program, edit videos, etc., but all of that I have to save for the weekends. The daughter probably doesn't have the energy to be creative and just uses their phone during some downtime.

With my generation we are not always on our phones like many would believe. Pre-covid we would gather and talk after school, during lunch, in class. If I went with my friends to lunch it is acceptable to check your phone but we would never find it acceptable to be on your phone the whole time.

The issue is probably not the daughter, but the workload.
dgentile
·6 年前·議論
From purely a programming perspective: Have they not heard of enums?
dgentile
·6 年前·議論
Free Software is amazing. I love emacs, Firefox, bash, zsh, nginx, postgres, llvm, linux, freebsd, and many other packages. But, I think that there are two points to be made with regard to commercial software.

1: Domain specific programs, and polish. Logic Pro X, Final Cut Pro X, Ableton, Cubase, Premier Pro, are are excellent pieces of software that people pay for and use every day. Where is the free software equivalent that isn't glitchy and has a usable, slick, ui? The more specific the case gets, and the less related to systems a Free Software project is, the less likely it is to exist or have any polish. I can list Postgres, Redis, Linux, OpenBSD, NetBSD, NodeJS, WebKit, SpiderMonkey, LLVM, GCC, Binutils, Busybox, etc., but where is the free software iMessage, Google Docs, Discord, iTunes, Steam, Google Maps, etc. There may be some of these projects out there for what I just listed, but none of them have a userbase as big as that proprietary software. The only things I can think of are VLC, Blender, and Android.

2: Free Software can only exist with Commercial Software. How many people that work in Free Software are software engineers working at a corporation? What pays for this Free Software to exist? Microsoft hosts github, big enough Free Software projects have budgets and employees at other companies paying for all of it.
dgentile
·6 年前·議論
High Schooler here. I've been teaching myself Vulkan and am writing a videogame, but I'm so exhausted on weekdays from my course-load that I only work on it on weekends and breaks. I wish I could put more time into it but trying to program after 6+ hours of school and then homework is a nightmare, and that code usually ends up being buggier than my normal output, with low productivity.