As promised, PHK has released an early version of Ntimed, his NTPd replacement. While some are disappointed that it wasn't written in rust or go or haskell, it has the support of the Linux Foundation and even the Network Time Foundation - "Harlan from The Network Time Foundation has agreed to adopt Ntimed and it will run in/with/parallel to the NTPD project." A version 1.0 is expected in Q1 2015.
Related Stories
NTP, the Network Time Protocol, has announced six serious vulnerabilities. Not surprising, I guess, for 192,870 lines of code dating back to the early 80s. For anyone else that's shocked by that bloat, OpenBSD's OpenNTPD manages to get the job done in under 5,000 lines. [Ed's Comment: To be fair, the linux implementation of ntp does achieve far more than the OpenBSD version. This is acknowledged in one of the links below.]
Note: Additionally, noted Danish FreeBSD developer extraordinaire Poul-Henning Kamp (PHK), operating under the influence of the Linux Foundation's cash hoard, has been working on an ntp replacement which is expected to preview this weekend.
(Score: 0) by Anonymous Coward on Monday December 22 2014, @06:55PM
PHK wrote a system daemon and as of Dec 2014 there's no suitable replacement for C.
go is fine for a limited subset of in-house systems programming, not for something portable that you want to distribute.
Rust is not stable. I've built rustc from git once a week / fortnight for over a month and I've not once been able to get it's package manager to compile due to constant breakage. Todays attempt yielding:
Wonderful eh?
Haskell (ocaml and friends) are academic languages with little real world uptake. Anybody can write an ntpd replacement in these languages safe in the knowledge the final program will be ignored outside the language community.
(Score: 2) by middlemen on Monday December 22 2014, @07:03PM
You forgot Node.js !!!!!
I am going to write a time daemon in javascript... it will be the simple function
(Score: 1) by monster on Tuesday December 23 2014, @03:59PM
While I agree with most of what you said, Ocaml has some real-world weight in it. MLdonkey [sourceforge.net], a multiprotocol P2P server written in it has been available for many years, showing its potential as a general purpose language.
(Score: 3, Insightful) by Subsentient on Monday December 22 2014, @07:07PM
Disappointed it's in C? SCREW you. I'm glad! I can read it!
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 2) by maxwell demon on Monday December 22 2014, @07:21PM
Of course. Given its business importance (time is money, remember?) it should have been programmed in COBOL! ;-)
The Tao of math: The numbers you can count are not the real numbers.
(Score: 3) by Wootery on Tuesday December 23 2014, @12:57PM
Bring on the buffer-overflow problems...
Something nice about C++: it's fairly trivial to implement a compile-time flag which decides whether to do runtime bounds-checking.
(Score: 2) by meisterister on Monday December 22 2014, @07:26PM
+1 to this. The fact that some hipster douchebag could be disappointed when a program is written in a real programming language is kind of saddening.
(May or may not have been) Posted from my K6-2, Athlon XP, or Pentium I/II/III.
(Score: 2) by Hairyfeet on Monday December 22 2014, @07:53PM
Ugh, fucking hipsters. Only hipsters would have language snobbery. Languages are no different than any other tool, just as you wouldn't drive screws with a wrench each language has its ups and downs, only hipsters would try to make this into a popularity contest.
ACs are never seen so don't bother. Always ready to show SJWs for the racists they are.
(Score: 2) by jackb_guppy on Monday December 22 2014, @08:07PM
Actually there are screws you drive with a wrench. They are call Lag-bolts for wood. They are also a form of self tapping screw.
Now bolt is also a screw. That is what the threaded part is. So again a screw is driven by a wrench. Also a nut is screw (negative or inverted) so gain a screw is driven by a wrench.
Now, back to real conversation.
0 = Binary Machine Code
1 = Assembler
1.5 = C
2 = PL/1
3 = Basic, Cobol, RPG, ...
3.5 = C++
4 = ADA
So where is your language in that scale. I know of OS that have been written normally in 2 and below of that list.
(Score: 2) by fadrian on Monday December 22 2014, @09:46PM
You forgot 6 = Smalltalk and 8 = Lisp. I'd put Clojure in there, but (a) it's still pretty new, so I'm not sure of its longevity yet, and (b) I'd have to make sure the rating went to 11.
That is all.
(Score: 3, Interesting) by c0lo on Monday December 22 2014, @10:09PM
At +5 - Common Lisp (grin. Large grin. An even larger grin – just in case you didn't realize: I'm kidding).
Also missing from or misclassified** in the list:
---
** I did chose to ignore RPG, as the acronym is ambiguous enough to allow the "Rocket propelled grenade" interpretation...
... this interpretation is to be taken together with the adage of "If by using explosives you don't solve the problem, you are clearly not using enough" (if you don't believe me, you haven't watched Myth-busters enough)
https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
(Score: 2) by jackb_guppy on Tuesday December 23 2014, @12:47AM
Cobol was developed to business mainly. Self documenting. Main Frame
RPG (Report Program Generator) was created for Insurance Industry to translate the backalak (sp) board of old card sorter, collator and printer to electronic processing. It was free language on IBM Mid-range computers from 1970's on and have has large following in small to medium companies. Still in use by companies as large as Disney.
Now Lisp 4.75 (price not rating :-P)
(Score: 1) by PiMuNu on Tuesday December 23 2014, @10:41AM
But python is just a bit of API fluff around some C code... so not clear how you can separate them...
(Score: 2) by LoRdTAW on Monday December 22 2014, @11:00PM
First off, screws are fasteners that use a simple machine, the screw to fasten things. Lag bolts are not self tapping. They are large wood screws that diplace material by compression as they are driven. Tapping is the process of removing material to make threads. Sheet metal screws also deform and displace material to form a thread but some have tapping and drilling formations to aid in this process. And that only works in sheet metal up to a few mm thick. After that you need an actual drill bit and tap to cut threads. A tap has threads much like a screw but they have sharp edges to actually remove material and flutes to facilitate chip removal.
And think about your post for a second. There are many types of screw driving methods. Sure some screws have hexagonal heads but others have any number of common, uncommon, security or proprietary driving methods. You can argue that screws can be driven with a wrench, which is true, but only for some. And not all driving methods are equal. Some driving methods are better than others for certain tasks. Here at work we use a lot of socket head screws which are also known as allen or hex heads. They work better for low clearance applications, and we make a lot of fixtures which meet that criteria. For wood screws the superior driving bit is the Robertson or square drive bit. It almost never cams out and the screw holds on for dear life via friction thanks to its tapered design. When my father owned a machine and wood working shop he exclusively used Robertson screws for wood working because they made assembly much easier. How many times have you seen some stupid noob drive phillips heads with a screw gun only to have it cam out and then continue to try and press harder while camming out stripping both the screw and bit. That almost never happens with Roberson screws. Tools can be misused by the inexperienced. And some tools make things a bit more fool proof.
Computer languages are the same. Sure you can use a screw, but how is it driven? Is one method better then the other? Or does it boil down to convenience? If my shop mainly works with socket heads screws then we will mainly stock those screws. And we will use them where they aren't really needed but will work just fine. But not everyone has an allen wrench set, though, we have dozens (in various states of completeness).
C is the phillips head of programming languages (bear with me, I am using this analogy loosely) because everyone has a phillips screw driver. C is also the closest you can get to assembler with some higher level syntax. It can also be used on bare metal without any libraries OR runtime. Most of those newfangled languages have large runtime overhead in terms of binary and memory size. So C wins in terms of simplicity and is also pretty simple to use, if you know what you are doing. So it is a trade off.
(Score: 2) by jackb_guppy on Tuesday December 23 2014, @12:37AM
Actually tap does not refer to boring a hole. Tap mean to cut threads. Have you heard of tap and die sets? Tap installs/cuts internal threads. Die cuts external threads. Both can be used to chase (cleanup the threads)
Some screws can drill their own holes and then tap the threads into martial. You see them with sheet metal normally with a tip the looks like drill bit. Somve screws can also be referred to self tapping have sharp points to open a hole. Like wallboard screws.
Now back to computer part of this conversation.
I do not know of any computer that can run C code. I know of "compilers" that will translate C to Assembler, P code or Binary code. It is that last form that CPUs run. If it converts to Assembler or P code, then another process will change it to Binary code.
(Score: 2) by LoRdTAW on Tuesday December 23 2014, @06:34PM
Never said tapping is boring, though I said material needs to be removed prior to tapping. That is why a tap drill is used; a drill bit sized to the hole needed to cut the desired thread size. Tapping most always refers to a cutting tap which is a subtractive process that removes material to form the threads. However, there are taps that rely on deformation and they are usually referred to as fluteless taps. It is a cold forming process that is usually performed by a machine.
Sheet metal and wood screws (including lag screws) are in a class of their own. No one refers to the holes they leave behind as tapped. There is also no standard for wood screw threads including pitch, depth, angle, etc. Self tapping sheet metal screws are a bit of a misnomer. They really don't tap anything, they just deform and push their way into material. The hole the leave behind isn't guaranteed to be reuseable. The drill portion is there to make a pilot hole so the screw threads grab into the material. They are limited to thinner sheet metals where tapping machine screw threads would be impractical. The self tapping machine screws are also limited to pre drilled or stamped holes in thin materials and also for thread chasing. An example would be the screws on electrical switches and receptacles. They have a tapered end with an interrupted thread to facilitate threading or chasing.
You tell me :-)
Don't be a pedant or play stupid.
(Score: 2) by LoRdTAW on Monday December 22 2014, @11:35PM
As much as I like playing with new languages, the problem is maintainability. Go, Rust, Haskell are all interesting languages with Rust being the more interesting of the bunch. But look at it like this: you don't want a core set of OS utilities written in a multitude of languages, many of which have a very small community behind them. Imagine the disaster of maintaining an OS with portions written in C, Rust, Go, Haskell, Ada etc. It would be a nightmare to build and maintain. You also have to realize that you then need to install all of the tools for each of those languages when building the OS for distribution. And the maintainers would have to be proficient in all of those languages to debug various build problems. I can't even begin to fathom how hard that would be. Different build scripts pulling in multitudes of different libraries and interfaces so everything plays nice. Screw that.
Everyone knows C (well hopefully) and C runs on every CPU imaginable. It has almost zero overhead and no runtime. So C is the lowest level language to use that also happes to be readable enough to be easily understandable by experienced C programmers. And there are vastly more experienced C programmers than experienced Go, Haskell, Rust or [insert modern cutting edge language here] programmers. Save those neat high level cutting edge languages for applications that can be tossed away after a few years (if there is such a thing).
(Score: 2) by Gravis on Monday December 22 2014, @08:47PM
mod parent up!
(Score: 2, Funny) by ghost on Monday December 22 2014, @07:46PM
(Score: 0) by Anonymous Coward on Monday December 22 2014, @07:51PM
I know you jest but be careful what you wish for... [freedesktop.org]
(Score: 2) by tynin on Monday December 22 2014, @09:54PM
I wasn't sure why someone would want to reimplement NTP, but after reading his site the Linux Foundation has been paying him to review the code for NTP (considering how many systems use ntpd, it was likely a wise move). From his blog:
I spent a couple of months going through a lot of the source code, and there is a lot of it: 100 KLOC, looking for bad news, and fortunately I only found a few minor nits, worrying, but not advisory material.
100.000 lines of code is insane for a program which basically steers your clock to some remote server, it can be done in 1000 lines if you really squeeze it.
At the end of my review, I concluded that trying to slim down the current monster would be a lot more work and effort than simply starting from scratch.
http://phk.freebsd.dk/time/20140926.html [freebsd.dk]
(Score: 0) by Anonymous Coward on Monday December 22 2014, @11:58PM
Why would the Linux Foundation fund this when they have the one true way that is systemd-timesyncd? I suppose I can see some logic as NTimed will run okay on FreeBSD -- just like hoards of former linux users.
(Score: 2) by kaszz on Thursday December 25 2014, @12:30AM
They actually had the desired it to work? :P