Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
p0nce
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
90 ms
·
961.
▲
by
p0nce
11y ago
> Rust cares about first-class FFI support; in particular, copying strings at FFI boundaries is right out. That is why Rust needs C strings to be a separate type. How does Rust handle strings encoded as UTF-16 or UTF-32? Does it need imm
962.
▲
by
p0nce
11y ago
I'd even say it's generally faster because you can use integer as template arguments for enforced constant folding. Typically in video work: make a code path specialized when block width is 8, 16, 32 etc. Something that a C compil
963.
▲
by
p0nce
11y ago
Maybe what the Objective-C runtime does isn't really needed? It doesn't make much sense to have every method patchable, it doesn't make much sense to be able to build classes at runtime, and it doesn't make much sense to
964.
▲
Unums version 2.0 announced [pdf]
(pdf-archive.com)
2 points
by
p0nce
11y ago
|
0 comments
965.
▲
by
p0nce
11y ago
Why this dismissive comment? auto is definately overused in ways that are unreadable, exactly like the blog author says. Marking the type explicitely may be less generic in a way, but it helps readability so much by providing redundancy.
966.
▲
by
p0nce
11y ago
I've found NaN initialization for floats to be a useful default (like undefined in Javascript) since it propagates. Integer have no NaNs, so they are initialized with 0s since no other value really fits. I don't know for chars but
967.
▲
by
p0nce
11y ago
I once implemented a CBOR parser and found that a strange oddity.
968.
▲
by
p0nce
11y ago
We are seing lots of .unwrap() because Rust has no monadic notation. That replaces recoverable errors with crash.
969.
▲
by
p0nce
11y ago
Agreed. If you are using C++ but no exceptions, no RAII, and no std::unique_ptr, you are avoiding the best part of C++.
970.
▲
by
p0nce
11y ago
Has someone compared the results of Quick Sync HEVC encoding with other codecs?
971.
▲
by
p0nce
11y ago
D offers a number of improvements in all directions: http://p0nce.github.io/d-idioms/#How-does-D-improve-on-C++17 ? The fact that is has better syntax is almost anecdotal. Same story for Rust.
972.
▲
by
p0nce
11y ago
Good news then. There is no shortage of speedup when we stop considering all memory being equal.
973.
▲
by
p0nce
11y ago
I see what you mean. You can create such new types with std.typecons.Typedef https://dlang.org/phobos/std_typecons.html#.Typedef Though it's less pretty.
974.
▲
by
p0nce
11y ago
Wild guess: perhaps their OpenCL to FPGA compiler. OpenCL is many times easier to program than VHDL.
975.
▲
by
p0nce
11y ago
GPUs are often considered "hard to program", let's see how this goes for FPGAs.
976.
▲
by
p0nce
11y ago
Like others said, this can be done as a library type in D: http://p0nce.github.io/d-idioms/#Recursive-Sum-Type-with-mat... edit: not that it proves anything, just that "it can eventually be done".
977.
▲
by
p0nce
11y ago
I loved it when they removed experience points.
978.
▲
by
p0nce
11y ago
std.typecons.Typedef does something similar: http://dlang.org/phobos/std_typecons.html#.Typedef
979.
▲
by
p0nce
11y ago
It's amazing you have to justify this view point. There are books precisely documenting the correlation between quality, speed of execution and lower costs. http://ptgmedia.pearsoncmg.com/images/9780132582209/
980.
▲
by
p0nce
11y ago
You can setup IRC bouncers pretty easily.
981.
▲
by
p0nce
11y ago
What I do for SVG logos is coding them directly in a live editor: http://www.gamesfrommars.fr/live-svg-editor/
982.
▲
Living in the Age of Software Fuckery
(medium.com)
10 points
by
p0nce
11y ago
|
0 comments
983.
▲
by
p0nce
11y ago
1.5 has an exact representation in floating-point, so adding 1.5 + 1.5 is always going to give you 3.0 in floating-point, also exactly represented. Then whatever the type of integer rounding you do, you will get a solid 3.
984.
▲
by
p0nce
11y ago
What was wrong with Java type promotion already?
985.
▲
by
p0nce
11y ago
> around 60% of your previous salary for a year Two years actually, provided you have the right contract termination.
986.
▲
by
p0nce
11y ago
This is the reason why D and Rust keep pointers and length packed together in array slices.
987.
▲
by
p0nce
11y ago
> No, it doesn't. Bounds checks in cold code don't matter (and there aren't many to begin with). Even bounds checks in hot code frequently don't matter. Have you profiled Rust code and found bounds checks to be a prob
988.
▲
by
p0nce
11y ago
> Who else uses it? http://wiki.dlang.org/Current_D_Use And many more companies not in that list.
989.
▲
by
p0nce
11y ago
Indeed. C++ is incredibly fragmented, I guess that could cause its demise before safety becomes an actual concern for language choices.
990.
▲
by
p0nce
11y ago
C++ is safe enough, provided you use the tools like Intel Inspector, valgrind, and static analyzers. With C++11 memory corruptions became a somewhat rare occurence.
More ›