« first day (648 days earlier)      last day (4525 days later) » 

00:00
@R.MartinhoFernandes I don't know... if Office 2013 actually supported publishing to anything except Wordpress, it might be a pretty attractive solution.
@Mysticial sometimes the "tasks" window has errors, but they're currently only for files not in my project (a seperate java file and a few html logs)
Ewwwww. What.
Although that is kind of like saying "PHP would be a great language if it didn't have so many problems".
I write my posts in vim with Markdown.
Office? WTF.
sonofa... the html logs that are causing errors are the freaking buildlog generated by netbeans...
00:00
@MooingDuck That last time I used Netbeans/Java for any serious programming was more than 4 years ago... :(
@JimNorton $10/month is out of my price range :)
@minitech Really? I know you are a jokester. But really?
@JimNorton He's 14.
@minitech Why can't you just get an account on any normal webhosting service? They're all less than $5 USD a month?
@MooingDuck Drop Java and use Visual Basic .NET. The IDE is like box-shadow and -webkit-box-reflect, if you know what I mean.
@Mysticial Well, I can only find cheap PHP so far, and I really want to expand my horizons.
00:02
@minitech I wish. I wish so hard. :(
@minitech apparently my web-programming sucks enough to not know what "cheap PHP" is supposed to mean. lol
@minitech You aren't a hacker are you? IF not, I can provide you with a free account on my VPS.
@Mysticial Sorry, I mean cheap hosting that I can find only supports PHP and no other languages.
It doesn't really see a lot of use.
@JimNorton I'm not a hacker! Unless you count that LinkedIn thing, and that was months ago.
Ell
Ell
00:03
use free hosting... byethost :D
@minitech ah... yeah I wouldn't know. My own website is 100% flat html with a touch of css...
@Mysticial Beautiful :'( I want to do that, I really do.
@minitech Try sdf.org
But the prospect of rewriting the header and footer on every page is not really attractive.
@minitech ah... it's just copy/paste for me.
It's not like I have 1000 pages...
maybe a hundred? I'd have to count
00:05
Well, it's not like I do either, I guess.
Oh, a hundred? Well, that is a little much to copy and paste, isn't it?
Unless you're like a sed pro.
Which a lot of people seem to be.
@minitech Well, every time I make a new page, I just copy and paste the short header/footer layout from an existing one. This is all done in Adobe Dreamweaver...
so it's all primitive for me
@Mysticial But if you want to change it afterwards?
Since I really know nothing beyond very basic HTML
Dreamweaver, boo :O
@Mysticial what is your site URL?
00:07
@minitech I have a small .css file that a friend setup for me.
@JimNorton It's on my profile
Hey! Dreamweaver rocks!
Ah, darn it. I let UTC-tomorrow get away.
recap reset...
maybe there's something interesting to answer today
@Mysticial I mean, like... content.
Hey. Maybe I could generate all my pages with client-side JavaScript.
And keep the body in one big <noscript>.
00:08
@MooingDuck up one level
I own the entire numberworld.org domain
Memes are overrated
@Mysticial Would be surprising if you owned the upper half only
But yes, the y-cruncher page, is by far the most linked to and visited page on the entire domain.
Last time I checked, it was the entry point for 90%+ of the visits.
@Mysticial because that's the one linked to from your profile
00:10
@MooingDuck Impressive
@MooingDuck My profile links to the homepage as well. But all many external sites with content relating to Pi and such link to the y-cruncher page only.
Lynx is the only browser anyone needs to support!
Mainly from my XtremeSystems thread which has like 200k views. But also from Slashdot and a few other major sites.
@Mysticial oh, in the "webpage" section? Who puts stuff there?
@MooingDuck I did just for completeness lol.
00:13
I made a Visual Basic .NET chat room once.
It got no visitors. Ever.
ha... googling "Pi Benchmark" shows my site as #5.
Stack Overflow, I am disappointed.
Tells you something about the learner's attitude in the VB.Net crowd...
(nothing wrong with VB.Net... well not a lot. Just not in the centre of (pro)activity or so it seems)
@sehe Yeah, pretty much v_v
(Because ^_^ + v_v > :) + :()
00:15
(You wanna know why? I'll tell you why.)
(Parentheses.)
(That's right. Smilies don't look good in parentheses.)
(Unless they're right side up ^_^)
@Mysticial Erm, that looks broken.
@R.MartinhoFernandes The link or the general idea?
Or the thing?
Once my tests are green, I don't touch them again. When they're red, they are often red again and again, because I'm fixing it.
why do people here continually impress me
@minitech The idea.
00:18
while at SO proper it's opposite
@Cheersandhth.-Alf Because we're awesome.
Well, I am, but the awesomeness is so much it radiates off to the others.
Because this room is tagged , that's why!
On Stack Overflow, they eliminated the .
But not the code golf.
Which is great.
This is hilarious:
I don't get it...
00:20
@Cheersandhth.-Alf Impress you on a positive or negative light?
@minitech that's what makes it hilarious.
@minitech Damn. I was cheated by the chat message throttling thing again. I so hate it when that happens
@R.MartinhoFernandes yes
Still kinda funny, though
@sehe wow...
00:22
@Mysticial Did you write a lot of hand coded assembly for y-cruncher?
@JimNorton almost none actually
lot of of handcoded SSE intrinsics though
I think you get the idea. The thing is, having a humongous variant is pretty much a code smell in my experience. — sehe 5 secs ago
@Mysticial ah.. Have you compiled and run on the massive computers at your school?
@JimNorton That wouldn't work. It's not a supercomputer program. It's needs shared memory.
@Mysticial Interesting.
00:25
Man. i'm laughing too hard right now
@sehe, Are you on aot?
@chris Pretty sure I'm not, though I guess I can't know for sure until you tell me - discretely - what aot is ... :(
artoftrolling
Oh. No. Sounds like a good place for that joke yes. No I stumbled upon happyplace.com/4286/…
@sehe, Those are very similar. Lots are on both.
00:30
@sehe Some of those signs don't seem "completely well-meaning".
Yeah. It beats scanning cover art for too many CDs. And running gems like this:
function autocrop()
{
    local croprect=$(convert "$1" -virtual-pixel edge -blur 0x15 -fuzz 15% -white-threshold 20% -trim -format '%[fx:w+20]x%[fx:h+20]+%[fx:page.x-10]+%[fx:page.y-10]' info:)
    local targetfname="$(dirname "$1")/$(basename "$1" .pnm)"
    convert "$1" -crop "$croprect" +repage "$targetfname".png
}

time for a in $(find -name *.pnm); do autocrop "$a"; done
I have another question about C++.
@Mysticial is like a genious.. good lord.
http://www.numberworld.org/about/ayee/
So far, I have abysmal download/scan ratio: I managed to download 15Mb in jpegs. I scanned 1.1Gb in PNM (ok, about
find -name *.png -exec du -sb {} + | cut -f1 | echo "($(paste -sd+)) / (1024*1024)" | bc
214 Mb after cropping and converting to PNG)
Hey, would anybody be annoyed if I asked for a code review on C code here instead of on CodeReview.SE?
00:36
@minitech Yup :) But if it is good code, we might not kill you for it
@sehe I am quite literally worried now.
You're easily worried, Padawan
@sehe You're right. Here goes non-nothing.
gist: My prototype webserver-thing, 2012-07-25 00:37:33Z
#include "xeric-utils.h"

/* The main method. */
int main(int argc, char * argv[]) {
	int i;
	int port = 80;
	struct in_addr address = {0};

	/* Parse the arguments: */
	for(i = 1; i < argc; i++) {
		if(strcmp(argv[i], "--port") == 0) {
			i++;

			if(i == argc) {
				warn("Expected port number after --port option. Continuing with port 80.");
				break;
			}

			port = strtoport(argv[i]);

			if(!port) {
				warn("Invalid port number specified. Continuing with port 80.");
				port = 80;
			}
		} else if(strcmp(argv[i], "--address") == 0) {
			i++;

			if(i == argc) {
				warn("Expected address after --address option. Continuing with address 0.0.0.0.");
				break;
			}

			if(inet_pton(AF_INET, argv[i], &address) != 1) {
				warn("Invalid address specified. Continuing with address 0.0.0.0.");
			}
		} else {
			printf("Unrecognized option %s.\n", argv[i]);
		}
	}

	int client;
	socklen_t clilen = sizeof(struct sockaddr_in);
	char buffer[1024];
	char str_address[16];
	struct sockaddr_in serv_addr, cli_addr;
	int n;

	/* Create the socket: */
	s = socket(AF_INET, SOCK_STREAM, 0);

	if(s < 0) {
		warn("Error opening socket.");
		return 1;
	}

	/* Listen on the socket: */
	serv_addr.sin_family = AF_INET;
	serv_addr.sin_port = htons(port);
	serv_addr.sin_addr = address;

	errno = 0;

	if(bind(s, (struct sockaddr *) &serv_addr, sizeof serv_addr) < 0) {
		if(errno == EADDRINUSE)
			warn("Could not bind to port; already in use.");
		else
			warn("Could not bind to port due to an unknown error.");

		return 1;
	}

	listen(s, 5);

	success("Xeric 0.1.0 has started!");

	inet_ntop(AF_INET, &serv_addr.sin_addr, str_address, 15);
	printf("Listening at %s:%d.\n", str_address, port);

	/* Enable the Ctrl+C SIGINT handler so that the socket can be closed */
	signal(SIGINT, interrupted);

	while(keepRunning) {
		/* Accept a client: */
		client = accept(s, (struct sockaddr *)&cli_addr, &clilen);

		if(client < 0) {
			warn("Error on accept.");
			return 1;
		}

		ip4_t r_addr = {cli_addr.sin_addr.s_addr};
		printf("Got client from %d.%d.%d.%d.\n", r_addr.components.p1, r_addr.components.p2, r_addr.components.p3, r_addr.components.p4);

		/* Read data from the client: */
		bzero(buffer, 1024);
		n = read(client, buffer, 1023);

		if(n < 0) {
			warn("Error reading from socket; breaking connection.");
			goto close;
		}

		puts(buffer);

		/* Write data to the client: */
		const char * output = "HTTP/1.1 200 OK\nContent-Type: text/html\n\n<h1>It works!</h1> <p>Welcome to Xeric, the tiny server.</p>";
		n = write(client, output, strlen(output));

		if(n < 0) {
			warn("Error writing to socket; breaking connection.");
			goto close;
		}

	close:
		/* Close the connection: */
		close(client);
	}

	if(s >= 0) {
		close(s);
	}

	return 0;
}
Uhoh. Giant wall of code
Gists don't play well with others :)
It looks fairly boiler-plate for BSD Socket code.
00:40
@minitech what is that header?
Yeah, I didn't think it would onebox the giant wall of code.
Sorry.
Why the gotos?
@sehe It's a header that includes my other headers :) And it also defines ip4_t, success and warn. And strtoport.
@JimNorton I'm sorry. There is no excuse.
I think it lacks functions.
ugh... tabs...
00:42
The onebox fills the whole screen and I can't see a whole function in it.
@Mysticial Tabs FTW!
@R.MartinhoFernandes There's one whole function!
@Mysticial Do you have an interest in optimizing the calculation of the Mandelbrot and Julia sets?
I thought they call it main because you should put everything in it?
@JimNorton not yet, I really have the time to get into too many things
Okay, thanks for the input - I shall function-ify this code.
00:44
@minitech I can't see it all without scrolling. That's bad.
@Mysticial Ok just curious. My first real C program was a client-server app that generated portions of the mandelbrot set.... Very beautiful it is.
Are tabs standard practice in Javascript? I know it's contentious for C/C++/Java
@Mysticial Why is it contentious?
@minitech is the s (socket fd) a global variable?!
@sehe Yes... so I can close it in the SIGINT handler.
00:45
@minitech A religious war?
Are global variables even worse in C than in JavaScript?
@Mysticial I have no idea what you're talking about...
@minitech Universally they should be avoided when possible in any language.
Bear in mind I have never used C, nor C++, nor Java :P
51
Q: Tabs versus spaces—what is the proper indentation character for everything, in every situation, ever?

kiamlalunoThe coding standards for the code hosted in drupal.org suggest to use two spaces to indent the code; other sites suggest to use tabs to indent the code. What is the proper indentation character for everything, and in every situation? Please explain the answer you give.

Looks like tabs is winning that one.
@Mysticial surprising
00:47
I definitely agree with tabs. I think the only valid complaint about them is that they're "too wide".
nah
I started using spaces because tabs were too wide.
the main problem is that their width is unfixed
And I can configure them to be 4 in Sublime Text. So...
some consider it 8 spaces, some consider it 4
00:47
Then I ultimately stuck with spaces for consistency reasons.
@DeadMG Well, that's what I like about them!
I can't stand two-space indentation.
But when it's tabs, any good editor can be configured to use whatever form of indentation you like.
everybody else can't stand it when their width changes
I always indent 4 spaces.
Same here
and you can't control how wide they render on SO, for example
00:48
Hello to all
@DeadMG Yeah, that annoys me as hell...
@Mysticial Why? You use 4 spaces, right?
They're converted to 4 spaces on Stack Overflow.
but 8 on Pastebin, if I recall
@minitech yeah, but a lot of new users paste code with tabs and it renders as 8 I think
@DeadMG Mmh... more just 8 on browsers in general. Which sucks.
00:50
in addition, neither the chat nor the primary site will accept as code content pasted indented by tab
@Mysticial No... it only shows like that in the Markdown source. They show up as 4 spaces.
it has to be four spaces
@DeadMG Actually, they will.
Visits Formatting Sandbox
@minitech I find myself correcting a lot of new user's code because tabs absolutely destroyed the formatting. Maybe it was badly formatted to begin with..
good night everybody...
00:51
@Mysticial That'd probably be a mix of tabs and spaces. It tends to break stuff :P
Why can't WebKit just support tab-size? Sigh.
Probably the true. I never touch the cases that are properly formatted. So I wouldn't know if they used tabs or spaces.
I wanted to use C++ for the project, but...
It doesn't support generators (unless something changed very recently) so it makes no difference in the big part, which is parsing the headers from the client.
It's a bit of a nightmare in any language, actually...
C++ is probably the worst language you can possibly use for parsing. (not sure if Boost has anything to make up for it)
@Mysticial Really?
Why?
(Is yield more useful than I thought?)
it's one of those things you will realize when you actually try to parse something
And then you see 50 million questions on SO about how to use strtok and scanf.
That said, there are probably libraries already out there to do whatever you want.
385
A: Why can't there be an "ultimate" programming language?

Michael Stum Weakly typed languages like JavaScript and PHP suck as they are really error prone. Statically typed languages like C# suck as they are unnecessarily strict and lead to casting and more casting. Specialized languages like SQL or RegExp suck because they are not powerful enough to implement a Web...

"Generic languages like C++ suck because it's too complicated to do simple stuff like parsing some text with them."
says it pretty well...
01:00
Mmmm. You can do parsing pretty damn well. It just gets hairy when you find out you needed to support Unicode
Well...
It's HTTP headers. I should be fine.
@minitech C++ doesn't have yield.
@Mysticial I know, that's why I'm wondering if it's the reason it's bad for parsing.
Simple things is fine.
And I'm also wishing it did have it because it would make the asynchronous parsing easier.
01:01
But without library support, parsing anything more complicated is a nightmare.
@minitech a minor troll: include the { blocks } here (there's no telling what you defined warn to be ^_^)
        if(errno == EADDRINUSE) {
            warn("Could not bind to port; already in use.");
        } else {
            warn("Could not bind to port due to an unknown error.");
        }
@minitech Many languages don't have yield. Yield (for parsing) is nothing more than a readable state machine. So, make a state machine. Switch-style, function pointer style, whatever
@sehe I actually just took them out because this is a code golf.
Don't worry, it's just a function :)
@minitech Is it? Use f*cking nodejs already !
@sehe I wanna learn C!
Though node.js is the awesomest thing ever.
$ cpp server.c | wc -l
5430
^ doens't look very golfed to me :)
01:03
C is easy to learn. You just need to avoid the ropes.
@sehe I'm slowly getting to that part :)
@minitech Not sure I agree, but for this kind of thing it is
C++ has a very steep learning curve, since the language tries to hide those ropes
@minitech Even though I hang out here, believe it or not, my C++ is probably the weakest among all the high-rep regulars.
And there went my battery.
@Mysticial Haskel is the awesomest for parsing.
@sehe I'm trying to help alleviate that :)
01:11
@R.MartinhoFernandes I'm aware of that. When will it be included in the standard library :P
@sehe You mean like char16, char32 and such?
@Mysticial No?
or do you mean string functions that properly handle unicode?
@Mysticial No, that's for storing code units.
01:12
Encodings, traversal, manipulation, comparison, canonical forms, validation, that kind of magic
That's pretty much... nothing.
ah... a whole library for unicode strings...
Right now, the only Unicode goodies you have in C++ are the UTF-8, UTF-16, and UTF-32 string literals.
Not just strings. Unicode is a whole lot of 'business logic' from a highly specialized domain. People try to ignore it as often as they can, but... it is always there
You know what, who cares about tabs and spaces.
01:13
I do
I'll do it 10-year-old-me-HTML style.
= No indentation!
@minitech lol
Or rather, I don't care for tabs
01:14
I have inconsistent indentation in my webpages
I do most of the designing in dreamweaver, so I don't see much of the html anyways.
@Mysticial Are you at least consistent about your inconsistency?
@minitech No, I'm very inconsistent with my consistency.
Btw, template <typename EncodingForm, typename Container> class basic_text;, template <typename Container, typename EncodingForm> class basic_text;, template <typename EncodingForm, template <typename> class Container> class basic_text; or what?
'Bye, I'm off to check actual, physical mail.
It hasn't been a while. I check it every day because I'm waiting for my Stack Overflow t-shirt...
lol, cya
SO T-shirt... wow...
01:17
I got one from scifi.SE.
But I think I botched it when I picked the size, as that thing can fit two mes.
And I'd really like one from SO instead.
I should get a "The <center> cannot hold" t-shirt.
@R.MartinhoFernandes too advanced for me
Yeah, I meant plural U.
@R.MartinhoFernandes Hmmm.
What is the most likely? Different container or different encoding form?
01:19
That's exactly what I'm asking!
Are you going to put default types in there?
Well, speak of the devil! My t-shirt's here.
That's an option to consider too.
Though I can't default then both, because text<> looks silly. :(
@R.MartinhoFernandes Some of those options sure don't make sense.
@R.MartinhoFernandes That was a question?
D:
01:21
for example, text<UTF32, std::string>.
what now?
@R.MartinhoFernandes Indeed. But if you default the container, then it should definitely be second.
@DeadMG I guess I could static_assert on EncodingForm::code_unit being the same as Container::value_type.
@minitech You mean, like in my improved version (which, accidentally, does compile and run, as opposed to the original snippet ^_^):
But I would put encoding form first.
Feels more natural. It's the "value type" after all.
I'm somewhat inclined towards the one with the template template parameter.
With alias templates they are actually digestible.
01:23
I wouldn't be so comfortable with it
Metatemplate
you eschew all containers which are specific
@R.MartinhoFernandes Templates give you hardons. Of course you like the one with even more templates.
or for example, if I wrote a Unicode rope that took an Encoding as parameter
@sehe There, now it does: gist.github.com/3173828
01:24
@DeadMG Why would you need that?
@R.MartinhoFernandes Presumably, to be a rope of any Unicode encoding?
An Unicode rope that takes encoding parameter is template <typename EncodingForm> using unicode_rope = basic_text<EncodingForm, rope>;
@minitech Much improved. Also, seems, somehow something got borked in my obfuscated version, sorry
@R.MartinhoFernandes Not if rope is not a template.
How does it take an encoding parameter then?
01:26
voops
I meant, not a template on a type.
Ok, I'm confused now.
pretty sure that template<something Encoding> rope is incompatible with template<typename T> rope
Ah.
I guess you could do template <typename /* ignored */> using stupid_rope = rope<whatever>;. Ah screw it. I'll take a type and assert.
Dat assert
I've tried to contribute an extension to PHP before, but I gave up because I couldn't find its source files.
Where are they, it's all so confusing!
Xeo
Xeo
01:29
HELP
<typename EncodingForm, typename Container = std::vector<typename EncodingForm::code_unit>>?
@Xeo Ye-es?
@minitech Why is that a new gist though? You know you can have revisions, no? Git is a version control system :)
Xeo
Xeo
I'm watching Riichi Mahjong on Youtube... in Japanese
Drink.
Everything will be fine.
01:30
@sehe But they're separate files... :S
Xeo
Xeo
And it's damn interesting
@minitech Gists can have more than one file.
@minitech What does it matter?
@R.MartinhoFernandes Really?
Xeo
Xeo
even though I only understand like 5% of what they say (the mahjong terms)
01:30
@minitech Yup.
My gist contained more than one file.
@R.MartinhoFernandes No, you're serious?
Like, actually?
And btw, multi-file gists are oneboxable without commotion.
@minitech just pushed your file to mine to prove it:
Oh. There's no way in the web interface to do it?
(facepalm)
Thank you.
Oh, and also thanks, whoever linked to intovps.com. $10/month is not unreasonable if I host my other project on it too.
@minitech yourhosting.nl has comparable vps-es from 5€/month. But the site seems to be in Dutch only :)
Okay, I am now PayPal-ing $10 for one month. Yay!
I named my server "pink". I've never had a server before. Is that a bad name?
Meh, anything's fine.
Hey does anyone have any programming friends in Minneapolis Minnesota?
01:42
@jozefg Oh! I don't!
@jozefg I do have a non-programming aunt who used to live in the US, though. Is that close enough?
@minitech thanks anyways, Im only asking because I could really use a programmer to help mentor me a tad bit
So i think your aunt might not quite fit the bill
You basically need a programmer Minneapolis who's willing to teach and is knowledgeable in the tag that you need...
@Mysticial Yeah I know its a lot to ask... Frankly Im not to concerned about the tag, programming languages are syntax, the stuff im hoping to learn is more along the lines of best practices, proper procedures when working in a group blah blah blah
No, programming languages are not just syntax.
Exhibit A: C vs C++.
Exhibit B: C++ vs Java.
@jozefg You might be able to hire Peter Seebach. He is (or at least used to be) the moderator of comp.lang.c.moderated. As you can probably guess, he's fairly knowledgeable about C -- but at least the last time I talked with him, he didn't do C++ at all. He used to live in (or near) Minneapolis, but I haven't talked with him much recently, so I'm not sure if he still does or not.
01:49
^ I'm having trouble believing that's real
@JerryCoffin Do you by chance his contact info?
Yes, Morgan Freeman exists.
Har har
@jozefg Not right off. I found it on Usenet once, so I suspect some searching (especially on comp.lang.c.moderated) would probably turn it up, though of course I can't guarantee anything.
std::is_same annoys me all the time. I which I could do == for types.
01:51
@JerryCoffin Alright thanks, I appreciate any help I can get at this point to be honest
Uh-oh, the VPS doesn't want to install gcc.
sudo apt-get install gcc
It's not working.
"It's not working." - not a real question
I did that on purpose. As far as you know. Anyway, Package not found :)
All infinities are equal, but some are more equal than others. — Mysticial 1 min ago
Oh, I just had to do an apt-get update.
01:57
@Mysticial Hmm, I'm confused. There's no actual problem in that question other than the one the OP artificially created for... what reason?
@R.MartinhoFernandes Beats me.. I never tried sorting an array with infinities...
As long as < is a strict weak ordering (which infinities don't mess up), everything's fine.
NaNs could be another issue (I need to test).
But comparing infinities will give you false... which in that sense they will all be equal.
Comparing anything with NaN will be false, yes that will mess things up.
Yeah, NaN breaks irreflexivity.

« first day (648 days earlier)      last day (4525 days later) »