Guilherme
Like this
Pavel
I want compile one program in C on telegram
Why would you want something like that? it seems to be very-very uncomfortable
Guilherme
How to use the bot?
Guilherme
Pavel
Because i need study but im not with my PC now
There are lot of good online compilers like wandbox, or services like codeanywhere with mobile apps
Guilherme
Thanks, bros
Dark
Thanks, bros
Give me a couple of days and I will make you a bot that compiles C code from telegram. I don’t know why you’d want it but ha.
Pavel
Give me a couple of days and I will make you a bot that compiles C code from telegram. I don’t know why you’d want it but ha.
I think the main problem here will be not to make bot, but to make it impossible to attack your machine using this bot. Or you have a solution for that already?
Dark
I have a solution already, it will compile it and sent the compiled file back to the user.
Dark
That’s the only way I can see it work
Guilherme
Don't worry men
Guilherme
I found a way
Pavel
I have a solution already, it will compile it and sent the compiled file back to the user.
That doesn't work in general case with telegram, unless you can build for any platform it can be runned on (including Android and iOS).
Dark
Ok, well I am just try to put ideas out there
Dark
You got any idea
Pavel
No, sorry. Actually Docker sounds promising, if you can limit cpu and memory that consumed by one instance, and won't allow to run some long calculations.
Dark
Ok, I was kinda thinking of having a python bot and that you would send a code file like example “test.c” and then it would get downloaded and compiled then added to share file on virtual machine and make a simple program to check the shared file on the virtual machine every 2 seconds and then send a temp link to display output.
Pavel
Also there can be some libs for online compilers that have some sandboxes with them
Dark
Also there can be some libs for online compilers that have some sandboxes with them
Yeah because we don’t want it running in the actual machine
Dark
Because is a security risk
Anonymous
sanboxes?
Pavel
sanboxes?
Sandboxes, that was a typo
Anonymous
Ohk
Dark
Anyway I think he found something anyway so I don’t need to make it. But it would be a fun project
Dark
If I start a GitHub repo maybe we can work together to make it.
Pavel
If I start a GitHub repo maybe we can work together to make it.
Nah, Even though it sounds fun, I already have tons of unfinished projects, don't want another one in this list 😂
Anonymous
/notes
Anonymous
/rules
Anonymous
#ide
Anonymous
Is it okay to put all #include's in .h file and then just include .h file in implementation file (.cpp)??
Anonymous
I hope the question is understandable
Talula
Is it okay to put all #include's in .h file and then just include .h file in implementation file (.cpp)??
I think that is what you do when you have main,h and all the include files are called in that.
Talula
That is a normal way to write a program that even the main program should have .h file.
Talula
Normally people don't do it these days but that is how it should work.
Anonymous
/ide
Talula
why?🙄
Because they write small program in C/C++ now a days.
Talula
So it doesn't make sense to have a seperate .h file for main.
Talula
Or whereever your main is implimented.
Anonymous
There is one libssh library that is needed in .cpp implementation file, but not in .h file. Ideally, where should I put it?
Talula
Assuming your program is called main.c or main.cpp your .h file will be main.h
Talula
in your main,c or main.cpp you simply add #include "main.h"
Talula
And your main,h includes every other .h file you want to include.
Anonymous
It's sshConn.cpp and sshConn.h. Main.c will use sshConn.h
Anonymous
And your main,h includes every other .h file you want to include.
Is this a general convention or a personal opinion
DaVlad 🇸🇰
do not place #include in header if it's not neccessary
Talula
It's sshConn.cpp and sshConn.h. Main.c will use sshConn.h
Include every .h in sshConn.h and in sshConn.cpp include sshConn.h
Anonymous
@Tazmikar @ilayja you guys are contradicting each other
Talula
@Tazmikar @ilayja you guys are contradicting each other
I'm answering your question, which was "Can I place all the .h files in a seperate file and call that .h file"...
Talula
As I understand.
Anonymous
Normal best practice is for every file to include all the header files it requires, disregarding #include directives in included files. Each header file should header guard.
DaVlad 🇸🇰
I would add that you should not include something in the file where it's not required, including something in header will cause problems for other people if they use your library in binary form+headers
Anonymous
Got it. Thanks.
Anonymous
I am working on an SSH password cracker (Brute/dictionary attack). C++ project educational project. https://github.com/x899/ssh_brute_force I will really appreciate if you could review the code.
Anonymous
If you guys want to contribute, here is a list of things I want to implement Logging Argument Parser Multithreading This is not an exclusive list.
Lalit
Someone can provide the hand written notes of c language please
Lalit
If anyone have
Dima
Lol what.
Lalit
Hmm
Francisco
If you guys want to contribute, here is a list of things I want to implement Logging Argument Parser Multithreading This is not an exclusive list.
I really encourage you to use CMake as the build system. For logging I'll recommend you spdlog. For argument parser I've used Boost.Program_options, which works quite well and it's easy to use
Anonymous
Is there proxy allowed?
If you want...you can implement it... In the process, i will learn something new...:p
H̲i̲L̲e̲v̲e̲l̲
I don't know how it works
Anonymous
I don't know how it works
if you have a basic idea about it...we can work on it together
Francisco
Thanks for cmake and spdlog... Boost will too heavy, I am thinking of using cxxopts (header-only)
Boost usually comes already installed in linux distributions. Also, you only have to use one of the modules
Anonymous
i have heard some debate on the subject
Francisco
Is Boost used in industry?
There're some boost libraries that are really good (hana, fusion, signals2, multi_index...), but some others are quite outdated and need a good refactoring and new APIs
Anonymous
thanks. will look into it.