I know but how would that help?

It would have been interesting. A program that converts itself. Also it would have been easier in Python.
Always against the low level languages eh? 


Python is easy but it is slow. I want to experiment with making Python faster. Something fast and easy would be nice.
I have some sort of stack overflow somewhere it seems. A char array being freed breaks another char array. There must be stack corruption.
I have some sort of stack overflow somewhere it seems. A char array being freed breaks another char array. There must be stack corruption.
I've done a bogoMIPS of C++ and Ruby and it's quite funny how slow Ruby is in comparison. I like C++ over Ruby, and Python (although admittedly I have done little with Python). Ever language has a purpose though.
Screw Python. Why not read up on compilers (or reverse engineer one) and make your own language! Okay, I take back my "screw Python" statement, but creating your own language would be much cooler.Matthew wrote:Python is easy but it is slow. I want to experiment with making Python faster. Something fast and easy would be nice.

I'm quite keen on the Pytohn language. I'm just making my own Python implementation. I could have made a Python compiler but I like the idea of a Python to C converter.
This simplistic problem baffles me:
http://stackoverflow.com/questions/3783 ... completely
This simplistic problem baffles me:
http://stackoverflow.com/questions/3783 ... completely
I have desperately hoped for a Ruby compiler but the only experimental compiler sucks and does not work. Creating your own language is still an interesting concept (at least to me) but I do not have nearly enough experience to program a compiler. Here is a link I was going to edit in but you beat me to the next post: http://www.cplusplus.com/forum/lounge/27892/Matthew wrote:I'm quite keen on the Pytohn language. I'm just making my own Python implementation. I could have made a Python compiler but I like the idea of a Python to C converter.
Page Not FoundMatthew wrote:This simplistic problem baffles me:
http://stackoverflow.com/questions/3783 ... completely

I deleted the question because I was stupid. It was not the problem. There is a problem somewhere though.
I hate tinkering with the stack and memory. Too many places to go wrong but I guess sometimes there aren't ways around it.Matthew wrote:I deleted the question because I was stupid. It was not the problem. There is a problem somewhere though.

No need to look at the memory at all. I just printed lots of variables and found the problem. I wasn't replacing the pointer which will point to a freed memory block with the new pointer returned by a function.
Never a good idea to use pointers to freed memory blocks.
Never a good idea to use pointers to freed memory blocks.
To maintain this thread (as it's an interesting topic) I have something of a conversation starter I've brought up on cplusplus.com...
Of course a calculator is not a beginner project for coupling hardware and software, but what is? Coupling the two together has been an interest of mine for a while but I never knew where to start.
MottMan wrote:How would someone go about making a calculator? I mean a physical calculator not simply a console based or GUI calculator. Obviously parts would be needed, ect, ect, but I am interested in knowing that if anyone here was told to make a calculator how you would do it.
Of course a calculator is not a beginner project for coupling hardware and software, but what is? Coupling the two together has been an interest of mine for a while but I never knew where to start.

You can buy simple electrical components for not too much money. It seems making your own circuit boards is rather awkward. You could try out wiring components with a breadboard.
For a calculator, you obviously need some pressure switches, LED 8-segment displays and a processor.
When I did electronics AS, we looked at PIC chips. You might want to try one of those. You can get a development board to program and test them. We used PIC assembly but I think you can get simple compilers also.
For a calculator, you obviously need some pressure switches, LED 8-segment displays and a processor.
When I did electronics AS, we looked at PIC chips. You might want to try one of those. You can get a development board to program and test them. We used PIC assembly but I think you can get simple compilers also.
AS?Matthew wrote:You can buy simple electrical components for not too much money. It seems making your own circuit boards is rather awkward. You could try out wiring components with a breadboard.
For a calculator, you obviously need some pressure switches, LED 8-segment displays and a processor.
When I did electronics AS, we looked at PIC chips. You might want to try one of those. You can get a development board to program and test them. We used PIC assembly but I think you can get simple compilers also.

Would you think this would be impossible? Or plausible? I'd really like to try but if you think there's no chance I probably wouldn't have much faith then either.

It is entirely possible. It might look crap but it would work.
There seems to be a few PIC chips. The one I was using had only 13 bits for I/O. If you get one like that 4 bits could be used to get a digit to display, maybe 5 bits for the input (0-9,+,-,/,*,=,C,M,M+,M-,^ etc),If you have room for 15 digits on display, you could use 4 more bits to select the digit for display.
AS is a qualification in England, Wales and Northern Ireland.
There seems to be a few PIC chips. The one I was using had only 13 bits for I/O. If you get one like that 4 bits could be used to get a digit to display, maybe 5 bits for the input (0-9,+,-,/,*,=,C,M,M+,M-,^ etc),If you have room for 15 digits on display, you could use 4 more bits to select the digit for display.
AS is a qualification in England, Wales and Northern Ireland.
I'm not too worried about the electronics side of things but more about the software. I'm sure I could pick up any language to learn arithmetics but would I need native code? Or Assembly? Sorry for all the questions but if I try this I want to be informed and prepared.
