Better HN
topnewbestaskshowjobs
Log inSign up

yuri41

284 karma · joined Jan 28, 2011 (15y ago) · 36 submissions

Web-Developer, IWA-Tech Programming in PHP and Groovy. Located in Austria.

Homepage http://christophh.net

Github https://github.com/CHH

Google+ http://gplus.to/chh

Submissions

comment 14y ago · link · parent

Closures inside property initializations inside the class body don't work. Not even in an array.

So this code throws up a "Parse error: syntax error, unexpected 'function' (T_FUNCTION)"

    class User
    {
        public static $mapping = array(
            'username' => array(
                'type' => 'string',
                'length' => 32,
                'unique' => true,
                'nullable' => function() {
                    // Some logic to determine value.  
                }
            )
        );  
    }

2.

Show HN: Simple oneway sync daemon, using Go, FS events and SFTP(github.com ↗)

3 points · by yuri41 · 14y ago · discuss

3.

PHP Socket Programming, done the Right Way(christophh.net ↗)

51 points · by yuri41 · 14y ago · 11 comments

4.

Pipe: An Asset Pipeline in PHP inspired by Sprockets.(github.com ↗)

1 points · by yuri41 · 14y ago · discuss

5.

Grails Plugin Etiquette(christophh.net ↗)

2 points · by yuri41 · 14y ago · discuss

6.

Show HN: A better interface for PHP's libevent extension.(github.com ↗)

1 points · by yuri41 · 14y ago · discuss

comment 14y ago · link · parent

I don't think that everything must be object oriented in the standard library, though I'm not a big fan of the functions in global namespace either.

The structure of Go's standard library could be a good inspiration for restructuring PHP's standard library.

comment 14y ago · link · parent

I don't think that shared hosting needs to be fixed before you can benefit from a good package manager.

Composer and Pyrus both are able to install packages local to the project.

So just grab the dependencies before and then upload the "damn thing" to the server to deploy and this will work on every shared host out there.

9.

Pod, a port of the Rack Specification to PHP.(github.com ↗)

1 points · by yuri41 · 14y ago · discuss

10.

PHP Unix Programming(christophh.net ↗)

3 points · by yuri41 · 14y ago · discuss

11.

Travis needs your Help(love.travis-ci.org ↗)

1 points · by yuri41 · 14y ago · discuss

12.

PHP Project Automation with Bob(christophh.net ↗)

2 points · by yuri41 · 14y ago · discuss

13.

PHP 5.3.9 released(php.net ↗)

54 points · by yuri41 · 14y ago · 9 comments

comment 14y ago · link · parent

Exactly that was my point.

15.

On XML Abuse, a rant(christophh.net ↗)

8 points · by yuri41 · 14y ago · 4 comments

16.

The Obvious, the Easy, and the Possible(37signals.com ↗)

51 points · by yuri41 · 14y ago · 3 comments

17.

Being respective of your time, as well as others(jmertic.wordpress.com ↗)

1 points · by yuri41 · 14y ago · discuss

comment 15y ago · link · parent

Currently it does not solve the problem of the sh*tload of dependencies, though I'm filing an issue for now.

php-build currently solves mainly the problem of configuring PHP correctly, so the build is isolated to the prefix it's installed in (it also sets up PEAR or Pyrus correctly).

comment 15y ago · link · parent

Currently I'm using it with Linux (Ubuntu, Fedora) and on my OSX Lion powered Macbook Air.

comment 15y ago · link · parent

...phpenv (https://github.com/CHH/phpenv)

comment 15y ago · link · parent

The mission of php-build is to reduce my workflow of testing new PHP versions to one command I can run. php-build also provides a opinionated default configuration, which you can build on and extend.

Without php-build I have to do this when I want to test, for example PHP 5.4.0RC1:

1. Find a tarball 2. Extract Tarball 3. Configure it 3a. If I already have a script to configure this version go to 4. 3b. Pick configure options (PHP has a sh*tload of them) 3c. See if it works 4. make && make install 5. install Pyrus 6. install XDebug 7. install PHPUnit

So with php-build (and php-build-plugin-phpunit): 1. php-build -i development 5.4.0rc1 ~/.phpenv/versions/5.4.0rc1 2. ? 3. Profit

22.

Php-build, Compile and Install PHP(chh.github.com ↗)

23 points · by yuri41 · 15y ago · 9 comments

23.

Php-build(chh.github.com ↗)

3 points · by yuri41 · 15y ago · 1 comment

comment 15y ago · link · parent

First, a tablet doesn't let you just do those things.

I made the "80%" up, but the list should only capture what most of the people most of the time do with their computers. If you want to do the one more thing, there will always be more software for that, also for your tablet.

My point is that Tablets are the new _personal_ computer and what we knew as PC before is now going to be the _workstation_.

comment 15y ago · link · parent

I talked about simple office tasks like writing a letter, writing a CV, or a simple handout. These are all things that are at most one page, which can be done with a tablet without much pain.

26.

Whe Power users are going to be the 80 percent(christophh.net ↗)

6 points · by yuri41 · 15y ago · 6 comments

comment 15y ago · link · parent

If you look at the RFC (https://wiki.php.net/rfc/closures/object-extension) it's in there.

But it ain't present in the current builds of 5.4, AFAIK. Don't know what's happened there...

comment 15y ago · link · parent

The Point is, that I want my closures to have access to the context (the application) without messing with the arguments or "use".

The next thing is, that the Silex Framework binds route parameters as arguments to the closure. Additionally the user could forget to declare the $app argument in the passed closure.

29.

Closure Object Binding in PHP 5.4(christophh.net ↗)

37 points · by yuri41 · 15y ago · 15 comments

comment 15y ago · link · parent

I was once at GMX. They insert Advertisements into your emails and offer to less space for the buck.
12