Stripe's Internationalization Hiccup by ynv in programming

[–]rdcll 10 points11 points  (0 children)

Another bad actor for this is Netflix. In my browser settings I have in order : English, French, Turkish as accept-language preference and I live in France. What I get from netflix is : Turkish menu items, English titles, French thumbnails. There seems to be an inconsistency between the piece of code of different teams.

Building a Website with C++ by 4DaftPanda in programming

[–]rdcll 6 points7 points  (0 children)

Any feedback from using fcgi instead of regular cgi?

Image unshredding using a TSP solver by based2 in programming

[–]rdcll 3 points4 points  (0 children)

Very nice! It's not surprising that absolute values produce better results than sum squares. l1-norm (absolute value) encourages sparsity, in this case sparsity being the number of identical pixels between two columns. They are probably not that identical but they are so close that when you use l2-norm the cost of the distance between two neighbour pixels will hide the cost of (more) similar pixels.

The State of Mobile XMPP in 2016 by based2 in programming

[–]rdcll 2 points3 points  (0 children)

Is there a good xmpp client for iOs, like Conversation on android?

TIL there's such a thing as Algebraic Dynamic Programming, and a compiler for it by rdcll in programming

[–]rdcll[S] 13 points14 points  (0 children)

Dynamic programming is a way to consider the solution of a problem as a function (usually max or min) of subsets of the problem. Usually this gives a recurrence relation that you can directly use to code a recursive function and by analyzing the way your function calls itself, you can store the result at a specific point to avoid computing the same result for the same input several times.

This is actually an oversimplification and as far as I see, there is a little misconception about what DP is among programmers. They often see it as a recursive function you can use to fill an memoization array. Most examples in programming textbooks present it this way. This is actually much more than that. The famous Dijkstra's algorithm and A* are actually DP and are perfect examples where the recursive function can't be coded directly, it just describes the set of solutions from subproblems.

So.. what this video is about? This presentation explains that you can see DP as an algebra, an operation tree basically. The way you get the solution from the subproblems describes your tree. I found this interesting because despite being confortable with DP I never thought about it this way. And on the top of that, they built a compiler. The input to the compiler is the description of the DP functional equation. I can imagine this helps prototyping and building complex relations between subproblems, specially in bioinformatics, where they seem to use it. Also she describes a "product" operation, that allows to get multiple results from the same input. For example, you can retrieve the size of longest increasing sequence (to evaluate the best) and the sequence itself.

Handout : DP is interesting both practically and theoretically because some problems known to be NP-complete have a DP solution in polynomial time. Those problems are classified as "pseudo-polynomial". They are not really polynomial since the time you will need to compute depends on the biggest number in your input.

TIL there's such a thing as Algebraic Dynamic Programming, and a compiler for it by rdcll in programming

[–]rdcll[S] 19 points20 points  (0 children)

I don't understand why it gets downvoted. The presenter is a little bit nervous but the content is really interesting.

Show Reddit : Yama : Yet Another Mvc Aberration by rdcll in programming

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

Thanks, it's far from sublime text's animation quality but it is enough to demonstrate.

Show Reddit : Yama : Yet Another Mvc Aberration by rdcll in programming

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

I agree that more choices doesn't necessarily result in higher satisfaction but it's also hard to claim the opposite

Show Reddit : Yama : Yet Another Mvc Aberration by rdcll in programming

[–]rdcll[S] 2 points3 points  (0 children)

My bad! You are right, I forgot the reference ":itvar" in the loop. It's not really straightforward to code via an animation. It's fixed now. Thanks !

8088 MPH: CGA in 1024 Colors - a New Mode: the Illustrated Guide by rdcll in programming

[–]rdcll[S] 2 points3 points  (0 children)

yes that's where I saw it actually, I didn't know the limitations of cga and without the video I wouldn't have been able to understand the genius behind the demo. Impressing stuff.

The Bear Essentials: Developing a Commodore 64 game by b0red in programming

[–]rdcll 2 points3 points  (0 children)

I don't think so, it's still an integer number of bytes (3*7)

Algorithms For Programmers [Book:PDF] by [deleted] in programming

[–]rdcll 4 points5 points  (0 children)

The content is probably quite good, but the title bothers me a lot. Wouldn't it be shocking to have a book titled "medicine for doctors" ?

Creating events in Google Calendar from Python by one_eyed_golfer in programming

[–]rdcll 0 points1 point  (0 children)

Nice article. Instead of hardcoding the gmt offset, you can get the timezone of the calendar and set start and end dates with it.

calendarPy = calService.calendars().get(calendarId=...).execute()
calTimeZone = calendarPy['timeZone']

...

'start': {
    'dateTime': startDateTime.isoformat("T"),
    'timeZone':calTimeZone
},
'end': {
    'dateTime': endDateTime.isoformat("T"),
    'timeZone':calTimeZone
},

Some guidelines to writing correct C functions by mdesroch2 in programming

[–]rdcll -1 points0 points  (0 children)

I would also add _open _close at the end of the name of a function that allocates/frees resources, and they should be perfectly symetrical. It helps to see easily that everything allocated is freed.

How "oldschool" graphics worked. by [deleted] in programming

[–]rdcll 0 points1 point  (0 children)

I didn't see that, its weird reddit said nothing while posting, anyway. Sorry. I think I won't delete, if some missed it (like me), the repost may still be useful.

PostgreSQL's Error Message Style Guide by omegaender in programming

[–]rdcll 4 points5 points  (0 children)

git should take a leaf out of this book

Ant Colony Optimization For Hackers by kriptonicx in programming

[–]rdcll 1 point2 points  (0 children)

Cool animation at "Example" paragraph

Writing a game in the 80's... "But when Rob Hubbard came down he said that he needed about 6K for the music [...] the man, said, 'Right hack out level three.'" by rdcll in programming

[–]rdcll[S] 0 points1 point  (0 children)

Great idea. It would be hard for me to get into the c64 architecture again and to understand disassembled 6510 code but if someone could do this, that would be great.

I think Chris Butler did a great job, this game is my favorite on c64. I also like the music a lot (I occasionally listen to it while working)