## Search found 46 matches

- Sun Oct 12, 2008 5:12 am UTC
- Forum: Computer Science
- Topic: Reconciling side effects with lazy (non-strict) evaluation?
- Replies:
**12** - Views:
**4341**

### Re: Reconciling side effects with lazy (non-strict) evaluation?

A few days ago, I set out to write a prolog interpreter in Haskell (we're learning Prolog in my compsci class). Everything went swimmingly well until I realized I had to (statefully!) generate unique atoms at times. The solution was ugly: I passed around a "variable counter" in each frame...

- Sat Oct 11, 2008 12:32 am UTC
- Forum: Coding
- Topic: Generating an unknown number of units
- Replies:
**9** - Views:
**1789**

### Re: Generating an unknown number of units

If you're going to try to write something in XNA without knowing what subclassing is you're going to have issues. I suggest that you get out a couple of good books on C# and study up first

- Fri Oct 10, 2008 9:33 am UTC
- Forum: Coding
- Topic: Enumerate in LaTeX
- Replies:
**1** - Views:
**2156**

### Re: Enumerate in LaTeX

See this TeX FAQ: http://www.tex.ac.uk/cgi-bin/texfaq2htm ... erruptlist

You could try using the first method?

You could try using the first method?

- Fri Oct 10, 2008 7:54 am UTC
- Forum: Coding
- Topic: How to approach difficult problems?
- Replies:
**25** - Views:
**3174**

### Re: How to approach difficult problems?

How to approach difficult problems? WITH HASKELL!

- Mon Sep 01, 2008 5:01 am UTC
- Forum: Coding
- Topic: Good programming music
- Replies:
**93** - Views:
**15674**

- Tue Aug 12, 2008 1:16 am UTC
- Forum: Computer Science
- Topic: Math related research in computer science
- Replies:
**7** - Views:
**2863**

### Re: Math related research in computer science

Category theory

- Sun Jun 29, 2008 1:18 am UTC
- Forum: Coding
- Topic: Absurd regular expressions
- Replies:
**37** - Views:
**6460**

### Re: Absurd regular expressions

Berengal wrote:Yeah, emails are balancing neatly on the edge of what is regular languages and what isn't.

No, they’re most definitely not regular; the nested-comments abilities see to that

- Sun Jun 29, 2008 1:15 am UTC
- Forum: Mathematics
- Topic: Your Axiom of Choice is SILLY
- Replies:
**60** - Views:
**8724**

### Re: Your Axiom of Choice is SILLY

What’s with all this ‘The AoC is intuitive’ crap I find it to be completely the opposite. :/

- Tue Jun 03, 2008 9:32 am UTC
- Forum: Computer Science
- Topic: XOR crypting
- Replies:
**22** - Views:
**12755**

### Re: XOR crypting

Locke1689 wrote:there are other methods that are more secure that use smaller key sizes

No, a one-time pad is perfect security, assuming the key is completely random, the key is as long as the data, and the key is never compromised

- Tue Jun 03, 2008 9:28 am UTC
- Forum: Coding
- Topic: Reading Filenames and etc.
- Replies:
**13** - Views:
**2123**

### Re: Reading Filenames and etc.

Code: Select all

`find -iname "*.mp3" | sed -nre 's/^.*\/\[([^]]+)\]-([^.]+)\.[mM][pP]3$/insert into my_table values ("\1","\2")/p' > script.sql`

- Mon May 26, 2008 2:41 am UTC
- Forum: Computer Science
- Topic: Intelligent random word generation
- Replies:
**7** - Views:
**6435**

### Re: Intelligent random word generation

Markov chains are popular for doing this kind of generation... see, for example, this part of the Markov chain article on Wikipedia . I did recently read a nice article on this topic; http://blog.plover.com/lang/finnpar-2.html . But of course, what you’re talking about is enforcing some kind of exte...

- Mon Apr 21, 2008 3:10 pm UTC
- Forum: Coding
- Topic: Computers in raptorland.
- Replies:
**11** - Views:
**2027**

### Re: Computers in raptorland.

What laranzu says, check out the window font; it’s Chicago.

Also a small "MPW" conveniently revealed in the top-left of the screen

Also a small "MPW" conveniently revealed in the top-left of the screen

- Mon Apr 21, 2008 5:04 am UTC
- Forum: Mathematics
- Topic: Do the surreal numbers provide a well-ordering for R?
- Replies:
**16** - Views:
**2586**

### Re: Do the surreal numbers provide a well-ordering for R?

you can't construct a well-ordering of the reals without invoking the Axiom of Choice in one of its guises. When I was thinking about it, it was from the other point of view; what is the well-ordering? Yes, given two sign-expansions, you can create a lexicographic order, and that is a total order. ...

- Sun Apr 20, 2008 9:15 am UTC
- Forum: Mathematics
- Topic: Do the surreal numbers provide a well-ordering for R?
- Replies:
**16** - Views:
**2586**

### Re: Do the surreal numbers provide a well-ordering for R?

Ah yes, so it’s only lexicographic when the items have the same number of +/-. You need to take length into consideration as well, so that x<y if the number of of +/-s in x is < that in y, or {insert lexicographic ordering rules}. Equivalently you could left-pad the shortest one with a third charact...

- Sun Apr 20, 2008 1:15 am UTC
- Forum: Mathematics
- Topic: Do the surreal numbers provide a well-ordering for R?
- Replies:
**16** - Views:
**2586**

### Re: Do the surreal numbers provide a well-ordering for R?

Yes, by trivial I meant lexicographic. I originally wrote that but reverted to the word ‘trivial’ for some reason. It made the sentence flow better

Anyway, thanks Token/Antononfire, that cleared it up for me

Anyway, thanks Token/Antononfire, that cleared it up for me

- Sat Apr 19, 2008 1:16 pm UTC
- Forum: Mathematics
- Topic: Do the surreal numbers provide a well-ordering for R?
- Replies:
**16** - Views:
**2586**

### Do the surreal numbers provide a well-ordering for R?

I was just doing some random reading on the Axiom of Choice and its implications, and the various comments on how the well-ordering principle doesn’t seem to have been effected on R... and I thought of this; Since surreal numbers contain R, and can be written in sign-expanded form (e.g. +++--), and ...

- Thu Apr 17, 2008 7:17 am UTC
- Forum: Coding
- Topic: Physical units as a type?
- Replies:
**15** - Views:
**1709**

### Re: Physical units as a type?

Haskell has the Dimensional library. It’s completely statically checked

- Wed Apr 16, 2008 11:54 am UTC
- Forum: Coding
- Topic: Arbitrary length parametrization
- Replies:
**24** - Views:
**2716**

### Re: Arbitrary length parametrization

If you just want Futures you could take a look at the .NET parallel extensions library

- Wed Apr 16, 2008 11:47 am UTC
- Forum: Coding
- Topic: Is there a language that does a < (b & c & d)?
- Replies:
**40** - Views:
**5314**

### Re: Is there a language that does a < (b & c & d)?

you can do this in factor: { 4 8 10 } [ 3 > ] all? and this in javascript: [4,8,10].every(function(n){return 3<n}) and this in c#: (new List<int>(new int[3]{4,8,10})).TrueForAll(new Predicate<int>(delegate(int i){return 3<i;})) and something similar in a lot of other languages... Make that C# examp...

- Wed Apr 16, 2008 6:09 am UTC
- Forum: Coding
- Topic: Is there a language that does a < (b & c & d)?
- Replies:
**40** - Views:
**5314**

### Re: Is there a language that does a < (b & c & d)?

Perl has Superposition which allows:

There are several superposition-style modules for Haskell, or you could just do:

Code: Select all

`3 < 4 & 8 & 10`

There are several superposition-style modules for Haskell, or you could just do:

Code: Select all

`all (3<) [4,8,10]`

- Wed Apr 16, 2008 6:02 am UTC
- Forum: Individual XKCD Comic Threads
- Topic: 0411: "Techno"
- Replies:
**150** - Views:
**37143**

### Re: "Techno" Discussion

I assume he was referring to this http://gizmodo.com/gadgets/announcements/hard-drive-dying-dance-track-winner-151666.php contest with the crashed hard drive. Listen to the runners up, too; they are actually pretty good. Techno tech-tech-tech-echno-echno-techno ftw. Where can I find a mirror? Odeo ...

- Mon Apr 07, 2008 8:40 am UTC
- Forum: Coding
- Topic: "Mission: learn socket programming" going.... not so good
- Replies:
**8** - Views:
**1840**

### Re: "Mission: learn socket programming" going.... not so good

TBH you’d be better off starting in C#

- Sun Apr 06, 2008 9:35 pm UTC
- Forum: Computer Science
- Topic: Compiler Book?
- Replies:
**16** - Views:
**3757**

### Re: Compiler Book?

I own "Modern Compiler Design" published by Wiley, written by {Dick Grune, Henri Bal, Ceriel Jacobs, Koen Langendoen}.

It covers a whole bunch of stuff, including compiling Prolog & Haskell, along with modern techniques like attribute grammars.

It covers a whole bunch of stuff, including compiling Prolog & Haskell, along with modern techniques like attribute grammars.

- Mon Oct 15, 2007 7:20 pm UTC
- Forum: Coding
- Topic: How should I exit this loop? Java style question.
- Replies:
**14** - Views:
**4173**

### Re: How should I exit this loop? Java style question.

This:

is yucky. Can’t you cast integers to enums in java? I haven’t used it for a while...

As to your original question:

Why not have your method return a valid BrickType, or NULL if one doesn’t match?

Code: Select all

`return Bricktype.valueOf("TYPE_" + keyboard.nextInt());`

is yucky. Can’t you cast integers to enums in java? I haven’t used it for a while...

As to your original question:

Why not have your method return a valid BrickType, or NULL if one doesn’t match?

- Thu Oct 11, 2007 12:25 am UTC
- Forum: Mathematics
- Topic: Favorite Mathematical Equation
- Replies:
**87** - Views:
**20499**

### Re: Favorite Mathematical Equation

e^{i\pi}+1=0

This question is obvious to anyone with even the smallest sense of beauty

It has:

- exponentiation

- multiplication

- addition

- equality

- e

- pi

- zero

- one

... which is more than enough to do any true mathematics

This question is obvious to anyone with even the smallest sense of beauty

It has:

- exponentiation

- multiplication

- addition

- equality

- e

- pi

- zero

- one

... which is more than enough to do any true mathematics

### Re:

Drostie wrote:the type of (A ? i : "stuff") is simply Object, since that's the lowest class which has both of those as subclasses

If you want to get technical, it's the join, or least upper bound. Since Java doesn't have a particularly rich type system this is always Object :p

- Fri Aug 24, 2007 11:02 pm UTC
- Forum: Computer Science
- Topic: Computer Science in High School
- Replies:
**78** - Views:
**12444**

Magitek wrote:Is Turing even a language besides what's formalized as a Turing Machine? What would you learn in that class besides Turing machines for proving algorithms?

Yes

...and I'm guessing they wouldn't even have approached the second question.

- Fri Aug 24, 2007 11:00 pm UTC
- Forum: Mathematics
- Topic: I wonder know how interesting these formulas are
- Replies:
**7** - Views:
**2101**

### Re: I wonder know how interesting these formulas are

[quote="~J-@Ã

- Tue Aug 21, 2007 10:00 pm UTC
- Forum: Science
- Topic: Physics of Muscles
- Replies:
**32** - Views:
**4460**

Well, the above work would show (to some approximation, good or bad) how much power is actually put into the movement. But I can't imagine that the muscles are 100% efficient (and of course the 2nd law of Thermodynamics would agree), so my question is how efficient is a real muscle? Google gives Wi...

- Tue Aug 21, 2007 8:18 am UTC
- Forum: Mathematics
- Topic: What level of mathematics do people know on this forum?
- Replies:
**63** - Views:
**9509**

- Tue Aug 21, 2007 5:55 am UTC
- Forum: Mathematics
- Topic: What level of mathematics do people know on this forum?
- Replies:
**63** - Views:
**9509**

- Sun Aug 12, 2007 12:19 am UTC
- Forum: Mathematics
- Topic: Natural complements - C and S
- Replies:
**29** - Views:
**4127**

- Sat Aug 11, 2007 10:29 pm UTC
- Forum: Computer Science
- Topic: Building logic gates
- Replies:
**30** - Views:
**11688**

- Sat Aug 11, 2007 10:25 pm UTC
- Forum: Mathematics
- Topic: Other kinds of math
- Replies:
**17** - Views:
**3535**

- Sat Aug 11, 2007 10:04 am UTC
- Forum: Computer Science
- Topic: Building logic gates
- Replies:
**30** - Views:
**11688**

- Fri Aug 10, 2007 2:02 am UTC
- Forum: Coding
- Topic: Couple Java programs.
- Replies:
**23** - Views:
**3464**

Caesar> main My secret is more secret than yours. hv uJFrJI bu zCrJ uJFrJI ItpL vCXru. Key: fromList [('A','Z'),('B','Y'),('C','o'),('D','d'),('E','q'),...] Can you break that? Or cut some out? It's not like we don't get the idea, and you broke the width of the thread, requiring horizontal scrollin...

- Thu Aug 09, 2007 7:20 am UTC
- Forum: Coding
- Topic: Ideas on improving security for my program?
- Replies:
**22** - Views:
**3545**

- Thu Aug 09, 2007 2:20 am UTC
- Forum: Coding
- Topic: Couple Java programs.
- Replies:
**23** - Views:
**3464**

- Thu Aug 09, 2007 1:47 am UTC
- Forum: Coding
- Topic: Random Linux stuffs, comparisons to Windows, and other ...
- Replies:
**26** - Views:
**4603**

- Wed Aug 08, 2007 8:36 pm UTC
- Forum: Coding
- Topic: Couple Java programs.
- Replies:
**23** - Views:
**3464**