Pike 7.6 Released 67
An anonymous reader writes "Today version 7.6 of the Swedish programming language Pike was released. Some of the noteworthy additions are support for the Bittorrent protocol, the OBEX protocol (to communicate with cellular phones), IPv6, PGP and Bz2. If you want to beat the crap out of your Python/Perl program speedwise, try porting it to Pike..."
Someone please explain to me.. (Score:4, Insightful)
Re:Someone please explain to me.. (Score:3, Informative)
BitTorrent torrent = new BitTorrent();
torrent.get("Star Wars Episode 3.avi");
Re:Someone please explain to me.. (Score:2)
This really got to the heart of Sun's Vison of Java vs. Microsoft's Vision of Java. Microsoft looked at Java and said, "Nice Language," and proceeded to create wrappers for their Windows platform and called it a "Good Thing." Sun said, "A pox upon thee! For thou hast strip'd the soul from Java!" (
Re:Someone please explain to me.. (Score:1)
Please fix your sig. It is wrong. (Score:1, Offtopic)
It's wrong.
President Bush was born on July 6, 1946, in New Haven, Connecticut...
There's nothing wrong with it (Score:1)
Re:Please fix your sig. It is wrong. (Score:2)
Re:Please fix your sig. It is wrong. (Score:2)
Re:Someone please explain to me.. (Score:5, Informative)
It's the same as how PHP supports the ftp protocol.
Re:Someone please explain to me.. (Score:2)
You could claim perl supports (take your pick, there is a prewritten module for EVERYTHING). But it would make more sense simply to say perl is a complete programming language (meaning if it's software, you can do it).
Re:Someone please explain to me.. (Score:2, Insightful)
Re:Someone please explain to me.. (Score:1, Offtopic)
Second, Christopher Columbus didn't discover North America, this is a common Myth sadly propogated in the lower grades in school and then generally retaught in high school... yet another example of our piss poor educational system.
Re:Someone please explain to me.. (Score:2, Funny)
Re:Someone please explain to me.. (Score:1)
Re:Someone please explain to me.. (Score:1, Funny)
I had not known PHP supported the File Transfer Protocol protocol. FTP protocol transfers occur via your NIC card. I I wonder if that's the protocol used in ATM machines, you know, when you put your PIN number in?
Re:Someone please explain to me.. (Score:1)
10 input $fname
20 bittorrent $fname, "wares.exe"
30 goto 10
How much faster? (Score:4, Interesting)
Why would someone want to use pike rather than a better-known langauge?
Re:How much faster? (Score:2, Informative)
Re:How much faster? (Score:1)
Looks like a minor speed increase to me.
But then, I'm looking at a shootout from 2001. Have things changed?
Re:How much faster? (Score:3, Informative)
The biggest nicety with pike is not the speed though
Re:How much faster? (Score:1, Informative)
Re:How much faster? (Score:5, Informative)
row 1: ackermann 8
row 2: ary3 7000
row 3: fibo 32
row 4: hash 1000000
row 5: hash2 200
row 6: heapsort 100000
row 7: lists 128
row 8: methcall 1000000
row 9: nestedloop 20
row 10: objinst 1000000
row 11: random 1800000
row 12: sieve 1000
row 13: strcat 5000000
Java PHP Perl Pike Python Ruby TCL
1: 4.13 12.72 4.89 0.61 4.55 9.32 Failed (Ackermann)
2: 1.69 11.87 4.85 1.38 3.06 8.61 14.88 (ary3)
3: 2.90 12.09 6.69 1.44 4.27 6.96 11.57 (fibo)
4: 6.85 5.92 5.57 4.71 3.69 17.90 7.83 (hash)
5: 7.15 4.95 3.98 2.28 2.93 3.98 5.11 (hash2)
6: 1.53 8.59 3.57 1.12 2.54 6.29 8.34 (heapsort)
7: 5.54 Missing 3.21 2.76 2.06 2.43 27.30 (lists)
8: 2.18 Missing 6.70 2.15 4.68 3.47 Missing (methcall)
9: 7.30 Failed 17.92 0.90 13.52 35.70 34.25 (nestedloop)
10: 3.65 Missing 13.08 3.34 5.68 6.19 Missing (objinst)
11: 1.99 5.81 2.33 2.30 2.94 5.96 5.85 (random)
12: 6.59 Failed 12.27 4.66 9.77 18.19 50.58 (sieve)
13: 3.19 4.63 2.30 1.78 4.46 3.73 7.05 (strcat)
Languages and Libraries (Score:3, Insightful)
Contrast with C, Java, or Scheme.
Re:Languages and Libraries (Score:2)
an intrinsic function and a library function in
Scheme?
I note that the Java language specification spends
quite a few pages on defining the library routines
which are required by the language.
Likewise C has "standard library" functions which
may be implemented by an external library or as
intrinsics by a compiler.
Why should there be a strong difference? Isn't
extensibility a good thing?
Re:Languages and Libraries (Score:3, Insightful)
Library functions are any which can be (but don't have to be) implemented in terms of other existing functions. As you note, the JLS specifies a bunch of primitive functions. These are the functions without which it would be difficult or impossible to write other Java programs.
The problem with not ha
Re:Languages and Libraries (Score:3, Insightful)
Perl, for example, whose language and syntax is frightingly complicated because of the inbreeding between language and library.
Care to qualify that at all? How are perl libraries any different than in any other language? They don't alter the core language in any way(at least not without serious voodoo). In fact, perl 6 is going to allow libraries to introduce new syntax, which seems to contradict what you were saying about it.
Re:Languages and Libraries (Score:2)
Well, even if they did, wouldn't that be a meta-object protocol, generally considered to be a Good Thing?
Re:Languages and Libraries (Score:2)
Perl has some problems but the way libraries work is not different to most other languages.
Pike has cool new concepts (Score:2, Interesting)
private void
show_user(int|string id, void|string full_name)
{
write("Id: " + id + "\n");
if(full_name)
write("Full name: " + full_name + "\n");
}
notice the first argument can be either a string OR an int - but nothing else. Sort of like limited generics.
Re:Pike has cool new concepts (Score:1)
Re:bork bork bork (Score:4, Funny)
bork bork(bork bork, bork bork)
{
bork("bork, bork, bork!\n");
}
Re:bork bork bork (Score:1)
Re:bork bork bork (put ze cheeken in de oven) (Score:3, Funny)
This 32-bit register always points to the translated instruction on the stack : this means that the PUSH and POP operations would be specified in pseudo-C as:
*--BORK = value;
value = *BORK++;
Or use compiled Python.. (Score:2, Interesting)
Or use the Psyco [sourceforge.net] runtime compiler for Python. It gets to within 50% (or more) of the performance of C in many cases.
I'll make the dumb joke! (Score:4, Funny)
Re:I'll make the dumb joke! (Score:2)
Pike 7.6 adds RDF and OWL support, too. (Score:3, Informative)
kinda OT (Score:3, Insightful)
having stuff supported at the programming level is stupid
Whatever happened to 'everything is a file'
Plan9's [bell-labs.com] user level file systems are far more suitable.
One programs services to appear as file system in the process' namespace. The canonincal example of this is ftpfs [bell-labs.com] which presents a remote ftp server as part of one's local file system.
By using this method, *no* programs need be compiled with knowledge of the ftp protocol and sockets nd the like. In fact it wouldn't even know it was talking with an ftp server.
All services and devices are presented like this in plan9. Most things can be achieved with cats and echos.
Re:kinda OT (Score:4, Interesting)
Re:kinda OT (Score:2)
There are multiple interfaces to the graphics side.
sound : cat soundmusic.pcm > /dev/audio
: /dev/mouse
what to know what the mouse is up to
cat
Anyway my point was that if one wrote a bit-torrent file system in plan9 then *every* programming language would suddenly have bit-torrent capabilities.
It's all about 9p.
I have python libs that can do 9p so it's not
Re:kinda OT (Score:2)
I wounder could you do a seek on a multimedia file to a timecode with that system? Or would you have to do a seek to a byte in the multimedia file to start it from a certian location?
Re:kinda OT (Score:2)
reading and writing is by offset and count.
Which also means that giant sparse files are trivial to implement.
It's just a protocol for manipulating a file tree. A suprisingly simple concept that yields so much more than it sounds.
Re:kinda OT (Score:2)
Re:kinda OT (Score:2)
http://plan9.bell-labs.com/sys/man/5/INDEX.html [bell-labs.com]
one supplies an offset and count and the server returns whatever data it feels like.
So yes, you are free to play games with the units be it bytes or timecode.
one issues
size[4] Tread tag[2] fid[4] offset[8] count[4]
and gets returned
size[4] Rread tag[2] count[4] data[count]
tag is an ID for this request, fid is an id for the file
size is the packet size, the rest is the payload.
The thing you would have to be careful of, though, is the
Re:kinda OT (Score:2)
I should also mention that one *big* problem with backporting such a system is the division between user and kernel space.
Unix is broken by design. The inventors themselves say so. They redesigned it to make hard things easy and plan9 [bell-labs.com] was born.
Durable != optimal
BAD IDEA (Score:3, Insightful)
Ever since the first networks, the "holy grail" of networking computing has been to provide a programming interface in which you can access remote resources the same way as you access local resources. The network becomes "transparent".
One example of network transparency is the famous RPC [techtarget.com] (remote procedure call), a system designed so that you can call procedures (subroutines) running on another computer on the network exactly as if they were running on the local computer. An awful lot of energy went into th
Re:BAD IDEA (Score:2)
you make some valid points for WANs
but the constant gains outweigh the infrequent losses
my LAN *is* always available
single step debugging a broken process on a MIPS machine in NY from an x86 in Paris made possible by such things are such a gain that saying 'yeah but what about resume uploading eh, bet you hadn't though of that?' is a bit specious.
Re:BAD IDEA (Score:2)
and what a wonderful hammer it is, coming to you soon in the OS of your choice.
don't get stuck on the FTP and networked stuff, there's plenty of scope for file tree based applications. Nothing is a solutiuon for everything but why ignore it for the applications tht could really benefit.
my mailbox is one big file but it's presented as a file system
cd
grep birthday */subject
Re:BAD IDEA (Score:1)
You could have just linked to Joel's rant [joelonsoftware.com] instead of copying it without attribution.
Anyway, I think that the way to go is to make the standard local-file-access API more powerful. That way, you can still have a unified API. Which is why "FtpOpenFile" isn't the best way to go.
And it doesn't necessarily have to be much harder to access local resources with the more powerful API. The common/simple cases can be streamlined. For example, language features like exceptions can let you ignore errors th
pretty syntax (Score:1)
Speeding up Perl/Python (Score:3, Interesting)