Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sjolsen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
91.
▲
by
sjolsen
12y ago
And its weakness is that those ways in which you can , you're practically required to use to accomplish anything interesting. You can't even perform formatted output without throwing the entire type system out the window.
92.
▲
by
sjolsen
12y ago
>C99 has variable length arrays But they don't give C any power C++ doesn't have. In terms of expressive power, you have things like std::vector, and in terms of performance, everyone except MSVC supports VLAs in C++ anyway, an
93.
▲
by
sjolsen
12y ago
>complexity itself is a sin Complexity is inherent to any task in some degree. That complexity must be expressed in full in any program which performs that task correctly, whether in terms of language/library constructions or the wa
94.
▲
by
sjolsen
12y ago
There's a big difference between Lenovo selling bloatware rights to an adware company and the NSA (or whoever) bugging some hard drives. Is that spyware Windows-specific?
95.
▲
by
sjolsen
12y ago
In a company as big as Lenovo, I'd be kind of surprised if the person or persons who decide what bloatware to load onto the consumer image make any sort of hardware decisions. There's also that this particular kind of compromise i
96.
▲
by
sjolsen
12y ago
>For example, suppose you have a bunch of pid files in a directory, and you want to send all the associated processes a signal. What kind of data structure stream does your signal sending program accept? What program? A single line of sh
97.
▲
by
sjolsen
12y ago
>With that in mind, I would not want to learn a new language for every project I was a part of Well, you have to. Every new project comes with its own vocabulary and semantics. You have to learn those whether they're expressed in te
98.
▲
by
sjolsen
12y ago
>What can you structure with besides syntax? At the interface level, nested navigable fields. >Even data structures in memory have a (binary) syntax No, they don't. Syntax is the expression of structure through the arrangement of
99.
▲
by
sjolsen
12y ago
The solution is actually pretty straightforward: don't do everything with text. The actual content you want to manipulate, sure, do that with text. But there's no good reason to structure with syntax except that that solution is
100.
▲
by
sjolsen
12y ago
>Remember to test your patterns with a print statement first ZSH has an option to expand globs onto the command line the first time you hit return, and issue the command the second. I don't remember what it is.
101.
▲
by
sjolsen
12y ago
> You may have abstract types in which case equality should not be implicitly defined. You may also have codata types where you cannot merely compare "value containment" since it's no longer a concept. These are both impor
102.
▲
by
sjolsen
12y ago
>Most C++ hard core game developers don't even use the STL that comes with the language ... Why do you think they will even consider linking the huge Boost library with their game ? Boost has libraries that address specific efficien
103.
▲
by
sjolsen
12y ago
The STL is a product developed and maintained by SGI. If you look at the containers listed in the article and on the SGI page, you will see a different set than is present in the C++ standard library, especially if you discount the containe
104.
▲
by
sjolsen
12y ago
>Why not use boost intrusive lists? Yeah, why not? "The implementation is complex" is not a sensible reason not to use them; it's the complexity of the API one should worry about, and it seems as simple as adding a link su
105.
▲
by
sjolsen
12y ago
Nitpick: the STL is not standard C++. The containers in the standard library are listed at http://en.cppreference.com/w/cpp/container .
106.
▲
by
sjolsen
12y ago
>The point, of course, is that trying to create "one macro to rule them all" is already wrongheaded. There shouldn't be one universal iteration construct. I agree that MAPCAR et al. should be used when they're approp
107.
▲
by
sjolsen
12y ago
Have you ever personally tried to optimize a Lisp program? It isn't terribly difficult, as optimizing goes. You have full access to control flow as far down as goto, and you can use machine integers and arrays. Depending on the impleme
108.
▲
by
sjolsen
12y ago
>One disagreement I have is Lisp is definitely not designed for high performance. Any competent C programmer would find the suggestion laughable. A competent programmer, C programmer or not, would realize that performance is far more a m
109.
▲
by
sjolsen
12y ago
You can also have 1 GiB pages in 64-bit mode.
110.
▲
by
sjolsen
12y ago
> It's the same issue with the existing standard POSIX API It's only an "issue" if you look at this as being an attempt to create a be-all end-all API, and it isn't. Things like std::filesystem (and POSIX file AP
111.
▲
by
sjolsen
12y ago
I have maintained C++ code that was poorly written, if that's what you're getting at, but I have yet to find myself maintaining C++ code that has been poorly written as a result of the design of the language.
112.
▲
by
sjolsen
12y ago
> the language tries very hard to make sure you can't understand a piece of code out of context The language goes out of its way to make it possible to write code that is understandable with as little context as possible; type deduc
113.
▲
by
sjolsen
12y ago
Was that through technical failing, or was the project just mismanaged into the ground like the Alpha? Or was it killed by AMD's backward-compatible 64-bit architecture?
114.
▲
by
sjolsen
12y ago
No AMD stuff. We just had a box with a couple of Xeons, a Xeon Phi, and a K20.
115.
▲
by
sjolsen
12y ago
> Getting the data to GPU and results back takes just too long I was involved in a database research project recently, and this is exactly what we found: sure, GPGPUs and the like are much faster than CPUs for the right database queries,
116.
▲
by
sjolsen
12y ago
I'll second using Emacs as the primary graphical shell. It shouldn't really be surprising that it's good for that task, since the interface is (or so it seems to me) heavily influenced by Genera's X interface. If Emacs l
117.
▲
by
sjolsen
12y ago
> what you don't want are a bunch of knobs and dials. What you generally need is a guarantee that your RNG interface is feeding you data from the system secure random number generator The two are not necessarily incompatible. The di
118.
▲
by
sjolsen
12y ago
You are correct; and of course, any hardware-level behaviour is likely to be implementation defined. I should note that MSVC [1] guarantees "non-deterministic and cryptographically secure" behaviour; and that libc++ [2] uses the &
119.
▲
by
sjolsen
12y ago
This sort of code is one of the motivations behind improving the random number generation facilities available in C++. If you're using C++ or you're using C and have the option to link with C++, I strongly recommend looking at the
120.
▲
by
sjolsen
12y ago
> that doesn't seem very true, either Strictly, it isn't. The point isn't that there's no syntax, though; it's that there's very little syntax, compared to other languages (consider C++'s… what, 17 op
More ›