228 karma · joined December 20, 2010
The infix application function (ma>>=\a->f(a)), commonly called bind, composes two computations. When the resulting computation is executed, ma is executed first, f is called with its result and finally the computation returned by f is executed.
The example of the article was simple of course. But solving the problem of printing Pythagorean triples was not the aim of the article. The aim was to show what makes lazy streams tick, to show that they can be implemented in C++ and that an uniform interface can be provided with functor, monoid and monad. Finally, the simple problem was solved with the new tool to show the inversion of control.
PS. std::vector is a stateful functor.
data Stage = Stage (File -> File) Directory
If we want to construct chains of Stages where we can still inspect any individual Stage, a monoidal composition wont cut it for the reason you stated. But this raises the question. What is the monoidal composition of Stages?Well first of all, we must do something about the parameter Directory because the second type parameter must be a monoid too (the transformation function all ready is). But lets assume that it is, and see what we get.
mconcat (Stage f dir1) (Stage g dir2) = Stage (g . f) (mconcat dir1 dir2)
mempty = Stage id (mempty :: Directory)
So so if we can create a new directory from two directories, we can compose two Stages to a new one that uses the newly created working directory. Or if the second parameter of Stage is a list of directories, the new Stage uses two working directories. They aren't the idea of chains that you had in mind, but they still sound useful, at least to me.I do agree with you on that any platform should have a staticly typed language as a first class citizen.
My current laptop has an UEFI implementation that only boots from a hardcoded path in the EFI partition. You guessed right, the path of the windows 8 bootloader.
The UEFI in my home server overwrites the UEFI boot manager list every time you save & exit the configuration tool.
If I remember correctly, the UEFI implementation of a MBP that my friend and I tried to make dual boot Ubuntu required a blessed HFS boot partition for every OS.
Of course running hurts if you are overweight. Your bones and tendons are not made to support that much weight and neither are your muscles if you have been neglecting them. Bodies get neglected, that's what happens to them when they get old. If you really love running like you said, then drop some weight and start running. Do, don't cry. Walk more. Use nordic walking poles. Swimming is an excellent low-impact sport and so is water running. Walking 20 minutes with decent pace burns around 500-600kcal for someone weighting 120kg. That's a half a can of Pringles. You need to be really careful with what you eat if you want to drop weight with just that.
The latest case of a police using a firearm here in Finland was when a man was walking in a populated pedestrian way carrying a knife and a pistol. He didn't comply with orders to lay down his weapons and was shot once, in the leg. One of the first questions in media was whether an electroshock weapon could have been used in stead. The use of a firearm in a populated area was also questioned. These sort of questions didn't seem to be asked in the articles from USA.
The OP's case was from the other end of the spectrum. He may have had the smell of beer in his breath and didn't comply with the order to leave the scene. The police tackled him done and handcuffed him. One explanation given is that the officer was on a power trip. But it also seems that the police was having difficulties in adjusting their use of force. They dragged away a man who was supporting an injured person. They tackled OP for not complying with an order to leave.
After reading those news articles my friends and I started think about the training that police officer receive in the USA. How much time is used to teach giving orders? How much time for hand-to-hand combat and controlling a person with or without a weapon? How much time is spent in the firing range?
(This certainty about Iran was actually news to me.)
Well, that is the catch. You don't need to know anything to reject something. But to argue against something, to have a discussion, requires you to know what you are arguing against. But things like Christianity and Nazism are poor examples. Christianity is not factual, it's personal and spiritual, unless you want to talk about theology. And about Nazism I know too much.
Now the problem with long branches and painful merges sounds like a communication problem between the master and the branch, just at the level of the code. We know that at the level of people timely and terse communication is key to a successful project. So the same would kinda make sense at the code level too.
There seems to be two arguments against laziness. Firstly, it makes reasoning about performance hard. Secondly, forcing strict evaluation is tricky, maybe harder than it would be to do optional lazy evaluation in a strict language.
I think we are on the same page about your last paragraph. You are right, you face a problem of a same kind that I wrote about when learning in a group. Someone seems to know the material well, they are confident and maybe even charismatic. They go through their solution and everyone just nods and agrees.
The trick is to get everyone tell their solution (maybe not for the same problem) and have an atmosphere where people feel comfortable correcting and getting corrected. That is a key responsibility of a small group teacher.
The "peril" in self-study is a bit different. You may find your enlightenment but how do you know that your mental model is correct?
I work as an assistant teacher every now and then and it is mostly small group teaching and going over the homework exercises. What I have seen is that the first couple of sessions are totally worthless subject wise. But they are extremely critical. During those sessions the students learn to know each other and me. When everyone is comfortable attending the sessions can the actually learning begin.
From this perspective I think MOOCs would need the following. Firstly, you need to create small enough groups of people that are comfortable discussing the subject with each other. Encouraging local study groups is a one way of doing this. The other thing is to encourage discussion through anonymity with forums or IRC. And you need to acknowledge that you don't reach all of your students with these methods and not rely on them too much.
> I personally like to learn in isolation, I have a tendency to quickly ~plagiarize ideas of others thinking I understand, so learning alone in my room is better.
There's nothing wrong with self-study per se, but it has a one great flaw. It is easy do the kind of plagiarization I think you are talking about without knowing. This can be remedied by getting feedback from an instructor, or going through the material with someone else and then cross checking how you understood the ideas.
The machine API also handles interaction and relations. The representation of a collection object will contain URLs of the elements. There should be hints on how to compose a request that updates the object.