Anonymous
but i truly want to learn. where do i start from as a beginner please guys give me a guide. thank you
Anonymous
i need advice
Alejandro
but i truly want to learn. where do i start from as a beginner please guys give me a guide. thank you
If you want to learn how to program, the best way is writing a lot of programs. You can get the basics of any programming language just using Google. Once you have that, make some programs that you're interested in, and if you don't have any idea, you can use websites like projecteuler.net or codingame.com to get some challenging ideas. If you want to learn specifically C++, you can read C++ Primer last edition or A Tour of C++ (written by the C++ creator) and then Effective Modern C++. Of course, read the books while programming a lot, and try to find useful ways to use what you just learned. This is how I learned (more like "I'm learning") C++.
klimi
/ban promoting group
Marie
Joe
Joe
Hi guys howexactly do I interpret the offset and bits here? Don't really get how to work with this..
Joe
It's from red pitaya btw
Marie
/save howtoprogram
Yas! Added howtoprogram. Get it with /get howtoprogram, or #howtoprogram
olli
Hi guys howexactly do I interpret the offset and bits here? Don't really get how to work with this..
The memory region is separated into blocks with four byte each. Each block is then subdivided into the bit regions, where the first four bits of the first block represent the trigger selector... The first 14 Bits of the second Block represent the Amplitude scale and so on..
Ludovic 'Archivist'
so this might be really subjective.. I like the single line better, imo it's easier and faster to read, faster to write and code duplication is minimized Depending on coding guidelines (e.g. not to omit optional {}) the if - else construct can become quite clumsy
template<typename T1, typename T2, typename ...rem> T1 min(T1 a, T2 b, rem rest...) { T1 vmin=a; if constexpr (b<a) { vmin=b; } if constexpr (!sizeof...(rest)) { return vmin; } return min(vmin, rest...); }
olli
I typed on my phone
Why multiple types though?
Ludovic 'Archivist'
Ludovic 'Archivist'
olli
I likely made a mistake with those vargs again
"b is not a constant expression" (is the first error after fixing the minor varargs issue)
Ludovic 'Archivist'
Ludovic 'Archivist'
Ludovic 'Archivist'
But put the function itself constexpr
olli
But put the function itself constexpr
Without any constexpr the compiler says "no matching function call"
Dima
lol photo of a screen
olli
lol photo of a screen
Sorry :D however can't access telegram on this system and did not want to type this on my phone
Dima
oh
Ludovic 'Archivist'
the second if must be constexpr
olli
the second if must be constexpr
And you need to put the recursive call into an else block
Ludovic 'Archivist'
And you need to put the recursive call into an else block
That is what i did on my computer, this is due to C++ not detecting dead code by standard on encountering constant expressions
Ludovic 'Archivist'
template<typename T1, typename T2, typename ...rem> constexpr T1 min(T1 a, T2 b, rem ...rest) { T1 vmin=a; if(b<a) { vmin=b; } if constexpr (!sizeof...(rest)) { return vmin; } else { return min(vmin, rest...); } }
olli
template<typename T1, typename T2, typename ...rem> constexpr T1 min(T1 a, T2 b, rem ...rest) { T1 vmin=a; if(b<a) { vmin=b; } if constexpr (!sizeof...(rest)) { return vmin; } else { return min(vmin, rest...); } }
<template class T, class ...R> constexpr T min(T t, R ... r) { if constexpr(!sizeof...(r)) { return t; } else { return std::min(t, min(r...)); } } Or in case your stuck on c++11 template <class T> constexpr T min(T t) { return t; } <template class T, class ...R> constexpr T min(T t, R ... r) { return std::min(t, min(r...)); } Works as well :)
Ludovic 'Archivist'
man, you implement a min using std::min xD
Ludovic 'Archivist'
The point is assuming you want to implement a function that would not require it
Anonymous
i have approached couple of universities for direct PHD program , all of them asks for per-requisities  with subjects like " Calculus Data Structures and Algorithms Operating Systems " . Since my bachelor degree is not in computer field. i am struggling to find out ways how can i prove/meet that per-requisites? Do (in general) universities/colleges allow related MOOC ? i also came to know that most of MOOC are not accredited. so i am afraid.
olli
i have approached couple of universities for direct PHD program , all of them asks for per-requisities  with subjects like " Calculus Data Structures and Algorithms Operating Systems " . Since my bachelor degree is not in computer field. i am struggling to find out ways how can i prove/meet that per-requisites? Do (in general) universities/colleges allow related MOOC ? i also came to know that most of MOOC are not accredited. so i am afraid.
I have no experience with PHD programs, however I can tell you how it was handled for master programs at my university. Our admission committee did not accredit MOOCs. Based on the students previous programs he was either rejected or had to pass exams from our own programs where we felt the student needs to prove his knowledge. These exams were in addition to the regular course and had to be passed to graduate. Maybe some universities allow you to prove your knowledge by passing the required exams as well? However this is #offtopic
Anonymous
why would you ever need this
This is college requirement
WhiteKing007
Okay
Marie
Who dis non-admin telling me what to do?
Marie
Get rekt
Thespartann
/runs
Thespartann
Fek
Anonymous
/get howtoprogram
Marie
/get howtoprogram
If you want to learn how to program, the best way is writing a lot of programs. You can get the basics of any programming language just using Google. Once you have that, make some programs that you're interested in, and if you don't have any idea, you can use websites like projecteuler.net or codingame.com to get some challenging ideas. If you want to learn specifically C++, you can read C++ Primer last edition or A Tour of C++ (written by the C++ creator) and then Effective Modern C++. Of course, read the books while programming a lot, and try to find useful ways to use what you just learned. This is how I learned (more like "I'm learning") C++.
many
Is there an explicit standard of "good taste of code" as said by Linus?
many
I feel like "good taste" is kind of vague
BinaryByter
many
Lower complexity, less case checking, what else?
many
Ps don't be language specific
BinaryByter
I feel like "good taste" is kind of vague
there are many things you take for granted - indentation - small functions - good names - use code instead of comments - reduce duplications - reduce the amount of arguments to functions - unit test everything - refactor on the fly
BinaryByter
Ps don't be language specific
there are some languages that allow for simpler clean programming than others. C++ is a good choice
Joe
if anyone is bored and wants to take a quick look at this code I`d highly appreciate it.. what i need to do is change the duty cycle of one of the two PWM signals and I just don`t know how
Joe
Anonymous
in case i close the pinned message, how to display it again?
Anonymous
*closed
klimi
hm
klimi
idk
klimi
i can link
klimi
Rokas Urbelis: ## Welcome We're very glad to welcome you to join the International C/C++ Group. You can invite others by https://t.me/programminginc ## Rules * You are not entitled to an answer, getting angry about not answered questions will get you warned. * Not checking your problem in google (or any other search engine) first will get you a warn. * Asking for something that is in the pinned message right after joining WILL GET YOU BANNED. * C/C++ discussion preffered (assembly also allowed), asking about other languages right after joining will get you BANNED. * Reverse enginnering, hacking (not facebook, instagram, etc.) also if you ask "how to become a hacker" and obviously have zero knowledge on anything related to that you may get warned or banned. * Legitimate requests for help on code and programming questions are ok (no homework requests, or "pls write entire program for me" requests). * Asking for book recommendations is ok, but "pls give pdf book" is not allowed, find books by yourself. Posting illegally copied books (or links to those books) is also not allowed. * Only English language is allowed, if you speak shitty English or don't understand anything in English YOU WILL BE BANNED. * A little bit of programming related memes, jokes, shitposting are allowed. * NSFW content (porn, nudity, etc.) is not allowed. * Spamming will grant you a warning or an immediate ban if you spam right after joining. * Religion, politics and ideological topics are forbidden. ## Resources About asking good questions: * [English](http://www.catb.org/esr/faqs/smart-questions.html) * [Translations](http://www.catb.org/esr/faqs/smart-questions.html#translations) For posting long code snippets: * [GitHub Gist](https://gist.github.com) * [Ubuntu Paste](https://paste.ubuntu.com/) ## Reports If you notice any forbidden content, please use the /report command while responding to the offending post to report it to the admins.
.
Anonymous
but can't be pinned
Dima
You can save that to your “Saved Messages” here, in telegram
klimi
Welcome Rustem, please read the pinned message.
Dima
Marie’s sick
Dima
?
Dima
so you are replacing her for a while
klimi
yes
klimi
just little assistance
Marie
Purge complete.
G L I T C H 🎭
Do you have a group for other programmes
Roxifλsz 🇱🇹
Do you have a group for other programmes
We don't, but you could just google "<programming language> telegram group"
Anonymous
hello
BinaryByter
Hello
BinaryByter
@Kurimi ❤️