« first day (4492 days earlier)      last day (439 days later) » 

2:07 AM
More my chick videos ... because you worth it :p
 
3:06 AM
Must say backyardchickens.com is a model website - kind and friendly users who share information online and encourage each other to be better people. Reliable services despite thousands online constantly ... and yet still very low key. Unlike certain site, such as ticketmaster. Backyardchickens.com could claim to be affecting the lives of millions of people and billions of their chickens. In a way, it is somewhat true. But no, not every site is loud despite their real importance.
 
 
2 hours later…
4:37 AM
I'm taking a class that uses C++ - any pointers on pointers? Especially a recommended Q&A?
 
 
2 hours later…
6:52 AM
posted on February 02, 2023 by Marco Arena

That little extra we might equip builder classes with: The Toggle Builder by Marco Arena From the article: If intended for general usage, the builder can result a bit uncomfortable when we go through some configuration object to toggle features. This often leads to a bunch of ifs..

 
 
1 hour later…
8:17 AM
@RussiaMustRemovePutin Pointers are the address of an object. Honestly, I never found pointers confusing or hard to understand.
 
 
1 hour later…
nwp
9:18 AM
I like the analogy with URLs and cat pics. A URL is a pointer to a cat picture. The browser dereferences it. You can pass a cat picture by email by value, as in attach it, and the recipient will receive said cat picture. If the server changed the cat picture it doesn't matter. Or you can send the URL in which case it does. Of course a URL is much smaller than a cat picture.
Then you can go into link shorteners. You click the shortened URL and it goes to the long URL and there you go with a pointer to pointer analogy modern people should understand.
 
Yeah, but I don't understand why such an would be needed.
If you think of RAM as a sequence of bytes then it's fairly intuitive to realize that bytes have a position (or index) into RAM.
(Of course this ignores the details of virtual memory etc, but that's not needed to understand the concept of pointers.)
This "insight" also makes it easier to understand pointer arithmetic.
 
nwp
Well, in my experience "What is RAM? How is that an address (looks so different than my home address)?" happens. "What is a URL? What is a cat picture?" is much less common.
For pointer arithmetic I suppose your made-up URL could be internet/catpic1 and then you can try internet/captpic2 and may or may not get another cat pic. It doesn't cover misalignment or the address + sizeof (element_type) part.
 
9:37 AM
I once read that the reason pointers are hard to understand is because it requires one to be able to think in another level of indirection. For some people this comes natural, but not for most.
I tend to believe that this is the true reason.
(Of course, it can also be bad teaching.)
 
 
2 hours later…
11:48 AM
Anybody knows what format is typically used for intercore communication?
One core running Linux the other one being bare-metal
I guess transferring strings for logging purpose, for instance, would be very bad for performance
 
12:03 PM
if you have shared memory just write into that I'd say. Otherwise just look at the bus systems you have available.
 
12:16 PM
@PeterT yhea but in what format is that typically done?
I have some guesses but no real idea about best practice here
 
depends on the bus and what kind of information you want to communicate
 
there is shared sram. But no idea how I make sure that a variable which is declared in some function ends up in that specific area of the sram
also is it OK to dump all kinds of logging strings in there just like that?
 
I mean that's what compiler extensions or linker scripts are for, they'll help you fix the address in memory.

But I've only ever used that in environments without virtual memory
not sure you can even run Linux without virtual memory nowadays
But I assume there's some kernel functions to map specific physical addresses to specific virtual addresses
 
12:56 PM
@LandonZeKepitelOfGreytBritn Huh? Intercore communication is just bits and bytes, not? Am I missing something?
How can one core be Linux and the other be bare metal? Is this one the same machine?
Lolwut, I need to sleep. Oh, wait, I've already slept.
What's going on?
 
I think he's using "core" colloquially. There's embedded devices with multiple processors, sometimes running independent cores. I.e one traditional ARM core + one FPGA
I don't think it's an SMP situation
 
@StackedCrooked You seem to never have heard about heterogeneous embedded devices
 
I have heard those words before. But never worked with something like that.
 
@StackedCrooked For how long have you been in the industry?
 
1:00 PM
though the SMP case was sort of true in cases like the PS3, where there were some cores basically running freeBSD and the security cores running an independant OS
not sure about the hypervisor like layer they had
 
freeBSD on PS3... Interesting. Didnt expect that
Why specifically bsd?
 
because it's MIT licensed I think
BSD licensed I mean
 
@LandonZeKepitelOfGreytBritn Now now, that's a loaded question. I've been programming software for many years, but never for heterogenous embedded devices.
Hence my confusion at your initial question.
Please forgive my ignorance.
 
I thought everybody would know about such systems as they are quite widespread.
 
I think it depends a lot on the sector, might be prevalent in one part, but rarely used in another
 
1:18 PM
@LandonZeKepitelOfGreytBritn Why would write a string in shared memory be bad for performance?
 
1:41 PM
@LandonZeKepitelOfGreytBritn depends? It's not as simple as something is bad for performance
shifting a few bytes of a string doesn't tend to be horrible for performance if there are no locks being taken
The real question is how many idle cycles do you have?
Because even in "real time" systems there are usually idle cycles
It's worth remembering that even on the venerable 6502 on the C64, generally speaking the CPU had spare cycles for things unless the developer was just absolutely pushing it to the very limit.
 
2:22 PM
@Mgetz Are you saying that it is better to use these idle cycles to write to shared memory?
If so, I presume that implies that you'd create a low priority task and whenever everything else is blocked or whatever not that low priority task takes over and writes to sram.
If so, yes that is what I had in mind
You will have to use locking either way I think. Because otherwise one core might read while the other is still writing. Meaning you d plausibly read incorrect data
 
No I'm saying it's hard to answer because it's not as simple as "such and such is the way to do it". It all depends on what you're doing that's critical.
 
not critical. Just logging stuff
 
kprintf has had a LOT of optimization to reduce performance impact and allow it to be used at more critical interrupt levels (Can't say IRQLs because that's a NTKernel thing)
 
the baremetal core is the producer. The core running Linux the consumer
 
ok how much time does baremetal stay halted?
Generally CPUs have ways of getting that info
 
2:27 PM
@Mgetz by halted you mean doing nothing, ie all tasks blocked?
 
I mean executing the "Halt and wait for interrupt" instruction that pretty much every CPU has
 
I don't know.
Frankly speaking, you are, as very often, pointing to very interesting elements I have no answer to
Let's see if I can find something about this in the datasheet
 
you may find that the answer is "never" in which case you need to have linux observe side effects
 
I absolutely have no idea at the moment.
 
or you may find the answer is 95% of the time. But even if it's 95% of the time you have to deal with the overhead of handling the interrupt (which will go up) and deal with the concurrency issues
 
that's fast...
I mean, you finding an answer
 
I just searched that page for "halt" and then "wait" when I couldn't find 'halt'
the instructions are basically always the same 'Place CPU in low power state and wait for interrupt'
 
hehe I searched for halt and didn t have the time to look for wait as you already found it :)
 
but yeah your CPU spends a TON of time on that instruction usually
 
2:37 PM
The chip's datasheet does not give any max waiting time at first sight.
How can I easily put a number on that?
I presume I'd have to test/measure something on the target system. But I am not sure what/how here
 
put in a timer interupt
 
usually it would be an MSR
or you can do it that way
 
@PeterT ok let's say I put a 500ms timer inside a blank main function. Then what?
would the WFI just equal 500?
oh no... I think I see what you mean
 
You are going to see over a 500ms period of time how much of that time your CPU spends doing absolutely nothing
 
2:41 PM
so there are two instructions WFI and WFE
I'm currently reading the power management docs to see the differences
and there are CLEAR differences
 
But you still need to be able to retrieve that number from somewhere somehow
 
you'd check a timer
looks like the cost of entering and exiting sleep mode depends on the implementation
 
@Mgetz yes but let's say you implement a 500ms inside your application and start it. It starts running. How do you then know how much time in those 500ms you just spent waiting during those 500ms?
 
You'd check a timer
 
a second different timer you mean?
 
2:45 PM
there are clocks
no there is an interrupt timer and there is a system timer AKA a clock
but what are you clocked at anyway? And what's your resolution on what's going on realtime?
 
3:03 PM
@Mgetz OK I understood what you mean. On freertos, for instance, this means you just measure somehow how much time you spend in your idle task. Nothing more. Fair enough.
@Mgetz If I am not mistaken. 100Mhz for the baremetal one
performance resolution is under 1 millisecond. 100-200 microsecond precision is needed for RT stuff
that's what is initially requested, at least.
 
 
1 hour later…
4:08 PM
Hello, I need advice on what kind of projects I should complete to get experienced/skilled for a job like this: jobs.lever.co/zoox/ec2c83bc-9260-4c30-99fc-291d0903afe9
I am learning C++ syntax at the moment
 
Pick a project you can finish and will enjoy
 
 
2 hours later…
6:16 PM
posted on February 02, 2023 by Jens Maurer

Lambdas Modern C++ In-Depth — Lambdas, Part 3 by Michael Kristofik From the article In our last installment, we examined how lambdas work and how they help simplify code. Now let’s build on that knowledge to see how we might store a collection of lambda expressions.

 
7:02 PM
@Mgetz don't leave me hanging I am really very keen to know how you would proceed on that one :)
No need to go into every detail if you have less time, I can try to fill in the blanks myself step by step :)
 
7:25 PM
@LandonZeKepitelOfGreytBritn RTOS probably already has debug logging for this stuff. Just check their docs. You can probably get timing info from that. But this may be over worry. You could just send and event to the linux core and handle it in a driver
 
7:40 PM
@Mgetz I d like to hear the more "over worry" kind of approach
I can still see from there how far I will go
I quite enjoyed the direction our discussion was heading
 
8:15 PM
@LandonZeKepitelOfGreytBritn basically when you complete every pass of whatever you're doing you send a packet from RTOS to linux. Linux just handles that and logs it
depending on speed you may even be able to do it at the beginning of the RT pass
 
yhea so you just create a low priority task and it s that task that will be sending stuff to the other core
Not sure why we were caring about how much idle cycles there were though
 
8:28 PM
@LandonZeKepitelOfGreytBritn because if you have no idle cycles then you have no time for this
the entire point of real time is real time
 
oh yhea ok obviously
 
not real time but delayed because I had to task switch from the logging
 
IMO the most difficult thing when it comes to real-time stuff is knowing what priorities to assign to which tasks
I have never worked at a company where they really knew how to approach this issue. They just randomly assigned priorities and looked at what seemed to work
(this one wrt logging here is quite straightforward though)
 

« first day (4492 days earlier)      last day (439 days later) »