Bookworm
(12-14-2021, 10:40 PM)ryo Wrote: So I end up wrapping everything I make in Node into "promise.then.then.then.then..."

Just use async / await to avoid nesting callbacks Smile.

(12-14-2021, 10:40 PM)ryo Wrote: If I don't wrap everything into promises, thought process always goes like "WTF, I just solved this one bug only to create 5 new bugs!?" (refresh) "Oh, it got fixed by itself." (refresh) "NOW THERE ARE 20 NEW BUGS!?".

That doesn't sound right. Only a few things are asynchronous in Node.js like network requests and file operations (but those can be done synchronously too), because like you said async isn't always needed in programming. Asynchronous methods return promises and only with those you have to use .then or await if you want to do something after they complete.
  Reply
(12-15-2021, 03:17 AM)beta-user Wrote:
(12-14-2021, 10:40 PM)ryo Wrote: So I end up wrapping everything I make in Node into "promise.then.then.then.then..."

Just use async / await to avoid nesting callbacks Smile.

(12-14-2021, 10:40 PM)ryo Wrote: If I don't wrap everything into promises, thought process always goes like "WTF, I just solved this one bug only to create 5 new bugs!?" (refresh) "Oh, it got fixed by itself." (refresh) "NOW THERE ARE 20 NEW BUGS!?".

That doesn't sound right. Only a few things are asynchronous in Node.js like network requests and file operations (but those can be done synchronously too), because like you said async isn't always needed in programming. Asynchronous methods return promises and only with those you have to use .then or await if you want to do something after they complete.

It would still be nicer if we'd have to explicitely state it's an asynchromous code in a synchromous language rather than the other way around.
But that's perhaps the kind of debate of whether we should put ice in a glass and pour soft drinks over it, or put soft drinks in a glass and then drop ice into it.

If you're a newcomer to programming, then either way wouldn't really be a problem, since you're starting from scratch.
But if you've already been programming for over a decade exclusively in ANSI C, C++, Shell Scripting, and PHP (which is me by the way), the whole concept of promises is truely a mindrape.
母語は日本語ですが、英語も喋れます(ry
  Reply
Strange :
Last night my daily driver with Mobian/Bookworm required 4 separate updates in the Software Store...?
I do not remember that ever happening before.

But every one of the downloads did have different contents.
and the phone appears to be functioning just fine now.

Although sometimes I think the OS see's the next days downloads/updates before they are "released", those throw a warning about not yet available.

Worth mentioning, as this is the first time I have needed to do multiple updates in one day.
> But Nothing seems to be wrong with the phone or Software system.
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
Just got my hands on a brand new keyboard today,    I put it on my test phone that is running a recent release of Bookworm + nightly updates.

The combo is just a lil rough around the edges, some of the app's don't do well in landscape mode, the split screen, opening menus
I left rotation turned on for now,  so I can turn the screen to see some menus,  a temp. solution.

The keys do feel a little clunky at first,  the more I push the buttons, and they seem to feel smoother...

Careful,  the more you play with it,  it starts growing on you !
  This one is on my test phone, so I guess I'm going to need a second keyboard,  if I want one on my daily driver.?

This is Not for everyone, the package when closed is about a full inch thick and as a package it is about an inch wider than just the phone + it's heavier.
on the Plus side it is a real "mini-laptop"  that does also do cell/data, phone calls and text messages.

Some People are going to LOVE this new keyboard,  (with their Mobian)

The ACE is:  it will TRIPLE your run-time !
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
(01-20-2022, 03:35 AM)bcnaz Wrote: Just got my hands on a brand new keyboard today,    I put it on my test phone that is running a recent release of Bookworm + nightly updates.

The combo is just a lil rough around the edges, some of the app's don't do well in landscape mode, the split screen, opening menus
I left rotation turned on for now,  so I can turn the screen to see some menus,  a temp. solution.

The keys do feel a little clunky at first,  the more I push the buttons, and they seem to feel smoother...

Careful,  the more you play with it,  it starts growing on you !
  This one is on my test phone, so I guess I'm going to need a second keyboard,  if I want one on my daily driver.?

This is Not for everyone, the package when closed is about a full inch thick and as a package it is about an inch wider than just the phone + it's heavier.
on the Plus side it is a real "mini-laptop"  that does also do cell/data, phone calls and text messages.

Some People are going to LOVE this new keyboard,  (with their Mobian)

The ACE is:  it will TRIPLE your run-time !

Congrats on the new keyboard and thanks for a bit of insight on your experience!
  Reply
(01-20-2022, 03:35 AM)bcnaz Wrote: Just got my hands on a brand new keyboard today,    I put it on my test phone that is running a recent release of Bookworm + nightly updates.

The combo is just a lil rough around the edges, some of the app's don't do well in landscape mode, the split screen, opening menus
I left rotation turned on for now,  so I can turn the screen to see some menus,  a temp. solution.

The keys do feel a little clunky at first,  the more I push the buttons, and they seem to feel smoother...

Careful,  the more you play with it,  it starts growing on you !
  This one is on my test phone, so I guess I'm going to need a second keyboard,  if I want one on my daily driver.?

This is Not for everyone, the package when closed is about a full inch thick and as a package it is about an inch wider than just the phone + it's heavier.
on the Plus side it is a real "mini-laptop"  that does also do cell/data, phone calls and text messages.

Some People are going to LOVE this new keyboard,  (with their Mobian)

The ACE is:  it will TRIPLE your run-time !

So cool! Thanks for sharing. Looking forward to receiving the keyboard I ordered last week to use with my pinephone. However, I only ordered one! (note: I ordered a pinephone pro last week too)
  Reply
Huh

Interesting :
Using the onboard 'Powersupply' app

I see about 2.2 - 2.3 watts discharging with the wifi turned off

and about 1,8 - 1.9 watts discharging with the wifi turned on
(the numbers jump around less given a few minutes)

What's up with that ?

Phone :  Latest updates B/W on PMOS Convergent-on sd card
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
(01-25-2022, 03:43 AM)bcnaz Wrote: Huh

Interesting :
Using the onboard 'Powersupply' app

I see about 2.2 - 2.3 watts discharging with the wifi turned off

and about 1,8 - 1.9 watts discharging with the wifi turned on
(the numbers jump around less given a few minutes)

What's up with that ?

Phone :  Latest updates B/W on PMOS Convergent-on sd card

maybe 4G consumes more energy than wifi
  Reply
(01-25-2022, 06:19 AM)user641 Wrote:
(01-25-2022, 03:43 AM)bcnaz Wrote: Huh

Interesting :
Using the onboard 'Powersupply' app

I see about 2.2 - 2.3 watts discharging with the wifi turned off

and about 1,8 - 1.9 watts discharging with the wifi turned on
(the numbers jump around less given a few minutes)

What's up with that ?

Phone :  Latest updates B/W on PMOS Convergent-on sd card

maybe 4G consumes more energy than wifi

Guess the next step would be to use the wifi/BT hardware switch ?
see how those results compare .. ?
    Shy
****

okay, with wifi/BT hardware switch off 1.8 - 1.9 watts discharging
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
*****
Newegg has 16gb class 10 Verbatim micro sd cards for $3.99 USD Free shipping
*****
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 39 8,251 10-15-2024, 01:12 PM
Last Post: anonymous
  Problem with updates: Repository 'Debian bookworm' changed its 'non-free component' Anna 7 5,281 08-31-2023, 12:38 PM
Last Post: vusra
  Debian bookworm security repo user641 2 2,123 02-17-2023, 01:12 AM
Last Post: user641
  Bookworm Satellite Navigation biketool 7 4,397 09-02-2022, 01:42 PM
Last Post: vortex
  GPS/location services don't work with Maps after Bookworm upgrade Anna 16 12,606 06-13-2022, 02:37 PM
Last Post: wibble
  Bookworm Navigation Enabler Script biketool 2 2,034 06-02-2022, 04:12 AM
Last Post: biketool
  Flatpak on Bookworm biketool 0 1,133 05-25-2022, 03:47 PM
Last Post: biketool
  chatty v0.6 in Bookworm at last! treebeard 13 9,577 02-13-2022, 05:21 PM
Last Post: treebeard
  Waydroid Intallation on Bookworm Dinosaur1946 6 5,629 01-30-2022, 12:03 AM
Last Post: Dinosaur1946
  Safe to upgrade Bookworm again? nelstomlinson 2 2,978 10-12-2021, 03:45 AM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 9 Guest(s)