profile
viewpoint
Graham Lee iamleeg @OxfordRSE Warwick, UK https://sicpers.info I make it faster and easier for you to write high-quality software.

iamleeg/BrowseOverflow 150

Fully unit-tested viewer for iOS questions on StackOverflow.

casademora/FailKit 9

A collection of code snippets, design patterns and general ways and things of what NOT to do when writing your own Cocoa (iOS and Mac Apps)

iamleeg/Amiga-Smalltalk 8

An implementation of Blue Book Smalltalk-80

iamleeg/applause 2

Cross platform mobile development toolkit consisting of a DSL for defining mobile apps and code generators for creating native apps for iOS, Android, Windows Phone 7 and Google App Engine. Based on Eclipse and Xtext. the official repo is at applause/applause.

iamleeg/CocoaByContract 2

Enforcing contracts on Swift and Objective-C objects.

iamleeg/Catch 1

C++ Adaptive Test Cases in Headers

iamleeg/facebook-ios-sdk 1

Facebook SDK for iOS

iamleeg/gle-mode 1

An emacs major mode for editing GLE source.

endocrimes/ScaredyKat 0

iOS Dev UK 2013 Hack evening project.

iamleeg/AIPND 0

Code and associated files for the AI Programming with Python Nanodegree Program

push eventiamleeg/Amiga-Smalltalk

Alan Francis

commit sha 4708b487a65b87426e2d0be132d7f48c931395f5

Open for debate this one. But I found I was losing the failures in all the successes because the amigashell has no useful scroll back. So (temporarily at least) I made it only print out the fails, not the passes.

view details

Alan Francis

commit sha 6839ce18eea0f9fd523b8aafeef849257f4401fd

Break up the tests and add tests for the bitwise primitives and makepoint

view details

Alan Francis

commit sha 364daaa9a0354dfe675abc407d0f47a085e842ef

Cleaned up some of the classdefs on the way to adding Floats.

view details

Alan Francis

commit sha 8b1ed23618493f706b0dfe0719f1078bea425acd

Add some basics for Float

view details

Alan Francis

commit sha a850a1e58026d619eb44b37bbf56a9fba6a8b180

asFloat converts an integer receiver to a Float

view details

Alan Francis

commit sha c1f4664b0255df59ac4a60dd6693e47f2bb567bd

Housekeeping page numbers as required and the dispatch methods for these primitives

view details

Alan Francis

commit sha a873b006b6ebff2a5433dcd78aefb8bf8a59dbd2

Hmmm gcc on Aros doesn’t like -lmieee which works on my Mac/vbcc. Lets try -lm

view details

Alan Francis

commit sha 6013f0d377fa615fdd5bc1a66c15bd50ff638a97

Extract the float conversion code in case its needed elsewhere. Beef up the test to push and pop a couple of floats.

view details

Alan Francis

commit sha d1e35e5121ba2cd63d61aff8855d486b73680b53

Add Float routines. I honestly couldn’t quite be bothered to exhaustively test stuff I’m pretty sure works. WAAAAAAY too much testing of the integer routines so as long as the basics of encoding floats works and the right things are put on the stack, I’ll leave it at that and move onto more interesting things. The exponent and power routines I couldn’t figure out a good way to do and looking around seems a few people just fail them and leave it to Smalltalk to handle :-)

view details

Alan Francis

commit sha ea623838c9d674a73427ae75e74be332d1cbef63

Code Review Change to show PASSes again.

view details

Alan Francis

commit sha b000b1f9f57e5e4c65e78262cc3e5854d7de4de5

Code Review change to remove unused variables

view details

push time in 2 days

PR merged iamleeg/Amiga-Smalltalk

Reviewers
Add float primitives

Started work on the floats. This PR really depends on #19 and the add_more_primitives branch

+2597 -1088

1 comment

22 changed files

acf

pr closed time in 2 days

PR merged OxfordRSE/website

Reviewers
Page on Global.health
+19 -0

0 comment

1 changed file

iamleeg

pr closed time in 2 days

push eventOxfordRSE/website

Graham Lee

commit sha e1eaf31d691d6831cd571df7dfa76e7c38c9c4e6

Page on Global.health

view details

Graham Lee

commit sha b9a123220fb655efa106f938ca59468b26a8a6d0

Links

view details

push time in 2 days

Pull request review commentOxfordRSE/website

Page on Global.health

+---+title: "Global.health"+client: "[Global.health: a Data Science Initiative](https://global.health/)"+description: "Delivering a scalable platform for "

Oops :)

iamleeg

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentOxfordRSE/website

Page on Global.health

+---+title: "Global.health"+client: "[Global.health: a Data Science Initiative](https://global.health/)"+description: "Delivering a scalable platform for "+date: 2020-09-18T16:00:00+01:00+draft: false+---++## Global.health: a Data Science Initiative++Researchers at the Boston Children's Hospital and collaborating institutions created [Healthmap](https://healthmap.org/), a tool for tracking the spread of epidemics in humans and animals. First used to great success in the Ebola outbreak of 2014, associating cases of "a mysterious haemmorhagic fever" with confirmed cases of Ebola to allow experts and the public to see a more accurate state of the spread of the virus, Healthmap continued to be applied through the SARS and MERS epidemics, and is regularly used to track seasonal flu.++The rapid global spread of the COVID-19 pandemic overwhelmed both the manual processes used by the Healthmap team, and the digital infrastructure used to record the data. A collaboration between BCH, Oxford University, and Google.org led to Global.health: an improved, scalable platform for disease tracking. Real-time acquisition of case data shows where potential hotspots may break out, and the effect of policy changes on the spread of the virus.

Yes, I added the links.

iamleeg

comment created time in 2 days

PullRequestReviewEvent

push eventOxfordRSE/website

Graham Lee

commit sha b9a123220fb655efa106f938ca59468b26a8a6d0

Links

view details

push time in 2 days

PR opened OxfordRSE/website

Page on Global.health
+17 -0

0 comment

1 changed file

pr created time in 5 days

create barnchOxfordRSE/website

branch : gdot_project

created branch time in 5 days

issue openedOxfordRSE/website

Project page for Global.health

created time in 5 days

issue commentglobaldothealth/list

Automatic importer: Ohio case data

@rahul18cracker this file documents the retrieval function and how to invoke it, and also how to set up the data source in your dev stack.

iamleeg

comment created time in 5 days

issue commentpints-team/pints

Master-Develop-Issues branch structure

I think I agree with Michael: given the choice of making everybody take a little bit extra effort to polish every contribution, or making somebody take the large effort of polishing the whole develop branch every now and then, I know which sounds more likely.

MichaelClerx

comment created time in 5 days

issue commentpints-team/pints

Add some kind of change log file

OK, I'm late to the party, but the GNU project also have a standard, and various tools to support that standard (e.g. generating changelogs from git logs, or emacs functions to generate changelog entries from edits you're making to source files). https://www.gnu.org/prep/standards/html_node/Change-Logs.html

MichaelClerx

comment created time in 5 days

Pull request review commentiamleeg/Amiga-Smalltalk

Add float primitives

 void Interpreter_pushInteger(short integerValue) { 	Interpreter_success_(YES); } +/** convenience mechanisms for Float arithmetic, not specified in the Blue Book */+void Interpreter_pushFloat(float floatValue)+{+    Interpreter_push(ObjectMemory_floatObjectOf(floatValue));+    Interpreter_success_(YES);+}++/** convenience mechanisms for Float arithmetic, not specified in the Blue Book */+float Interpreter_popFloat(void)+{+	unsigned int intValue = 0;+	Word firstWord;+    Word secondWord;

These variables are unused.

acf

comment created time in 5 days

Pull request review commentiamleeg/Amiga-Smalltalk

Add float primitives

 struct TestResult {   t(&failed); \   if (failed == 0) { \     tr->passed++; \-    printf("PASS " #t "\n"); \+    /*printf("PASS " #t "\n");*/ \

I like having these lines printed so I know that the tests I've written are actually running :)

acf

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

issue commentSABS-R3/2020-software-engineering-day1

student computer setup for the module

If we standardise on a particular distro like ubuntu 20.04, we could provide a script that apt-gets the necessary packages to avoid students getting weird versions, or getting similarly-named but wrong packages. And the script would presumably be used to configure the SABS laptops and the VM image too :)

martinjrobins

comment created time in 5 days

pull request commentiamleeg/Amiga-Smalltalk

Add float primitives

I'm travelling (again) and finding that the github iOS app doesn't help much with reviewing PRs. I'll look soon!

acf

comment created time in 14 days

issue openedgnustep/libs-gdl2

Many compile errors due to IMP caching on Apple

Modern clang compilers targeting the Apple runtime (sorry, I don't know since which version exactly, except that Catalina 10.15 behaves like this) expect IMPs to be called in a type-safe fashion. The type is defined as void (*IMP)(void) and to use one, you have to cast it to e.g. id (*valueForKeyIMP)(id, SEL, id) or whatever type you need.

The uses of IMP caching throughout GDL2, both through static inline functions and compiler macros, thus cannot be compiled on macOS. I'd be happy to submit a PR, but having realised how big a yak to shave this is, wanted to discuss three possible implementations and see which is preferred:

  1. remove all the IMP caching. If you know that there's a current use case for GDL2 where going through the ObjC runtime is too slow then of course this is a non-starter.
  2. Use the runtime API for fast method invocation on the Apple runtime. I don't know what the performance implications of this vs. IMP caching are.
  3. insert casts in every header where GDL2 currently defines an IMP-cache-using function or macro.

created time in 17 days

push eventiamleeg/Amiga-Smalltalk

Alan Francis

commit sha 20a16437a4205b94cda8f2fed1f51af1702b1568

Use short instead of Word (ushort) for integer values to allow for negative numbers.

view details

Alan Francis

commit sha ff364ef239bd0f3b31e77dc13907729044d172e4

Words are unsigned so no need to check if <0

view details

Alan Francis

commit sha 7785c6df7bf8c3989112aa43948885d1e62d4559

Forgot to add integer stack primitives to header

view details

Alan Francis

commit sha 9812ca9b1ca37c8d0699add67c2c6a03146fd832

Convert pointers to LargePositiveInteger when required.

view details

Alan Francis

commit sha 84c84a9a6ea5752bde8c776f6001ce470e9644bd

Doh! Forgot to uncomment some tests when I broke the changes into several commits.

view details

Alan Francis

commit sha 6eac72b08490125b0dc8a446b5586992961c59be

Start adding Primitive Arithmetic. 3+4 WORKS! :-)

view details

Alan Francis

commit sha f67025f88a558c7ceb84a9fe1fdbc6328a58d36b

Equal and NotEqual

view details

Alan Francis

commit sha 57e2762a74eb3ba59336590cafc091b577d39fd4

Added >, <, >=, <=

view details

Alan Francis

commit sha d36e897b00427ca0535f498e27e92fec59d12152

Div, Mod and Quo

view details

Alan Francis

commit sha 5d407cf9b1ce578ca90eeccc61268ddacd0c3ab5

Wrong page number, and a warning I don’t see on the Mac

view details

push time in 20 days

PR merged iamleeg/Amiga-Smalltalk

More Integer Primitives

This PR does a couple of things. Maybe it should be two PRs.

First it switches integer values used around the system to be signed shorts instead of the Word typedef (unsigned short). This allows us to have negative numbers which we couldn't before. Roundtrip Tests added in ObjectMemoryTests to support this and the implementation of ObjectMemory_integerValueOf is changed to do a bit of a dance to reinstate the sign bit.

Once this work has been done, I've added the next two primitive methods from page 617 to handle large positive integers. This part was actually pretty quick but the failing test for the negative case sent me down the rabbit hole above. I am hoping the next few primitives will be quicker :-)

Oh there's one last change to remove a redundant <0 check in RealWordMemory.c as Words are unsigned.

Have added +, -, divide and mod.

Have also added equality and inequality

then

Started at the top routing primitives through the system by byte codes and then decide to go to he bottom and add the primitives. I'll just keep working on this branch I reckon. I'm not 100% on the "code organisation"... what should be in separate files and whether we're getting to the stage that maybe some name spacing with folders might be better.

+3332 -21

2 comments

17 changed files

acf

pr closed time in 20 days

PullRequestReviewEvent

Pull request review commentiamleeg/Amiga-Smalltalk

More Integer Primitives

+#include "Interpreter.h"+#include "Interpreter_PrimArith.h"+#include <stdio.h>++Bool Interpreter_dispatchArithmeticPrimitives( int primitiveIndex ) {+	if( primitiveIndex < 20 ) {+		return Interpreter_dispatchIntegerPrimitives( primitiveIndex );+	}+/*	if( primitiveIndex < 40 ) {+		return Interpreter_dispatchLargeIntegerPrimitives( primitiveIndex );+	}+	if( primitiveIndex < 60 ) {+		return Interpreter_dispatchFloatPrimitives( primitiveIndex );+	}*/+	return NO;+}++Bool Interpreter_dispatchIntegerPrimitives( int primitiveIndex ) {+	switch( primitiveIndex ) {+		case 1: return Interpreter_primitiveAdd();+		case 2: return Interpreter_primitiveSubtract();+		case 3: return Interpreter_primitiveLessThan();+		case 4: return Interpreter_primitiveGreaterThan();+		case 5: return Interpreter_primitiveLessOrEqual();+		case 6: return Interpreter_primitiveGreaterOrEqual();+		case 7: return Interpreter_primitiveEqual();+		case 8: return Interpreter_primitiveNotEqual();+		case 9: return Interpreter_primitiveMultiply();+		case 10: return Interpreter_primitiveDivide();+		case 11: return Interpreter_primitiveMod();+		case 12: return Interpreter_primitiveDiv();+		case 13: return Interpreter_primitiveQuo();+		case 14: return Interpreter_primitiveBitAnd();+		case 15: return Interpreter_primitiveBitOr();+		case 16: return Interpreter_primitiveBitXor();+		case 17: return Interpreter_primitiveBitShift();	+		case 18: return Interpreter_primitiveMakePoint();	+	}+	return NO;+}++Bool Interpreter_primitiveAdd(void) {+	short integerArgument = Interpreter_popInteger();+	short integerReceiver = Interpreter_popInteger();+	short integerResult = 0;+	if( Interpreter_success() == YES ) {+		integerResult = integerReceiver + integerArgument;+		Interpreter_success_( ObjectMemory_isIntegerValue(integerResult ) );

Interpreter_PrimArith.c: In function ‘Interpreter_primitiveAdd’: Interpreter_PrimArith.c:48:25: warning: implicit declaration of function ‘ObjectMemory_isIntegerValue’ [-Wimplicit-function-declaration] 48 | Interpreter_success_( ObjectMemory_isIntegerValue(integerResult ) ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

acf

comment created time in 22 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentiamleeg/Amiga-Smalltalk

More Integer Primitives

 void Interpreter_pushInteger(short integerValue) { 	Interpreter_success_(YES); } +/** + * Page 671+ * convert back and forth between SmallInteger and LargePositiveInteger+ */+ObjectPointer Interpreter_positive16BitIntegerFor(short integerValue) {+	ObjectPointer result = NilPointer;+	+	/* if its negative, we fail */+	if( integerValue < 0 ) {+		Interpreter_primitiveFail();+		return NilPointer; /* caller shouldn't rely on this */+	}+	+	/* if its small enough we can just return get an Integer object version */+	if( ObjectMemory_isIntegerValue(integerValue) ) {+		return ObjectMemory_integerObjectOf(integerValue);+	}+	+	/* Its too big so we create a LargePositiveInteger */+	result = ObjectMemory_instantiateClass_withBytes(ClassLargePositiveIntegerPointer, 2);+	ObjectMemory_storeByte_ofObject_withValue(0, result, Interpreter_lowByteOf(integerValue));+	ObjectMemory_storeByte_ofObject_withValue(1, result, Interpreter_highByteOf(integerValue));+	return result;+}++short Interpreter_positive16BitValueOf(ObjectPointer integerPointer) {+	short result = 0;+	/* if its a small integer, just return integerValue */+	if( ObjectMemory_isIntegerObject(integerPointer) ) {+		result = ObjectMemory_integerValueOf(integerPointer);+		/* its negative fail, duplicated below */+		if( result < 0 ) {+			Interpreter_primitiveFail();+			return 0; /* caller shouldn't rely on this */

yup, fair to return any old value after the routine has failed. The interpreter should check the success register rather than checking the result makes sense.

acf

comment created time in 22 days

PullRequestReviewEvent

Pull request review commentiamleeg/Amiga-Smalltalk

More Integer Primitives

 void Interpreter_pushInteger(short integerValue) { 	Interpreter_success_(YES); } +/** + * Page 671

page 617.

acf

comment created time in 22 days

PullRequestReviewEvent

issue commentglobaldothealth/list

Automatic importer: Ohio case data

There's a separate fetcher function that downloads the data to S3. Your parser just needs to pick up the file from S3 and interpret the content: if the file doesn't update, the fetcher won't trigger it more than once.

iamleeg

comment created time in a month

delete branch globaldothealth/list

delete branch : installing-with-homebrew

delete time in a month

push eventglobaldothealth/list

Graham Lee

commit sha 0590edcfe09aef1f47f80dcd4874743f66a8fe18

mongoimport is not part of the MongoDB-community install

view details

Graham Lee

commit sha 5c2aecf5f0154902e6764d3cc3c25cd68c6e32e6

Merge pull request #787 from globaldothealth/installing-with-homebrew Update readme with information about getting mongo tools mongoimport is not part of the MongoDB-community install, so needs an additional step.

view details

push time in a month

create barnchglobaldothealth/list

branch : installing-with-homebrew

created branch time in a month

push eventiamleeg/Amiga-Smalltalk

Graham Lee

commit sha af1191e03acb2164839d85f6d27080e272ac63d4

Instructions for compiling on AmigaOS

view details

push time in a month

push eventiamleeg/Amiga-Smalltalk

Graham Lee

commit sha 11f4257aba0cf7fd3e5592bb8ebeda55870d89e1

Fix compile error on OS3.1 dur to incomplete include list

view details

push time in a month

pull request commentglobaldothealth/list

Japan

When you've got this tested in a good state, don't forget to rebase to pull in other changes (in fact you'll want to do that before testing is complete, as the lambda functions template has changed)

AnyaLindstromBattle

comment created time in a month

push eventiamleeg/grotag

Graham Lee

commit sha a69c37b146c5be67f931e97d562ce2b5d1012097

Selfishly making the grotags.xml links work on my machine

view details

push time in 2 months

push eventiamleeg/grotag

Graham Lee

commit sha 4854ee849f5341385fd62f23acdcf921bd662f18

Quick and dirty fix to get it running Copy amigaguide.css to ./source Ideally, it gets deployed in the build. But not yet.

view details

Graham Lee

commit sha 5016bf8a5a4799f688d7a8cb42fcbe9dc6fa0a4b

Stop tracking built artifacts.

view details

push time in 2 months

push eventiamleeg/grotag

Graham Lee

commit sha bc55db52a2b7e24d7f5c982f09c1daa971c9108e

Full copyright attribution

view details

push time in 2 months

create barnchiamleeg/grotag

branch : master

created branch time in 2 months

created repositoryiamleeg/grotag

Grotag is an AmigaGuide hypertext reader and converter

created time in 2 months

Pull request review commentglobaldothealth/list

Japan

+import json+import os+import sys+from datetime import date, datetime++# Layer code, like parsing_lib, is added to the path by AWS.+# To test locally (e.g. via pytest), we have to modify sys.path.+# pylint: disable=import-error+if ('lambda' not in sys.argv[0]):+    sys.path.append(+        os.path.join(+            os.path.dirname(os.path.dirname(os.path.abspath(__file__))),+            'common/python'))+import parsing_lib+++def convert_date(raw_date):+    """+    Convert raw date field into a value interpretable by the dataserver.++    The date is listed in dd/mm/YYYY format, but the data server API will+    assume that ambiguous cases (e.g. "05/06/2020") are in mm/dd/YYYY format.+    """+    date = datetime.strptime(raw_date, "%d/%m/%Y")+    return date.strftime("%m/%d/%YZ")+++def convert_gender(raw_gender):

Alternatively, replace try/except with the test if 'gender' in raw_gender:

AnyaLindstromBattle

comment created time in 2 months

push eventiamleeg/NewBean

Graham Lee

commit sha 7107e4bf9036d3fb4f5da2c8b70333a1e587900b

In Xcode 11.6, Deployment target must be >=10.6 or linker errors occur. The linker error is that class NSFileWrapper is missing, which is a 10.0-era class, so this is a bug, but not one I'm much worried about.

view details

push time in 2 months

Pull request review commentglobaldothealth/list

Add batchUpsert method to data service case API

 components:         application/json:           schema:             $ref: '#/components/schemas/BatchValidateCaseResponse'+    "207BatchUpsertCaseResponse":

Wow, I don't think I've seen status 207 correctly used in an HTTP API before. Chapeau 🎩

axmb

comment created time in 2 months

pull request commentglobaldothealth/list

Update parsing_library layer to work with new SAM CLI version (1.0.0)

All looks good, I remember some discussion before about them magically fixing up PYTHON_PATH on the lambda runner so that other files from the container were available for import, is that what's changed upstream to motivate this change?

axmb

comment created time in 2 months

Pull request review commentOxfordRSE/website

Update date of upcoming training courses

 Remote. We will use MS Teams or Zoom.  ## When -Wednesday 23rd September 2020, from 14:00 to 17:00.+Wednesday 21th October 2020, from 14:00 to 17:00.

Should be 21st.

tlestang

comment created time in 2 months

Pull request review commentOxfordRSE/website

Update date of upcoming training courses

 --- title: "Continuous Integration Course" date: 2020-07-22T14:00:00+01:00-draft: false+draft: true

Is this change a mistake? It would unpublish the page about yesterday's course.

tlestang

comment created time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha e09b87e3a8dc051b6e91c4e45662bd5230941c2c

Move the initialisation into its own file. I also moved the initial population into the simulation code.

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha e1c6d995f439eb0a18256d2fc6c54d763533eaf3

Extract the simulation functions into their own file. I also removed the parameter for the derivative function from the top-level simulation function, so that the script can run the simulation without needing to know how it works.

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha a745882ab5aa55cf50c2aa7544fb6f48222ba21f

Extract plotting routines to their own file.

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha da708a4c7ad28ad579c6e321eb24431bfccf6590

introduce an abstraction between simulating the infection and using scipy.

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha 346d111ef4c36296e98b7a1f792b2bc70db0b93a

Extract duplicate gradient calculation

view details

Graham Lee

commit sha 84c10df2d8bd3bd3ccc556e6f2b302b929e9cdec

Extract all remaining duplicate gradient calculations

view details

push time in 2 months

push eventiamleeg/Amiga-Smalltalk

Alan Francis

commit sha 59869174af469f7250b1d6db72c5180b819acb58

unify the two makefiles

view details

Alan Francis

commit sha 1c7354caff7891196a666ac03a056d7392a0ea1f

Types.h is shared between ObjectMemory and Interpreter

view details

push time in 2 months

PR merged iamleeg/Amiga-Smalltalk

unify the two makefiles

The only difference between the two makefiles was the rm / delete command for clean so I just removed it for now and at least there's just a single makefile I can use on Mac and Amiga. Attention pulled to the shiny thing of trying to make a little git client for Amiga, but hopefully will get back on track :-)

+11 -51

0 comment

2 changed files

acf

pr closed time in 2 months

Pull request review commentiamleeg/Amiga-Smalltalk

unify the two makefiles

 VASM=vasmm68k_mot VLINK=vlink LDFLAGS=-L$(NDK)/linker_libs -lamiga -lauto CONFIG=+aos68k-RM=rm+ddRM=rm  TESTAPP=ast_tests ERRORHOST=error_host -SOURCE_FILES = ObjectMemory.o ObjectMemory_Storage.o ObjectMemory_FreeList.o ObjectMemory_Allocation.o ObjectMemory_RefCounting.o ObjectMemory_GC.o RealWordMemory.o Interpreter.o Interpreter_Error.o-HEADER_FILES = ObjectMemory.h ObjectMemory_Constants.h ObjectMemory_Storage.h ObjectMemory_FreeList.h ObjectMemory_Allocation.h ObjectMemory_RefCounting.h ObjectMemory_GC.h RealWordMemory.h Types.h Interpreter.h-HEADER_FILES2 = Interpreter_Constants.h Interpreter_Error.h-#had to split this because the line was too long+OM_SOURCEFILES =  ObjectMemory.o ObjectMemory_Storage.o ObjectMemory_FreeList.o ObjectMemory_Allocation.o ObjectMemory_RefCounting.o ObjectMemory_GC.o RealWordMemory.o+INTERP_SOURCEFILES =  Interpreter.o Interpreter_Error.o++OM_HEADERFILES = ObjectMemory.h ObjectMemory_Constants.h ObjectMemory_Storage.h ObjectMemory_FreeList.h ObjectMemory_Allocation.h ObjectMemory_RefCounting.h ObjectMemory_GC.h RealWordMemory.h +INTERP_HEADERFILES = Types.h Interpreter.h Interpreter_Constants.h Interpreter_Error.h

fair enough :)

acf

comment created time in 2 months

push eventiamleeg/dotfiles

Graham Lee

commit sha f41faefc7ff113136cc60fab8a6c05006b4265c4

Create LICENSE

view details

push time in 2 months

create barnchiamleeg/dotfiles

branch : main

created branch time in 2 months

created repositoryiamleeg/dotfiles

The ones that I actually dumped into my ~, anyway.

created time in 2 months

push eventOxfordRSE/website

Graham Lee

commit sha 3840cd9332f545f3fdaef41957e7dd2864a41739

New post on polyglot documentation with org-mode

view details

Graham Lee

commit sha 4692f2e294219ddc42b5d3cf097163502d8cd750

Fix grammar error

view details

Graham Lee

commit sha fdd8125c7109ac40abf3e8ddaef3cc7d7bb229e1

Merge pull request #45 from OxfordRSE/blog_on_org-mode New post on polyglot documentation with org-mode

view details

push time in 2 months

PR merged OxfordRSE/website

Reviewers
New post on polyglot documentation with org-mode
+111 -0

0 comment

1 changed file

iamleeg

pr closed time in 2 months

push eventOxfordRSE/website

Graham Lee

commit sha 4692f2e294219ddc42b5d3cf097163502d8cd750

Fix grammar error

view details

push time in 2 months

Pull request review commentOxfordRSE/website

New post on polyglot documentation with org-mode

+---+title: "Polyglot Documentation with Org-mode"+date: 2020-07-16T11:00:00+01:00+draft: false+syntax_highlighting: true+include_toc: false+---++An important part of teaching is meeting the students on common ground. Find out what experience they have, and bring your teaching to them so that they can incorporate their new knowledge alongside what they already know.++In teaching software engineering concepts, that usually means tailoring the discussion to the programming language that a student is familiar with. You may be explaining a language-agnostic concept like object-oriented programming, designing reusable functions, or drawing graphs, but students will find examples given in unfamiliar languages a barrier to understanding.++In the RSE group, we work with lots of different programming languages: a quick sample of projects we've worked on in the University in the last year includes Javascript, C++, C#, Ruby, PHP, Swift, Python, R, and Matlab. There may be others. The point is that just because _we_ have to pick up different programming languages all the time, that doesn't mean the people we teach should too.++When developing teaching materials, we could do what many commercial SaaS companies do when they document their web APIs. We could embed example code in many languages in the documentation, and let readers choose which they want to see. There are tools that will make that easy, like the [`markdown-fenced-code-tabs`](https://yassir.dev/markdown-fenced-code-tabs/) extension to the Python markdown parser.++While that's good enough for API samples, it won't really work in tutorial content. We need to talk about the code in the prose, and that will be subtly different for each language. We also don't want to maintain wholly separate forks of our material. We want one narrative, with language-specific samples and prose sections where necessary. From a single source, we'd like to be able to build a version of the documentation tailored to a specific language, with sample code in that language and any necessary tweaks to the discussion.++# Org-mode++We found that it's possible to do just that, by writing the document in [org-mode](https://orgmode.org). Org-mode is an extensible format for writing structured text, with a hierarchical outline system, markdown-like formatting syntax, and facilities for marking sections as to-do items with due dates, as sample code in particular languages, as presenter notes when used for presentations, and more. Originally written for the venerable GNU Emacs text editor, org-mode parsers exist for vim, Visual Studio Code, Atom, and elsewhere.++Using the Emacs parser, it's possible to export org-mode files to multiple formats, including hugo ([which our website is built on](https://www.rse.ox.ac.uk/tech_post/building_site_with_hugo/)), LaTeX (suitable for generating printed handouts), [reveal.js](https://revealjs.com) slides for giving lectures, and more.++Crucially, org-mode also has a "tagging" system where sections in the hierarchical outline can be tagged with arbitrary words. You can control which tags get included or excluded in the files exported from org-mode, and this is how we built our multi-lingual documentation.

should be "we can build", I'll change it

iamleeg

comment created time in 2 months

create barnchOxfordRSE/website

branch : blog_on_org-mode

created branch time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha a788a69956e5c5d9acc641e37cbd223071c8bb65

Define simulation parameters in a method and remove globals

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha 2587957d88e6a0188951188729fdf6085ccfa837

Plotting as procedures in the script

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha 98cd68f0d49a78474d5883bd2e33761d6529e18b

Turn the model into its own function

view details

push time in 2 months

push eventOxfordRSE/covid-19-model

Graham Lee

commit sha e5da5acd5caccd243f50d9bf24693cc48c658b06

Turn initialisation into its own function.

view details

push time in 2 months

create barnchOxfordRSE/covid-19-model

branch : main

created branch time in 2 months

created repositoryOxfordRSE/covid-19-model

Simple simulation of a contagious disease outbreak, used in a tutorial on organising code.

created time in 2 months

Pull request review commentopen-covid-data/healthmap-gdo-temp

Add a common lib function to encapsulate Lambda handler boilerplate.

 def obtain_api_credentials(): def extract_source_id(s3_key):     """Extracts the source ID based on the canonical object key format."""     return s3_key.split(S3_KEY_PATH_SEPERATOR, 1)[0]+++def run_lambda(event, context, parsing_function):

This is going to help script-writers a lot who aren't familiar with AWS :+1:

axmb

comment created time in 2 months

Pull request review commentiamleeg/Amiga-Smalltalk

unify the two makefiles

 VASM=vasmm68k_mot VLINK=vlink LDFLAGS=-L$(NDK)/linker_libs -lamiga -lauto CONFIG=+aos68k-RM=rm+ddRM=rm  TESTAPP=ast_tests ERRORHOST=error_host -SOURCE_FILES = ObjectMemory.o ObjectMemory_Storage.o ObjectMemory_FreeList.o ObjectMemory_Allocation.o ObjectMemory_RefCounting.o ObjectMemory_GC.o RealWordMemory.o Interpreter.o Interpreter_Error.o-HEADER_FILES = ObjectMemory.h ObjectMemory_Constants.h ObjectMemory_Storage.h ObjectMemory_FreeList.h ObjectMemory_Allocation.h ObjectMemory_RefCounting.h ObjectMemory_GC.h RealWordMemory.h Types.h Interpreter.h-HEADER_FILES2 = Interpreter_Constants.h Interpreter_Error.h-#had to split this because the line was too long+OM_SOURCEFILES =  ObjectMemory.o ObjectMemory_Storage.o ObjectMemory_FreeList.o ObjectMemory_Allocation.o ObjectMemory_RefCounting.o ObjectMemory_GC.o RealWordMemory.o+INTERP_SOURCEFILES =  Interpreter.o Interpreter_Error.o++OM_HEADERFILES = ObjectMemory.h ObjectMemory_Constants.h ObjectMemory_Storage.h ObjectMemory_FreeList.h ObjectMemory_Allocation.h ObjectMemory_RefCounting.h ObjectMemory_GC.h RealWordMemory.h +INTERP_HEADERFILES = Types.h Interpreter.h Interpreter_Constants.h Interpreter_Error.h

This might be a PITA for line length but Types.h is used in the ObjectMemory.

acf

comment created time in 2 months

Pull request review commentopen-covid-data/healthmap-gdo-temp

Move reusable parsing subroutines into a common lib file/Lambda Layer

-import boto3 import json import os-import requests-import google.auth.transport.requests-from google.oauth2 import service_account+import sys from datetime import date, datetime --LOCAL_DATA_FILE = "/tmp/data.json"-METADATA_BUCKET = "epid-ingestion"-SERVICE_ACCOUNT_CRED_FILE = "covid-19-map-277002-0943eeb6776b.json"-SOURCE_URL_FIELD = "sourceUrl"-S3_BUCKET_FIELD = "s3Bucket"-S3_KEY_FIELD = "s3Key"-S3_KEY_PATH_SEPERATOR = "/"--s3_client = boto3.client("s3")---def extract_event_fields(event):-    if any(-            field not in event-            for field in [SOURCE_URL_FIELD, S3_BUCKET_FIELD, S3_KEY_FIELD]):-        error_message = (-            f"Required fields {SOURCE_URL_FIELD}; {S3_BUCKET_FIELD}; "-            f"{S3_KEY_FIELD} not found in input event json.")-        print(error_message)-        raise ValueError(error_message)-    return event[SOURCE_URL_FIELD], event[S3_BUCKET_FIELD], event[S3_KEY_FIELD]---def retrieve_raw_data_file(s3_bucket, s3_key):-    try:-        local_data_file = LOCAL_DATA_FILE-        print(f"Retrieving raw data from s3://{s3_bucket}/{s3_key}")-        s3_client.download_file(s3_bucket, s3_key, local_data_file)-        return local_data_file-    except Exception as e:-        print(e)-        raise e+# Layer code, like parsing_lib, is added to the path by AWS.+# To test locally (e.g. via pytest), we have to modify sys.path.+# pylint: disable=import-error+if ('lambda' not in sys.argv[0]):+    sys.path.append(+        os.path.join(+            os.path.dirname(os.path.dirname(os.path.abspath(__file__))),+            'common/python'))+import parsing_lib

Ignore this, I managed to fix my venv (actually I don't know what I did, it just started working AFAICT) and relative imports can't be above the top-level module in the filesystem.

axmb

comment created time in 2 months

Pull request review commentopen-covid-data/healthmap-gdo-temp

Move reusable parsing subroutines into a common lib file/Lambda Layer

-import boto3 import json import os-import requests-import google.auth.transport.requests-from google.oauth2 import service_account+import sys from datetime import date, datetime --LOCAL_DATA_FILE = "/tmp/data.json"-METADATA_BUCKET = "epid-ingestion"-SERVICE_ACCOUNT_CRED_FILE = "covid-19-map-277002-0943eeb6776b.json"-SOURCE_URL_FIELD = "sourceUrl"-S3_BUCKET_FIELD = "s3Bucket"-S3_KEY_FIELD = "s3Key"-S3_KEY_PATH_SEPERATOR = "/"--s3_client = boto3.client("s3")---def extract_event_fields(event):-    if any(-            field not in event-            for field in [SOURCE_URL_FIELD, S3_BUCKET_FIELD, S3_KEY_FIELD]):-        error_message = (-            f"Required fields {SOURCE_URL_FIELD}; {S3_BUCKET_FIELD}; "-            f"{S3_KEY_FIELD} not found in input event json.")-        print(error_message)-        raise ValueError(error_message)-    return event[SOURCE_URL_FIELD], event[S3_BUCKET_FIELD], event[S3_KEY_FIELD]---def retrieve_raw_data_file(s3_bucket, s3_key):-    try:-        local_data_file = LOCAL_DATA_FILE-        print(f"Retrieving raw data from s3://{s3_bucket}/{s3_key}")-        s3_client.download_file(s3_bucket, s3_key, local_data_file)-        return local_data_file-    except Exception as e:-        print(e)-        raise e+# Layer code, like parsing_lib, is added to the path by AWS.+# To test locally (e.g. via pytest), we have to modify sys.path.+# pylint: disable=import-error+if ('lambda' not in sys.argv[0]):+    sys.path.append(+        os.path.join(+            os.path.dirname(os.path.dirname(os.path.abspath(__file__))),+            'common/python'))+import parsing_lib

Like I said, I have other problems getting this to work so I haven't tried the following change. You should be able to import a relative file (which should work both locally and on AWS) with import ..parsing.parsing_lib, unless there's something about the AWS environment that doesn't allow that.

axmb

comment created time in 2 months

Pull request review commentopen-covid-data/healthmap-gdo-temp

Move reusable parsing subroutines into a common lib file/Lambda Layer

+import boto3+import os+import requests+import google.auth.transport.requests+from google.oauth2 import service_account++LOCAL_DATA_FILE = "/tmp/data.json"+METADATA_BUCKET = "epid-ingestion"+SERVICE_ACCOUNT_CRED_FILE = "covid-19-map-277002-0943eeb6776b.json"+SOURCE_URL_FIELD = "sourceUrl"+S3_BUCKET_FIELD = "s3Bucket"+S3_KEY_FIELD = "s3Key"+S3_KEY_PATH_SEPERATOR = "/"++s3_client = boto3.client("s3")+++def extract_event_fields(event):+    if any(+            field not in event+            for field in [SOURCE_URL_FIELD, S3_BUCKET_FIELD, S3_KEY_FIELD]):+        error_message = (+            f"Required fields {SOURCE_URL_FIELD}; {S3_BUCKET_FIELD}; "+            f"{S3_KEY_FIELD} not found in input event json.")+        print(error_message)+        raise ValueError(error_message)+    return event[SOURCE_URL_FIELD], event[S3_BUCKET_FIELD], event[S3_KEY_FIELD]+++def retrieve_raw_data_file(s3_bucket, s3_key):+    try:+        local_data_file = LOCAL_DATA_FILE+        print(f"Retrieving raw data from s3://{s3_bucket}/{s3_key}")+        s3_client.download_file(s3_bucket, s3_key, local_data_file)+        return local_data_file+    except Exception as e:+        print(e)+        raise e+++def write_to_server(cases, headers):+    """+    Upserts the provided cases via the G.h Case API.++    TODO: Parallelize these requests.+    """

Given Python's type system :D it'd be great to either describe the shape of a valid case here, or (preferably) link out to the server doc if/when it exists.

axmb

comment created time in 2 months

Pull request review commentopen-covid-data/healthmap-gdo-temp

Move reusable parsing subroutines into a common lib file/Lambda Layer

+

Good set of tests, nice job 👍

axmb

comment created time in 2 months

Pull request review commentopen-covid-data/healthmap-gdo-temp

Move reusable parsing subroutines into a common lib file/Lambda Layer

+import boto3

I've yet to test this locally, because I get an error on this line when running in pytest, even though boto3 is installed in my venv and import boto3 from the repl works. I'll try to diagnose that, but this review will proceed on the basis of "didn't run it, probably OK" for now :)

axmb

comment created time in 2 months

push eventiamleeg/NewBean

Graham Lee

commit sha e18d4e21276e9d488318db8e77904b4ba7b2579a

Remove the explicit 10.5 SDK path from framework search paths.

view details

push time in 2 months

push eventiamleeg/NewBean

Graham Lee

commit sha 678c86eda0fcb55c398420ebf7f1b1b8db77dabf

Switch the deployment target from 10.6 to 10.4. Xcode doesn't like it being so early, but it's true.

view details

push time in 2 months

push eventiamleeg/NewBean

Graham Lee

commit sha 8560b785e44d93ff8d032a2068b29db1e59997f8

Fix dark mode rendering of the text view over the page view.

view details

push time in 2 months

push eventiamleeg/NewBean

Graham Lee

commit sha 6c0b98182f247f08d79e0f5d71a962b2cb254d13

Fix typo in README

view details

push time in 2 months

create barnchiamleeg/NewBean

branch : master

created branch time in 2 months

created repositoryiamleeg/NewBean

Bean 2.4.5 by James Hoover, but building/running on modern macOS.

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import India—Kerala case data

https://docs.google.com/spreadsheets/d/e/2PACX-1vQU9eLCMT0XwWnoxV_LkyCkxMcPYO7z7ULdODoUFgcdzp48pgGpGrVZFXvraXYvUioVRsQgQDU_pQyI/pubhtml

Check for overlap with the national data from India.

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Sri Lanka case data

https://docs.google.com/spreadsheets/d/1zIgPU0ZlYkiKaavYAUcHKgEP95jdaMaf9ljJgRqtog4/edit#gid=0

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Uganda case data

Tweeted: https://twitter.com/MinofHealthUG?ref_src=twsrc%5Etfw%7Ctwcamp%5Eembeddedtimeline%7Ctwterm%5Eprofile%3AMinofHealthUG&ref_url=https%3A%2F%2Fwww.health.go.ug%2F

So maybe use the Twitter API?

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Hong Kong case data

https://data.gov.hk/en-data/dataset/hk-dh-chpsebcddr-novel-infectious-agent/resource/12b0e451-9ee4-439f-9807-0ab684404fc6

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Taiwan case data

https://data.cdc.gov.tw/en/dataset/agsdctable-day-19cov

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Thai case data

daily dump: https://data.go.th/en/dataset/covid-19-daily API: https://covid19.th-stat.com/th/api

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Togo case data

https://covid19.gouv.tg/situation-au-togo/

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Paraguay case data

https://public.tableau.com/profile/mspbs#!/vizhome/COVID19PY-Registros/Descargardatos (data is in tableau, can be exported as CSV - can that be automated too?)

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Cuba case data

https://covid19cubadata.github.io/casos.html

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Republic of Korea case data

https://docs.google.com/spreadsheets/d/1nKRkOwnGV7RgsMnsYE6l96u4xxl3ZaNiTluPKEPaWm8/edit#gid=0 and https://github.com/ThisIsIsaac/Data-Science-for-COVID-19/blob/master/Covid19_Dataset/patients.csv

created time in 2 months

issue openedopen-covid-data/healthmap-gdo-temp

Import Philippines case data

http://bit.ly/DataDropArchives

created time in 2 months

more