Hacker Newsnew | comments | show | ask | jobs | submit | arcatek's comments login

I've made a node package that does the same thing, a few years ago: https://github.com/arcanis/pxeger

I mainly used it to generate test mail addresses. For example, the following will generate 36 test email addresses:


Well yes of course you can, we're talking about PHP here.



Most, if not all, installations of PHP won't have runkit installed. It's an extension.


runkit isn't in stock PHP.

A thing you have to understand about PHP - at least, the php.net/Zend Engine PHP most people use - is that what is and isn't in its "standard library" isn't as well-defined as it is for, say, Python. At its most basic, PHP is just the /Zend directory of the source tree: a lexer, parser, compiler and interpreter for PHP code. It can run PHP code, but Zend alone can't do anything except maybe tell you how long a string is.

In order to actually do anything, you need functions and classes that interact with the outside world. And all of these, even the "standard" ones, are implemented as extensions. These are libraries that plug into the Zend engine and expose functions, classes and constants. You can enable them or disable them at compile-time. You can build them into the interpreter itself (static linking), or load them at runtime (dynamic linking).

PHP's source code repository, alongside the /Zend directory containing the PHP interpreter, also contains an /ext directory containing a bunch of different, useful extensions. Only a few of these are always compiled and cannot be disabled, such as /ext/standard, which includes a large number of functions dealing with things like file I/O, strings, array manipulation, password hashing, number conversion, and so on. There's also /ext/date, which manipulates dates. These are the only extensions guaranteed to be available in PHP. They're the most minimal definition of PHP's standard library.

But there's a lot of other stuff in /ext. There's JSON parsing (/ext/json), database connectivity (/ext/pdo, /ext/mysql, etc.), image drawing (/ext/gd) and arbitrary-precision arithmetic (/ext/gmp) among other things. These are all maintained by the core PHP maintainers alongside PHP versions.

However, alongside all of these, there's tons of community-maintained extensions in PECL. You can find all kinds of stuff in there, such as runkit, the extension you're talking about. Sometimes, extensions from PHP core move into PECL (usually dead ones), sometimes extensions from PECL move into PHP.

Anyway, presumably because there's no real difference between PECL and PHP-maintained extensions, both can be found in the manual. That's why runkit's there - it's not part of PHP proper, but it is on PECL. It might seem strange to group things into the manual that aren't officially maintained by PHP, but most of PHP's core extensions need separately installing anyway.

tl;dr: all the functions, classes and constants in PHP are defined by extensions, and the manual includes extensions that aren't part of PHP proper. PHP in most distributions only ships with a few of these enabled. runkit isn't part of PHP.


It reminds me Rails for Zombie



The post title is a bit misleading, then. The way I see it, it's more like a bug they fixed (since people could legitimately lose their connection and have their hint count wrong) rather than a real no-cheat policy.


In other languages (such as PHP), the same thing can sometimes be achieved by using "break N" / "continue N", where N is the number of loop you wish to break/continue.


Specifically in PHP, though, you can't (anymore) break a variable value.

break $n;

isn't valid since PHP 5.4


Eh, I was reading your psx guide a moment ago :) Small world!


Even without inlining? Since the compiler cannot know what instruction will be called, it cannot inline it in the loop.


Why do you want any inlining? It's a threaded code. You know an address of each instruction handler, so you can replace an opcode with this address and eliminate a switch and any table lookups altogether.


Hm it's possible that the username has already been taken - I don't yet print the errors when the registration fails


I think you're talking about module loaders[1]. I remember seeing on es-discuss that they have been postponed to ES7.

[1] https://github.com/lukehoban/es6features#module-loaders


Functionally that's it (didn't realise it'd been rolled into es6 modules though). Looks like what I was referring to was a third party library: https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Ro...


Interestingly, both Sublime Text and Atom are two programs that I absolutely cannot use over X11 forwarding without noticeable lag ... Even if the OS and the X server are on the same local machine.



Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact