Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - nslay

Pages: [1] 2 3 ... 5
General Discussion / What's wrong with x86?
« on: March 08, 2015, 07:13:44 pm »
{][)K} is still alive and well and has absorbed many other members from other clans of the time. It keeps alive through gaming and IRC (a place to afk and not talk to anyone). So what's wrong with x86?

General Discussion / Weather
« on: January 13, 2014, 10:00:24 pm »
This is a bit silly, but has anyone ever wondered about or demanded probabilities for: Sun, Clouds, and Clear?

I would be absolutely delighted to know if there was a 70% chance of sun today.

General Programming / Lambdas and 'auto' types in C++11
« on: January 07, 2014, 11:37:10 pm »
Does anyone really think lambda expressions help C++? I think it's nice to be able to create functors on the fly, although it's not always readable.

STL has <algorithm> which includes algorithms like std::for_each and std::find_if that accept functors/functions. In the past you usually had to create a functor to use these which was typically more code than just writing your own for loop. I thought lambdas would make functions like std::for_each practical. However, which is more readable?

Code: [Select]
int sum = 0;
std::vector<int> vArray = { 1, 2, 3, 4, 5 }; // Yes, you can do this in C++11
std::for_each(std::begin(vArray), std::end(vArray), [&sum](int x) {
  sum += 2*x;


Code: [Select]
int sum = 0;
std::vector<int> vArray = { 1, 2, 3, 4, 5 };
for (size_t i = 0; i < vArray.size(); ++i) {
  sum += 2*vArray[i];

Better yet!
Code: [Select]
int sum = 0;
std::vector<int> vArray = { 1, 2, 3, 4, 5 };
for (int x : vArray) {
  sum += 2*x;

I'm not seeing any elegant use of lambda expressions. Seeing functor definitions as parameters to other functions looks weird and messy. You could also just write a functor in an unnamed namespace to prevent namespace pollution. The functor could be named something intuitive like:
Code: [Select]
namespace {
  struct NickEquals {
    // ...
} // only valid in this translation unit

auto itr = std::find_if(std::begin(vUsers), std::end(vUsers), NickEquals("nslay")); // Find If Nick Equals "nslay" ... reads nicely!

Another one I have mixed feelings about is the auto type specifier. Yes, it is very convenient to write, but it's not very readable.

Code: [Select]
auto thing = Blah(); // So, what does Blah() return? Oh, right, best go look in the header. Oh, and did I mention 'auto' also consumes constness and pointers too (but not references)? Blah() might return a pointer ... or maybe a const. You'd never guess that by looking at it though.

// Oh yeah, If I changed Blah()'s return type, maybe it still compiles and runs when it shouldn't.

for (auto &x : vArray) {
  // Wait, what is x again?

Anyone else have such thoughts?

Unix / Linux Discussion / pkgng: FreeBSD has become practical
« on: November 23, 2013, 10:53:55 am »
Words cannot describe how easy FreeBSD packagement package management has become recently.

They're finally pushing precompiled binaries with their apt/yum-like pkg tool (no man page yet).

pkg install thing
pkg delete thing
pkg update
pkg upgrade

(which are superior to older tools like pkg_{install,delete,update,upgrade} etc...)

But they haven't entirely ditched ports. Instead, they made a repository tool (poudriere) that makes building custom repositories child's play. This tool of course revolves around ports.

Poudriere uses a combination of ports and jails (VMs) to build and package applications and places them into a folder that is immediately ready to be served over NFS or HTTP and accessed with pkg. It's very easy to configure, the tool will actually download a FreeBSD image, sync the ports tree and build ports into packages with your own specified compile-time options (if any).

Here's a tutorial of someone building a KMS-specific repository (which I had to do for one of my Intel-based machines):

That's remarkably easy! (EDIT: There's no need to build the kernel and world now)

It's certainly an improvement in practicality. FreeBSD can now probably be setup and configured in a comparable amount of time as any Linux distribution minus the pre-installed components (FreeBSD is not pre-installed with anything).

Anyway, if you ever cared to try something like FreeBSD, wait another a month for FreeBSD 10 to be released and give it a spin. It should be orders of magnitude easier and less time consuming to setup.

EDIT: Spelling.

Botdev / A Conversational IRC Bot
« on: January 12, 2013, 02:51:55 pm »
I'm currently in the planning stages of a conversational IRC bot based on IRCBNX (basically rewrite response engine).

This bot will use an online machine learning approach to tackle the problem (as it will be online, it will be able to learn from users in real time).

I have no idea how well it will work. I'm largely unfamiliar with NLP (I work with computer vision now). My guess is that my approach will be inferior ... but I'd still like to try.

Basic pipeline will be something like:
Input --> Response regression (online update) --> Response candidate ranking (online update) --> Final response.

Currently, I need to construct a training set. So I'm considering harvesting chatter from IRC channels. I'll have to annotate (input,response) pairs from the harvested chatter initially.

Another problem I'd like to solve is to classify whether (input, response) is feasible. It would be nice for the bot to be able to learn by watching other people chat in a channel (but you have know who is responding to who!).

Suggestions or comments are always appreciated.

General Discussion / Where is Rule's analysis of the election?
« on: November 18, 2012, 06:37:28 pm »
I would have expected some insight into the US' doom and gloom by now.

How about that Nate Silver? Shouldn't you be simulating the election with Gaussian processes?

Botdev / Creating BNX clone for IRC
« on: September 08, 2012, 05:02:26 pm »
I'm going to attempt to recreate as much of BNX as possible for IRC.

Let me know if you're interested. I've created an SVN repository for it and committed some reference materials (namely BNX 1.03 files and Greetbot files).

I think I'll first create a rudimentary CHAT emulator (designed for one-on-one CHAT). This way we can use Wine to try BNX out. Though BNX is actually quite well documented.

I think the best choice of implementation language is C++ and we can use libevent for portable event-driven timers and socket multiplexing.

Again, if you're interested, just PM me a SVN username/password and get a dynamic domain name for your development machine (so I can add you to the firewall).

RFC 1459

General Discussion / OGC's logo
« on: August 23, 2012, 08:24:21 pm »
This is very funny!

Look at the rotated version of the logo ... it actually took me a few minutes to see why people were unhappy with the logo.

A spokesman for OGC said: “It is true that it caused a few titters among some staff when viewed on its side, but on consideration we concluded that the effect was generic to the particular combination of the letters OGC - and it is not inappropriate to an organisation that’s looking to have a firm grip on Government spend.


Absolutely hilarious episode! You might recognize Stephen Colbert and Lewis Black voicing some characters. I can't believe the show ended ... it's so good!

Blizzard, WoW and Bots / Server designs
« on: April 27, 2012, 06:51:23 pm »
Quite a while ago, I came across AF_UNIX sockets. This is quite a peculiar form of IPC. Listening sockets are exposed through the file system (as well as permissions, very neat!) and while it does support your usual modes of communication (e.g. SOCK_STREAM, SOCK_DGRAM), it also allows you to send and receive file descriptors. I think the latter is quite magical!

Years ago, I pondered a chat server design that inherently supports linking. It's a master/slave distributed memory design. You have a master process that listens for connections, stores meta data, and passes off the connections (descriptors) to slave server processes. The master does some load balancing and manages both internal and external server links. The slaves all communicate over AF_UNIX/AF_INET sockets with a linking protocol.

Nice thing about this design:
1. It's parallel and without the need for any locking (or similar)
2. Crashes are more localized. Only a subset of users are affected.
3. The use of AF_UNIX allows for seamless upgrades (i.e. launch new server binaries without ever actually closing a single connection ... all descriptors and meta data can be transferred to the new server processes)
4. It is potentially more portable (among UNIX-like systems) since the 1024 descriptor limit of select() is a non-issue. 10 slave servers gives 10240 connections.
5. It is designed and implemented as a distributed memory system ... it supports linking from the start

Bad things about this design:
1. Distributed memory stuff is complicated.
2. Some communications within a logical server invoke the kernel (sendmsg()/recvmsg()). A threaded server would not have this overhead.

General Discussion / duckduckgo search engine
« on: April 15, 2012, 12:38:11 am »

I'm actually quite surprised. It seems to give more relevant results than Google. I've recently noticed Google's results are increasingly cluttered with crap.

It seems to be picking up in popularity and supposedly is one of Time's top 50 and pccmag's top 100, if that actually means anything.

I wonder how much of this is duckduckgo and not the other search engines it aggregates, or even how it protects your privacy (so it claims).

General Discussion / Kim Dotcom sends funny letter to neighbors
« on: January 24, 2012, 01:08:22 pm »

Hilarious! "Don't forget to bring the cocaine," muhahaha! I think the title of the article is a disservice. He's obviously having fun in this letter.

General Discussion / YaCy peer-to-peer search engine
« on: November 26, 2011, 01:12:23 pm »
It's brilliant. If every home system crawls the Internet, you get a relatively complete index that is unhindered by censorship and bias.

Check it out here.

Unfortunately, I had a bad experience with it. I think the software is perhaps not mature enough to be considered secure. Shortly after starting the YaCy client, Security Essentials caught three variants of PHP/C99shell. These were temp files named zipParser_xxxxx.php and zipParser is a Java thing (YaCy is written in Java).

I'm a big proponent of this sort of thinking though. Peer-to-peer technology is also presently used by Blizzard to distribute the SC2 client and patches.

Let's take a step back for a minute ... what problem did this Cloud concept originally solve? What does it solve now?

NOTE: Let me clarify that what I mean by Cloud isn't really the Cloud in the sense of cheaper and faster hosting and deployment (as it was designed for), but the abused concept to mean the centralized computing from the past century.

Back in the days of MULTICS, computer hardware was the stuff of companies, governments, universities and labs. No ordinary user could afford this hardware (and at the time with limited applications, who would want to?). It made sense to centralize computing and interface relatively inexpensive terminals with the computer.

But this isn't the case anymore. Computers, tablets and phones are already relatively cheap and relatively powerful computing devices. So, what kinds of pressing problems does the Cloud solve for home users? Comments? I'm very curious to hear this ... how can you justify this when phones already have 2 and 4 cores? Do we need to offload computation for typical phone applications? Come on...

From my point of view, the Cloud solves no problem for home users. I would say it introduces several problems, namely the Internet connection speeds will never match local hardware bus speeds. This is especially problematic when you want to interface input devices (e.g. like HD video cameras) and files with the cloud (especially if the connection is already under load and ISPs also severely limit upload speeds). There is also the issue of privacy and Internet and Cloud subscription dependency ... and this abuse of the browser. The browser wasn't designed to supplant serious game engines - it simply wasn't designed to do this or, for example, World of Warcraft and other Cloud-like games would use that instead of writing their own thin clients.

The way I understand it, this Cloud technology was designed to solve hosting and deployment problems ... how did it change into the thinking of the 1960s? It's one big scam in my opinion ... either a ploy to control IP or to collect usage information.

General Security Information / Spyware infects Drone Plane Command Center
« on: October 09, 2011, 11:10:27 am »
This is actually somewhat funny ... you'd never expect this to be a problem!

Pages: [1] 2 3 ... 5