
Vladislav
21.07.2017
21:09:17
либо пилить сначала boost.FSA :)

Дед Пегас
21.07.2017
21:13:28

Vladislav
21.07.2017
21:13:57

Дед Пегас
21.07.2017
21:14:41

Google

Дед Пегас
21.07.2017
21:16:40
https://github.com/boost-experimental/sml
Оно легче и няшней.

Vladislav
21.07.2017
21:21:51

Andrey
21.07.2017
21:54:32
выглядит круто
после вот этого
https://github.com/yandex/NwSMTP

Stanislav
21.07.2017
21:54:57
из примера меня смущает только make_transition_table

Andrey
21.07.2017
21:55:02
у меня на asio аллергия

Alexander
21.07.2017
22:06:41
эхх заснуть не могу

fox.cpp
21.07.2017
22:08:20
исходники буста снятся?

Alexander
21.07.2017
22:09:04

fox.cpp
21.07.2017
22:16:55
ну вдруг ты видел

cyberzx
21.07.2017
22:28:27
https://pbs.twimg.com/media/DFNsPfEVYAAgjnK.jpg:large

Google

Constantine
21.07.2017
22:58:37
https://pbs.twimg.com/media/DFNsPfEVYAAgjnK.jpg:large
лучше
template <class F, class Tuple>
constexpr decltype(auto) apply(F&& f, Tuple&& t)
{
return impl_::apply_impl(
std::forward<F>(f), std::forward<Tuple>(t),
std::make_index_sequence<std::tuple_size<std::decay_t<Tuple>>>{}
);
}

cyberzx
21.07.2017
22:59:06
такие сны тоже снятся. но это не кашмары )

Constantine
21.07.2017
22:59:18
кошмар, потому что это не компилируется :)
там ошибка, правильно tuple_size_v

cyberzx
21.07.2017
22:59:45
tuple_size_v

Constantine
21.07.2017
22:59:57
да

cyberzx
21.07.2017
23:02:14
Сам недавно писал apply :)

Constantine
21.07.2017
23:02:25
Ну я копипастнул

cyberzx
21.07.2017
23:02:26

Constantine
21.07.2017
23:02:36
а tuple_size_v нема
поржал над ошибкой
если заменить на tuple_size

Berkus
22.07.2017
01:58:51

Petypen
22.07.2017
05:59:43
/ghzen@FailsBot

FailsBot
22.07.2017
05:59:48

fox.cpp
22.07.2017
06:00:18
писать софт, специально чтобы он падал
или где

Browse
22.07.2017
06:58:42
Здарова всем, есть у кого юзабельный пример реализации ssl сервера в qt creator ? В интернете дельного ничего не нашел.

Дед Пегас
22.07.2017
07:58:33
Што.

Browse
22.07.2017
08:00:06
Нужен пример tcp ssl сервера в кьюте

Google

Дед Пегас
22.07.2017
08:02:25
В гугле забанили? http://doc.qt.io/qt-5/qtnetwork-fortuneserver-example.html

Browse
22.07.2017
08:03:14
...
я же говорю ssl
secure socket layer
слой овер tcp сервера
с шифрованием

Дед Пегас
22.07.2017
08:04:26
А разобраться самому?

Browse
22.07.2017
08:06:04
Потому и пишу, что сам уже неделю сижу)) Пытался по манам делать, на хэндшейках все гасится... сертификаты все сам генерировал
и в браузер добавлял, итог: ничего

cyberzx
22.07.2017
09:02:38
браузер тут вообще не причём. просто поставь SSL_set_verify(ssl, SSL_VERIFY_NONE, NULL);
и у тебя сертификаты не будут верифицироваться

Alexander
22.07.2017
09:07:16
https://groups.google.com/a/isocpp.org/forum/?fromgroups=#!topic/std-proposals/0cnsHdJvmZY

cyberzx
22.07.2017
09:07:21
Ну и разницы между сервером и клиентом практически нет. Ты либо вызываешь SSL_set_accept_state при инициализации, либо SSL_set_connect_state


Alexander
22.07.2017
09:07:35
Looks interesting, but falls short because it leaves extremely important
things out.
* needs an exception-free API
* Execute permissions are missing. Your classes support only as read-only,
read-write or invalid. But memory mapped objects have more flags, especially
the execute permission. In fact, the ability to *deny* execution is an
important security feature.
* "copy on write" is probably the wrong name for the "private" property. It's
unintuitive that it would apply to a read-only region, but it does. It
indicates whether you want to see changes made by other processes or not. I
advise changing the name back to "private" vs "shared".
* std::size_t may be the wrong type for the map size. It's valid for all
modern architectures, but in theory it just has to be wide enough to hold the
size of the biggest object. We may want instead to change the wording of this
type's definition (though note it's also in POSIX).
* Please update the address parameter to be nullptr, not 0, and update the
get_address() documentation. Do all OSes guarantee they will map where asked?
(We can probably safely assume that mapping at nullptr is not supported by the
C++ standard)
* For offset_t, you may want to use the filesystem API's offset type.
* For the flush() function, you need a way to explain whether it is needed or
not. Most memory mappings don't need it.
If you were thinking of msync(), then you're missing the arguments to that
function.
* I'm missing an equivalent of madvise() / posix_madvise()
* std::file_mapping needs a way to refer to an already-open file, without
needing to know its name (assuming it even has one). O_TMPFILE and memfd files
on Linux don't.
* what happens to the memory region if the std::file_mapping object is
destroyed? On one hand, RAII principles would say the mapping is undone; on
another, that's not how the low-level OS works and it's often useful to retain
a mapping forever, without having to keep a (polymorphic) object around that
will never, ever be used again.
* std::shared_memory_object needs to specify which type of shared memory it
is. On Unix systems, we have two: POSIX (sys/mman.h, shm_open()) and System V
(sys/shm.h, shmget()), with Linux having recently added a third (memfd). They
are completely disjoint namespaces and are identified differently.
* POSIX shared memory has the semantics of a file, including the access
permissions. Please merge with the filesystem API where they've looked into
that. I suspect Windows ones are similar.
* the System V shared memory uses a key_t object for identification, not a
"const char *name". You can use a simple narrow-character string, but you need
to provide an "int proj_id" so it can be passed through ftok(3).
* just like path names, on Windows shared memory segments are not narrow
characters. You need to provide a wchar_t overload for Windows.
* Using truncate() for growing is weird. I know the POSIX API does that, but
bad prior art is not good reason. What did the filesystem API choose? If given
the option, I'd recommend "resize".
* Please write something about what happens if you map a size larger than the
object's size. Our experience in Qt is that some systems allow this,
automatically growing the object that backs it, while others will just crash
your application. It's ok to write that it's implementation-defined, but you
need to write it.
* for that matter, please update the API with the ability to seal memory-
mappable objects. See https://lwn.net/Articles/593918/,
http://man7.org/linux/man-pages/man2/memfd_create.2.html. This was added to
Linux specifically to avoid DoS attacks where processes of different privileges
are operating on the same shared memory object. Of course, implementation-
defined whether this is supported, but it's an important security feature we
should encourage application writers to use.
* you'll want to investigate cross-process thread signalling (semaphores) too.
Eventually, we'll need to discuss std::mutex on memory-mapped regions.


Шаурма
22.07.2017
09:19:12
тиаго бдит:)

Arseny
22.07.2017
09:41:56
Товарищи, в чем смысл использования синтаксиса контекста при объявлении класса наследника:
class Customer_ProductInfo : public ::ProductInfo
?
нафига там двойное двоеточие перед ProductInfo

Alexander
22.07.2017
09:42:40

Arseny
22.07.2017
09:43:09
так это и так понятно

Alexander
22.07.2017
09:43:24
сейчас накидаю

Arseny
22.07.2017
09:43:32
что компилятору, что разработчику

Google

Alexander
22.07.2017
09:44:35

Admin
ERROR: S client not available

Arseny
22.07.2017
09:45:25

Alexander
22.07.2017
09:45:34

Александр
22.07.2017
10:52:17
Парни, можете поделиться опытом как начинали, трудности, подводные камни, как преодолевали, было ли желание бросить/не делать и как вы достигли успеха?

Mikhail
22.07.2017
11:02:50

Владислав
22.07.2017
11:03:34
https://www.youtube.com/watch?v=FwvUnwJxIBI

Mikhail
22.07.2017
11:04:17

Александр
22.07.2017
11:04:49
Хаххахач
Дело не в мотивации

Mikhail
22.07.2017
11:06:57

Andrei
22.07.2017
11:09:03
— Как мотивировать себя, что-то делать?
— Да никак, оставайтесь в ж...

Александр
22.07.2017
11:11:50
Ок

Grigor
22.07.2017
11:32:53
/report

Group Butler [beta]
22.07.2017
11:32:54

Vladislav
22.07.2017
11:33:37

Gleb
22.07.2017
12:09:52
Как в p2p сети пиры узнают друг о друге ?
Если нет выделенного сервера который бы мог соединить их

Andrei
22.07.2017
12:19:15
Пирлисты.
Которыми они обмениваются.

Google

Andrei
22.07.2017
12:20:02
Но даже в p2p есть сервер с пирлистами, или пирлист сразу поставляется с ПО.
Достаточно хотя бы одному из пиров в списке быть онлайн и дальше все известные ему адреса он передаёт другим и получает от других.

Gleb
22.07.2017
12:23:33
Думал об этом, но разве это не означает что стоит вывести из строя всех клиентов из пир листов как к сети будет невозможно подключиться ?

Andrei
22.07.2017
12:23:47
Да, значит.

Alexander
22.07.2017
12:23:52
Александр Пистолетов же знаменитость
Новый российский пират, все дела

Gleb
22.07.2017
12:25:23
Да, значит.
И никто решения этой проблемы ещё не придумал ?

Andrei
22.07.2017
12:25:56
Решение очень простое — повысить отказоустойчивость сети понизив вероятность выхода из строя всех узлов.

Gleb
22.07.2017
12:28:46

Andrei
22.07.2017
12:30:29
И никто решения этой проблемы ещё не придумал ?
Иногда разработчики p2p сетей делают полуцентрализацию, которая заключается в том, что они специально разворачивают 10-20 постоянно работающих серверов, которые ничего кроме обмена пир-листами не делают, так что даже если теоретически все юзеры разом выключат p2p клиенты, обмен будет идти через эти серверы.