« first day (1110 days earlier)      last day (2746 days later) » 

07:33
Best servey question " 1 or 0 " :)
 
3 hours later…
10:49
@MuTiny how does it relate to C in any way?
@Kamiccolo I have done it , and I dont think so.
11:14
Has anybody ever worked with embedded C in Texas instruments?
> mutiny - an occasion when a group of people, especially soldiers or sailors, refuses to obey orders and/or attempts to take control from people in authority -- Cambridge Dictionary
helloc @MeetTaraviya;
nope, but what seems to be the problem?
helloc
i want to understand how the makefile works
and does that makefile specific to texas instruments? :)
yes kind of. but see if you can help
helloc @BurakAkyıldız;
11:16
i want to know how to add -I paths
hello @PeterVaro
CFLAGS += -I path
no variable named cflags
Also it is using something like arm-gcc
@MeetTaraviya yup, for a short while. But bricked the board in no time. And the work is over :D
@Kamiccolo Have you used external libraries
11:20
>2.5.2 The Search Path for #include Files
The #include preprocessor directive tells the compiler to read source statements from another file. When
specifying the file, you can enclose the filename in double quotes or in angle brackets. The filename can
be a complete pathname, partial path information, or a filename with no path information.
• If you enclose the filename in double quotes (" "), the compiler searches for the file in the following
directories in this order:
1. The directory of the file that contains the #include directive and in the directories of any files that
Do you know how to add external libraries? Specifically I want to run C-embedded python in it
@MeetTaraviya I've used TI board and good old plain gcc :}
u know how to build without ccs?
And I have no idea what's ccs :D
what board?
can u send the makefile
11:24
digs through the can of defunct electronics aaah, here it is. MSP-EXP430G2. Not sure if I have the toolchain laying around... but it should be simple enough....
micropython does not support my board
nowhere i could find TI_ARM_C_DIR in the makefiles
@MeetTaraviya but there is -i"/opt/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" So, I'm presuming it just shortened for m of --include_path=./include
Python question there
Also do you have any idea how to resolve "unknown multiarch location for pyconfig.h"
@MeetTaraviya need to install and/or cross-compile relevant python environment?
What causes "unknown multiarch location for pyconfig.h" error?
I am trying to embed a c file executing python into an embedded c project
When compiled independantly, it works fine
But when compiled with the embedded project of c, I get the above error
Can anyone help me understand what's going on here
It compiles fine with my makefile
CCS is too complicated
11:48
how to import libraries? dotA or dotO ?
@MeetTaraviya Have You checked the TI's compiler manual I've linked?
12:04
I don't think it's a C problem, but a python problem
I included all files and libraries I could
link is never a C problem, it's could be gcc problem but C don't care about makefile or whatever
@PeterVaro I dont know you read this but very thanks. Im learn old C standard and i still focus abut C++ standards, I forgot on "new" C standard and never complexy read this. Again thanks, you open my mind :)
Where are these libraries found : -lpython3.5m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
@KirkBrodie that's allright, mate, that's why we are here in the first place -- to learn and to help each other, aren't we?
;)
12:22
@MeetTaraviya You should do a question because you are very unclear.
Should I ask it on stackoverflow or e2e.ti.com ?
13:01
This is your choice.
both if you want more answer :p
@Stargateur Have you worked with TI boards before?
No, sorry I don't know how to help you
Thanks for the upvote!
13:35
@MeetTaraviya well, who knows where did You put it on Your machine :}
13:58
@Kamiccolo Context??
 
4 hours later…
18:08
Why, beginner try to code C with socket plus multi threading ?
18:23
@Stargateur blame the academic system, I guess? :)
I mean, no new comer starts working with C because s/he is desperate to do so..
it is a funny thing though, because I believe that the bottom->top approach is better than the top->bottom, BUT I only think this is true for the concepts and not for the abstraction layers
You mean they code in C because they are forced ?
I think, new comers should start with a very high level language, and then move lower and lower on the abstraction chain
@Stargateur yepp, well, most of the time
well, this is probably true.
I think that every body need a level of abstraction when learning programming.
exactly -- it is so much easier to move onward if you have a solid base of understanding via abstract examples
For example, for me C was very good because I never have difficulty with logic (condition, &&, ||, etc). I have only memory to understand. But some people, start in C but don't understand very basic concept. Here, school should change the language to something more "easy"
For example, school learn recursive.... in C. Why, Why Why !!!
Where is the flag "close this question because the code look like microsoft convention". :p
19:09
@Stargateur what's the difference between learning recursion in C and Pascal/Go/Java/Python/Lua/whatever? o_0
C don't guaranty tail recursion
So?
It's just a special case of recursion, You can jump to when You get what actually recursion is.
@Stargateur very few languages guarantee that -- as a matter of fact, it is more of exception to be guaranteed, that it will be optimised out
so I don't get you point there
C is not hard because of the memory management
that is the easiest thing to understand
even pointers are very easy things
????????
19:15
in C -- IMO -- the most difficult thing is to understand and follow the standard
Why C is hard for you ?
wether it is the standard, ot the POSIX, or whatever
@Kamiccolo C is not a language build to do recursion, that all. ocaml is far better, haskell...
you just have to know all the possible rules out there, promotions, undefined, unspecified, implementation defined behaviours, etc.
I think you are wrong because you have a lot experience in C.
19:17
and you are on your own out there -- the compiler will not hold your hand in most of these cases
I don't understand why you say that to me
I'm not a beginner
because you asked me why I think C is hard :)
I just ansered there :)
Sorry, I'm not very good in english
So for you, C is only hard because there are a lot of knowledge to acquire ?
@Stargateur please, don't compare apples and buildings :D
@Stargateur there are like... 20-30 comments in the whole thread... which one?
Lundin comment made me sad
all because a someone use recursion in C, Lundin said that recursion should not be use at all...
19:26
I'm sure he did not think that -- he is more experienced than that -- but I guess he has a point there, though he did not use the proper terms and words there
so, IMO what he tries to say there, is that most real life problems, where we are using recursion can be easily converted into loops
there are, however exceptions!
all tail recursive can be convert to loop
some recursions could not be transformed into loops
@Stargateur I think even mutual recursives can be
but that's not the point
the point is, there are problem that can only be solved by recursions -- recursions, which cannot be written as loops
and that is the best counter argument against Lundin's badly written comment: recursions have their own use cases
and they are not only attempts to bring math to programming
but sometimes they are the only valid solutions
@Stargateur that, and the fact, that most of these problems cannot be detected during translation, which means: the compiler will not save your arse, nor the runtime -- you are on your own
and that is hard, because human beings suck at programming
we are bad at it, that's an axiom
I don't think that there are problem that can only be solve by recursive because you can simulate a stack without difficulty and loop on this stack until it's empty. But yes I agree there are problem than are more easily solve with recursive.
@Stargateur let me search you something -- there are problems that can ONLY be solved recursively
you welcome
19:33
(this is not an optinion, it is a fact)
20:08
Just with 1 minute, I can already expect to be wrong XD, seem to be very instructive I don't look all computerphile video
The C example, so old... C89 sponsoring this video
20:26
I don't see why this would be impossible to simulate the recursive with an allocate stack and iterate with this stack.
20:42
malloc is required in C++, but not recommended in C, is that right?
this is the contrary
new is recommended in c++
malloc is mandatory in C
sorry
i meant casting malloc
in this case you are right
1666
Q: Do I cast the result of malloc?

Patrick McDonaldIn this question, someone suggested in a comment that I should not cast the result of malloc, i.e. int *sieve = malloc(sizeof(int) * length); rather than: int *sieve = (int *) malloc(sizeof(int) * length); Why would this be the case?


« first day (1110 days earlier)      last day (2746 days later) »