266
+ − 1
Brain fuck optimizer
+ − 2
+ − 3
https://github.com/Dash-Lambda/Eso/blob/master/src/main/scala/interpreters/BFOptimized.scala
+ − 4
+ − 5
--------------------------
+ − 6
264
+ − 7
chowchingjimkcl
+ − 8
276
+ − 9
Assignment 6 3 (basic) 7 (main)
+ − 10
Assignment 7 4 (basic) 6 (main)
+ − 11
Assignment 8 4 (basic) 6 (main)
+ − 12
Assignment 9 4 (basic) 6 (main)
+ − 13
Assignment 10 10 (main)
264
+ − 14
+ − 15
48
+ − 16
+ − 17
+ − 18
+ − 19
+ − 20
+ − 21
+ − 22
+ − 23
203
+ − 24
scalac -Ydelambdafy:inline -d docdiff.jar docdiff.scala
+ − 25
228
+ − 26
gerp -h // gerp without filename
203
+ − 27
+ − 28
191
+ − 29
given two lists, is one a sublist of the other except one
+ − 30
element
167
+ − 31
191
+ − 32
check Graham's Haskell book
+ − 33
+ − 34
five-in-a-row as a spiral
+ − 35
(Tic-Tac-Toe on steriods or Go for the weak mind)
+ − 36
229
+ − 37
----------
+ − 38
for serving locally a directory
191
+ − 39
229
+ − 40
python -m SimpleHTTPServer 8000
191
+ − 41
----------
+ − 42
CokeBottle cokeBottle = new CokeBottle();
+ − 43
+ − 44
joke from...
+ − 45
+ − 46
https://www.youtube.com/watch?v=9e_oEE72d3U
+ − 47
----------
116
+ − 48
178
+ − 49
---------------
+ − 50
Hepec...generating static pages
+ − 51
https://sake92.github.io/hepek/quick-start.html
113
+ − 52
167
+ − 53
==================================
78
+ − 54
Calling ediff from the command line
+ − 55
+ − 56
+ − 57
emacs --eval "(ediff-files \"k1502472/drumb.scala\" \"k1502752/drumb.scala\")"
85
+ − 58
+ − 59
+ − 60
deleting comments from scala files
+ − 61
89
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 62
find . -name '*.scala' -print0 | xargs -0 perl -n -p -0 -i.bak -e 's%/\*([^*].*?)?\*/%%gs;s%^([^\"\n\r]*(\"[^\"\n\r]*\"[^\"\n\r]*?)*?)//([^*\n\r].*)?$%$1%gm'
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 63
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 64
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 65
find . -name '*.scala' -print0 | sed -i.2 's|def ordered_moves(dim: Int, path: Path, x: Pos): List[Pos] = ..|//def ordered_moves(dim: Int, path: Path, x: Pos): List[Pos] = ..|g'
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 66
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 67
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 68
LC_ALL=C sed -i.2 -- 's|def ordered_moves(dim: Int, path: Path, x: Pos): List\[Pos\] = \.\.|//def ordered_moves(dim: Int, path: Path, x: Pos): List[Pos] = ..|g' k*/knight3.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 69
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 70
LC_ALL=C sed -i.2 -- 's|def first_closed_tour_heuristic(dim: Int, path: Path): Option\[Path\] = \.\.\.|//def first_closed_tour_heuristic(dim: Int, path: Path): Option[Path] = ...|g' k*/knight3.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 71
90
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 72
LC_ALL=C sed -i.2 -- 's|def first_tour_heuristic(dim: Int, path: Path): Option\[Path\] = \.\.\.|//def first_tour_heuristic(dim: Int, path: Path): Option[Path] = ...|g' k*/knight3.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 73
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 74
LC_ALL=C sed -i.2 -- 's|def nullable (r: Rexp) : Boolean = \.\.\.|//def nullable (r: Rexp) : Boolean = ...|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 75
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 76
LC_ALL=C sed -i.2 -- 's|def der (c: Char, r: Rexp) : Rexp = \.\.\.|//def der (c: Char, r: Rexp) : Rexp = ...|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 77
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 78
LC_ALL=C sed -i.2 -- 's|def simp(r: Rexp) : Rexp = \.\.\.|//def simp(r: Rexp) : Rexp = ...|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 79
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 80
LC_ALL=C sed -i.2 -- 's|def ders (s: List[Char], r: Rexp) : Rexp = \.\.\.|//def ders (s: List[Char], r: Rexp) : Rexp = ...|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 81
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 82
LC_ALL=C sed -i.2 -- 's|def matcher(r: Rexp, s: String): Boolean = \.\.\.|//def matcher(r: Rexp, s: String): Boolean = ...|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 83
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 84
LC_ALL=C sed -i.2 -- 's|def replace(r: Rexp, s1: String, s2: String): String = \.\.\.|//def replace(r: Rexp, s1: String, s2: String): String = ...|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 85
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 86
LC_ALL=C sed -i.2 -- 's|println(matcher(EVIL,|//println(matcher(EVIL,|g' k*/re.scala.bak
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
+ − 87
99
+ − 88
LC_ALL=C sed -i.2 -- 's|for (i <- 1 to 5000001 by 500000)|for (i <- 1 to 11 by 10)|g' k*/re.scala.bak
+ − 89
+ − 90
+ − 91
194
+ − 92
+ − 93
111
+ − 94
+ − 95
+ − 96
+ − 97
194
+ − 98
=========================
+ − 99
Admin atudd
+ − 100
=========================
+ − 101
Hi all,
+ − 102
+ − 103
As you will have heard from Chris, you've been appointed as TAs on 5CCS2PEP -- congrats. We had a large number of high quality applicants. It was quite a challenge to fit you to labs based on your own timetables, but we managed to figure out a schedule.
111
+ − 104
194
+ − 105
The module setup is very similar to last year, with the difference that there are now 5 C++ assignments and 5 Scala assignments, to balance things out. Chris should have told you which sessions you're each covering. The definitive schedule for the module is the timetable on timetables.kcl.ac.uk, but to summarise:
+ − 106
All the labs are in Bush House. Most sessions have about 40 students, so there are two TAs.
+ − 107
Labs start in week 1 of term (the first lab is on Monday the 24th of September); there's a week off for reading week; then labs run until the end of term (last lab on Thursday the 13th of December). If you're planning to skip part of the last week of term to get a cheap flight home, the best bet is to see if you can swap sessions with someone else for that week.
+ − 108
As the first lecture is on Friday, the first week of labs are pretty laid back. A Java revision assignment has been set that you will have seen last year or the year before (Assignment 0). This doesn't contribute towards the module marks; its main purpose is to get the students into the lab, to set themselves up ahead of assignment 1 -- this is released on Friday, and does count towards the module marks. The to do list I've given them is:
+ − 109
Complete the Plagiarism and Collusion quiz. They need to get 100% to do anything on this module.
+ − 110
Create an account on GitHub.com if they don't have one already.
+ − 111
Enter their GitHub username (e.g. SomeStudent) into the form linked to from the module KEATS page: in the section 'How this module works', click 'Register to submit work on this module via github.com'
+ − 112
Click the link to start assignment 0, and do some work on it.
+ − 113
Note the link to assignment 0 is set up so that if they haven't a GitHub username (step 3 above), they can't click the link to the assignment. If you want to skip straight to it, here's the link:
112
+ − 114
194
+ − 115
https://classroom.github.com/a/xyDQjYoD
112
+ − 116
194
+ − 117
...but you could just as well look at your own assignment0 repository from last year/the year before, to see how you solved it. Please don't give the students this direct link -- as the automated testing service is running their code on College machines, we need to ensure we only let the appropriate students access the resources for this modules.
+ − 118
+ − 119
I'll circulate the link to assignment 1 (for the second week of labs) and a model answer in due course.
112
+ − 120
194
+ − 121
Finally, as for some of you this is your first time at being a TA, here are a few helpful notes:
+ − 122
Being a good teacher in programming is about getting the students to think, and to become self-sufficient. If they ask you a question, think about how you would find the answer out yourself. If you would Google it, Google it with them. If you'd get a piece of paper out and start sketching out ideas, encourage them to do that.
+ − 123
Don't give students the answers. If they realise what the right way to do something is, you can agree, but otherwise, guide them in the right direction but don't just spell it out. If they seem stuck, go back a few steps and cover the basics of the assignment.
+ − 124
Don't sit in the corner of the lab waiting for things to happen. Walk around, ask people how they're getting on. Some students are a bit shy to ask for help, we need to engage them with the course and help them get the most out of it.
+ − 125
As a TA, you're representing the department as a member of staff. Don't make advances on the students. Outside the lab, you're a student and it's none of our business; but for those hours there, you're staff.
+ − 126
If a student kicks off (I've never heard of this happening) we've got your back - come get a member of academic or office staff, you're paid to teach not do crowd control.
+ − 127
We take attendance in labs. Half way through, one of you should go to the departmental office (level 6) and pick up a barcode scanner. There's a barcode to scan to denote the session -- you scan this once -- then scan the student cards of the students in the lab. It's unfortunately important that we do this, as the UK Border Agency take a sample of attendance records for overseas students, and the College will lose its ability to sponsor overseas student visas if we aren't seen to be taking attendance.
+ − 128
If you're doing two consecutive sessions, classes finish at 5 to the hour and start again at 5 past. Take a break.
+ − 129
If you're talking a lot, and need some water, don't forget about the cold water machines in the kitchens.
+ − 130
Our students sometimes say that the labs are noisy. This is usually due to students who aren't taking the module sitting in the lab. Politely ask them to be quiet or leave; there are other labs on campus and other study spaces.
+ − 131
Because I'm not in the labs, but you are, if there any snags please let me know.
+ − 132
I think that's it - I look forwards to working with you.
112
+ − 133
194
+ − 134
All the best,
112
+ − 135
194
+ − 136
Andrew
112
+ − 137