Please create an account to participate in the Slashdot moderation system

 



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

Comment Re:Another SLOW Language (Score 1) 279

The JIT and the GC are the two parts of the VM that must be able to escape the constraints of the language model (the JIT must be able to generate executable code, which the Java security model doesn't permit, and the GC must be able to allocate memory and assign it a type and delete objects that are still reachable). Absolutely everything else in a JVM can be implemented in Java fully respecting the language model. You can write almost all of a JVM in Java, as long as you have a small amount of statically compiled Java code that is treated as trusted and so permitted to violate the language invariants. This is precisely how Smalltalk VMs are typically written. There is no requirement for C/C++ to implement Java, it's just an easy way of doing it.

Comment Re: Don't look at it that way... (Score 1) 151

If you're creating a database table, 64 bits doubles the size of the index column. If you're creating a database table in normal form, then you'll have a number of tables that are simply pairs of two indexes, so you will double the size of entire tables. That's going to have big cache and memory overheads and is definitely not a simple 'let's always do that' choice.

Comment Re:More features. (Score 1) 279

I honestly couldn't say. I learned C++ about 20 years ago, hated it, tolerated it a bit while working on LLVM, revisited it in C++11 and discovered that the language had changed beyond all recognition and didn't suck anymore. I like cppreference as a reference for the standard library, but I've not used a tutorial (and I definitely wouldn't recommend the old book that I read).

Comment Re:how about modules? (Score 1) 279

Yes, modules as proposed for C++ (which don't give you what the grandparent wanted: a clean separation between interface and implementation) are pretty easy. Clang has mature support for them and even some logic to implicitly generate modules from headers. They give you a compilation speedup, which is sorely needed for C++, but not the benefit that the grandparent was looking for, though they do at least require that you don't litter your headers with #ifdefs (which means C++ and C can't share modules).

Comment Re:C# vs Swift (Score 1) 76

The term to search for in the research literature is barrier elision. The new and shiny optimisations in Swift are things that garbage collected language implementations have been doing for around 30 years. Finalisers are a pain to support, but you either need to support them or you need some other mechanism for preventing non-memory resource (e.g. file descriptor) leaks.

Comment Re:C# vs Swift (Score 1) 76

The only GC mechanism that requires double the memory that you use is a semispace compactor. A lot of modern GCs use this for the young generation (if the space fits in the cache, it's very cheap, especially if you use nontemporal loads / stores when relocating the objects. Some work at Sun Research a decade ago showed that you could do it entirely in hardware in the cache controller very cheaply). Most GCs use mark-and-compact on smaller regions than the entire heap. You're right that you get some cache churn, but after the compact phase you're getting much better locality so your cache and TLB usage is improved during mutator execution.

Comment Re:So it you watch someone draw the pattern... (Score 1) 139

I think the parent post is eluding to the concept of LEO interrogating people's phones for no reason which is BS. His idea of turning the phone off so that the phone requires passphrase and not just fingerprint is a good idea.

Yes, exactly. But that only works if you KNOW you are about to be interacting with LEO. In the event you are pulled over you do, but most other scenarios you don't have that kind of warning.

I mentioned theft etc because that is the other major threat to a phone. The issue for most people is that the risks to them from theft are quite different to the threats from LEO.

A fingerprint is with password on reboot is a reasonable deterrent to most theives getting at your data. but its not enough for LEO (as they to be able to compel it from you). A passphrase all the time is good enough for both LEO and Theives makes it too inconvenient to use the phone.

That was my point.

PS eluding should be alluding

Comment Not quite (Score 1) 89

There's no voice, only text and data. Reason voice is excluded has to do with archaic regulations as best as I can tell. Things are changing in that regard so it'll probalby change at some point. However right now you get talk to and from the US, Canada, and Mexico. Everywhere else voice is extra charge. Text and data are available in most countries and are included with no extra charge.

Comment Re:Basic income (Score 1) 610

One of the issues is that UBI is different things to different people. Many argue that it will replace almost all other programs, but only if you want the high school dropout that'll take the "one bedroom studio, ramen, and a bag of pot and an World of Warcraft subscription" for a semester or two and lump him in with the faultless traffic accident victim who's fucked up pretty bad and has no realistic prospect of being employed ever again and will have to live at that level of poverty and zero additional aid for the rest of their lives.

Or we could start making value judgements about who "deserves" our help, who are capable of contributing, who has contributed, who's looking to contribute and what help have they already gotten and then we're pretty much back to the complexity where we started. I already pay taxes. If you want to give me a "UBI" all you have to do is adjust the income tax curve, paying out a UBI and then taxing me more to pay for it is just an exercise in how to create black labor and tax fraud.

Comment Re:Through democracy, careful planning (Score 3, Informative) 610

The trouble with all that is branding. When the right wing start a debate they've got simple answers to complex problems. They're always the wrong answers, because if a problem has a simple answer then, well, by definition it's not complex. But those simple answers feel good, sound good, and just got a Demagogue elected President of the United States...

Norwegian here, you don't think socialists have simple answers? Some people have a [something] problem, let's regulate [something]. Which means that right now at 8:30 PM on a Monday I can't buy a damn beer at the store. We need more money for [good cause]? Increase taxes. I could work harder, but I don't. Why? Because on my marginal dollar I pay 25% + 8.7% + 8.2% = 40% taxes and 25% VAT on most things mean I lose another 15%. Sorry for 45 cents to the dollar I'll just get an easy job (37.5 hours/week, paid overtime, flexible hours) and be lower middle class. If was in the US I'd probably work 50-60 hours/week and make $200k.

Getting kickback from creating value is not a socialist virtue, if you got lots of money you can pay lots of money is their thinking. The day we run out of oil all hell will break loose because we're lazy and think everybody deserves good pay just for showing up at work or doing meaningless paper pusher jobs. And since I can't change the public opinion and tax system to reward hard work, I've decided if you can't beat them then join them. Even on cruise control I seem to get praise for good work, which is both cushy and a bit creepy at the same time. Maybe it's just that I can't stand all the stupid and make actual working solutions from time to time.

Comment Re:So it you watch someone draw the pattern... (Score 1) 139

That's a neat idea; i presume you are talking about a mail handling rule/filter on my 'secure email' that forwards the messages to my 'regular email'.

It would be a fair bit of work to setup and test and I worry it would be much too brittle -- I mean how often do i reset passwords or login from new computer; and the vendor could change the message template at anytime, resulting in the notifications not coming through, or the wrong ones coming through.

On the otherhand, it does suggest an idea... to have it forward my phone a generic notification when i get email to the secure email from certain domains. That could work. Not perfect I'd have no way of telling without logging into the secure mail whether it was important or just some marketing blather. Hmm... I could have it preserve the subject line though... and strip the body.

We might have something workable as a strategy here... although getting it to run server side will be a hassle. Looks like server-side mail rules in outlook aren't robust enough; I might be able to do something with exchange/office365 though... but that's a bit of a PITA. For the other mail I'd want this for, its a personal account, but IMAP, hosted by a hosting company ( i ran my own mail server for years, but its more of a pain than I care for; and just not worth my time for one or two accounts anymore) anyhow -- I doubt I'll be able to get any robust server side message scripting for that either.

a simple "Forward subject line only" would be so trivial to have too... I'm almost surprised it doesn't seem to already exist as one of the canned options.

Comment Re:So it you watch someone draw the pattern... (Score 4, Interesting) 139

The biggest problem with a passphrase is that entering it every time you get a text message is obnoxious and intolerable from a usability standpoint.

Your solution of turning it off before a possible event is a step in the right direction, but it's not reliable enough. It works ok when you get pulled over ... you have lots of time between the lights flashing and officer at your window. But for a lot of situations you don't have that luxury. For example, if it is lost or stolen it'll still be turned on, or if you are arrested just walking down the street...

Stuff like samsung knox has the potential to be a good middle ground -- a secure container within your phone. So you can fingerprint/ short PIN to access your phone, GPS, SMS and your pay-by-phone parking app, etc but have your documents and pictures and work email still behind a passphrase.

(I'm not sure how good knox is in particular, but the concept at least I think is a good idea.) And I realize for some people even the SMS and parking app they want behind the passphrase because it'll reveal who they talked to or where they parked etc... I get that. Security is always a trade off between convenience and security... for me always passphrase is too obnoxious to use -- I tried it, while only fingerprint or 4-digit PIN is far too weak to protect say, my email (more from theives than from law enforcement... ) the potential damage a theif could do with my phone is scary.

The only reasonable solution with current phones is to not have much of anything on them. So for example, the email account I have have linked to the domain registrations and various other online services and resources I have access to is NOT on my phone. This is frequently inconvenient and bit ironic -- on the one hand I WANT the notifications of any activity on those accounts immediately notified to me, but the risk of someone getting into my phone (e.g. by observing me enter my PIN, and the stealing it) and being able to take control of those accounts via the linked email and 2FA which is tied to that number... is too great.

Maybe knox type solutions would be a solution... i just haven't actually had the time to try it.

It'd be nice though if various cloud service providers would let you register a separate notification email in addition to the admin email. So that I could receive notifications like 'a user has logged in from a new computer to your account..." on my phone without that being the email address being the one that can also be used to retrieve/reset login and password credentials.

Comment Re:More features. (Score 1) 279

In 1997, std::vector was not legal syntax.

1997 was prior to C++ becoming standardised, so there was no standard library. The vector from vector.h in SGI's STL was similar to the standard library vector, but it was not part of the standard library. The STL was also still available for a good decade or so after it was deprecated in favour of the C++ standard library.

Another change that happened involved the meaning of delete with respect to arrays. Old code would introduce bugs if compiled with new compilers and new code would leak memory if compiled with old compilers. That fits your time window.

Only if your compiler is buggy. Arrays have required deletion with delete[], not delete, for as long as the language has had a standard.

Comment Re:C# vs Swift (Score 1) 76

The design of ARC does nothing to reduce false sharing. Until 64-bit iOS, Apple was storing the refcount in a look-aside table (GNUstep put it in the object header about 20 years before Apple). This meant that you were acquiring a lock on a C++ map structure for each refcount manipulation, which made it incredibly expensive (roughly an order of magnitude more expensive than the GNUstep implementation).

No, they didn't. There was one byte for the refcount, with 1..127 meaning "real refcount" and 128..255 meaning "(refcount - 192) plus upper bits stored elsewhere". The look-aside table was only used first if the refcount exceeded 127, and then the refcount would be 192 stored in the object, and the rest elsewhere. The next change would happen only if you increased or decreased the ref count by 64 in total. Very, very rare in practice.

Slashdot Top Deals

Your code should be more efficient!

Working...