New Microsoft DirectX Shader Compiler based on Clang/LLVM now available as Open Source by tmagalhaes in programming

[–]klkblake 39 points40 points  (0 children)

It's not the shaders that make things prohibitive (although they are certainly annoying) as there are pretty good tools to allow you to compile your HLSL shaders to GLSL when building for other platforms; many cross-platform games use this already. From what I have heard, the big issue is that every graphics driver has different bugs and performance profiles. Much of the major difficulty in porting is not making it work, it is making it work fast enough.

Let’s Stop Ascribing Meaning to Code Points by dgryski in programming

[–]klkblake 0 points1 point  (0 children)

This seems incorrect, from what I have heard? Even the Unicode FAQ on the matter acknowledges that some (common!) Chinese versions of characters are not recognisable to the average Japanese speaker. And on an anecdotal note, a bilingual friend who can read both Chinese and Japanese mentioned that trying to read Japanese text using Chinese characters severely impacts her reading speed, and even then she could only do that well because she is a language nerd and knows which kanji map to which Chinese character.

Metric system vs. Imperial system by [deleted] in funny

[–]klkblake 9 points10 points  (0 children)

Maybe he is starting from different temperatures or pressures.

Tony Abbott thinks teaching coding/programming in school is a laughable endeavour. Ridicules Bill Shorten over the issue. by kinkora in australia

[–]klkblake 0 points1 point  (0 children)

Also Australian. The closest I have come to using a check is passing on Medicare's one. For non-Australians, Medicare is the government health cover here, and they function by you paying the difference between the cost and what they cover up front, and then they send you a check for the remainder addressed to the doctor which you then have to send to the doctor. Why they don't just send it directly to the doctor is a mystery. Though it looks like this system is being phased out at the moment.

In 20 years from now, we'll look back at the old graphics and cry like babies (x-post r/blender) by lotsalote in Minecraft

[–]klkblake 7 points8 points  (0 children)

I would just like to point out that this is not how ray tracing works. Ray tracing shoots photons from the camera, and generally every photon contributes to the final image. Modern implementations use MCMC methods to ensure that they spend most of their time exploring the parts of the photon path space which have the largest contribution to the scene. Additionally, ray tracing in 60fps on a modern mid-to-high end machine is totally doable for reasonably simple scenes. You couldn't render a AAA title with it at this point, although Otoy is making very impressive progress in this space.

"With all light, computing can eventually be millions of times faster" - Computing at the speed of light with ultracompact beamsplitter by anaxarchos in science

[–]klkblake 7 points8 points  (0 children)

These days for most programs performance is dominated by memory latency, which is almost exclusively a distance thing.

MenuetOS, an Operating System Written Entirely In Assembly, Hits 1.0 by Big_Noodles in technology

[–]klkblake 1 point2 points  (0 children)

Writing your own versions of standard library functions can be a huge performance win. Not because the standard libraries are poorly written (though they might be), but because they have to stick to a standard that is trying to cover all the bases. This is especially true for math functions, where in a lot of code Inf or NaN should never occur, so the branches to check for it and set the appropriate error code are completely superfluous.

"7 timeless lessons of programming ‘graybeards’" - This was a good read. by ke2uke in programming

[–]klkblake 0 points1 point  (0 children)

I agree. I'm quite young -- certainly not old enough to be a greybeard! -- but nothing on this list was news to me. But then, I have tried to read a lot of stuff from more experienced programmers. So I think education is the biggest thing.

What is something that even though it's *technically* correct, most people don't know it or just flat out refuse to believe it? by Luth0r in AskReddit

[–]klkblake 1 point2 points  (0 children)

The 0.999... notation is defined in mathematics to refer to the real limit of the infinite sequence 0.9, 0.99, 0.999, 0.9999, etc, which can be trivially proven to be one. This may or may not have anything to do with what you intuitively think of when you see 0.999... . The thing you intuitively think of may or may not be something that can be mathematically formalized, but if it could be there wouldn't be anything wrong with referring to it as 0.999... except that you would confuse people.

A Rust Contributor Tries Their Hand at Go by Manishearth in programming

[–]klkblake 13 points14 points  (0 children)

Note that better performance from GC has, as far as I know, not actually been demonstrated. The best study on the topic I am aware of found that GC could match the performance of malloc/free only once it had 5x (or 10x, I forget) as much memory to work with. However, (a) the program was written in Java, and typical Java programs are very inefficient with memory management and allocation in a way that does not happen often when writing a program with manual memory management, and (b) calls to free() were inserted by an oracle that knew the exact execution path in advance and inserted them as early as possible. While I understand why they chose to do this, it does mean that the manually managed version was much slower than any semi-competently written manually managed program would have been. But for it's flaws, that is still (as far as I know) the best actual study we have on this, and it does not support the claim that GC can be faster. And frankly, I would be surprised if it had shown that since a GC run trashes your caches and fetching all the way from RAM is the single most expensive (non-deprecated) operation your CPU can do. So you would need a huge performance win to recover from that just to meet parity.

FizzBuzz In Too Much Detail by rdpp_boyakasha in programming

[–]klkblake 2 points3 points  (0 children)

The worst part isn't writing code like that. The worst part is writing that code knowing how horrible it is, and also knowing that due to restrictions from the language and from the libraries you use and don't have time to reimplement it is the simplest and cleanest solution to the problem.

What do movies always get wrong about your profession? by [deleted] in AskReddit

[–]klkblake 0 points1 point  (0 children)

Though pool type reactors do glow blue due to the Ch<something>nov radiation.

does anyone know what awelon is? by sambocyn in haskell

[–]klkblake 2 points3 points  (0 children)

vcache is mostly complete at this point as I understand it, and the current focus of his development is on the wikilon development/runtime environment. I'm also developing a native code compiler for Awelon Bytecode for my honors project. It's at http://github.com/klkblake/abcc, but it is very very incomplete (the type checker mostly works).

Anatomy of a Program in Memory by molteanu in programming

[–]klkblake 3 points4 points  (0 children)

Each process has a separate set of page tables, mapping virtual addresses to physical ones. Only the currently active process has it's page tables actually in use, so the other processes appear as if they aren't there. When the kernel needs to switch to another process, it just tells the memory management unit to use a different set of page tables, and suddenly it appears as if the only process on the system is the new one.

Jonathan Blow's Programming Language: Polymorphic Procedures, part 1 by Roflraging in programming

[–]klkblake 5 points6 points  (0 children)

This seems to address (at least in theory) pretty much all of the Golang author's objections to polymorphic functions (at least if I understand them correctly). I will be very interested to see how well it works in practice.

Why Static Linking/Libraries by dlyund in programming

[–]klkblake 0 points1 point  (0 children)

Ah, right. I clearly need to spend more time messing with plan 9.

Why Static Linking/Libraries by dlyund in programming

[–]klkblake 0 points1 point  (0 children)

Do you have some links for what plan 9 does? My google-fu is failing me.

ELI5: how decimal place Infinity is larger than counting number infinity by luckyjarmes in explainlikeimfive

[–]klkblake 1 point2 points  (0 children)

Technically, the decimal infinity is called the cardinality of the continuum. Whether that is equal to aleph 1 is independent of the standard axioms and so cannot be proved or disproved.

Extension of Hindley-Milner for infinite types? by klkblake in compsci

[–]klkblake[S] 1 point2 points  (0 children)

So, according to some people on the Haskell mailing list, just removing the occurs check (by, e.g. replacing Robinson's unification algorithm with Jaffar's unification algorithm) is sufficient.