Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:So they only prosecute a safe, "no-harm" target (Score 1) 32

It's not news to hear them take down trivial targets, let's hear it when they actually take down bigger fish

Taking down easy targets is what the beginning of taking down hard targets looks like. Enforcing H1-B laws at all is rare enough that even the small fry are newsworthy. Lets hope there's some actual follow-through.

The H1-B laws as written are pretty good: you have to pay at least average, and you must have at least tried to hire a US citizen. We all know companies that cheat on this, but I've worked for plenty that don't cheat. It's easy to know the cheaters, because all, or nearly all, low-level employees are H1-Bs.

Companies just trying to fill reqs with qualified people will have a real mix of citizens, green cards, and various visas. That's what it looks like when you're desperate to hire, and you'll find a way to hire anyone who gets through your interviews: a diverse mess of immigration statuses. And, importantly, they're all employees, not any outsourcing going on.

OTOH, if you're a body-shop outsourcing company that just competes on price, it's almost all H1-Bs (except some management), no one on green card track, everyone underpaid, so damn easy to see what's happening there. If only the federal government gave a fuck.

Comment Re: A real Java compiler? (Score 2) 57

Have you tried Managed C++? I've been through this 3 times now, and each time the team didn't believe me until we did the experiment. There's a quite nice boost in performance when your C++ code can, e.g., iterate through a list of strings as input without any copying or marshaling.

More complex classes require conversion or some tedious hand-coded wrappers, but we did a lot with just library containers, and the ability to just use C# objects directly from normal C++ code that knows nothing of .NET (thanks to some wrappers) is quite nice.

I also do this all the time between my C# (tools) code and C++ (game engine) code, and I've never found it constraining, although it's certainly tedious to recreate all the APIs in C. Creating a C-style interface for just about any C++ objects is reasonably straightforward if you break it down into handle (address of object) + method

The awkwardness depends a lot on whether your C++ style is "never (need to) explicitly clean up anything ever" code, or "C code with classes". If you're still doing the latter, catching exceptions and returning status codes, explicit clean-up code at the bottom of functions, or in destructors, that sort of thing, then it's not a big deal to make C-style wrappers.

OTOH, if you're using scoped objects and not in the habit of explicit clean-up, then it gets really awkward when you start doing stuff like: OK, I need to return an array. I can't return a pointer to my vector, since no shared pointers, so I'll have to copy it into a C-style array. Who's going to free that? Well, obviously, the caller should allocate it, and free it when appropriate, but how does the caller know how big to allocate? OK, I need another API function to just get the size, which is going to have to do all the same work. And so on and so on. All solvable, but you end up with a lot of copies being made, and a minefield for either leaks or dangling pointers if you don't completely understand how long the managed code is going to use that pointer you gave it.

So much easier for the C++ code to just take a reference to a vector as input, and never even realize it built a CLR List instead of a std::vector as it went (or, worst case, return a shared pointer to a vector, and copy it into a CLR list - less efficient, but no leaks or dangling pointers possible).

Comment Re:finally, the year of the Linux desktop (Score 1) 111

As the sibling post says: Ubuntu blows goats. Ubuntu nags me constantly to reboot, far more than MS's traditional once-a-month. With Win10, MS finally catches up to Ubuntu's almost-weekly reboots.

(Of course, you can just ignore the Ubuntu nagging, unless your company has a policy requiring you to reboot when nagged.)

Comment Re: A real Java compiler? (Score 3, Insightful) 57

C++ just requires a thin C layer around the object oriented calls

Ah, yes, the "thin layer" that means you don't work directly with STL vectors, strings and maps, and, well, objects. Also, no exceptions. Bridging between an OOP language and an OOP language via C code means you need two awkward transitions between C-style code and OOP code.

I've done that far to many times. It can be quite constraining for your C++ code, depending on what kind of problem you're trying to solve. Also, that kind of marshaling is expensive. I've worked on plenty of Java codebases where 90% of CPU time was various serialization and deserialization code.

Well, better than nothing, but JNI was really intended to allow small chunks of C code to either do a bit of expensive calculation, or be a custom driver, or just wrap a system call that Java didn't, but in any case be a synchronous part of a Java function call. Much like C# with it's built-in marshaller, which punishes you for doing anything beyond wrapping system calls that the .NET runtime doesn't.

Comment Re:A real Java compiler? (Score 2) 57

This is about "ahead of time" compilation, otherwise known as "compilation", which third-party tools have done forever. Linking to C in Java is its own world, and I don't know how practical C++ is.

It's dead easy to bridge between C++ and C# at runtime using Managed C++ (or whatever they call it these days). The C# marshaller, the built-in way to get C objects from C# code, is slow painful garbage that no one should use, but it's easy to do the conversion in C++ and either object conversion or using objects directly is very fast that way.

You can compile C# to a proper EXE or DLLs easily enough and it will happily load C/C++ DLLs. The reverse is a bitch though - I've heard it's possible (the .NET runtime is also just DLLs), but I never got it to work properly.

You can (awkwardly) run C code from Java, including loading DLLs, but I've never heard it's possible to do the reverse. What can C code do with a JAR?

Linking all three would be a bragworthy project, but I think Java is just missing the key concept here.

Comment Re:Sorry online is all I've got right now (Score 1) 165

I disagree entirely. I started a D&D campaign and found a bunch of people on Meetup that wanted to play at my house. Now i have a bunch of friends. It's really that simple.

Jobs? You haven't found what you are good at yet, apparently. Keep looking.

Women? Women want security. Give it to them.

Slashdot Top Deals

What this country needs is a good five cent microcomputer.