Pavel
https://paste.ubuntu.com/p/z6rzWcPP7z/
should it be printf instead of print in the last for loops?
Igor🇺🇦
Anonymous
Aiman
hi, sorry out of topic, can I seperate one hdd into two partition, one to store data which small allocation unit size and the other to load app like games, used big allocation size. Is it okay?
Anonymous
What do you mean?
is it possible to use regex in kernel space linux ?
Alex
its possible it theory, however I am not aware of existing library
Igor🇺🇦
is it possible to use regex in kernel space linux ?
You just repeated the same thing. Do want library for C that can be used in kernel or what?
Anonymous
yeah
Anonymous
regex is userspace .Idk in kernel ,it is implemented or not
Igor🇺🇦
regex is userspace .Idk in kernel ,it is implemented or not
Something like http://l7-filter.sourceforge.net/V8regex?
Alex
I worked with Kernel API, don`t remember regexp
Alex
most likely is absent. you should compile kernel implementation
Alex
regexps are slow, kernel programming is critical regarding performance. better to solve tasks without regexp
Anonymous
Something like http://l7-filter.sourceforge.net/V8regex?
it is not in kernel source .https://elixir.bootlin.com/linux/latest/A/ident/regexp
Anonymous
may be it is only for old kernel versions
Igor🇺🇦
@Mmap maybe this https://github.com/smcho-kr/kpcre
Pavel
Now I understand why Linus doesn't want C++ in kernel
Hadaward 'Solly'
cheers
Pavel
why
I mean the discussion above If you give people ability to do something overcomplicated and/or not efficient, they will try to use this ability
Anonymous
Hello everyone please I need help for my assignment
Igor🇺🇦
I mean the discussion above If you give people ability to do something overcomplicated and/or not efficient, they will try to use this ability
So it's better to use languages that make everything more complicated. Ok.. We should program kernels in brainfuck. Got it.
Igor🇺🇦
C++ is over complicated, C is simple as knife
C++ is more complicated to compiler writers, C is more complex to users. Depends on your priorities
Igor🇺🇦
check user manual for C and C++, what book has more pages
Tutorial to brainfuck is shorter https://gist.github.com/roachhd/dce54bec8ba55fb17d3a So? Having lots of features doesn't mean you have to know all of them.
Igor🇺🇦
check user manual for C and C++, what book has more pages
Better thing to check would be the code for comparable projects in C and C++.
Igor🇺🇦
what do you think about duration to learn C and C++? what duration is longer?
C++ is simpler to use. Python is much larger than C. Do you think its more complicated to use?
Igor🇺🇦
what about my question?
What about my answer? I said - C++ is easier to use.
Alex
this is not about large. 1. I want to be C coder 2. I want to be c++ coder. what is more time-cosnuming: 1 or 2?
Igor🇺🇦
this is not about large. 1. I want to be C coder 2. I want to be c++ coder. what is more time-cosnuming: 1 or 2?
You can write most C programmes using C++ compiler. Same code you've learn for C is most likely valid C++. So being C programmer makes you C++ programmer too.
Igor🇺🇦
Bad one but still....
Igor🇺🇦
brain fuck has more inbuilt functions than C++ ?
⁉ No... Why should it? The original statement was that shorter language standard makes language simpler to use. This is wrong.
Anonymous
Hey
Junaid
Hello
Pavel
What, that was a link to a post from this group
Dima
lol
Dima
hold on
Suka
.
perhaps u should use float or double at least for m cmiiw
Anonymous
Hi all! I'm trying to add a gtest, that tests file loading, so for this test I need to create a temp file and call function that loads file. How can I add this file to gtest (using cmake), so that this file will be copied to the same dir as test executable?
Suka
can you help me
just use double for your variable. aka change int to double n try again. iam still new on this field hehe. cmiiw
Suka
Thanks
you're welcome
olli
C++ is more complicated to compiler writers, C is more complex to users. Depends on your priorities
C++ is more complicated to "the user" as well. Do you know all the ways to initialize and their order? How does template overload resolution work? What's the difference between decltype(a) and decltype((a)) ? What properties does an object need to have to be "TriviallyMemcopyable" ? The list could go on for a while, when writing C, you don't care about any of this
olli
I don't need it to write code. It's easier to start with C++ and become productive
Usually you don't start but rather join a project. What if a project already uses them? Also you haven't talked about productivity but being complicated, that's not the same
olli
C++ is more complicated to compiler writers, C is more complex to users. Depends on your priorities
You said > C++ is more complicated to compiler writers, C is more complex to users. Depends on your priorities And I'd argue c++ is more complex than c anytime
Anonymous
Igor🇺🇦
Which collection can you use in a kernel?
C++ is not supported in kernel. So that's irrelevant
أسامة
olli
Do vtables work in kernjel?
It depends, as using a vtable might result in a page fault. Some parts of the kernel are not pageable.
Igor🇺🇦
You said > C++ is more complicated to compiler writers, C is more complex to users. Depends on your priorities And I'd argue c++ is more complex than c anytime
Everywhere were C++ is supported code is shorter and easier to write. You can't create generic algorithm, generic containers, smart pointers in C. You need to handle everything yourself and use unsafe casts and pointers. It's not readable and isn't easy to support
Alpha Max
provide something on static programming
What's static programming? Please explain
Jollybox.h
hi is there anyone who use blackberry ?
Jaen
Hi gays, Someone has created an api rest with libmicrohttpd?
Anonymous
Rewrite the following expression in C ++ Code and print it. a + b + c + d + e Algebra: C ++: = (a + b + c + d + e) ​​/ 5; If the parentheses are removed, we obtain a + b + c + d + e / 5, which evaluates incorrectly as: a + b + c + d +e/5
Anonymous
ヅ Mahmut《《 Eng: //m=A+B+C+D+E/5 #include <iostream> using namespace std; int main (){ int A, B, C , D , E , sum , m; cout <<"enter the A & B & C & D & E \n"; cin >>A>>B >>C>>D>>E ; sum = A + B + C + D + E ; m=sum/5; cout <<"_____________\n"; cout <<" m = "<< m;} ......, Is that True or false 😐😐
olli
Everywhere were C++ is supported code is shorter and easier to write. You can't create generic algorithm, generic containers, smart pointers in C. You need to handle everything yourself and use unsafe casts and pointers. It's not readable and isn't easy to support
Again, I disagree. C++ can be harder to write - have you ever used meta programming? You should judge a language based on what it offers and not what you use. Also qsort is a generic algorithm. I'm not saying you'd be more productive in c or should use c, I'm just saying it's not not complicated. (Especially since a lot of c is valid c++ as well)
Anonymous
Please help me
Anonymous
@ollir
Dima
lol
Igor🇺🇦
Again, I disagree. C++ can be harder to write - have you ever used meta programming? You should judge a language based on what it offers and not what you use. Also qsort is a generic algorithm. I'm not saying you'd be more productive in c or should use c, I'm just saying it's not not complicated. (Especially since a lot of c is valid c++ as well)
There is a difference between being effective programmer and knowing everything there is to know about C++. C++ hides complexity from users while allowing to use it if you really want to. You don't have to. It's harder to do the same thing on C than in C++ in most cases. Yes qsort is a great example for why C++ is better.
محمود
🙄🙄
محمود
Jollybox.h
you are discussing about c++ and i am trying to learn language that just you discuss