These are chat archives for pybee/general

19th
Jun 2018
Dan Yeaw
@danyeaw
Jun 19 01:06
I'm trying to add some additional cocoa/libs for drawing text. Is there a general rule for when return types and arguments should be a type instead of c_void_p. Are the types always converted automatically? Do the standard Obj-C types need to be filled in? What about others based on classes in the libraries?
Russell Keith-Magee
@freakboy3742
Jun 19 02:12
@danyeaw Anything that is an Objective C Object (i.e., subclass of NSObject) will be auto-converted. You only need to specifically annotate the type if the return type is a structure, or if the type needs additional hinting (e.g., an explicit parameter annoatation)
DKrayyuan
@d0kyuan
Jun 19 04:20
why android app stuck on loading screen
DKrayyuan
@d0kyuan
Jun 19 04:41

螢幕快照 2018-06-19 下午12.40.11.png

06-19 04:37:40.114 4814-4814/com.example.helloworld I/art: Not late-enabling -Xcheck:jni (already on)
06-19 04:37:40.114 4814-4814/com.example.helloworld W/art: Unexpected CPU variant for X86 using defaults: x86
06-19 04:37:40.340 4814-4814/com.example.helloworld W/System: ClassLoader referenced unknown path: /data/app/com.example.helloworld-1/lib/x86
06-19 04:37:40.374 4814-4814/com.example.helloworld W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
06-19 04:37:40.559 4814-4814/com.example.helloworld I/Python: Device scale factor = 2.625
Starting Python app...
06-19 04:37:42.530 4814-4819/com.example.helloworld I/art: Do partial code cache collection, code=29KB, data=29KB
After code cache collection, code=28KB, data=29KB
Increasing code cache capacity to 128KB
06-19 04:37:43.340 4814-4819/com.example.helloworld I/art: Do partial code cache collection, code=38KB, data=60KB
After code cache collection, code=38KB, data=60KB
Increasing code cache capacity to 256KB
06-19 04:37:43.717 4814-4819/com.example.helloworld I/art: Do full code cache collection, code=39KB, data=123KB
06-19 04:37:43.739 4814-4819/com.example.helloworld I/art: After code cache collection, code=33KB, data=30KB
06-19 04:37:47.425 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 193(5KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 49MB/49MB, paused 5.241ms total 15.953ms
06-19 04:37:47.731 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 202(5KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 50MB/50MB, paused 5.318ms total 16.997ms
06-19 04:37:48.428 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 189(5KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 52MB/52MB, paused 6.472ms total 17.561ms
06-19 04:37:48.823 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 177(4KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 53MB/53MB, paused 5.653ms total 19.143ms
06-19 04:37:49.743 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 161(4KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 55MB/55MB, paused 5.574ms total 18.383ms
06-19 04:37:50.066 4814-4825/com.example.helloworld W/art: Suspending all threads took: 6.393ms
06-19 04:37:50.075 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 161(4KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 56MB/56MB, paused 8.964ms total 44.175ms
06-19 04:37:50.196 4814-4825/com.example.helloworld W/art: Suspending all threads took: 5.182ms
06-19 04:37:50.205 4814-4825/com.example.helloworld I/art: Background partial concurrent mark sweep GC freed 314(1569KB) AllocSpace objects, 65(2MB) LOS objects, 6% free, 53MB/57MB, paused 7.831ms total 124.644ms
06-19 04:37:50.476 4814-4825/com.example.helloworld I/art: Background sticky concurrent mark sweep GC freed 158(4KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 57MB/57MB, paused 6.235ms total 36.994ms
06-19 04:37:50.628 4814-4825/com.example.helloworld W/art: Suspending all threads took: 7.404ms

okocsis
@okocsis
Jun 19 06:59
@d0kyuan
@ruu
ArchKudo
@ArchKudo
Jun 19 12:31
@freakboy3742 Did you have a chance to review pybee/comb#6 ?
hemicurtis
@hemicurtis
Jun 19 21:02
@freakboy3742 I’ve been working on the helper background thread implementation but there are a few things that I’m going back a forward on.
The main one is that the GIL implmentation makes this a terrible idea for computation threads as the IO threads will tank but it serves no benefit over asyncio.
So I made it a process (preferred design so far has been the concurrent.futures design), the process can report back to the main process with a callback, the default callback is the print statement that runs to a buffer via stdout (cluncky but can be and should be over-written). If the user wants more fine grained collection of data they can pass the process a queue or pipe.
I’m just doing some more reading and will share the design in a few days. Main problem at the moment is life getting in the way.