Live data from Hacker News

Rawdrawandroid – Build Android apps without any Java, in C and Make

github.com

41–50 of 157 posts

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#41

Earlier quoted context omitted.

It depends purely on what you’re making. It would be silly to write low-level software in Java, or high-level software (with exceptions for software which would require a low-level language) in C.

> It would be silly to write low-level software in Java Depends on what kind of low-level stuff.

If you're going to nit-pick then at least do us the favor of writing something interesting, like a case where Java was a surprisingly good choice or some interesting libraries.

Yes, of course there are exceptions to every rule. In general, as much as I love the language, Java is not always going to be the best choice.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#42
post #31
post #23

Earlier quoted context omitted.

So which other actual alternative should we use for Android development besides Java and webapps.

Quite a few game engines work and don't use Make.

Game engines that we can readily use to code for Android outside the Java and web frameworks? Which ones exactly?

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#43
post #20

Earlier quoted context omitted.

Looking at the Flappy Bird post earlier I noted the structure of the repo to be simultaneously elegantly structured and yet still more complex than I would prefer. The structure is (using [dirname] notation for directories) [Repo Root] ...git and github files, READMEs... [Flappy Bird] ... project files, keystore, build.bat ... [App] [build] ... I'm ok with tools making a mess here as long as outputs is tidy ... [outp…

The `src` folder is structured that way because the Android NDK demands it. They're not just chosen by convention, but because the build tool searches for those files and subdirectories.

Yeah, that feeds back to the tooling issues that the post I was replying to was talking about.

Ideally tools should support, not dictate. For instance, if you were building a simple source only app with no assets, a good tool should be able to be pointed at, say, a main.c file in the directory and be able to use the contents of the directory containing main.c for other required files and work with no special extra configuration. Supporting a structure to keep things clean is great, Imposing one(whether you use the features it offers or not) is poor.

I might take a look at the NDK and see if it can be circumvented.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#44

Honestly the whole java/kotlin tooling is the worst to pick for mobile dev, and KEEP it after so many other great languages and tools that are out there. I don’t why google didn’t offer at least Go as a native alternative for android dev.

That'd require some form of collaborative behavior across internal organizations, and real planning! I wake up every morning and thank God that Flutter exists. I can target Android without dealing with building on years and years of sloppy work. Sunk-cost fallacy x politics leads to this never being fixed. I don't think Google can fix it, unless hardware fails entirely. There's been years-long politics that culminate…

>I don't think Google can fix it

Can they eventually throw away Android and replace it with Fuchsia? In the reporting about Fuchsia that I read ages ago, it sounded like it was intended to be an Android replacement but, looking into it again just now, it seems more like an embedded OS for other non-smartphone hardware -- maybe with some (aspirational?) claims of utility on smartphones and tablets.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#45
post #5
post #2

This is pretty great. The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain. Java is a sucky language to write; Kotlin is less bad, but the whole build tooling/package management/IDE mania mess is still a hassle to use. So thanks to the author.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

> I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything.

This used to be 5-6 years back. These days it is very stable.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#46
post #2

This is pretty great. The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain. Java is a sucky language to write; Kotlin is less bad, but the whole build tooling/package management/IDE mania mess is still a hassle to use. So thanks to the author.

> The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain.

Wait till you want to build anything reasonable.

All libraries for Android are in Java and/or Kotlin. If you have to write all of them in C then best of luck doing anything meaningful.

What kind of libraries? Anything related to SSO. Anything related to Material design. Anything related to any ancillary services that you want to integrate with e.g. Google services.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#47
post #5

Earlier quoted context omitted.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

Same thing with XCode. I'd love a mobile app development pipeline that lets me never use either Android Studio or XCode. Let me drive everything with scripts and/or VSCode extensions.

Isn't flutter (especially including the flutter rust bridge), achieving that? You do need Android Studio and XCode installed on your machine but you don't have to interact with them directly.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#48
post #5
post #2

This is pretty great. The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain. Java is a sucky language to write; Kotlin is less bad, but the whole build tooling/package management/IDE mania mess is still a hassle to use. So thanks to the author.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

This is why folks should stick with Maven and live a happy, generally drama-free life.

As a Gradle veteran, I've written in detail about this previously:

https://news.ycombinator.com/item?id=38875936

TL;DR: Gradle is too powerful (which is fun and seems valuable at first!) with too many footguns. Combine this with the mandatory update migrations and you're literally signing up for future pain compared to using a lower change-rate build tool like Maven. Do you really need to run arbitrary commands to build your app? If so, take a deep gaze in the mirror and reflect on what you're doing with your life.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#49
post #27

Earlier quoted context omitted.

Obviously the complete and utter crap that gradle/maven are is much better, right?

Yes. Definitely. Ignore your blind rage of Gradle/Maven for a second and realize that they’re literally next iterations of Make.

It's not blind rage. I've used them, they're over-engineered crap, like most things Java, especially the abominations made at Apache land. You can't say Make is over-engineered; lacking, maybe, but it does what it's meant to do and not much of anything else.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#50

Earlier quoted context omitted.

It depends purely on what you’re making. It would be silly to write low-level software in Java, or high-level software (with exceptions for software which would require a low-level language) in C.

> It would be silly to write low-level software in Java Depends on what kind of low-level stuff.

No, it doesn't.

Java is a piece of crap with JVMs imposing an 8-24 byte overhead per object, which destroys caching, memory footprint, and any chance of low-level optimization. Not only is the overhead bad, it's implementation-dependent, i.e. unpredictable. That, along with lacking SIMD, imposing stupid decisions like bounds checks on all array accesses, making arrays boxed (int[] is not an array of ints, sorry), or using exceptions for control flow, which is the wrong way to use exceptions, is a just part of the big laundry list of why Java is a piece of obsolete crap that nobody serious about low-level hardware programming uses. Java SE/ME is a fucking joke, as is every book I have read about "high performance Java". People who promote Java for low-level hardware programming, real-time systems, and the like, just have absolutely no fucking idea what they're talking about and they get their garbage published only because of the low standards of publishing nowadays. They do get the "Java Champ" badge from Oracle, though. Noobs award other noobs badges, as it turns out.

Post reply on HN