« first day (1656 days earlier)      last day (3291 days later) » 

user1804599
6:00 PM
lol the guy grabs a wasp nest
 
user1804599
how stupid can one be
 
user1804599
VSCode isn't Vim so it's shit.
 
Ven
you just rightfold'd
 
user1804599
rightfold is great.
 
> After that, C++20 will be there to “complete C++17” just as C++14 completed C++11
ugh
 
Ven
6:12 PM
are you not entertained
 
You probably should've started your homework sooner. — ceejayoz 2 mins ago
amen
 
user1804599
Well, I just watched a Farage speech, so I am now.
 
user1804599
> Dart Developer Summit - Day Two
 
user1804599
TIL Dart is still a thing.
 
6:28 PM
@rightfold I didn't know Eric still cared about FP, I thought he jumped aboard the side effect train?
 
Hmm, what's the prefered way to have a lambda call itself?
 
user1804599
@fredoverflow Scala is not functional according to Eric.
 
user1804599
His definition of functional programming disallows side-effects.
 
user1804599
@EtiennedeMartel In which programming language
 
C++, of course.
 
user1804599
6:30 PM
In APL, just use .
 
Ven
Y combinator
@rightfold :(
 
user1804599
@EtiennedeMartel Make a polylambda and partially apply it with std::bind.
 
There's still no way to compile all .cpp files in a src/ (and subdirectories) with a single makefile rule, right?
Like something like src/*.cpp but that actually works
 
user1804599
What? Of course there is.
 
user1804599
clang++ `zsh -c 'echo src/**/*.cpp'` -std=c++1z -W{all,extra,error,pedantic}
 
6:35 PM
src/*.cpp only compiles files in the src/ directory. Not in subdirectories.
 
user1804599
That's because src/*.cpp is a non-recursive glob.
 
@EtiennedeMartel IMO, the simplest way is usually to just not use a lambda if it's going to be recursive.
 
user1804599
src/**/*.cpp is recursive, but only supported by superior glob implementations (lol when did you last need a non-recursive glob where a recursive glob wouldn't have worked).
 
@rightfold Roughly 15 minutes ago.
 
1 hour ago, by Mgetz
Well this is new Microsoft just launched a new free IDE... that runs on linux and mac
 
Ven
6:38 PM
@Mgetz whoops :-)
 
src/**/*.cpp breaks everything lol
 
user1804599
Don't use fucking makefiles.
 
It's not like ninja is any less complex
 
user1804599
Use your favourite programming language to generate a Ninja build file.
 
@rightfold I think Dotty will have an effect system based on implicit capability parameters or something.
 
user1804599
6:41 PM
What is Dotty?
 
Scala's successor
 
user1804599
Oh.
 
user1804599
That'd be terrible.
 
It's still in research phase.
 
@fredoverflow does it have nicer syntax?
 
user1804599
6:43 PM
> Research platform for new language concepts and compiler technologies for Scala.
 
@ScarletAmaranth What do you dislike about Scala's syntax?
 
@fredoverflow too paranthesis-ey and 2 space indents; also if you like "effects", look at Idris or "Eff"
 
It's not like you can't use 4 spaces per indentation level in Scala if you want do.
It's just not customary.
 
Ven
@rightfold lol the code is even worse than scalac
 
@fredoverflow I only really have problems with two parts: 1) having to type in the syntax, and 2) having to figure out what I want to type in. If we could get away from those two parts, I think it'd be much easier to use.
 
Ven
6:44 PM
okay I lied but it's still terrible
 
user1804599
What's terrible about Scala's syntax is that it's not context-free.
 
user1804599
@ScarletAmaranth Nok ftw.
 
@rightfold well, it's just weakly context-sensitive; you can enhance a "regular" LR bottom-up parser to parse it
 
@JerryCoffin 2) Isn't really a syntax problem.
@rightfold I bet Mill is context-free ;)
 
user1804599
Yes, of course.
 
6:46 PM
bitch please; I can still write a context-sensitive grammar for a CFL :P
@rightfold wtf is nok; I can't seem to be able to google it
 
user1804599
I should implement semicolon insertion.
 
user1804599
func fib(n: Z): Z {
    if n lt 2 {
        n;
    } else {
        fib(n - 1) + fib(n - 2);
    };
}
 
user1804599
}; is super ugly.
 
it seems that if a post reaches +50 likes it automatically gets posted on SO facebook account. We might upvote a crappy post to have that posted wide
 
SO is on facebook? Why?
 
user1804599
6:49 PM
Because that increases revenue.
 
Open bottle of wine I've been looking forward to, it's corked :(
 
user1804599
@ScarletAmaranth another one of my projects that are probably abandoned.
 
> Arsebucks coffee
 
visibility I suppose
 
user1804599
6:54 PM
 
Ahh, I kid LRiO
 
@Columbo Weakling.
 
@EtiennedeMartel ?
 
Ven
7:00 PM
@Columbo hey that's rude
 
@Columbo I'm not French either, if that's what you were implying.
 
@EtiennedeMartel It's not. I just randomly hated on the french.
 
So original.
 
Ven
@Columbo why
 
I don't want to drink wine all day long, depressively gazing into the distance and smoke
 
7:02 PM
bye, Columbo.
 
!?!
 
> This user has been automatically suspended for posting inappropriate content and cannot chat for 29 minutes.
 
user1804599
> This user has been automatically suspended for posting inappropriate content and cannot chat for 29 minutes.
 
mehehehe that was easy
 
I just randomly banned someone
 
user1804599
7:03 PM
nice
 
right pub time cya later
 
user1804599
I was just too late to approve flags.
 
hi bye Bolty
 
user1804599
@BoltClock Can you ban yourself?
 
That was fast as shit.
 
7:04 PM
I saw it hit 14 on the flag count and was deleted when I opened it.
 
Ven
the french got revenge :o)
 
And then I came in here to party
I mean, to check things out
:P
 
hi Travis
 
Hi @Johan :)
I see you have moved closer to the hardware. Next you will be in the asm channel :D
 
user1804599
Are you the continuous integration software?
 
7:06 PM
@TravisJ I don't write any c++, I'm just a tourist here. Watching the guys suffer :)
 
haha
Anyway, seems like everything is fine in here. Got kind of quiet after BoltClock banned himself.
farewell C++! <3
 
wait, did something get flagged?
 
@TravisJ eh... this could easily be the perl or haskell channel half the time
 
a, columbo
 
@TravisJ What is C++?
 
7:12 PM
@fredoverflow It's a nickname for this new language
@fredoverflow C++--++
 
@JohanLarsson Did you bring your camera for sightseeing?
I recommend a visit to the ancient templates of doom.
 
> So here is my top-ten list for C++17:
 
@EtiennedeMartel What is the speed of shit?
 
(follows a list with two "co-routines" item)
 
@JerryCoffin Faster than the speed of heat.
 
7:21 PM
@EtiennedeMartel So by the time the shit hits the fan, it has outrun its own heat, so hot shit would be the opposite of shit that has hit the fan. Wow, I'm finally starting to understand this shit!
 
The best way to convert C++ to assembler is to use a C++ compiler. — The Paramagnetic Croissant 2 mins ago
 
not sure for now
 
Ven
@Mgetz perl? cmon
 
@fredoverflow He is, of course, completely wrong. A compiler converts C++ to assembly language. An assembler is (of course) a program that converts assembly language to machine code (cf. "compiler"). And yes, I am specifically saying that decades of IBM manuals talking about (for one example) "Basic Assembler Language" are all wrong.
 
50 more upvotes on Python answers and I have a Python gold badge!
 
7:24 PM
@Ven Where @rightfold goes... perl will surely follow
 
@orlp If you show me an interesting enough post I might upvote you..
 
Ven
@Mgetz she hates p6 now though. and you're probably including awk!
 
@MarcoA. lol
wanna know what my top voted Python answer is?
this piece of crap:
55
A: Check if something is not in a list in Python

orlpThe bug is probably somewhere else in your code, because it should work fine: >>> 3 not in [2, 3, 4] False >>> 3 not in [4, 5, 6] True Or with tuples: >>> (2, 3) not in [(2, 3), (5, 6), (9, 1)] False >>> (2, 3) not in [(2, 7), (7, 3), "hi"] True

 
well, it is indeed true
so have a +1 good sir
 
user1804599
@Mgetz I'm in #perl and #haskell-blah!
 
7:31 PM
> Bad (committee) habits to avoid, to avoid giving critics more ammunition:
> Chase “current fashion” and push for features from other popular languages without
considering their impact on C++ programming styles or interactions with existing C++ facilities
 
> A major motivator for Herb (though not for Bjarnee) is to encourage the use of x.f(y) to make “intellisence” more effective
meh
they don't have to change the language to improve intellisense
 
@AndyProwl Outsourcing work for free is good business sense.
 
@LucDanton Why outsourcing?
 
@AndyProwl /agreed
 
I mean, I'm not against UFCS
it's just that the motivation up there is dumb
 
7:35 PM
what if C++ were to be "adjusted" to fit MSVC's will?
 
@AndyProwl Presumably it’s not Microsoft devs that will work on the details.
 
received a $57 gift card on Amazon, suggestions? I already want to send some of that sum to the Red Cross (Nepal)
I would have preferred Emergency, but it seems I can't through Amazon
oh well, it's probably not much of a difference
 
user1804599
@orlp lol only 55 upvotes, noob
 
Xeo
@LightningRacisinObrit :D
It was just so... fitting, y'know?
Now, how large are those bags?
 
user1804599
At my job I work with bags with millions of items in them.
 
7:47 PM
@Columbo, every type has at least, a default constructor. — Francisco Aguilera 58 secs ago
He's got a point
 
user1804599
struct a {
    a() = delete;
};
 
whoops, my follow-up comment was not quite right.
@rightfold How is that related
 
user1804599
It's a type that has no default constructor.
 
inb4 language lawyering
"it's a type that has a default constructor, but it is deleted!"
and that sort of things
I'm off to bed
 
@rightfold That's ... wrong. a has a default constructor, and it's even defined. It's just defined as deleted.
 
7:50 PM
@Columbo The entire question is "unclear what you're asking"
I almost answered it, but then I realised it would be a waste of time anyway.
 
The best way to convert C++ to assembler is to use a C++ compiler. — The Paramagnetic Croissant 36 mins ago
lol'ed
 
Wow, just found Boost.Align.
 
@Borgleader Repost.
36 mins ago, by fredoverflow
The best way to convert C++ to assembler is to use a C++ compiler. — The Paramagnetic Croissant 2 mins ago
 
@rubenvb oh, neat, i might have use for this
@JerryCoffin D: im getting slow
 
@Borgleader And it's still wrong anyway.
...but other than that, how was the play Mrs. Lincoln?
 
7:59 PM
I answered it. Well.
@Xeo about the size of a pint glass I guess. Big.
Two pint-glass-sized bags of edible dicks.
 
@LightningRacisinObrit Your score says -1
 
inb4 flag. dont care tho
@Columbo Very mature.
 
@LightningRacisinObrit I haven't downvoted you.
I just checked.
 
Xeo
@LightningRacisinObrit Good.
 
@LightningRacisinObrit By the way, talking about the existence of objects is kinda pointless, since objects are regions of storage. You should be talking about lifetime.
 
8:02 PM
The question is horrible anyway.
 
@Columbo Right, but a region of 16 chars is not 4 int objects, until you placement new over it. Type is a thing.
 
user1804599
> Use := to assign to the memory location of a pointer type. Note that the C-like syntax *p = e is valid, but really means *(p = e).
 
user1804599
lol
 
So it's really not "pointless" at all. The "object" that is the memory buffer is well within its lifetime.
 
8:04 PM
@rightfold lolwut. Sounds terrible.
 
It's just the wrong object.
@rightfold eh
 
mfw when I see something funny
 
@LightningRacisinObrit A region of 16 consecutively arranged char objects in memory is, in fact, also a region of four int objects. I can't see the problem with that statement right away. (It may be wrong, but I'll have to check some DRs and papers.)
There is an interesting one from Dos Reis concerning similar issues.
 
But alignment and stuff
 
ups
Well, provided the storage is suitably aligned, of course.
 
8:06 PM
@milleniumbug there's no alignment inside an array
 
That wasn't LRiOs point.
 
total bullshit @Co, and the heart of the problem
just shush :)
i gtg
 
@rightfold I have a mutable mess.
 
@orlp What
 
Still feel pretty good :)
 
8:07 PM
@LightningRacisinObrit I think you haven't read enough DRs on this matter.
Also, immediately going into "this is BS" mode just shows how you have no further arguments.
 
user1804599
@JohanLarsson make everything immutable and try again.
 
@milleniumbug if you have an array of type T a[something], then for every nonnegative i < something it's guaranteed that reinterpret_cast<const char*>(a + i) + sizeof(T) == reinterpret_cast<const char*>(a + i + 1).
 
@rightfold things are so messy I can't even catch things in tests :)
 
user1804599
delete & start over
 
in other words, arrays are contiguous, and have no alignment inside of them
 
8:10 PM
@orlp Array objects do have alignment.
 
@Columbo but not inside of them
 
@orlp .. if that makes sense.
Their elements have alignment.
 
no
the standard doesn't guarantee that
if the alignment isn't a divisor of sizeof(T)
 
@orlp Yes, but that's not the scenario that was described.
In fact, it's the inverse statement.
 
@Columbo No, divisor
consider a T of size 4, but alignment 8.
The second element in T[2] will not be aligned.
 
8:11 PM
I misread, sry
 
@LightningRacisinObrit But given aligned storage of enough size, I think one can assign an int to the memory, even without placement new?
Because it's trivially constructible.
 
@orlp Well, the standard is probably underspecified wrt alignment anyway.
 
@Xeo I think I might reconsider my date for the unconference. I don't have many spare holidays and it seems most people are gonna be there around the weekend of the 12th - 14th. (Are you still planning for 7th until 16th?)
 
one thing to keep in mind in C++ is that types aren't aligned
storage (e.g. a variable) is aligned
 
@orlp I should have said "Their elements have alignment requirements." Every object type has alignment requirements.
 
8:13 PM
@Columbo it's more a suggestion really
 
If those are meetable is a different quesiton.
 
the 'requirement' in 'alignment requirement' means that any variable will have that alignment
 
@orlp ...yeah, because sizeof(foo) includes the alignment requirements?
 
but it doesn't mean that the type is guaranteed to be stored in a memory location that fulfills that requirement
see the array example for that
 
@orlp It will be, because sizeof includes alignment!
 
8:15 PM
@orlp Consider §3.11/12 though:
> The alignment required for a type might be different when it is used as the type of a complete object and when it is used as the type of a subobject.
The alignment requirement for T as a complete object might be 8, but as a subobject (<= array element) might only be 4
 
this whole conversation is totally pointless
vectors memory belongs to vector
end of
 
@LightningRacisinObrit Actually, I was wrong. The correct statement would be that you can reuse the storage by taking some aligned part of that storage and assigning it an int object via reinterpret_cast, at which point the array objects lifetime will have ended.
But the int object only started "existing" after the assignment.
 
The array stopped existing, but the rest of the storage is still there.
 
@milleniumbug The array object is not alive anymore, no.
> A program may end the lifetime of any object by reusing the storage which the object occupies or by explicitly
calling the destructor for an object of a class type with a non-trivial destructor.
 
@orlp At least for now, C++ simply doesn't support types that require "over-alignment" (i.e., in which the type's alignment is greater than its size).
 
8:28 PM
@JerryCoffin Why not?
 
@JerryCoffin that doesn't matter
@JerryCoffin An object with alignment requirement 3 and sizeof() 4 still won't be aligned properly inside arrays
 
@Columbo Because for any type T, you can define an array of T, and the storage in the array must be contiguous. You're not allowed to insert padding between the items.
 
@JerryCoffin Maybe the "Dear robot" pinned message should be unpinned.
 
13 mins ago, by Columbo
@orlp Consider §3.11/12 though:
 
Thanks
 
8:29 PM
@orlp Yes, that's not the only prohibition.
 
If I have a class, say "SoundBuffer", and only the classes "AssetManager" and SoundPlayer are supposed to own instances of that class. Would it be a good idea to let "SoundBuffer" have a private constructor and friend the classes the is going to use it?
 
user1804599
no
 
Why?
 
user1804599
delete all your code
 
:)
I mean I could just let it have a public constructor, but I thought why not encapsulate it more if possible
 
8:31 PM
@HalfEvil lol "Manager". You fail at naming.
 
Well it's not the real name just an example of a class that might want to use a SoundBuffer class
Anyway why would it be a bad idea?
 
@Columbo Yes, the array object doesn't exist. But I can reuse the rest of the memory though.
 
Yes, of course.
 
@milleniumbug btw why would AssetManager be a bad name?
 
@HalfEvil Reply arrows, use them
 
8:34 PM
Oh didn't know
 
@HalfEvil First of all, it's "Asset", but more importantly, it's "Manager"
 
@HalfEvil Yes, probably. Either the class is owned by exactly one other class (in which case it should be nested inside the owning class) or else it's not (in which case it should be public). The point of nesting a class (for example) is generally to simplify it because the owning class already knows about its internals. If that's spread across more than one other class, you pretty much need to have it enforce its own invariants, and anybody who needs it might as well use it.
 
But seriously though,
 
Manager doesn't tell anything about what does the class do to the assets.
 
8:35 PM
@HalfEvil "Manager" tends to indicate a class with poorly defined (and often multiple) responsibilities.
 
@milleniumbug "Asset" is a fine name for a resource.
The problem lies in "manager".
 
@HalfEvil Yes, Java has some design problems.
 
Would you consider "Context" to be better?
 
Also, it's a SRP violation. Typically, an "AssetManager" handles both the loading/disposing of a resource, and the caching of that resource.
@HalfEvil Same problem. "Context" is a pretty vague term for "some sort of semi-global state".
 
Does it cache assets? Does it store assets? Does it create assets?
You don't know.
 
8:39 PM
@EtiennedeMartel I think context can be a little better under at least some circumstances--for example, a processor context object that contains the current registers (etc.) for a thread has a pretty clearly defined (and well known, at least among OS designers) meaning. That's not to say it's perfect by any means, but at least a little smaller of a red flag (at least in my mind).
 
@HalfEvil Android being horrible, usual stuff.
 
But if you have a class that holds a reference to a fontHolder, a musicPlayer, a textureHolder etc what would be a better name? The usual I see is Context but I always think that is very unclear. Thought a name like AssetManager would be better.
 
@HalfEvil Again. What does your asset manager do?
 
@HalfEvil Naming things is hard.
 
What does "manage" mean in that context?
 
8:42 PM
@JerryCoffin It was nested to begin with haha but had to use it elsewhere too. Guess you're right, probably should make it public
 
@HalfEvil The question is what it does with that stuff. Is it just a heterogeneous collection, or does it to caching/dependency injection/creation/desstruction, or what?
 
anyone tried out the visual studio thing for linux
 
user1804599
TypeScript has a really horrible type system.
 
@JerryCoffin It's just a holder for a bunch of ResourceHolders of different kindes, as I'd rather just pass one argument instead of 20 to each state
 
@HalfEvil In that case it sounds more like a ResourceCollection or possibly ResourceSet (the latter more applicable in my mind if it enforces something like "must contain precisely one of each of the following types of resources").
 
8:47 PM
man this is so strange
its really more of a text editor
 
@Prismatic you didn't hear?
 
YATE
 
@Cinch didn't hear what
 
Yet Another Text Editor :)
 
@Prismatic ...and that's exactly what the world needed!
 
8:48 PM
@Prismatic It's not a studio, it's more of an editor
 
'studio', you mean IDE?
 
@JerryCoffin Yeah but if it might hold a musicPlayer to latter on a name with Resource in it would sounds kinda strange (as music is streamed not loaded)
 
hmmm I wonder what it uses for UI
 
What teh fuck
 
CEF
 
8:49 PM
Another program that installs to AppData. Fuck off.
 
I'll stick to Geany
 
Xeo
@StackedCrooked Actually my plans have gotten somewhat jumbled around since I got my kitty
 
I'm not even gonna look at it
 
@HalfEvil I still think the collection is just a collection (and in this case, one of the resources would be a StreamingProxy, or something similar).
 
Xeo
Guess I could get my friend to look after her, but that also means my stay won't be as long as I originally planned
 
8:51 PM
Ah. But you're still going, that's good :P
 
@Xeo Dogs chew up shoes. Cats chew up your life.
 
What genius thought it was a good idea to not let me decide where to install this program.
 
Xeo
@StackedCrooked I hope!
 
Yeah you might be right. Should probably change it to that or think of some better name.

But back to the use of friend, why is it considered bad? Hard to follow the code?
 
Xeo
Actually getting to London is still going to be unfun, though.
Because the cheap train prices mean a long stay
 
8:53 PM
Atom does the same thing. I see a pattern there.
 
Xeo
while a short stay is almost not worth it with the high prices. :/
(and bad timings)
 
Buy no figurines for a month and you should be fine :P
Actually, I don't really consider money to be an issue. I wouldn't mind spending up to 1000 EUR on this trip. Because if it wouldn't be worth it, then I wouldn't go :)
 
Hello from Nijmegen!
 

« first day (1656 days earlier)      last day (3291 days later) »