News for hackers. Stuff that matters.
Re:Show HN: Cross-platform desktop applications with PyQT by symlinkk on Tuesday February 06, 2018 @06:07PM (#16320820)
People like you hate the idea of using JavaScript to write desktop apps because you feel like the end result is too slow and inefficient.

Web developers hate the idea of using C++ to write desktop apps because the language is brittle, outdated, and overly complex.

We need a middle ground: a language with the syntax of a scripting language, like Python or JavaScript, that compiles down to native code, like C++ or Rust.

I am under the impression that Qt is attempting this with QML and JavaScript.

Re:Show HN: Cross-platform desktop applications with PyQT by petre on Wednesday February 07, 2018 @12:47AM (#16322473)
Well, we have Vala. It compiles to C just like Nim and it's used for GUIs, although it's Gtk specific and some would argue it's not a programing language:

https://blogs.gnome.org/despinosa/2017/02/14/vala-is-not-a-p...

Re:Show HN: Cross-platform desktop applications with PyQT by earenndil on Tuesday February 06, 2018 @08:49PM (#16321667)
Nim[0]? Ante[1]? Perhaps even D, although that's pushing it.

0: https://nim-lang.org/

1: https://github.com/jfecher/ante

Re:Show HN: Cross-platform desktop applications with PyQT by shakna on Tuesday February 06, 2018 @10:03PM (#16321950)
Lua?

Its fairly fast, easy to link out to C if you need to. There are versions of the VM that are blisteringly fast, like Luajit, and others that are tiny like eLua.

Its syntax is incredibly easy, as is most of the language to understand.

It can be event and callback oriented.

And though dynamic, most gotchas about JS don't apply, as it isn't overly eager to typecast everything.

Re:Show HN: Cross-platform desktop applications with PyQT by guhcampos on Tuesday February 06, 2018 @09:21PM (#16321801)
Rust might eventually get to that point, and C++ itself with QT is relatively easy if you stick to the basics. But in a way, anything trying to please both higher level and lower level developers is going to have to settle for some kind of middle ground.

The best situation I can think right now, and the one I would adopt myself, is indeed PyQt. Mostly because Python makes it easy to drop the compute-heavy application code into C extensions, not because of the GUI toolkit itself.

Re:Show HN: Cross-platform desktop applications with PyQT by notRUSTY on Tuesday February 06, 2018 @10:06PM (#16321962)
Rust has been harder for me to pickup than C++.

I want to like it. The problem is that the one character symbolic syntax notation remain nonsensical and seem arbitrary to me.

Re:Show HN: Cross-platform desktop applications with PyQT by yorwba on Wednesday February 07, 2018 @12:03AM (#16322350)
What exactly do you mean by "one character symbolic syntax notation"? I can't think of anything in Rust matching that description that doesn't exist in C++ as well.
Re:Show HN: Cross-platform desktop applications with PyQT by oblio on Wednesday February 07, 2018 @04:03AM (#16323153)
I'm guessing its this:

https://github.com/rust-lang/rust-wiki-backup/blob/master/Si... ->

> (eg &'a T)

If you look at the popular web development languages, they don't really have sigils. Javascript/Flow/Typescript/Coffeescript (front end). Java, C#, Python, PHP (ok, I'll grant you $). Ruby is a bit of an oddball and I guess it's part of the reason Python is overtaking it.

Basically, unless you've been working in C/C++, you've never really used funky symbols to denote "modifiers".

Say what you will, but

> public static void main

is easier to Google and even to parse for most people.

Keep in mind that the vaaaaaast majority of devs today have never worked professionally in C/C++. I'd imagine some of them have never even touched it, even as a hobby.

Re:Show HN: Cross-platform desktop applications with PyQT by yorwba on Wednesday February 07, 2018 @06:12AM (#16323684)
The comment I was responding to was explicitly comparing it to C++, which is what confused me.
Re:Show HN: Cross-platform desktop applications with PyQT by oblio on Wednesday February 07, 2018 @06:35AM (#16323766)
Oh, right.
Re:Show HN: Cross-platform desktop applications with PyQT by petre on Wednesday February 07, 2018 @12:44AM (#16322462)
You should probably try D then. It's easy to pick up and very powerful once you learn most of the language features.