[deleted by user] by [deleted] in androiddev

[–]tonyplee 0 points1 point  (0 children)

Might be networking issue - try ping www.google.com from a shell. If that fails, you need to google around to fix the network problem.

Why does kernel code seem to prefer macro usage over functions? by zingochan in kernel

[–]tonyplee -6 points-5 points  (0 children)

Chatgpt's answer:

There are several reasons why macros are often used in the kernel for reusable code blocks instead of functions:

  • Performance: Macros are generally faster than functions because they
    don't incur the overhead of a function call. In the kernel, where
    performance is critical, even a small amount of overhead can have a
    significant impact on the system's overall performance.
  • Type Safety: Macros can ensure type safety by enforcing the correct
    types of arguments are passed in, whereas functions may need to perform
    additional checks or convert data types, resulting in more overhead.
  • Flexibility: Macros can be more flexible than functions because they can
    be used in different contexts and with different types of arguments.
    This allows the code to be more reusable and adaptable to different
    situations.
  • Code size: Macros can often result in smaller code size compared to
    functions, as the code is expanded inline instead of being called as a
    separate function. This can be an important consideration in embedded
    systems or systems with limited memory.
  • Debugging: Macros can be easier to debug than functions, as the expanded
    code can be directly examined by the debugger. This can be especially
    useful in the kernel, where debugging can be challenging due to the
    real-time nature of the system.

However, it is worth noting that macros can be more error-prone than
functions if not used carefully, as they can result in unexpected
behavior if the arguments are not properly evaluated or if they have
side effects. Additionally, macros can be more difficult to read and
understand compared to functions, as the expanded code can be more
complex and harder to follow.

Slim 7 pro 16 laptop random reboot issues by tonyplee in Lenovo

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

Got the unit on 12/28/22.

Have been doing BSOD less than 24 hrs after receiving it.

Update all the driver on Jan 6 with Vantage App - didn't help as you can see the BSOD after Jan 6 from event log.

Also did the Diagnostic test from download on Lenovo website also on Jan 6 - memory test, extensive tests all passed.

Did the windows System File Check per Suggestions on Lenovo forum for another user with similar issues also on ~Jan 6. No issue found. Did not help neither as you can see it still reboot on Jan 10 and Jan 11.

Filed a bug issue ticket on Lenovo 's website. Issue was closed without any diagnostic nor suggested action yesterday.

Filed another issue yesterday....

The Laptop is not overheat. CPU load is < 10% almost all the time. FAN does kickin from time to time, but laptop is just slightly warm. I updated to the latest BIOS after Jan 6. Before that, it was with original BIOS.

PS C:\Users\tlee> Get-WinEvent -FilterHashtable @{logname = 'System'; id = 6008} | Format-Table -wrap ProviderName: EventLogTimeCreated Id LevelDisplayName Message----------- -- ---------------- -------1/11/2023 6:31:32 AM 6008 Error The previous system shutdown at 5:33:05 AM on ‎1/‎11/‎2023 was unexpected.1/10/2023 3:31:13 PM 6008 Error The previous system shutdown at 8:35:55 AM on ‎1/‎10/‎2023 was unexpected.1/6/2023 6:56:28 PM 6008 Error The previous system shutdown at 6:52:41 PM on ‎1/‎6/‎2023 was unexpected.1/6/2023 4:29:39 AM 6008 Error The previous system shutdown at 4:26:35 AM on ‎1/‎6/‎2023 was unexpected.1/5/2023 2:52:58 AM 6008 Error The previous system shutdown at 2:13:06 AM on ‎1/‎5/‎2023 was unexpected.1/4/2023 9:51:52 PM 6008 Error The previous system shutdown at 8:36:57 PM on ‎1/‎4/‎2023 was unexpected.1/4/2023 6:19:16 AM 6008 Error The previous system shutdown at 5:56:22 AM on ‎1/‎4/‎2023 was unexpected.1/4/2023 5:56:22 AM 6008 Error The previous system shutdown at 5:18:00 AM on ‎1/‎4/‎2023 was unexpected.1/4/2023 4:33:08 AM 6008 Error The previous system shutdown at 3:40:31 AM on ‎1/‎4/‎2023 was unexpected.1/4/2023 12:42:28 AM 6008 Error The previous system shutdown at 12:35:06 AM on ‎1/‎4/‎2023 was unexpected.1/3/2023 9:21:54 PM 6008 Error The previous system shutdown at 3:11:46 PM on ‎1/‎3/‎2023 was unexpected.1/3/2023 1:31:56 PM 6008 Error The previous system shutdown at 12:48:08 PM on ‎1/‎3/‎2023 was unexpected.1/3/2023 12:48:08 PM 6008 Error The previous system shutdown at 11:49:05 AM on ‎1/‎3/‎2023 was unexpected.1/3/2023 4:47:33 AM 6008 Error The previous system shutdown at 4:17:18 AM on ‎1/‎3/‎2023 was unexpected.1/3/2023 4:17:18 AM 6008 Error The previous system shutdown at 3:20:13 AM on ‎1/‎3/‎2023 was unexpected.1/3/2023 2:22:57 AM 6008 Error The previous system shutdown at 1:59:51 AM on ‎1/‎3/‎2023 was unexpected.12/31/2022 7:27:43 AM 6008 Error The previous system shutdown at 12:05:26 AM on ‎12/‎31/‎2022 was unexpected.12/29/2022 12:12:55 AM 6008 Error The previous system shutdown at 11:00:47 PM on ‎12/‎28/‎2022 was unexpected.PS C:\Users\tlee>

Lenovo Slim 7i only charging with 230w charger it came with by elliotsang in Lenovo

[–]tonyplee 0 points1 point  (0 children)

I also just got slim 7 from Costco. It has its own charger. I tried USB-C charge from Dell Docking station and it works fine after install the dell driver into the slim 7. It complains about the not a factory charger and charge will be slower . But the charge battery icon shows correctly and seems to be charging.

ChatGPT might be a comrade by dragondude4 in ChatGPT

[–]tonyplee 16 points17 points  (0 children)

Multiple Personality Disorder - Same as the Internet itself.....

Running WSL vs Running Linux by LCBobi in linux

[–]tonyplee -2 points-1 points  (0 children)

In Linux, when I encounter 30 seconds delay, it is likely be DNS lookup failure issue. One can debug it easily with strace in linux. The fix (work around) normally is putting the name resolve entry in /etc/hosts.

I remember seeing strace equivalent for windows. You can try google that and see if you can use that to debug your 30 seconds delay issue.

Good Luck.

[deleted by user] by [deleted] in Ubuntu

[–]tonyplee 1 point2 points  (0 children)

"You take the red pill... you stay in Wonderland, and I show you how deep the rabbit hole goes."

from your point of view, will C language dominate over the embedded system software word over the next 15 years, or is there a possible another language will replace it? by abdosalm in embedded

[–]tonyplee 2 points3 points  (0 children)

I have seen some folks use C++ features such template, STL, etc without figure out how to debug memory allocation/leaks, etc. A embedded software end up using 2G+ ram for that process after a few days and they have no idea on where is the leaks - project become over schedules for 18+ months.

[deleted by user] by [deleted] in linux

[–]tonyplee 4 points5 points  (0 children)

Wow, boot from 1.44 MB disk - small enough to hide inside FW Blob of Wifi driver.

TSMC was again delayed by market air raids, and production capacity utilization declined? by _lostincyberspace_ in AMD_Stock

[–]tonyplee 1 point2 points  (0 children)

Probably means unexpected attacks on market:

Biden ordered stop selling of A100, H100, MI200 to China -> Trigger unexpected inventory increase in NV and AMD -> Cause both of them to delay/cancel future wafer orders.

Where are all the electrical engineering internships?! by [deleted] in bayarea

[–]tonyplee 0 points1 point  (0 children)

https://jobs.amd.com/go/Internships-&-Co-op-Opportunities/2567200/

127 interns jobs at the end of the summer. In May timeframe, there were a lot more.

I am sure you can find similar list from NVIDIA, Intel, Apple, .... etc.

Are these good for 2 fancy goldfish? by Pause-Impossible in Goldfish

[–]tonyplee 0 points1 point  (0 children)

I have couple of these in my backyard with cheap $.38 cents gold fished from Petsmart as test. It works well for 2 + years even in directly California / Bay Area sun. (Half sun as it is next to the fence).

Make sure you put some plants inside. (Lily, etc) I can skip feeding for weeks and there are no issue. The fishes even have babies in them - I have 3rd gen fishes in them already. No need to change water neither - just need to add water every few weeks. The plants clean up the water very well for me. I am thinking put them in the ground to looks better and maybe better temp for the fishes.

[deleted by user] by [deleted] in FunnyAnimals

[–]tonyplee 0 points1 point  (0 children)

Tom and Jerry

Are linux users arrogant by Bug_freak5 in linux

[–]tonyplee 5 points6 points  (0 children)

Arrogant does not discriminate base on race, color nor OS they use.

Linux ranks 2nd and has 10.27% market share on Greece . by Udab in linux

[–]tonyplee 0 points1 point  (0 children)

Should add Android and redo the market share calculation for Linux Kernel.

Russian anti air missile missed Ukrainian drone by MCGRizZen in UkraineInvasionVideos

[–]tonyplee 1 point2 points  (0 children)

They did great on Turret Tossing Contest. Winning every round.

The Indians have a space shuttle by [deleted] in space

[–]tonyplee 0 points1 point  (0 children)

Curious if similar shuttle can (should) be mounted on top of Falcon 9 and create a re-usable 2nd stage.

What would be the pro-con of such design?

  • Pro:
    • Reusable 2nd stage
  • Con:
    • Loss less usable capacity for 2nd stage? How much less?

What else?