« first day (1946 days earlier)      last day (3004 days later) » 

3:00 AM
lol
 
@ThePhD benchmark!
 
'm tryin'. ;~;
Honestly, it's probably because of my explicit support for meta functions and that indexing nonsense I do where I construct the temporary std::string
hash-maps aren't poly-key compatible in the std::, so I can't save on the std::string allocation.
Possible saves include thread_local string variable, but...
 
poly-key is that thing harry & hermione use right
 
nice
 
No, it's being able to use const char* with map.find()
 
3:02 AM
#disappointed
 
std::map can do it as long as the comparator or whatever has constexpr bool is_transparent = true; or something.
std::hash_map can't because they just didn't implement it.
 
And I'm p sure C++14 map allows lookup by anything convertible to Key, no?
Luc Danton inbound
 
C++14 map works because it only requires a comparator.
std::hash doesn't have a clue how to deal with "multiple types that hash the same".
 
calculating approach vector...
 
Unless they add support for a transparent or multi-hash, there's no way to have C++ std::unordered_map play nice.
I honestly feel like I should write a proposal for this.
 
3:04 AM
then you should honestly write one
 
I don't have time for it.
I need to pass my classes.
MAYBE later in the semester implementing a transparent hasher could be my project for Bjarne's class.
 
that would be fun
"weeelllll for some reason this isn't in c++14, so I made my own"
maybe don't go with snark/passive aggression
 
I totally will.
 
Problem is, for comparators it's easy.
 
3:08 AM
mawning
 
just is_transparent and then == takes care of overload resolution.
 
@ElimGarak mornin'
 
For std::hash it's different.
 
How do you signify that a type is hashable for std::hash?
All it has to do is have an operator()( Key ) func, or something like that that makes it call properly.
So which has do you pass in to std::hash<T> for T?
std::hash<std::string>?
Do you just include overloads for const char* and std::experimental::string_view ?
 
3:10 AM
I assume you implement std::hash for the type, yeah
 
seems like you implement std::hash as @jaggedSpire said
 
I'm talking about extending std::hash to accept multiple key types.
 
And how you signify that "hashes of these types are all the same".
 
you implement the omnipotent std::hash<robert_t>
 
dammit man
 
@Borgleader whatthefuck
 
@ThePhD in simpler terms, you want to implement lookup with multiple types usable as keys
?
 
@HubertApplebaum ~~butts~~
fokking discord strikes through on this, destroys a good lounge meymey
 
3:15 AM
lol at the user tags
 
@jaggedSpire No, I just want to have multiple key types comparable.
 
so you could pass in const char * and std::string and, say string_span and if they represented identical sequences of characters, have then access the same value?
 
@jaggedSpire Yes.
 
soooo
why not make a comparing type constructible from all three, and implement hash for that?
 
Because the constructibility is what is costing me.
 
3:18 AM
@Borgleader dafuq
 
std::string's constructor runs and costs a significant portion of the lookup's runtime.
I need it to not make any intermediaries when I hand it a const char*.
When it's still a string that should still be hashed.
 
If I make a union type where the construction is optional, I'm now paying the cost of keeping a variant alive.
Which costs performance etc. etc.
 
and if only you could pass in whatever type you wanted as the key you'd not be having this problem
 
3:22 AM
^ using non-member functions because they are awkward so people are less likely to use them
lol
 
#facebook
 
@jaggedSpire Right, but the interface boundary enforces std::string.
If I want to be a smartass about it,
 
@HubertApplebaum Hiding the features they don't want you to use. So facebook :)
 
I could make a std::vector<std::string> to hold all the strings,
 
this is not sufficiently awkward for discouraging use. The function names must be at least four times as long
 
3:23 AM
and then make the map const char* or string_span.
 
@jaggedSpire The functions should take a password param.
Only those who know the password can use it then :P
 
@ThePhD at that point you may as well wrap the structure
@StackedCrooked heh
 
@jaggedSpire Removal would be hard, yes, but the stipulation here is this: the unordered_map never changes after its constructed.
So vector storage of strings is a viable thing.
 
I learned how to read Binary, Hex, and Octal today.
Today was a good day
 
why would it have to not change? Once you're wrapping it, you can store the index of the string in the vector as part of the value, and on removal simply swap the string at that index with the end of the vector, and pop_back
 
3:29 AM
@jaggedSpire No, I mean, in my code for my purposes.
 
oh okay
 
Once the unordered_map is constructed, it never gets changed.
So having a vector or strings for storage would be viable, since there'd be minimal overhead in making it work.
 
so what's the catch, beyond the lifetime management of the resource being slightly disconnected from their use?
 
There's no catch, I was just brainstorming.
 
3:32 AM
I demand a catch >:(
you see, this was such an exceptional conversation I need one. :P
ohgodI'msosorry
 
@jaggedSpire good... good
 
lol
 
@StackedCrooked I can actually see these being handy.
 
I also just figured out how to get the lower bits of a byte
Today is even a better day
The secret is, is that when doing "&" you must do the maximum number of amount of bits when they are all set to one
 
3:37 AM
@Rapptz ye, the funny part is the "put as a free function to make it ~~awkward~~ to use"
@MarfGamer did you figure that on your own
 
@Hubert yes
 
@MarfGamer no offense, but we all knew that
 
impressive
 
I noticed a pattern when toying with the shiftinng
 
You can hide functions by collapsing them into one line and indent them 1000 spaces to the right after a member variable or something.
 
3:38 AM
Also google is not nice to me sometimes :<
 
@StackedCrooked oh god what
 
@StackedCrooked Visual assist/Intellisense will find them
 
pls proposal to make ; after a class definition optional
and compiler flag to make it a warning idk
 
Well back to bitshifting... in... Java... shudders (Yes I know this is the C++ room)
 
this is current year jfc
 
3:39 AM
having a horizontal scrollbar in my text editor makes my brain itch
 
bitshifting isn't that much more difficult in Java
 
and MSVS makes one when you get to around 80% the length of the window for some reason
 
No its that there are no unsigned types in java so it can throw me off when I'm trying to shift a byte
So then I have to change them all to ints and bleh
 
augh why
 
@MarfGamer mostly irrelevant unless you want to display the result
 
3:41 AM
@milleniumbug I wanted to display the result
 
then display it in hex or binary
 
I am
I am using binary so I can make sure I am shifting the right amount of bits over to the left or right
 
@Stacked how can I choose which version of boost to use on coliru and is 1.49 supported?
 
Ven
Why aren't you sleeping hubert
You snuck outta bed again?
 
Il est midi mec
 
Ven
3:46 AM
T'es où
 
Gonna have lunch as soon as I get out of bed
Hong Kong
 
Ven
Ah ok, 4h46am ici
 
AM or PM?
 
Ven
D:
 
3:46 AM
laffo 12h system
 
@MarfGamer 11:46 vs 23:46 man
 
On a scale of one to ten, what is your favorite color of the alphabet? True or False? Solve for X? Explain.
 
@MarfGamer robert because Cinch.
 
@Hubert and @Borgleader Yes it isn't
 
neat
 
grep -R --include='*.h' --include='*.cpp' . | perl -pe 's,(.),\1\n,g' | sort | uniq -c | sort -rn
^ To generate it yourself.
J seems to be universally at the last place. Also in boost. Even in a Java project I checked.
 
@StackedCrooked You seem to always do some small experiments :p
 
Yeah.
It can get pretty random at times :)
 
Yeah but it's fun :)
 
4:09 AM
I should test my library on more platforms
 
4:24 AM
Seriously, the number of times people had to revert vandalism on this page is hilarious.
 
You know what's vexing? emplace replaces existing key, try_emplace doesn't (C++17), but insert doesn't replace existing key, and insert_or_assign (C++17) does.
 
C++ and consistency
 
insert is the bad one actually. But they can't change that one.
 
STL8.5 will fix those and the old C++17 functions will finally be removed in C++44 but it will take a few more decades for standard library implementations to actually ge rid of them.
 
I want chocolate badly
Am I pregnant
 
user406009
4:35 AM
@HubertApplebaum Maybe you just ran into a dementor.
 
@HubertApplebaum Better check.
 
Nah, you can't get pregnant after menopause.
 
lol
I completely exploded my budget this month
And the 3 previous months also it seems
 
user406009
@HubertApplebaum You clearly need to tone down on the prostitutes. There are cheaper forms of entertainment.
 
actually it's not even the prostitutes
it's the restaurants apparently
I'm surprised too
 
user406009
4:42 AM
Been there, done that. It's just so tempting to eat out.
 
I just don't have time to cook tbh
 
Going to sleep. Have fun without me bbys :(
 
user406009
@HubertApplebaum Sandwiches.
 
@Morwenn noooo
 
user406009
Endless sandwiches.
 
4:43 AM
good night :)
 
Danke :)
 
Well I try to eat sandwiches for lunch and cheap chinese food for dinner
But idk what happened lately lol
rip my savings
 
user406009
@HubertApplebaum It's too bad the police shut down all those cheap food stalls in HK I guess?
 
@Morwenn night
I cook enough for a family and then eat the leftovers for the next half-week
it works out, but I've got more free time than you
can't say I'd be able to stand cooking with my only free time
 
Yeah, cooking 500g of spaghetti makes enough food for 4 days
and 500g of spaghetti is like 2-3zł so it's cheap as fuck
 
4:50 AM
add veggies and you're halfway to a well-balanced diet
 
@Lalaland Still plenty of those
Just shut down the illegal ones
 
just don't eat hth
 
5:10 AM
stretching floof /cc @Borgleader @ElimGarak @Ell @TonyTheLion @ThePhD @Xeo @набиячлэвэлиь
 
user406009
Lol, this important probability function has been giving slightly wrong results for years. I guess no one cared. #testsareimportant
 
user406009
I wonder if "fixing" it will break anything.
 
my my
 
user406009
My guess is that it probably will.
 
tired mini-floof /cc @Borgleader @ElimGarak @Ell @TonyTheLion @ThePhD @Xeo @набиячлэвэлиь
probably.
howling arctic floof /cc @Borgleader @ElimGarak @Ell @TonyTheLion @ThePhD @Xeo @набиячлэвэлиь
 
5:33 AM
@AlexM. I did the quest(s). My character was pretty much a bitch in the game. :D
 
Floofs.
@HubertApplebaum You suggested traverse to get a thing from lua (deeply).
Should I call the set version just... traverse_set?
 
what's the difference
 
One sets a value, one gets a value.
 
ah
traverse_and_set?
because I interpreted it as the noun
 
5:54 AM
Ooh.
Well
I have get/set already
Maybe I can do set_traverse ?
Then again it sounds like a for_each thing still
Ffff.
 
user406009
@ThePhD The more common name I usually see is set_in and get_in.
 
user406009
(I assume you are talking about something where you have an array of keys)
 
user406009
Like get_in(foo, ["a", "b", "c"]) = foo.a.b.c
 
6:33 AM
Hrm.
get_in doesn't quite... resonate with me.
 
get_in_the_car
 
.-.
jaggedpls
 
6:50 AM
sorry, couldn't resist
 
Heh.
So, what've you been up to these days anyway jagged?
Asides from the usual soul reaping.
 
:P
playing a bit with CMake to get more familiar with it, reading some miscellaneous programming stuff to get a better basis for making good design decisions in my code.
I've spent most of tonight painting a bird on my old table with watercolors
only have part of the wings done yet
 
Nice.
Questionable decision with CMake tho.
 
eh, it's another build system. I really only know MSBuild and a bit of Make
 
make annoys me
 
6:55 AM
I think make annoys everyone
 
I am trying to replace it with something but what
 
mingw32-make
obviously
 
On linux.
 
port it to linux then
this is clearly a rational decision and not in any way motivated by tiredness and an easily amused state of mind
 
@Borgleader waaaaat
 
Ell
7:00 AM
Aww I woke up early enough to see my computer wake up <3 such a cute moment
10
When I hear those little fans spinning up
 
lol nice
 
Ell
7:14 AM
I am so tired man
I thought I could get a lie in today :O
 
@Ell lol what
 
@Ell .... uwotm8
 
7:30 AM
speaking of sleep, though I actually got a decent amount last night (for a change) I should wander off to bed.
 
Sleep
 
Sleep
 
is for the weak and the living
And we both know you're not alive
 
...?
 
At least, not inside.
 
7:31 AM
lol
brilliant
+5
 
+5?
Wait, I have a score?
 
if I was alive on the inside before that so thoroughly rekt me that I'm dead now
@ThePhD wanna know what it means? :3
 
... I mean
No, but. Curiosity.
 
it's your :3 score
 
.... Soooo
Lower is better for that score, right?
 
7:33 AM
I'll leave it to you to figure out wtf that means
 
q_q
jagged
 
because I sure as hell don't
 
jagged pls
 
hell, I just said it was a score because you asked if it was
 
... Oh.
 
7:34 AM
fuck nothing makes sense right now I'm going to bed
 
Nighty night.
Sleep tight.
Don't let the UB bite.
 
you too when you eventually collapse of exhaustion
 
Ell
@HubertApplebaum my computer turns on at 7 every morning and I'm always asleep for it
But today I experienced the miracle, which has never before been captured
Or seen even
 
8:00 AM
"Reorganizing data... 3.95%", well... Fuck you, too, SWTOR.
 
@Ell Why don't you keep it on?
 
Fuck you, VC++.
It's trying to expand something that isn't even a pack.
And it works in some cases, but OH GOD NOOO
NOT THIS OTHER CASE THE HORROR.
auto f () -> decltype(stuff()) { return stuff(); } // works
decltype(auto) f () { return stuff(); } // WEEE WOO WEE WOO SOUND THE ALARM
 
I don't understand why you guys keep insisting on using VC++
It's like a wife returning to her abusive husband
And you also keep bitching about it too.
I honestly don't get it.
 
8:29 AM
sup guys
 
Nice, 21 rep, just enough to dump questions in chat.
 
8:52 AM
> Weak parts include art, story, page layout, lettering, historical context, coherence, internal logic, and spelling.
 
 
1 hour later…
10:06 AM
@kobe24 @MadameElyse's cock
kek mobos specifying OS compat
 
@Ell Why don't you turn it on when you need it...?
 
@HubertApplebaum Kernel is set to compile-on-boot
 
@HubertApplebaum what, like a potato farmer
 
10:29 AM
I never understood people who keep appliances on for no reason
 
@ThePhD It's the space before (
 
-2
Q: creating a cultivation schedule in c++ for organic crops?

Pieter SchreursI am working on a (school) project. I want to create an c++ application that takes user input of the data from their home garden/farm, than it will calculate what crops will give you the most production, and checks if the crop can grow taking into account the crops that have been on that plot of ...

 
the world moves in mysterious ways
 
> BY DAY: Bio Dynamic agricultural student
what the fuck is bio dynamic
 
@HubertApplebaum very kek much wow
@HubertApplebaum He throws carrots at people
 
10:40 AM
Biodynamic agriculture is a form of alternative agriculture very similar to organic farming, but which includes various esoteric concepts drawn from the ideas of Rudolf Steiner (1861–1925). Initially developed in the 1920s, it was the first of the organic agriculture movements. It treats soil fertility, plant growth, and livestock care as ecologically interrelated tasks, emphasizing spiritual and mystical perspectives. Biodynamics has much in common with other organic approaches – it emphasizes the use of manures and composts and excludes the use of artificial chemicals on soil and plants. Methods...
oh wow
> burying ground quartz stuffed into the horn of a cow, which are said to harvest "cosmic forces in the soil"
 
gotta have a lot of variables for the astrological influences, too
 
> I am just a farmer that likes programming.
see
they exist
> my computer took over two hours to calculate a cultivation schedule with just 40 crops in my database
 
11:03 AM
@Shoe I use VC++ and I don't usually complain about it.
 
1. software is terrible
2. people are terrible
3. there are too many different scenarios
4. nothing will really work for sure
5. it’s provable that nothing will really work for sure
6. our lives are meaningless perturbations in a swirling vortex of chaos and entropy
6
lol
 
> These days, though, it seems like everyone is making an indie game on the side, and we have to try and stand out among hundreds of talented people releasing creative games every day like “I am Alone and Nobody Understands or Has Felt This Way That Is Unique To Me: The Game” or “Dolphin Punch Simulator 3000” – it’s tough to compete with that!
 
Dammit. xD
 
@StackedCrooked I was asking a question about restricting process privilege and I was told to ask you about it. Any chance I could get some advice on that?
 
ITT: Fred dumps every link he found on Reddit
 
11:24 AM
@Puppy You are one of the good guys
 
I do believe that must be the first time you have ever made a suggestion like that
 
Well he is a shoe after all, he mostly kicks people :p
 
he can't kick people ;p
unlike my most excellent self
 
Wanna find out
 
@HubertApplebaum potato farmers, predominantly
 
11:29 AM
ah fucknuggets
emscripten no support exceptions?
 
@HubertApplebaum sounds like he had a badly written O(nⁿ)
 
@Puppy For what it's worth, the second link I did not find on reddit...
 
ah well
 
@StackedCrooked The reason why I was told to ask you is about your site - me and some other guys over at PPCG are making a chatbot with about 100 interpreters on it and we needed to find a way to restrict file io and shell access. Since you've built a site which seems to successfully do this, I was referred to you. If you have any advice, ping me here.
 
user1804599
Hello.
 
11:37 AM
@VoteToClose TBH Coliru was more or less hacked together. You don't want to do what I did for serious work :)
 
That's from this guy:
@sehe For what it's worth, I place a huge premium on concision. I don't want to introduce a new function just for the sake of what in my current program is a minor piece of functionality involving reading one line from a file for an unimportant purpose. Just the requirement of adding a function to do this would cause me to not even bother reading the line. Having one line of code to do it, in my case, allows the single line of code not to stand out, so I'm doing it that way happily! — Dan Nissenbaum yesterday
 
Introducing new functions is so 1998.
 
Apparently, a guy with 20 years of c++/php experience feels the need to tell the audience that he likes cryptic oneliners
 
Code Complete's take on "reasons to introduce a function" goes directly against what he says.
 
@sehe I’m not an employer obv., but that’s a lot of red flags
 
11:40 AM
That whole freelancing bio has many cringe-worthy gems to me
 
user1804599
It's shocking how little the government does against antisemitism.
 
@LucDanton I love how some 80% down his own rant, he found room to reiterate how he is an excellent communicator
@MadameElyse Isn't legislation quite a lot?
@StackedCrooked ARgumentum ad autoritatem :) (Honestly, I'm not sure I even remember the reasons in that book. I like to make my own judgement. But crypticness is a no-no in production code)
 
@sehe they say bullshit has a quality all its own
 
@StackedCrooked This isn't exactly serious work, though. :P Databot will almost always be run by us our when he's in chat, except if someone else decides to run him locally into chat, and none of us run him locally (we use a virtual machine on a remote server).
Plus, we're I'm stuck. >.> We'll take anything you got. xD
 
user1804599
@sehe idgi
 
11:42 AM
@LucDanton I'm also a tiny bit jealous, of course. Only a tineeeeeeeeee bit because it looks like he painted himself into a PHP corner
@MadameElyse What should "the government" do - outside legislate?
 
user1804599
why would you legislate attacking jews
 
hehe
So. Are you going to give context?
 
user1804599
 
user1804599
inb4 meh geenstijl
 
Oh, and I've looked into AppArmor, chroot, jailkit, some virtualization, etc. Our main limiter is that we have very little disk space (~4 gigs) and we can have multiple programs running at once.
 
11:54 AM
I created a chroot. Made read-only mounts to /usr /bin /var /lib /lib64 inside the chroot. Used uname to limit the number of processes (to prevent fork-bombs). Put a timeout on the user script. If the timeout expires also kill the process group id (pgid). Puts an upper bound on the number of chars outputted from stdout/stderr. Make sure to prevent internet access. Have automated cleanup scripts. The list goes on and on...
Provided sehe with a hack to extend the timeout so he can compile boost samples..
 
Thanks!
 
user1804599
oooh backdoors
 
> Zwaar HOAX gehalte in dit artikel ...
Ik heb geen begrip voor "Aangifte kon ik niet doen." De grootste aanklacht ligt wmb bij de "joods organisaties" als ik het zo lees. Aangifte kan letterlijk altijd.
Ik ben er helemaal niet tegen dat er meer serieus naar dit soort trends wordt gekeken. Maar het is een beetje veel en laat om larmoyant uit de hoek te komen met "alle joden zijn al aan het vluchten". Het is hun goed recht natuurlijk, maar ik ben niet zo erg overtuigd dat het de enige/beste optie is.
 
@StackedCrooked We can solve the process things (we use some fancy python restricting for that already), maybe also make a dummy account for restricting some of those other things. I never thought about mounting the directories so that we don't have to use bonus space. :P
 

« first day (1946 days earlier)      last day (3004 days later) »