many
What is a less command?
It's a command for browsing document. Users can navigate up and down freely in the stream of a document
Jussi
That's one way to do it. From my experience this way produces less flashing than clearing the console and redrawing the scene.
Actually the reason for flashing is that you input x number of newlines/std::endls, which flush the output --> X is number of rows in terminal. X number of newlines in just a couple of milliseconds --> looks like something flashed
Jussi
Therefore it's way better to use ncurses as it handles the flushing for you in multi-line (well you need to call the update function but that's it)
many
Well explained. Ncurses is simply magical
Anji
Hii
Anonymous
whats the best linux distro for developers
Dima
kali linux
Dima
:)
Anonymous
kali linux
thinking about getting linux because valgrind doesnt work on my mac
Artöm
whats the best linux distro for developers
Ubuntu derivatives are pretty handy and configurable, good starting point. If you know linux well enough and can google, you might try arch
Artöm
thinking about getting linux because valgrind doesnt work on my mac
Theres no normal valgrind in homebrew/macports?
Anonymous
Theres no normal valgrind in homebrew/macports?
==> Cloning git://sourceware.org/git/valgrind.git Updating /Users/humblerise/Library/Caches/Homebrew/valgrind--git ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. HEAD is now at 78054a6c0 Remove some trailing whitespaces ... ==> ./autogen.sh ==> ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-78054a6 --enable-only64bit --build=amd64 Last 15 lines from /Users/humblerise/Library/Logs/Homebrew/valgrind/02.configure: checking for gcc-ar... no checking for perl... /usr/bin/perl checking for gdb... /no/gdb/was/found/at/configure/time checking dependency style of clang... none checking for diff -u... yes checking for clang option to accept ISO C99... none needed checking for a supported version of gcc... ok (clang-11.0.0) checking build system type... x86_64-pc-darwin checking host system type... x86_64-pc-darwin checking for a supported CPU... ok (x86_64) checking for a 64-bit only build... yes checking for a 32-bit only build... no checking for a supported OS... ok (darwin) checking for the kernel version... unsupported (19.0.0) configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13) READ THIS: https://docs.brew.sh/Troubleshooting
Artöm
Lol
Anonymous
Lol
i either can get a virtualbox/linux , dual boot linux , or downgrade my mac os
Artöm
Or patch valgrind
Anonymous
Or patch valgrind
what do you mean ?
Artöm
what do you mean ?
Fork valgrind repo and try to setup it for your mac version
Parra
uf
Anonymous
Anyone know some good resources to learn C++?
Parra
patching valgrind may be very difficult
Anonymous
Fork valgrind repo and try to setup it for your mac version
according to stackoverflow its not compatible with anything higher then 10.12
Parra
patching valgrind may be very difficult
it's a very complex piece of software with a lot of hardcoded snippets of code
Anonymous
i have 10.19
Artöm
That was a joke
Parra
I would try to setup a small virtualbox
Parra
That was a joke
oh got it, I'm not good getting jokes
Parra
what distro of linux should i get fedora, ubuntu
if you are using virtualbox, debian, if you are setting up dual boot Ubuntu
Anonymous
if you are using virtualbox, debian, if you are setting up dual boot Ubuntu
i using a virtual box for now , is there any benefit to dual booting ?
Artöm
Vm requires additional memory and cpu resources. If it doesnt matter, usability is the only issue
Anonymous
it's faster, but I prefer vbox
i need more harddrive space lol
Parra
I use vbox a lot, I develop crossplatform c/c++, and also many other languages, so I must setup many environments, I use it in combination with docker and kubernetes
Anonymous
Parra
how much memory should i allocate for VB. i am setting it up now
do you have graphic enviroment or just console?
Parra
which one?
Parra
this should be enough
Parra
try it, later on you can tweak it
Anonymous
Anonymous
for hard disk file type
klimi
Isn't this ot
Parra
VDI, VHD, or VMDK
there is one that can be resized later but I don't remember it, I have vdi
klimi
yes ..
Okay... No problem XD I just was curious
Parra
although it's very powerful for c/c++ crossplatform development, but I think it's offtopic anyway
Parra
it's very nice to develop visual studio c++ and debug with valgrind
Où va le monde
at startup, the program lays down, who can look at what the problem is?
Tomas
Is it possible to cast or transform std::vector into variadic arguments? I want to do this: template<typename T, typename... Args> bool foo(T f, Args... args) { return f(args...); } foo(f, a, b, c); Instead of : template<typename T> bool foo(T f, std::vector<int> args) { return f(args); } foo(f, some_vector);
Parra
i.e: foo_0() foo_1(f1) foo_2(f1, f2) ...
Tomas
My main issue is, I need to call T f(int x1, int x2, ..., int xn) when I have a vector<int> in a generic way.
Tomas
I know how to make a vector out of Args ... , but not other way around
Parra
https://skypjack.github.io/2019-01-25-delegate-revised/
Parra
maybe this helps
Où va le monde
qq, [28.10.19 23:12] https://pastebin.com/LMGMwEai program down,who can help
Tomas
I know how to make a vector out of Args ... , but not other way around
std::vector is a run-time beast. That is, it allocates its buffer on the heap and generally any manipulation is allowed during run-time. On the other hand variadic template "pealing" is done during compile time. Consequently, a std::vector and variadic templates are somewhat "disjoint". Thus, it's not possible to do what you want with a vector. *Feels bad man pepe*
Tomas
std::vector is a run-time beast. That is, it allocates its buffer on the heap and generally any manipulation is allowed during run-time. On the other hand variadic template "pealing" is done during compile time. Consequently, a std::vector and variadic templates are somewhat "disjoint". Thus, it's not possible to do what you want with a vector. *Feels bad man pepe*
Solved this problem by using template<typename T, typename size_t Size> double foo(T f, array<int, Size> args) { ... res = std::apply(f, args); ... } Maybe will be interesting for some people This way my f can be f(int x1, int x2, ... , int xn) Correct me if im wrong, haven't checked yet, but compiles and first tests seem promising :)
Anonymous
Hi
Anonymous
I have one problem with this code please help me
Anonymous
Anonymous
I'm trying to reverse the values of a table but I can not do it.
Anonymous
/warn screen photo
Khan
#include <stdio.h> int main(){ int i; for(i=1;i<=14;i++){ printf("%d",i); } } how to change the output 3,6,9,12 to 0 in loops? example : 120450780101101314
Anonymous
sorry🙇‍♂️
Khan
Using if statement
what about using Modulus?
Anonymous
Think, try
Khan
Think, try
i have tried use if(i%3==0) but the output is like this 12304560789010111201314
Anonymous
Anonymous
Lol
Why are you laughing?
Khan
It can't like that You did something wrong
so what should i do ? i'm a newbie