Posts tagged meta
Hacks of 2015
28 December 2015 (programming haskell idris javascript games electronics avr fpga meta)Encsé writes in his blog that one of the reasons he created a tiny CPS-based Scheme interpreter was because he realized he hasn't done any fun side projects all year. So I thought I'd make an inventory of fun hacks I've done in 2015.
Bit-fiddling
- An FPGA implementation of the Commodore PET. This is still not fully finished: although I managed to hunt down the bug mentioned at the end of the blog post, I still haven't gotten around to implementing Datasette (tape) I/O.
- Viki & I put together a prototype for an AVR-based CHIP-8 handheld. This one has no web presence yet; we're hoping to finalize the design into a PCB-based one, before releasing the schematics and the code.
- Went to a hackerspace.sg workshop/hackathon for the Fernvale platform. Not much came out of that, I think I was the only person who at least got as far as running my own code on the device (reusing the low-level bitbanging from Fernly of course). I ended up doing some lame but colourful animations on the screen that would have gotten me boo'd off the stage in a 1986 demo compo.
Games
- I wanted to do some old-school 8-bit hacking, and ended up reverse-engineering and then reimplementing in Inform 6 the classic Hungarian text adventure game Időrégész. This even got me my fifteen minutes on Hungarian retro-gaming blog IDDQD.
- I managed to convince Viki to join me in participating in MiniLD #56. We decided early on to go with only 2 keyboard keys, 4 colours, one game mechanic, and a dancing theme — so, a rhythm game! To make deployment easy, we wanted it to be playable via just a web browser, and ended up choosing Elm as our development platform. The end result, after a frantic weekend of hacking, is Two-Finger Boogie.
Talks
- I gave an introductory talk on Kansas Lava first at Haskell.SG and then again at FP-BUD while visiting friends & family back in Hungary.
- Presented McBride's seminal paper on zippers (that was sadly never published AFAIK) at Papers We Love's Singapore chapter (slides and Haskell implementation available here).
- Back in October, the self-interpreting in Fω paper started making huge waves in PLT circles. I was only three pages in when I knew I had to present it at Papers We Love. The eventual talk took a couple weeks to prepare for, but it was worth it because it went really well.
Functional programming
- Fixed a long-standing bug in MetaFun, the "Haskell"-to-C++ template metaprogram compiler: patterns in function definitions are now tried for matching in the correct order.
- Wrote a Bison summary parser that a co-worker wanted to use to generate exhaustive test cases for Bison-generated parsers. That project ended up not going anywhere as far as I know.
- If you use every GHC extension and then some, you can write a fairly nifty untyped-to-typed embedding of STLC that is almost as nice as doing it in a proper dependently typed language!
Stack Overflow highlights
Some of the answers I wrote this year on Stack Overflow required me to learn just enough of something new to be able to answer the question:
- Learned just enough about Uniplate to figure out how to do out-of-band code generation.
- Learned just enough about Persistent to figure out how entity keys are represented on SQL database backends.
- Learned just enough about Spock to figure out how to store state between handler invocations (spoiler alert: it's horrible).
- Learned just enough about data-reify to figure out how to observe sharing in a graph
- Learned just enough about Pipes to figure out not just how to generalize runEffect, but also a way to get notified about the end of the input.
- Learned just enough about Accelerate to figure out marshalling of Arrays.
- Learned just enough about Template Haskell to figure out how to create and use custom annotations. OK, so maybe this isn't strictly true, as Template Haskell is something I've known already, but the annotations stuff was definitely new.
- Learned just enough about Euterpea, and the Karplus-Strong algorithm, to figure out how to synthesize a plucked string-like sound out of thin air and white noise.
- Learned just enough about GHCJS to figure out how unboxed Vectors can be efficiently marshalled to Javascript.
- Learned just enough about GHC's RULES facility to figure out how to wrangle it to submission when rewriting overloaded functions.
- Learned just enough about LLVM and GHC's run-time system to figure out how to present handwritten LLVM assembly to GHC as a prim-op.
Then, there were those where it turned out there was a bug to be found by scratching the surface of the question deep enough:
- I've found a bug in Idris's typechecker in the face of typeclass polymorphism
- Even though Tardis and rev-state should be mostly the same code (and they are even written by the same developer!), the latter's MonadFix instance had a one-character, fatal flaw.
Then there were the answers that were just too much fun to write:
- A small romp in integer arithmetic to implement rational addition in Agda
- Reimplementing Parsec in Idris because I was too lazy to look into Lightyear.
- What is the codensity-like representation of MonadPlus? This paper answers the question by wonderfully building up a generalization of DList and Codensity for something which is almost MonadPlus. I ended up writing a summary of the paper.
- Having worked on GHC two years ago to implement pattern synonyms, with the understanding of GHC's type checker internals still fresh in my mind, I was just the right person to explain the GHC code base's usage of the word zonking.
All in all, it seems this has been quite a productive year for me out of the office, even if you exclude the Stack Overflow part. I was actually surprised how long this list was while compiling it for this blog post. Maybe I should write a list like this every year from now...
Internet-celebritás lettem...
3 March 2010 (meta) (1 comment)... pedig nem is tudtam róla.
Ez a mostani sztori kb. egy hete kezdődött, amikor ránéztem a Google Analytics oldalon a honlapom napi látogatóinak számára, és az alábbi grafikont láttam (a mellbevágóbb hatás kedvéért itt most fél évre visszamenőleg látszanak az adatok):
Adja magát a kérdés, hogy mégis mi az isten történt január végén-február elején, amitől, hirtelen, a hatszorosára ugrott a látogatottságom, és utána is csak lassan csörgedezik vissza a megszokott szintre. Első blikkre csak annyi látszott, hogy a Google képkereső a fő forrása a forgalomnak, konkrétan pedig a domb szóra rákeresve talált rá ez a hirtelen jött sokaság erre a fotóra.
Ennél több akkor, egy hete nem is derült ki. Elkönyveltem magamban azzal, hogy hát a "domb" egy elég gyakori, egyszerű szó, és valóban ez a kép a második-harmadik a keresési eredmények között, úgyhogy ha sokan keresnek fotókat dombokról, miért is ne néznék meg az első néhány találatot.
Aztán tegnap kaptam egy emailt egy ismeretlen embertől:
Continue reading »Commenting on blog entries
22 November 2006 (meta) (2 comments)I've modified the Python/XSLT system that generated this site to allow for posting of comments on blog entries. It's not thoroughly tested, to say the least, so hickups are still possible. Anyway, feel free to use it, and report problems that arise.
Ruby on Rails a seggem
8 November 2006 (meta programming XML)Kitaláltam, hogy átcsinálom (de szép magyar szó ez is) a blogot "élőre", olyanra, hogy lehessen kommentezni, meg a blogbejegyzéseket is online meg tudjam tenni. Jelenleg ugyanis az egész tökéletesen statikus: a blog pár XML file-ban van rögzítve, és azokból otthon XSLT-vel generálok HTML oldalakat, majd azokat feltöltöm.
Már egy ideje a csapból is a Ruby on Rails folyik, úgyhogy tegnap adtam neki egy esélyt. Először a Rails platformot nézegettem, és első blikkre nagyon tetszett is, főleg ahogyan a relációs adatbázist objektumorientáltan mutatja, nagyrészt Magától Működik jelleggel. Fél nap alatt el is jutottam odáig, hogy egy adatbázisból szedett adatokat megjelenítettem és módosítottam HTTP-n keresztül. Ez mind szép és jó, de egy Embedded Ruby nevű saját szutyok HTML-be berakunk pár magic processing instructiont amibe inline Ruby kódot írunk rendszert használ. Én meg persze a meglévő XSL-eimet akarom használni, már csak azért is, mert rühellem az ilyen markupba inline kódot rakunk megoldásokat.
És itt kezdődött a probléma. Egy jó proof of concept tesztnek tűnt, hogy a jelenleg statikus oldalakat próbáljuk meg Ruby on Rails-szel, XSLT-t használva dinamikusan generálni. Namost Rubyhoz van hatszázezer kibaszott XML meg XSLT modul, és mindegyik gondosan figyel arra, hogy inkompatibilis legyen egymással, és még véletlenül se legyen közöttük olyan, ami egyszerre tudna minden olyan feature-t, ami nekem kell. Az a vicc amúgy, hogy legtöbbjük a világbajnok libxml-re épül, amit a jelenlegi offline, python-os megoldásomban én is használok, de egyiknek sem sikerül kivezetniük Rubyba az igazán erős feature-eit, mint pl. a saját XPath függvények meg XSLT elementek implementálása. Amik meg nem libxml-alapúak, azok általában már az alap XSLT 1.0 szabványt sem implementálják teljesen.
Úgyhogy most nagyon hajlok arra, hogy azt csináljam, amit ZapE kollega felvetett, hogy a bejegyzéseknek marad a jelenlegi statikus kontent, és minden bejegyzés oldalába generálok PHP (!) kódot, ami a kommenteket kezeli. Nagyon szép lesz....
RSS feeds to ease transition from Advogato
2 October 2006 (meta advogato)Advogato was the original blogger site for Free Software developers. It's such a high-class place that I remember the time when we, the users of Advogato, even protested against the label blog, because it felt like much more serious business.
Over all these years, I maintained my diary at Advogato, sometimes with year-long hiatuses, reading the entries of fellow Free Software developers, mostly keeping an eye on my friends from the GNOME project. Unfortunately, as I took a job as a programmer, I began losing the free time to hack on GNOME and related projects, and people were already moving off from Advogato to their own blog sites -- thus, I stopped reading Advogato, and even started to keep my own log here on my own site.
And this is why it was only last week that I saw the article announcing the demise of Advogato. Even though I've been neither an avid reader nor a prolific writer for a long time, I felt sadness. I decided to do something about it -- following a link in the article, I found Planet Advogato, a blog aggregator for former Advogato users. Which is why I wrote an RSS transformation for my home-brewn static blog engine.
So if you're using a browser with RSS support, you should see a link to the RSS feed in the address bar. Just click on the orange icon to subscribe to my blog.
Last minute update: After I've written the above, I checked Advogato again to see if there's any news regarding the site's future. It seems Advogato is staying up, with the help of Steven Rainwater. Yay for happy endings!