Sunday, May 21, 2017

Couple of things in the last few months

Since last posting to the blog, I have moved from problem 106 on to problem 109, in the following steps:

A notable point about the sort of problems now: after getting through the series of problems which were all about a similar concept and were thus annoying to solve in different languages due to not being able to take advantage of redundancies, the next few problems are all completely independent, but the difficulty of problems in the hundreds is definitely getting to the point where high-enough level constructs are desired that to use a very weak programming language that feels like writing in assembly or worse is very tedious. With that said, here were the steps:

After using C++TMP on problem 50, I was free to use postscript again. Turned out that despite me being relatively familiar with writing programs in the language, I didn't feel like it was expressive enough to tackle 107 directly, so I used it to solve problem 38. This in turn freed up Lua, which I used to solve problem 107. For the next problem, I found about about dc, the predecessor to bc, and with my postscript-thinking hat still on, it was pretty easy to use to solve problem 14. This then freed up Clojure, which after clearing up some cobwebs in my head about how it and other lisp-like languages worked wasn't too hard for problem 108.

Then for a while I didn't find any languages or problems that piqued my interest, but then I looked at the fledgling language list, which is a great source for neat things to use, though more than half the languages there either don't have compilers or have compilers so funky that I spent some time trying to set them up and failed. I found the C2 programming language, which is basically an attempt at packaging C with a lot of syntactic sugar and a module-based build system. Some of the ideas about the build system seemed neat, but don't really apply at the scale of a project euler problem. The sugars are mostly actually sweet though, so it was a fairly fun language to use to solve 109, and I made a conscious effort to try out a number of new language features without being ridiculous.

Updated table is still at https://github.com/drsam94/PELC

Saturday, February 25, 2017

Making more progress with some pseudo-languages

I decided to solve a few more problems. After I used Smalltalk on 104, I entered into the thick of a bunch of annoying problems that are all very closely related, which is supposed to be convenient because you can reuse code, but isn't convenient for me. I found some languages to solve these problems. I solved 105 in Swift (which was a pain to setup...) and I solved 106 in Typescript (which I am willing to call it's own language even if it's basically just annotated Javascript). Then I decided to try something off the wall, and I solved problem 50 using exclusively C++ Template Metaprogramming. My solution actually causes gcc to segfault when run on the necessary input size, but I decided that it was logically sound enough to let be. Now I have freed up postscript, which should be a reasonable enough language to try to do some stuff moving forward with.

Current table:

https://github.com/drsam94/PELC/blob/master/README.md

Sunday, February 12, 2017

Solved a problem, possibly moving off of blog

I obviously haven't written much on this blog in a very long time. But I decided to go back and actually solve another problem today. I used a simple Awk script to solve problem 13, and in turn used Smalltalk to solve problem 104. I would not say Smalltalk is anywhere close to my favorite language, but it wasn't the worse to use.

Because my code highlighting tool broke and I probably won't have thee enthusiasm to maintain this blog, going forward I will probably only make changes to the github page for this project, https://github.com/drsam94/PELC , where a less-broken and up-to-date table with easy links to all the problems will be posted.