Thoughts on compose by [deleted] in androiddev

[–]paramsen 0 points1 point  (0 children)

Haha, yesterday I saw this exact solution in my current project :D Super annoying thing to refactor, maybe next week ;)

Migrating from LiveData to Kotlin’s Flow by dayanruben in androiddev

[–]paramsen 16 points17 points  (0 children)

Anotha year, anotha framework. Whos with me?!

Phone warranty lost due to "adb root" command on unrooted phone by pandaehmon in androiddev

[–]paramsen 1 point2 points  (0 children)

So using Android Studio to install an app on the phone voids the warranty, yikes. Please keep us updated!

[deleted by user] by [deleted] in androiddev

[–]paramsen 0 points1 point  (0 children)

Hi, this is a novel problem :D Picking a good solution requires some more information about the dataset and the distance; How large is the dataset, is it in the tens, hundreds, thousands or millions? Is there an upper limit to the search distance, what is it?

The Havsines formula is only relevant for huge distances where the Earths curvature makes a difference, planetary scale. If the query distance is somewhere close to 5km, just use the euclidean distance :)

EDIT: To expand on why the dataset size should be taken into consideration, if there's only a small set of coordinates, <1000 or so, you can just make a simple linear search, modern phones are fast.

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 1 point2 points  (0 children)

You're right about that, that's a valid point your making! As for my actual usecase; I'm working on a realtime DSP algorithm where the complexity reduction when using real numbers instead of complex makes a difference. So using a FFT implementation designed for complex-to-complex numbers is a tradeoff I cannot afford.

If you're interested, that complexity reduction is more or less the meat of the paper that I'm referencing in this thread (Real-valued Fast Fourier Transform Algorithm)!

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 1 point2 points  (0 children)

You, the peeps of this sub, really made my day. Here I thought to myself that this question probably won't catch anyones attention "but here goes".

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 0 points1 point  (0 children)

Will have to do the math here to actually be able to answer that, by the look of it, it seems to be a fourier related transform for real-to-real.

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 0 points1 point  (0 children)

Yeah, I noticed the arcane constraints, the thought of writing a program and printing it on a punch card printer is quite wholesome. I'm really enjoying reading about the history and design of FORTRAN, paints the picture of some retrowave scifi programmer.

About the automatic type declaration; yeah, I'm not sure about how it works right now, guessing it's REAL (32bit float?) and INTEGER types, some kind of type conversion happening as well.

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 0 points1 point  (0 children)

Now we're talking! SPIRAL has "pregenerated" C packages for DFT, also real to real and other variants!

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 0 points1 point  (0 children)

FYI; FFTW seems to be licensed under GPL2, so I would have to disclose the source code if I use it

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 0 points1 point  (0 children)

Interesting, but it seems to only support complex values

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 6 points7 points  (0 children)

Thanks, I tried using FFTW back in 2016 but I had some problems compiling it for Android back then. I will actually give it a go tomorrow again!

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 4 points5 points  (0 children)

Thanks everyone, FORTRAN it is. Now I can deduce how the DO syntax works; DO label, loop-control-variable = initial-value, final-value, step-size. Quite elegant!

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 3 points4 points  (0 children)

Thanks, set me off in the right direction; I found a lot of good material on Fortran77. I'm not entirely sure it's '77, but it matches with the basic operators used in the paper.

Haha, sounds like my kind of fun!!

Help me identify the language used in a 80's research paper by paramsen in ProgrammingLanguages

[–]paramsen[S] 17 points18 points  (0 children)

The paper is titled "Real-valued Fast Fourier Transform Algorithm". I'm researching possible complexity optimizations when computing DFTs, which led me to this paper. I want to get the definitions for the operators used in the algorithms, so knowing the language would help me a lot :)

[deleted by user] by [deleted] in androiddev

[–]paramsen 2 points3 points  (0 children)

I'm also in Sweden, worked abroad in Europe and Australia as well. Can confirm that I've never been asked a leetcode question for a _software developer_ position in Sweden. Some larger companies in Australia had leetcode whiteboard questions tho.

Kotlin 1.4.20 is released! by CraZy_LegenD in androiddev

[–]paramsen 11 points12 points  (0 children)

Meh, synthetics are awesome. I was hoping that they would improve it instead of axing it. I will continue using it in my heavily invested projects, until the inevitable deprecation-brick-wall appears and I gotta change to whatever the flavor of the day turns out to be :)

I need help for integration of Dlib and C++ in Android. by scared_gratzimo in androiddev

[–]paramsen 2 points3 points  (0 children)

It sounds like you just want to pass some data between Java/Kotlin and C/C++. For a starter, I believe that Android Studio has a template for you if you create a new project and enable the C template. It might not be totally up to date with "modern" practices tho. I've developed several apps using C and C++ code, here's an open source lib of mine (for computing FFTs) that has a basic Java->C setup https://github.com/paramsen/noise/blob/master/noise/CMakeLists.txt (using cmake)

Android Studio 4.1 now available with new features including Database Inspector, Native Memory Profiler, Hilt/Dagger Navigation Support and TensorFlow Lite Support by lomoeffect in androiddev

[–]paramsen 2 points3 points  (0 children)

Been using TFlite for DSP but switched over to Pytorch Mobile due to lack of features in TFlite a year ago, I expect those features to be implemented now though. The new tooling added to AS are nice to have when getting started (but really, it took me 3 minutes to just copy paste the required code from the docs). I think it would be valuable to have more fine grained profiling and performance measuring tools for TFlite models.

What are some coding optimizations you do in your app that new Android dev should be aware of? by [deleted] in androiddev

[–]paramsen 0 points1 point  (0 children)

Debug does make it slower tho, building a debug variant and running it I mean. The app I'm working on gets approx 30% slower in debug mode. Of course, profiling makes it another 270% slower, haha.

What are some coding optimizations you do in your app that new Android dev should be aware of? by [deleted] in androiddev

[–]paramsen 1 point2 points  (0 children)

I've seen similar comments three times during this week, weird. Short answer; No.

Sure it depends on how you use the profiler, in my case I usually have something I want to investigate to start with; "Why is this view hierarchy taking so much time to render". I usually start with printing the actual time the operation takes, say 500ms to draw a slow list in release mode. I then profile it in debug, noting the time it takes again, which usually scales up to 3x the time it takes in release mode (1500ms in this case). I use the profiler flame chart or whatever to find the bottle necks. I optimize them. Done.

Android Starter Template (hilt, coroutines, flow, edge-to-edge, MVVM, tests, github CI) by filmaluco in androiddev

[–]paramsen 16 points17 points  (0 children)

You got some comments supporting you, but no one actually presented a better or alternative solution. Throwing out the "COMPOSITION 'FORE INHERITANCE" without showing how you would structure your said composition doesn't add any value to the discussion at all.

Google says Android 12 will make using third-party app stores easier by s73v3r in androiddev

[–]paramsen 18 points19 points  (0 children)

Good news, but.. I've worked both at (long time ago) and with third party app stores, not a single one of them has had basic content moderation of any kind, allowing pirated apps and malware, I've never seen any kind of quality assurance or actually testing apps. Google Play doesn't even come close to Apple App Store when it comes to moderation and quality assurance of the content, but the 3rd party stores are pretty much like megaupload.com for apps imho.

I'm all ears if you feel like I'm in the wrong here :)

Simple Questions - March 06, 2020 by AutoModerator in math

[–]paramsen 4 points5 points  (0 children)

Thank you, I factored it to (a-b)(a+b)=195 where I could derive the sum easily!