ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
orivej has joined #picolisp
karswell has joined #picolisp
dtornabene has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
dtornabene has quit [Remote host closed the connection]
karswell has quit [Read error: No route to host]
karswell has joined #picolisp
shpx has joined #picolisp
alexshendi has joined #picolisp
<Regenaxer> More and more I get the impression that it is my own fault
<Regenaxer> Something in the notification of startForeground triggers the restart, not Android per se
<Regenaxer> 'startForeground' calls 'notify', and this creates an Intent so that PilBox is started when the notification is clicked
<Regenaxer> Looks like a candidate, but when I comment it out the restart still happens
alexshendi has quit [Ping timeout: 256 seconds]
<beneroth> Good morning
<Regenaxer> Hi beneroth!
<beneroth> any luck?
<Regenaxer> Not yet :(
<Regenaxer> I think https://stackoverflow.com/questions/14771341/service-is-created-again-after-ontaskremoved/21523092 exactly describes the issue, but the answer is not addressing the actual situation
<Regenaxer> "I stop my activity the onTaskRemoved is called, but after few seconds the oncreate method is called again"
<Regenaxer> START_NOT_STICKY is relevant only when thi Service was called by the OS
<beneroth> see the second answer
<Regenaxer> Which one?
<beneroth> but you used stopSelf(); afaik
<beneroth> ...
<Regenaxer> yes
<beneroth> maybe you should write a fuzzer to find the solution :(
<Regenaxer> The stopping seems to be clean and OK
<Regenaxer> What is a fuzzer? :)
<beneroth> a program which has a definition/model of what input types/ranges/kinds another program takes and what the returns/result should look like, then generating all kind of random ("fuzzy") (technically possible) inputs to test the other program
<beneroth> also used with protocols. some effort to set up, but often gives surprisingly results
<Regenaxer> OK, but I do not want to handle the case *after* it was started again
<Regenaxer> I need to prohibit this
<beneroth> yeah, you want to prevent autostart
<Regenaxer> yeah
<beneroth> you can't differ the kind of start by the intent argument or so? no way beside hacking your own state-variable?
<Regenaxer> It starts the whole machinery, this may give a race condition if the user starts it at that moment too
<Regenaxer> I could differ the start yesterday
<Regenaxer> But in case of (android-alarm) there *is* such a case too
<Regenaxer> so alarm broke
<Regenaxer> it *does* start PilBox in the background
<beneroth> did you use the right class for your service?
<beneroth> just a random pointer
<Regenaxer> Ok
<Regenaxer> I think the class is right
<Regenaxer> The problem has to do with setting to foreground only
<Regenaxer> Without this everything works right
<Regenaxer> Only if PilBox is in "foreground" state
<Regenaxer> and I suspect I have something wrong with this state
<Regenaxer> I have two apps where I use this only
<Regenaxer> For SimpleLinks it would not be absolutely necessary, so I could simply omit (startForeground) and be done
<Regenaxer> But the firemen app *does* need it
<Regenaxer> The app must send GPS position permanently
<Regenaxer> Without (startForeground) it is stopped when in the background for a few minutes
<Regenaxer> and the firemen have the phone in their pochet when working on the fire
<Regenaxer> BTW: I got a message the the firemen got an "Innovation price" in Catalonia this week! :D
<Regenaxer> (despite that it is not finished yet!! :)
<beneroth> :D
<beneroth> so you got one? :D
<Regenaxer> one?
<Regenaxer> oops, wrong
<Regenaxer> I meant "the firemen *App* got an Innovation price"
rob_w has joined #picolisp
<Regenaxer> What I don't understand is that Marcel writes in the above link "I already solved, and this is how, thanks any ways", but where is "this"?
<Regenaxer> I don't see his solution
<Regenaxer> Anyway, I suspect the problem is either in my implementation of startForeground or in my AndroidManifest file
orivej has quit [Ping timeout: 240 seconds]
<beneroth> Marcel means "return START_NOT_STICKY;" in onStartCommand()
<Regenaxer> I see, OK, but I believe this is wrong (as explained above)
<beneroth> nice, congratulations! so, basically, YOU got an innovation price, no? sounds like a fact which could be used for picolisp advertising, if you (and the firemen) would be okay with that
<beneroth> yeah. I guess it was right for his case.
<Regenaxer> Well, me or the boss of the catalonian firemen in the first place
<Regenaxer> START_NOT_STICKY seems only relevant if the OS killed the service (mainly if out of memory)
<Regenaxer> I found more of similar questions, none with a useful answer
<Regenaxer> So I think there must be some side-effect in another place
<Regenaxer> like how the foreground is set, or some declarations in the Manifest
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
<Regenaxer> Interesting perhaps is that it is restarted always after 15 seconds
<Nistur> morning all
<Regenaxer> Hi Nistur!
orivej has quit [Ping timeout: 256 seconds]
<Regenaxer> Now I traced the code backwards, using Log.d calls
<Regenaxer> Funny, the start is caused by the WebView component, trying to access the pil server (despite that everything is closed)
<beneroth> interesting
<beneroth> Hi Nistur !
<Regenaxer> WebView tries to ping the server, so it is simply not terminated
<Regenaxer> No idea why this happens only after startForeground
<Regenaxer> Completely different place
<Regenaxer> WebView is in the Activity and foreground is the Server object
<Regenaxer> And swiping off PilBox is supposed to kill the Activity in the first place
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpx has joined #picolisp
<Regenaxer> That did it
<Regenaxer> PilView.onPause();
<Regenaxer> PilView.pauseTimers();
<Regenaxer> same with resume
alexshendi has joined #picolisp
<Regenaxer> Works like a charm now
<Regenaxer> Also alarms etc.
<beneroth> aaah
<beneroth> background timers!
<beneroth> makes sense, in a weird way
<Regenaxer> The 'ping' function in the GUI
<Regenaxer> yes
<beneroth> gz
<beneroth> tough find
<Regenaxer> The thing is why the WebView component did not stop
<Regenaxer> The whole app disappeared I thought
shpx has quit [Quit: Textual IRC Client: www.textualapp.com]
<Regenaxer> Released new PilBox
<tankf33der> tweet!
<beneroth> nice
<beneroth> tankf33der is right :)
<tankf33der> dont forget hash tags :)
<Regenaxer> Hmm, I released a new PilBox every few days recently. Nobody cares
<tankf33der> of course.
<tankf33der> tweet every month is ok then
<beneroth> maybe this is even true for now, but when later on people look back and see such signals of improvement -> that is a message, too
<Regenaxer> And PlayStore updates it on all phones which installed it automatically anyway
<beneroth> is auto-update the norm?
<Regenaxer> yes
<beneroth> (I would guess so, but still..)
<Regenaxer> yeah
<beneroth> it's the first things I disable usually. a unmonitored auto-update is a backdoor.
<beneroth> but yeah, then one has to take care of it
<Regenaxer> yep, and one has to trust the app and the store anyway
<beneroth> though on windows (I still have a few) it becomes an advantage, they release broken patches so often these days that its better to install them fixed delayed xD
<beneroth> T
<Regenaxer> So, no, I won't tweet this. There is no chance anybody even faintly understands the problems which are fixed with this fix
<beneroth> hm. T.
<beneroth> I want to learn your habits more. good habits, I think.
alexshendi has quit [Ping timeout: 276 seconds]
orivej has joined #picolisp
C-Keen has quit [*.net *.split]
C-Keen has joined #picolisp
arievw has quit [Ping timeout: 240 seconds]
arievw has joined #picolisp
<beneroth> Regenaxer, what is the (iter) equivalent to (collect 'idx '+Class 'prop "foo") ?
<beneroth> apparently I made it wrong
<beneroth> ah wrong question
<beneroth> again
<beneroth> (iter) equivalent to (collect 'idx '+Class "foo") ?
<beneroth> (iter (tree 'idx '+Class) NIL "foo" "foo") seems to be wrong
<Regenaxer> yes, "foo" "foo" works only for +Key
<beneroth> oooh!
<beneroth> so how to filter? within the 'fnc then?
<Regenaxer> (cons "foo") (cons "foo" T) perhaps
<beneroth> yep
<beneroth> looks right
<beneroth> thanks. I used it wrong!
<Regenaxer> If you want to get also "fooxx" then better (pack "foo" `(char T)) for the second value
<Regenaxer> `(char T) is a special unicode value bigger than any UTF-8
<beneroth> oh wow, special trick
<beneroth> noted, thanks
<beneroth> nah in this use case it was about exact filtering. just using (iter) instead of (collect) because I'm not interested in the list
<beneroth> so no overhead for list building necessary
<Regenaxer> ok, perfect
sriram_ has quit [Quit: Page closed]
sriram_ has joined #picolisp
alexshendi has joined #picolisp
sriram_ has quit [Ping timeout: 260 seconds]
sriram_ has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
<sriram_> Hi..I was able to solve the problem where ?PhoneGUI does not display correctly on desktop
<sriram_> I wrapped my phone.css in "@media only screen and (max-width: 800px) {...}" so that it won't affect desktop
<beneroth> hi sriram_ ! nice!
<beneroth> ah, sounds like the perfect solution
<sriram_> beneroth..Hi....thanks...
<sriram_> I am still thinking I may be doing something unnecessary, because Regenaxer mentioned the code works on tablets/phones and desktop
<sriram_> alike without this
alexshendi has joined #picolisp
C-Keen has quit [*.net *.split]
karswell has quit [*.net *.split]
ChanServ has quit [*.net *.split]
ChanServ has joined #picolisp
C-Keen has joined #picolisp
arievw has quit [Ping timeout: 240 seconds]
arievw has joined #picolisp
karswell has joined #picolisp
alexshendi has quit [Ping timeout: 240 seconds]
PurpleMessenger[ has quit [Ping timeout: 245 seconds]
clacke[m] has quit [Ping timeout: 245 seconds]
alexshendi has joined #picolisp
clacke[m] has joined #picolisp
PurpleMessenger[ has joined #picolisp
<beneroth> anjaa, this might be interesting for you and cess: https://logicmag.io/03-dont-be-evil/
<beneroth> oh in the end he puts very well (I think) into words the (pretty fundamental) opinion on which I (apparently imho) differ with you guys:
<beneroth> "One of the legacies of the counterculture, particularly on the left, is the idea that expression is action. This idea has haunted those of us on the left for a long time. "
<beneroth> [...]
<beneroth> "So the challenge for those of us who want a different world is not to simply trust that the expressive variety that the internet permits is the key to freedom. Rather, we need to seek a kind of freedom that involves people not like us, that builds institutions that support people not like us" [...]
<beneroth> "Our challenge is to build a world that takes responsibility for people not like ourselves."
<beneroth> of course, this also goes into promoting diversity and equal opportunities etc.
arievw has quit [Quit: Connection closed for inactivity]
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 255 seconds]