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

Posts I've Made

In Topic: Haskell kicking my Asskell

26 January 2013 - 10:26 AM

Speaking of type inference, how come this is "ambiguosly typed"?

-- test
test = do (lfsr 1 1)

-- pump through specified lfsr
lfsr mask seed
	| ((seed .&. 1) == 1) = (xor post mask)
	| (otherwise) = (post)
	where post = (shiftR seed 1)

Scraping test and punching in 

> lfsr 1 1

Seems to work.

 

Also, I can't get the hang of working with the State monad, which I'm under the impression is the best one to use in this case.
I guess I'm trying to make a Functor or something.  I'm still a rookie programmer, so I don't really know.

I need state for a PRNG, obviously.  I just need one tuple for now, containing a mask Bits and some state Bits.
I was gonna newtype that, but it's throwing all kinds of crazy errors again, so I was just gonna wing it with Bits.
What I would really like to do is define a Mask type of Bits and a Step type of Bits, then combine them into a Lfsr tuple type.
The reason I want to do this is to catch myself putting Mask into Step or something awful.  That /would/ catch me, right?.

I can't find any good tutorials, mostly bad documentation with advanced commentary on the future of haskell.

The tutorials I can find are really specific to a hardly relevant topic and in depth in directions I can't understand.

This is obviously not a good language for beginners lol. (I do have some programming experience)
Can anyone help me some more?

Ultimately, my goal is to create a table of lfsrs, and either use locking mechanisms, or link them to each core, to ensure fast, random results.
That's why I have mask as a mutable variable - I worked really hard on conceiving an algorithm to quickly generate masks for me, which I think is pretty bad ass.


In Topic: Haskell kicking my Asskell

25 January 2013 - 05:15 PM

Try Scheme or some other Lisp then.

lmao! that's great.

i like haskell, at least I think I do lol.


In Topic: Haskell kicking my Asskell

24 January 2013 - 06:40 PM

Ah yes, thank you.  How foolish of me.  See, this is why I don't like inconsistency.
Thanks again, Steven.


In Topic: Ready to get started.

12 January 2013 - 03:11 AM

Right I looked into that.

 

Thanks for the advice guys.

:D


In Topic: Ready to get started.

11 January 2013 - 05:33 PM

Well, what I'd really like to do, is have access to all the OpenGLES stuff that I need, but in Lua.

I'm digging around for that as we speak.  Not sure


I could target Android, but I don't own one, so i would need an Android emulator or something.

I would target iPhone as I own an iPhone, but I own a PC instead of a Mac.

Besides, Ouya will "run anything that runs on an Android" I guess.  No clue how that works lol.

 

 

So assuming I want to Program 3D games for Android/Ouya in Lua without aforementioned bells and whistles, what tool should I pick?

I'm really unfamiliar with Mobile development but I think it's my best shot at success at this point.


PARTNERS