Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 18 Jan 2008
Offline Last Active Today, 10:41 AM

Posts I've Made

In Topic: Your Preferred Os And Why

Yesterday, 10:59 AM

One thing I really don't get is why the whole Ubuntu on Windows is such a hyped feature? I've been using Cygwin for 10 years or so now, which has pretty much all of the tools and stuff from the OSS world, so what is so much better with running native Ubuntu binaries? Can the native Ubuntu binaries even interact with native Windows binaries (for example, piping output to eachother etc)? I'm guessing I'm missing something big..?
The one big thing about Cygwin is that it's an emulation layer. For the most part, that's rather meaningless, but there is one notable exception which is very, very disturbing.

GNU tools (or pretty much every Unix software) assume that you can fork() rather cheaply. It copies the page table, marks it COW, and brings another process into existence, that's it.


But Windows does not expose this functionality in its ordinary, publicly accessible API (although the kernel could very well do it). Instead, it can only spawn fresh processes with their own, separate set of pages. Which means that in order for programs that rely on fork to work, Cygwin has to do an awful lot of work, copying around memory between processes, and it effectively doubles the pressure on the page manager (because... no sharing pages). This is why GNU tools suck so much, it's why people start to puke when someone innocently writes "to build, simply run ./configure" -- running ./configure takes about 30 times as long as on a Linux machine, for no directly obvious reason.


Now, with this native Ubuntu-compatible Unix layer, forking means simply that, forking. No copying around stuff, no sucks. This is big win.


That, and of course you can directly use the up-to-date packages intended to run under present-day Ubuntu, rather than some UnxUtils or GnuWin32 packages from around 2008.


The interaction between Unix and Windows processes is... uh... limited. Let's use that word. But the point is, you can run native executables which can access the file system, and they don't suck.

In Topic: Does anyone have any advice for my unique situation?

Yesterday, 03:37 AM

Samoth, I think that might have been an age thing. Norman sounds like he is somewhere near my age, and I know I hadn't even considered the newer Star Trek and was only thinking about TOS when we were talking about that.

Well, discussing TOS is bound to be most controversial, but I'll take the bait. I watched them when I was a kid, and it was way better than "Space 1999", which aired at about the same time here. Although of course being better than "Space 1999" was not much of a challenge. The toy version of the "Eagle" transporter was admittedly awesome. Much unlike that cheap China toy stuff nowadays, it was made mostly of metal. But the series were wasteful for the electricity needed to operate the television set, thus obviously Star Trek was win.

So, around 40 years or so later, TOS made it onto Amazon Prime, and I was happy to be able to rewatch them. Oh the good old times. I could hardly do the first season because it's so abysmal, and I had to wonder how I could ever have watched this as a child, and how ever a second season could have been produced. I found it very hard to even sit through the second season and skipped on the third one. Your mileage may vary. I'll admit that this is highly subjective. But you shouldn't assume I don't know the old series.

Anyway, even in TOS, it is pretty clear that WMDs readily exist, for example on every starship. In the mirror universe episodes, Spock-with-beard shows us that the venerable old Enterprise's phasers are easily capable of destroying an entire city, and worse. Let's not even think about World War III, which is a very real "historic fact" in TOS, or the Planet Killer which was already mentioned earlier by someone else (Norman I think?). In that same episode, they're thinking about converting the impulse drive to a 90-megaton bomb, by the way. Hell, only about twice the size of the Tsar Bomba, but not a weapon of mass destruction?

It is also very explicit in TNG (unless Gene Roddenberry and Les Landau also don't get Star Trek right). In addition to the examples given earlier, I remember this planet where Picard falls down that cave and breaks a leg. On that planet, they sell drones that will take out an entire planet's population (which ironically eliminated their own population, only leaving the welcome hologram behind). And then there's the mention of isolytic subspace weapons being banned in the Khitomer treaty. Which obviously means they must have been used prior to the Khitomer treaty.

Section 31 [...] and anything done by JJ Abrahms

Ah, you seem to be unaware of Section 31's appearance in the series a decade prior to JJ Abrams making his first Star Trek movie (the one before the one you mention). Think more like William Sadler, not Peter Weller / Benedict Cumberbatch.

ship come OUT OF a Black Hole????? I'm confused... he must not actually know what a Black Hole is

He is in good company, then. I don't know either, I've never seen one, nor been close to one or gone into. Have you?

Dude, this is sci-fi on television. You discuss the plausibility of flying through a black hole, but you readily accept faster-than-light travel, transporter technology, and holodecks. All the destroy-the-clone discussions and the "sub quantum level, blah blah Heisenberg compensator" babble aside, did you ever wonder where the soul goes when you are transported? In Star Trek, sentient beings have a soul. Unlike in the real world, it's not a belief, but a fact. Where does it go when you transport the being? Those people who were doubled in transporter accidents, do they have half of a soul each?

Oh, and then there's instant (not just pretty fast, but instant, no-delay) two-way video communication across distances of some dozens of light years. You can even have video communication with people who are in locations where no camera is being found. Underground, too, so it can't be the most awesome camera capturing them from orbit. You can switch on an exterior view of your starship any time you need, too. Magic cameras. Oh, and infinite detail reconstruction in photos, including details that are not visible from the point of view of the camera, and the like stuff (n.b.: all of the many "CSI" series have that amusing trope, too). Also, the very detailled complete, utter bullshit (including, and in particular warp speeds, shield power, and the stunning amount of how one of three select drugs which cure every illness within seconds is perfectly plausible. The TOS Enterprise can travel a thousand times faster than the Voyager if need be. But yeah, why shouldn't it be acceptable. It's TV, not science class. Every alien looks like a human, more or less, and talks English, too.

However, a scary, big ship full with angry Romulans from the future coming out of a rip in timespace caused by a black hole is entirely impossible to think of. How dare they show us such nonsense! :D

In Topic: Does anyone have any advice for my unique situation?

28 August 2016 - 11:00 AM

discussion about few weapons of mass destruction being around in Star Trek

How can anyone who has seen more than a dozen or so episodes claim such a thing, and be serious about it?

It's being stated, and explicitly demonstrated at several occasions that a single "ordinary" photon torpedo will anihilate an entire city or a colony. The Enterprise has demonstrated that their phaser can burn a 5km deep hole into a planet's crust in 10 seconds, no problemo. It's been explicitly demonstrated that photon torpedoes are equipped with shields powerful enough so they can penetrate a planet's mantle, and even a star's corona, and explode within. The Enterprise once accidentially, and the Klingons deliberately, destroyed an entire inhabited planet's atmosphere within 5-6 seconds, with a single shot.

The DS9 episode "Business as Usual" makes mention of at least a dozen weapons of mass destruction which they might sell to that nutter of a regent who wishes to kill 20 million people instantly and have another 20 million croak within a month or so. They settle for something that Quark can apparently more or less pull out of a sleeve just like this (organize within 2-3 days), so it must be readily available.
Both Eddington and Sisko use weapons of mass destruction on a Federation planet and a Cardassian colony, respectively. In the episode where the Enterprise gets some ratiation cleaning treatment and Picard goes back to get his riding saddle, it is mentioned that the warp drive's waste makes an excellent weapon of mass destruction, that's the stuff the terrorists were after, too. There's an episode with a prion bomb, and one with an engineered virus, and there's the Harvesters. The Dominion uses a kind of genetically engineered virus, as does Section 31.

The Borg use million-isoton scale bombs which are stated as being able to eradicate an entire solar system with one blast. Not big enough? The Malon use bombs in the billion to trillion isoton range. Even the venerable old Genesis Device from Wrath of Khan can be considered a perfectly able weapon of mass destruction, the Klingon do anyway. Soran's trilithium device can easily take out a solar system, too.

Let's not forget the thalaron cannon in Nemesis. Which can reduce a room full of people to ashes, or everybody aboard a starship, or an entire planet's population, whichever you like best.

Really... you think there are not a lot of weapons of mass destruction in there?

In Topic: Reading multiple datagrams from UDP socket

28 August 2016 - 10:05 AM

WSARecvFrom allows multiple buffers for purposes of scatter/gather, but only returns one message at a time. Also, this is pretty clear, because it only returns one socket address. Similarly, recvmmsg() only really makes sense for connected sockets, because it, also, doesn't return the addresses of any of the messages.
For the common use case of a UDP server talking to more than one client on the same socket, neither of those functions are appropriate.

I've never tried WSARecvFrom, as stated. However, recvmmsg certainly works for datagrams from different addresses. It returns a pointer to a return-value sized array of mmsghdr structures, each of which contains a msg_hdr structure and the receive length for that particular message. The msg_hdr structure contains a member msg_name, which is the originating address.

In Topic: Reading multiple datagrams from UDP socket

27 August 2016 - 06:59 AM

If avoiding syscall overhead is your goal, you have to move away from the standard socket interface into platform-specific extensions. For example, you can use recvmmsg under Linux to that effect (note the double "mm", this is not a spelling error). Works reliably. Similarly, WSARecvFrom under Windows lets you specify more than one receive buffer, which should (I've not tested, no need) work that way, too.