Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: March 28, 2024, 5:29 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arithmetic Expression Compiler
#61
RE: Arithmetic Expression Compiler
(September 3, 2020 at 5:06 pm)BrianSoddingBoru4 Wrote:
(September 3, 2020 at 4:51 pm)FlatAssembler Wrote: I am not sure I understand you. You are saying going to university was worth for you because you enjoyed the experience. At the same time, you are saying going to university will be worth for me, even though I don't enjoy the experience.


Ok.

Boru
Again, I don't understand what you mean. English is not my native language.
#62
RE: Arithmetic Expression Compiler
Again, I'm not interested.

Boru
‘But it does me no injury for my neighbour to say there are twenty gods or no gods. It neither picks my pocket nor breaks my leg.’ - Thomas Jefferson
#63
RE: Arithmetic Expression Compiler
Grandizer Wrote:But coming up with solutions to problems that nobody else cares about because they're either irrelevant to their needs and wants or there are already better solutions out there, keep those for yourself for your own enjoyment.
Well, you can't know for sure if there is a market for some product until you make it, can you?
#64
RE: Arithmetic Expression Compiler
(September 21, 2020 at 3:12 pm)FlatAssembler Wrote:
Grandizer Wrote:But coming up with solutions to problems that nobody else cares about because they're either irrelevant to their needs and wants or there are already better solutions out there, keep those for yourself for your own enjoyment.
Well, you can't know for sure if there is a market for some product until you make it, can you?

I haven't looked closely at your compiler, but I am a programmer, and my first question was "why"?

I love assembler for playing around with performance.  I wouldn't touch it ever with a real product. 

No one writes programming languages or libraries in assembler because they aren't portable to different chips, are impossible to maintain over time and with a large project, and they are usually NOT faster than something that would come out of a good modern compiler and a low level language like C, C++ (or even Rust).

Learning how to parse and execute an arithmetic expression is fun too.

As for writing something and seeing if there is a market -- I've been in my industry for almost 30 years, and that is a sure way to get nowhere.  I had a hobby project when I was young that I thought I could sell.  I greatly underestimated the work it would take to make something commercially valuable, and I didn't really understand anything about my market (its size, and how to get customers who wanted to pay).

By all means, learn and have fun with a hobby project, but that is almost certainly not going to make you much money. There is a chance that all your fun playing may give you an expertise in a certain area that may one day be useful to an employer, however.

As for the value of university -- it does teach you how to learn and how to solve problems that others give you (and not just your own interest).  For employers, it is some indication that the employee might succeed in a real-world environment (though not a guarantee of specific knowledge).
#65
RE: Arithmetic Expression Compiler
HappySkeptic Wrote:By all means, learn and have fun with a hobby project, but that is almost certainly not going to make you much money.
Well, as far as I understand it, if I don't have hobby projects, no employer will employ me (whether or not I have a diploma). Hobby projects are a proof you know how to actually program, rather than just the theory.
HappySkeptic Wrote:As for the value of university -- it does teach you how to learn and how to solve problems that others give you (and not just your own interest).
Well, the problems you face in real life have little to do with the problems you face at the university. And the reason you are solving them for is very different. In university, you solve them because that's what's expected of you, and you don't really understand why. In real life, you do it for money.
HappySkeptic Wrote:For employers, it is some indication that the employee might succeed in a real-world environment (though not a guarantee of specific knowledge).
Well, you know, spending years studying nonsense at the university just because it might help you get employed, and there is no way to tell whether the diploma really helps you get employed, seems like a rather bad deal to me.

By the way, I've started implementing data structures into my programming language.
#66
RE: Arithmetic Expression Compiler
(October 5, 2020 at 5:01 pm)FlatAssembler Wrote:
HappySkeptic Wrote:By all means, learn and have fun with a hobby project, but that is almost certainly not going to make you much money.
Well, as far as I understand it, if I don't have hobby projects, no employer will employ me (whether or not I have a diploma). Hobby projects are a proof you know how to actually program, rather than just the theory.

This is true.  If this is your only proof that you know how to program, by all means create hobby programs that you can show to an employer (through github or somewhere that they can get the source code).

In the long past I've certainly used code samples when hiring people (though not recently).

With code samples, I try to look at how someone has solved a problem, how clean and maintainable the code is, and how elegantly they have used design patterns and data structures.

If you don't know what they are looking for, your hobby projects could sink you rather than help.  I would suggest you have professional friends look over your work and give you pointers on what you need to learn (as well as what languages to be familiar with. You can't just know one)

I also like someone who regularly uses a unit-testing framework. It is a real pain to get a new hire that never writes a unit-test, and just finds bugs via running the debugger.

(January 3, 2019 at 12:35 pm)FlatAssembler Wrote: BTW, let me be clear, I am not planning to continue developing it. I've made it just in case somebody asks me "Do you know anything about how the compilers work?", that I can shut them up by saying "Sure, I've made one! From scratch, in JavaScript. For my own simple programming language that compiles into Assembly.".

Compiler design is a complicated thing, and a toy language with unoptimized output may not impress. 

The most popular C compiler right now is CLang, which is a front-end for LLVM.  Now, if you wanted to do something cool, try creating your own compiler that is a front-end for LLVM.  Then, with the right tool chain, the LLVM intermediate bytecodes can be compiled to any platform.

That would show that you are able to understand a complicated bit of existing technology, and interface with it.  That is half the battle of being a programmer in the real world.  There is always some new bit of technology that you need to learn quickly, and be able to integrate with.
#67
RE: Arithmetic Expression Compiler
HappySkeptic Wrote:If you don't know what they are looking for, your hobby projects could sink you rather than help.
How is having only done bad projects more alarming than having done no projects whatsoever? Everyone starts with writing bad code and they progress.
HappySkeptic Wrote:as well as what languages to be familiar with. You can't just know one
Well, I've written a compiler for my programming language in JavaScript (the old compiler targeting x86) and C++ (the new compiler targeting WebAssembly).
Though, I haven't used frameworks typical for them. I know nothing about VueJS, React, Angular and other frameworks typically used with JavaScript. I used the Duktape framework, which was useful for what I wanted to achieve. With C++, I have been able to do everything I wanted until now using only the standard library, I haven't used any frameworks. I don't even know which C++ frameworks are commonly used, to be honest.
HappySkeptic Wrote:I also like someone who regularly uses a unit-testing framework.
Well, I use some automated testing in my new compiler, for the things that are easy to test automatically (the tokenizer, compiler and semantic analyzer). It's not as easy to completely automatize testing of the core of the compiler (outputting assembly code), and I think it's not worth the effort.
HappySkeptic Wrote:It is a real pain to get a new hire that never writes a unit-test, and just finds bugs via running the debugger.
Well, to be honest, I don't even know how to install a debugger on the Linux machine at which I am working.
HappySkeptic Wrote:unoptimized output
Optimizers are a double-edged sword. On one hand, they can make a program faster. On the other hand, they can introduce bugs. Nearly all compiler bugs are in the optimizer. And even without compiler bugs, there are still undefined behaviors in languages that are not exposed unless you turn on the optimizer.
That's the reason embedded devices are still programmed in assembly, rather than C or higher level languages. You can't trust the compilers to produce both correct and fast code for them.
HappySkeptic Wrote:Then, with the right tool chain, the LLVM intermediate bytecodes can be compiled to any platform.
How is that better than my new compiler targeting WebAssembly? Except that very few computers have LLVM virtual machines already installed, and nearly all computers today have WebAssembly virtual machines already installed.
#68
RE: Arithmetic Expression Compiler
I published another YouTube video about my programming language: https://youtu.be/YFZ-45ea5mo
#69
RE: Arithmetic Expression Compiler
I have tried to add a feature to my AEC-to-WebAssembly compiler that it suggests corrections for misspelled function or variable names, using the Longest Common Subsequence algorithm. However, now that compiler crashes if compiled with CLANG on Windows or Visual Studio on Windows, and it is set to compile the Analog Clock example. It runs into Stack Overflow then, if I am interpreting the error messages from the debugger correctly, when compiling the line 358 ( https://github.com/FlatAssembler/AECforW...k.aec#L358 ). The error does not occur on Emscripten, on any version of GCC that I have tried or if optimization is enabled in CLANG (using -O3, it only occurs in CLANG on Windows under default optimization). Can somebody help me figure out what is going on?
I have opened a GitHub issue about it, on which you can see what the Visual Studio Debugger outputs when that Stack Overflow occurs: https://github.com/FlatAssembler/AECforW...y/issues/5
By the way, which algorithm would you be using for suggesting corrections for misspelled variable, function and structure names? I am using LCS ( https://github.com/FlatAssembler/AECforW...de.cpp#L99 ), but I am quite sure it is not the most appropriate (sometimes suggesting a very long variable name which has that misstyped variable name as substring, rather than the much-shorter variable name the programmer more likely intended).
#70
RE: Arithmetic Expression Compiler
Moderator Notice
Thread closed for nectoposting.
  
“If you are the smartest person in the room, then you are in the wrong room.” — Confucius
                                      



Possibly Related Threads...
Thread Author Replies Views Last Post
  Compiler Theory FlatAssembler 5 987 October 27, 2020 at 10:48 am
Last Post: Angrboda



Users browsing this thread: 1 Guest(s)