News:

How did you even find this place?

Main Menu
Menu

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.

Show posts Menu

Topics - nslay

#1
General Discussion / What's wrong with x86?
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?
#2
General Discussion / Weather
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.
#3
General Programming / Lambdas and 'auto' types in C++11
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?


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;
});


Or


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!

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:

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.


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?
#4
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
etc...

(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):
http://negativo17.org/freebsd-10-new-x-org-kms-pkgng-poudriere/

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.
#5
Botdev / A Conversational IRC Bot
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.
#6
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?
#7
Botdev / Creating BNX clone for IRC
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 battle.net 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
#8
General Discussion / OGC's logo
August 23, 2012, 08:24:21 PM
This is very funny!

http://www.telegraph.co.uk/news/1901656/OGC-unveils-new-logo-to-red-faces.html

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

EDIT:
Quote
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."
BAHAHAHAHA!
#9
http://video.adultswim.com/harvey-birdman-attorney-at-law/sebben-and-sebben-employee-orientation.html

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!
#10
Blizzard, WoW and Bots / Server designs
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.
#11
General Discussion / duckduckgo search engine
April 15, 2012, 12:38:11 AM
http://www.duckduckgo.com/

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).
#12
http://www.guardian.co.uk/technology/2012/jan/24/kim-dotcom-scares-neighbours-email

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.
#13
General Discussion / YaCy peer-to-peer search engine
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.
#14
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.
#15
This is actually somewhat funny ... you'd never expect this to be a problem!

http://www.guardian.co.uk/technology/2011/oct/09/virus-infects-drone-plane-command
#16
Maybe this belongs in the bot forum ... not sure.

Read it here.

Now I don't know the details of how a Turing test is conducted, but it is claimed that Cleverbot appeared 59% human while humans scored just 63%.

The version that is tested does more work to produce responses than the typical Internet interface. It's fun to chat with, but you wouldn't be chatting with the more intelligent version that is used in competitions.

It will probably pass the Turing test in the near future because it is using a very large database of learned responses produced by people, the users of the Cleverbot (I was last told a few months ago that it has 42 million learned responses) ... hence, when it responds, it seems feels like it could be a person (or alternating people).

If it passes the Turing test, it will mean that the test is flawed. Cleverbot is not intelligent.
#17
http://www.guardian.co.uk/uk/2011/sep/13/internet-troll-jailed-mocking-teenagers

Really? You can be jailed for that? Disgusting behavior ... but jeez ... just words. Maybe it's a kind of harassment?
#18
General Discussion / Stupid GUI designs
September 08, 2011, 05:11:43 PM
One of the most irritating aspects of Windows and Windows-wannabe Window managers is the 'Minimize', 'Maximize' and 'Close' button tightly bundled together at the top right (top left for OS X). Seriously, who thought it was a good idea to group non-critical windowing operations such as 'Minimize' and 'Maximize' with critical operations such as 'Close'? Surely no one clumsy or in a hurry will accidentally press the 'Close' button when they really meant to maximize or minimize, will they?

Why can't 'Close' be on the top left and 'Minimize' and 'Maximize' on the top right? That would make it really hard to press 'Close' by mistake. 'Close' really deserves some care and respect.

Good thing some applications are well written to ask you if you want to save your work or if you really want to exit.

Today I ran into another dumb GUI design, Command Prompt's drop down menu keeps 'Close' immediately above 'Edit' ... you know, in case you wanted to 'Mark' the command prompt to copy text or 'Paste' text into the command prompt. Except, when you're clumsy or in a hurry, you might click on 'Close' when you really wanted to click 'Edit.'

Seriously, why is this still an issue? Why is this really bad design continually propagated in so many other windowing systems?
#19
General Discussion / Breaking Prediction Methods
June 15, 2011, 01:08:32 AM
Came across this:
http://www.guardian.co.uk/technology/2011/jun/14/google-instant-pages-web-search

Nifty idea, but I'm increasingly concerned about the prediction power of advertisement firms, search engines, social media, online stores, etc...

Based on trivial actions such as clicks or search queries, they can build very accurate profiles about you and even fill in the blanks very accurately. What do they do with this information? Beats me ... they don't tell anyone. Which information do they collect? They don't tell you that either ... it's all disguised into seemingly harmless and nifty services for a mostly gullible and unsuspecting population.

Let's take Facebook "Like" for example ... it's brilliant! People want their friends to know what they like. Why is this a feature in Facebook? Duh, tells Facebook what individuals like and what the population likes on average. Nobody thinks of that and it's so harmless that nobody realizes its just a wee bit of privacy's blood (until it bleeds to death).

The ability of these firms to collect and use information as they see fit, and build very accurate public and personal profiles without your consent is very troubling. These prediction tools with a wealth of training data are so potentially powerful that these companies probably know more about you than yourself or anyone you know.

So, how can we make it harder for them? Well, aside of knowing the details of their methods ... one could probably employ comical methods to every day life:


  • Deliberately do something you wouldn't normally do. For example, search for something you've never searched for. Click on something you wouldn't normally click on.
  • Query non-sense. One can introduce incompatibilities into search queries:
    Quote
    - Assemble magic 8 balls using only rooster sounds
    - Using gmail to grill giraffe meat
    - Plant cacti in edible jello
    - Ancient medicine cows and their effect on a future octopus race
    - The smell of the color blue
    - Spicy sauce for triangles
  • Ambiguous search queries. One can phrase search queries with no clear interpretation.
    Quote
    - Attack bears with lasers
    Are these attack bears equipped with lasers or are we wanting to attack bears with lasers?
  • Like, or similar, something you don't really like (i.e. mediocre). This introduces bias into predictions about what you and the population like.
  • Append unrelated keywords into emails and messages
    Quote
    P.S. I talked to Cisco about U2 and Nike Shoes. I like KFC with Intel processors.
Not sure how much you would have to deviate from your normal behavior for it to be effective ... but if everyone did that, it'd probably be a lot harder to make predictions.

I think non-sense can be filtered out, if NLP can even solve comprehension problems yet ...
#20
General Discussion / Brain and gender
June 10, 2011, 07:30:19 PM
I found this site back in high school:
http://www.bbc.co.uk/science/humanbody/sex/

I thought I'd bring it up since gender has been heavily discussed the past few days. It's an interesting test and defines gender in terms of brain functionality.

It also reveals why women might struggle with math. Math is often taught in a geometric way, but women don't generally excel at geometric tasks (but they excel in other tasks!). Hence, I believe women are merely taught math the wrong way ... but that's a different discussion altogether!

I scored 100% Male in High School, but now I score 50% Male ... I think it's ideal to be in the middle somewhere since both male and female have advantages.