Better HN
topnewbestaskshowjobs
Log inSign up

renekooi

149 karma · joined May 27, 2013 (13y ago) · 39 submissions

https://github.com/goto-bus-stop
Submissions

comment 10y ago · link · parent

The HD Edition has a new AI[0] that's much stronger than the old one. It's built by Promiskuitiv and Archon, two well-known AI scripters in the Age of Empires scene :)

[0]: http://steamcommunity.com/app/221380/discussions/1/540744934...

comment 10y ago · link · parent

It was random. According to SteamDB[1] it was a caching issue that ended up sending random pages to the wrong people.

Possible explanation from unknown source: https://www.reddit.com/r/Steam/comments/3y7le9/im_logged_in_...

[1]: https://twitter.com/SteamDB/status/680490823226671104

comment 10y ago · link · parent

I like this a lot. It's similar to the proposed function bind syntax[1], but a bit more friendly to not-`this`-related use:

    function bindMap(fn) { return this.map(fn) }
    [ 1, 2, 3 ]::bindMap(n => n + 1)
    // standalone use: bindMap.call(arr, fn)

    function pipelineMap(fn) { return arr => arr.map(fn) }
    [ 1, 2, 3 ] |> pipelineMap(n => n + 1)
    // standalone use: pipelineMap(fn)(arr)
(Also nice that it works in a very similar way to decorators, although they won't be interchangeable in most cases, with decorators working on class constructors and property descriptors, instead of just any value.)

Presumably, at most one of these proposals will make it in :)

[1]: https://github.com/zenparsing/es-function-bind

comment 11y ago · link · parent

Messages are sent through plainly first over Twitch's IRC-ish protocol. You can connect to Twitch chat with a simple IRC client, or through the browser. Twitch's own browser chat connects to a WebSocket server that passes IRC commands to the browser, where they are parsed & executed.

Twitch has a few additional IRC-ish commands like CLEARCHAT, which deletes messages by a given user. Most IRC clients don't support this, but Twitch's browser client of course does :) In larger streams spammy messages are usually removed by bots like http://www.nightbot.tv/ or http://twitch.moobot.tv/. That's where the delay comes from: messages have to arrive at the moderator first.

Interestingly, CLEARCHAT can only delete _all_ messages by a given user (as far as I know), so non-offending messages are also removed. This is done by the client, the chat servers only pass "CLEARCHAT #channel_name user_name". (e; it's all messages by a given user, or all messages in the channel if no username is given)

In the Twitch browser client, you can double-click the <message deleted> text to show the original text if you really want to! :)

Reference: https://github.com/justintv/Twitch-API/blob/master/IRC.md

comment 11y ago · link · parent

view-source should keep working reasonably. WebAssembly defines a Text Format for exactly that purpose:

https://github.com/WebAssembly/design/blob/master/TextFormat...

comment 11y ago · link · parent

`.call` is a method in some Promise libraries (eg. Bluebird). Basically,

    connection.call('collection', 'users')
is a shorthand for:

    connection.then(value => value.collection('users'))

comment 11y ago · link · parent

querySelectorAll returns a NodeList instead of a real array, so you can't call things like `.forEach` on the result. `[].slice.call(x)` turns x into an array, so that becomes

    [].slice.call(document.querySelectorAll(...)).forEach(function () {})
Because a lot of array methods are "generic", i.e. operate on array-like objects instead of just arrays, that can be "compacted" to

    [].forEach.call(document.querySelectorAll(...), function () {})
but neither are very nice.

comment 11y ago · link · parent

Location: Groningen, Netherlands

Remote: Ok, prefer local

Willing to relocate: _Probably_ not

Technologies: Javascript (Node, Ember, Backbone, ES6 & other new stuff), HTML5/CSS3, PHP, Python, would love to get in touch with new things as well.

Résumé: https://rene.kooi.me/cv.html

Email: rene at kooi dot me

Github: https://github.com/goto-bus-stop

I'm primarily looking for an internship from November 2015-February 2016 or a part-time job next to my Software Engineering study at the Hanze Hogeschool.

comment 11y ago · link · parent

Another ASCII art weather (forecast) utility, but in Go: https://github.com/schachmat/wego

comment 11y ago · link · parent

Another false positive anecdote! My parents used to have their ISP's adult content filter enabled. One day I couldn't visit DeviantArt, because it said "Mature Content Filter Enabled" somewhere on the page, and "mature content" triggered the ISP's filter.

comment 11y ago · link · parent

Socket.IO also gives you things like cross-everything callbacks:

     // server
     io.emit('event', function (msg) { console.log('Client responded!', msg) })

     // client
     io.on('event', function (cb) { cb('This is my response') })
And it also provides socket namespacing, and "rooms" (a bit like chat rooms), and broadcasts, and a bunch of things that I don't use.

Sure, you can bolt all of that on in probably a few hundred lines, but socket.io also doesn't just do sockets and events :)

(And it also does it in less than 61000 lines. You still need the "ws" module to do WebSocket stuff in Node, even if you don't use socket.io)

comment 11y ago · link · parent

Nice work! I'd been using http://caniuse.com/#info_news, but it requires some manual checking still :)

comment 11y ago · link · parent

It's not about graphs, it's about the entire app. That includes lists and paragraphs of text.

comment 11y ago · link · parent

For node.js, there is a module: https://www.npmjs.com/package/deasync

comment 11y ago · link · parent

Location: Groningen, Netherlands

Remote: Fine!

Willing to Relocate: No

Technologies: JS (browser&Node), PHP, HTML5/CSS3/LESS, Python

Résumé: http://rene.kooi.me/cv.html

Email: rene at kooi dot me

Github: https://github.com/goto-bus-stop

I've some six years of hobby experience. Primarily looking for something small part-time (roughly 12hrs/week) next to school, or more during the summer vacation.

16.

Show HN: WikiBattle – 1v1 races through Wikipedia(wikibattle.me ↗)

1 points · by renekooi · 11y ago · discuss

comment 11y ago · link · parent

OT: I love how the satellite view switch button shows the actual satellite view at its location[0].

[0]: http://i.imgur.com/ycJmczX.png

comment 11y ago · link · parent

South Korea doesn't quite fit the "liberal" label either. It's a technologically advanced country, but a socially conservative one.

comment 12y ago · link · parent

YT videos lag a lot when I stream them directly in VLC 2.2.0, (`vlc <youtube link>`) and some protected videos don't play at all, so I often use this:

    ytplay() { youtube-dl "$1" -o - | vlc - }
As a side benefit it of course also allows you to instantly watch stuff from all the other sites YT-DL supports :)

comment 12y ago · link · parent

The old AI wasn't particularly good. Playing versus modern AIs, or actual people, is an entirely different experience!

comment 12y ago · link · parent

The Forgotten expansion ships with a much improved AI. Expansion-less uses the old Petersen AI from the original game, and that isn't particularly intimidating anymore!

comment 12y ago · link · parent

It's something that kind of looks like lisp, but the only thing it has in common is the parentheses. You basically set condition→action rules, one level deep, with a limited amount of global-only "variables" (goals). I think the amount of conditions and actions per "rule" is limited, too.

comment 12y ago · link · parent

It's the colours used in the Flat UI Bootstrap theme: http://designmodo.com/flat-free/

comment 12y ago · link · parent

And that image is returning a 404 :)

comment 12y ago · link · parent

Idunno, the web browser has been discontinued for 3 years now. It also seems that bolt.co and Instagram's Bolt are much more similar to each other (apps dedicated to person→person communication) than Bolt the browser is to either of them, so the risk of confusion is much smaller.

comment 12y ago · link · parent

> which really only took the "two tiles with the same numbers merge when they collide" element from Threes

Which is the only element Threes has!

comment 12y ago · link · parent

They called it WinJS since the start—it seems this is the same library that's used to build Windows 8 metro apps in JS. They just officially open sourced it now (although you could always access the source, as it was just another dependency for your Visual Studio project) but it's been in use by people from Microsoft and otherwise for quite some time.

e; library to build windows apps = WinJS

comment 12y ago · link · parent

I'm on a laptop with 1366*768 screen; had to zoom out massively :(

comment 12y ago · link · parent

http://name.com

comment 12y ago · link · parent

> accepting the fine would have also involved making a public admission of guilt (...) and the company feels this would have "irreparably damaged" its reputation.

It probably would've. But if they don't want that loss of reputation, perhaps they should have followed the appropriate laws in the first place? Seems like this is kind of the point of a punishment.

12