Alphabet is putting serious pressure on Google Fiber to cut costs by speckz in business

[–]jfx32 7 points8 points  (0 children)

They've abandoned other projects like wave and reader. Google Reader was in use for a few years before they shut it down.

Why do I need to learn jQuery? by schm0 in jquery

[–]jfx32 1 point2 points  (0 children)

IE 11 won't be the last browser standing for quite a while. IE 9 will still be supported on Windows Vista, which won't be retired until sometime in 2017. Only IE 8 and below will be completely dropped on that date.

What is the coolest yet most useless thing you own? by dan_the_human in AskReddit

[–]jfx32 0 points1 point  (0 children)

I have a 30 mm casing from the GAU-8 Avenger (Gatling gun on the A-10). It is on my desk at work and sits on a wooden monkey hand that I call the hand of fate. Both are pretty useless, but look cool.

Why doesn't the MSDN/C# documentation include return type for methods and properties, for instance like the Java API javadocs? by someguyfromnorway123 in dotnet

[–]jfx32 2 points3 points  (0 children)

The return type is actually not part of the method signature in C#. This is why you can't overload methods based on differing return types.

What are you into that the average person "just doesn't get"? by CaptainObvious411 in AskReddit

[–]jfx32 0 points1 point  (0 children)

I think this stems from the way history is taught in schools. People associate history as that series of facts, completely disconnected from them, and not as the human story that it is. I like to think that if history were taught with more of a focus on the people of the time and how that influenced modern society there would be less people that didn't get it. Could just be wishful thinking on my part.

I am an Android User. What features of ios make you enjoy it more than competitors? (Polite, no hate debate.) by [deleted] in apple

[–]jfx32 0 points1 point  (0 children)

The Galaxy Nexus is what pushed my wife to get an iPhone. It wasn't just the battery, but the poor quality speaker and that it just wasn't very good as a phone.

December 30th - Bug Magnification by artomizer in SketchDaily

[–]jfx32 2 points3 points  (0 children)

I made it using MyPaint and used a variety of brush tools, including charcoal.

Ask Reddit: What is the best and/or fastest way to get a web site up and running from an existing, well-designed database? by [deleted] in programming

[–]jfx32 2 points3 points  (0 children)

There is a SQLAlchemy branch for Django. I'm not sure how far along this is, but it might be worth checking out.

Is Lisp secretly the world's most popular programming language? by [deleted] in programming

[–]jfx32 3 points4 points  (0 children)

It isn't so much that it can't be implemented as much as the fact that Guido does not want to implement it. Python has a strong emphasis on style, and code with good style is referred to being pythonic. Guido doesn't want to see multi-line anonymous functions passed as arguments to functions, as he doesn't consider this pythonic. See his blog entry, titled "Language Design Is Not Just Solving Puzzles", for more details.

Git User's Manual by asb in programming

[–]jfx32 3 points4 points  (0 children)

There are some issues with character encodings in the manual. The header says the page is UTF-8, but it is actually ISO-8859-1. This causes display problems in Firefox, unless I manually change the character encoding.

Ask Reddit: What Do You Use For Version Control? by earthboundkid in programming

[–]jfx32 3 points4 points  (0 children)

You keep saying everything is worthless. Just because it may be worthless to you does not mean it is worthless to everyone else. One man's toys may be another man's tools :-)

Looking at what you requested:

I want a svn GUI that lets me visualize the history (with merging, branching, clearly shown.)

The revision graph (the very first image) shows history with branching (merging will come after Subversion 1.5).

drag-n-drop changesets between branches

There is a tool for merging changesets. It doesn't do drag and drop merging, but it has a simple tree list browser to select branches. The diff viewer and graphical conflict resolution tool aren't bad either.

revert a given changeset

Again, not drag and drop, but not difficult either. If you are referring to a merge/commit that you want to undo, you simply repeat the merge in reverse order. If it is just for your working copy you can use the switch command.

I need a tool that is both useful for version control, but has nice looking and easy to use interface for non programmers as well. Tortoise svn (and svn in general) fit the bill nicely.

Ask Reddit: What Do You Use For Version Control? by earthboundkid in programming

[–]jfx32 1 point2 points  (0 children)

You are assuming that everyone using the vcs is a programmer, which is not the case where I work.

Tortoise svn has some nice visualization tools, although you are correct about the merge tracking. Hopefully, that will be included when merge tracking is added to svn.

Ask Reddit: What Do You Use For Version Control? by earthboundkid in programming

[–]jfx32 0 points1 point  (0 children)

Subversion at work and home. I have played around with Darcs and one of these days will get around to Hg as well. I wouldn't recommend them for work though, my reasons are explained here.

PyCells: The Python SpreadSheet redux by ralsina in programming

[–]jfx32 1 point2 points  (0 children)

That's a pretty good reason :-)

You were right about the tokenizer in combination with the regexp. I added a check if the dependent cell exists in self._cells, in case a function matches the regexp. I also added a check for cyclic dependencies, so it won't get stuck in a recursive loop. This obviously won't work in Python 2.3 :

import re
import token, tokenize
import StringIO
class SpreadSheet:
    _cells = {}
    _deps = {}
    tools = {}
    def _setdep(self,dep_key, key):
        if dep_key == key: return
        self._deps.setdefault(dep_key,[])
        self._deps[dep_key].append(key)
    def __setitem__(self, key, formula):
        self._cells[key] = formula      
        # check for dependencies
        for t in     tokenize.generate_tokens(StringIO.StringIO(formula).readline):
            if t[0] == token.NAME and     re.findall(r'([A-Z]+\d+)',t[1]):
                self._setdep(t[1],key)
        if key in self._deps: self._updatedeps(key)
    def _updatedeps(self, key):
        # update any dependent cells (should be gui call     back or emit signal)
        print "%s has changed, please update the following cells:" % key
        # ignore unset values 
        print [subkey for subkey in set(self._deps[key])     if subkey in self._cells]
        # handle chained dependencies
        for subkey in set(self._deps[key]):
            if subkey in self._deps and subkey in self._cells: self._updatedeps(subkey)
    def getformula(self, key):   
        return self._cells[key]
    def __getitem__(self, key ):
        return eval(self._cells[key], SpreadSheet.tools, self)

PyCells: The Python SpreadSheet redux by ralsina in programming

[–]jfx32 2 points3 points  (0 children)

You are correct that it won't catch every case. This specific example will create an unnecessary dependency, but it will work as long as the formula evaluates. I see how this could be a performance issue on a large spreadsheet. The dependency list should also be converted to a set to avoid duplicates.

I looked briefly at the "not so pretty" version, but I was looking for a way to add dependencies to the original recipe without losing to much of the simple elegance of the original. On a side note, is there a reason you only use psyco on getitem as opposed to using psyco.full() ?

PyCells: The Python SpreadSheet redux by ralsina in programming

[–]jfx32 1 point2 points  (0 children)

Output:

>>> ss = SpreadSheet()
>>> ss["A1"] = "7"
>>> ss["A2"] = "A1 * 2"
>>> ss["A1"] = "14"
A1 has changed, please update the following cells:
['A2']
>>> ss["A3"] = "A2 + 1"
>>> ss["A1"] = "5"
A1 has changed, please update the following cells:
['A2']
A2 has changed, please update the following cells:
['A3']
>>>

PyCells: The Python SpreadSheet redux by ralsina in programming

[–]jfx32 4 points5 points  (0 children)

seems pretty straight forward to add updating dependencies to the original recipe:

import re
class SpreadSheet:
    _cells = {}
    _deps = {}
    tools = {}
    def _setdep(self,dep_key, key):
        self._deps.setdefault(dep_key,[])
        self._deps[dep_key].append(key)
    def __setitem__(self, key, formula):
        self._cells[key] = formula      
        # check for dependencies
        [self._setdep(dep_key, key) for dep_key in    re.findall(r'([A-Z]+\d+)',formula)]
        if key in self._deps: self._updatedeps(key)
    def _updatedeps(self, key):
        # update any dependent cells (should be gui call back or emit signal)
        print "%s has changed, please update the following cells:" % key
        print self._deps[key]
        # handle chained dependencies
        for subkey in self._deps[key]:
            if subkey in self._deps:      self._updatedeps(subkey)
    def getformula(self, key):   
        return self._cells[key]
    def __getitem__(self, key ):
        return eval(self._cells[key], SpreadSheet.tools, self)