Added some content.

This commit is contained in:
Niels Serup 2011-07-27 02:44:23 +02:00
parent 23038784d4
commit aae339084f
14 changed files with 265 additions and 30 deletions

View File

@ -23,7 +23,7 @@ def list_pages(pathdir):
for p, f in fs[::-1]: for p, f in fs[::-1]:
a = htmlgen.org_to_abstract(p, isfile=True, only_metadata=True) a = htmlgen.org_to_abstract(p, isfile=True, only_metadata=True)
dl.add_item(htmlfunc.link(f[:-4], a.title), a.summary if a.summary dl.add_item(htmlfunc.link(f[:-4], a.title), a.summary if a.summary
else 'No summary.') else None) #'No summary.')
return dl.generate_html() return dl.generate_html()
def titlelink(path, pathdir=None): def titlelink(path, pathdir=None):

Binary file not shown.

View File

@ -38,7 +38,7 @@ set_min_height = function() {
h = metadiv.offsetHeight + 15; h = metadiv.offsetHeight + 15;
metadiv.style.position = 'absolute'; metadiv.style.position = 'absolute';
metadiv.style.bottom = '5px'; metadiv.style.bottom = '5px';
metadiv.style.width = (contentdiv.offsetWidth - 22) + 'px'; metadiv.style.width = (contentdiv.offsetWidth - 42) + 'px';
contentdiv.style.paddingBottom = h + 'px'; contentdiv.style.paddingBottom = h + 'px';
h = wh - h - menudiv.offsetHeight - 145; h = wh - h - menudiv.offsetHeight - 145;

View File

@ -11,7 +11,7 @@ page_bg = '#e8efef'
body { body {
/*@preval 'background-color: ' + page_bg + ';\n'@*/ /*@preval 'background-color: ' + page_bg + ';\n'@*/
font-family: 'Dejavu Sans', 'Nimbus Sans', Helvetica, Arial, Verdana, sans-serif; font-family: 'Dejavu Sans', 'Nimbus Sans', Helvetica, Arial, Verdana, sans-serif;
font-size: 12px; font-size: 14px;
color: #000; color: #000;
} }
@ -65,9 +65,9 @@ ul#menulinks {
} }
#content { #content {
width: 720px; width: 700px;
margin: 0 auto; margin: 0 auto;
padding: 5px; padding: 15px;
background-color: #e9e9e9; background-color: #e9e9e9;
border-color: #ddd; border-color: #ddd;
border-style: solid; border-style: solid;
@ -91,7 +91,7 @@ ul#menulinks {
} }
#metadata { #metadata {
margin-top: 10px; margin: 10px 0;
border-style: dashed; border-style: dashed;
border-color: #ccc; border-color: #ccc;
border-width: 4px 0 0 0; border-width: 4px 0 0 0;
@ -177,7 +177,7 @@ h1, h2, h3, h4, h5, h6 {
h1 { h1 {
margin: 16px 0 5px 0; margin: 16px 0 5px 0;
font-size: 26px; font-size: 30px;
} }
h1:first-child { h1:first-child {
@ -186,29 +186,29 @@ h1:first-child {
h2 { h2 {
margin: 14px 0 5px 0 ; margin: 14px 0 5px 0 ;
font-size: 22px; font-size: 25px;
} }
h3 { h3 {
margin: 9px 0 3px 0; margin: 9px 0 3px 0;
font-size: 19px; font-size: 21px;
} }
h4 { h4 {
margin: 7px 0 2px 0; margin: 7px 0 2px 0;
font-size: 16px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
h5 { h5 {
margin-top: 5px 0 1px 0; margin-top: 5px 0 1px 0;
font-size: 14px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
h6 { h6 {
margin: 3px 0 1px 0; margin: 3px 0 1px 0;
font-size: 12px; font-size: 14px;
font-weight: bold; font-weight: bold;
} }
@ -217,21 +217,33 @@ h6 {
p { p {
text-align: justify; text-align: justify;
margin-bottom: 5px; margin-bottom: 10px;
} }
div.caption { div.caption {
clear: both; clear: both;
margin: 5px; margin: 10px;
} }
caption, div.caption > p { caption, div.caption > p {
background-color: #ddd; background-color: #ddd;
padding: 3px; padding: 3px;
border: 1px dotted #ccc; text-align: center;
font-style: italic; font-style: italic;
} }
div.caption.center-float img {
margin: 0 auto;
}
div.caption.center-float {
text-align: center;
}
div.caption.center-float p {
display: inline-block;
}
tt, code, samp, pre, var { tt, code, samp, pre, var {
font-family: Inconsolata, 'Dejavu Sans Mono', monospace; font-family: Inconsolata, 'Dejavu Sans Mono', monospace;
} }
@ -247,7 +259,7 @@ cite, quote {
blockquote { blockquote {
margin: 0 0 5px 20px; margin: 0 0 5px 20px;
font-size: 14px; font-size: 15px;
} }
acronym, abbreviation { acronym, abbreviation {
@ -423,6 +435,27 @@ td, th {
} }
/* Code highlighting */
.highlight {
padding: 2px 4px;
}
.highlighttable {
margin-bottom: 10px;
}
.highlighttable, .highlighttable .code {
border-width: 0;
}
.linenos {
border-width: 0 1px 0 0;
border-style: solid;
border-size: black;
}
/* Misc. classes */ /* Misc. classes */
.warning { .warning {
@ -431,3 +464,4 @@ td, th {
padding: 5px 5px 0 5px; padding: 5px 5px 0 5px;
border: 1px outset black; border: 1px outset black;
} }

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -65,17 +65,17 @@ Another list:
* 3u :: o (correct behaviour) * 3u :: o (correct behaviour)
** Images ** Images
#&img;url=test0.png, alt='This is a test picture', width=270, float=right, \ #&img;url=test0.png, width=270, float=right, \
#&caption='A test picture' #&caption='A test picture'
#+caption: A test picture \ #+caption: A test picture \
#+with a caption on two lines #+with a caption on two lines
#&img;url=test0.png, alt='This is a test picture', width=240, float=right #&img;url=test0.png, width=240, float=right
#&caption #&caption
A test picture A test picture
#& #&
#&img;url=test0.png, alt='This is a test picture', width=210, float=right #&img;url=test0.png, width=210, float=right
** Links ** Links

View File

@ -1,3 +1,35 @@
#+title: Atem: a new word #+title: Atem: a new word
#&summary
A presentation of the new word 'atem' and why it's so desperately needed
#&
#+license: bysa
wiktionary meta * Atem: a new word
Have you ever checked the Wiktionary entry for 'meta'? I have. It's right
[[http://en.wiktionary.org/wiki/meta#English][here]]. When I looked at it, I noticed that there were no antonyms. *None!*
But why?
#+caption: This alien agrees.
#&img;url=/img/aliens/lulala.png,float=right,width=200
I often find it useful to be able to un-metaize complex thoughts: instead of
thinking about thinking (meta-thinking), I think. Nothing else. However, when I
mention that "I think", it may not be obvious that before I was thinking, I was
thinking about thinking, which is why I have chosen to create *atem*, a new
word whose only function is to act as meta's antonym. With this word, I can now
say that "I atem-think", meaning "I think because I thought of thinking", or I
can say that "I think", meaning "I think". 'atem' removes a lot of ambiguity
from the English language.
Ok, maybe not that often, but sometimes it's useful.
Also, *atem* could be quite useful in abstract definitions, as a way to focus
on making something abstract concrete instead of making something concrete
abstract. For example, this page is probably an atem-page, because somewhere
out there there's a page about this page.
Perhaps every object in existence could be considered an atem object. It's not
impossible, it just doesn't make much sense.
Still, this word could be useful. I hope it gets into a dictionary.

View File

@ -1,10 +1,20 @@
#+title: Free culture #+title: Free culture
#+summary: A short summary of free software with good external links
#+license: bysa
* Free software * Free culture
** My definition Free culture is about sharing and mixing creative works, often under
[[http://en.wikipedia.org/wiki/Copyleft][copyleft]]. It encompasses pictures, video, audio, text and similar types of
works.
It is good.
** Other definitions ** External links
+ [[http://freedomdefined.org/Definition][Definition of Free Cultural Works]]
+ [[http://freeculture.org/][freeculture.org]]
+ The [[http://creativecommons.org/licenses/by-sa/3.0/][Creative Commons Attribution-Share Alike license]] --- a widely used
copyleft license approved for free cultural works. Wikipedia uses this
license. This website uses it as well.

View File

@ -1,12 +1,134 @@
#+title: Free software #+title: Free software
#+summary: An explanation of the necessity of free software
#+license: bysa
* Free software * Free software
** My definition This is a [[http://python.org/][Python 3]] computer program --- a piece of software:
#+BEGIN_SRC python
inp = input()
print(inp.lower())
#+END_SRC
Or at least it's a very small part of one. It reads text input from a user,
transforms the text to lowercase, and prints the transformed text. It is very
simple. Larger programs are often far less simple, as they may contain
implementations of complex algorithms or involve human interaction.
[[http://en.wikipedia.org/wiki/RSA][RSA]] and [[http://www.openssl.org/][OpenSSL]] are examples of this, RSA being an algorithm which requires
several subalgorithms to work, and OpenSSL being the large implementation of
RSA (among other things, but let's keep it simple) which contains way over
100,000 lines of code. For such a computer program to be run, it will most
often have to be compiled.
/Compilation/ is a process which translates human-readable source code --- like
the two Python lines earlier --- into a computer-readable format. When a
program has been compiled, computers can understand it, and it can be run and
used by users. The reason why programmers do not program in the
computer-readable format from the beginning is that it is almost impossible and
very impractical; humans need one or more levels of abstraction to be able to
transform ideas into runnable, useful software --- humans need programming
languages.
There are two things that make a lot of sense when talking about computer
programs: 1) if a program is installed on your computer, you should be able to
run it (why else have it?), and 2) if a friend (or someone else) would like to
use a program that you have, you should be able to share it to your friend,
i.e. copy it and give the friend the copy.
People who are unfamiliar with computers in general, and digital data in
particular, might have trouble understanding that any data you see on a
computer monitor or on an optical disc or on something else is nothing but
bytes, be it images, videos, websites, text, programs, e-mails, anything. A
byte x&var with a value n&var is no different than a byte y&var with the same
value n&var, even if it is stored in a different location. Any byte can be
cloned, copied, and only the amount of storage space available limits how many
times this copying can occur.
One must also be able to study a program, modify it to fit one's needs, and
redistribute copies of one's changes. There are several reasons for this; first
of all, a program must not be able to hide from you how it works and what it
does. You --- or a hired programmer --- must be able to look through the source
code and learn from it, so that knowledge about implementations of algorithms
and structuring of code segments can be spread. Computers have become
incredibly important on Earth, and it's just not good enough if a computer user
who wishes to learn more about software and how it works cannot study
the programs on their computer and in that way improve their computer
literacy.
Since machine code does not contain the original code and comments, source code
availability is a precondition for the studying and modification of a program.
Second, if a program does not work properly, you can only fix it if you're
allowed to do so and have the source code.
Third, it is impractical to constantly reinvent the wheel, which is what
programmers who do not use software that allows sharing and modification tend
to do.
Fourth, if a program cannot be studied, and if that program contains code for
reading from and writing to files in special formats --- e.g. the Microsoft
Word format --- people are forced to use that program if they have a file in
such a format (yes, OpenOffice.org and LibreOffice have good support for such
non-free formats, but not full support).
Fifth, if a program cannot be studied, you cannot be certain of its
intentions. Since you do not know what the program does (in details), you do
not know if it does anything harmful --- if it tracks you, or if it reads your
documents without your permission.
Sixth, if a non-free program is abandoned by its developers, it will never
become better, and users of it might not be able to keep running it, because no
one can fix or improve it.
And so on.
*Free software* is the type of software that encompasses these freedoms; it
allows you to be in control of your computing, instead of others taking control
of it. Proprietary software, or non-free software, is the opposite of free
software. Many programs and systems are proprietary, including (but not at all
limited to) Microsoft Windows, Apple iPhone, Amazon Kindle, etc. Well-known
/free/ software includes Firefox, Inkscape, GIMP, and many others.
Today it often seems commonly accepted that software development and usage
follows a model like this:
#&block
Someone (a corporation, an individual, an organization, could be anyone)
develops a program --> the creator allows people to use the program
--> a user wants to share the program with a friend, but the user knows that it
is wrong, because that's what the creator said --> the user does nothing, and:
The user needs a new feature added to the program --> the user asks the creator
to add the feature, because the user knows that only the creator may modify the
program, even if it runs on the user's computer and not the creator's --> the
creator answers --> nothing happens
#&
It makes sense that you should be allowed to modify a program that runs on your
computer, or get someone to do it for you. It makes no sense that an entity
x&var should have the power to control a user just because that user runs a
program created by x&var. Programs should /not/ have owners, even if that's
what some have been mislead to believe.
All of this leaves us with these four condensed freedoms:[fn:freeswdef]
#&block
/The freedom to/
+ run the program
+ study and modify the program
+ share the program (redistribute copies)
+ share your modified program
#&
** External links
Continue your reading here:
+ [[http://gnu.org/][GNU's Not Unix]]
+ The [[http://fsf.org/][Free Software Foundation]]
+ [[http://trisquel.info][Trisquel, a free operating system]]
+ [[http://debian.org/][Debian]]
+ [[http://en.wikipedia.org/wiki/Copyleft][Copyleft]] on Wikipedia
** Other definitions [fn:freeswdef] GNU.org. /The Free Software Definition/,
[[http://www.gnu.org/philosophy/free-sw.html]]

View File

@ -1,12 +1,49 @@
#+title: Hacking #+title: Hacking
#+summary: A simple description of what hacking is really about
#+license: bysa
* Hacking * Hacking
** My definition He's a *hacker*! Oh no, the pirate's going to *hack* our computer! And our mobile
phones! And our TV! Run for your lives! He'll use our credit cards to *hack*
even more! He might even *hack* our fridge!
That's not a hacker. That's an evil person. Hackers are not evil. Hackers are
curious people. The evil person described above can be called a /cracker/
instead. Such a person can be said to /crack/ computers and mobile phones, not
hack them. Hacking is very different.
*Hacking* is the act of creating new ways to use objects with well-defined
uses. It's about experimenting, being clever, and playing. Hacking does not
have to result in something useful, though it sometimes does in the long
run. It's about the present.
When you've hacked something, you've created a *hack*. It can happen
spontaneously, or it can happen because you want it to happen.
** Other definitions Once, I was eating a pizza in a restaurant with a group of friends when one of
my friends couldn't eat anymore of his hummus. I had one slice of pizza back,
and he had a little hummus back. I realized then that I could /combine/ the
pizza and the hummus, and tada: I ate a hummus pizza slice (which was good, by
the way); i created a hack.
Much more clever hacks have been created, but the hummus pizza example should
serve as a simple example of what a real-life hack /could/ be --- a hack can be
so many things.
Hacking is often associated with software development, because that's often
about finding clever solutions and being open for new ways to do things.
** "Just stop it already. You've lost."
One could argue that the hacking community should just accept that the media
and the non-hacker part of the public have long ago changed the meaning of
hacker to "person who breaks digital security", and that hackers should just
find another word to describe themselves. But if we did that, all the history
associated with hacking would fade as new generations came along.
** External links
+ [[http://www.catb.org/jargon/html/H/hacker.html][The Jargon File: hacker]]
+ [[http://stallman.org/articles/on-hacking.html][stallman.org: On Hacking]]