Click here to Skip to main content
15,900,973 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralStandards? Eat your heart out, Randall Pin
Peter_in_278025-Feb-24 15:07
professionalPeter_in_278025-Feb-24 15:07 
GeneralRe: Standards? Eat your heart out, Randall Pin
trønderen25-Feb-24 17:10
trønderen25-Feb-24 17:10 
GeneralRe: Standards? Eat your heart out, Randall Pin
jeron126-Feb-24 5:37
jeron126-Feb-24 5:37 
GeneralRe: Standards? Eat your heart out, Randall Pin
Nelek26-Feb-24 5:38
protectorNelek26-Feb-24 5:38 
GeneralRe: Standards? Eat your heart out, Randall Pin
Peter_in_278026-Feb-24 10:31
professionalPeter_in_278026-Feb-24 10:31 
GeneralRe: Standards? Eat your heart out, Randall Pin
Amarnath S30-Mar-24 0:03
professionalAmarnath S30-Mar-24 0:03 
GeneralRe: Standards? Eat your heart out, Randall Pin
trønderen31-Mar-24 11:11
trønderen31-Mar-24 11:11 
GeneralSupporting multiple cores from bare metal C Pin
honey the codewitch13-Feb-24 6:17
mvahoney the codewitch13-Feb-24 6:17 
I always wondered what a bare metal C implementation - the kind you'd use to write even parts of low level boot loader code would do to expose things like a 2nd core.

Or rather, how do you use a 2nd core without a scheduler? I've always kinda wondered about that.

The answer is simple. You activate the core in the bootloader and then get the core to JMP to your code. One main() in effect, for each core.

C++
extern "C" void aux_core_main()
{
    // 2nd core just starts here. Spin a loop. Be happy.
}


Synchronization is a whole different story, but if you don't need to synchronize, why waste any overhead on scheduling?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: Supporting multiple cores from bare metal C Pin
11917640 Member 14-Feb-24 22:39
11917640 Member 14-Feb-24 22:39 
GeneralRe: Supporting multiple cores from bare metal C Pin
honey the codewitch15-Feb-24 0:03
mvahoney the codewitch15-Feb-24 0:03 
GeneralRe: Supporting multiple cores from bare metal C Pin
11917640 Member 15-Feb-24 1:04
11917640 Member 15-Feb-24 1:04 
GeneralRe: Supporting multiple cores from bare metal C Pin
honey the codewitch15-Feb-24 5:03
mvahoney the codewitch15-Feb-24 5:03 
GeneralSource Generators in C# and TDD misadventure time Pin
honey the codewitch31-Jan-24 6:30
mvahoney the codewitch31-Jan-24 6:30 
GeneralRe: Source Generators in C# and TDD misadventure time Pin
Graeme_Grant31-Jan-24 21:18
mvaGraeme_Grant31-Jan-24 21:18 
GeneralRe: Source Generators in C# and TDD misadventure time Pin
honey the codewitch1-Feb-24 5:58
mvahoney the codewitch1-Feb-24 5:58 
GeneralRe: Source Generators in C# and TDD misadventure time Pin
Graeme_Grant1-Feb-24 8:31
mvaGraeme_Grant1-Feb-24 8:31 
GeneralCommand line fun in .NET Pin
honey the codewitch27-Jan-24 7:10
mvahoney the codewitch27-Jan-24 7:10 
GeneralRe: Command line fun in .NET Pin
PIEBALDconsult27-Jan-24 7:24
mvePIEBALDconsult27-Jan-24 7:24 
GeneralRe: Command line fun in .NET Pin
honey the codewitch27-Jan-24 7:37
mvahoney the codewitch27-Jan-24 7:37 
GeneralMicrosoft example includes obsolete code: Why? Pin
raddevus25-Jan-24 2:15
mvaraddevus25-Jan-24 2:15 
GeneralRe: Microsoft example includes obsolete code: Why? Pin
Bruno van Dooren25-Jan-24 5:28
mvaBruno van Dooren25-Jan-24 5:28 
GeneralRe: Microsoft example includes obsolete code: Why? Pin
raddevus25-Jan-24 8:50
mvaraddevus25-Jan-24 8:50 
GeneralFound an interesting algorithm Pin
honey the codewitch21-Jan-24 5:16
mvahoney the codewitch21-Jan-24 5:16 
GeneralRe: Found an interesting algorithm Pin
Nelek21-Jan-24 6:15
protectorNelek21-Jan-24 6:15 
GeneralRe: Found an interesting algorithm Pin
Greg Utas21-Jan-24 13:32
professionalGreg Utas21-Jan-24 13:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.