Search found 146 matches

by coppro
Wed Dec 09, 2009 5:02 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0673: "The Sun"
Replies: 157
Views: 28336

Re: "The Sun" Discussion

Ow, my brain.
by coppro
Fri Jun 05, 2009 4:31 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0593: "Voynich Manuscript"
Replies: 110
Views: 24728

Re: "Voynich Manuscript" Discussion

I'll admit, I guessed wrong.

I guessed the appendices to LotR.
by coppro
Sun Apr 27, 2008 5:36 am UTC
Forum: Religious Wars
Topic: Static vs. Dynamic Typing
Replies: 144
Views: 44241

Re: Static vs. Dynamic Typing

I just wrote a piece of code that amuses me. I guess it forms an argument against static typing -- or at least, mandatory type annotations. Get a load of this monstrosity: To honest, a lot of the verbosity would be cut down if Java allowed you to parameterize type variables. My long class names don...
by coppro
Sun Apr 27, 2008 5:32 am UTC
Forum: Computer Science
Topic: Ternary C extensions
Replies: 20
Views: 3665

Re: Ternary C extensions

A quadternary complement of the ternary operator. Both expr ? expr : expr //(true, false) and expr ? expr: expr: expr // (true, unknown, false) are valid. That won't work. In this code: expr ? expr ? expr : expr : expr : expr it's ambiguous as to the expression the second colon should bind to. I'd ...
by coppro
Wed Apr 23, 2008 11:00 pm UTC
Forum: Coding
Topic: Epic coding moments
Replies: 127
Views: 19097

Re: Epic coding moments

There was a problem with a template instantiation that shouldn't exist being created. In order to trace it, I specialized the class to have none of the necessary members. As a result, GCC gave me an error that included the instantiation location, allowing me to determine the error!
by coppro
Fri Apr 18, 2008 4:45 am UTC
Forum: School
Topic: Awesome Teacher Quotes
Replies: 1762
Views: 322371

Re: Awesome Teacher Quotes

A test administered by the best social studies teacher wrote:Why is Wyoming so damn square?
Word for word, I still remember it to this day.
by coppro
Thu Apr 17, 2008 3:27 am UTC
Forum: Coding
Topic: larger_type c++ template metaprogram
Replies: 7
Views: 1585

Re: larger_type c++ template metaprogram

std::numeric_limits should have enough information for you to be able to metaprogram around it.
by coppro
Wed Apr 16, 2008 3:26 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 18555

Re: worst bugs ever (or your most hated)

My current most hated bug is one in which the compiler keeps telling me a variable isn't declared in the scope it's in when it's declared right about where it's first used. The annoying part is that it doesn't complain at all about me using the variable the line below the line it's complaining abou...
by coppro
Tue Apr 15, 2008 4:11 am UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 18555

Re: worst bugs ever (or your most hated)

Seg fault: for(std::vector<SomeClass>::iterator i = foo->getVectorOfStuff().begin(); i != foo->getVectorOfStuff().end(); i++) { doStuff(); } Non-seg fault std::vector<SomeClass> bar = foo->getVectorOfStuff(); std::vector<SomeClass>::iterator i; for(i = bar.begin(); i != bar.end(); i++) { doStuff();...
by coppro
Fri Apr 11, 2008 5:02 pm UTC
Forum: Religious Wars
Topic: Checked Exceptions vs Unchecked Exceptions
Replies: 31
Views: 4653

Re: Checked Exceptions vs Unchecked Exceptions

For checked exceptions, I sorta like the way C++ does it, where it's optional. But I'd rather have it so that it would figure out some sort of compile-time error there instead of what it does: something about throwing a different exception or calling unexpected(). (Not that this sort of checking wo...
by coppro
Fri Apr 11, 2008 4:07 am UTC
Forum: Coding
Topic: What languages can be used as a functional language
Replies: 18
Views: 2181

Re: What languages can be used as a functional language

C++ templates :D
by coppro
Thu Apr 10, 2008 4:46 am UTC
Forum: Coding
Topic: Arbitrary length parametrization
Replies: 24
Views: 2123

Re: Arbitrary length parametrization

C++09 supports this, and, AFAIK (and I don't know a lot about lots of languages), is the only language to support a type-safe unknown-#-of-parameters function. This particular feature has already been implemented in GCC (variadic templates). There's also a workaround involving the preprocessor, work...
by coppro
Thu Apr 10, 2008 4:09 am UTC
Forum: Coding
Topic: What is the Java way to use C++'s version of "this"
Replies: 15
Views: 1598

Re: What is the Java way to use C++'s version of "this"

public class Someclass { public Someclass getReferenceToSelf() { return this } } Why are you trying to do that? Think about what that method actually does. You're calling a method on an object to get the object you called the method on. So you call "foo.getReferenceToSelf()" and it return...
by coppro
Thu Apr 10, 2008 2:20 am UTC
Forum: Coding
Topic: What is the Java way to use C++'s version of "this"
Replies: 15
Views: 1598

Re: What is the Java way to use C++'s version of "this"

I think I understand what you want to do... in Java, everything is a reference, right? So if you want to pass by reference (so that a new object is not created), just pass "this". On the other hand, if you want to pass by value (to create a new instance, so that changes won't affect the ca...
by coppro
Wed Apr 09, 2008 6:11 pm UTC
Forum: The Help Desk
Topic: Coloring terminals in Debian
Replies: 7
Views: 1170

Re: Coloring terminals in Debian

You can modify your PS1 prompt value (in your ~/.bashrc, or perhaps your /etc/bash.bashrc) to make sure that it always contains the host name and the user name. Something like ">\u@\h:\w\$" (that's what I use) should do the trick.
by coppro
Wed Apr 09, 2008 6:05 pm UTC
Forum: The Help Desk
Topic: Custom colored maps
Replies: 3
Views: 946

Re: Custom colored maps

Hammer wrote:This seems to work pretty nicely at a quick play-with.
http://www.zonums.com/gmaps/colorit.html

Instructions here.
http://freegeographytools.com/2007/colo ... r-your-map
That's sweet! Is there any way to make it do the whole world?
by coppro
Wed Apr 09, 2008 5:20 pm UTC
Forum: The Help Desk
Topic: Custom colored maps
Replies: 3
Views: 946

Custom colored maps

For a school assignment, I thought it would be cool if I could get a map of the world and have special coloring to represent some data. You know, like those maps that show some statistic like HIV rate and have the countries with a bad statistic colored red, and countries with a good statistic colore...
by coppro
Mon Apr 07, 2008 11:11 pm UTC
Forum: Coding
Topic: worst bugs ever (or your most hated)
Replies: 196
Views: 18555

Re: worst bugs ever (or your most hated)

The next morning I was alert enough to spot the misplaced bool. But what really irks me is that the compiler (GCC 4.2 with -Wall) helpfully converted slowest_thread_pos to an int (as 1 if it was nonzero) but didn't warn about the bool->int conversion at all. WTF? And here's me getting annoyed with ...
by coppro
Mon Apr 07, 2008 1:41 pm UTC
Forum: The Help Desk
Topic: Laptop Will Not Power On
Replies: 8
Views: 1380

Re: Laptop Will Not Power On

That really sucks. So the problem wasn't just main screen not turn on.

Maybe if you're lucky it's just a loose connection or something, rather than a busted PSU. That would ruin anyone's day.
by coppro
Mon Apr 07, 2008 4:59 am UTC
Forum: Coding
Topic: useful script and code snippets
Replies: 12
Views: 1928

Re: useful script and code snippets

maafy6 wrote:
bridge wrote:Thanks for the hint Dropzone
btw maafy6:

Code: Select all

alias z='ls -la'
will save you quite a lot of time once you remember use it...


That's already aliased by 'll' :)
ll is just ls -l. la is ls -a, leading me to add lla=ls -la.
by coppro
Mon Apr 07, 2008 4:23 am UTC
Forum: Coding
Topic: Help with Bison recursion.. =>
Replies: 4
Views: 1443

Re: Help with Bison recursion.. =>

Probably something along the lines of:

plus-expr: "+" | plus-expr expr

That's usually how operators are chained for binary notation, so I would expect it works for prefix (haven't tested it though).
by coppro
Sun Apr 06, 2008 2:21 am UTC
Forum: Religious Wars
Topic: Checked Exceptions vs Unchecked Exceptions
Replies: 31
Views: 4653

Re: Checked Exceptions vs Unchecked Exceptions

What the world needs is optional exception-checking. And I don't mean -fno-checked-exceptions, I mean that each function has a separate toggle. You add the safety of exception safety, but you gain the flexibility of non-checked exceptions (for instance, a library writer might check the exceptions fo...
by coppro
Sun Apr 06, 2008 2:19 am UTC
Forum: Religious Wars
Topic: Star Trek vs. Star Wars
Replies: 360
Views: 146020

Re: Star Trek vs. Star Wars

What about the Scimitar? It can kill all life on a planet or a spaceship - of any size.

Also, what is the battleground? Presumably, the Force doesn't exist at all in the Star Trek universe.
by coppro
Sun Apr 06, 2008 2:10 am UTC
Forum: The Help Desk
Topic: Free database software?
Replies: 6
Views: 1158

Re: Free database software?

Bruce wrote:The office options are access (not in basic packages) and excel (many limitations).
OO.org?
by coppro
Sat Apr 05, 2008 8:03 pm UTC
Forum: Religious Wars
Topic: The value of Sudo
Replies: 77
Views: 11455

Re: Best *nix Desktop Environment/Window Manager/whatever

Actually, Ubuntu makes just about the same assumption other systems make WRT sudo - that the person installing the OS should be able to do anything (this is a fair assumption, as the act of installing the OS usually is only done by the same person configuring it, installing software, etc.). The firs...
by coppro
Sat Apr 05, 2008 7:57 pm UTC
Forum: The Help Desk
Topic: Causing a uranium-238 fission reaction on my computer
Replies: 14
Views: 1698

Re: Causing a uranium-238 fission reaction on my computer

Of course it's safe to copy them. I just want to figure out which ones I don't need any more. Ones I haven't changed isn't so much of an issue. My contents of ~/.* which is about 10 years old and has moved over several machines is around 5M. Why bother? Because I hate a bunch of files that make it ...
by coppro
Fri Apr 04, 2008 2:03 pm UTC
Forum: The Help Desk
Topic: Causing a uranium-238 fission reaction on my computer
Replies: 14
Views: 1698

Re: Causing a uranium-238 fission reaction on my computer

What do you mean by "dotfiles"? If you mean ~/.*, then these are all created at run time, not by packages. Also, it is therefore safe to just copy them. Job done. Of course it's safe to copy them. I just want to figure out which ones I don't need any more. Ones I haven't changed isn't so ...
by coppro
Wed Apr 02, 2008 11:08 pm UTC
Forum: The Help Desk
Topic: Causing a uranium-238 fission reaction on my computer
Replies: 14
Views: 1698

Re: Causing a uranium-238 fission reaction on my computer

All dpkg-query -s shows is the package data, copied almost verbatim from the package list. And is there a way to do so with dotfiles (besides mtimes, which are probably messed up because I had to restore from a backup once)?
by coppro
Wed Apr 02, 2008 11:04 pm UTC
Forum: Coding
Topic: Really ugly error . . . any ideas?
Replies: 12
Views: 1743

Re: Really ugly error . . . any ideas?

Tac-Tics wrote:The error was using C++ =-P

C++ Template errors have a lower signal to noise ratio than the smallest nontrivial subnetwork of the Internet.
We're all holding our breath for concepts already.
by coppro
Wed Apr 02, 2008 5:35 am UTC
Forum: Coding
Topic: What coding language to use?
Replies: 20
Views: 2076

Re: What coding language to use?

I think if you really want to understand how programming works, start with C. If you get too used to garbage collection and the likes, you will become spoiled. The easier route is not always the better. If you understand C, you can program Java better, IMO. I would recommend splitting the differenc...
by coppro
Wed Apr 02, 2008 1:42 am UTC
Forum: The Help Desk
Topic: Causing a uranium-238 fission reaction on my computer
Replies: 14
Views: 1698

Re: Causing a uranium-238 fission reaction on my computer

Thanks for the partition advice, guys. I know that a partition is not strictly necessary, but I find that there are advantages to controlling what is mounted more finely, and I want to use LVM because I need to be able to resize on demand, and that's why I want my boot partition to be absolutely min...
by coppro
Wed Apr 02, 2008 1:39 am UTC
Forum: The Help Desk
Topic: "User has not been granted the requested logon type"
Replies: 13
Views: 3777

Re: "User has not been granted the requested logon type"

Sounds like you've been hit by a virus or something - maybe you should try accessing the administrator account from safe mode and see what happens (if you have the access)
by coppro
Tue Apr 01, 2008 1:08 am UTC
Forum: General
Topic: Re: It's that time again!
Replies: 55
Views: 7307

Re: It's that time again!

LE4dGOLEM wrote:GMT, motherlickers. Yeah. Sweetass sixteen.
Hey, that's sweet. I turn 16 on Saturday!

I've attached a meager present - open card.gif first, then watch the fireworks!

Also, congratulations on being able to revenge the other mods on the happenings of your last birthday ;)
by coppro
Tue Apr 01, 2008 12:02 am UTC
Forum: The Help Desk
Topic: Causing a uranium-238 fission reaction on my computer
Replies: 14
Views: 1698

Causing a uranium-238 fission reaction on my computer

When Hardy comes out the three weeks from now, I plan on nuking my hard drive and copying my data over to the new install. I have an 80 GB hard drive, and I'm trying to figure out a couple of things: #1: How do I get Kubuntu to install to multiple partitions? I want to have something along the lines...
by coppro
Mon Mar 31, 2008 11:43 pm UTC
Forum: The Help Desk
Topic: Halp me fix mah internetz! - *SOLVED*
Replies: 33
Views: 2377

Re: Halp me fix mah internetz!

I've had troubles with mup.sys before... IIRC, there's some driver (don't remember whether it's mup.sys or some other driver) that needs to be disabled through the Recovery Console (you need an XP install disc for that).
by coppro
Mon Mar 31, 2008 11:00 pm UTC
Forum: Religious Wars
Topic: x86 assembly syntax
Replies: 38
Views: 19117

Re: x86 assembly syntax

I find it funny that no one has mentioned GAS here - it's basically (so far as I can tell anyway) Intel syntax with AT&T disambiguation features, such as sigils for all the values and the "movl" convention. I find GAS the easiest to digest (AT&T is really hard to think in, and Inte...
by coppro
Mon Mar 31, 2008 10:48 pm UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 124577

Re: Funniest/Most Annoying Code Comments

I cant wait till my programming tutor marks the game engine I'm coding. MWHAHA! void Log( const char *fmt) { FILE *log; log = fopen ("log.txt", "a"); fprintf (log, fmt); fclose (log); } You know, it's probably really slow to open the file every time you need to write with it... ...
by coppro
Sat Mar 29, 2008 6:04 pm UTC
Forum: Religious Wars
Topic: x86 assembly syntax
Replies: 38
Views: 19117

Re: x86 assembly syntax

aldimond wrote:strlen("4(%eax)")==strlen("[eax+4]")==7
False. strlen("4(%eax)")==strlen("[eax+4]") is 1, which most definitely does not equal 7.
by coppro
Wed Mar 26, 2008 4:26 pm UTC
Forum: Religious Wars
Topic: Underscores vs CamelCase
Replies: 103
Views: 49775

Re: Underscores vs CamelCase

I find lower_case_with_underscores easier to read (hyphens don't count because I don't program in languages where they are valid identifier characters), but harder to type. And I prefer the distinction that they give, so I always use lower_case_with_underscores for variables and namespaces, but lowe...
by coppro
Wed Mar 26, 2008 3:30 pm UTC
Forum: Religious Wars
Topic: Unsigned integers
Replies: 39
Views: 5498

Re: Unsigned integers

What's the big deal with objects that aren't derived from a global root object class? If you are passing around objects of any type, you probably want to use templates, or some sort of clever wrapper class (like Boost.Any).

Go to advanced search