« first day (1020 days earlier)      last day (3921 days later) » 

2:01 PM
@jalf Wait, I don't get it. What was happening?
 
JBL
How does it "notice" that you're implementing memcpy ?
 
Oh, I get it.
 
user784668
@JBL pattern matching?
 
It recognised the loop as memcpy.
 
user784668
Hardly a bug because ODR.
 
2:03 PM
LOL @jalf
 
I only skimmed it, but apparently the result is infinite recursion, because they're trying to implement memcpy, and gcc replaces it with a call to... memcpy. Which they're trying to implement
 
JBL
@Fanael For reasonable re-implementation I suppose then ?
 
user784668
And if you're into freestanding, then you're already deeply into implementation-specific things, so you should know how to stop GCC from optimizing memory-copying loops into memcpy.
 
@Fanael No, because outside the language already.
 
user784668
@R.MartinhoFernandes the standard library defines one memcpy, how is that not an ODR violation?
 
2:05 PM
@Fanael None of us said it was unreasonable behavior. But it's still funny. :)
@Fanael how can it be an ODR violation?
unless the standard library defines memcpy in a header and you include that header
 
@jalf Names used in the standard library are reserved unconditionally.
But that's irrelevant since we're working outside the language.
 
user784668
@R.MartinhoFernandes oh right, -O3 -ffreestanding -fno-builtin -nodefaultlibs -nostdlib
 
@R.MartinhoFernandes isn't that just the ones in std?
 
I knew there was one word too much there.
@jalf In C?
 
@R.MartinhoFernandes oh right, sorry
Anyway, that still wouldn't be an ODR violation per se
 
user784668
2:09 PM
Anyway this bug is proof that some people refuse to read.
 
@jalf I think all programs include a definition of the functions, even if there is no declaration. For instance, can't you actually declare them yourself, at least in C (and at least the ones that cannot be macros)?
I knw C++ is a bit stricter on that, because it allows the stdlib to drop extra arguments all over.
 
@R.MartinhoFernandes afaik you can, but that doesn't mean the definition is implicitly included. More likely, it just means that it'll use the definition linked in from an external lib
and then you still only have one definition
 
@jalf ODR is per program, not TU.
 
@fanael did you really need a proof?
 
user784668
@BartekBanachewicz yes, preferably 200-proof
 
2:13 PM
Linker errors are diagnosed ODR violations.
 
@R.MartinhoFernandes hmm, really? I didn't know they were classified as such
 
user784668
Speaking of ODR, I wish the committee deprecated the keyword inline and introduced fuck_odr in its stead.
 
> Every program shall contain exactly one definition of every non-inline function or variable that is odr-used in that program; no diagnostic required. The definition can appear explicitly in the program, it can be found in the standard or a user-defined library, or (when appropriate) it is implicitly defined (see 12.1, 12.4 and 12.8). An inline function shall be defined in every translation unit in which it is odr-used.
@jalf Well, at least ignoring exotic linker errors. I'm thinking the usual "duplicate definition" or "unresolved reference" things.
 
@R.MartinhoFernandes I see. Can't argue with that :)
 
(Also note the mention of "implicitly defined")
 
2:15 PM
@R.MartinhoFernandes well, yeah, sure :)
 
@JohanLarsson Yes, more or less. You get hooked up on hate speech charges otherwise.
 
I always thought ODR term only referred to the "within a TU" part of it, even if it's conceptually the same as duplicate definitions at link-time
 
Is there a good way to store this kind of data in structures?
user1:topic1:test1
user1:topic2:test1
user2:topic1:test2
user2:topic2:test2
 
@JoelSeah: Array of structures?
 
@LightnessRacesinOrbit TIL
 
Xeo
2:17 PM
I had an exotic linker error once: Mangled template name too long or something.
 
user784668
@Xeo too much template wankery?
 
@jalf Well, there's another rule that says you cannot have more than one definition per TU as well (and no exceptions for inline, meaning inline f(){} inline f(){} is not valid in a TU, I guess)
 
Xeo
Mh
My first go at expression templates, actually.
 
user784668
What linker was that?
 
anyway, I'm heading home. Have fun, everyone!
 
Xeo
2:18 PM
MSVC
 
user784668
Ah.
 
Xeo
Problem was on my side though
I had some unintended recursion at some point
 
@wilx well wad i wanna do is to count the topics and test based on the user1 or user2. which should give me a value of 2 for counting topicid on user1
 
Xeo
Bah, the initializer_list thread on the Asylum...
0
A: How to save variable number of arguments using variadic template arguments?

John BumperHere is how I tried to solve it: The parametr pack can be recursivle expanded and each parametr saved. Function store is supposed to do it. It uses one (two times overloaded) helper function. template<typename T> void storeHelperFunction(void*& memory, T last) { *((T*)memory) = last; me...

ugh
Badness all over, I'm back to Flash
 
@JoelSeah I am a bit confused what you said here. What is the actual end goal/assignment/task?
 
2:24 PM
> PyPy 2.1 - Considered ARMful
4
lol
 
Xeo
@StackedCrooked Nice
 
user784668
@Borgleader liar or confused
 
user784668
@Borgleader there's also a third possibility, but he wouldn't ask such questions if it was the case
 
@Pawnguy7 I need to read in data from text file and then store them into a vector<struct>. after that count the topic/test based on the user.
so meaning that if i have this set of data
user1:topic1:test1
user1:topic2:test1
user2:topic1:test2
user2:topic2:test2
i should get a count of '2' for topic for user1
 
2:29 PM
Editing the "Int a"?
 
Xeo
"my compiler doesnt have vectors" - I call bullschildt. — Xeo 9 secs ago
 
user784668
@Xeo I see what you did there.
 
@Pawnguy7 I fixed the formatting, but i won't improve his "code"
 
class arr
{
    arr(Int a, int n )
    {
        int *ar=new int[n];
    }
};
 
user784668
arr arr
 
2:31 PM
@Xeo lol
 
@Xeo I'm surprised no one suggested std::bind yet
 
@StackedCrooked One letter variables, the bane of my existence
 
user784668
@Borgleader for(int i
 
> now, I want to make the ar a global variable.
Oh gawd, what's going on.
 
@Fanael that's standard though.
 
user784668
2:32 PM
@Borgleader ya, a double standard
 
@Borgleader dude, that's not even a problem considered the overall crappiness of this
Int a, int n
What?
 
Was the idea behind this a singleton?
 
private constructor
 
@Fanael Not a doublt standard. If you read "The art of readable code" you'll come across the same thing. One letter variables are bad, except for "standard" things like for(int i... the difference between i and most variables is that i is only there for the purpose of iterating, it doesnt hold anything meaningful
 
user784668
2:34 PM
@StackedCrooked make everything private, encapsulation is awesome
 
@JBL uhoh
> Don't (give them the benefit of the doubt).
Check:
bbc.co.uk/news/tech...
idle.slashdot.org/story...
blogs.computerworld.com...
gizmodo.com.au/2013...
   They even orchestrated a whole "fake mob" protest against Applestore in Australia back a couple of years ago:
cultofmac.com/16332...
 
I wish you could subclass primitives
 
@Borgleader I don't agree with that exception. It indicates that for(int i is silly.
 
@ThePhD you can outclass them
 
@ThePhD What for?
 
2:36 PM
@ThePhD no.
 
@R.MartinhoFernandes Easy strong type-defs.
 
They have no virtual functions.
@ThePhD No, they wouldn't.
 
I can imagine a hundred derived types of Int that are horrible in their own way
 
E.g. struct charutf8 : char <---- ezpz
 
Easy "something-I-think-I-need-right-now"? Yes.
 
2:37 PM
^
If you want OOP masturbation, go do Java
they're experts there
 
Strong typedefs are not easy in C++ in any way because the semantics are fucked, regardless of what you choose.
 
user784668
Who'd ever need strong typedefs anyway?
 
Oh well.
 
@R.MartinhoFernandes What do you mean silly?
 
Xeo
@ThePhD FFS, we went over this before
 
2:38 PM
We did?
 
@Borgleader It's boilerplate.
 
Xeo
Yes, we told you before that a strong-alias in C++ is not easy
 
@JoelSeah does it count topics or tests?
 
=[
 
2:40 PM
@Pawnguy7 both. but either topics or test also can
 
@ThePhD No literals! Awesome.
 
@R.MartinhoFernandes Not really my concern in the end.
 
@JoelSeah is this an assignment?
 
@Pawnguy7 yep
 
5 mins ago, by R. Martinho Fernandes
Easy "something-I-think-I-need-right-now"? Yes.
 
@JoelSeah can I see what it tells you to do?
 
@R.MartinhoFernandes You're like 1 hour late or something. :b
 
In the end, char8_t is not as attractive without the literals.
 
@EtiennedeMartel self-immolation, i cant imagine how someone can have the willpower for this
 
2:45 PM
It's not like you're passing around char8_ts alone, or is it?
 
@Borgleader The guy was a Buddist monk.
 
A sole char8_t is sort of meaningless.
 
@EtiennedeMartel I know.
 
@Borgleader its not hard to poor petrol over yourself and light it, it's the staying calm whilst your burn that takes willpower.
 
@R.MartinhoFernandes The point really was to avoid some type-based collisions, because charcodepoint is really just unsigned int, and other stuff.
 
2:46 PM
@Borgleader lolwat
 
@R.MartinhoFernandes Aah, Samsung.
 
@thecoshman And that's what I was referring to.
@EtiennedeMartel How do you like the new LoL website?
 
Xeo
@ThePhD enum char8_t : unsigned char{};, still no literals though.
 
@Borgleader That's a valid question.
He's just asking the following: does "".Contains("") return true?
 
Xeo
Although... std::basic_string<char8_t> operator""_utf8(char const* str, size_t len){ ... }; or something.
 
2:48 PM
> i cant declare the overloaded constructer to be a character of arrays .
 
(The above is in C#, but fuck it)
 
C++ doesn't have Contains
 
Curtains.
 
I should get up for work or something...
 
2:51 PM
lol fail
 
@TonyTheLion I see you are very knowledgeable.
 
> for this problem, I am using turbo c++ .
Once again, all hope is lost.
 
@StackedCrooked I am.
 
@R.MartinhoFernandes Where?
 
Hey, everyone.
When Amazon ships something to you,
 
2:52 PM
for this problem, I am using turbo c++ . (yea, the old blue screen one) — Harshvardhan Gupta 3 mins ago
 
do they include the invoice or billing information in the package?
 
Damnit.
Is there any way to take that out?
So they just ship the items?
 
@JerryCoffin did you see any of this in the source?
 
2:52 PM
@R.MartinhoFernandes I don't understand. What makes people choose Turbo C++.
 
@Xeo And still just as meaningless as a normal byte type.
 
Xeo
@ThePhD You can have seperate shipping and billing addresses.
 
That's like saying: My OS is IBM DOS. How do I watch Youtube videos?
 
@Xeo Yes. But does the invoice say what the billing address / name / etc. is?
 
@ThePhD You mean as a gift?
 
2:53 PM
@ThePhD Are you trying to ship a gift to someone?
 
Yes and yes.
 
They have a gift option.
 
Can't you just check the checkbox that says "It is a gift"?
(Now I can't help but think about Boromir)
 
Somewhere during the checkout process there's a "This is a gift" box to check.
 
Hm. Well, alright.
@EtiennedeMartel Shipping to Canada isn't hard, is it?
 
2:54 PM
@ThePhD Depends.
Our customs sure love taxing stuff.
 
@HarshvardhanGupta Why are you using Turbo C++, if I may ask? — StackedCrooked 37 secs ago
 
=l
 
Maybe the mystery will be unraveled.
 
@EtiennedeMartel If I place the order through a Canadian proxy to a canadian address and charge an anonymous VISA gift card, what happens?
 
@StackedCrooked inb4 my teacher said to
 
2:55 PM
@ThePhD The Robot teleports to your room and slaps your dumb face.
 
@ThePhD You know that sounds very dodgy.
 
=[
 
Just do it legit, stop trying to fiddle your way past customs
 
I have a VISA purchased in Canada with enough money to make the purchase.
 
-2
Q: How to create N random numbers with sum M and each number > M/Z

ebsbkNo specific programming language is required. Answer in pseudocode would be perfect!

> what is Z
> Z is the integer group
.......
...............
 
2:57 PM
It shouldn't run me a tax through customs, especially if it gets shipped inside of Canada.
 
@ThePhD you should be good
 
I just need to make sure it gets shipped inside Canada.
 
but how are you getting that anon visa gift card
countries go after credit card companies for that shit yo
 
@ThePhD Order on Amazon.ca. Then it'll get shipped from Mississauga.
 
@EiyrioüvonKauyf Don't you worry your cute lil' head about it.
 
2:57 PM
(That's in Ontario, by the way)
 
@EtiennedeMartel Hoookay.
 
I want to eat french fries, but the french fries shop isn't open yet :(
 
Xeo
@EiyrioüvonKauyf ...
 
@StackedCrooked "French" Fries? Aren't you Belgian?
 
2:59 PM
@ThePhD :| send me one too kthx
 
Aren't you insulting yourself?
 
I'll test it by shipping something to myself.
 
So I've given puppy two job leads. Lets see if he does anything with them.
 
user784668
@Xeo …!
 

« first day (1020 days earlier)      last day (3921 days later) »