« first day (2445 days earlier)      last day (2503 days later) » 
00:00 - 18:0018:00 - 00:00

12:19 AM
C::f(){ std::thread t(std::bind(&C::g, this)); t.detatch(); } is not UB if this is valid during the life of the thread is it?
Thing is my DE is locking up. gdb is giving me nothing before the desktop crashes and piping std::cerr to a file leaves me with an empty file.
 
@CaptainGiraffe of course.
 
12:37 AM
@sehe My desk now has another head shaped dent for me not asking a question that asks for an unambiguous answer. They are now two in total.
 
@CaptainGiraffe Of course, it's not UB
 
@sehe My pulse just went down to a reasonable level. Thanks. Now I just need to reassess what other natural laws aren't working.
 
:)
 
I sincerely hate this state of debugging, when it boils down to "solving problems by thinking very hard".
 
I love that. But when it boils down to "just guess the magic environmental factors" I start to hate it
 
12:47 AM
I'm not converting to astrology just yet.
3
 
I'm with sehe
 
With most other system, humans have worked with for at least 100 years, they know how to remove all the unnecessary variables to leave only few.
with computers, we still have to get there
 
That's a total fallacy.
Name one of those systems.
 
think about earlier cars
earlier houses
 
You mean, like economy? Or meteorology? Or maybe politics? Or sports?
 
12:53 AM
I'm thinking you imagine an extension of the GOF patterns?
 
The early history of the automobile can be divided into a number of eras, based on the prevalent means of propulsion. Later periods were defined by trends in exterior styling, size, and utility preferences. In 1808 François Isaac de Rivaz designed the first car powered by an internal combustion engine fueled by hydrogen. In 1870 Siegfried Marcus built the first gasoline powered combustion engine, which he placed on a pushcart, building four progressively sophisticated combustion-engine cars over a 10-to-15-year span that influenced later cars. Marcus created the two-cycle combustion engine. The...
 
And now we have lisp, rust and node.js.
 
@Telkitty Have improved over time, sure. Have eliminated the requirement to guess about how things work? Only for those who already know how things work. Just for example, consider how a standard gear shift works. Anybody who thinks it has any real sense to a shift pattern has let the fact that they're accustomed to it blind them to reality.
 
It was a conscious decision not to include Angular in that list.
 
1:11 AM
@JerryCoffin But that's the thing - there wasn't even a concept of data mining. Some how car manufacturers figured out what people use the most or want in a car. They pretty much 'fix all other variables'
and most people are okay with it, a lot of people just want a system that works and they prefer something that doesn't require a lot of configuration and does not break down
 
@Telkitty I'd say rather the opposite: they found a few specific things that people wanted, and those were attractive enough to cover for the other things that were awful. They have improved over the years, but largely for quite a while they've had customers who have grown up with cars, so they've been trained about what's desirable long before they realized they were learning any such thing.
 
1:30 AM
that's probably because you are into cars, I just want something that could transport me from A to B
 
@Telkitty Improving is one thing. To claim "variables have been minimized" is silly
 
think about manual vs auto cars
I drive an auto with cruise control
 
Well. So, UX defines inherent complexity. So much for science
 
so least work needed to transport me from A to B
 
@Telkitty Whatever gave you the notion that I'm into cars?
 
1:36 AM
Evening all! o/
 
what did we do this time?
 
In case you are asking me, I'm not here to complain. So nothing I'm aware of. vOv
 
awww
it's too quiet
I wonder if I can rustle up a ruckus
 
back from eating dinner
also i changed my username from user.... to ungato
 
Meh. Just came in to chat myself.
 
1:50 AM
@ungato bad move, i dont trust cats
 
2:30 AM
@jaggedSpire Good. Good. Use your aggressive feelings, boy. Let the hate flow through you...
 
 
1 hour later…
3:34 AM
@JerryCoffin I'm mostly wondering how many more ru* words I can wrassle into that sentence
 
Border Collies may exhibit a strong desire to herd, a trait they may show with small children, cats, and other dogs.
should work in a kindergarten or primary school
 
@jaggedSpire A version with a few more "Ru" words: "Интересно, могу ли я rustle вверх ruckus." Or something vaguely like that, anyway...
 
@JerryCoffin lol
@Telkitty I was in first grade when my family got our collie mutt of indeterminate origin
there were holes in the backs of all my dresses because he'd try to grab me every time I took off running
2
 
@JerryCoffin (Un)Fortunately I'm too busy right now writing an urgent task to be able to comment on your Russian
 
Then I stopped wearing dresses. Problem solved!
 
3:41 AM
@iksemyonov "Horrendously awful" doesn't take much time.
2
 
"wtf" even less
 
@JerryCoffin Would have been too easy on you
 
TIL
 
Seriously, I haven't used to studied (or used) Russian in 15 years or so. I can't really even manage (as Robin Williams put it) "Short, choppy sentences".
 
lol that star
 
3:43 AM
5 stars collected in a few hours.. nc
 
@Mikhail the only mammal with green fur! (since they cheat)
 
OK back to the parser
 
@LucDanton So green fur that the non-human equivalent of the scarlet "A"?
 
Is it safe to assume that a log line is going to fit into a std::string?
 
string stream
 
3:45 AM
If I understand correctly, a string has 2^64-1 max size o a 64-biit platform?
 
@iksemyonov "long line"?
 
@JerryCoffin Puns aside, nope, a line in hypothetical web-related log
 
also probably should use boost::spirit (or whatever kids are calling it nowdays)
 
Yeah right but the condition is bare gcc 5.4.0
No boost loki odin thor etc.
 
pretty sure it builds with gcc
 
3:47 AM
@iksemyonov Realistically, no. That'll normally be the design limit, but the real limit will typically be available virtual memory.
 
Right, but I can't include it. It's an online judge
 
@iksemyonov In that case, they'll typically specify some limit on the length.
 
@JerryCoffin Uhm, I must be tired, but are we hitting a RAM limit with 2^64?
 
@iksemyonov We're normally hitting it long before 2^64.
 
@JerryCoffin It's a surprisingly informal task where it's just a "log" see here cpp-school.unigine.com/files/in.txt
Can you recognize the log type? Seems to be a web server of sorts
@JerryCoffin Good, that means I'm fine with strings
 
3:50 AM
@iksemyonov No, but I'm fairly ignorant of such things.
 
@JerryCoffin I'm a Linux nerd so it does not completely foreign. Must be a server or a firewall.
I need to find URL's, then split them into domains and paths, and rate those by frequency. That's the task. Quite simple but there still is something to think about. I'm planning to use OpenMP to process separate strings in parallel.
To find http://, ideally, one would fire up a substring routine, but I have no time for that, going to bruteforce..
 
Don't do that
 
@Mikhail Brute?
 
@iksemyonov I recommend Sunday's variant of Boyer-Moore-Horspool, but I'm probably biased (I invented it independently, probably before Sunday did, but it didn't occur to me that it was interesting enough to even try to publish it).
2
 
@JerryCoffin what will you recommend tomorrow i.e. on Monday?
5
 
3:55 AM
Strings are small work items, you should break the entire log (which I assume is long) into pieces equal to number of PEs. Then merge at the end.
 
@JerryCoffin Excuse me Sir but are you serious right now?
Is that a substring algorithm?
I only know about rabin-carp, of course.
 
@iksemyonov It's a string searching algorithm, yes.
 
@JerryCoffin OK, I mean, it sounded like a joke for a second. You never cease to amaze.
@Mikhail See, I can only break on word boundaries, since the entries I'm looking for are contiguous
 
@LucDanton That'll depend on how ambitious I'm feeling. The full BM is theoretically the most efficient of them, but it's quite difficult to get it truly correct--not only was Boyer and Moore's original paper wrong, but so was every other exposition of it for the next 20 years or so (including at least one by Knuth).
 
also OpenMP is flaming garbage, has bad thread pooling heuristics, etc
 
4:01 AM
Strings are easy to factor out and store in a vector, then launch a loop over that
 
@Mikhail lol
 
@Mikhail I've been using it so far with certain success
@Mikhail Thus my plan is to read the file into an array of strings and then equaly split that between PEs
And, yeah, ideally, we'd have a substring routine.. with SIMD.. @JerryCoffin is SIMD applicable to those routines?
 
@iksemyonov still not efficient
 
@Mikhail Reason?
 
@iksemyonov I never really thought about it. Offhand it seems pretty serial (though I suppose it could benefit from some prefetching).
 
4:07 AM
@JerryCoffin Well I mean, the reasom why I'm askinng is because you know SIMD gives you manyfold speedup in certain scenarios, at a low price
And it's always there at least in the form of SSE
 
depends on how you value your soul
I once optimized some loops in undergrad and now I'm at work at 23:09 on a Sunday
10
 
@iksemyonov Yeah. In this case, unless (we're pretty sure) the string is already in the cache, it's almost certain to be memory bound, so SSE isn't likely to gain much.
 
@Mikhail I guess I know where you are. I guess you can't tell the team name?
 
@iksemyonov But to let you judge: the basic idea of any BM-based search is similar: you start by building a table of "shifts" for every character in your alphabet. You initialize all of them to the length of your needle. Then you walk (normally backwards) through the needle, and set the table entry corresponding to that character to the distance from there to the beginning of the string.
 
@JerryCoffin You probably mean that the strig is small enough and is going to be constantly switched so that it has no time to resiide in the cache loong enough to be efficiently vectorizable? Sounds valid
@JerryCoffin Is it available anywhere as a paper? I'd read it for sure
 
4:47 AM
hi
@JerryCoffin Ah I had to read that novel for my English course.
Of course, I didn't read it at all.
I remember the teacher saying something about the meaning of that scarlet letter A, though.
 
5:30 AM
Everyone gone?
 
5:45 AM
yes
I am not here
 
needs more irish music
 
@iksemyonov Probably a few papers around, but I'd have to search for them to find them. I originally read an article describing the Boyer-Moore algorithm. Some time later I wrote some code going from the basic idea of what I remembered, but simplifying it. That turned out to be essentially the same as Sunday's variant of BMH, though I had no idea at the time. Investigating later, I believe Horspool published his modified algorithm before I wrote mine.
Sunday published his something like several months after I wrote mine, so I think I probably invented it first, but I don't know for sure.
 
@JerryCoffin Obligatory (half)joke about patents.
On a related note: do parsers in compilers use substr algorithms or do they simply match forward since the tokesn are short enough?
 
@iksemyonov All of this happened back when (at least in the US) software and algorithms were considered unpatentable subject matter.
 
@JerryCoffin Guess there were unicorns around at that time, as well?
 
5:55 AM
@iksemyonov Parsers normally work with tokens, not strings. A lexer (at least for a typical language) is pretty dumb--reads a character, figures out the type of token it's dealing with (e.g., number vs. identifier) then reads characters until it gets to something that can't be part of that kind of token (e.g., a space can't be part of an identifier).
@iksemyonov On on North Korea.
 
@JerryCoffin That looks exactly like my task: to dumbly walk forward until we hit a forbidden character. Why are we discussing substr then? (Sure it's interesting, I'm just wondering if it has anything to do with my actual task.)
 
posted on June 26, 2017 by Herb Sutter

I can’t remember the last time I’ve gone to Europe twice in one year, but this is the year… up first is CppCon in September, then a week later in early October I’ll be heading to London to give a single repeat of the three-day High-Performance and Low Latency C++ course, in the same week that […]

 
@iksemyonov At least as I understood things, you need to find the beginning of the URL string, so you first need to find the position of an "http://" or "https://". Having found that, you then need to find the end of the URL by looking for a character that can't be an a URL.
 
isn't there a regex?
 
@Mikhail You could certainly use a regex, but in most cases, that's going to be rather slower than a fixed-string search.
 
6:04 AM
@JerryCoffin Yeah, that, exactly. Find http[s]://, then until the first /, then to the end (or fail in an unacceptable character anywhere in between)
@Mikhail gcc 5.4.0 with no additions allowed, not sure if c++11 has regex, and the point of the task is to have me parse it by hand
 
@iksemyonov C++11 does have regexes, for whatever that's worth.
 
@JerryCoffin Good news, thanks! Though I bet they'll mark that as a non-pass.
Be too easy if we could just fire up a regex, don't you think.
 
@iksemyonov That probably depends mostly on the speed. In this case, speed should be pretty decent. There are pathological cases for most regex matchers, but this wouldn't be one of them.
 
@Mikhail Are you still late at work?
 
kinda
 
6:10 AM
Open 24/7?
 
@Mikhail Meaning: "no--now it's early"?
 
I'm a graduate student so its more socially acceptable
 
I really don't get the idea of staying at work like that even if my fellow grad students do that often
@Mikhail do you have to work right there or are you allowed to take some work home?
 
I got this problem, I was forced to take a student. Then the problem got worse when my PI wanted her to analyze data form an experiment that didn't' work. So now I'm trying to figure out what she can help analyze. My work is mostly physics, dsp, or software and solving "hard problems".
 
Oh, so that's at university!
I thought that you were staying late at a commercial job.
 
6:13 AM
Ask your PI why the desire to analyse something that doesn't work
 
@Telkitty Because you in principle its possible to falsify stuff and then it "works"
 
@Mikhail Or, more positively, you can figure out what went wrong, and re-run in a way that stands a better chance of actually working.
 
@JerryCoffin I can't because I need to validate a technique that my advisor sells. We could have used another technique... :-/
 
@Mikhail Okay...
 
Yeah, C++ is easy, people are hard :-)
 
6:18 AM
Working with people with low/no moral means that you will probably get screwed
 
Actually I made a lot of money doing php for people with no morals
Bigger problem is "vision driven development" and big egos
 
A lot of money ... I wonder how low high your standard is ...
 
paid for college (this means more if you're from the US)
 
F***, neighbour using our driveway at this other place - need to plant thick bush in between driveways coz fixing busting pipes beneath driveway = lots of effort
Also strangers using driveway as well occasionally
 
Have you considered a scarecrow?
 
6:26 AM
That wouldn't even work on their per dogs
 
Maybe do something passive-aggressive like slash their tires?
 
I believe it's slightly less illegal to let the air out, at least in the US
might be horribly, horribly wrong
 
Currently, I will just pretend to not see it. Unless, of course frequent busting of pipes
Only a busting pipe every 3 years or so ... on average
 
park on their part of a driveway for no reason, so they get the message :3
 
Plus, a sign will work better, otherwise other people will still drive on the driveway after fixing tires
 
6:34 AM
you loose anonymity and with it plausible deniability
 
@Telkitty Put up a "trespassers will be towed" sign, and call a towing service when somebody parks there. Others may still park there, but (at least at the prices towing services charge in the US) it's unlikely anybody will do it twice.
 
They are using it to get out or turning, not parking
 
@Telkitty Ah, I see. In that case, I'd install tire rippers over the part that has pipes under it.
Good morning mr. Bear. Any particular reason you're up so early today?
 
7:21 AM
/cc @Puppy they're trying to drive you out of the market
@Mikhail I don't think passive means what you think it means
@Mikhail You're on a roll. FWIW I appreciate your expertise and humor in here
 
wankers
 
Suddenly, a wild Flexo!
Out of the woodlands, so to speak
 
7:57 AM
It's already one week and the pre-Toronto mailing still isn't available T_T
 
8:24 AM
@sehe is that a sensible thing?
 
 
1 hour later…
Ven
9:30 AM
Hi
 
9:44 AM
@LucDanton Boost.Noidea :)
 
Ven
Boost.Nooble
 
Hey I want to execute a command in vim automatically when the cursor line is close to the end of document (Maybe within 10 lines). Does someone know how to do this?
 
Ven
why are you asking here?? O_o
 
Because why not
 
Ven
it's a C++ PTSD room
 
9:51 AM
I assure you that I keep my vim and C++ separate so this is not a C++ question
 
Ven
too bad, scripting vim in C++ is truely a delight.
 
@Horttanainen what kind of command? Looking for scrolloffset?
 
@sehe I was thinking of zz
I have scrolloffset set to 999 already
 
In that case, zz won't do anything, right
 
but it does
It adds empty lines below so that the last line becomes centered
 
10:02 AM
@Horttanainen why it's so horrible? :D
 
@login_not_failed You mean vim scripting?
 
@Horttanainen no, why do you even need to do something «when the cursor line is close to the end of document»? I can't imagine such task
 
Is allocating specifically aligned memory useful if you don't explicitly intend to use SIMD?
 
@thecoshman A Kotlin poem (not exactly the longest poem in the world)
 
10:21 AM
@login_not_failed I want to move the cursor line upwards toward the center of the screen.
 
I was going to write a bug song, but then I thought it's lame
 
@fredoverflow erm... ok :\
 
Ooh, my finger sayin' let's go
Ooh, but the compiler is sayin' no
Errors are puked out at the speed of light
I guess I couldn't get this code work tonight
5
 
oh, I get it
 
That's fairly good poetry :D
 
10:31 AM
I don't know, a little too vulgar for me...
 
It highlights the despair and the fatigue.
 
nwp
@Morwenn I remember some WinAPI function requiring over-aligned memory. I remember it being very difficult to get right with only regular new and no alignas and aligned_storage.
 
@nwp Fortunately, we've got std::align_val_t nowadays :p
And alignas(std::hardware_destructive_interference_size) for the L1 cache line size /o/
 
10:54 AM
@sehe Ah, I know what's causing the coliru issue. I'll fix it soon.
 
11:18 AM
I think it's fixed now.
 
 
2 hours later…
user1804599
1:02 PM
f(1000, 1100) = 100, what is f?
 
user1804599
Is it operator%?
 
user1804599
Oh it's operator% flipped.
 
Ven
could be - flipped
 
user1804599
Oh I'm so confused.
 
@StackedCrooked Looks like it is :) (what was it?)
 
1:27 PM
@rightfold f could also be constant 100. There is not enough info to say for sure
 
f(a,b)=b-a of course
 
@Telkitty f(a, b) = 100 of course
 
I'm trying to get a buy-in from our TL to Kotlin /cc @thecoshman
he pretty much gave up already after I've shown him that integrating it into our build is literally one line in gradle.build
 
user1804599
1:42 PM
waat
 
user1804599
src/channel.cpp:37:53: error: no matching function for call to ‘min(std::size_t&, long int)’
   std::copy(from, from + std::min(from_N, N - offset), signal.begin() + offset);
                                                     ^
 
Ven
std::min takes two of the same type?
 
user1804599
Why does it think from_N is a reference?
 
user1804599
It's an std::size_t.
 
user1804599
Yay, my code works.
 
1:48 PM
@rightfold it's an lvalue
 
@sehe I tried to fix the JSON encoding errors but ended up making it worse.
 
Ven
@rightfold ? it's an lvalue
because std::min takes & returns lvalues
(and it couldn't take a reference to a non-const temporary)
 
user1804599
float data[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f};
channel.append(std::chrono::milliseconds(800), data, sizeof(data) / sizeof(float));
auto const& signal1 = channel.signal_at(std::chrono::milliseconds(0));
auto const& signal2 = channel.signal_at(std::chrono::milliseconds(1000));
REQUIRE(signal1.at(8) == 1.0f);
REQUIRE(signal1.at(9) == 2.0f);
REQUIRE(signal2.at(0) == 3.0f);
REQUIRE(signal2.at(1) == 4.0f);
REQUIRE(signal2.at(2) == 5.0f);
 
user1804599
:3 :3 :3
 
@rightfold is it Catch?
 
2:26 PM
/cc @Mysticial old news?
 
Ven
i've seen a lot of noise about this
 
user1804599
It was found by someone running OCaml code. :3
 
Ven
well, apparently intel people had known of it beforehand
 
user1804599
Naughty!
 
user1804599
QuickCheck x86-64
 
Ven
2:34 PM
they probably do some monkey testing
i hope they fuzz :c
 
user1804599
Monkey patching.
 
user1804599
Pepe patching.
 
user1804599
Patch pepe is extremely rare.
 
What's some interesting language I should learn? What I already tried: Haskell, C++, JS, Prolog, SQL, Python, Ruby, PHP, OCaml.
@login_not_failed ye
 
Ven
@Shoe Lisp
learn Racket.
 
2:42 PM
> Typing discipline: Dynamic, strong, static
Hold on, what
Is it dynamic or static?
 
user1804599
@Shoe Mercury.
 
I am testing mass sharing code, I better not mistakenly send anything in a loop to all my contacts
 
user1804599
@Shoe Rust.
 
Ven
@Shoe you can decide
 
user1804599
@Shoe PureScript.
 
2:45 PM
Ok, here's some context: I'm thinking of rewriting a small server that is currently written in JS into some other language and make use of strong typing and concurrency.
 
user1804599
@Shoe Coq.
 
Then I would kind of have to maintain this, so maybe not some obscure language
Something that is fun to work with
 
user1804599
@Shoe Haskell or Rust.
 
@rightfold Yep, thought about it
 
Ven
@Shoe go :^)
 
2:46 PM
Rust & Go were my go to languages
They say go has some great concurrency support
 
Ven
rewriting it in Haskell could be fun.
 
user1804599
Unless you want parallelism you can do it in PureScript.
 
Ven
i don't know if typed/racket supports webserver.
well, you can do it in typed/racket and use racket libs by defining the type yourself, but..
ocaml also sucks at concurrency, alas.
 
@Ven I started that and I setup the websocket server in half an hour, but then I have to find a good library for performing HTTP requests to another website (which is basically 80% of what the server will do) and read responses in HTML efficiently.
 
Ven
@Shoe Maybe try Crystal or Nim.
 
user1804599
2:48 PM
Lol concurrency without stackful coroutines or do notation.
 
Ven
those are very interesting languages. I especially like Crystal.
good concurrency story, statically typed, v good inference, etc.
 
I was banned from the airliners.net photography forum by concerned moderators after the end of my lens started brushing against planes as they flew by.
3
 
@Ven I'm sorry, I had Ruby vietnam-like flashbacks. What were you saying again?
:P
 
Ven
@Shoe Nim is cool!
@Shoe more seriously, it looks like Ruby yes, but it's all statically typed, no implicitly nullability and all.
 
Nim and Crystal do look cool, but I've never heard of them
Maybe I'm looking at something less esoteric. Like Go. Or even typescript maybe.
 
Ven
2:53 PM
to be fair, if all your server does is send a HTTP query, I'd say take a small risk ;-)
 
@BartekBanachewicz gave up resisting?
@Feeds I only like this for the drawing :\
 
@Borgleader Oh damn.
 
3:21 PM
I now know which generations not to upgrade to
 
@Borgleader No Ryzen because of FMA bug. No Haswell and Broadwell because of TSX bug, no Skylake desktop because of AVX bug. No Skylake X because of this bug.
Is there anything left?
No Sandy Bridge because of chipset bug.
 
I have an ivy bridge atm
maybe i can get a stronger one of those :P
 
It's Monday morning, and they still haven't shipped out my mobo. I have a bad feeling that it's gonna get a shipped from California. In which I'm not getting it until next week if they put it on a train.
 
user1804599
@Shoe s/TypeScript/PureScript/
 
user1804599
Concurrency is much easier in the latter.
 
3:31 PM
@Borgleader Or wait for Threadripper and see what bugs it has.
 
3:43 PM
On the topic of processors. It seems every single one of the Skylake/Kaby Lake X models are sold out on multiple retailers.
Including the $1000 7900X and all the shitty Kaby Lake X ones.
Along with about half the motherboard models.
 
4:00 PM
@rightfold Because it's much closer to Haskell with regards to immutability?
 
user1804599
That, but also continuation abstractions.
 
user1804599
Such as Aff and ContT.
 
5:12 PM
@Mysticial Pentium III. Still crazy reasonably bug free after all these years...
 
user7627726
does anybody else feel like once they come to the chat, everyone else runs away?
 
no, never
 
@milleniumbug Damn. You were supposed to play along.
 
@GoJavaAndCSharp No! When they see me coming, they find more...expeditious means of evacuating the area.
 
5:29 PM
wait, I thought it was because I smelled
 
If I think that web development in 2017 is mostly based on JS I drink
And then I cry
 
@roscoe_casita I smell too. I really like smelling wine, for example (though I'll admit, drinking it is better still).
 
Hello fellow C++ noobs. How you all doing?
 
@Shoe I can't stand sad drunks or angry drunks. Please pass me a bottle, so I won't notice...
@Kurieita Noobishly, of course.
 
alright, so... the life transition from C++ windows VS to gdb/vim/eclipse is a rough one
 
5:40 PM
Haha
 
@Kurieita you?
 
just waiting for a reply for my question :P
 
@BartekBanachewicz was it you I was speaking with about generators that feed back into themselves? it's real :P
 
user1804599
I'm downvoting it as we speak.
 
user1804599
Because it's shit.
 
5:42 PM
:(
No it isn't
Why vote down and not explain what wrong with it?
 
user1804599
I do explain what is wrong with it. This is known as "reason for closing".
 
user1804599
In this case it is "too broad".
 
user1804599
You can find what this means in the help centre.
 
And why not comment on the question? Just maybe I could add in more details?
 
Or are you asking in general for downvotes? Or just this particular case?
 
5:45 PM
And in my opinion the question isn't "too broad".
 
user1804599
It is a lot of time to duplicate this information under all the bad questions.
 
user1804599
This is why it is written once, in the help centre.
 
user1804599
You are also pointed to the help centre before posting your first question, and you acknowledge that you have read all of it by pressing the button.
 
Hmm, what question are you guys referring to?
 
I did
-1
Q: C++ Dictionary Implementation

KurieitaToday I am working on a dictionary implementation using boost::variant. #include <map> #include "boost/variant.h" class Dictionary { public: Dictionary(); ~Dictionary(); template <typename Type> Type& operator[](std::string key) { return boost::get<Type>(_dictionary); ...

^ That
 
5:46 PM
@Kurieita When people say their question is not too broad and it gets closed as such anyway, it usually means that their definition of "too broad" does not match what the network defines it to be.
And it's the network's definition of "too broad" that applies. Not everybody's personal definition.
 
Eh true.
 
@Kurieita What have you tried?
 
user1804599
Good question litmus test: "will it help googlers?"
 
I tried multiple solutions. I read other people posts about dictionaries in C++ and none helped. I tried using templates like the one in the post. I also thought about using a operator for each type I want to use but then it get big if I had alot of types.
 
Also don't create a wrapper over that
 
5:47 PM
And yes I did Google.
 
Just use map<..., variant<...>>
 
I want to tho.
 
@Kurieita Why didn't you compile the example you give on the bottom?
 
Because my code tend to get ugly because it is going to be alot.
 
wat
 
5:48 PM
"look I want to introduce a shitty dynamically typed container, here's my totally not compiling code"
 
Because I am on a laptop with no C++ compile. But the code I posted is very similar to a solution I tried.
 
void operator=(std::string key, Type value) (lolwhat)
std::map<std::string, boost::variant<int, double, std::string> _dictionary; (missing >)
 
:/
 
Then it's not urgent since you can't code atm any way. Why not wait to get to your workstation and try it there?
 
It isn't missing in the code in notepad ++ :/
 
5:49 PM
Why are trying to program without a C++ compiler?
It's like trying to drive a car without the car.
It doesn't work.
 
Because I don't have access to my PC atm
 
Then why do you need this atm?
 
I don't, but I thought I might as well ask a question that I been struggling with for the past couple of days but I thought wrong.
No help for me.
 
You don't seem to make much sense.
 
also the problem is underspecified in the first place
closed as unclear what you're asking
 
5:54 PM
And how is it "unclear"
I want to implement a dictionary like one in Python or Lua. :/
My idea was to use boost::variant
But whatever, sorry that I asked.
Thanks for the help.
 
the specification is something along "you can write the result to std::cout"
yeah, I can do that too stackoverflow.com/a/38002757/1012936
except I suspect you're looking for something different
but "something different" is not implementable in a statically typed language
 
Yeah, go read about type theory or the likes
 
00:00 - 18:0018:00 - 00:00

« first day (2445 days earlier)      last day (2503 days later) »