Profile cover photo
Profile photo
Andy Gill
727 followers
727 followers
About
Communities and Collections
View all
Posts

Post has attachment
Add a comment...

Writing some liquid for the SIGPLAN pages, which uses github pages and jekyll. Needed to write typeof. What a hack to get what should be built in.

{% comment %}assigns variable type with the type of value{% endcomment %}
{% assign t = include.value | append: '' %}
{% if include.value == t %}
  {% assign type = "string" %}
{% else %}
  {% assign t = include.value | plus: 0 %}
  {% if include.value == t %}
    {% assign type = "number" %}
  {% else %}
    {% assign t = include.value | join: 'X' %}
    {% assign t1 = include.value[-1] %}
    {% if t == "" or t1 <> nil %}
      {% assign type = "list" %}
    {% else %}
      {% assign type = "object" %}
    {% endif %}
  {% endif %}
{% endif %}
Add a comment...

Post has attachment

Post has shared content

Fellow educators, what do you use as your first language for teaching programming? What about teaching electrical engineers as well as computer scientists? 

We (KU, EECS) are thinking about adopting Python; we currently use Java. But I'd be interested in what others do for a first programming class.
Add a comment...

Post has attachment
A New Perspective (Multi-Person 3D system) - Comp…: http://youtu.be/qnnEIrWQJdo
Add a comment...

// Here is my hack of the day
// It marks up local vs external links,
// and check the local links for availability

function UrlExists(url) {
  var http = new XMLHttpRequest();
  http.open('HEAD', url, false);
  http.send();
  return http.status != 404;
}

$(function () {
 $.each($("a"),function (ix,o) {
   var href = $(o).attr('href')
   if (href && href.indexOf("http") == 0) {
      $(o).css('background','#0000D0');
   } else if (href && UrlExists(href)) {
      $(o).css('background','#00D000');
   } else {
      $(o).css('background','#D00000');
   }
 });
});
Add a comment...

Post has attachment
Hurricane in a bottle
We built a hurricane in a bottle today. We used 2 bottles and 2 lids. it took 5 times till we got it right Supplies 1.2 bottles 1/2.2 lids 2. drillbit and drill How to make it Glue two lids together. Make large hole in two lids (needs to be really, really b...
Hurricane in a bottle
Hurricane in a bottle
hacking-arduino-and-raspberry-pi.blogspot.com
Add a comment...

Found out today you can have a Haskell list comprehension without any generators. I did not know this, assuming the list would always be empty.

...  ++  [ "italics" | isItalic cxt ] ++ ...

This is valid (and useful) Haskell.
Add a comment...

PowerPoint. Keynote. Beamer. Your days are numbered.
Add a comment...
Wait while more posts are being loaded