Thursday, July 13, 2017

7/13

Today's a bit of a weird day for two reasons: we had a a field trip yesterday, and we're only working around half the day at the ACC, the rest of the day we are going to be working from home. Mr. Elkner gave me some good suggestions on my last blog post, mainly to actually create a real election that both the other interns here and the IRC regulars can vote in. Right now, I'm able to log everyone's full name but I don't have some email addresses yet, which is also required for the list of voters, so I'll have to pause this for a bit.

Right now I'll talk a bit more about Pyret. Yesterday, another intern here who is learning about cybersecurity was attempting to design an encrypter/unencrypter in Pyret, which sounded interesting, so I gave it a shot as well. As I was doing more in Pyret, I learned of some unusual quirks about the language. The biggest thing that I noticed was that unlike, I believe, all other languages, it does not automatically return anything unless explicitly told to, and an error results if nothing is returned. This means a lot of aspects of Pyret are unique- for one, it's illegal to have an if statement if an else or else if statement does not follow. In addition, it's only allowed to return one value, not two or more. However, the way to get around this is is to use the block: tag, which only returns the last expression of a block (from what I can tell.) However, one of the better things about Pyret is the ease at which you can fix your mistakes, as the error messages were designed with exactly that in mind.

Mr. Elkner also sent all of the interns here a CC of an email he sent to someone from Brown, the school that created Pyret. He makes the point that although Pyret is great for newcomers, the tutorial is not, and I completely agree. It would be an interesting project to create something that makes it easier for newcomers to learn about Pyret, as it is such a good tool but pretty hard to learn if you know absolutely nothing about programming.

I didn't do much on the Helios project today. However, earlier in the week, Mr. Elkner showed me a script that one of his other students designed that converts IRC logs into HTML pages. Since some IRC users earlier were discussing compiling a resource of names and emails to use for Helios, I decided to check it out to progress my CSV document. However, the script appears to be broken as none of the links to the logs work for me.

1 comment:

  1. Excellent initiative, Eric! You will do well in the IT field (or any other field you choose for that matter), continuing with the kind of initiative you demonstrated here. When you blocked on one task / project, you creatively switched focused to another. Employers and colleagues alike will love you for that! ;-)

    We have a reply on Pyret from Tom regarding some intro programming curriculum that he suspects will be ported to the new project. Let's wait until after he gets back from Colorado to follow up on that.

    Regarding languages requiring a return statement, that is not uncommon at all. All statically typed languages require functions to return a value, and even check the type of that value. Pyret is the first language that I have seen that requires an if statement to have two branches. That forces an explicit "else do nothing" branch in a lot of situations. I'll have to look into that more to find out why Pyret does that.

    ReplyDelete