Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hgs3
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
38 ms
·
481.
▲
by
hgs3
4y ago
> It is so fun to write applications with. I can't tell if this is sarcasm or not.
482.
▲
by
hgs3
4y ago
I've only toyed around with it, but D does offer the -BetterC flag [1] FWIW. [1] https://dlang.org/spec/betterc.html
483.
▲
by
hgs3
4y ago
> The "Likeability" of C is very underestimated. I like C quite a bit for systems programming because it's design is simple, minimalistic, and cohesive - especially given its age. It does not restrict how I design my softw
484.
▲
by
hgs3
4y ago
Good article. If you're compiling C with MSVC then you can use SAL annotations [1] which serve the same purpose. [1] https://learn.microsoft.com/en-us/cpp/code-quality/annotatin...
485.
▲
by
hgs3
4y ago
> A reminder: the people in the past who went through these things and strived for something more (like the above commenter) are a big part of the reason we have it so easy today. Agreed. Advancements happen because someone somewhere was
486.
▲
by
hgs3
4y ago
> I do prefer snakecase visually but having to press shift for the underscore is a pain Code is written once but read many times. Better to optimize for reading than writing.
487.
▲
by
hgs3
4y ago
> Don't blame people writing software for not wanting to waste their lives translating the same logic to 3 different platforms and then maintaining 3x the code for the rest of their lives. If you decouple your UI from your business
488.
▲
by
hgs3
4y ago
> On the other hand, maybe there should be pushback against shitty inefficient software? Agreed. Some might say "RAM is cheap" but that line of thinking is why one day 64GB RAM won't be enough for a dozen browser tabs.
489.
▲
by
hgs3
4y ago
Processes are the norm at large corporations, but less-common to non-existent at startups. I'm guessing you're working for the former rather than the latter.
490.
▲
by
hgs3
4y ago
> The original creator of the company will care about that because they know why they are trying to solve the problem. Everyone that comes after will not. A good follow up question is why not make CD Baby a non-profit instead of for-prof
491.
▲
by
hgs3
4y ago
There is a lightweight object oriented extension to C called Objective-C [1] that unfortunately never gained much traction outside the NeXT/Apple ecosystem. There is also Cello [2]. [1] https://en.wikipedia.org/wiki
492.
▲
by
hgs3
4y ago
> Now you have a named struct bla_t which is typedef’ed to a type alias bla_t, and the named struct can be properly forward-declared. The article doesn't mention it, but C11 allows typedef redefinitions which means instead of forwar
493.
▲
by
hgs3
4y ago
AI advancements are shining a light on how warped our society has become. We _should_ invent technology to better our lives, but instead its become something to fear as it might destroy our livelihoods. I understand the threatening feeling
494.
▲
by
hgs3
4y ago
When I tried GLib and GTK4 I was surprised how much the former reminded me of Core Foundation and the later Cocoa. Unfortunately, as much as I like C, the GObject system was less pleasant and felt like a poor mans Objective-C. I wonder why
495.
▲
by
hgs3
4y ago
RAII amounts to reference counting which means you need to handle circular references yourself. A garbage collector should handle them automatically. In addition to memory, GC's can catch other unused resources like unclosed file handl
496.
▲
by
hgs3
4y ago
The confusion I have is that the original commenter makes it sound like the abstract machine C is designed for is not relevant today. While modern desktop hardware may use various techniques to improve performance, like cache lines or speci
497.
▲
by
hgs3
4y ago
Those are fair points, but they're probably too specific to the architecture to incorporate in C's general execution model. They're better exposed through platform specific programming interfaces like OpenMP or CUDA. Even a d
498.
▲
by
hgs3
4y ago
> It's really not, though. What C is an abstraction of is computer architecture as it existed by the late 1960s. I don't follow. Barring micro-code, hardware is designed for executing either RISC or CISC instructions. If anythi
499.
▲
by
hgs3
4y ago
C is the best abstraction for many problem domains and that isn't going to change. I understand why folks coming from higher-level languages would dislike it, but for anyone coming from assembly it's a godsend. The speaker discour
500.
▲
by
hgs3
4y ago
You're basically asking why you'd want object files. They're a container of (usually) relocatable machine code. You can inspect or modify them with nm [1] or objcopy [2]. You can link them with object files generated from oth
501.
▲
by
hgs3
4y ago
Nope. I quit news years ago. Consuming it can't do anything for you but rile you up, distracting you from your goals. If something serious happens in the world, you'll hear about it via social osmosis.
502.
▲
by
hgs3
4y ago
> Wasn't that the exact idea of using UCS-2? At the time it gave you 1-1 code-points and code-units. No. I'm saying that encodings don't matter. They are an implementation detail. Many programming languages are forever stu
503.
▲
by
hgs3
4y ago
> There's no such thing as a "code point", sorry to say. Sure there is [1]. [1] https://en.wikipedia.org/wiki/Code_point
504.
▲
by
hgs3
4y ago
I'm planning to use this model when I eventually launch my company. What's unfortunate is I need to handle payments myself because GitHub doesn't have a payments feature for maintainers to leverage.
505.
▲
by
hgs3
4y ago
The real problem is programming languages picking the wrong abstraction for their string type. Strings should be exposed as collections of code points, not code units. UTF-whatever is an implementation detail. Python is one of the few mains
506.
▲
by
hgs3
4y ago
> Our diagnosis is that individual developers do not pay for tools. Disagree. I pay for Visual Assist as an individual because its a huge productivity booster. I suspect the issue is pricing vs perceived value.
507.
▲
by
hgs3
4y ago
> But Rustaceans kind of like to laugh at Go, because it's not as expressive or elegant a language by comparison. Ironic because safe Rust can't express many valid programs, like those with cyclic data structures. > Some par
508.
▲
by
hgs3
4y ago
You can find plenty of interesting UI design in video games: 3D animated menus, non-uniform layouts like radial menus, skeuomorphic design [1], etc. and they aren't difficult to navigate. > I don't go there to wonder how cool w
509.
▲
by
hgs3
4y ago
Presumably C will piggyback on this.
510.
▲
by
hgs3
4y ago
In C the NULL macro can be defined as either (void*)0 or 0. It's only mandated as 0 in C++. The nullptr concept was introduced into C to fix a type ambiguity when NULL is used with generic selection or varargs functions. The ambiguity
More ›