Hacker News new | past | comments | ask | show | jobs | submit | ColdAsIce's comments login

Yeah thats a nice xmldict you wrote there, except it doesnt do anything good at all. Try to parse this with it, <html>hello</lol>world</html>. So much for your A* search and algorithmic knowledge.

I am no good with algorithms but would know to stop at such an idea as to make my own xmldict parser in that way. I would instead learn about parsing and the algorithms for successful parsing, instead of a half-assed approach.


> Try to parse this with it, <html>hello</lol>world</html>.

Parsing invalid xml with a xml parser throws an error like it should.

I am using cElementTree for parsing and this is what will happen with your input.

    In [1]: import xml.etree.cElementTree as ElementTree

    In [2]: ElementTree.XML('<html>hello</lol>world</html>')
    ---------------------------------------------------------------------------
    ParseError                                Traceback (most recent call last)
    /home/rahul/musings/python/<ipython-input-2-54e782b0af58> in <module>()
    ----> 1 ElementTree.XML('<html>hello</lol>world</html>')

    /home/rahul/musings/python/<string> in XML(text)

    ParseError: mismatched tag: line 1, column 13
> make my own xmldict parser in that way

What is that way you are talking about? There isn't a xmldict implementation for Python(at least I can't google it), I needed one, so I wrote a recursive descent parser. A recursive descent parser is a popular choice provided your grammar is LL(k) - Python, Perl et al run on hand-coded recursive-descent parsers. Also, recursive-descent parsers are easiest to handroll.

PS - There is a way to disagree. Your's isn't the right way.


I don't know a lot about XML, but that doesn't look like (legal) XML to me. Is it?


The web site repels me as a GNU/Linux user. It seems to be designed only for people who own iProducts and own a license to adobe photoshop.


Hahahhaahah what a fucking joke


How could that ever work, for infrared to affect magnetism?


You ignored the article and what the GP said: Through heat. Not (directly) by the light.


Why dont they just change to an open source rdbms?


There is nothing 'just' about moving a non-trivial database from one rdbms to another. First there is no doubt a huge amount of incompatibility between the dialect of SQL the two speak. Then there's all the platform specific features that the other database is either lacking or implement completely differently. On top of that, once you get everything up and running, you'll notice that the performance characteristics between the two are very different which means you're going to have to redo much of your optimization work to get back to even close to the level of performance you had before the switch.


For what it's worth, the word "just", as used above, almost always indicates that the speaker doesn't understand the problem.


I can't count the number of times I've heard, "I just need a programmer!"


That was the point, to illustrate lock-in effects of proprietary software.


Probably because Joel Spolsky is a Microsoft guy. He used to work there and was apparently quite influential before he left.


They're fairly tightly integrated into the MS stack and it'd be an incredible undertaking to migrate to anything else.


you would think MS would cut them a super deal on licensing, being that S.O. is such a major site utilizing and promoting their platform, (and its demographics match who they'd want to promote to). If S.O. goes down or has problems due to a SQL server issue like this, (or them not affording another license) that looks pretty bad.


I believe Joel said that software licenses were a rounding error in the grand scheme of things.


I'm inclined to agree. If you have to spend any time at all figuring out how to fit the cost of a SQL Server license into your business plan, that's the entrepreneurial equivalent of a code smell.


Not sure MS cares enough about SQL server. They would probably throw money at them to move to Azure though.


Are you being sarcastic? How could one not know that ssh could do these things? Have you been using it instead of telnet?


Save your snark and go read the rest of his blog posts.


Everything looses its meaning when the mainstream decides its cool.


What makes Zuckerberg a hacker?


he made a website used by 800 million people?

You might not necessarily agree with the extent the word "hacker" is applied to nowadays, but considering you are in a site called "hacker news" you probably should


So what if he isn't? He still gets the props for writing so clearly about his preference for that approach to product development.

I suspect it's also a shout out to future potential employees that he doesn't intend FB to change focus or style as a consequence of going public.


Yes, people forget that after each .tld there is a dot. news.ycombinator.com. is the real deal.


The community has become quite aggressive and elitist lately, they now remind me of the days of gentoo.


That's a shame, back when I installed it years ago (05ish I think) the community was one of my favorite things about the distro.


Yeah I remember it back in the beginnings, it was quite friendly. Now I see people get yelled at in #archlinux for having an opinion on x vs y which is opposite of what the majority of #archlinuxers think. The forums are like "not my problem fix it noob, here is half a wiki page"


I've never had a good experience with #archlinux, and the forums are generally quite slow. I do recommend the arch-general mailing list however.


You should have seen the community 7+ years ago! They've done a lot to make the community more friendly and inclusive.


Probably because of comments like what astrodust is spraying everywhere.


I agree somewhat, but I tend to find that it's newbies who have managed to migrate away from MyFirstLinux™ that make all the annoying noise coming from the Arch community; so perhaps it's not fair to judge Arch users as a whole.

On the other hand, at this rate http://funroll-loops.info/ will need to be re-written for Arch ;)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: