Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
trealira
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
541.
▲
by
trealira
3y ago
That's an interesting perspective. It probably does have a lot to do with the first programming languages you learn. The first programming languages I learned were all strongly typed, so it seemed inherent to the concept of a variable
542.
▲
by
trealira
3y ago
It seems to me less like some elitist exclusionary thing, and more like they're objecting to the idea that if a language isn't within top 10 programming languages used, it must be esoteric and only weirdos and enthusiasts use it.
543.
▲
by
trealira
3y ago
That makes sense. I understand concerns like that. It would be nice if we could just write a contract, one that states that I agree to use the source code only for personal use and that I may not use the code for a commercial product, or th
544.
▲
by
trealira
3y ago
> Ask them to open source the critical libraries, but keep the game proprietary. > There is a good precedent for "open code but closed license," with Barotrauma being one of the most successful examples. Just dropping your e
545.
▲
by
trealira
3y ago
I understand why one wouldn't make software open-source. It's difficult to make a profit from software then. You either have to charge for a service, similar to Red Hat, or charge a subscription for continuous updates (for the con
546.
▲
Ask HN: Is it rude to ask a game studio to open-source a game?
3 points
by
trealira
3y ago
|
9 comments
547.
▲
by
trealira
3y ago
Yeah, it depends on the compiler. I've read a book about a BLISS compiler [1] that does this, but still uses a stack like I described [2]. It implements a hash table that used linked list nodes for collision. A new declaration adds a n
548.
▲
by
trealira
3y ago
> The last thing you want is types when you're a beginner. I disagree. Data types are an intuitive concept. Integers and strings are obviously different, and you can do further and distinguish arrays, characters, and dictionaries. I
549.
▲
by
trealira
3y ago
Modula-2 had modules in 1978, and it was still a pretty simple language. They don't necessarily imply recreating C++.
550.
▲
by
trealira
3y ago
Sorry, I wasn't trying to imply that you didn't know that. I meant to suggest that it would be the most unambiguous way to differentiate them, but then realized that the names weren't accurate because C89 declarations aren&#x
551.
▲
by
trealira
3y ago
I mean that it would complicate just the parser. For many compilers, as soon as the parser sees a left curly brace, it pushes a symbol table onto a stack, and when it sees the corresponding right curly brace, it pops the symbol table off th
552.
▲
by
trealira
3y ago
Those aren't trigraphs; those are macros defined in the <iso646.h> header, like this: #define and && #define not ! /* ... and so on */ In C++, they're actually keywords that are built into the la
553.
▲
by
trealira
3y ago
The second edition of K&R distinguishes between them by calling the pre-ANSI declarations old-style functions, and the ANSI declarations new-style functions. Although, since it's not 1989 anymore, they're not exactly new to C
554.
▲
by
trealira
3y ago
No problem! I didn't come up with it on my own, either. I simply read it somewhere, and now I'm repeating it.
555.
▲
by
trealira
3y ago
I wonder how much this complicates parsing C++. Because of this, you can't discard/free struct and class definitions as soon as you leave the scope, like you can in C, because the definition can still escape the scope by being ret
556.
▲
by
trealira
3y ago
If you simply put braces around it, you'd generate syntactically invalid code when you don't use braces for if-else statements. Consider this: if (e) SWAP(a, b); else something_else(); Currently, that expands t
557.
▲
by
trealira
3y ago
It could help in generic macros, like this: #define SWAP(var1, var2) do { \ auto tmp = var1; \ var1 = var2; \ var2 = tmp; \ } while (0) Previously, you would have needed a third macro for the type, or you would ha
558.
▲
by
trealira
3y ago
My example is slightly contrived because the parentheses around b are unnecessary to cast it, but it becomes more realistic if it's a more complex expression like this: (foo)(a + b) Or this: // Comma expression or
559.
▲
by
trealira
3y ago
Although I'm not who you asked, I can think of a slightly contrived example. If a is a variable name, then this is using b as the first argument to call the function a (which is surrounded by unnecessary parentheses). If it's a ty
560.
▲
by
trealira
3y ago
I was just saying that it's not off-topic. I don't really understand what you're trying to say otherwise.
561.
▲
by
trealira
3y ago
They said C++, but aside from the line containing "std::max," they wrote C code, and what they said applies to C as well.
562.
▲
by
trealira
3y ago
Thanks, that's useful to know.
563.
▲
by
trealira
3y ago
I agree, it is a good reason. At least if you buy it physically, e.g., at Walmart, you can get a refund, or resell the game if not. It's a less risky purchase if you buy it physically.
564.
▲
by
trealira
3y ago
I've called Nintendo support and asked for a refund before. They said they don't allow refunds, but as a one-time exception they would refund my game. Others online have had this happen too. I think this must be an internal script
565.
▲
by
trealira
3y ago
Maybe in the future, to entice people to become public teachers, or at least to stem the bleeding of current teachers, they'll allow teachers to work less. Instead of one teacher teaching a class/subject (like math) 5 days a week,
566.
▲
by
trealira
3y ago
You should read the book Black: The History of a Color by Michel Pastoureau. He analyzes the history of symbolism using the color black in Europe.
567.
▲
by
trealira
3y ago
You sound sarcastic, but yeah, people don't always bring up "concerns" in good faith. "Think of the children" is a good example; it's been brought up by people who are against gay marriage, and in reality they
568.
▲
by
trealira
3y ago
They're still good for baking banana bread when they're black. I don't like directly eating bananas with black skin, though; they're mushy and overly sweet.
569.
▲
by
trealira
3y ago
.
570.
▲
by
trealira
3y ago
It was like this in American cities, too, during the late 19th and early 20th centuries [1]. Yet immigrants still had high fertility rates, although they were declining by then [2]. That second link is a paper that focuses on the Irish immi
More ›