Aug 25, 2020 03:11
@OmkarArora Please read the undefined behavior links above carefully. Undefined behavior means that the code can do anything, including running in an unpredictable way that looks "fine" on your computer. It also means that others cannot reasonably discuss the expected behavior with you, because there is no defined expected behavior to discuss. Demanding that others waste their time discussing something which is undefined is not respectful of others' time and willingness to help.
 

The Meta Room

General chat & hangout for Stack Overflow, including Meta disc...
Oct 2, 2019 03:13
Ah; I have no idea if that's ubiquitous... Some languages use different words for animal sounds
Oct 2, 2019 03:12
neigh? (like nay, i.e. nope)?
Sep 30, 2019 19:34
I'm not sure what the current understanding of the root cause is. Was it about not wanting to use preferred pronouns and using an incorrect set instead, or was it about trying to use that user's preferred name over their preferred pronouns?
 
Aug 27, 2019 12:10
@AnttiHaapala You haven't shown that it was not acceptable to GCC, just that it was not acceptable to ASan by default. ASan makes looser assumptions about addressability (i.e. C/C++ spec) while GCC developers are free to consider stronger guarantees that their own compiler provides, while writing a non-portable algorithm to be used with their own compiler. There are plenty of other builtins that fail ASan/MSan checks that are perfectly fine because they're tied to a compiler with particular guarantees.
 
Jul 31, 2019 16:17
Understood, apologies that I waasn't able to resolve this given the resources available here
Jul 31, 2019 15:29
From what I understand now, the necessary calls to assert /CS are there and should be made, and without being physically present or having an in-circuit debugger I wouldn't be able to speculate any further on why they may or may not be actually doing anything.
Jul 31, 2019 15:28
I'm not going to realistically be able to respond in a timely manner in chat as I'm checking on Stack Overflow during occasional breaks at work.
Jul 31, 2019 15:22
@AdamUraynar Create a function that allows you to manually set it, and call that function. Based on my ability to guess at your hardware without seeing it, the second board ends up with the wrong daisy-chain indices for its sub-component motor controllers.
Jul 31, 2019 15:22
@AdamUraynar You might be improperly mixing SPI multiplexing using /CS vs daisy-chaining. The one thing I see that could be an issue is L6470.cc/.h having a single static number_of_devices. Can you reset this to zero after initializing the first XNucleoIHM02A1?
Jul 31, 2019 15:22
@AdamUraynar In XNucleoIHM02A1, lines 86-88 and/or 133-136 clearly show that the pin ought to be driven high, and L6470.h shows that the L6470 library ought to be asserting #CS. Is it being driven high, or does it continue to be weakly pulled up or float?
Jul 31, 2019 15:22
@AdamUraynar I can really only speculate further because I don't have your hardware in front of me. Is the microcontroller asserting the chip select lines you expect it to be asserting?
Jul 31, 2019 15:22
@AdamUraynar I don't understand your logic behind soldering SB7 and choosing pin A7; the table indicates that with SB7 closed, pin D2 is wired to that board's #CS pin. Have you attempted to use any test equipment such as logic analyzers or oscilloscopes to perform debugging to verify whether the lines you think ought to be asserted, actually are asserted?
 
May 30, 2019 06:29
I wouldn't call it "an extremely odd burden"; a multithreaded allocator has a very strong chance of introducing a barrier on any sort of path that would allow for your scenario of a memory block being reused from one thread to another. After all, if you have a multithreaded allocator, it needs to protect against thread-unsafe manipulation of its bookkeeping structures anyway.
 

Java

Dedicated to the discussion of the Java programming language a...
Apr 5, 2016 21:15
Hello
 

Teenage Programmers Chatroom

A chat room for everybody! No age restriction, but be mature. ...
Jul 12, 2015 01:50
I'm also in the same situation; senior next year.
Jul 12, 2015 01:50
@Firedrake969 I haven't touched it in a while... Busy with other prokects
Jul 12, 2015 01:49
@michaelpri Applying next year? Best of luck, MIT's hard :) (although the campus was lovely what I stayed there for a math competition)
Jul 3, 2015 20:58
\o/
Jul 2, 2015 13:54
Morning
Jul 2, 2015 13:08
More complicated if you're trying to move a file on a branch other than the default. Also, the commas separate commands to be run one after the other, and aren't part of the command line
Jul 2, 2015 13:08
Then, git add -A, git commit -m "Move [yourfile] for [reason]", git push origin master.
Jul 2, 2015 13:07
OK: git clone [url github gives you], then cd [repository-name]. Move as @ProgramFOX specified.
Jul 2, 2015 13:06
Depends on OS: different commands to make directories
Jul 2, 2015 13:06
You can create a directory, but not an empty one. When you make a file, put slashes into the filename
Jun 30, 2015 15:23
Hello
Jun 29, 2015 14:38
@Unihedron Thanks for posting a codewars link here. I'm addicted to it now.
Jun 29, 2015 14:14
Hello
Jun 26, 2015 19:29
Aaaaw
Jun 26, 2015 19:29
//help
Jun 26, 2015 16:02
Ah.
Jun 26, 2015 16:02
Isn't the class of subatomic particles spelled "hadron" rather than "hedron"?
 
Jul 1, 2015 00:23
Sorry I couldn't give any answer.
Jul 1, 2015 00:23
It would need to include java.lang though, and it seems that it's in fact finding the classes Class and Constructor, meaning that the functionality should be there...
Jul 1, 2015 00:23
That does run in Java for me (I've constructed a class like this many times in basically the same way). I don't have Processing to test it
Jul 1, 2015 00:21
I'm at a loss then--the only reason InstantiationException would be thrown would be if Wtf were abstract/interface.
Jul 1, 2015 00:20
Right, got confused for a sec, thought the response was empty
Jul 1, 2015 00:20
OK, so no constructors declared.
Jul 1, 2015 00:17
Are you sure Wtf is a concrete class? Shouldn't IMenuRunnable declare some method(s) that need to be implemented by Wtf?
Jul 1, 2015 00:15
Is c an abstract class?
Jul 1, 2015 00:15
Or... wait. "InstantiationException - if the class that declares the underlying constructor represents an abstract class."
Jul 1, 2015 00:13
The reflection API will throw an InstantiationException if the parameters don't match up
Jul 1, 2015 00:13
Instead, could you print the value of Arrays.toString(ctor.getParameterTypes())?
Jul 1, 2015 00:12
Can you, in your loop that tries to call all the constructors, comment out the actual ctor.newInstance() call?
Jul 1, 2015 00:12
Yes, the instantiation exception is likely a cause of reflective instantiation
Jul 1, 2015 00:11
No, the reflection API in Processing should just be Java's
Jul 1, 2015 00:11
OK, my concern is that you're not getting a no-arg constructor. Let's try a little probing...
Jul 1, 2015 00:10
No, the goal is to make all constructors accessible before trying to invoke newInstance. It may be that the first call is failing because the no-arg constructor either doesn't exist or isn't accessible, and the rest of the calls require you to pass parameters to the constructor.
Jul 1, 2015 00:10
Just a hunch, but could you try looping for ( java.lang.reflect.Constructor ctor : ctors ) { ctor.setAccessible(true); } and then try c.newInstance();?
Jul 1, 2015 00:10
Could you provide the message from the instantiation exception?