Posts

Showing posts from March, 2013

NeuralNetwork.hs

Here is the Haskell code that I wrote to make a neural network. Next I will train it to play Tic tac toe. Here starts Neuron.hs module NeuralNetwork.Neuron where import Data.Binary import qualified Data.Sequence as Seq data Node = Neuron { bias :: Double, priors :: [Int], weights :: [Double], hidden :: Bool } |             Input { value :: Double } deriving (Show, Eq) instance Binary Node where     put (Neuron{bias = bias, priors = priors, weights = weights, hidden = hidden}) =         do put (0 :: Word8); put bias; put priors; put weights; put hidden     put (Input{value = value}) = do put (1 :: Word8); put value     get = do t <- get :: Get Word8              case t of                   0 -> do b <- get; p <- get; w <- get; h <- get;                 ...

Tapely, and much more.

Andrea invented a new game today. It is named 'Tapely'. This is how she explained the rules: "One person holds a rubber hose. The other person holds a broken Easter egg." After getting a broken Easter egg (Rea was already holding a rubber hose) Alison asked what happened after that. Rea's response was: "I bop with the hose and you throw the egg" We played it once and Andrea said "Lets play Burpley" Which has the same rules except that it was played with a rubber hose and a burp cloth. Sara learned the word 'up' this week. She is very proud of it, and she says 'up', points to the ceiling, and then looks up. If we do not acknowledge her genius, she screeches. We had an Easter egg hunt at the brown's house Sara got one egg, and immediately started gnawing on the plastic shell. Rea got a lot of eggs, but we didn't let her eat all of the candy in one setting. We are going to ration it out to her. Alison and I have...

That blessed arrangement, that dream within a dream.

This week Andrea asked me for an orange. I asked her "What are you going to give me for an orange?" Her response: "I will give you Sara". And thus Sara was sold into slavery for a orange. Alison and the girls (minus the goats and chickens) have been going on bike rides nearly every day in this spring weather. It snowed a bit this weekend, but it still feels like spring. Alison is getting really strong, pulling two girls in a bike trailer up the hill to the library (with a lunch basket too.) Andrea has been asking me to read her Rosemary Wells books a whole bunch today. We went to the IFA to look at chicks and ducklings on Saturday. Rea wanted yellow ducklings and red chicks. We won't get any more until after our trip to Japan. We have been preparing to go to Japan by purchasing accommodations and train tickets and such things. We don't quite have day to day plans yet, but we figure that such things will come eventually. We are learning some Japan...

Dropbox and Haskell

Just a brief update: I have been looking around at cloud storage options and decided to give Dropbox a try. The biggest benefit of cloud storage is that you don't have to carry around a flash drive or anything like that. Anywhere that you can access the internet you can access your information. For those of you who don't already have an account, sign up  here  to get 250MB of additional storage (They normally give new people 2 gigs of storage for free, but by referring people, or being referred yourself you can get additional storage.) I think that I am beginning to understand Haskell. If you are interested in seeing the code for an artificial neural network that I made yesterday, here is a link to the files.

To wrestle with a goat

Andrea has been enjoying the spring immensely. She loves to spend most of her time outside (she would probably spend almost all of it out there if her mother would let her). She loves to break into the goat food and feed the goats and chickens. She was digging holes under the fence (not to get through (she knows how to open the door) but to use the dirt as play goat food when we don't let her get any more real goat food) this leaves the chickens enough space to squeeze under the fence and enter into our garden area. The chickens have been laying a ton of eggs. The black and white one lays one every day and the other two lay eggs on alternating days it seems. Lala has been still producing milk in decent quantities (it is too bad that we have to dry her off when we go to Japan, but I doubt that we will be able to find someone who is willing to milk her that entire time). Clarabel is still growing it seems. We are looking at getting a stud for her so that she can start produci...

What's falser than being false?

Dead Wrong! When using mongodb in C#, using the IQueryable While function can produce some pretty unusual results. We had the following code: app.AsQueryable().Where(x => request.Name == null || x.Name == request.Name); We were test driving this, so the first test that we had written passed in a request with a null name and expected everything from the db to come back. We got nothing back. We replaced request.Name == null with True , but that didn't change anything. This means that: True || something Was being evaluated as equaling  False . For those who don't remember Boolean logic, True || anything is always True . In the end we found out that the MongoDB IQueryable was not able to handle ORs correctly (That is, at all). Anyway, I thought that I would post about it to prevent others from banging their heads against the problem for too long.

Ra

Image
Sam has done it again. Ra  (which is still in ongoing development) is an interesting take on a post industrial magical world, where magic is studied like physics is today, and there is a mysterious group known as 'wheel' which is trying to 'protect' the world from magical artifacts of unknown abilities. I know that I will follow along with it avidly as it progresses toward completion. This last week I began to study Haskell - a functional language which is pretty different than anything that I have looked at before. I haven't yet written an entire program, but I am enjoying learning the language. On Friday Alison told me that she posted Rusty to be sold on Ksl classifieds. I  was never really was a dog person, but I was still quite surprised by this. When I got home I told her that she didn't have to sell him if she didn't want to, but she said that she was selling him because she didn't feel that she gave him enough attention (with us having two kid...

Mandelbrot Set Viewer light

I talked with the guys at GitHub, and they were able to tell my why the GitHub page that I tried to post wasn't working. (It was a problem on their end apparently) So, without further ado:  Javascript Mandelbrot Set viewer I am using the HTML 5 Canvas element to draw on, and web-workers to do the actual work. You can download/view the code from here . The page doesn't store state between loads, and I have not made it very fancy, but you can set certain parameters (x, y, z are pretty obvious, m is the max iterations, s is the number of threads, and when g is set to 0 it actually draws the image (otherwise it just politely sits there)) Left clicks redraw the whole image and middle clicks zoom in on the current image center. There are probably huge memory leaks (when I test it I crash chrome about half the time), and it probably is not written very well, but it runs fast, and it was thrown together over the course of a few days. I might clean it up and make it ...

Death Bot

This last week was pretty good. I feel like I understand most of what we are doing at work right now, and I did some pretty fun coding last week. I ordered a deck of Polynesia cards from TheGameCrafter. Hopefully they should arrive soon. Either way, I look forward to seeing how they compare with the other places that I have tried printing through. We opened up the butterkase on Friday. It was a bit of a disappointment The real cheese butterkase is excellent in every way. Our home made butterkase had a good texture, was an excellent melter, and had the same basic flavor as store bought butterkase, but it had a much less complex flavor, and a stronger overall flavor as well. Basically, it seems like we let it age too long, however, it doesn't have as rich a flavor. I grated some of it and rolled it into a bread which was very popular at our family dinner, and I expect that we will still eat it all, it just wasn't everything that I ever hoped for. We made another derby...

Who's the Maia here, anyway?

"If you need me, I will come," Galadriel promises Gandalf in Peter Jackson's film of The Hobbit .  She acts as if she's conferring some great aid that will surely relieve all his anxieties.  When you think about the relative positions of the Elves and the Wizards in Tolkien's universe, this is sort of like a preschooler trying to relieve her dad's mind by promising to help with the yard work.  Sure, she might be able to do some good, but really, this is going to be his job, and he has way more power to do it. Galadriel is one of the most powerful of Tolkien's elves.  She is the inheritor of noble blood from three of the four (plus) races or divisions of elves: her paternal grandmother is the sister of Ingwe, king of the Vanyar, the High-Elves who sit at the feet of the gods, her paternal grandfather is Finwe, king of the Noldor, the hot-blooded elves who are always making and doing and have the most effect on the history of the world, and her maternal g...