I challenge you to use a better language...
Logo! There's nothing that turtle can't do! =-D
*Cough*
I'll get my coat, it's the one with the pen in the pocket...
It's that time of year again, when all good little developers count down to the festive season with the Advent of Code. It's a gloriously simple concept. Much like the Advent Calendar, each day in December, up to and including the 25th, contains a treat. However, rather than pictures or vaguely stale chocolates, each Advent …
From the Intercal Introduction:
"The INTERCAL programming language was designed the morning of May 26, 1972 by Donald R. Woods and James M. Lyon, at Princeton University. Exactly when in the morning will become apparent in the course of this manual."
CESIL.
WOW! That takes me back!
Computer Education in Schools Instructional Language.
Waaaaaaaay back in school when I chose "Computer Studies" as an O-level subject, it was my very first exposure to a programming langauge, used mainly to teach the concepts of operators, operands, input, output, variables and constants, etc. After a term of learning it we switched to BASIC and never touched CESIL again.
If I remember correctly (it was 40yrs ago now!) it only had 12 instructions:
IN, OUT, STORE, LOAD, ADD, SUBTRACT, MULTIPY, DIVIDE, JUMP, JINEG JIZERO and HALT.
You couldn't work on 2 variables at a time, just one variable (or a consant) and the Accumulator!
something like c=a+b would be
LOAD A
ADD B
STORE C
There was no IF type comparison. Basically the only 2 conditions were JINEG (Jump If Negative) and JIZERO (Jump If Zero), used (if memory serves) to learn the construct of loops.
Happy days in a simpler world.
Ot the perl module Lingua::Romana::Perligata:
https://metacpan.org/dist/Lingua-Romana-Perligata/view/lib/Lingua/Romana/Perligata.pm
@ICL1900-G3
I had to learn the stupid waste of time language at school. It was and still is shit. And more to there point useless. I have never heard anyone ask for a pint and/or scratchings in Latin. And whilst I am at it, only Southerners and social workers trying to be "common" ask for "pork scratchings". As if there was any other sort...
idiot taxpayer here again,
May I will call you 'idiot' for short !!! :)
Mr/Ms/Mx 'idiot' you are so so so wrong !!!
Approximately, 30% to 60% of English vocabulary comes from Latin. (Exact figures are debatable !!!)
Many European languages are derived from latin and the words/word roots are similar.
Latin is useful, enabling you to ' sort of' understand other languages if you have never had the opportunity to learn them.
Latin is the source of the jargon in medicine, the sciences and law to name a few important fields of knowledge.
It makes the latin jokes in 'Life of Brian' much better !!!
I could go on but you should get my drift ..... so to speak !!! :)
I thought so too until meeting my lovely Spanish partner. At which point I realised that I already understood verb conjugation, the subjunctive mood and the imperfect past tense. (In fact I am still slightly disappointed that Spanish nouns don't decline.) I even find myself correcting Spanish speakers' own (mis)usage of direct and indirect object pronouns; they're surprisingly crap at it - so much so that they have names for it: leísmo and laísmo.
1) I never completely understand the question (I'm a moron). 2) Even if I do vaguely glean the problem I'll try and solve it with some mutant hybrid of bash/sed/awk/bc (I'm a moron). Once tried that Project Euler thing. Got a little way through it mostly because there's a Unix util called "primes". Attempted to use Python but that added more misery and woe. They all seem to descend into "Your late uncle's half brother's sister married a fridge stolen from your great aunt. How many magnets do you need?". Have I mentioned I'm a moron?
Pfft. Don't need VBA.
{=SUM( IF( OFFSET(Depths, 1, 0, (ROWS(Depths) - 1), 1) > OFFSET(OFFSET(Depths, 1, 0, (ROWS(Depths) - 1), 1), -1,0), 1,0))}
.
(The glunging OFFSET is to fix a fencepost error on my much more readable original:
{=SUM( IF(Depths > OFFSET(Depths, -1,0), 1,0))}
.
Note to get the {}s you need to force interpretation as an Array formula by holding down ctrl-shift as you hit Enter.)
Slowly. The examples are only a dozen lines or so long, but the inputs for the actual exercises are thousands of entries. They can be solved a lot more quickly by saving the inputs to a file, reading them into memory a line at a time, and processing, and with a dozen lines of code, or so.
Pretty much every language I have ever used has low-level file operations (open, read, close), and most allow you to read a line at a time, with standard line endings.
Advent is four weeks leading up to Christmas, not 25 days in December.
Oh and while I'm at it it, Sunday 26th isn't Boxing Day this year - it's Christmas Sunday. The BBC unilaterally changed the definition of Boxing Day quite recently.
And even the government website gets the order of bank holidays wrong: Monday 27th is the Boxing Day bank holiday (first working day after Christmas) and Tuesday 28th is the Christmas Day bank holiday (first working day after Christmas, but Boxing Day has already nabbed 27th).
Now get off my lawn.
So Xmay Day Bank holiday and Boxing Day bank holiday are both 'first working day after Christmas'?
Yes, basically, but the Boxing Day one is defined first, so after it gets the Monday, Tuesday becomes the first working day after Christmas and therefore cops the (in-lieu-of) Christmas bank holiday. Used to be a great question for pub quizzes.
I had to look into all this once (when the UK Gov decided to just change a bunch of Bank Holidays and it broke some stuff).
I think the logic is:
- Christmas Day and Good Friday are "common law" holidays. i.e. everyone knows what they are and when they are
- All other Bank Holidays are described with reference to Xmas and GF by the Banking and Financial Dealings Act 1971. i.e. that no one can be made to do anything on a Bank Holiday that they can't be made to do on Xmas or GF [1]
- The Bank Holidays are listed in the Appendix to that Act [2]
- The astute observer will note that this list does not include several Bank Holidays that we expect, not does it include getting a Tuesday if Xmas + Boxing are on the weekend
- However, as regular as clockwork, the Queen will proclaim the additional Bank Holidays (because some one in UK Gov asks her to) [3]
So actually it looks like we are mostly governed by really bad code. i.e. hardly anything is re-written, it is just patched and tweaked and then someone sets up a cron job to update something on certain years, etc. etc.
1 - https://www.legislation.gov.uk/ukpga/1971/80/section/1
2 - https://www.legislation.gov.uk/ukpga/1971/80/schedule/1
3 - https://www.thegazette.co.uk/notice/3846031
Thanks! Some years ago the (Glasgow) Herald newspaper tried to find out who sets the dates of the Glasgow Fair Weekend and Fortnight. Sure, we all know it's a week later than the Paisley one, but that's just pushing the problem down the line.
They concluded in the end that nobody actually sets it, or makes a decision ... it just coalesces as "something everyone knows" each year.
I seem to remember that British Summer Time was similarly not in legislation but declared as an order in council or somesuch. I remember a couple of years having a desk diary with a note at the begining saying something like "BST dates as marked are provisional as the Government have not published the dates yet". Even though everybody *knows* it's last-Sun-in-Oct and last-Sun-in-Mar. HMG still had to publish a notice declaring it, just like the Roman Calends.
"Advent is four weeks leading up to Christmas, not 25 days in December."
The traditional/religious definition maybe, the modern one no.
Whilst Christmas may have started as a religious festival it is now also a cultural festival for people of any religion and none. The same is true of some festivals in other religions.