Domain: ens.fr
Stories and comments across the archive that link to ens.fr.
Comments · 112
-
FPGAs are cool...
...and cheap. A half decent FPGA can be obtained for about a dollar and odd in most parts of Asia. And that gives you a whole lot more malleability to play around, and you could mess up without really worrying much :-)
One really cool application is the implementation of various crypto algorithms for realtime simple uses, like this.
There is also something called the FPGA Design Contest - amazing stuff!
Games are entertaining I guess, but if we could implement crypto algos and cool AI stuff at home using FPGAs, nothing quite beats that :-) -
Re:Peer Review Is a Bad Idea
Louis wrote : Science belongs to the public who pays for it all, not just a bunch of elitist a-holes competing for grant money.
As an elitist a-hole, i'd like to add some comments to this.
Yes, science belongs to nobody in particular.
You suggest to Publish [my] stuff on the web for everybody to see, download and critique. Okay, so my paper on class field theory and Cebotarev's theorem is available on the web. Anyone can read it. But I've got no feedback from non-mathematicians, of course, because they simply didn't understand it. (In the improbable case that any non-mathematician did download it). I'm not proud of that. It's just a necessity : if I wanted to add enough explanations to make it readable by a very good hi-school student, my paper would be at least 3000 pages long. However, anybody can go to a math library, begin to read undergraduate books, and then more and more advanced books, and after 2 years (I guess) be able to read my paper.
Why do you call us elitist ? You're not the only one, you know. Science is growingly impopular, as obscurantist beliefs like astrology grow wider and wider. I'm from Paris, where the most ancient and prestigious university is called the 'Sorbonne'. Well, some years ago, a well-known astrologer has got a Ph.D. in 'sociology' in the Sorbonne ! One of the main arguments of such obscurantists is that 'official' science, being ununderstandable to the public, is no more verifiable, and hence is no more scientific, than astrology. More than 50% of the population believes in astrology.
I must add some words about the text you cite, which is near to what I hear from the many trotskysts that are present in my school. It talks about the most laughable results in their domain. Can you tell of one mathematic result you'd laugh about ? Every article you submit to publication is thouroughly verified by colleagues, and that verification can take 1 year. If you've noticed an error in a paper, I urge you to write to the author ASAP. But if you're one of the many that won't accept predictions of theoretical physics before they are brought to your eyes by technology, please understand than theoretical physics is not what one believes to be true, neither is it what one would like to be true. It is the most elegant way of formulating in mathematical words what is dictated by experiment. I don't say that there aren't fake papers written by unscrupulous physicists (for, regrettably, physics reviewers are less careful that math reviewers), but they'll all be unmasked if still not forgotten, and anyway most of the papers are very serious, even if they suggest that we live in a 26-dimensionnal space. Now if the public was asked to vote for such a theory against astrology, I guess there'd be 50% abstention, 30% for astrology and 20% for such a theory. And it'd be the end of our golden age.
Finally I'd like to say that I don't defend any business since I do only public research (and there ain't private funds for these useless, elitist, snobbish so-called 'pure' maths anyway). -
Final Exception()
Out of respect for the dead man, let us frame this instead in terms of structured programming; Perhaps call/cc. We could think of it as if our souls are continuations that God passes us at birth, and... no. I've lost you, haven't i. Let's start over
OK, here's a much better one: exception handling. Things like organ failure raise exceptions; death is just what happens when an exception isn't caught, and program flow drops back into the primordial brahman from whence all things come. Here is the stack trace for E. Dijkstra:
Process exited unexpectedly
Exception in thread "endocrine" life.cell.Exception.Cancer: "Heart not responding"
at life.entity.vertabrate.human.dijkstra.Edsger.Liver .maintainCell( Vitalsigns.protein:1241412 )
at life.entity.vertabrate.human.dijkstra.Edsger.Liver .processInput( Vitalsigns.protein:954423 )
at life.entity.vertabrate.human.dijkstra.Edsger.main( homonculus.protein:3423245 )
See? Like Dijkstra said. No need for goto in an intelligently designed language.
To be serious for a second, though, we're all talking about Goto Considered Harmful because that's the one thing we've all read. This man did a bunch of other stuff. If i knew more about computer history i'd mention some of the stuff he did, but to be honest i don't really know what all he did :) I do know, however, that do a google search for the man, and you won't get Goto Considered Harmful. You'll mostly, in fact, get pages discussing his Shortest Path Algorithm.
It may suffice to say this, before i go: In the Computers->History->Pioneers section of google.com's Web Directory section, exactly 33 people are listed (People like Tim Berners-Lee, Grace Hopper, and Alan Turing).
Dijkstra is one of them.
If that isn't 'net immortality, then i don't know what is. -
Re:High opinion
Intercal is for wimp, try unlambda.
;-) -
try this: TUNES
-
Re:Block? Are you kidding?
Try out the Book of Infinity. It's a CGI that generates an infinite trail of gibberish links. It could easily be modified to add gibberish e-mail addresses to each page.
-
Combinators and lambdas and stuff..?
A while ago i came across this programming language called Unlambda, which is a superset of the s-k combinatorial logic calculus thing that this turing machine is written in. (not a very big superset, mind you. they added call/cc, some input/output functions, and an operator that lets you fiddle with evaluation order.. just look at the webpage i linked. it's interesting..). Thus far, about the most complicated program written in unlambda (not counting the quines) is something that prints out the prime numbers one by one as a series of increasingly longer rows of asterisks.
Now, though, it would appear that we can run a universal turing machine in unlambda! I think! I haven't read the paper closely enough yet to work out how exactly the block of encoded binary at the end functions :)
In the meanwhile, though, i'm posting for this reason: i'm really, really wierdly interested by lambda calculus and combinatorial functions and church numerals and all these other bizarre functional-programming offshoots. I can't, however, seem to find any really good resources explaining how they work. I mean, you look around on google or whatever, and occationally you'll find something explaining the basics of what an anonymous function is, and maybe explaining how to construct a church numeral or putting the old ((lambda (x x) (x x) (lambda (x x) (x x))) infinite loop thing up. But i've yet to find something that actually, you know, goes on and explains to you how to use all of this. None of them reach the point of beginning to explain how you go from knowing what a church numeral and "successor to 1" means to expressing foreach (1..10) {} using only anonymous functions.
The site with the universal turing machine links to what claims to be an overview of how to use combinatorial functions, which makes me really happy. However, i was wondering: does anyone have any good links, examples of books, etc, that explain how to construct programs using lambdas and/or combinatorial s/k functions and all that? I hear some college courses cover this stuff (although near as i can gather, unfortunately, no courses at my current college do), so there has to be some kind of information online somewhere. I'll probably find something on my own eventually, but just as long as i have your attention: is there any reading material anyone *recommends* for someone who just finds lambda calculus and such interesting?
For now, though, i'm going to read this intro to combinators thing linked from Tromp's site. Maybe it'll teach me enough i'll be able to finally realize my crack-addled dream of porting the lambda calculus DeCSS program to Unlambda. Though more likely it'll just make me really confused :) -
You can try this out on your own
If you are feeling masochistic, you can try David Madore's Unlambda programming language. It is built around (in its basic form) the S and K combinators. Of course for all the Schemers out there, David is nice enough to include a form of call/cc for maximum obscurity. This is by far my most favorite of the painful programming languages.
-
flamebait
It's called Perl.
Or `Obfuscated C'
Hell, some even call it APL or Unlambda -
Re:My perl is not as grand as it once was...
My post was actually a joke (I'm surprised that someone has moderated it as Troll! If that moderator thought I don't like Perl, he/she obviously hasn't read my code...) and this was a parody for Java's "write once, run everywhere". ...but I do not think that perl is the "Write Once, Read Nowhere" langue you make it out to be ^_^Just for a little fun, I thought I'd try out my rusting perl tricks and unroll your silly script.
You're a first person I know about, who was ever interested in understanding this code. This is my original, clean version:$c = 'plfeY04jaJnYI';
I'm amazed, that your code is almost identical, congratulations! I like this program, because looking at it (the clean version) it's impossible to know how long it would take to get the result. For example your domain voila.fr would be written if $c was frmHZ0u6Ne2HQ but it takes about an hour to crack on my machine, while my domain in plfeY04jaJnYI is cracked in only 4 seconds. It would take over 2 years and 7 months to crack this xxFHuIaD7CdpI, which is the worst case, zzzzzzzz, the last key guessed by my program. So, the average time for guessing random keys (containing 1 to 8 lowercase letters) is over one year!
$s = substr $c, 0, 2;
for $l (1..8) {
for ('a' x $l .. 'z' x $l){
if($c eq crypt($_, $s)) {
print "$_.$s\n";
exit;
}
}
}If you want to see a really good password cracking program, check out Alec Muffett's great and famous Crack. It's really great, especially when you have good dictionaries. If you want to check if your password is easily cracked by Crack, you can use Alec Muffett's CrackLib. Check out my online Password-Guessability-O-Meter, I wrote it some time ago to demonstrate to one of my clients how does the CrackLib work. You just enter your desired password, and it tells you if (and why) it is easy to guess, using English, Polish, Czech, French and Latin dictionaries.
I use CrackLib for online registrations CGI scripts etc. so users can't have silly and easy to guess passwords. It can also be used with passwd program. Great library, and easy to use (there's Crypt::Cracklib Perl interface), but may be quite difficult to set up for the first time.
Not very difficile, Mister shiny@rfl.pl, but I shall compliment you for at least trying to obfuscate with the silly "q//" perl operateur ^_^
Thanks. :) I like it too. That's the most recent obfuscation, if I remember correctly. When I started to experiment with q// using q,x, and q.x. and q;x; etc. I was even trying to use something like this:$q=q,p,.q,l,.q,f,.q,e,.q,Y,.q,0,.q,4,.q,j,.q,a,.q
(in one line and with no spaces) but it looks terrible, as you can see., J,.q,n,.q,Y,.q,I,;The "if" statement is another ruse; suffixed "if" is in fact called before the condition of the "if" statement, and he uses this to initialise $q apparently after it's been first used. The above code is in fact equal to this:
Yes, this is exactly the original code, and this is exactly the way I was thinking. You're very good.$q = 'plfeY04jaJnYI';
$x = substr $q, 0, 2; :)And it makes itself apparent that $q is the crypt hash (henceforth called $crypt) and $x is the salt ($salt).
The original variables were $c and $s, I changed them to $q and $x for easy mistakes with q// quoting and x repetition operator.for (++$_..$_<<3){...}
Now you are just being silly
:-) $_ is not used yet and thus is 0, and ++0 is of course 1. 1<<3 is 8. :) 1..8 looked just to clear and simple... And that way I have 3 independent values of $_ variable (i.e. the original global $::_ is two times localized) in 3 nested scopes (main program, outer loop and inner loop), which makes it more interesting.for($i = 1; $i <= 8; ++$i) {...}
Actually in newer versions of Perl, the foreach loop is faster than the C-style for loop. See perlop manpage: Range Operators and perlsyn manpage: Foreach Loops.Which not only looks simpler, but runs faster too ^_^
I just run this benchmark:
#!/usr/bin/perl -w
and with Perl 5.6.1 I got this results:
use Benchmark;
sub s1{ for ($i = 1; $i <= 1_000_000; ++$i) { } }
sub s2{ for (1 .. 1_000_000) { } }
$t1 = timestr timeit 100, \
$t2 = timestr timeit 100, \
print "1. $t1\n2. $t2\n";1. 103 wallclock secs (87.77 usr + 0.15 sys = 87.92 CPU) @ 1.14/s (n=100)
2. 60 wallclock secs (51.93 usr + 0.04 sys = 51.97 CPU) @ 1.92/s (n=100)But in my code this loop has only eight iterations, where the 8th one takes two years, so the loop control overhead itself doesn't really matter here. The inner loop is more important but crack() function takes most of the time, anyway.
Older versions of Perl (I don't know which exactly) created a temporary array for the range operator in foreach loop, so the code like:
for (1
could easily take all of the memory, but now it's fixed. Fortunately, it doesn't create a temporary array any more, and it's highly optimized, so it's safe to use it now for large ranges. .. 1_000_000_000) { ... }The "and die" bit just is taking advantage of the short-circuit boolean operateur système. The "die" only is executing when $crypt (the origin hash) and the encrypted form of the current guess are equal, in which case the key has been found and we quit ^_^ I changed it to a nicer looking "print" statement for further clairitie.
Yes, there were print and exit in the original version. You have exactly reconstructed my way of thinking. Well done. :)I think you're very good, really. Most of people have no idea how to analyze such obfuscated code. Actually I'm quite disappointed that decrypting my code was so easy for you...
:)I'll tell you why and how I wrote this program. I was inspired by this code:
#!/usr/bin/perl
and few JAPH signatures. I wanted to write a small program, that it would be impossible to tell what it writes, until you run it. Most of such programs are very obfuscated but after enough work you can usually find the printed message, without running them. So I thought that the message could be ciphered using some one-way alghoritm, like crypt(3) or MD5, and the code would just brute-force crack it. That way it's really impossible to tell what the message is, until you run the code. The code itself only cracks, but doesn't know what is being cracked and when it finishes. Using crypt(3) had this advantage, that it has 2-character salt, which can act as country code in domain name.
@a=(Lbzjoftt,Inqbujfodf,
Hvcsjt); $b="Lbssz Wbmm" ;$b =~ y/b-z/a-z/ ; $c =
" Tif ". @a ." hsfbu wj" ."suvft pg b qsphsbnnfs"
. ":\n";$c =~y/b-y/a-z/;
print"\n\n$c ";for($i=0;
$i<@a; $i++) { $a[$i] =~
y/b-y/a-z/;if($a[$i]eq$a
[-1]){print"and $a[$i]." ;}else{ print"$a[$i], ";
}}print"\n\t\t--$b\n\n";So I wrote the first working version and started to make it as small as possible. Originally it didn't have to be obfuscated, just small. This is the smallest version I've written so far:
$c='plfeY04jaJnYI';$s=substr$c,0,
with 98 characters. But today I shrinked it some more, to 93 characters:
2;for(1..8){for('a'x$_..'z'x$_){
die"$_.$s\n"if crypt($_,$s)eq$c}}$c='plfeY04jaJnYI';$s=substr$c,
and few minutes ago (while I write this comment!) I found a better idea and wrote this:
0,2;for(1..8){$c eq crypt$_,$s
and die"$_.$s"for'a'x$_..'z'x$_}$c='plfeY04jaJnYI';$s=substr$c,0,2;$k=
which having only 79 characters is my record so far (thanks to Perl's magical auto-increment operator) and finally fits in one line!
'a';$k++while$c ne crypt$k,$s;die"$k.$s";Hopefully that wasn't too difficile to follow, my english is not perfect.
Your english is OK, don't worry. Actually, I like the way you use French spelling for some words, like difficile. It's like a French accent in written text, very nice in my opinion.Just remember, Mr. shiny@rfl.pl, no langue is completely impenetrable (except perhaps Intercal, but that's a small bit pathological
Good point. :-) :) I wonder if these guys tried Intercal when proving the impossibility of obfuscating programs... I personally like Unlambda and Brainf***.This Unlambda program "calculates and prints the Fibonacci numbers (as lines of asterisks)":
```s``s``sii`ki
`k.*``s``s`ks
``s`k`s`ks``s``s`ks``s`k`s`kr``s`k`sikk
`k``s`kskI wanted to show a Hello world example of Brainf***, but I got this error:
Lameness filter encountered. Post aborted!
Visit Esoteric Topics in Computer Programming, great stuff if you want to go mad.
Reason: Please use fewer 'junk' characters.You like Perl, so if you know Inline::C and Inline::CPR (if you don't, read Pathologically Polluting Perl by Brian Ingerson) you may enjoy understanding this code:
#!/usr/bin/cpr
It's great, once you really understand it.
int main(void) {
CPR_eval("use Inline (C => q{
char* greet() {
return \"Hello world\";
}
})");
printf("%s, I'm running under Perl version %s\n",
CPR_eval("&greet"),
CPR_eval("use Config; $Config{version}"));
return 0;
}Are you up to date with Perl 6 development? It's going to be great and extremely powerful language. Read Larry Wall's Apocalypses and Damian Conway's Exegeses if you're interested:
- Apocalypse 1: The Ugly, the Bad, and the Good (April 2, 2001)
- Apocalypse 2: Fundamental data types, variables and the context and scoping of the language (May 3, 2001)
- Exegesis 2 (May 15, 2001)
- Apocalypse 3: Operators (October 2, 2001)
- Exegesis 3 (October 3, 2001)
- Apocalypse 4: Syntax (January 18, 2002)
-
Re:When the functional paradigm is superior?Well to be honest, I was counting on some examples which would convince me, that I really need to read The Wizard Book and learn such languages as Lisp, Scheme, Elisp, Guile and Unlambda -- not where to find those info, which itself is not very hard.
All I need is a motivation.
Just like when I understood the idea of inheritance and the real OO code reuse, together with the idea of moving data to the foreground and that with a good data you need simple algorithms -- that day I understood, that I have to learn Smalltalk, Objective C, C++ and OO Perl.
Today I need to know why I need to learn how to think with the functional paradigm. It's a serious problem, which stops many people before they learn functional languages.
Many years ago I was writing C programs to process text, and I could do everything that way, I just didn't realize, that there were better ways to do the same. That was before I knew Regular Expressions, egrep, sed or Perl. Now I write Perl one-liners for tasks, which used to take me days of writing C code, but I didn't know that before, because "If the only tool you have in the toolbox is a hammer - every problem looks like a nail."
So now I ask for a reason to learn the functional way of thinking. I need to know it before I actually learn them, just to have a strong imperative. Learning the new way of thinking is a long and hard process, I just want to know what waits for me at the end.
I hope someone who know that reason, will tell me and those who also need it, why it's worth the efford. Thanks in advance.
-- Your Anonymous Coward who wants to learn new ways of thinking...
-
Re:There are many more esoteric programming languaI was trying to post Brainf*** "hello world" example but unfortunately...
Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters.
Strange... Maybe I'll send an Unlambda example at least:
```s``s``sii`ki
It calculates and prints the Fibonacci numbers as lines of asterisks.
`k.*``s``s`ks
``s`k`s`ks``s``s`ks``s`k`s`kr``s`k`sikk
`k``s`kskIt's quite challanging to parse that code, once you know the syntax.
-
Re:There are many more esoteric programming langua
-
Re:Scheme
"Minimal" probably refers to the size of the included library of built-in functions, not to the size of the amount of the language itself that has been implemented.
P.S.: I was going to suggest Unlambda (see link) as an example of something scheme-like yet even more minimal than scheme-- but then i discover that the Unlambda programming language is being extended to include syntactic sugar that allows you to specify church numerals using ordianary decimal numbers!! That, and the help files now explicitly tell you how to do a loop! Dammit, just when i was thinking Perl 6 was the greatest blasphemy of bloat i had ever seen, i find out that Unlambda is being adjusted to actually allow for the possibility someone actually might want to write a program in it... the whole world's going mad, i tell you.. -
Re:Whats the "lighest" you can get?
Can we get even more lightweight?
:)
Oh my, yes. All you need to compute is three operations (and another couple to do i/o). Check out unlambda. Lighter than brainfuck, probably even more maddening, since it doesn't have state like a turing machine does.
Change the i/o ops to read and write arbitrary memory locations, and you could write an operating system in unlambda (same goes for any other of these toy languages) -
Re:WebPoison anyone?
It's not exactly what you mean, but something similar is The Book of Infinity. It doesn't generate email addresses, but it does generate an infinite website.
-
Re:What I wouldn't give...Fools, fools, all fools! Just because you can write self-modifying code and then pretend the executed code is an anonymous subroutine does NOT mean that the language is functional, or that what you do in it is functional programming! BRAINFUCK IS NOT FUNCTIONAL PROGAMMING. NEITHER IS BEFUNGE. You can argue them as such, but the languages do not address the concepts of functional programming in a PURE enough manner for them to be agreeable to the truly unreasonable!
Clearly, Unlambda is the only reasonable representative for this competition from the field of performance art programming. I hope to see at least one submission to this ICFP thing written in Unlambda, and i am certain that if any Unlambda programs are submitted they will trounce any competition written in Brainfuck, Befunge, INTERCAL, or perl.
Onwards, my brethren! Let us crush all who espouse the false paths of named variables and iterative memory usage! CHURCH NUMERALS ARE THE ONLY WAY TO FIND ENLIGHTENMENT! THE ONLY!
Sorry. I've got something of a headache. -
Re:A philosophical argument for software patents:
Software is not math. Software is a machine.
I disagree totally. Software is a way of expressing ideas. Software is *not* a machine. The only discernable difference between software and natural language is that it is usually terser in syntax and effort has been made to make it unambigious (though not always true, eg C and /* which can mean start comment or divide by a number pointed to by a pointer). If it is deterministic (which usually follows from being unambiguous, ignoring hardware issues) and has a condition and branch instruction then it is as powerful as any language in existance.
By itself, Math is nothing. It's just a framework that people use for applying thought.
By itself, software is nothing. It's just a framework for people applying thought. Without a compiler (which depends on the compiler authors interpretation of how it should be converted to machine code) and a processor (with its own architecture and way of doing things) and supporting hardware infrastructure, software is just writing on a page.
In no case, however, is the software simply a set of abstract concepts intended to facilitate human navel-contemplation
With the Unlambda Functional Programming Language I rest my case m'lud.
Just because the control mechanism of a machine has moved from a purely physical implementation to an electronic one does not diminish the truth of its mechanical nature
Surely a non-mechanical mechanical nature is a contradiction in terms?
We allow the patenting of physical machines and industrial processes [...] Why should logical ones not receive equal protection?
We don't. We patent a technological innovation which is implemented in a physical machine or an industrial process. You can still patent a technological innovation in the UK if it is implemented in software. It's not the software you are patenting though but the innovation itself.
Can I conclude with the point that anyone who has studied computer science will have written software by hand on paper (in an exam) to express ideas to another human being (the examiner) who then understood that expression of ideas without a machine intermediary.
Phillip. -
Re:Language Advocacy Is Great!
call/cc? Good question. I never did use that much in my class; I don't remember if we implemented that or not. (we were writing Scheme on top of Scheme...)
I imagine it would involve calling the function with a copy of that environment. At least Perl supports continuations, but I could try to implement the lambda function anyhow...
---
pb Reply or e-mail; don't vaguely moderate. -
Re:IANAL, but here is what will probably happen...
That's the reason for splitting the data, as is done by my Random Pads proposal or, better even, the Publius system.
See here for an implementation of a secret-sharing mechanism.
-
Re:IANAL, but here is what will probably happen...
That's the reason for splitting the data, as is done by my Random Pads proposal or, better even, the Publius system.
See here for an implementation of a secret-sharing mechanism.
-
XOR
David Madore wrote a paper about using XOR to be able to publish information without the author being trackable. I suggest you read it.
I wrote a program called Pad which implements this scheme, if you're interested. I also have a public pad repository, one of many repositories which have links on David's page.
-- -
XOR
David Madore wrote a paper about using XOR to be able to publish information without the author being trackable. I suggest you read it.
I wrote a program called Pad which implements this scheme, if you're interested. I also have a public pad repository, one of many repositories which have links on David's page.
-- -
How long will mankind last?
Here's a cute little argument that predicts that mankind has a roughly one-in-two chance of ceasing to exist within five hundred years (and therefore probably won't be around when the sun dies). It uses the Anthropic principle, but backward. I am roughly translating from the not e in French I wrote on the subject.
Imagine the following game. Somebody chooses a positive (real) number x. He then picks a random number y uniformly distributed between 0 and x, and tells it to me. My goal is to guess what x was. If I state that "x is between y and 2y", then the probability of my being right is the probability of y being being beween x/2 and x (that's the same thing), so it is 1/2 because y was uniformly distributed between 0 and x. That's trivial. And in practice if you play this game, it is a sensible thing to guess that x is between y and 2y.
Now it evidently doesn't make sense to take for x the total lifespan of humanity, because men are not uniformly distributed along it. So we take for x the total number of human beings that will have lived in the entire duration of humanity. We would like to know what x is. We don't have a clue. However, one thing we do know is how many people have lived so far, or, which is roughly the same thing, your (or my) "rank number" in the list of all human beings (in order of birth). This number, y, is of the order of 8*10^10 (80 billion that is). Further, since you (or I) have no reason of being one given human being than another, y is uniformly distributed between 0 and x. Consequently, we can apply the result I just gave, and conclude that x has one chance out of two of being between y=8*10^10 and 2y=1.5*10^11.
Translated in other words, it means that there is one chance out of two that less than 80 billion human beings have yet to live (or be born). With a current rate of 1.5*10^7 (150 million) born each year, assuming it does not decrease considerably, this brings us 500 years hence. I think this is a sensible order of magnitude.
(Of course, the same reasoning also shows that there is a better than one-in-twenty chance of "doomsday" befalling within our lifetime. That's a rather chilling thought.)
In case it wasn't obvious, this post is to be taken as "Ha, ha, only serious". If you want more thoughts on the same line, see here.
-
How long will mankind last?
Here's a cute little argument that predicts that mankind has a roughly one-in-two chance of ceasing to exist within five hundred years (and therefore probably won't be around when the sun dies). It uses the Anthropic principle, but backward. I am roughly translating from the not e in French I wrote on the subject.
Imagine the following game. Somebody chooses a positive (real) number x. He then picks a random number y uniformly distributed between 0 and x, and tells it to me. My goal is to guess what x was. If I state that "x is between y and 2y", then the probability of my being right is the probability of y being being beween x/2 and x (that's the same thing), so it is 1/2 because y was uniformly distributed between 0 and x. That's trivial. And in practice if you play this game, it is a sensible thing to guess that x is between y and 2y.
Now it evidently doesn't make sense to take for x the total lifespan of humanity, because men are not uniformly distributed along it. So we take for x the total number of human beings that will have lived in the entire duration of humanity. We would like to know what x is. We don't have a clue. However, one thing we do know is how many people have lived so far, or, which is roughly the same thing, your (or my) "rank number" in the list of all human beings (in order of birth). This number, y, is of the order of 8*10^10 (80 billion that is). Further, since you (or I) have no reason of being one given human being than another, y is uniformly distributed between 0 and x. Consequently, we can apply the result I just gave, and conclude that x has one chance out of two of being between y=8*10^10 and 2y=1.5*10^11.
Translated in other words, it means that there is one chance out of two that less than 80 billion human beings have yet to live (or be born). With a current rate of 1.5*10^7 (150 million) born each year, assuming it does not decrease considerably, this brings us 500 years hence. I think this is a sensible order of magnitude.
(Of course, the same reasoning also shows that there is a better than one-in-twenty chance of "doomsday" befalling within our lifetime. That's a rather chilling thought.)
In case it wasn't obvious, this post is to be taken as "Ha, ha, only serious". If you want more thoughts on the same line, see here.
-
Problems in protocols, analysis
A little known fact in the general computing public is that problems in secure communications lie more often in the communication protocol than in the encryption primitives.
There are some classical attacks:
- Man-in-the-middle Idea: I can prove to both Karpov and Kasparov that I'm a great chess player. I challenge them both in a play through mail. I use the moves of each one against the other. Both think I play like a grandmaster.
- Use of old keys Idea: recover some secret data of a previous session (for instance from old temporary files on a common machine - after all, many operating systems do not really erase erased data). Use it in a current session.
It is possible to prevent those attacks by clever design of the protocol. For instance, the use of old keys can be prevented by some "nonce" numbers (generated once) or some clock data.
It is very difficult to analyse protocols and prove them correct.
First, a formal model of the protocol, its environment and what it means for it to be correct. This is nontrivial, since some models may just ignore some kinds of attacks.
Then the protocol must be proved correct with respect to the formal specification. Alas:
- manual theorem proving is error-prone
- formal theorem proving is tedious
- automatic analysis tools are not so powerful
I have made some research on these topics. For more information, see for instance Jon Millen's page.
-
Re:Why Spanish before other European languages.
That's only part of the story. The only non-ASCII characters in Spanish are entirely contained in the ISO-8859-1 (aka Latin-1) character set. Since most programs are already configured to work correctly with Latin-1, supporting that (in browsers and such, that is) should be rather easy.
Chinese is moderately complicated. Yes, it does have a huge number of characters, but on the other hand they are fixed-width, and the difficulty of rendering Chinese is rather small once you have the appropriate font (I'm talking of rendering, e.g. in the URL bar); in fact, Chinese is simpler to render than the Latin script.
Devanagari (just like every other Indic script), on the other hand, is hugely complicated. The crazy ligature system means that we are going to have to wait a looong time before we see software that correctly handles the Nagari script in any non-trivial situation.
For example, consider the Unicode test page I keep referring to: you have a sample of Russian, a sample of classical (polytonic) Greek, a sample of Sanskrit (written in Devanagari script) and a sample of Chinese. Many browsers will handle the Russian and Chinese correctly, and the non-polytonic Greek characters; very few will handle the full Greek text correctly; none is known that correctly displays the Sanskrit text.
-
How it's supposed to work
Recently I posted this comment mentioning the fact that there's really no reason why a domain such as www..com (you should see two Chinese ideograms meaning "China" between the "www." and the ".com" parts; further, if you click on this link, your browser should open a window telling you that the domain "www..com" does not exist, with the same two Chinese ideograms) doesn't exist.
Let us recall: first, as specified by the HTML specification, every HTML document, no matter what character set it is "encoded" as, is written in the all-englobing Unicode character set. So when you write something like "中国" in HTML, it refers to the Unicode characters (decimal) 20013 and 22269, no matter what the current character encoding and font are. So that's how you write the link text. Second, as for the URL itself, well, although it is not (as far as I know) formally recommended by an Internet standard, it is widely recognized that URLs are written in the UTF-8 encoding format (which is afterward %-encoded into ASCII).
The whole process is described in this Internet Draft ("Internationalized Uniform Resource Identifiers"; WORK IN PROGRESS!) by Larry Masinter and Martin Duerst where the relationship between URIs and IURIs (Internationalized URIs) is discussed in detail.
The DNS is the toughest part of all. The DNS specification (RFC1034) states (section 3.1) that DNS data is to be taken as binary for possible upward compatibility (this was wonderful foresight on Mockapetris' part!). Consequently, there is nothing as per standards wrong with using (UTF-8 encoded Unicode) 8-bit data in DNS labels. Except, of course, that many "buggy" implementations will have to be corrected for broken assumptions, *sigh*. The IDNS working group suggests using a UTF-5 encoding to avoid going beyond the current domain name limits: I think this is not a good thing and we should stick to UTF-8 and repair broken software.
Oh, and incidentally, see this page too know how broken your browser's Unicode support is.
-
Avoid fascists: Distribute DeCSS with PAD!!http://www.lammah.com/pad/ is where you can download a program called PAD which has a really cool idea and program for protecting free speech: split a file that is banned into separate pieces that can be recombined to the original file, but no piece can be said to be the file in question or part of it! Now, the MPAA wouldn't be able to prove that either piece was the DeCSS code! Combine that with some wheat and chaff by including bogus file 'pieces' so that they can't even point to which files are enabling 'linking' to the code! From the website:
"PAD is a small command-line utility to separate one file into two- each indistinguishable from white noise, and put them back together into the original."
They actually suggest doing this with DeCSS on the website:"Free speech enforcement: Let's say you have a file called decss.c (for example
-core ;), and want to distribute it, but are afraid of censorship. Break it up into two pad files, distribute these each on separate unrelated systems, and tell people where to get each (and how to re-assemble them). Should someone go to one (or both) of the hosting systems and pressure them to remove it, each can claim they're only hosting harmless, random data. It is mathematically impossible to prove that either one is the random one and the other was derived from the original file.Another possibility here (and probably better) is the use of 5 or more pad files for this. This is shown in the second example above. See http://www.eleves.ens. fr:8080/home/madore/misc/freespeech.html for more information about this."
-
Re:Most of you are missing the point
Ah, one of my favorite pet peeves. You've completely misunderstood the way Unicode works on web pages; but it's not really your fault, it's because Netscape Navigator is completely broken in this respect (it's far more - and far worse - than broken, in fact).
Neither the HTTP headers sent by Slashdot nor the preamble of the HTML file specify a character encoding. Therefore the encoding is the default encoding, i.e. ISO-8859-1 (aka latin-1). What you've written, then, is not "sayonara" but "comma cube comma ae comma E-grave comma c-cedilla". If you see anything else, your browser is broken! You've posted Shift_JIS-encoded data in an ISO-8859-1-encoded page and that doesn't make sense.
Now this does not mean that you can't have Japanese in HTML, even if the page is encoded as ISO-8859-1. Indeed, "at the bottom", every HTML document is written in Unicode, and every Unicode character is available, if not readily though the encoding (not necessarily UTF-8), then at least through SGML numeric entities of the form &#xxxxx; (where xxxxx is the decimal form of the Unicode character number). Consequently, the correct way of posting "sayonara" is "" (which I've written as "㇁よなら"). Again, if you see anything else than the hiragana for "sayonara" here (or perhaps a transcription of it, e.g. with lynx), especially if you see latin-1 characters, again, your browser is broken.
The brokenness about Netscape is that it assumes that numeric SGML character entities are to be interpreted in the current document encoding, and that is completely wrong. They should always be interpreted as Unicode character numbers. So this has somehow led to the conception that the basic HTML character data is in the character set of the encoding, which it is not! Fortunately, Mozilla repairs this brokenness, hopefully before any serious damage is done.
I posted another comment on this article to the effect that you can even have valid Chinese characters (in my example, , i.e. "China" in Chinese) in the host name part of a URL. It just happens that such domain names are not given out, but there is nothing wrong with it.
For more examples of Unicode and to see how badly your browser is broken, follow this link.
Sorry about the rant. .
-
Chinese characters in domain names?
Hey, how come is it they won't let you register domain names with arbitrary Unicode characters in them? Why can't you buy www..com? Yes, this is perfectly valid: the name is UTF8-encoded and then %-encoded as part of the URL (and the DNS specifications do allow binary data). If I didn't mess it up too much, (your browser should show this as two Chinese ideograms) means "China" in Chinese (disclaimer: I don't know Chinese).
Before such languages as Chinese and Hindi become truly usable on the Internet, support for the Unicode standard will have to make much progress. Click here to see how badly your browser supports Unicode.
-
FWIW
I've written a little program that will use the Linux ethernet tap device to take ethernet frames, optionally encrypt them using blowfish, and encapsulate them in UDP datagrams that are sent to a certain list of peers (either fixed or dynamically updated). So, in effect, it performs the task of a VPN; the advantage, though is that the datagrams are standard UDP datagrams, which are not distinguished by their protocol number (only their port number, but that can be changed at run time), thus essentially impossible to filter from "legit" packets (there isn't even a recognizable application level header, because all is encrypted using blowfish and transmited "as is"; changing the blowfish key could produce just about any content in the datagram). This could be useful in getting around any kind of filtering mechanism of this sort (unless they decide to completely disallow UDP, but that would be a bit fascist even for most ISPs).
I use it, together with a UDP bouncer program, to get around a fascist firewall. I used to do it on TCP, but I had all sorts of nasty resonance problems between the two TCP windows, so I dropped that (the advantage of TCP, though, is that it never lost any frames as UDP does).
Program is GPL'd. Your mileage may vary. Use at your own risk. Standard disclaimers apply.
-
FWIW
I've written a little program that will use the Linux ethernet tap device to take ethernet frames, optionally encrypt them using blowfish, and encapsulate them in UDP datagrams that are sent to a certain list of peers (either fixed or dynamically updated). So, in effect, it performs the task of a VPN; the advantage, though is that the datagrams are standard UDP datagrams, which are not distinguished by their protocol number (only their port number, but that can be changed at run time), thus essentially impossible to filter from "legit" packets (there isn't even a recognizable application level header, because all is encrypted using blowfish and transmited "as is"; changing the blowfish key could produce just about any content in the datagram). This could be useful in getting around any kind of filtering mechanism of this sort (unless they decide to completely disallow UDP, but that would be a bit fascist even for most ISPs).
I use it, together with a UDP bouncer program, to get around a fascist firewall. I used to do it on TCP, but I had all sorts of nasty resonance problems between the two TCP windows, so I dropped that (the advantage of TCP, though, is that it never lost any frames as UDP does).
Program is GPL'd. Your mileage may vary. Use at your own risk. Standard disclaimers apply.
-
Rats!
The Forum was one of the great advocates of the Unlambda programming language I invented. The Matrix's program, initially written in C++, had been entirely rewritten in Unlambda for efficiency and clarity. Now what will I do without this precious illustration of the power of that programming language?
Not to mention how useful the Forum's advice was (though it must be said that The Cube was the most sensible and reasonable SOMAD, the rest being, well, a bit artificial in their manner of speech), and how cute Andrej looks - ahem, well, I'd better be going.
-
Re:Interesting cryptography
I think it's more conventionally known as a "secret sharing" algorithm, at least as far as Schneier is concerned. Except that in this use, the "secret" is not the important part, its the resistance to data loss that is key. This is very similar to a project I saw a while back (http://www.eleves.en s.fr:8080/home/madore/misc/freespeech.html) which does not provide the same resistance as Publius.
Most important about this alternative project mentioned above is that not only is no single server providing contraband data, no data on any server can be removed without possibly infringing on the 1st amendment rights of another individual. In the US, this means all data on the server is safe. -
Re: Parenth's
At least Emacs takes care of indenting pretty well.
Also the syntax it has makes it very easy language to parse indeed. It's hard to think of any other language than Scheme were it would be as easy to write metacircular parser (to write a parser for the lang in the lang).
If you want less parenthesis, choose other functional language. E.g. ML has much less parentheses. Though I myself find parenthesis helpful in following what belongs to what expression...
If you really hate parenthesis, use REAL man's functional programming language - Unlambda. It doesn't not have any parenthesis at all.
:) -
Re:What Possible Use Would Anybody Have For This?
Why of course they released it so we can generate pads and start off with a wonderfuly large (few hundred megs with the right algs) paddbase. So get crack'n!
-
art
your point is extremely insightful and eloquently made, but keep in mind there is an important exception to what you say, an exception which can be expressed in three words:
performance... art.. programming.
May not rival the great Shakespear.. but does rival at the least those people who stand in the street with white face paint on, imitating statues.. -
Re:You can go further with secret sharing.
Speaking of secret sharing, I just wrote a little portable C program to do just that. You can find it at this place (all explanations on use are given within the source file itself). It's really cute.
-
biggest omission - wuftpd
The biggest omission from the list was wuftpd <2.6.0 (and derivatives). This deserved to be number 2 on the list, after BIND, as it shipped enabled by default on every RedHat up to 6.0.
I generally recommend that Linux users replace wuftpd with ftpd-BSD, the Linux port of OpenBSD ftpd. It's not as featureful, but it's a lot easier to use, and the code has been audited.
I also think sendmail seemed out of place on the list. There hasn't been a root exploit on sendmail in what, three years?
-- -
software pipeling, optimizations
I'd be interested if some knowledgeable person would explain here the current state of development of IA-64 compilers (gcc in particular).
IA-64 is peculiar in that respect, not so because it is 64-bit (though this is likely to hurt code that assumes 32-bit int's and pointers... and that's still quite a bit, look at the difficulties with Linux on Alpha). As decribed in Intel's documentation, IA-64 is a VLIW (Very Large Instruction Word) architecture where the burden of superscalar pipelining (deciding what assembler instructions can be executed in parallel) lies on the compiler. Let us take a simple example: where you are executing
imull %edx, %eax
addl $4, %eax the two instructions cannot be scheduled on two parallel pipelines since eax in the second depends on the output of the first. Advanced design allow the CPU to "swap" certain instructions (out-of-order execution).From a hardware design point of view, the IA-64 design makes sense: out-of-order scheduling instructions over multiple pipelines in hardware is complicated. For this reason, IA-64 allows the assembly code to specify "bundles" of instructions that can be executed in parallel. The burden is then shifted to the compiler.
Such a design allows scheduling optimizations far further than the ordinary peephole optimizations (i.e. very local tricks). For instance, in numeric code like this:
x[i][j]=expression1;
x[j][k]=expression2;
the compiler could schedule expression1 and expression2 in parallel, if they are sufficiently simple. Of course, for this to respect the semantics of the program, (i,j) must never be equal to (j,k). Answering such questions mechanically is impossible in general (Rice's theorem, reduction to the Turing machine halting problem). However, there are analysis techniques that can give the right result in most cases (such techniques can also be used to check whether two pointers never point to the same variable, or whether some array bound checks are useless) (an active research topic; see some of the research in the area).I would like to know the current state of the art of industrial-grade compilers with respect to this automatic local parallelization techniques.
-
Re:My own comments
Yes, thank you very much, my school (translate: college) happens to be where Bourbaki's office is (and, essentially, his "birth place"), and I've read a significant portion of his "Éléments de Mathématiques".
I fail to see how that is relevant. Bourbaki was (were?) not interested in logic. His (their?)treatment of logic and set theory in his first book ("Théorie des Ensembles" - whose publication was long delayed as it remained in the state of a "fascicule de résultats") is sketchy at best, unelegant, and, in essence, as short as he could arrange it, just enough to provide the foundations for the other books.
Anyway, that is old. Currently, there are only about two groups doing logic in France: around Krivine in Paris and around Girard in Marseille (I think). Girard is the inventor of linear logic, so that's a clame to fame, but he's more the exception than the rule: logic is held in disrepute, if not contempt, in France (and I much regret it).
-
Diversify.
I know others have said it, but here it is again: diversify. By that, I don't just mean you should go and learn a bunch of similar languages (*cough*C++*cough*Java*cough*Eiffel*cough*). I mean broaden your horizons. Take some time to study things - languages, paradigms, ideas, fields - completely unrelated to your current field.
As for languages - well, ESR says in his page that every good programmer should at least get acquainted with Lisp, Perl, Python and C. I don't disagree (except perhaps WRT C). (If you've been taught Lisp/Scheme improperly and, as a result, now hate it, give it another try, using a more free-form approach, and in a good environment - DrScheme is good, and, besides the regular Windoze, MacOS and Unix releases, there's even a distribution uses OSKit to make it an actual FreeBSD-compatible stand-alone OS!)
Other languages I suggest: Haskell and ML (both functional languages with more "traditional" syntaxes than Lisp; Haskell is a pure functional language), Prolog (another excellent idea with a terrible reputation due to being mis-taught), Smalltalk and Self (both pure object languages; Smalltalk is pretty much the father of modern OO, and Self is its prototype-based - i.e., classless - descendant), APL (yes, APL... it's very remarkable!), and various assembly languages, most notably for the PowerPC and the Alpha.
As for paradigms... well, don't get too attached to them. As you get some experience with various languages, you'll find that paradigms are only "right" as long as they're useful. More specifically, you'll have developed your own sense of the Right Thing in programming, your own view of what programming should be like, and you'll see how the good ideas in each paradigm fit into that. (For example, Brian "water" Rice is doing some very fine work on Slate, a language which, somewhat like BETA, integrates objects, components and functions on a fundamental level.)
Also, never neglect the fundamentals. I'm talking about the theoretical foundations of computational mathematics (*): partial recursive functions, Turing Machines, etc. (Remember - don't be afraid of the math... the math is your friend.)
Finally (and in relation to the former paragraph), sit down at whatever library you find which has a copy of it, and study Knuth's Art of Computer Programming. Despite some pitfalls, it remains one of the fundamental texts in the field.
One last thing: go look at the long-standing Tunes project (here's an explanation for the less enlightened, given that the project's leader has a tendency to verbosity and obscurity when writing). Also interesting is its Languages Review page.
(*) I refuse to use the term "computer science". But that's the subject of another rant entirely... -
No Solaris build
I'm rather disappointed that there isn't a Solaris nightly build any longer. Where I am we have a network of PC's under Linux and Sparcstations under Solaris. To make Mozilla the default browser for all students we would need a Solaris build.
I discussed this on the netscape.public.mozilla.unix newsgroup, and it seems something broke the build automation process under Solaris and they didn't have time to look into it.
Speaking of which, I have never, ever, been able to build Mozilla myself, on any platform, to give something which looks even remotely like what they ship. Most of times it fails completely, and the reason for failure is not even systematic: it varies according to whether I made a CVS checkout or took a source tarball, it depends on whether I used "make" or "make all", on how I ran configure, and all sorts of things. Even typing make twice, with make clean in between does not give the same error twice. Mostly I get weird C++ errors which I don't understand because I only grok C (errors like "class fooBarMumbleBuz was instantiated with a virtual method frobnicateMeHarder whereas it only has non-virtual constructors", which really don't mean a thing). I also got a lot of unresolved symbols. Strange things.
Not even worth making a bug-report for, because nothing is systematic, every time I retry it's different.
Has anyone had more success?
-
Re:Microkernels suck
I must admit that I almost fell into an hysteric laugh when I read this (your link) a few months back, expecially since some of you people (not you though) seem to believe that HURD+Guile would be a good starting point for Tunes.
-
ftpd
I'm the maintainer of (one of) the Linux port of the ftpd from OpenBSD. Since version 0.3.0 (of my port, taken from OpenBSD 2.7) it has had IPv6 support (this has been a pain to port, as a matter of fact).
(I'm still a bit short of confirmations that the IPv6 part works correctly. It would be nice if more people with IPv6 connectivity could try it out and tell me.)
Also check out my "sock" program (instructions for use: see comments at the start of the source) for an IPv6-aware equivalent of netcat/socket that uses the spiffy getaddrinfo() function from libc.
Besides this, I think Linux is still wanting in IPv6-aware tools. Now that the kernel supports it and the libc supports it, I think all distributions could afford to ship with a fully IPv6-aware environment. Not having ping6 and all by default is rather ridiculous.
-
ftpd
I'm the maintainer of (one of) the Linux port of the ftpd from OpenBSD. Since version 0.3.0 (of my port, taken from OpenBSD 2.7) it has had IPv6 support (this has been a pain to port, as a matter of fact).
(I'm still a bit short of confirmations that the IPv6 part works correctly. It would be nice if more people with IPv6 connectivity could try it out and tell me.)
Also check out my "sock" program (instructions for use: see comments at the start of the source) for an IPv6-aware equivalent of netcat/socket that uses the spiffy getaddrinfo() function from libc.
Besides this, I think Linux is still wanting in IPv6-aware tools. Now that the kernel supports it and the libc supports it, I think all distributions could afford to ship with a fully IPv6-aware environment. Not having ping6 and all by default is rather ridiculous.
-
Re:These displays were introduced in 1997
This sounds a lot like the `picket fence' method of stereography, which I think was being used far before 1997....
http://www.phys.ens.fr/~schreck /cologram/index.html presents a similar idea, but it uses more than two column-sets, so that one can rotate about the image. -
Yet Another Suggestion
I'm not sure I'm all enthusiastic about the idea of coming up with uncountably many new ways of distributing the DeCSS source (rather than, say, concentrating on proving that it is legal). But if you are looking for yet another way to do it, and if possible one which will get the legal system into a not of paradoxes, I have a suggestion for such a method which might be a novel way of supporting free speech on the Internet if enough people apply it.
--
Posted using the Lizard. -
Bis repetita placent
These questions have been so often repeated, rephrased and turned around that I do not believe anything new can come of them.
The best possible book about the mysteries of consciousness is, IMHO, The Mind's I by Doug Hofstdater and Daniel Dennet. I do not want to dwell upon how great that book is, so I will merely say that I find it equal, if not superior, to GEB.
On the other hand, I think any attempt to explain the mysteries of consciousness by using quantum mechanics is not misguided, but simply misses the point completely.
Also try this text for an idea of the amount of nonsense that can be said about the subject.