Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 13y ago · link · parent

http://nodephp.org originally

comment 13y ago · link · parent

probably someone who doesn't like the whole "blindly execute untrusted shell scripts from the internet as root" thing

comment 13y ago · link · parent

well, it's mainly geared towards PHP but you might find https://puphpet.com/ useful to get a reasonably sane vagrant/puppet installation which you can then customize for django or whatever. You could just remove the php specific stuff from the generated configurations if you don't want it

comment 13y ago · link · parent

I don't use django, but one of the easiest ways to get designers and non technical folks working directly on projects is to run virtual machines with vagrant[0] and automate everything as much as possible.

[0] http://vagrantup.com/

comment 13y ago · link · parent

why?

comment 13y ago · link · parent

but doesn't this happen anyway? Business requirements change, technologies change, the tool that you chose 5 years ago is probably not the best tool for the job today, regardless of whether it's a framework, a library or another piece of software in your stack.

A possible solution is to keep your business logic framework agnostic, and write thin wrappers to plug into the framework where required. In theory it should be possible to change frameworks without incurring a major rewrite. This is easier said than done of course.

comment 13y ago · link · parent

Let's assume JSON supports comments, and `foo` is a JSON document with comments, what should happen here?

    JSON.stringify(JSON.parse(foo))
Presumably you'd say that it should return a plain JSON object without comments, right? However, with the current implementation this will return a JSON document that is identical to the input, modulo whitespace. This makes it easy to write tools that can, for example, increment the version number in a nodejs package.json file programatically. Doing this in a world where comments exist becomes extremely awkward or at the very least annoying, because either you have to write your own JSON parser that preserves comments, or you have to simply discard the comments when you're writing the file.

If you go with the first option, you'll inevitably run into a scenario where you have a document like this contrived example:

    {
      // this is the first ever version!
      "version": "1.0.0"
    }
And your tool goes off and increments the version number, so you end up with:

    {
      // this is the first ever version!
      "version": "2.0.0"
    }
and now your comment is a lie.

If you go with the second option, you destroy all comments whenever you write data back to the file, so they can be deemed temporary at best.

What benefit do you actually get from having comments in either scenario?

comment 13y ago · link · parent

that would be valid JSON, so it's not a problem. Standard tools can still parse it and reliably turn it into native objects. The same is not at all true when comments exist. People will start putting /* @annotations */ that can only be ready by certain tools which breaks the whole point of JSON - it's a data interchange format.

comment 13y ago · link · parent

the white logo in the header bar still looks like Y fronts![0]

0. in the UK.

comment 13y ago · link · parent

https does not expose referrer, and you are logging in through https, right?

comment 13y ago · link · parent

didn't see that, but even so, this is still a horrible punishment

comment 13y ago · link · parent

drivebyacct2 - your account has been dead for about 100 days and 200 posts, basically no one can seen your messages unless they have showdead on. Here's the "offending" post that you were banned for https://news.ycombinator.com/item?id=5982741 (hint - the ban is completely unjustified)

comment 13y ago · link · parent

it's a company that promotes gambling, it's obvious why some people would think that's unethical

comment 13y ago · link · parent

There is a reliable indicator of whether or not people found the post useful - the number of points the submission has. To be honest, I find comments like yours far less useful, and they are not infrequent either.

comment 13y ago · link · parent

problem is as soon as you checkout a branch, dropbox sees a load of different files and tries to sync them. Then you switch back to another branch and dropbox tries to sync again. Do it often enough and your machine grinds to a halt

comment 13y ago · link · parent

I cringed reading your post, how on earth does someone get themselves into a position where they are owed 7 months salary? What happened there? I hope you managed to collect in the end

comment 13y ago · link · parent

html5 iframe allows this [0], but i think it'll be difficult to shim in browsers that don't support it.

[0] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/if...

comment 13y ago · link · parent

W3C states explicitly that it can't so this is yet another instance where whatwg and w3c disagree leaving developers wondering what to do. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ma...

comment 13y ago · link · parent

it's annoying that it can't be used more than once per page. It would be useful to also have a <content> element, e.g.

    <article>
        <header>...</header>
        <content>...</content>
        <footer>...</footer>
    </article>

comment 13y ago · link · parent

I found your post interesting (just like all your other posts), but for me where this one falls short is the lack of real life examples. I mean I understand why this would be good for calculating factorials and other kinds of recursive math, but how often does the average javascript programmer need to do that anyway? How can I benefit from this to write better code in practise, and not just in theory? To me this is far less obvious than with, for example, your article on decorator functions [0].

[0] http://raganwald.com/2013/01/03/function_and_method_decorato...

comment 13y ago · link · parent

you can mark sub-scopes with their own itemscope property, so you could have this:

    <article itemscope itemtype="/article">
        <h1 itemprop="title">My Title</h1>

        <div class="related-thing" itemscope itemtype="/author" itemprop="author">
            <h1>
                <span itemprop="firstName">John</span>
                <span itemprop="lastName">Smith</span>
            </h1>
        </div>
        
        <aside class="incidental-unrelated-thing" itemscope itemtype="/sausage">
            <span itemprop="type">Cumberland</span>
            <span itemprop="ingredients">Mystery Meat</span>
        </aside>
    </article>

in the example above, we define an article that has a related author property, that author property is its own scope so has firstName and lastName properties of its own. We also define an unrelated itemscope (unrelated because it has no itemprop) that happens to be nested in the same element, so this would parse to:

    [
        {
           "type": "/article",
           "properties": {
               "title": ["My Title"],
               "author": [{
                   "type": "/author",
                   "properties": {
                       "firstName": ["John"],
                       "lastName": ["Smith"]

                   }
               }]
 
           }
        },
        {
            "type": "/sausage",
            "properties": {
                "type": ["Cumberland"],
                "ingredients": ["Mystery Meat"]
            }
        }
    ]

comment 13y ago · link · parent

and in fact that particular bustle link you posted is a perfect example of where using HTML5 + microdata would be not only faster to render and crawlable but also allow the underlying data structure to be consumed by javascript. There's no reason why

    Bustle.pageData.article.title
couldn't have been extracted from

    <article itemscope itemtype="/article">
        <h1 itemprop="title">Why We Should Root for Lamar Odom</h1>
        ...
    </article>

comment 13y ago · link · parent

FAO: iamgopal - your account has been dead for over a year for no discernible reason, only people with showdead on can see your posts.

comment 13y ago · link · parent

a lot of different standards cover it, this is the one the UK's HMRC require submissions in - http://en.wikipedia.org/wiki/XBRL

comment 13y ago · link · parent

if they do business in the UK (which they do), they are subject to UK laws. Quite simple, no?

comment 13y ago · link · parent

sickening to see the negativity here, I just bought a copy because this thing looks great and because I want to support the team.

comment 13y ago · link · parent

yeesh, I respect Mozilla for their true open-source-everything-all-the-time philosophy but this is an example where I think it backfires - it's too early! Even if these really are awesome components it's really hard to see past the lack of polish. People are fickle and you only get one chance to make a first impression, it's important that these things look good

comment 13y ago · link · parent

you probably mean a Lisp Machine - http://en.wikipedia.org/wiki/Lisp_machine

comment 13y ago · link · parent

i did too, the sheer volume of useful code he ships is incredible.

comment 13y ago · link · parent

yes, he has. as has substack. basically everything.

but part of the reason they are so prolific is that they focus on very small, single use modules that do one thing well. So they have hundreds of repos, but many of them are 10 - 15 lines of code.

1
404142
53