* Posts by karlkarl

1085 posts • joined 10 Apr 2015

Page:

Is it time to retire C and C++ for Rust in new programs?

karlkarl Silver badge

> Lifetime of objects is outside the scope of binding generators (I think that's your point, though)

Yeah, so game over.

C++ avoids all this waste of time.

karlkarl Silver badge

Exactly. So back to my original statement. Being able to consume C code *is* its most important feature of C++. This is why it remains more critical than Rust and all others.

karlkarl Silver badge

"Sure I do! Most of my work is FFI."

Annoyingly posts can't be edited with whatever web browser theregister thinks I am using.

The fact that most of your work is FFI does suggest to me that you might be better seved by using C++ directly in your projects? Then you can focus on making software rather than bindings with FFI.

karlkarl Silver badge

So you would know that binding generators can't understand lifetimes of data. RAII, GC is all very unsafe and manual pinning is slow and error prone.

Likewise function callbacks with void * user data. How do you get that working safely? I'm going to assume your answer is lots of manual hours spent?

karlkarl Silver badge

"I would recommend reading the bindgen"

I'm going to assume you don't often use binding generators (such as Swig and bindgen). Otherwise you would know their inherent limitations compared to direct interop.

karlkarl Silver badge

"TypeScript's most powerful feature is that it can directly consume JavaScript code"

Typescript would not even exist if it couldn't directly consume JavaScript.

karlkarl Silver badge

C++'s most powerful feature is that it can directly consume C headers. It is not a mathematical superset of C but in practice 99.999% of stuff just compiles and works (or can be tweaked) and that is all that matters.

Rust will beat C++ once it can consume C headers directly without needing bindings. FFI, like JNI is time consuming and error prone. The bindings created tend to rot because they cover the entire API so are very fragile to breakage in a tiny area you might never even use. Creates.io is a lazy solution to an unnecessary problem that can instead be avoided by just using a homogenous language in your projects.

This is simply no good. Legacy code will not be rewritten, people will continue to use C for libraries because they can be wrapped by all languages.

If C++ *needs* to be replaced, then CppFront, Carbon, heck even Objective-C++ would be where I would place my bets. In the industry, changes need to be evolutionary rather than wasting our time rewriting stuff that has already been solved.

Mark Russinovich knows this, he is just being a twat.

IBM's 'bare metal' LinuxONE push: Did somebody say OpenShift?

karlkarl Silver badge

When you access RHEL on one of the LinuxONE machines it is really bare bones and "clean".

Yet, from the amd64 installer, I have yet to find the "minimal" install option. There is "custom operating system" but that still installs a load of crap.

When I install it manually on aarch64 (dnf into a chroot, similar to debootstrap / pacstrap) I install the "core" group but it still has more random cruft installed like Plymouth hooks compared to IBMs LinuxONE images.

Not enough of an issue to raise a ticket, more just a personal annoyance. What I really want is the concept of a "base" like the BSDs (and AIX) provides.

(apologies for my ramble. certainly recommend having a play. Perhaps buy one or two of the mainframes to heat up your house :)

Microsoft among software titans under spotlight for restrictive licensing

karlkarl Silver badge

Re: Meanwhile at Oracle...

I wonder if the super yacht catalog only works on Edge on Windows ;)

karlkarl Silver badge

Windows, how retro is that?

I think I recall my gradfather using that OS for his personal computer.

I suppose the world moves on.

Arm founder says the UK has no chance of tech sovereignty

karlkarl Silver badge

I feel tech sovereignty is actually very easy. The issue is that people don't like to settle for old and stable and instead want more, MORE, *MORE*.

Worst case scenario we could go back to z80 and build up again. These are easy to fabricate, well reverse engineered, already have some decent (albeit slightly bitrotted) software.

It could probably even be done by a single person!

IBM updates desktop mainframe emulator

karlkarl Silver badge

Re: Translation

Is that clause even legal? It certainly doesn't seem enforcable.

Teardown shows Apple iPhone 14 Pro is not pro-repair

karlkarl Silver badge

Re: Hard to make something pro repair and anti theft

Ironically thieves manage to steal and sell your iPhone just fine. Always have, always will. It is only legitimate consumers that struggle like a bunch of consumer sad acts.

Rust is eating into our systems, and it's a good thing

karlkarl Silver badge

Re: Something C++ can do that Rust can't

And liberal use of unsafe {} to support the char* C-style strings I suppose.

karlkarl Silver badge

Re: Something C++ can do that Rust can't

What? And marshal the data (i.e std::string) between them? No thanks. Spending my time writing bindings is not productive when I can just stick to one homogeneous language.

Unlike good ol' C, the C++ and Rust languages also have weak ABI compat making this a further waste of time.

In Rust We Trust: Microsoft Azure CTO shuns C and C++

karlkarl Silver badge

Re: People who say "C/C++" don't understand the differences between C and C++

Whilst I agree, at least C++ is close(ish) to being a superset. It is actually closer to "modern" C than old K&R C is to C11.

What really hurts is C/C++/C#. I keep having to instruct HR when they put out job adverts to *not* do that. It is embarrassing ;)

karlkarl Silver badge

Agreed, I think many of my current reservations with Rust will be improved. I certainly do hope so anyway.

I think a GCC implementation will really help consolidate Rust. For one a single vendor is never a good idea. It will be interesting to see how it will work though, things like rustup and crates.io will need to become substantially more complex to support both. Actually, the many different C and C++ compiler vendors is probably why we don't have a single "standard" language package manager, instead delegating that role to the operating system's packaging system.

For the FFI stuff, I would really like to see a tiny C compiler bolted onto Rust. Not really to write substantial code in it but perhaps inlining some of the C glue, within unsafe{} sections to reduce the burden of a full fledged binding dependence. I.e if I only need two functions from a C library, I don't want to drag in a full binding with full coverage (including the fragility that comes with that).

> We're seeing increased regulatory pushback against reckless use of third-party dependencies

I do hope this does get resolved. I do dislike having to constantly more and more push back against other developers with their age old argument of "why reinvent the wheel? It may not be round and it is full of punctures but... I'm lazy, careless and have poor work ethic, etc".

karlkarl Silver badge

As an avid C programmer, I actually quite like Rust. However it's crates.io language based package manager encourages the fast and sloppy NPM, CPAN, PIP-like development style of dragging in an irresponsible number of dependencies to i.e compare a string.

Also, the way bindings work is that they often need to provide full coverage of a C library. This means that rot due to API breakages is likely. And ironically you end up with more C code acting as binding glue than if you wrote the entire program in C! The fact that C++ is 99% a semi-superset of C is so very valuable for its success in accessing direct C. Rust does not have this. Instead the FFI needs to be used in a similar way to JNI/Python, etc. This is error prone and needs to be done "unsafely".

The Rust language is good, the individual code is good but the projects are too full of technical debt that it is a non-starter for me. I am very interested in using a subset of C or C++ with a borrow checker-like functionality however. Even if just available at debug-time.

Personally I am surprised to hear Mark Russinovich spout any impossible nonsense about "deprecating" languages. For one Rust's dependence on LLVM would kill it.

Oracle brews Java 19. Mmmm, kinda tastes like RISC-V

karlkarl Silver badge

So rev up those factory factories, and come on in!

Intel pushes out NUC mini PC with Arc graphics

karlkarl Silver badge

Re: Linux support

Plus, Intel has a good habit of maintaining and updating its *Linux* Intel GPU drivers long after Windows (vendors) have dropped support.

I am expecting good things from the Intel discrete cards. They might even become collectors items! XD.

Grand Theft Auto 6 maker confirms source code, vids stolen in cyber-heist

karlkarl Silver badge

Ooh, so there is potential for some digital preservation of GTA (5 it seems).

This is unfortunate news for the shareholders admittedly but pretty darn good news for keeping fun games alive. Personally I would rather GTA 3 but I suppose it isn't exactly a buffet!

Now that the source is out, they should consider selling licenses to it for personal use (I imagine many individuals will pay much more for the code than the compiled build itself). Perhaps we can get some patchkits going for BSD/Linux ports. OK, now I am dreaming ;)

Don't say Pentium or Celeron anymore, it's just Processor now, says Intel

karlkarl Silver badge

Re: trademarks

Did anyone own X Windows though?

For example Microsoft's Java (J++) caused issue with Sun Microystems, but C# (same codebase as J++) didn't because C and C++ were open standards but no single company to defend IP.

I believe that was same with X-Windows.

The next deep magic Linux program to change the world? Io_uring

karlkarl Silver badge

Hasn't io_uring been around for many many years now?

I remember the day it first appeared, twits flocked to the FreeBSD forums and mailing lists to whine that FreeBSD was old because it didn't have sodding io_uring ;)

Linux luminaries discuss efforts to bring Rust to the kernel

karlkarl Silver badge

Re: All of that effort

That may be so, but a homogeneous codebase (i.e C everywhere) is still easier in this regard. No bindings needed at all.

C++ being a 99% "superset" of C kind of achieves this but there are a few other issues.

That said, much of the AMDGPU drivers is C++ and it seems to integrate OK with the rest of the kernel.

Nearly one in two industry pros scaled back open source use over security fears

karlkarl Silver badge

Open-source or not, this is surely an obvious choice.

Seeing projects (typically web) pulling in hundreds, if not thousands of dependencies from PIP, CPAN, crates.io, NPM, etc always makes me cringe.

Did anyone ever think this was not going to result in a security issue (and other technical debts). Especially in network related software it seems particularly mad.

Maybe open-source is getting a bit of flack because this kind of development style is less common with proprietary software. No language based package managers just for close-source for example.

Automating Excel tasks to come to Windows and Mac

karlkarl Silver badge

2007 is much more recent than the last update to many components in the NT kernel. Can we not call that abandoned now?

Draft EU AI Act regulations could have a chilling effect on open source software

karlkarl Silver badge

The GPL has:

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

I don't see how any law can undermine this.

Microsoft: The deadline to get off Basic Auth is approaching

karlkarl Silver badge

If you use DavMail (http://davmail.sourceforge.net/), you can bridge between Microsoft's niche protocol and actual secure IMAP(s)/SMTP(s) standards.

If many of you have this kind of bridge between your IRC client and crap like Discord/Slack, then you are likely already familiar with the concept.

Former Microsoft UX boss doesn't like the Windows 11 Start menu either

karlkarl Silver badge

In that case, enjoy it whilst you can. KDE 6 might change the workflow and desktop metaphor entirely.

The International Space Station will deorbit in glory. How's your legacy tech doing?

karlkarl Silver badge

Re: A strange set of priorities

All that hype just for a couple of minutes? Typical celebrity crap!

Darn, we are well off target. I was hoping to see him stranded up there permanantly during my lifespan :/

karlkarl Silver badge

Re: A strange set of priorities

There is already enough money on Earth to solve these issues already. We don't need to defund space to do so.

The fact that an unlimited amount of money *still* wouldn't be enough to solve the issues on Earth caused by greed and criminals is all the more reason that we need to learn more about space. For example, last time, Bezos was up there for a couple of hours; I am hoping next time we can keep him up there for a couple of months at least!

Critical hole in Atlassian Bitbucket allows any miscreant to hijack servers

karlkarl Silver badge

I don't think at this point in time anyone truly believes that a cloud provider *doesn't* have a critical hole allowing someone to hi-jack their servers.

Using internal servers but using GitLab, Bitbucket, GitHub as extra backup dumps is what I imagine most guys do. That way the CI systems can grab from a more sanitized machine and yet you can still make use of their generous hard disk space.

James Webb Space Telescope finds first evidence of CO2 in exoplanet atmosphere

karlkarl Silver badge

I imagine it would be easier to find life on different planets if they splurged their sewage into their rivers and beaches. The telescope could detect how many floaters per square meter.

Shame only an absolutely failing species would do that.

Universal Unix tool AWK gets Unicode support

karlkarl Silver badge

I am a big fan of Awk. I tend to use it in scripts which requires lists which is just a little out of reach of /bin/sh scripts. I still find it renders Perl and Python a little unneccesary for most sysadmin tasks.

Since it is a requirement for SUS and POSIX platforms so is pretty much always around in various forms, I am fairly surprised it isn't used more as a Makefile generator. I used it for this not long ago and I was surprised how effective it was:

https://gitlab.com/osen/openbsd_drmfb_gnuboy/-/blob/main/configure.awk

karlkarl Silver badge

Re: GIT- Aptly named

>> Try setting up a Subversion server yourself

I don't know, SVN's svnserve was pretty darn convenient. The alternative for Git to prep an inetd daemon, a httpd/CGI or locking down a restricted SSH shell account is in my opinion a little fiddly.

The rest I agree with though, Git makes very tricky things possible compared to others. Even in small teams where some of the complexity is overkill, it is still worth using Git, if anything to avoid the need to use different RCS systems per project.

Solaris is in maintenance mode – but Oracle added a significant feature anyway

karlkarl Silver badge

An old stable OS that is barely going to change until 2034? Sounds bloody awesome on paper to be honest.

Annoyingly the only unreliable input is Oracle.

NASA selects 'full force' for probe into UFOs

karlkarl Silver badge

$100,000?

That will barely be enough funding to get past the interview stages...

Excel @ mentions approach general availability on the desktop

karlkarl Silver badge

Re: Gerrof my lawn!

Now imagine typing "@John69 Think about it for a bit." into excel and observe how pointless it all is.

Oh Deere: Farm hardware jailbroken to run Doom

karlkarl Silver badge

So once the DRM kicks in, at least you can do *something* useful with the hardware ;)

This tiny Intel Xeon-toting PC board can take your Raspberry Pi any day

karlkarl Silver badge

Looking at past history, in 10 years it should still be possible to purchase Pi4 hardware. I am not quite so certain with Asus.

I can't find any supply EOL statements.

It's 2022 and there are still thousands of public systems using password-less VNC

karlkarl Silver badge

We use passwordless VNC. Admittedly we only let it listen on 127.0.0.1 for SSH tunnelling.

And to be fair, when we update our server, I am going to ideally try to get it to listen on a UNIX domain socket instead. More recent versions of OpenSSH allow encrypted tunnelling to UNIX socket endpoints.

General Motors charges mandatory $1,500 fee for three years of optional car features

karlkarl Silver badge

Re: Microtransactions?

Possibly, but the opposite is:

"I buy a new BMW because I am far too rich and important to fsck around with $18 transactions every so often and other poor people problems."

So if it is not for the rich guys, and it isn't for us un-rich guys... who is it for?

Rescuezilla 2.4 is here: Grab it before you need it

karlkarl Silver badge

Re: NetBSD

UFS (sometimes called FFS) is not actually a standardized implementation.

For example OpenBSD's UFS and FreeBSD's UFS are different and incompatible. This is also quite a different UFS used in UnixWare.

Same with v2 unfortunately.

Businesses should dump Windows for the Linux desktop

karlkarl Silver badge

Re: preaching the gospel

Noooo!!!

Get with the times. It is a strong 1.2%. Geez!

But it is also growing at an infinite rate. 5 years ago it was 0% so...

1.2% / 0% = NaN%

Luckily I like *nix more than I like games. That is kind of liberating I guess.

Lenovo updates ThinkPad mobile workstations with AMD variants

karlkarl Silver badge

I don't buy new (mainly because I despise all vendors). But I do look forward to some of these filtering down through ebay :)

Parallels increases prices with Desktop version 18

karlkarl Silver badge

Ah, right; missed that.

It is available, but it is a bit of a faff.

If you are interested, have a flick through of this Windows on ARM (Raspberry Pi in this case) guide:

https://www.tomshardware.com/how-to/install-windows-11-raspberry-pi

I believe it is the same Windows 11 image.

karlkarl Silver badge

>> despite there being no generic downloadable ISO for it.

If you are on Linux / BSD, the following URL allows you to download a raw Windows 11 .iso (Win11_English_x64v1.iso):

https://www.microsoft.com/software-download/windows11

If you attempt that URL and it detects a Windows user agent, it dicks you around with weird online downloaders and other non-standard crap.

Report slams UK plan to become 'science superpower' by 2030

karlkarl Silver badge

England will never focus on science and improving knowledge.

All we ever do is sell shite consumer phones to each other all day.

Linux may soon lose support for the DECnet protocol

karlkarl Silver badge

Perhaps read my post again and you will see that I was talking about drivers in general by that point. My whole post was about seeing if drivers can be put into long term storage rather than destroyed.

Most drivers need plumbling. Network drivers need the i.e TCP/IP stack, GPU drivers need i.e the DRM/DRI stack.

karlkarl Silver badge

Whilst I am not particularly attached to a DECnet card, it would be good if rather than removing it from the kernel and putting it in the bin (or in the depths of Git repo), if it could be isolated into a single .h and .c file and made portable and easy to maintain / re-integrate for those interested.

Yes, there is more to it than just a driver, there is much plumbing (especially for older GPUs too which is where my main thoughts are). However it could be quite a unique feature of Linux to deprecate and remove things in a less "breakful" manner.

It might not be possible, then fair enough but honestly I feel open-source operating systems are the only ones that could get close to achieving this.

Page:

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER

Biting the hand that feeds IT © 1998–2022