u/mortoray - 25 Archived Voat Posts in v/programming
u/mortoray
  • home
  • search

u/mortoray

17 posts · 8 comments · 25 total

Active in: v/programming (25)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
I'm proud to be a programmer
2 0 comments 06 Jul 2017 06:17 u/mortoray (..) in v/programming
Dirty COW and why lying is bad even if you are the Linux kernel
1 0 comments 26 May 2017 05:50 u/mortoray (..) in v/programming
The largest Git repo on the planet
2 0 comments 26 May 2017 05:49 u/mortoray (..) in v/programming
What is functional programming?
1 0 comments 26 May 2017 05:47 u/mortoray (..) in v/programming
Comment on: Only 36% of Indian engineers can write compilable code: study

I find these results very questionable. They're based on an automated assessment tool http://www.aspiringminds.com/technology/automata There are only sparse details on how that works. They also appear to be basing it on "known" good coding techniques, without any listings, and despite the rest of us always arguing about what is good and bad.

While the situation may not be good, this study is completely untrustworthy. It's just a company trying to sell their questionable HR product.

0 15 May 2017 06:53 u/mortoray in v/programming
What is orthogonality?
9 1 comment 27 Mar 2017 07:04 u/mortoray (..) in v/programming
The bitwise complement, or not operator, is unsafe
1 0 comments 03 Mar 2017 06:04 u/mortoray (..) in v/programming
Stuffing curves into boxes: calculating the bounds
1 0 comments 23 Feb 2017 07:03 u/mortoray (..) in v/programming
What is the length of a string? A tricky question
2 1 comment 27 Apr 2016 19:44 u/mortoray (..) in v/programming
Efficient open ended queues with deferred deletion
0 0 comments 07 Mar 2016 11:35 u/mortoray (..) in v/programming
Comment on: Everything can and will go wrong: all functions fail

It's not functions that eventually work that are causing software to crash, security breaches, and other data corruption.

The article is meant to serve as an anchor, and reference, for other discussion about error handling. Given that errors can happen all the time a language, and libraries, should be designed so that programmers don't need to think about errors all the time.

0 06 Nov 2015 23:18 u/mortoray in v/programming
Comment on: Everything can and will go wrong: all functions fail

Sorry about that, I do try to pay attention to these things. I fixed it and hope you will continue reading now.

1 06 Nov 2015 23:16 u/mortoray in v/programming
Everything can and will go wrong: all functions fail
2 5 comments 06 Nov 2015 08:30 u/mortoray (..) in v/programming
Messy error handling in Rust with `try!`
13 1 comment 28 Oct 2015 15:30 u/mortoray (..) in v/programming
The curse of varargs
4 5 comments 07 Sep 2015 08:33 u/mortoray (..) in v/programming
Reusing existing test suites for new features
1 0 comments 10 Aug 2015 08:23 u/mortoray (..) in v/programming
Comment on: Calculating square root using Newton's iterative method

Yes. I'm trying to create a language that is very modern and without suffering from backwards compatibility overload.

1 29 Jul 2015 08:40 u/mortoray in v/programming
Comment on: Calculating square root using Newton's iterative method

I know it isn't always interesting to all people, but I try to give a bit of background to such things before jumping into my actual code. A lot of people are not likely familiar with Newton's method, or this type of iterative processing at all.

Yes, I'm happy with how I got the initial guess. I was reading up on how to do that step and didn't see that approach (I'm sure it must be known, given it's obviousness, just that I didn't read enough). Given that the numbers are stored in base 2, with a normalized significand, this initial guess is amazingly close to the correct value allowing a very low number of iterations.

2 29 Jul 2015 08:37 u/mortoray in v/programming
Comment on: Calculating square root using Newton's iterative method

It's all of course tentative syntax at the moment. I thik most of what is there will be similar in the end, but I'm leaving it open to change whatever I want. :)

0 29 Jul 2015 08:31 u/mortoray in v/programming
Calculating square root using Newton's iterative method
14 8 comments 29 Jul 2015 06:38 u/mortoray (..) in v/programming
Essential facts about floating point calculations
11 1 comment 06 Jul 2015 06:44 u/mortoray (..) in v/programming
Comment on: Antialiasing with a signed distance field

Signed distances fields are used pretty much this way to render text nicely in a 3D environment. You produce a font atlas by rendering fonts at a very high resolution, then producing a reduced distance field version. This basically looks like a gradient by the edges of all the text. You then use this to draw the text, not directly, but to calculate the distance. Then you can use the same technique from my article to draw either exact on/off borders or antialiased borders (likely more desired for text).

The trick is that even through bileaner filtering each pixel gets a single distance to the edge, and this distance is quite accurate for the pixel on the screen. Obvioulsy it has its limits, but it does a really good job of producing readable text with a fixed texture atlas.

There's quite a bit about this use of signed distance fields available online.

1 19 Jun 2015 19:43 u/mortoray in v/programming
Antialiasing with a signed distance field
14 2 comments 19 Jun 2015 05:20 u/mortoray (..) in v/programming
Comment on: Nobody cares about your code

It may differ from team to team, but several I've worked on even the programmers did not much care about the code. We were invested heavily in process, like unit testing and use driven development. A primary motivator was showing that the features were actually working. The actual code was kind of secondary, so long as it was working we were okay with it. It's actually kind of liberating for programmers knowing that nobody really needs to care about your code -- I don't want somebody micromanaging details and nitpicking small choices.

I'm going to put a big "however" on this, and it's something I mention in the article as well, I'm assuming a certain base-line of competant coding and workmanship. Crap code is unnaceptable everywhere; it's also very unlikely to actually implement the desired feature. The article is a counter to over-engineered results and needless perfectionism. It's about finding a good balance and focusing on the priorities of the project as a whole.

0 15 Jun 2015 09:23 u/mortoray in v/programming
Nobody cares about your code
9 13 comments 15 Jun 2015 06:20 u/mortoray (..) in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.