« first day (1551 days earlier)      last day (3619 days later) » 

that must be french for "repost" :P
23:23
Hohoho import now takes no memory at all
Fuck JSON, pickle streams all the way
@рытфолд I love that on top of scrambled eggs :-D ...
@thecoshman tetrahedron
@рытфолд With bread and butter!
@AlexM. No, it's for Seen it, been there
do C++ compilers optimize for std::maps? Like const std::map<std::string, std::array<std::string,3>> Translation = {"string_identifier", {{"english text", "polish text", "dutch text"}}}; Translation ["string_identifier"]; ?
or is the map being searched at runtime?
23:38
Most likely run-time.
okay so avoid maps for translation of thousands of strings
You can drop the vector, keep the task. I prefer to use tasks instead of composing promise/future pairs manually. Here's a gist of what I'd do: Live On Coliru. Answer updated with some explanations. — sehe 9 secs ago
probably #define STRING_ID __counter__ then
And another sheep learned that generic programming involves less control instead of "reflecting" function signatures
@Gizmo The map is runtime.
user1804599
On a scale from Burger King to McDonald's, how terrible is Taco Bell?
23:40
I'd say it's American
@sehe yeah but maybe the compiler would be smart enough to translate a once-initialized constant map to direct access when optimizing :) I don't know compilers internally so that's why I was asking ^.^
Maps by definition employ dynamic allocation. POOF!
@Gizmo Just try it.
hm, how could I check if the find is optimized away? ;o
@Gizmo I think you can switch on const char* with external linkage. Just be sure not to assume constant folding
@Gizmo The assembly listing? gcc.godbolt.org/
Use a hash map
23:42
That too
I think I need to take an assembly course ^.^ but I will try my best! Thank you very much
Not that 'thousands' is anywhere near big enough number for logarithmic access to matter
@рытфолд When I were in US, I seriously avoided it. Subways anyway seemed to be the best choice at all ...
user1804599
Subway is meh. Reasonable I'd say, for a fastfood chain.
Xeo
Xeo
ugh, almost 1am
why am I getting nothing done after work...
I think need to budget my free time or something
23:43
I'm kinda having fun with this work thing
so if I have 24,500 strings, the slowest access would be log(24500) ? Base 10 or base 2?
user1804599
I'd buy vegetables and ciabattas from the supermarket if they sold in much lower quantities.
Even though it's dumb data export and import
@рытфолд Not really, I like their tuna salad sandwiches. (yummy dolphins in it)
user1804599
Maybe I can buy them from a specialised grocery store in small quantities.
23:44
because in programming world if you talk about log you probably mean base 2, in mathematical world the default is base 10
@Gizmo This doesn't work like that
Ahw :(
Xeo
Xeo
I could stay awake another hour or so to try and do some stuff but.. I think I'll just go to sleep
@Gizmo surely you can spot a find() invocation
Also use a hashmap anyway, the only reason to use ordered map is when you actually need the order
23:45
@Gizmo hash tables are O(1) if you tune them right
@Gizmo 1000100111100011111001010111
Hell for something like translation strings you can generate a perfect hash
user1804599
hash tables are O(enough)
okay so what's with the O(1) thing, does this mean that the find is linear or constant time for each element
28
A: Is it possible to map string to int faster than using hashmap?

seheA hashtable[1] is in principle the fastest way. You could however compile a Perfect Hash Function given the fact that you know the full domain ahead of time. With a perfect hash, there need not be a collision, so you can store the hash table in a linear array! With proper tweaking you can th...

@Gizmo does 1 look constant? Or linear?
23:46
Yesh
constant :)
Linearly constant
But I learned to never assume
user1804599
Constant functions are linear.
I have shot myself a few big problems with assumptions in my life
user1804599
23:47
They're of the form y = 0x + c.
@Gizmo Now you have to learn to trust what you do know, otherwise you cannot build upon it
@рытфолд hehe.
@Gizmo You assumed she was on anticonception?
Oh God lucky me no, not that big
> A few times.
user1804599
Abortion problem solved.
std::abnormal_termination
user1804599
23:48
If it doesn't work go for postnatal abortion.
user1804599
Problem solved again.
Dark jokes xD
I hate myself for laughing
@Nooble it's possible. Also, he doesn't say they were the same problem everytime
user1804599
@Gizmo laughter is the most important thing in the world.
@Gizmo I hope I wasn't close. Because that would make the joke inappropriate
user1804599
23:49
laughing is healthy
user1804599
@sehe It would actually make it appropriate.
Healthy™
well jokes are jokes, everyone has their own line which they hope not to cross ^.^
@рытфолд Watch out. We got a literal bad-ass over here
user1804599
@Gizmo My line lies at infinity.
23:50
.. xD
@рытфолд Jesus. That line will be at the cross.
user1804599
Nailed it.
2
@ScottW We missed you. We really do. Now, tell us where you are hiding @TonyTheLion's body
@рытфолд hehe
user1804599
@sehe At a graveyard.
@рытфолд Ouch! Religious jokes are badly appreciated nowadays :-P ...
23:52
Well. It's all fair game as long as you don't call Jesus a prophet, methinks
user1804599
@πάνταῥεῖ Nobody can stop me from making jokes.
Buttcoins ok?
@рытфолд That's pretty good so! (Should I say 'Je sui Charlie' now?)
user1804599
So Jesus talked about this "god" who created the entire universe, the whole solar system, every blade of grass, and then he said "that's my dad. Yup, my dad did all that."

Conclusion: Jesus had mental issues.
user1804599
@πάνταῥεῖ Je sue Charlie.
user1804599
23:54
Jesus also farted you know. Just imagine it. Jesus farted.
user1804599
> So, God is my dad. *pffft*. Open a window or something.
@рытфолд And then he went and took a holy shit.
@рытфолд May be Jesus just had serious communication problems, and other people made them worse afterwards and over time. But he doesn't matter for life, universe and all the rest ...
user1804599
Jesus it's already 00:56.
user1804599
Time to sleep.
23:56
@рытфолд Obviously he was talking to an audience. You can hardly start explaining evolution and all that shit in that timeframe. So, to get a bit of authoritay, he frames it in a story that fits in with their ancient scriptures and all the while gives him the chance to give them somewhat saner set of life guidances (I mean, as opposed to the ruling Jewish subdenominations at the time)
Don't fall asleep now
that would be a waste of time
I think we're on the same page there
<No output: generated assembly was too large (581804 > 500000 bytes)> :/
@πάνταῥεῖ suis*
@Gizmo gcc -S (hand me the code. It'll be 5s)
@sehe Any religion (besides mine of course), is waste of time :P ...
@sehe Bloody typo yes ...
user1804599
By the way, I don't understand why many Christians are against gay marriage. Jesus had two dads and they consider that just fine.
23:59
@рытфолд he had? ;o
@Gizmo doesn't compoile
-O3 -std=gnu++11 -fpermissive ?
user1804599
His mother is also the mother of one of his fathers.
Holy mother of God
mind blowing

« first day (1551 days earlier)      last day (3619 days later) »