Project ideas

Hey guys.

I just graduated and still job hunting. In the mean time, I want to add more stuff to my personal projects/portfolio and would like to get some opinions and ideas from you guys.

What should I build? Anyone have cool ideas?

Cheers
closed account (Dy7SLyTq)
how advanced are you? building an interpreter is a fun project im doing
Write a basic NMS. Something with a GUI (web based perhaps?) and ability to easily add in devices. Start off with doing simple ping sweeps to check if devices are alive. Then you can just continue to add on more functionality as you have time. This isn't necessarily a C++ project, but it's a project none the less. Something I've been considering starting just as something cool to have in my portfolio.
closed account (Dy7SLyTq)
whats an nms?
whats an nms?

And from trusty Google (in under 10s I might add) gave me a Network Management System.
@DTSCode that sounds fun, are you you using any parse generators, etc. ?

EDIT: Spelling
Last edited on
Forgot to mention: There is an on going chess project: https://github.com/naraku9333/ChessPlusPlus (I do not know if that is the best link, but it is the one I used)

Also, some members are trying ot get a monthly project going: http://cppcomp.netne.net/showthread.php?tid=2&pid=17#pid17

@OP Also, you did not mention what type of projects you would enjoy (i.e. games, networking, scripting, web-based, etc.)
closed account (1yR4jE8b)
There is an official Cplusplus.com Github organization, so I would imagine the canonical version of the code is there:

https://github.com/cpluspluscom/ChessPlusPlus
@Script Coder
The ChessPlusPlus repo was moved to here: https://github.com/cpluspluscom/ChessPlusPlus
as darkestfright mentioned.

@OP
Feel free to contribute to your hearts desire to ChessPlusPlus. It's inching along slowly as it is :P
Last edited on
closed account (Dy7SLyTq)
@script coder: no its all done by hand
@DTS That sounds awesome :)
Did you use a tutorial? If so would you mind sharing the link.
Also, would you mind giving a syntax example, please (just for curiosity's sake).
closed account (Dy7SLyTq)
I did use many tutorials, but just what i came up with at last is i read in every character until i hit a ; and then string stream it to get the command and then send the rest of the it to the appropriate function. ill post some source if ur interested. and the syntax is like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#this is a comment (equivalent to //)
#*this is equivalent to /**/ *#
import libraryOne, libraryTwo;

function add(var base)
{
     return base + 5;
}

println "enter a number: "; #println is the output stream
readln #*input stream*# base; #works cause the 
                                     #two base vars are in different scopes
var addedBase = add(base);
println base & "+5=" & addedBase & end; #end is like endl

print
closed account (3qX21hU5)
Hmm looks like a python and c/c++ mix I kinda like.
Looks like JavaScript to me.
closed account (Dy7SLyTq)
while i have come up with some unique features (which i have not yet implemented) it does steal ideas from c(++), python, js, java, and php. although i am considering some things from haskell
DTSCode wrote:
read in every character until i hit a ; and then string stream it to get the command and then send the rest of the it to the appropriate function

This seems like a really bad way to parse anything more complicated than command lines.
This seems like a really bad way to parse anything more complicated than command lines.

I 100% agree, but it is the easiest way to do it. Also, how would you do it, would you mind giving a few educational links.
@ScriptCoder, DTSCode
The better way to do it would be to hand-write a proper parser of some kind---LL, LR, LALR, recursive-descent, etc.---or to use a parser generator (usually flex/lex with yacc/bison). For this case, you would probably use a hand-written recursive-descent parser (as gcc/g++ and Clang do).

I started working on (read: abandoned) a compiler for a somewhat C-like language in C# a while ago. You could probably understand the code even if you don't know C# since it's similar enough to C++ and especially Java. I think the lexer is LL(1) but I don't know much about compiler theory so I'm not sure.
* Language example: http://pastebin.com/fM24sBZr
* Lexer: http://pastebin.com/s7BWRas8
The lexer does work, but it's not very good.

I never got around to actually parsing the tokens to produce C code (which would then be compiled into assembly by Clang or gcc). Parsing is far harder than tokenising, and honestly, I didn't (and don't) think I would be able to do it. I wasn't all that motivated, even though I still think the language I designed is pretty.

Script Coder wrote:
educational links.

http://www.amazon.com/dp/0321486811/
Last edited on
chrisname wrote:
I think the lexer is LL(1) but I don't know much about compiler theory so I'm not sure.

After reading your code, I agree. This is the definition from Wikipedia:
Wikipedia wrote:
I think the lexer is LL(1) but I don't know much about compiler theory so I'm not sure.


Also, thank you for the link, I downloaded the book sometime ago, tried reading it, it was too complicated then I'll try my luck now.
Would c be a good object code language? or would assembly be better?
I chose C because I thought converting a C-like language into C would be trivial compared to properly parsing it, and also because popular C compilers have powerful optimisers while I know nothing about optimising code in code (I know how to do it by hand, but obviously I'm not going to simulate strong AI in a compiler just to optimise code---also, computers are probably better at it anyway).

I know how to tell what the k in LL(k) is, but I don't know how to differentiate LL and LR. I don't know what "x-most derivation" means and haven't found a good explanation that I could understand.
Last edited on
I know how to tell what the k in LL(k) is, but I don't know how to differentiate LL and LR. I don't know what "x-most derivation" means and haven't found a good explanation that I could understand.

I am assuming you do not understand terminal and no-terminal.
In a context free grammar, production rules are written as:
S->x

Where 'S' is a non-terminal (i.e. can be transformed into something else) and 'x' is a string of terminals and/or non-terminals. (terminals cannot be transformed into something else, and thus can never be on the left hand side of the production).

Okay so now onto LL and LR:
If we have the productions:
Rule 1: S->SX
Rule 2: S->m
Rule 3: X->1


then there are multiple ways to form the string "m11"
We always start at the first production rule. So 'S'.
S can be transformed (bu rule 1) into SX.
From there we can either transform S or X next. If we use the left-most non-terminal to transform we are using LL. If we use the right most terminal, we are using LR.

Transformation of the string using LL:
rule 1; rule 1; rule 2; rule 3; rule 3;
Transformation of the string using LR:
rule 1; rule 3; rule 1; rule 3; rule 2;

As you can see you will always use the same number of rules, just in a different order.
Hope this helps.
Please let me know of any error/ thing that are not explained properly.


EDIT: @chrisname I just realised that you have not made an LL or an LR. They refer to parsers, you have made a tokeniser with one look-ahead character.
Last edited on
Topic archived. No new replies allowed.