Jump to content

  • Log In with Google      Sign In   
  • Create Account

Blind Radish

Member Since 20 May 2007
Offline Last Active Jan 26 2013 10:34 AM

Topics I've Started

Haskell kicking my Asskell

24 January 2013 - 03:20 PM

So I'm trying to learn Haskell with an extremely simple lfsr program.  I've have working code and I've got a decent understanding thanks to the first half of Learn You a Haskell for Great Good, but I'd like to apply some of what I've learned before I go too much further.  I keep tweaking this code and getting all kinds of cryptic errors, but I think I've got it close.  If anyone can help me understand what's gone wrong, that would be awesome.

This throws an error complaining about "infinite type" occurring in post.  I think it thinks I'm trying to be recursive or something.  Any thoughts?

{- Random Number Generator -}

import Data.Bits
lfsr mask seed
	| (seed .&. 1) == 1 = post
	| otherwise         = post xor mask
	where post = (seed shift (-1))



Ready to get started.

11 January 2013 - 12:19 AM

Hello everyone!  Thanks for all your support.  You guys are always so helpful!

Okay so I'm intending on starting a serious hobby-eventual-career of programming games targeting iPhone and Android, the upcoming Ouya, and Browsers.

From what I understand they all can use OpenGLES, right?


I want to make 3D games, in LUA, targeting those platforms.


I'm looking seriously at Shiva.


Originally, I was hoping to use LuaJit and compile to ARM.  Somehow linking OpenGLES in.

My worry is that it's going to be unreasonable to get that working for iOS and browsers.


I won't need all the bells and whistles you expect in an engine.


I don't need textures, physics, heightmaps, level editors, model imports, audio files.

I do need shaders, meshes, particles, and the ability to control the speakers manually on a very primitive level.

i would prefer having access to multiple platforms, reliable access.

I may or may not need animation lol.  I'm not sure yet.


But I don't want to muddy around at too low a level.  I just want to build the systems that the game runs on, not the systems that the systems run on!


Thanks guys!

How does Multithreading Assembly work?

29 December 2012 - 04:15 PM

I've been mulling this for a long time, but I can't picture the computer executing assembly instructions in parallel.

Does each core execute it's own stream of instructions?  Or what?  

I'm not talking about implementation details, I'm curious about how multicore processing is implemented in the circuitry and such.

Go easy on the jargon though, I'm no where near up to date on this stuff.  I'd get the theory if you stuck with metaphors or the more common wording though.

teach me Primitive Polynomials of Field Theory? Links provided!

21 December 2012 - 09:45 AM

Thank you for trying to help me!


Okay, so I need to understand primitive polynomials, but I haven't got much in the way of math.
Good brain and willing to learn but no school, really.


Please help me understand {this page explaining primitive polynomials}!

Also {this other page of the same}, which seems more basic but is still difficult.

{The easiest one of all}, but again, I don't get it! :'[


The only kind I need to understand is the {kind which is used in LFSRs}, which is called GF(2), right?


I need to be able to generate every primitive polynomial in GF(2) of a given degree.

{This paper discusses what must be the fastest way to test if a polynomial is primitive} - I don't understand what he's saying though.  Probably because I don't understand the definition of a primitive polynomial.



That's all I need to do.  But I also need to understand /why/ it works, or /how/ it works, or anything!

I don't want code, I just want to understand the properties required to make a polynomial "primitive".

The point is that I need to understand it enough to write the code for it.

Sorry if that's confusing.  Simply put, all I need to do is find every primitive polynomial of degree n for GF(2) using one of the algorithms provided, and in order to do that I need to understand what makes a polynomial primitive.

Approximating Sine?

14 August 2012 - 05:23 PM

Hello everyone. My name is Aaron V and I've been working towards learning how to do my own graphics programming, audio programming, and math library - you know, just for the knowledge.

All three turned out to involve this evil number called "pi" that has no end and meets the criteria for a PRNG. ;)

Anyway, I was studying up on Sine and it turns out it can be calculated to 1 degree but not further, however it can be approximated using a taylor series or a maclaurin series.

I want to calculate Sine accurately everywhere between 0 and 1/8 radians. I DON'T need Sine from -1/8 radians to 1/8 radians which is a more common request.
Is it possible to get 100% accuracy within this range? Obviously the computer can only do approximations, but just how accurate is the algorithm by default.

A specific question is how accurate is the taylor series for sine? Isn't there always an error margin for every range and every order?
What other ways can I approximate sine? Remember, I don't need negative space at all!

I have never studied calculus except in my spare time through cryptic wikipedia articles and way-to-specific youtube videos.

Even a link to something beginner friendly would be nice, but I don't want to spend a great deal of time studying this.

Thanks everybody!