Search found 205 matches

by TNorthover
Sun Jul 15, 2012 7:58 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

I feel like I'm repeating myself, but the source of this confusion is precisely because you keep trying to think of pointers as somehow equivalent to arrays. When you say "float arr[10]", C allocates a block of memory large enough to store 10 floats. That's the array. You can ask C, "...
by TNorthover
Tue Jul 10, 2012 8:45 pm UTC
Forum: Religious Wars
Topic: Linux vs Windows vs Mac
Replies: 276
Views: 129243

Re: Linux vs Windows vs Mac

Well, not root access, not unless somebody's foolishly running a bunch of insecure plugins while logged in as root. Though of course there's plenty you can do with non- root access. Non-root access is enough to use a bunch of CPU cycles or network traffic. And, possibly more importantly, play havoc...
by TNorthover
Fri Apr 20, 2012 8:08 pm UTC
Forum: Coding
Topic: Checksum of code segment
Replies: 9
Views: 2908

Re: Checksum of code segment

elminster wrote:We already checksum files before loading and validate they've not changed since loading (currently moderately hard to break, but good enough for now). The issue is more to do with modifying code in memory.

Quis custodiet ipsos custodies.
by TNorthover
Wed Feb 22, 2012 9:20 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

So, my question is: How can I achieve this in Java? I don't seem to be able to treat classes like objects and just pass them around, so there has to be a different way. To me, the obvious solution is to pass around an instance of TokenType instead. If you haven't discovered reflection yet, then at ...
by TNorthover
Sun Feb 12, 2012 10:00 pm UTC
Forum: Coding
Topic: Python 32-bit vs. Python 64-bit?
Replies: 10
Views: 35316

Re: Python 32-bit vs. Python 64-bit?

There is no real advantage to 64 bit unless you're dealing with datasets that are over 2.5 GB that you want to keep in memory. But likely you won't be using python for processing those if speed is a concern at all. 8 extra registers are good: bringing x86 from hilariously undersupplied to just worr...
by TNorthover
Sat Jan 14, 2012 9:00 pm UTC
Forum: Religious Wars
Topic: The Rise and Fall of Programming Languages in 2011
Replies: 20
Views: 9379

Re: The Rise and Fall of Programming Languages in 2011

Interesting that C++ took a nosedive around 2005 ... That was about when some of the standards were changed (including the addition of namespaces). Eh? Namespaces were in C++98, and I don't think they were one of the features compilers especially lagged in. C++03 exists, but really didn't do much t...
by TNorthover
Tue Jan 10, 2012 8:05 pm UTC
Forum: Coding
Topic: Help with arrays/multiple header files
Replies: 18
Views: 2506

Re: Help with arrays/multiple header files

I can't help feeling something's gone horribly wrong here.
by TNorthover
Fri Jan 06, 2012 9:30 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

Actually, I think the only time assignment is generally ok in a conditional clause is for a while loop condition. Stuff like reading in the next line while doing a check to make sure it wasn't the end of the file. Anything more complex than that though and I'd be very hesitant to do so, if only for...
by TNorthover
Sat Nov 12, 2011 4:58 pm UTC
Forum: Movies and TV Shows
Topic: Terra Nova
Replies: 38
Views: 7229

Re: Terra Nova

Chen wrote:The latest episode was kind of dumb. They shielded the knowledge device thing, but they didn't keep backup chips in a shielded container? Also you'd think they'd have locked that box in a safe or something.

Why bother when you can put the magic smoke back in again? :roll:
by TNorthover
Sun Jul 17, 2011 4:29 pm UTC
Forum: Coding
Topic: Haskell/Glut(?) question
Replies: 5
Views: 2304

Re: Haskell/Glut(?) question

Ptharien's Flame wrote:Grapefruit seems to fit the bill, and it's purely functional/reactive, so for me that's a plus.

The trouble with those FR toolkits is that they all seem almost unmaintained. This one, for example, has had three changes since 2009.

I really wish one would take off, the ideas are very interesting.
by TNorthover
Fri Jul 08, 2011 9:15 pm UTC
Forum: Mathematics
Topic: Precedence of a^b^c
Replies: 15
Views: 3746

Re: Precedence of a^b^c

I forgot arithmetic existed! When you're working with groups you go right to left, but exponentiation is not associative, so you can't form a group under it. Bloody pure mathematics poisoning my mind! I think you may be confusing group actions with the groups themselves, and even then: ⋅ ...
by TNorthover
Wed May 18, 2011 8:11 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

Would the compiler (via optimisation) completely remove calls to it if N wasn't 1 or 2?; and if it were 1 or 2, does it remove the switch case, since it can determine result at compile time? It obviously depends entirely on the compiler. I think the key step would be deciding to inline the function...
by TNorthover
Mon May 09, 2011 7:22 pm UTC
Forum: Coding
Topic: Macro Ethics
Replies: 17
Views: 2929

Re: Macro Ethics

ochuckles wrote:There does not exist a mainstream static typing system that can catch a non-trivial amount of bugs before run time.

Do you want the rant about Hindley–Milner type systems being mainstream, or about them catching non-trivial bugs? ;)
by TNorthover
Wed Mar 02, 2011 7:42 pm UTC
Forum: Religious Wars
Topic: Programming Language Alignment Chart?
Replies: 32
Views: 37418

Re: Programming Language Alignment Chart?

Well, there's the clear mapping between static/dynamic typing and law/chaos. I would suggest that strict/loose typing maps to good/evil, but that's perhaps too much typing-related stuff. I don't know, it puts perl at chaotic evil. Any categorization which doesn't do that is intrinsically flawed in ...
by TNorthover
Wed Feb 23, 2011 7:32 pm UTC
Forum: Religious Wars
Topic: PC != Windows
Replies: 190
Views: 135846

Re: PC != Windows

shieldforyoureyes wrote:Just a little obscure history: Microsoft *has* ported Windows to machines not related to the 80x86 lineage before. Early versions of Windows NT ran on a number of RISC architectures.

They've also just announced an ARM port.
by TNorthover
Mon Jan 10, 2011 6:01 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

Why does this work? I can't think of any sane reason why True and False can't be literals. Neither could the python developers. It's fixed in Python3. Before that it was presumably for backward-compatibility. Initially python didn't have a boolean type, so there would no doubt have been various scr...
by TNorthover
Sat Dec 18, 2010 3:03 pm UTC
Forum: Coding
Topic: Similarities between C/C++ and Java
Replies: 24
Views: 5680

Re: Similarities between C/C++ and Java

Sc4Freak wrote:The syntax is similar, but honestly the syntax is the least of your worries.

A very good general principle. Everything from lisp to perl has reasonably usable syntaxes, it's the semantics that make a language.
by TNorthover
Mon Nov 15, 2010 10:45 pm UTC
Forum: Coding
Topic: Can not run C binary file?
Replies: 18
Views: 2601

Re: Can not run C binary file?

also, putting "." in your path is generally considered a bad idea, unless, you make sure to check the contents of any directory you're planning to cd into. I think this is one of those differences between DOS/windows and unixes, at least in convention. I vaguely remember being surprised b...
by TNorthover
Sun Nov 14, 2010 9:01 pm UTC
Forum: Coding
Topic: Can not run C binary file?
Replies: 18
Views: 2601

Re: Can not run C binary file?

Really? Yep (in /home/tim/tmp/tmperer): $ echo $PATH .:/usr/local/bin:/usr/bin:/bin:/opt/bin: $ which test /home/tim/tmp/tmperer/test $ /home/tim/tmp/tmperer/test Wibble $ test $ The version in /usr/bin is a fallback. Presumably some of the more ancient shells don't come with test builtin. God know...
by TNorthover
Sun Nov 14, 2010 6:05 pm UTC
Forum: Coding
Topic: Can not run C binary file?
Replies: 18
Views: 2601

Re: Can not run C binary file?

"which test" is useful in this sort of situation -- it would have told you immediately that you were running /usr/bin/test rather than the program you thought you were running. No it wouldn't. The problem is the test command built into (I assume) bash. "which" would go away merr...
by TNorthover
Mon Oct 18, 2010 7:10 pm UTC
Forum: Religious Wars
Topic: Pronouncing malloc
Replies: 11
Views: 7719

Re: Pronouncing malloc

Mr. Burke wrote:
TNorthover wrote:I'm not convinced you can say that calloc follows a similar pattern with all the ambiguities over 'c'.

How's that ambiguous?

kalloc or salloc. The "clear" thing suggests the former, but I quite happily pronounce char the same as the normal word so etymology isn't an absolute guide.
by TNorthover
Thu Oct 07, 2010 7:20 pm UTC
Forum: Religious Wars
Topic: Pronouncing malloc
Replies: 11
Views: 7719

Re: Pronouncing malloc

phlip wrote:calloc and realloc follow a similar pattern.

I'm not convinced you can say that calloc follows a similar pattern with all the ambiguities over 'c'. Actually, what does the 'c' even stand for? Contiguous?

(I agree with the basic point though).
by TNorthover
Sat Oct 02, 2010 5:12 pm UTC
Forum: Coding
Topic: Compile using Turbo C
Replies: 8
Views: 1490

Re: Compile using Turbo C

I'd assume the Eclipse CDT comes with a toolchain. It should probably be mentioned as an option (though I can't give much help, mainly use emacs).
by TNorthover
Sun Sep 26, 2010 12:20 pm UTC
Forum: Hardware
Topic: Installing the RAM Of Our Forefathers
Replies: 21
Views: 3768

Re: Installing the RAM Of Our Forefathers

Solt wrote:Shouldn't DDR RAM not even fit into DDR2 slots?

You'd be surprised at what you can make fit with enough brute-force and ignorance. I managed to put a stick in the wrong way round a while back; I'd have sworn it wasn't possible before the event...
by TNorthover
Sat Sep 25, 2010 1:55 pm UTC
Forum: Hardware
Topic: Installing the RAM Of Our Forefathers
Replies: 21
Views: 3768

Re: Installing the RAM Of Our Forefathers

It doesn't necessarily need to be treated as RAM. Magnetic core memory is non-volatile, so it could be treated as external storage. Add your own power supply, and then there's no problem. And in my view the best bit of the entire affair: any microchip you happen to use interfacing it with modern ha...
by TNorthover
Mon Aug 30, 2010 8:10 pm UTC
Forum: The Help Desk
Topic: Windows 7 users and cryptologists - I could use some help!
Replies: 10
Views: 2927

Re: Windows 7 users and cryptologists - I could use some hel

If you can see patterns in it, either its not related to cryptography or it was designed by an incompetent idiot. Cryptography is specifically for hiding information and even the weakest forms leave nothing but random noise as far as any human can see these days.
by TNorthover
Mon Aug 30, 2010 11:37 am UTC
Forum: Coding
Topic: C++ function argument stack
Replies: 6
Views: 1904

Re: C++ function argument stack

do you know under linux if it's possible to get the number of argument, without putting it explicitly when passing argument, That information isn't recorded on any of the platforms I know about, so probably not. But really, Linux isn't nearly specific enough to pin it down: each processor architect...
by TNorthover
Sun Aug 01, 2010 12:53 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

Yes, they work. PostScript itself is highly redundant being a programming language and all, and in this case the large files are just a concatenation of thousands of smaller files, each with the same layout which is also very repetitive. The actual data content of each file is very small. I wouldn'...
by TNorthover
Sun Aug 01, 2010 6:59 am UTC
Forum: Coding
Topic: [Unnecessarily-] Compact coding tricks
Replies: 112
Views: 17211

Re: [Unnecessarily-] Compact coding tricks

Personally I find it more readable as you know that you only need the variable for that block and you're only proceeding if it's a valid pointer, but it seemed to confuse some of the people in my class. To my mind, the presence of an actual declaration makes the difference. As you say it gives you ...
by TNorthover
Sat Jul 31, 2010 6:59 pm UTC
Forum: Coding
Topic: Why pass?
Replies: 28
Views: 3531

Re: Why pass?

Unless I've missed it no-one has mentioned methods of polymorphic objects. Sometimes you want a function to exist and be callable without error, but not actually do anything.
by TNorthover
Sat Jul 31, 2010 6:48 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

If it has a \0, it's not a string, but some sort of binary array. Most languages, unicode and I would disagree with you. You can put Unicode in an NTBS just fine... provided you use UTF-8. My main point with unicode was that it, if anything, canonically says what is in a string and it has a code po...
by TNorthover
Sat Jul 31, 2010 6:18 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

which languages use U+0000? None that I know of, but I can't think of any that routinely use any characters outside ASCII (λ is optional in some functional languages). On the other hand every language I know of that works with unicode strings, and most that don't, allow them to contain U+0000 (or 0).
by TNorthover
Sat Jul 31, 2010 5:21 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

You, sir, name? wrote:If it has a \0, it's not a string, but some sort of binary array.

Most languages, unicode and I would disagree with you.
by TNorthover
Sat Jul 31, 2010 5:04 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

OK, so I have to read a string now. How much buffer should I allocate? With length-prefixed strings you know. With NTBS's you have to read/rewind/read or grow the buffer incrementally, both of which are less performant and more complicated. And when you add in the issue of strings that you want to ...
by TNorthover
Fri Jul 30, 2010 4:08 pm UTC
Forum: Gaming
Topic: Star Wars: The Old Republic
Replies: 363
Views: 53863

Re: Star Wars: The Old Republic

ST's point is that, generally, that's what people want . It takes enough effort to be skilled at being a tank, or DPS, or healing- why would I want to have to be good at all three, particularly if I enjoy one much more than the others? It's nice to just be a healer, not be a healer for 20 seconds, ...
by TNorthover
Wed Jul 14, 2010 2:06 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

So if I've got a union of pointers, and one of them points to allocated memory, and I then want to free that memory, what's the best approach? I feel like there must be a better way than coding a case for each possible possible value of the union (which is what I've got right now). In C you can pro...
by TNorthover
Fri Jun 18, 2010 5:25 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999028

Re: Coding: Fleeting Thoughts

Haven't used it, I'm afraid, but a quick search turned up UnionFS which looks promising.
by TNorthover
Thu Jun 03, 2010 7:45 am UTC
Forum: The Help Desk
Topic: Bad fstab
Replies: 2
Views: 644

Re: Bad fstab

The fstab uses UUIDs and the filesystem information in fdisk is rather arbitrary anyway. I think we need the output of "blkid" to diagnose any problem. The error message that's produced during boot would almost certainly be useful too (I assume you can get past grub and start the kernel, o...
by TNorthover
Wed May 26, 2010 7:41 pm UTC
Forum: Coding
Topic: Manufactoria - Make Turing Machines with Conveyor Belts
Replies: 350
Views: 123725

Re: Manufactoria - Make Turing Machines with Conveyor Belts

EDIT: I feel like an even bigger idiot now. I got a simpler solution: ?lvl=24&code=c13:13f0;c18:13f0;c17:13f0;c16:13f0;c15:13f0;c14:13f0;c8:13f2;c9:13f2;c10:13f2;c11:13f2;c7:2f2;c8:2f2;c8:3f2;c8:4f1;c8:5f1;c8:6f1;c8:7f1;c9:2f2;c9:3f2;r9:4f2;c9:7f0;c10:2f2;c10:3f3;p10:4f7;c10:5f3;c10:6f3;i10:7f6...
by TNorthover
Wed May 26, 2010 5:15 pm UTC
Forum: Coding
Topic: Manufactoria - Make Turing Machines with Conveyor Belts
Replies: 350
Views: 123725

Re: Manufactoria - Make Turing Machines with Conveyor Belts

Now back to figuring out soldiers. I'm not good with binary arithmetic, can someone lend a hand? Not a complete solution, just what multiplication in binary is like. I have a shrewd feeling it has to do with a logical comparison... Even simpler in this case. Multiplying by 2 is the binary equivalen...

Go to advanced search