#robotics Logs

Sep 22 2019

#robotics Calendar

02:07 AM rue_bed: polprog, heh, see if that overloads twitter for the night
02:12 AM polprog: lol
02:12 AM rue_bed: I dont understand why realloc() didn't move the memory contents tho
02:12 AM polprog: memmove?
02:12 AM rue_bed: I had to fudge it by just starting off with an overalloc of what I needed
02:12 AM rue_bed: your not supposed to have to with realloc
02:12 AM rue_bed: The realloc() function changes the size of the memory block pointed to
02:12 AM rue_bed: by ptr to size bytes. The contents will be unchanged in the range from
02:12 AM rue_bed: the start of the region up to the minimum of the old and new sizes.
02:12 AM rue_bed: so ????
02:15 AM rue_bed: I should search out more animatronics people too
05:23 AM polprog: realloc doesnt move i think
05:23 AM polprog: hmm
05:23 AM polprog: weird
05:23 AM polprog: hmm
05:23 AM polprog: may move
05:23 AM polprog: interesting
07:15 AM marder is now known as katsumi
07:19 AM hasioehrchen is now known as pai-pai
08:05 AM veverak: it should
08:38 AM fling_ is now known as fling
10:04 AM rue_bed: yea, so, I'm thinking that if I put a pointer in my struct (its complex) then it would be wrong
10:05 AM rue_bed: raining hard enough to wake me up
10:06 AM rue_bed: oh
10:06 AM rue_bed: wait
10:06 AM rue_bed: between the realloc it forks a thread
10:06 AM rue_bed: when it does the fork its passing a pointer to the data
10:07 AM rue_bed: then the realloc happens
10:07 AM rue_bed: hmmmmm
10:07 AM rue_bed: a linked list would be a mess, hmmm
10:10 AM rue_bed: hmm wonder if twitter blew up
07:09 PM zhanx_ is now known as zhanx
08:02 PM rue_mohr: so I found it
08:02 PM rue_mohr: after the first alloc, a pointer gets passed to a thread
08:02 PM rue_mohr: then the realloc moves the memory
08:03 PM rue_mohr: so I need work around that
08:05 PM chisight: stale pointer copies, if i had a nickel...
08:06 PM rue_mohr: it took sleeping on it to think it out
08:06 PM rue_mohr: I might just abstract it with another pointer layer
08:09 PM chisight: your linked list idea was more along the lines of what i usually do.
08:09 PM chisight: malloc is the devil. realloc is ...
08:10 PM rue_mohr: a linked list in C would be a lot of trouble I'm not really into going thru
08:11 PM chisight: really? it's like 3 short functions or macros.
08:11 PM rue_mohr: iirc it would work out fine if I could do anonymous unions in C
08:12 PM rue_mohr: this->that.other->detail->thing.setting->feature
08:13 PM rue_mohr: 🤯
08:13 PM rue_mohr: huh
08:13 PM rue_mohr: whatever
08:15 PM rue_mohr: I was playing around one night and gcc just wont do anonymous unions
08:28 PM chisight: why does it have to be anonymous, you have so many structures that you need to allocate that you have to have the linked list be anonymous? i don't think i've ever used more than one linked list is an embedded system.
08:37 PM rue_mohr: becasue->otherwise->you->have->to->drill->into->everything->by->name
08:38 PM rue_mohr: and if you just want to make a type into an array, its nice to not have to change/abstract all the functions that deal with it
08:38 PM rue_mohr: (array / linked list)
08:54 PM chisight: get a bigger computer and just use your preferred language.
09:56 PM rue_mohr: C is preffered
11:43 PM mun: anyone know why soft pneumatic grippers aren't so commonly used? like this one https://bit.ly/2mvCRut
11:44 PM mun: whereas suction cups are much more popular
11:52 PM rue_mohr: less universally practical
11:52 PM rue_mohr: lots of media tho
11:55 PM mun: rue_mohr, lots of media, in what way?
11:56 PM rue_mohr: news
11:56 PM rue_mohr: lots of hype about them
11:56 PM mun: oh really