« first day (1718 days earlier)      last day (3231 days later) » 

7:00 PM
can you give an actual use case?
maybe you can take an alternative path
 
sure. it's probably better i just explain what i'm trying to do
heh..
 
user1804599
use SQLite and be done with it
 
user1804599
they're all strings anyway
 
oopsies.
 
can you not explain it in a single phrase here?
if it's a long story I can't help anyway
 
7:02 PM
sorry that was a mistake.
so basically, i have a bunch of test groups. each of these groups contain a number of test steps. each test step, again, is assigned to a specific group.
 
sounds like a problem you should write a program to solve.
 
so like you have a circular reference?
you sure you can't remove that?
 
each step has a sequence number to dictate what order it should happen in relative to the other members of that same test group
 
is en.cppreference.com down for you guys?
 
Each test step has only one group right?
 
7:04 PM
correct.
 
Xeo
@WorldSEnder isup.me
 
and the same with each group: each has a sequence value that dictates its order
 
Are groups run in a specific order as well?
 
i figured sorting the map all of this data is in would be an easier way of iterating through it
 
oh ok
 
7:05 PM
yes they are
 
the heck? Any clues why I still can chat in here but that site seems to be down? does isup.me cache results?
 
so groups run in order, then inside there, each step of that group is run in order
if that makes sense
 
@WorldSEnder This is our little bunker where we hide.
 
so for each test group you have an ordered list of steps
 
Can a group/step run more then once?
 
Xeo
7:06 PM
using steps = std::map<int, test>;
using groups = std::map<int, steps>;
and then just rewire test's reference to its group or something
 
@Xeo that's where he started from
 
Xeo
dunno why he threw that away, then
 
user1804599
using everything = SQLite::Database;
 
@AlexM. yes correct, however they might not be entered into the map or array or whatever in order.
 
Looks like I'm going to have to make my own OBJ loader.
 
7:07 PM
but they do have an order they need to be run in.
 
struct Step
{};

struct Group
{};

std::map<Group, std::set<Step>>
 
@MoH. each group is unique as well as each step
 
create a comparer for Groups
a comparer for Steps
map Groups to Steps
why do you need Steps to reference Groups back again?
see if you can't solve this by passing a reference to a Group in each Step's ctor
or w/e
e.g. for any Step s, s.parentGroup
 
1
Q: Sort multidimensional map based on pair value

Kevin MurphyI have a map defined as follows: std::map<std::string, std::vector<std::pair<std::string, std::string>>> groupList; GOAL: I have a list of groups of commands. I want to sequence through each group in order. In order to do this, each group has a "sequence" value. I want to sort the overall li...

 
why didn't you post that first
 
user1804599
7:10 PM
better delete it before @Puppy sees it and downvotes it
 
here's the original question. sorry for using PHP syntax to visualize
 
user1804599
PHP is way better than C++ for this stuff.
 
@AlexM. i should have, sorry.
 
user1804599
Associative arrays in PHP remember the order of insertion.
 
yeah so i think due to that fact, i'm having a hard time seeing why this can't be done
but that's naive and dumb of me
 
7:11 PM
@rightfold too late
 
:'(
@rightfold not only that, but I can sort the entire array based on children arrays key and values alike.
so being newer to C++, it's a bit frustrating for myself not knowing my boundaries or options
 
actually if I understand your problem
I'd use this
struct Step
{};

struct Group
{
	std::set<Step> ...
};

std::set<Group> groups;
can steps be part of multiple groups?
 
@AlexM. no
 
no. each step is unique to its group
 
welp if Group has Steps then this should be visible in the class definition or so I think
 
7:15 PM
however, if you wanted to run the same command or test step in another group, you would just have to create a new unique step and it would be paired with another group
 
thatOtherGroup.steps.add(createNewUniqueStep())?
 
well the maps are being populated from XML data
let me paste some one sec
 
use pastebin
 
of course :)
 
anyway I'm trying to ditch the idea of using that maps to maps thing if they're not 100% necessary
it doesn't look like it is to me but then again not really a lot of code from your actual use cases's been here
just the focus on maps
 
7:19 PM
they could not be, but that's a bit of my extent for data structures in c++
here's an example of the list of test groups
it probably won't be that helpful
 
not very helpful indeed since there's no argument pro-maps to be drawn from there
 
what does that mean?
 
4 mins ago, by Kevin Murphy
well the maps are being populated from XML data
you replied with that to
5 mins ago, by Alex M.
thatOtherGroup.steps.add(createNewUniqueStep())?
 
i guess I didn't understand your message. i haven't established how i would add steps to groups
for now, they're two completely separate maps. a groupList and stepList
 
you add steps to groups by adding an arbitrary step to an arbitrary group
 
7:22 PM
however, for the stepList i think i need to rethink layout again
 
you have a set of groups, with each group containing its own set of steps
 
Is @r.m around?
I have an engine question
 
a function findGroupIdentifiedBy(your group id) would obviously iterate over the set of groups to find the group with the given id
since the groups are sorted by id in the set you can also do binary search
 
right the problem is when i want to run for a specific group, i would then have to iterate over a map containing all the steps for that group
and storing all of that data seems harder than the grouplist too
 
no, you don't iterate over a map containing all the steps for that group
you just iterate on the set contained in the group
 
7:25 PM
that's assuming the steps are inside the group within the map or whatever I use
 
are you unable to reason outside the realms of maps?
 
which would be fine. but i currently have them as separate maps
 
you are aware of the fact that you can define your own types, right?
 
i guess not
 
12 mins ago, by Alex M.
struct Step
{};

struct Group
{
	std::set<Step> ...
};

std::set<Group> groups;
^ that's how steps get contained in groups
and how you keep them sorted
 
7:27 PM
how would i add a step entry or group entry using that though
 
group.steps.insert(your new step)?
where group is the group you want to add to
 
do you mind if I pastebin what I'm imagining in PHP
 
I don't, but imma go play sth now
 
thanks for your help @AlexM.
 
@AlexM. Play what?
 
7:30 PM
that's how I'd do it, if something has multiple something elses and you can have multiple somethings, a map of id to a map of id to something elses is the last thing I'd want to see
 
that's like two levels of reasoning and I have to stop and stare at the line of code
 
this is what i'm picturing in my head
 
Title of the day:
-8
Q: Why is this site such assholes to beginners?

ThatGuy1111So I've asked a couple questions on this site and everyone who responds are assholes.. I noted in my question that I was new to programming.. I thought this site was here to help people like me who don't exactly know everything about programming.. If I ask a question, regardless of how simple it ...

 
@Nooble stronghold crusader 2 probably
 
7:31 PM
> Page Not Found
 
or maybe CS GO so I can get to profile level 3 so I can play competitive again
 
Again?
How
 
the profile level thing is new
 
@AlexM. is that something similar to what you're thinking?
 
Oh ok.
 
7:32 PM
it wasn't here when I started playing
 
laffo Splash Damage goes from one horrible anticheat shit to another
 
I want to play competitive again because I spent a while getting better on FaceIt and CEVO
I'm curious if I'm able to get to a rank like DMG now
on CEVO I can play well against LE+ so I'm confident
 
I haven't gotten to competitive yet 'cause I'm bad.
 
must admit, getting to a rank like DeadMG is pretty impressive
 
@Puppy :P
 
7:33 PM
Now it's XINGCODE
 
@Puppy lol
 
@Mysticial ☑ rekt ☐ not rekt
 
Managed to be more annoying than Punkbuster in whole 2 minutes
 
@AlexM. Does CS:GO freeze for you when you alt+tab out of it or something?
 
no
 
7:34 PM
You play on fullscreen?
 
I don't know
maybe
 
Also FAQ
laff
> The error occurs, when the XIGNCODE runs on unable to running operating system
Where the fuck did they find this shit
 
@AlexM. to be clear, the order could be different when ordering by sequence value vs. the step ID or group ID
 
user1804599
what is XIGNCODE?
 
user1804599
nginxcode
 
7:37 PM
I wanted to try Dirty Bomb but I couldn't even get to menu because this shitty anticheat tripped on probably Process Hacker
 
hmm
found a station in Paris called Etienne Marcel
 
Good thing this game is F2P
 
I don't have to bother with the refund stuff
 
user1804599
martel is Dutch for torture
 
user1804599
7:39 PM
Etienne Torture
 
Etienne de Torture
 
user1804599
Torture de France
 
Shit no robot?
Is there anyone else who can operate on IC engines
 
just add an E
 
user1804599
@BartekBanachewicz I played BuildCraft so I'm an expert on engines.
2
 
7:42 PM
lmao
 
user1804599
Add fuel, water and redstone power. Enjoy.
 
build craft was rad. can you still play it without feed the beast or whatever
 
@BartekBanachewicz What's the problem? I might not be able to help, but I'm curious
 
I have an unindentified part
 
user1804599
7:42 PM
indent it
 
user1804599
problem solved
 
And grease on hands but thats less relevant
 
user1804599
better than Greece
 
hi
@rightfold baaaaaa. baaaaaa. baaaaa.
 
There's a pipe leading from the engine or perhaps clutch
To... Nothing
I am for fucking real. Looks like a drain but... For what?
What do engines drain?
 
7:45 PM
@BartekBanachewicz don't engines usually output some sort of liquid
 
user1804599
@BartekBanachewicz gasses
 
That would be water
 
you know, like the kind that comes out of non-green buses
 
user1804599
@BartekBanachewicz heat
 
But i thought it goes out tru exhaust
 
user1804599
7:45 PM
ask on [engines.se]
 
@rightfold baaaaaaa
 
I am trying to find out any decent schematic for that engine but
Chinese crap. I want a Honda already
 
user1804599
Honda Civic.
 
user1804599
XD
 
user1804599
7:47 PM
JPEG but I love it.
 
user1804599
uppercase lambda is beeeeeeeeh
 
@rightfold From beyond the realm of souls and birth, I call upon Ur's sword to bring ruin upon my enemies! Perish.
baaaah
 
user1804599
I don't speak Japanese.
 
BlazBlue, activate.
 
7:50 PM
Sooo
Yeah well
 
Turbo-C++? The compiler from 1992? — Borgleader 10 secs ago
another poor soul :(
 
Once i get my vacation
 
user1804599
 
I think ill disassemble the thing
 
@rightfold super hawt dank fira
 
7:51 PM
@Bartek where does the pipe lead to?
 
@R.m nothing it ends near the drain of the accu.
 
@rightfold ...now that you're a Java developer ;)
 
But! There's something like a clip at the end
 
7:52 PM
lol slide reminds me of Kung Fury
 
Near the what?
 
user1804599
ugh monads
 
Is it metal? Rubber?
 
There's a pipe leading from the accu to like nothing again
 
user1804599
lol promises
 
user1804599
7:52 PM
terrible shit
 
@fredoverflow monads are not magic :/
 
Both are rubber. The accu one is thin and transparent
The engine one is thicker
 
What does it end in?
Is there done attachment thing at the end or something?
(Pic?)
 
The engine one has something like a clip but... I am not sure if it was attacked to anything
Sec I'll get outside and take a photo
 
user1804599
@fredoverflow this weekend I'll probably write a VM in JS
 
7:56 PM
@rightfold You know how to have a good time!
 
Pix soon
 
user1804599
@fredoverflow Wanna know why I'm not generating JS code in the first place?
 
It has like
The clip was just to fix it go the frame perhaps
Not to connect it to a anything
 
@Borgleader I did! Anyways, if they change it, its cool but until then I gotta stick with turbo and this code is for turbo C so, it should work, shouldn't it? — Kshitij 3 mins ago
A new hope!
 
@rightfold Threads? Fibers?
 
user1804599
8:01 PM
Because I want threads and JS offers no threading facilities. :D
 
webworker?
 
user1804599
web workers cannot do I/O
 
user1804599
which defeats the whole point since I want to do I/O concurrently
 
JS has promises/deferreds for that, no?
 
is there an example of how to write a c++ program to comment out those unnecessary lines? — Naan 34 secs ago
 
user1804599
8:05 PM
That leaks implementation details ("does I/O") into interfaces. Is also very cumbersome to use.
 
user1804599
also web workers are incredibly expensive so even if they could do I/O they won't be feasable
 
user1804599
they're intended for parallelism
 
Ell
How will you do IO in threads on a VM written in is?
*JS
 
user1804599
On I/O you suspend the thread.
 
user1804599
When I/O completes you resume the thread.
 
user1804599
8:08 PM
in between you can resume other threads
 
Ell
Oh I see
 
sounds like what the kernel does with normal synchronous I/O
 
user1804599
yes
 
user1804599
it's the same concept
 
@R.MartinhoFernandes
 
user1804599
8:10 PM
I couldn't care less about parallelism for the same reason I couldn't care less about an extra GHz.
 
goes out and ends empty
 
user1804599
I wonder how Lua-to-JS compilers deal with coroutines.
 
they don't
 
user1804599
lol
 
user1804599
epic fail
 
user1804599
8:14 PM
it's the only feature that makes Lua worth using
 
@BartekBanachewicz looks like an overflow of some sort...
 
eh
what makes Lua worth using is the lack of features.
 
what's the other end go into?
 
like how fucked up JS's this is
or how fucked up their comparison ops are.
and metatables are much better than prototypes
 
could be a pipe to let air into the fuel tank to avoid it trying to create a vacuum
 
8:18 PM
the C++ one is the only one I don't get..
 
old as shit
 
user1804599
@MarcoA. values are copied a lot.
 
user1804599
Because C++ didn't have move semantics at the time of writing.
 
then I agree: old and subjective
 
@thecoshman one ends in the engine, one end is free
 
stock market so tsundere
 
// did some profiling of allocations
void* operator new(std::size_t n) { std::cout << n << '\n'; return malloc(n); }
void* operator new[](std::size_t n) { std::cout << n << '\n'; return malloc(n); }
48 is the most common allocation size in most of my programs
I wonder why.
 
Milan's airport added a hologram screen for travellers
not sure how realistic that thing is
can't find a video
 
user1804599
@StackedCrooked 48/6 = 8
 
user1804599
Do you have structs with 6 pointers in them?
 
8:34 PM
Hm, small string optimisation perhaps?
 
user1804599
I'm not sure about this thing.
 
user1804599
select {
case let result = <-resultChan => result
case <-time.after(timeout) => throw(timeoutError)
}
// vs
select {
case let result = chan.receive(resultChan) => result
case chan.receive(time.after(timeout)) => throw(timeoutError)
}
 
user1804599
I find the former more readable.
 
user1804599
but @Ven hates that syntax
 
user1804599
Perhaps just recv. It has to be built-in functionality anyway.
 
8:39 PM
@rightfold In my test app (a Qt app) it comes nearly always from here (frame 5). Maybe they are using string for screen coordinates ..
The plot thickens..
 
I don't understand move semantics completely :(
I thought the idea is that you can simply use value types where the compiler elides unnecessary copies. Now if your classes use unique_ptr to manage resources the compiler can generate the correct move ctor and move assignment operator. That is what you should do according to the rule of 0. But what about copies? Does it generate copy ctors which copy unique_ptrs? Or do you need to do it, if so then it is no longer a rule of 0.
 
unique_ptr is non-copyable
 
yes
so you get move-only classes when following the rule of 0?
 
move constructors are like copy constructors but they know that the object they are copying from is not needed afterwards
 
so if you have a member variable of type unique_ptr, then your class won't get a copy constructor
unless you define one
 
8:44 PM
guys, can you visit and share your opinion? groups.google.com/a/isocpp.org/forum/?fromgroups#!topic/…
 
Hmm
So rule of two, you have to define copy ctor and copy assignment if you want all?
 
@Nils no, the compiler will generate them for you, unless you have members which prevent that
in which case you can still define them yourself
so you can decide to copy the unique_ptr using deep copy or something
 
So struct MyThing { std::unique_ptr<SomeThing> _asfd; } is copyable?
 
Nope.
 
8:48 PM
virtual ~base_of_five_defaults() = default;
What happens if you try to copy it?
 
Because you have a std::unique_ptr member, which is not copyable, the host class will also not be copyable.
@Nils Compiler error.
 
yes but rule of zero then gives me move only classes
 
yes. Rule of zero doesn't promise you copyable classes.
 
ok
 
user1804599
@StackedCrooked you may like this video youtube.com/watch?v=cN_DpYBzKso
 
8:50 PM
Is the compiler generated destructor always non-virtual?
 
user1804599
no
 
@StackedCrooked Would it make sense to declare copy ctor and copy assignment manually then?
 
user1804599
it's virtual if the one of the base class is virtual
 
For example by calling the copy ctor of the class managed by unique_ptr
 
@Nils rarely
in my experience
 
8:51 PM
@rightfold yeah but if you want to have a virtual compiler generated dtor you need to explicitly declare it, right?
 
user1804599
yes
 
user1804599
virtual ~T() = default;
 
@Nils the only use case i've seen is copy-constructor for pimpl objects.
 
Yeah but the basic idea is to have value semantics
so at least in theory you need this
But thx for the answers :)
 
@BartekBanachewicz ¬_¬ where abouts in the engine
 
8:58 PM
@Nils It being compiler generated is pretty meaningless for a dtor.
 

« first day (1718 days earlier)      last day (3231 days later) »