News for hackers. Stuff that matters.
Re:S.e.p.i.a. – Digital voice assistant by xrd on Tuesday March 08, 2022 @11:24PM (#30610917)
Seems strange that this requires java. Feels like they could get better performance from a compiled language and it would run on lower profile computers.

But, still, an exciting project. I would love to rid my house of Google Home devices which are training my kids to think Google is god.

Re:S.e.p.i.a. – Digital voice assistant by mulmen on Tuesday March 08, 2022 @11:27PM (#30610935)
Then… rid your home of them? You bought these and put them in your home. You are equally empowered to remove them.
Re:S.e.p.i.a. – Digital voice assistant by xrd on Tuesday March 08, 2022 @11:36PM (#30610993)
It's a tradeoff between agonizing over the bickering of my kids or agonizing over the music they play which stops the bickering. Google Home makes the latter choice simpler than handing them my phone. I'm aware I'm fully responsible for my own choices and I can still feel regret for where I'm at given those choices.
Re:S.e.p.i.a. – Digital voice assistant by hunter2_ on Tuesday March 08, 2022 @11:59PM (#30611105)
Could have a cheap/old tablet/phone that lives on the coffee table or whatever for them to select music, with app pinning perhaps, not even locked if nothing important is logged in, instead of handing them yours.
Re:S.e.p.i.a. – Digital voice assistant by MisterTea on Thursday March 10, 2022 @02:48PM (#30631550)
> It's a tradeoff between agonizing over the bickering of my kids or agonizing over the music they play which stops the bickering.

My parents would simply scream with a loud bang from a foot stomp or fist slam "Enough!" OR "shut up, the both of you!" which worked very well. Did not require purchasing anything, accounts or internet connection.

Re:S.e.p.i.a. – Digital voice assistant by Handytinge on Friday March 11, 2022 @06:04AM (#30638510)
Regret is fine for unmodifable decisions in the past. It's odd to regret something in the future you control.
Re:S.e.p.i.a. – Digital voice assistant by chockchocschoir on Wednesday March 09, 2022 @07:39AM (#30613780)
> Seems strange that this requires java. Feels like they could get better performance from a compiled language and it would run on lower profile computers.

I feel like the meme that Java is slow and bloated needs to die. Java can be very fast, and also runs on fricking SIM cards that have extremely limited processor and memory.

Re:S.e.p.i.a. – Digital voice assistant by zaarn on Wednesday March 09, 2022 @10:54AM (#30615810)
SIM Cards running Java run an extremely cut down version of Java that removes basically all features that go beyond what C can do with some sprinkles on top. The biggest issue with large Java applications is real and it usually relates to either GC churn or inefficiencies. Source: Running several large java applications as professional sysadmin.

Granted, often enough Java is fine, it doesn't use too much overhead, especially once the JVM is warmed up. But the bloat is real and it's partially related to the language itself but plenty of it is also systemic.

Re:S.e.p.i.a. – Digital voice assistant by Vetch on Wednesday March 09, 2022 @02:01AM (#30611678)
> Seems strange that this requires java.

A lot of deployed deep learning is in Python so I doubt this will matter. Looking at the docs, it looks like the main speech to text is python heavy, it leverages elasticsearch and calls libraries that are bindings to code written in C++. As none of that overhead will ultimately matter for anything approaching the fidelity you get with cloud services, cost benefit trade off favors Java in this scenario.

> lower profile computers

When it comes to deep learning, this just isn't the direction things are headed. If you want the best results with low latency, your home server is going to have to be fairly beefy with a decent GPU and lots of memory.

Re:S.e.p.i.a. – Digital voice assistant by unhammer on Wednesday March 09, 2022 @04:05AM (#30612403)
> > lower profile computers

> When it comes to deep learning, this just isn't the direction things are headed.

You're not going to be training the models on the raspberry pi, just running them. There's a huge difference in requirements there, and lots of progress has been made towards squeezing models into phones etc. ( https://pytorch.org/mobile/home/ ). There are also efforts like like https://github.com/XapaJIaMnu/translateLocally , https://neural.mt/speed/2021/

Re:S.e.p.i.a. – Digital voice assistant by marginalia_nu on Wednesday March 09, 2022 @06:32AM (#30613378)
Java is a compiled language, and its overhead is fairly insignificant these days.
Re:S.e.p.i.a. – Digital voice assistant by lijogdfljk on Wednesday March 09, 2022 @08:23AM (#30614122)
Honest question, as i've never used Java.. why do i need to install various Java runtimes then?

As someone who never uses Java _and_ still dislikes it, it's because i've had to install that damn runtime a thousand times. At least Python has the simplicity in coming pre-installed on many systems. I can't count the number of times i've installed/uninstalled Java.

Also, back in the day i was used to seeing some Java systray icon. I imagine that built some dislike towards Java too.

Re:S.e.p.i.a. – Digital voice assistant by marginalia_nu on Wednesday March 09, 2022 @08:33AM (#30614212)
You need runtime libraries for all compiled languages, including C.

At any rate, Java isn't a client language. It's very much geared toward server development. It's not impossible to write client software with it (see Minecraft), but it's really clunky and not really suitable. They've basically done everything they can to make it as awful as possible to use for desktop users, basically ceding the ground to C# almost more through self-sabotage than losing a fight.

I don't want to be conspiratorial, but it can be suspected Microsoft and Oracle had lunch together and came to some sort of an agreement.

Re:S.e.p.i.a. – Digital voice assistant by undecisive on Wednesday March 09, 2022 @10:05AM (#30615169)
This often takes a long time for people to understand. Java applications are not "native".

Think of it in terms of human languages.

C and C++ (and many - but not all - compiled languages) get compiled into Native program, so they get compiled into instructions that talk the computer's language, and when they get run they talk directly to your computer... albeit with a thick accent. So a linux machine can only talk to your machine via the linux kernel, a windows machine talks with a windows accent, macs... you get the idea.

Because of this thick accent, programs cannot be shared between different operating systems (though there are some amazing projects out there that either do some accent translation, or more recently, do clever things to avoid any accent at all. There are almost always limitations to what can be done here though.)

That's not to say that sometimes, they don't need help. These "helpers" (or Shared Libraries - aka DLLs or .so files) might be absolutely necessary for a certain program to run, because the developers don't want to reinvent the wheel. So as someone else pointed out, even with native programs you sometimes need to download extra bits to get them running. But as you've noted, this is a lot more rare, and it doesn't usually change HOW you run the program, merely what needs to be installed first.

PHP, Ruby, Bash etc are Interpreted - so they need a special program that does the talking to the machine (again, via the kernel). This means they don't need to be compiled, which makes them quicker for developers to write, and easier to run on windows / linux / mac using the same codebase. But like with a human interpreter, it generally takes at least 2x as much energy to get the message across, which usually means a sometimes significant slowdown.

Note that this is not the same as having a Shared Library - and in fact these programs sometimes do use Shared Libraries directly. With interpreted languages, the interpreter starts first, it gathers together some core resources and ideas that it will need to be able to do its interpretation, and then it will load the human-readable program. Some shared libraries will be loaded by the interpreter, and some will be loaded later once the interpreter has seen the code.

Java is in a special category. It is both interpreted and compiled - that is to say, it compiles to something that looks a bit like a native program, but it still has this interpretive layer that gathers together core resources and ideas that the compiled program can then use - we call this part of the interpreter a VM, or Virtual Machine. It then loads a program that is very much not human-readable into that VM, which then does all the translating.

The theory is, Java could be the best of both worlds. It can have speed closer to a compiled language (and in fact, can sometimes be a little faster in places, as the VM contains some nifty tricks to move things around on certain machines) and yet the compiled languages can be run on any machine that has the Java Runtime installed (I believe they coined the phrase "Write once, run everywhere" which very soon got corrupted to "Write once, test everywhere" because the first few versions of the Java VM were spectacularly buggy)

As for that dislike of Java, I will point out that I spent 5 years writing Java programs. Once I was no longer forced to write Java programs, I stopped, and haven't touched it for at least 10 years. Because while Java could be the best of both worlds, it wasn't then. And it might be much better now... maybe. I cannot forgive it for the years of my life that it stole; and am now very happy in the arms of pretty much any other language.

Re:S.e.p.i.a. – Digital voice assistant by TrueDuality on Wednesday March 09, 2022 @10:27AM (#30615485)
The JVM is still operationally a nightmare. Without knowledgeable tuning it requires a lot of memory even for the smallest of apps which is the most expensive resource right now in computing and vastly constrains deployment.

That's not even getting into the Java ecosystem which is vast, but it's full of nightmares like remote debugging ports that allow unauthenticated remote access to the JVM's memory space.