~amavect/mkexercises

817b22f0bcf081cfd9230d087f29d5fabaaaf1cb — amavect 4 years ago
Import from https://bitbucket.org/amavect/mkexercises
A  => README +47 -0
@@ 1,47 @@
This is a collection of exercises to interactively learn the mk build automation tool.
Each example has:
 * a mkfile with comments that needs editing to work correctly
 * some example starting files
 * a solution file named mksolution to compare your solution with

I highly recommend reading the following before using these exercises.
I will be basing my exercises on them.
 * the mk man page
 * /sys/doc/mk.ps
 * /sys/doc/mkfiles.ps
Read them even if you won't fully understand them!
It will slowly make sense as your brain processes it.

mk also requires significant knowledge of rc and various utilities.
Be sure to look up the man pages of any utilities you don't recognize.

Basic exercises for learning rc:
basics/00 - Specifying Recipes
basics/01 - Intro to Dependencies
basics/02 - QUIZ: Targets, Recipes, and Dependencies
basics/03 - Environment Variables
basics/04 - Recipe Environment Variables
basics/05 - Virtual Targets
basics/06 - Style
basics/07 - QUIZ: Targeting Variables
basics/08 - Errors #0: Formatting and Newlines
basics/09 - Errors #1: Missing Recipes
basics/10 - Errors #2: Circular Dependencies
basics/11 - Errors #3: Backwards Dependencies
basics/12 - QUIZ: Fix the Errors
basics/13 - Includes and Variable Overrides
basics/14 - QUIZ: 
basics/15 - Review and Talk

Intermediate exercises for becoming an expert:
inter/00 - Meta-Rules
inter/01 - Attributes
inter/01 - Self-Dependent Targets

Advanced exercises for enjoyment and challenge:
adv/00

Are the examples not clear enough? Send your feedback!
Got to the end? Submit your own exercises and challenges!

Amavect

A  => basics/00/mkfile +36 -0
@@ 1,36 @@
# Quick thing, lines that start with a # are comments and are thus ignored.

# Welcome to mk!
# mk allows you to specify a target file and then how to make it.
# Here, I want to make a file named 'myfile', so I write like so:

myfile:
	echo 'I''m writing to a file!' >myfile

# If the user on the command line typed in 'mk myfile', it make it!
# It does this by executing the recipe in rc, the command line shell.
# The recipe can be anything, even multiple lines, as long as rc can interpret it.
# If the user typed in 'mk myfile' again, it would return the file is up to date
#  and doesn't need to be made again.
# Your turn! Specify a target file named 'myotherfile' and create it however you wish.



# If you type in 'mk myotherfile', mk will detect that myotherfile is out of date
#  and run the recipe you wrote to create it.

# You can also specify multiple files as the targets for the same recipe.

file1 file2 file3:
	echo 'my #1 file' >file1
	echo 'my #2 file' >file2
	echo 'my #3 file' >file3

# (Note that there is a better way to write this recipe using Environment Variables.)
# (More on that in a later exercise.)

# Your turn! Write a target and recipe for 'file4' 'file5' and 'file6'.



# Onto the next exercise!

A  => basics/00/mksolution +16 -0
@@ 1,16 @@
myfile:
	echo 'I''m writing to a file!' >myfile

myotherfile:
	touch myotherfile

file1 file2 file3:
	echo 'my #1 file' >file1
	echo 'my #2 file' >file2
	echo 'my #3 file' >file3

file4 file5 file6:
	echo 'foo' >file4
	echo 'bar' >>file4
	echo 'fizzbuzz' >file5
	echo 'hello world' >file6

A  => basics/01/mkfile +35 -0
@@ 1,35 @@
# mk is a build system, and in a build system, files depend on other files.
# It does this by taking the target's dependencies to construct a graph.
# Let's take an example.

meow: kitty
	cp kitty meow
	echo 'adding some text' >>meow

kitty:
	echo 'first line' >kitty

# Entering 'mk newfile' in the command shell will first generate 'original'.
# Then, 'original' will then be used to create the newfile.
# It is also possible to specify multiple dependencies, separated by spaces:

purr: kitty meow
	cat kitty meow >purr

# Your turn!
# Add a target named 'cats' that concatenates 'meow', 'kitty' and 'purr'.



# Run 'mk cats'

# Now, run 'mk cats' again. Why is 'cats' remade again?
# 'cats' and the dependent files were made so quickly that they have the
#  same time stamp. mk stays on the safe side and calls the targets out of date.
# The only fix to this is to have finer-grained time stamps.
# Calling 'mk cats' multiple times reaches a point that 'cats' isn't remade.
# It is good practice to create mkfiles that are:
# * time-independent - Don't depend on sub-second time to generate data.
# * deterministic - Do the same thing with the same files.

# Onto the next exercise!

A  => basics/01/mksolution +12 -0
@@ 1,12 @@
meow: kitty
	cp kitty meow
	echo 'adding some text' >>meow

kitty:
	echo 'first line' >kitty

purr: kitty meow
	cat kitty meow >purr

cats: purr kitty meow
	cat meow kitty purr >cats

A  => basics/02/legend +10 -0
@@ 1,10 @@
Did you ever hear the tragedy of Darth Plagueis the Wise?
I thought not.
It's not a story the Jedi would tell you.
It's a Sith legend. 
Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life... 
He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. 
The dark side of the Force is a pathway to many abilities some consider to be unnatural. 
He became so powerful... the only thing he was afraid of was losing his power, which eventually, of course, he did. 
Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. 
Ironic, he could save others from death, but not himself.

A  => basics/02/mkfile +10 -0
@@ 1,10 @@
# The training wheels are off!
# There are a couple existing files:
# legend - a file with a couple lines of text.
# song - a file with an unsorted list of words.
# Write a mkfile that generates the following files:
# sorted - take bar and sort it. Hint: use 'sort'
# double - concatenate legend with itself. Hint: use 'cat'
# complete - concatenate sorted and double. Print the resulting file.
# Finish the process by running 'mk complete'.
# Don't forgot to leave a blank newline at the end of the mkfile.

A  => basics/02/mksolution +9 -0
@@ 1,9 @@
sorted: song
	sort <song >sorted

double: legend
	cat legend legend >double

complete: sorted double
	cat sorted double >complete
	cat complete

A  => basics/02/song +30 -0
@@ 1,30 @@
J make
9 down
T you
1 gonna
G you
B gonna
Q lie
O tell
E and
F hurt
N gonna
6 gonna
C run
K you
M never
S hurt
7 let
H never
2 give
L cry
D around
R and
5 never
I gonna
P a
0 never
8 you
A never
4 up
3 you

A  => basics/03/mkfile +28 -0
@@ 1,28 @@
# Now we're getting into the nitty-gritty stuff.
# mk uses environment variables to change how it behaves.
# Environment variables are just text strings,
#  so they may be parsed in different ways.
# They are defined using =

PLANET=captain
POWERS=earth water wind fire heart


# It's tradition to have your variables be in all caps.
# Variables can be used as targets, dependencies, and in recipes.

$POWERS:
	touch $POWERS

$PLANET: $POWERS
	cat $POWERS >$PLANET

# Now, it's easy to rename and add files to be processed with the same recipe:
# Just change the variables!
# Your turn!
# Add an environment variable named 'GOPLANET' and assign whatever you want to it!
# Then, add a target that uses it, whatever you want it to depend on.



# Onto the next exercise!

A  => basics/03/mksolution +12 -0
@@ 1,12 @@
PLANET=captain
POWERS=earth water wind fire heart
GOPLANET=BYYOURPOWERSCOMBINEDIAMCAPTAINPLANET

$POWERS:
	touch $POWERS

$PLANET: $POWERS
	cat $POWERS >$PLANET

$GOPLANET:
	echo 'he''s a hero!' >$GOPLANET

A  => basics/04/mkfile +29 -0
@@ 1,29 @@
# You can define environment variables in mk, but mk defines some as well.
# The man page for mk has all of them listed.
# The most important of them are $target, $prereq, and $stem.

# $target is the target. If the rule had multiple targets, it will be
#  all of the new targets that need to be remade.
# $prereq is all of the prerequisites.
# $stem will be explained later in meta-rules.

# Let's bring back exercise 01 about cats.

# Your turn!
# I've replaced the first rule's recipe with $target and $prereq
# You do the rest.

meow: kitty
	cp $prereq $target
	echo 'adding some text' >>$target

kitty:
	echo 'first line' >kitty

purr: kitty meow
	cat kitty meow >purr

cats: purr kitty meow
	cat meow kitty purr >cats

# Onto the next exercise!

A  => basics/04/mksolution +12 -0
@@ 1,12 @@
meow: kitty
	cp $prereq $target
	echo 'adding some text' >>$target

kitty:
	echo 'first line' >$target

purr: kitty meow
	cat $prereq >$target

cats: purr kitty meow
	cat $prereq >$target

A  => basics/05/mkfile +17 -0
@@ 1,17 @@
# mk rules have to create a file with the same name as the target.
# What if you don't want to create a file with the target name?
# Virtual rules allow for convenience and convention with target names.
# Since virtuals aren't real files with a timestamp, they are always out of date.
# The dependencies are calculated as usual, but the recipe is always run.

default:V:
	echo 'If you execute mk without any target, this rule executes.'
	echo 'mk chooses the first rule as the default target, whatever the name.'

# Your turn!
# Add whatever virtual rules you want. Make them print, make them create files.
# Have one virtual rule that depends on a virtual target.
# Have another virtual rule that depends on a real target.


# Onto the next exercise!

A  => basics/05/mksolution +12 -0
@@ 1,12 @@
default:V:
	echo 'If you execute mk without any target, this rule executes.'
	echo 'mk chooses the first rule as the default target, whatever the name.'

fake:V:
	echo 'REAL FAKE TARGETS'

real:
	echo 'really real targets' >real

combo:V: real fake default
	echo 'Real and virtual targets are getting complex...'

A  => basics/06/mkfile +21 -0
@@ 1,21 @@
# Style is important for readability and organization.
# The basic style is organized as follows:
# * Environment variables
# * Virtual targets
# * Real targets

# Your turn!
# Add 2 environment variables named 'INGREDIENTS' and 'DRESSING'.
# Add a default virtual rule that depends 'salad'.
# Add a rule targeting 'salad' that depends on $INGREDIENTS and $DRESSING.
# Have the recipe concatenate the prerequisites together.
# Add a rule that targets $INGREDIENTS.
# Add a rule that targets $DRESSING.
# Remember to use $target and $prereq where appropriate.
# Remember to actually create the files of non-virtual rules.
# run 'mk' to see the results!



# Check your solution with the mksolution to see if your style is right.
# Onto the next exercise!

A  => basics/06/mksolution +15 -0
@@ 1,15 @@
INGREDIENTS=lettuce carrots spinach 
DRESSING=ranch italian thousand-island

default:V: salad

$DRESSING:
	for(i in $target)
		echo $i >$i

$INGREDIENTS:
	for(i in $target)
		echo $i >$i

salad: $DRESSING $INGREDIENTS
	cat $prereq >salad

A  => basics/07/ken +40 -0
@@ 1,40 @@
A well installed microcode bug will be almost impossible to detect.
I am a programmer.
I am a very bottom-up thinker.
I think the major good idea in Unix was its clean and simple interface: open, close, read, and write.
I wanted to avoid, special IO for terminals.
I wanted to have virtual memory, at least as it's coupled with file systems.
I wanted to separate data from programs, because data and instructions are very different.
If you want to go somewhere, goto is the best way to get there.
In college, before video games, we would amuse ourselves by posing programming exercises.
It's always good to take an orthogonal view of something. It develops ideas.
No amount of source-level verification or scrutiny will protect you from using untrusted code.
One of my most productive days was throwing away 1000 lines of code.
That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty.
The X server has to be the biggest program I've ever seen that doesn't do anything for you.
There are no projects per se in the Computing Sciences Research Center.
There's a lot of power in executing data - generating data and executing data.
We have persistant objects, they're called files.
We tried to avoid, you know, records.
When in doubt, use brute force.
You can't trust code that you did not totally create yourself.
If you give me the right kind of Tinker Toys, I can imagine the building.
When I see a top-down description of a system or language that has infinite libraries described by layers and layers, all I just see is a morass.
I can't understand something presented to me that's very complex.
Maybe I do what I do because if I built anything more complicated, I couldn't understand it.
What is or is not implemented in the kernel represents both a great responsibility and a great power
Throughout, simplicity has been substituted for efficiency.
Complex algorithms are used only if their complexity can be localized.
My experience and some of my friends' experience is that Linux is quite unreliable.
Microsoft is really unreliable but Linux is worse.
I'd spell creat with an e.
who cares.
lgtm
I'm a mere hundred pages of code from serving Datakit.
I know nothing.
Maybe I should have screwed up.
There's going to be no serious problem after this.
Multics is a powerful teaching tool.
I just hate to be pushed around by some @#$%^& machine.
So, if you put a G on the front you have to put a zero on the back?
No.

A  => basics/07/mkfile +9 -0
@@ 1,9 @@
# Training wheels are off!
# 'rob' contains quotes by Rob Pike.
# 'ken' contains quotes by Ken Thompson.
# 'rsc' contains quotes by Russ Cox.
# Run a spellchecker on rob and ken. Hint: use spell
# Compare the lines between the spellchecks. Hint: use comm -12
# Print the comparison. For rob and ken, there should be none.
# Have it such that running 'mk' does all of this.
# Replace 'ken' with 'rsc'. There should be common words now.

A  => basics/07/mksolution +22 -0
@@ 1,22 @@
F1=rob
F2=ken
#F2=rsc

default:V: compare
	echo 'The common words not in the dictionary are:'
	cat compare

$F1.spell: $F1
	spell $prereq >$target

$F2.spell: $F2
	spell $prereq >$target

# Meta-rules can combine the recipes for $F1.spell and $F2.spell.
# However, this has not been presented yet.
# %.spell: %
# 	spell $prereq >$target


compare: $F1.spell $F2.spell
	comm -12 $prereq >compare

A  => basics/07/rob +398 -0
@@ 1,398 @@
all right all right all right!
so much for good intentions.
not quite...
It's easy to make serious mistakes in that situation.
I agree with some of the others here that the solution probably lies in external contributions from wise members of the community.
It's still a race.
Ditto.
A program exits when main exits.
That's just an error I will fix.
You could just drop the adjective.
I recommend that you fix your code now and be ready for the next release.
No.
I accept the argument about regularity but not the one about utility.
Every acme user around here uses the plan9port version.
There is no general solution but we are aware of the desire.
I'm not sure how that helps.
It's clumsy, I know, although it could be (and will one day be) done a little better.
I don't know what that means.
But what are you really trying to do?
I thought of a few ways but I refuse to write them down for fear people will use them.
It may be that another approach altogether is better.
Your assurances are incorrect.
When I look at your code I see a lot of unnecessary repetition.
Exactly.
Yes.
Poor choice. You went wrong at step 1.
Interesting idea, though.
if crypticness is the complaint, remember you're talking about a C compiler.
Thought I'd post this to a DOOM group.
There are no plans for a new release of Plan 9.
there are no pastel paints in the dungeons and dragons world
it's fitting that my first tweet had a typo.
There's nothing in computing that can't be broken by another level of indirection.
It's all happening.
I prefer deskside computers over laptops because they're much harder to throw in frustration when dealing with incompetent web sites.
I hear that C++0x is a substantially upgraded language.
People get annoyed when they must write two lines of code instead of one, but I don't. It's called programming.
localization (n.): the property that a program runs globally.
Fixes welcome.
The first lines of source code were added to Go in 1972. 
You can all relax.
It's not my Mac Air's fault that the web is too damn slow.
This discussion isn't pin-headed enough yet.
The name Brazil was chosen because we wanted terminals with Fresnel lenses on goosenecks like the ones in the movie.
I don't see what the fuss is about.
when i was on sabbatical the university installed linux on the PC on my desk.
Apologies for the inconvenience.
Thanks.
Legal terminology is not the best medium for subtlety, so I've asked our lawyers for clarification.
Give us your address and we'll send Ken out to fix it.  That's our technique.
This won't work.
Weekends are quiet, good for updating big software packages.
Web access is very important.  Web browsers are very useful.  But if you stop there, you're missing a lot of opportunity.
I'll send a fix in a while.
Plan 9 is non-standard and proud of it.
Perhaps I should explain better.
Here's a short version: Avoid complexity.
Why not?
Mea culpa.
Sorry, guys, but it's not quite a pure PC world, at least not yet.
True again.
This fixes your example, anyway.
Ptys were old and obsolete the day they were invented.
Kick back, relax.  It's the information age.
Speaking as the portraitist, I believe I captured the personality rather well.
That's a little simplistic.
You don't have a user program running when you're trying to boot the kernel.
The last pieces of this design space have not been explored.
Feel free to delete it.
It's surprising what's surprising.
You should delete some mail.
Algorithms everywhere, and not a byte to send.
This is idiocy.
Yes, precisely.
Difficult administration results in incorrect or inadequate installation.
Use something distinctive.
It's easy if you have the spec.
Of course it does.
I've been thinking of sending this information to 9fans for a while.
I'm a little disturbed by these questions.
This question has been answered.
No, there is no solution.
Other systems claim to have solutions but they are exaggerating.
I was trying to tell you the way to do it.
Awful.
Not exactly.
In this context, I don't feel it's ambiguous.
By tradition, the return value of functions report what they did, not what they considered doing.
Sigh.
Whoops...  Incomplete instructions.
I would like to understand this.
I would think mouse chords would be singularly ineffective on the Mac.
Anyone willing to help?
Don't be stupid.
Unnecessary, anyway.
Actually I mistyped.
If it's just between you and your server, go for it.
I'd really like someone to clean the mess up (hint, hint).
Hell has nothing to do with it.
False.
I think you misrepresent the purpose of security.  Its role is to prevent us getting work done.
So the rule of security is the following:  if you are able to work on something other than security, your system is insecure.
Those days [of "one tool doing one job well"] are dead and gone and the eulogy was delivered by Perl.
I'll alert the media.
Unix never says `please.'
The secretaries don't understand me.
Sometimes when you fill a vacuum, it still sucks.
If you think awk is the perfect programming language for the problem, you don't understand the problem yet.
There's no such thing as a simple cache bug.
A great deal of agonizing and very little decisiveness went into resolving this issue
Caches aren't architecture, they're just optimization.
People admire complexity.
Bite my shiny metal ass.
iOS4.3 lets you decide whether the side switch is mute or rotate lock. Operating system innovations never cease.
If you can't do something right, sometimes it's not worth doing at all.
Once idea that comes to mind is to show us a reproducible example.
The API has indeed changed.
I suppose the documentation should mention this.
I'm a radical here, but I think if a machine is paging, you've lost.
So again, why?
I guess I'm dim.
In the good old days, copyright notices meant something.
ouch
It doesn't matter what the bug is, someone will depend on it.
We're still working on it.
Write less code.
Would a Plan 9 user please provide an accurate status report of the state of the Go port to the system?
I wasn't asking about 9front.
Your "why bother?" question is a good one.
Your question is answered by the FAQ entry.
Hip hip hooray.
Go gets mocked a lot.
I am done here.
What's jQuery?
It's possible but not by writing a single line of code.
Your "mathematically more correct" claim sounds fishy.
This statement demonstrates a profound misunderstanding.
I guess that wasn't very helpful.
The proposed fix is perhaps not the best one.
It's only an issue on mailing lists and discussion groups.
Let me put in a word about the Apple wireless trackpad.
Nothing.
Using Unix is the computing equivalent of listening only to music by David Cassidy.
I assume that the reader is familiar with the UNIX tools.
You missed a spot.
This is Go.
I didn't violate anything.  I made a suggestion.
At least in Go the behavior is well defined.
What is the average length of time the phrase"Time remaining: Less than a minute" lingers on an Apple screen?
acme is unobtainable at the moment.
I don't understand what your issue is.
It's so trivial it could be a few lines of shell script, unless I'm missing something.
There is no such feature.
Go is not C.
I don't understand the bug report.
The Go 1 compatibility promise holds us back.
No. The "No" in "no changes" means no.
Be very careful.
You almost never need xargs.
Actually I was hoping to stop at least my end of the dialog.
I like to think of a function as a function. But that's just me.
Ummm, don't do that?
I say not now.
I don't understand what you're saying here as a response to what I said.
I defer to the experts.
It's really not clear what the right long-term solution is.
Why do by hand what a machine can do just as well or better?
please don't ask; we're working on it
I don't understand why you keep beating on this.
It's nice to be in a position where people apologize because they assume there's humor in your work, based on past experience, but they're not sure where it is.
all sounds fine to me.
Oh man, do I miss my red Swiss mouse.
Of course, this may change.
The real answer lies in further research.
please don't e-mail us.
I just live with unaligned comments.
Why should I?
I sense a conspiracy.
I leave it to you to find a way to correct the problem.
We'll never agree.
I suggest a different compromise: you do whatever you want, we ignore you. Deal?
Read the manuals.
I disagree.
My toaster runs KRONOS.
Why did Peter Weiner register plan9.com?
Thank you for adding support to my position.  I really appreciate it.
The only document that claims Plan 9 runs in 4 megabytes is the FAQ on our home page.
We are using other techniques now.
What's wrong with forking processes?
I know what versioning is, it's "vendoring" that I don't recognize as a term.
Let's leave it at that.
This conversation has run its course.
Remember, the language is not the point here, it's the implementation.
Nothing is worth spending a week with bureaucratic Germans.
Caches are bugs waiting to happen.
The hermeneutics of naming yields few insights.
What difference does it make whether it's an "object-oriented language"?
Why not just use a URL shortener?
Remember this?
three programmers go into a bar. the sam user is there because he's finished the day's work and wants to relax. the vi user is there because he's going to be working all night and needs a break. the emacs user is there because there's nothing else he can do: both his hands are in splints because of carpal tunnel syndrome.
Oh yeah, great: eye tracking and mind reading.
Certainly not.
It's a terrible idea.
First, check your errors.
I second that!
Ha ha.
Let the machine do the work.
I'm not going back in there.
Advertisers.
I'm not used to success.
Not needed.
2106 is a long time from now.
Why does this matter?
Does anyone know of a version of sam for Windows that will run on 64-bit installations?
Great, thanks.
I used to be a physicist.
Please file an issue at golang.org/issue/new
There is no simple definition for what people want.
One man's toy is another's real system, and every tool adds to the arsenal.
There is no problem in computer science that cannot be solved by another JSON configuration file.
Anything important enough to be in a dot-file is important enough not to be in a dot-file.
Again, please read the blog post I cited.
Experiment!
Live and learn.
Something else may happen one day.
I don't know what the right answer is.
If it's not worth doing well, it's not worth doing at all.
Manual is wrong.
The Plan 9 FAQ needs work.
In another 24 years, programmers will learn how to use malloc.
Use a tool.
Please define 'trouble'.
I just noticed that Glenda, the Plan 9 bunny, has a body the same shape as Tor Johnson's head.
I must admit I find the fissiparous nature of the Open Source/FSF community a little dispiriting.
Thanks for saying that.
Is this a bug fix?
I disagree with the premise.
I speak from experience here.
It's not how many features that matter, it's how the features interact.
Just write the code.
Looks like a bug.
And now we have diverged so far from the original question that we can safely ignore it.
I oversold due to fading memory. But I stand by the fundamental point.
Although there may be specific examples where generated output is uninteresting, deciding whether to read code based entirely on whether a computer or a human wrote it doesn't seem a good general principle to me.
Short answer: No.
None of that is excusable, only true.
File an issue?
The documentation is clearly insufficient.
You don't say anything about the problem beyond "it doesn't work".
Can you be a little more specific please?
Working as intended.
That's a shame.
Nothing has changed.
Correct as written. Maybe badly written, but correct.
Does it make a difference?
One more thing.
That's odd.
Nothing in Go is accidental.
Go was supposed to be a fresh start.
Ken and I ported Plan 9 to the SPARC in 6 days over one fun Christmas break.
I told the truth as I saw it.
Wait, teletypes are finally gone so we need *pseudo* teletypes?
I started complaining about this long ago and nobody cared then, either.
It is very unlikely to change.
Don't do that.
This is just me speaking, not the Go team.
Go doesn't have it.
Even the simplest changes can be disruptive.
Feels like the wrong solution to me.
Copying source just leads to confusion.
More discussion is required.
What are you really trying to do?
I wrote a book about this once; I recommend it.
I just thought it would be nice.
My recent incompetence is humbling.  I should quit the industry.
Three cheers for dropping things that are too complex.
Great.
This is one special case.
This slippery slope is long and steep. I'd prefer not to take the first step.
All that aside, the rule works very well in practice.
dot dot dot
Sounds nice.
Yes.
It is legal.
At MIT the server is the unit of invention.
Nothing is wrong here.
Да!
Noted.
нет.
THIS OPUS LACKS PERSPICACITY
THIS INCHOATE EMISSION DOES NOT ADUMBRATE CONSUMMATION
OK I'll stop now.
Russ is prepping some words about what's happening.
I will fix.
Feature requests will be ignored.
I would call that a bug.
Feel free to file an issue.
I really dislike knobs in APIs.
???
What's wrong with the obvious?
I am dyspeptic.
I do not.
The Yacc grammar was translated by sam-powered hands.
Turning off comments.
This is unfortunate.
NaN is unfortunate.
No we can't.
go away
You misinterpreted my suggestion.
Not a great situation, I admit.
I do not understand your criticism.
If you want to do the work, I will review the results.
Now, this is one of the things where the guy who blogged about me being a world-class jackass missed the point.
Please drop this.
Maybe yes, maybe no.
Please be respectful in this forum.
It sounds reasonable and should be easy enough to implement.
There is a widespread assumption that garbage collection and kernels cannot coexist but history shows a number of examples that demonstrate otherwise.
Speaking as a one-time kernel writer, I would have loved to have garbage collection available inside the kernel. Hell, half the code in the kernel is tied to memory management.
Thanks for the report.
It takes precautions but there are no guarantees.
What is the problem you are trying to solve?
Please be civil.
I think this would be a mistake.
Go's interfaces were designed to solve particular problems.
Go is not the product of a Whiggish development process.
complexity is multiplicative
i always intended to fix the problem; i never saw how.
apologies.
The choice cannot be explained, only understood.
Indeed.
i see no bug here.
I support the idea of unrecorded talks.
We do not accept patches
Syntax highlighting is juvenile.
Working as designed.
I've written programs with twenty implementations of io.Reader inside.
Who cares? Shut up.
What is wrong with my analysis?
I just want to explain something.
I recommend in the strongest terms that you don't do this.
Sockets are the X windows of IO interfaces.
Ignore what I wrote.
In other words, here's how to do it but don't do it.
I did indeed.
I don't understand what you mean by 'reset'.
I am, and as far as I can tell it makes no difference whatsoever.
Please put this silly objection to rest. It has no merit.
Interpretations will vary.
I think the pattern used well is perfectly acceptable in certain situations.
Like everything that attracts scrutiny, the key point is to use the idea well: safely, clearly, correctly, and only when appropriate.
I am not trying to be difficult, but you must understand it's not simple to address your question.
One step at a time.
Thanks for grinding through those.
Hardware has stopped getting faster. Software has not stopped getting slower.
Ah, right.
I disagree.
There is little meaningful difference between bad style and bad practice.
It's come up before.
Ah, nice. the woodpeckers are back.
I recently got the idiotically named but otherwise very well designed, quiet, and comfortable Apple Magic Keyboard.
It sounds like a mistake to me.
What a lovely vacuous platitude.
That is unhelpful.
Reports of the death of Research are greatly exaggerated.
There are already courses being taught in `feminist science' and the trend is sure to continue.
Not quite.
Please file an issue.
I'm not convinced there is a "why" other than "that's what happens".
Working as intended.
Awwww. Sniff.
The operation is not to copy but to snarf. It's called snarf because snarf is what it does. There is no design document.
Automatically deciding what's important in a program's dependencies is not easy.
Thanks
Yes, one could, and that would be a stylistic decision.
Best not to promote the bad idea.
Nil means nothing.
People often spend too much time worrying about the things that don't matter.
Often the reason something was done is more important than what was done.
I believe this is not a Go issue.
Are you running Xcode 8.3?
I don't think so.
Yup.
Code comments can be helpful with unusual situations like this.
The key word is simple.
If I could, I would disallow it altogether.
I completely disagree.
I say leave it alone.
I wasn't speaking metaphorically.
A nil map is like a regular map but it has nothing in it, cannot grow, and takes zero space.
We live in a digital dark age.
Neither of your issues is a problem.
Your ideas may make people happy, which is not a small thing, but do they really help?
What's this? https://plan9.io/
Consistency is a better explanation.
Code can move.
You might find blog.golang.org/constants helpful.
Over time, everything gets better but also worse and always bigger and more complex.

A  => basics/07/rsc +247 -0
@@ 1,247 @@
This has always annoyed me.
If you tell me what the code should be I'll fix it.
I don't really understand what the problem is.
It was a failure of vision.
My apologies.
If you want to build your own, you've got all the pieces. :)
It's your call.
enjoy.
Yes, with a caveat.
No.
What were you doing when it crashed?
IBM wasn't thinking much about the future when they set up the VGA registers.
Thanks for the fix.
vga is a very hard problem.
I don't agree about the x86.
Hmm.  Not exactly what I had in mind.
We haven't been making the common distinction between stable and "unstable" versions of the software.
Put things in the right place to begin with.
in my mind wheel mice don't count.
i've been hoarding real three-button mice for a while now; the end is near.
I wrote a simple client long ago that I could dig up.
please, do us all a favor and write a better one.
i've tried mothra and charon, and neither satisfies me.
That's fine for now.
Have fun.
eww.
This is getting more off topic by the day.
It is possible to write very clear code that really doesn't need comments nor "literate" interpretation.
it looks like an error from hotmail, not from plan 9.
we're stuck with ssh, but let's not delude ourselves into thinking it's a good protocol.
Aha.
I might not understand the question.
Sorry about not being more specific.
Actually that's the way it's supposed to work.
that was me.
if you're going to do something about it, great.
I think.
Some extra work is required.
that's a bigger job than you might think.
We can fix the code, probably.
This is misleading.
it took me just as long to install the windows software as it did to write the plan 9 software.
All things being equal, maybe I'd like there to be more Plan 9 users.
Sorry, I don't think there's much we can do.
The bikeshed has already been painted, and the painter has gone.
Being stuck using Solaris makes being stuck using Linux look like a birthday party.
also, plan9front claims to include a working go compiler. what did they do?
I don't think we'd scale to a thousand nodes very well.
Buh?
Feature lists are great, but don't forget that there's always an implementation cost.
Sorry, no luck.
Now, now, be fair.
I wish...
We tried that.
Dude, wake up!
Looks like a bug to me.
You think Windows runs in polynomial time?
Also, backups are good.
if you want something in particular, you could always port it.
Suppose you subscribe to the Kernighan & Plauger thesis that programs should be clear.
NOT LGTM
Even if we'd made a horrible mistake, though, we cannot change it now as that would break the compatibility promise we have made with Go 1.
Your source is mistaken.
This sounds like an intriguing and fun way to structure a program.
Chording works too: or example, copy is hold down mouse button, highlight, type option, type command, let go of mouse button.
Very nice.
looks fine.
Thanks, but I'd prefer not to do this.
Interesting, thanks.
Ouch
Please don't.
Test?
sure
NOT LGTM sorry
i lost the ability to use rio a few years ago when they moved wireless configuration into the gnome window manager, making it impossible to have rio and a network connection at the same time.
I think we all just use Chrome or Firefox or whatever.
I think we're done here.
I think you have to drag it into the Applications folder.
I ran Plan 9 from Bell Labs as my day to day work environment until around 2002.
Let's focus on what's there.
If the Plan 9 group had had its way, Plan 9 would have been released for free under a trivial MIT-like license (the one used for other pieces of code, like the one true awk) in 2003 instead of creating the Lucent Public License. Or in 2000 instead of creating the "Plan 9 License". Or in 1995 instead of as a $350 book+CD that came with a license for use by an entire "organization". Or in 1992 instead of being a limited academic release.
Code freeze on March 1 does not mean "break everything the day before March 1".
Godoc is a relatively small program. It is built from 102 packages built from 582 source files.
does anyone understand why the dragonfly builder times out connecting to localhost during run.bash?
We've entered the feature freeze.
We're far from stable right now.
it would be nice to be able to try the plan 9 go port without a plan 9 system.
is anyone willing to put together a plan 9 qemu image with mercurial set up and a go tree checked out and ready to build?
okay.
sounds worth trying
I'd like to keep the discussion here about Windows 2000 support in general and not about the technical details of this specific problem.
But that is just a guess.
RFC 3339 is very clear about this.
Thanks.
It is just not worth the effort.
Hello there.  Has anyone written a vt100 emulator for Plan9?  Thanks.
Much better to spend time reading and learning from the code than blogging about what's wrong with the local variable names.
I would prefer to arrange that the output is useful.
Nice.
No one googles local variable names.
This is not a step forward.
the opposite of brevity is length, not clarity.
Impressive.
Great.
Does this happen to anyone else?
has anyone written an smb client for plan 9?
has anyone written a mac hfs file system srv?
has anyone added midi support to devaudio?
Comments, suggestions welcome.
never mind then.
Great bug, thanks.
I replied on golang-nuts.
There is no issue here.
I'm not sure if this distinction is a valid one.
I'd rather not.
Oops.
Not that I have any real definitive answer, but I can hazard a guess...
That makes sense.
I don't remember seeing that happen ever before.
i don't look at build failures at all anymore because they are all false positives.
Grumble grumble.
I don't remember the last time I saw a sam-fans message.
I'll fix it.
working as intended; please don't file an issue.
sure
I would love it if someone would create a well-tested emacs Go module.
Honestly it sounds like you have not written any Go programs.
I'm not convinced this needs to be in the standard library.
I haven't thought about it yet.
Don't do that.
Don't overthink this.
I don't know what you are arguing for or against.
We understand your point of view.
Thanks for letting us know.
It happened.
i do not want to support a linux/amd64p32 port right now.
No. I've answered this before.
If this isn't solved soon I think we should turn off commit access for everyone.
Very small changes can still contain very large bugs.
I don't intend to try to fix rc.
That's fine.
This is a serious mistake.
I am going to be away for the rest of the week.
At the risk of sounding pedantic, package url is not an http server.
don't worry about it.
You can't make everything faster all the time.
Thanks.
Please just wait.
I haven't logged into a real Plan 9 system in many years
I did not promise it was going to happen.
Please don't.
no.
I just did
The docs are incorrect.
Where you see a hack I see an elegant design.
For now you just have to fight the temptation.
Just for comparison, godoc is 16 MB on my laptop.
In general, for me, the answer to whether there is a problem depends on how complex the solutions are.
what's going on with freebsd-386, plan9-386, and plan9-amd64?
All our arm builders seem to have disappeared.
Please stop.
what's going on with freebsd-386, plan9-386, and plan9-amd64?
All our arm builders seem to have disappeared.
Please stop.
Yes, it is intentional.
No, please do NOT do this.
Why does http://build.golang.org/perf say 'Error: no commits'?
You're designing a tool. Stop.
Let's start with a wiki page.
This is almost certainly noise.
It's done; move on.
Thanks but no thanks.
I filed the bug that change fixed.
I will fix this.
It sounds reasonable to me.
Thanks for your patience.
LGTM (not actually looking carefully)
I'd like to disable more than just the test.
swtch.com is in the process of moving to the cloud.
Yes, there have been many ad-hoc solutions.
Sure.
That's fun.
I want to echo what Rob said.
It's just a mistake.
Yes, absolutely. I agree with you 100%.
This scenario is definitely confusing.
It's 2015. Why do terminal programs interpret 1970s escape codes instead of html? You'd think by now 'echo <b>bold</b>' would work.
What happened to build.golang.org?
I think I'm missing something.
The outline below is my attempt at a skeleton for a streamlined version of the proposal proposal.
I'm not trying to write the last word.
I'm sorry, but I disagree.
Nice debugging.
I'm sorry but I don't exactly understand.
Do you have evidence that this is important and that your change would help?
We're still struggling with this. My apologies.
All the CLs are reviewed, right?
Let's move on.
Sorry, but it's too late.
If I had more free time I would port C++ and Java to Plan 9 just to annoy you.
Honestly, it looks like a compiler bug.
I do understand that many people are confused.
Let's write tutorials and improve diagnostics.
Thank you for writing a 3rd party tool.
It's true that there are no plans yet, but I think it's also true that we need to start planning.
Yes, that's confusing.
Please do not spend time on this.
Maybe this is true, but I haven't seen it.
The fundamental design question here is whether the benefit outweighs the complexity being added.
Enough with the religion. Please.
It should just work.
Sorry for not replying earlier. I don't really know.
Great.
This seems OK.
Let's take our time and do it right (whatever that is).
Really we're just behind on triaging bugs.
I'll dig the code up and post it somewhere. I never made it truly usable.
Will follow up off list.
Wait a second.
I think it's always been this way.
I would wait until there's a more established pattern of a problem before introducing additional mechanisms.
How easily can you write a test?
We broke the rule, and we shouldn't have. Our bad.
ML is indeed a fantastic language for writing compilers.
We can't keep the code running indefinitely.
Have you filed a bug about this?
Thanks for letting us know.
Why?
I'm sorry you are insulted and distressed by this.
+golang-nuts bcc golang-dev
This looks pretty O(N^2) to me
If you want to discuss that proposal, please do it on the Reddit post, not here.
You said you were going to write some benchmarks.
Is anyone else having a hard time getting through all.bash on Sierra?
Please don't.
You are speaking like a compiler author instead of a user.
Just make sure to use an identifying User-Agent line when you make requests from your back end.
I don't want ordinary users to be making choices about "how much debug info is enough".
Thanks for letting us know.
This doesn't seem worthwhile.
It only works when we're in the process of preparing a release.
Yes, and we need to fix that.
Sorry, but no.
It's been two hours since that fix landed.
I needed that last week.
I have a new blog post you might be interested in.
Ever since I wrote “go get,” we on the core Go team hoped the community would take care of dependency management.