« first day (2200 days earlier)      last day (2751 days later) » 

7:00 PM
why not
 
@GManNickG They did put some logic work into how concept-based overloading works.
 
@Griwes I don't think anyone said concepts were type classes.
 
(I.e. which concept is more specialized than the other.)
 
Ell
@Griwes sometimes you'll make mistakes
 
If you're referring to me saying type classes, I was talking about the overarching idea
 
7:00 PM
1 min ago, by GManNickG
This is just type classes
 
Ell
What if you do "yeah I don't care, now let me compare for equality"
 
@Ell Then I'll debug those and be done.
What I really want is what I'm calling "implicit concepts".
 
Everyone wants to be able to code against interfaces instead of concrete types, this isn't new.
 
Basically I want the compiler to look "into the future", see what's being used on a variable of a deduced type, and tell me immediately that something doesn't work.
 
The only thing is, today you either write auto or write some concrete type. Yes, auto means the function can change in the future and nobody has to care
 
user1804599
7:01 PM
Functions with more general types are easier to write because there are fewer possible implementations of more general types.
 
Ell
@Griwes that's a bad name imo
 
I can't imagine I will ever use a lot of this concept-based auto thing.
 
Ell
As is "implicit typwclasses"
 
On the other hand, concrete types mean I don't need to do extra work figuring out what the type actually is.
 
@Ell It's implicitly specified!
 
7:02 PM
It's as if you should sometimes use auto and sometimes not.
Hey @JohannesSchaub-litb, we should give a name to that ^^^
 
@GManNickG I rarely care about the type.
 
@Griwes Are you a sentient brick wall
 
user1804599
hahahaha this guy being angry at his xbox takes his xbox and his wife asks:
 
@Ell not really
 
And frankly I rarely care about specifying the concept either.
 
7:03 PM
@Griwes Future readers of your code hate you
 
user1804599
"what are you doing?"
"I'm gonna run over it with my car!"
"but you don't have a drivers' license"
"I don't have a car either!"
 
@GManNickG No, it's obvious from the context what it is.
 
Ell
@GundolfGundelfinger I thought he meant something else :V
 
Feel free to go through my code and point out where the code is not clear enough.
 
@Ell you were wrong
 
7:03 PM
(It's all up on Github.)
 
@Griwes I really don't believe that. Context will of course defines some interface, but unless you comment or something (or call takesAVec(thething)), I don't know what the interface even is.
 
Has anyone ever considered the possibility that types could actually be part of the interface and not just some useless metadata that nobody is supposed to care about?
 
Also I expect the readers of my code to be similarly competent as I am.
I'm not going to write more code so it's easier to understand by future readers.
I write code that I'm sure I'll be able to understand in the future.
 
@Griwes Yes, assume this. Now, looking at auto x = getFoo(); x.act(), what interface is x even? What else can you do with it?
 
@Mysticial That would be groundbreaking
 
7:05 PM
alright
 
getFoo is a terrible name.
 
I am back from my holiday
 
@Griwes "I'm not going to write more code so it's easier to understand by future readers." Well that settles that then.
 
@GManNickG He'll blame it on you for bad naming.
 
so, getVector()
 
7:05 PM
Looks like I got ninja'ed.
 
is it std::vector or Vector2D
 
But it is a terrible name!
 
@GManNickG Your environment should do both of those things if it's not shit.
 
user1804599
Don't put get in front of it.
 
@milleniumbug What are you calling getVector() on?
 
7:06 PM
@Mysticial For fucks sake. okay, auto conn = getMySqlConnection(); conn.Sync()
 
user1804599
The return type already says that.
 
If it's a global, then it's a terrible name.
 
user1804599
Hungarian notation is stoopid.
 
lol
 
dunno, could be a member, could be a global
 
7:06 PM
@rightfold going even further than I dare go
 
(afk now)
 
@milleniumbug See, you're trying to prove a case where context information doesn't work, but you provide no context. :D
 
ok, so let's say it's a member
what now
 
A member of what?
 
@milleniumbug Mouse over call - environment pops up signature
 
Ell
7:09 PM
Pssh mouse
 
@Puppy What mouse?
 
Starship? Well, I'd expect that to be a Vector3D describing its movement, but really the name is still bad.
 
@GManNickG That's your problem right there.
 
@Puppy I'm SSH'd into a production server sometimes, why do I have a mouse.
 
@Puppy kek
 
7:09 PM
tbh lately I'm doing most of my C++ coding on Coliru
4
 
@GManNickG okay run your vim with proper plugins
 
if you're SSH'd into a production server why the holy fuck are you doing development there
 
@Puppy The white house has been hacked and I need the keys to the root
 
@Puppy that's how my last two jobs worked.
The desktop in front of us is just a portal to some shared server.
 
and if there's some unholy reason why you have to, then you sure as hell should only do so for code that you know very well
 
7:10 PM
As much as I want to, I can't actually build on my local box.
 
@Mysticial The key isn't that it's a portal, it's that you're portaled into a development server, not production server.
 
@GManNickG are you really writing C++ at that point though?
 
if you're doing development, it should be in a development environment, unsurprisingly
 
that's a strawman
(And yes, I mostly program in vim in a tmux session. And I truly have no problems with interfaces.)
(Sometimes I need a pane where the header with a type definition sits. But that's mostly when I'm doing aggregate init. So... that's one of the cases where I actually specify the type. lol)
 
if for some double unholy reason you have to develop code you've never seen before live in production, and that's a foreseeable need, you should just set up your production servers to properly support development
 
7:14 PM
The reason why IDE's don't work in our environment is because the code-base is spread out in to many repos with tightly controlled access privileges. The build process has a complicated step of resolving where to find the dependencies. So you can't just drag-drop the codebase into an IDE and call it a day.
I don't think it's impossible per se. But I don't think anyone has done it successfully.
 
Then... fire up vim.
 
that sounds to me like your environment is totally fucked up
 
Install YCM.
???
profit
 
nwp
@Mysticial why would you work in such a terrible environment?
 
Also this seems to be one of those rare instances where I agree with @Puppy, lol.
 
7:15 PM
@Puppy Nobody here denies that. And nobody dares to touch something that still works.
 
sure, but that's not the same thing
 
@nwp I don't have a choice?
 
You can quit
 
the problem with auto has nothing to do with auto at all.
 
7:16 PM
it's that your environment is fucked.
 
@Mysticial Are you saying that your workplace is the only place where you could possibly get a job?
 
if you say "Our environment is totally fucked and that's why auto doesn't work for us, although it works perfectly for anybody with a remotely sane environment", that's one thing
if you say "Auto is bad because in our environment it doesn't work" that's another.
 
@Griwes No. At Google, IDE's usually (but not always) worked for similar reasons. But I left google for other jobs that paid more.
 
paid more but had retarded dev envs, good choice
 
I probably should have posted this a while ago. I'm undoubtedly biases, but in this case, writing 50 lines (or so) together seems to cover the situation better than a few lines at a time in chat.
 
nwp
7:17 PM
@Mysticial doesn't seem to work very well when you frustrate programmers to do job that tools should be doing
 
18
A: Does auto make C++ code harder to understand?

Jerry CoffinIMO, you're looking at this pretty much in reverse. It's not a matter of auto leading to code that's unreadable or even less readable. It's a matter of (hoping that) having an explicit type for the return value will make up for the fact that it's (apparently) not clear what type would be returne...

 
in our workplace our application has some dependencies, but we just publish them as nuget packages
 
you picked money over sensible tooling, your problem, stop blaming auto
 
user1804599
▶ 🔘──────── 00:21
2
 
@Mysticial Ah yes, so you prefer working at a shithole that pays more.
Interesting.
 
7:18 PM
well I think that's a legitimate choice
but probably best not to infer whether or not things work in sane places because it doesn't work in a shithole
 
@Griwes Depends on how bad the shithole is. At this point, I've gotten over the rage of bad code. That doesn't mean I don't complain about it though. And it doesn't mean that it reduces my productivity.
 
@Mysticial So... it's now a case of the Stockholm syndrome.
Interesting.
 
user1804599
I need a project.
 
@Griwes lol
@Griwes My alternative was Java at Google.
 
7:20 PM
lol
There's like a gazillion places you can work at.
 
Based on what I've seen Google C++ is worse than finance C++.
 
user1804599
Finance Haskell and OCaml are reportedly great.
 
Especially when you hold the world record at pi and y digits (you do hold that still, right?).
@rightfold lol
 
@rightfold BUT EXPLICIT TYPE NAMES???
 
user1804599
Standard Chartered Bank and Jane Street Capital.
 
7:22 PM
@GundolfGundelfinger how dumb do you have to be not to use type inference in Haskell
 
user1804599
You can't not use type inference in Haskell.
 
user1804599
There is no choice.
 
rightfold missing the point as usual
 
lol
that was my point
tyvm
 
user1804599
(Unless you use that language extension that allows you to pass types explicitly.)
 
7:23 PM
well
some badlets write
main :: IO ()
 
user1804599
Top-level definitions should always have type signatures.
 
That's even worse than auto main() -> int. /cc @AndyProwl
 
auto main() -> int is the only way
 
@Griwes ew
 auto main()
     -> int
^ or bust
 
@Griwes That's part of how I ended up in finance in the first place. These guys like to poach people out of tech. But I'd pick shitty C++ over Java/Android any day.
 
7:26 PM
All I hear from the finance world screams "NEVER GET A JOB IN FINANCE".
 
@GundolfGundelfinger So are you still applying to our company? :)
 
Everything is broken
@Mysticial No
 
ahaha
 
Mine is significantly better faring tech wise
Vade retro mysticialtanas
 
7:28 PM
@Griwes Yeah. I head that a lot. I know a few guys in the industry who hate their jobs, but can't quit because they're making several million USD a year. One of them retired after a few years.
 
Also I tried to get them to disclose their tech stack, they refused, so I discontinued my application. @Mysticial
You don't want to tell me what tools you work with, fine. Get someone else.
 
Hey guys, I have a quick bikeshed question about making a kind of fancy bitmap / array literal.
@Griwes I hear that ALL the time as well. "Then why are you there?", I ask. Inertia and Money, they say.
 
@ThePhD I can answer it already: you're doing it wrong.
 
@GundolfGundelfinger qq
I want to be able to basically make like.
ASCII-art.
And then serialize that to a 2D array.
 
@ThePhD Meh, money.
 
7:30 PM
:<
Sob.
I'm trying to make something cute for this
 
qq
 
I was kidding :w
 
Oh.
... Gdi I don't want to format that again qq
 
.-.
You know you can see post edit history, right
 
7:32 PM
Oh, I totally can.
 
var arr : int[[]] = [{
  |   | ||| |   |   |||   |   | ||| ||| |   || ;
  |   | |   |   |   | |   |   | | | | | |   | |;
  ||||| ||  |   |   | |   | | | | | ||  |   | |;
  |   | |   |   |   | |   || || | | | | |   | |;
  |   | ||| ||| ||| |||   |   | ||| | | ||| || ;
}];
@GManNickG That is sort of neat.
I just want to bake it into my language.
In some kind of useful way.
Maybe I can have a string and then just have an algorithm that can run to change it into a bitmap...
Raw String + substitute, I guess.
 
@GundolfGundelfinger I have a feeling that might've been more of a test than actually denying disclosure. It's C++, everybody knows that.
 
@Mysticial I'm asking what version of C++ and compiler, this kind of thing.
C++ is basically saying "we use a programming language and computers".
 
It's a question you're more likely to get answered on an onsite interview than otherwise.
@GundolfGundelfinger Who did you ask? The HR person?
 
7:35 PM
Yeah
 
lol, I don't think they would know.
 
They said it's confidential so yeah uh
Must be g++9 with C++22
 
@Mysticial so... they should rely the question to the dev team. lol
 
I'm wary of companies who don't want to disclose their tech stack, it means it's likely not good
And you kind of confirmed it yourself :D
 
@GundolfGundelfinger lol. I think most of the finance firms are like that. The guys who know how to trade don't necessarily know C++.
 
7:39 PM
Worse: the guys who know C++ are bad at it
 
user1804599
Coproducts are great.
 
@GundolfGundelfinger And they don't even know C.
 
I need a symbol to define arts...
 
user1804599
What are arts?
 
Oh. Ascii Art.
I think I'm going to just include Raw String Literals.
That should get the job done.
... But now I have to worry about shit like dedent, don't I? ;;
 
7:44 PM
@ThePhD You could use operator whitespace
 
user1593881
Is it safe to assume that a byte on Windows and Ubuntu platforms IS 8 bits?
 
@RawN There is no byte type in C++
 
user1593881
the size of
 
user1593881
that is
 
@GundolfGundelfinger he didn't ask about the type
 
7:44 PM
@milleniumbug Then byte size is not a property of the OS, so the question is meaningless, hth
 
@RawN static_assert(CHAR_BIT == 8, "what a weird environment you have there");
 
user1593881
@milleniumbug Many thanks
 
user1593881
I was reading about the that CHAR_BIT but since I will not be leaving the Win and Ubuntu OS I thought I could assume it is always ==8
 
@GundolfGundelfinger A byte is (by definition) the amount of storage required for one [[un]signed] char.
 
is C++'s raw-string-literal syntax good?
 
7:49 PM
what do you mean by that
 
@ThePhD yes
 
Rust's is better IMO
 
Like
 
@JerryCoffin This is a counterpoint how? There is no byte type in C++. There is [[un]signed] char.
 
it's decent
 
7:49 PM
the
R"(STUFF
...
STUFF)"
 
@GundolfGundelfinger 7-bit ANSI
 
user1804599
Project X Haren was an event that started out as a public invitation to a birthday party by a girl on Facebook, but ended up as a gathering of thousands of youths causing riots on 21 September 2012 in the town of Haren, Groningen. The event was unprecedented in the Netherlands, but in June 2011, a German girl posted similar birthday invitations on the internet. Hundreds of mostly drunk youths gathered in Hamburg, Germany, causing a great deal of damage and rioting against the police. == Events before 21 SeptemberEdit == On 6 September 2012, a 15-year-old girl from Haren sent 78 friends a public...
 
user1804599
This was great.
 
@JerryCoffin oh come on, I thought at least you knew C++. :P
 
7:52 PM
shuuuuush
 
Whoa
I didn't think Rust would take such a hard line.
This is something every language "just lets slide".
 
@ThePhD str.chars().nth(idx)
 
user1804599
Rust wasn't designed by utter morons.
 
@rightfold Indeed
 
@набиячлэвэли I saw that.
Also, apparently Rust's strings are always multiline by default?
 
7:57 PM
@rightfold Indeed, it was designed by utter web hipsters.
 
Wouldnt be a problem if they did it the python way? Or idk.. @R.MartinhoFernandes thoughts?
 
@ThePhD But Rust is very clear on everything being UTF8
@ThePhD eh
 
user1804599
They did a very good job. :)
 
Like
let s = "foo
bar
baz";
It's just... multiline by default.
 
That'll be foo\nbar\baz
 
7:58 PM
That kind've makes sense.
 
You can remove leading ws and newlines, too!
 
How?
There's one that removes all whitespaces and newlines...?
 
let s = "foo\n\
         bar\
         baz";
assert_eq!(s, "foo\nbarbaz");
 
Ooh.
 
@ThePhD What do you mean "there's one"
 
7:59 PM
That's pretty clean.
I like that.
@набиячлэвэли I thought the `\` removed all whitespace ever, not that it was a specific escape sequence.
 
That'd be uselessly retarded
 
Nice.
Why aren't C++ strings multiline by default, again?
 
@набиячлэвэли ...how do I preserve the leading whitespace?
 
@Griwes Remove the \\
 
awful
don't do this
terrible
 
8:02 PM
Albeit. I want to know if there's a way to keep the \n but remove the tabbing?
 
never ship something like this
 
Like
 
what language is that
is it Rust
 
let s = "foo\
      bar\
      baz";
Rust
 
if it's Rust then I have more arguments to never use that language ever.
 
8:02 PM
I would like that to keep the tabs, maybe?
 
It 100% flips the meaning of a trailing `\`.
 
user1804599
Rust is very nice. :)
 
Is there a way to do that?
 
Terrible.
 
user1804599
lol tabs
 
8:03 PM
Never use this language.
 
@GundolfGundelfinger I don't think I said it was a counterpoint, merely a related fact (really wanted to turn the counterpoint into a link to Counterpoint Audio, but not only are they long dead and gone, but the successor company, Alta Vista Audio, has been gone for a few years as well now).
 
Oh. Maybe I can have D strings, which means "Dedent", and then regular strings which are multiline.
 
user1804599
@ThePhD If you want such large string literals, and you care exactly about whitespace, put the text in a file and use the include_str macro.
 
@Griwes Does this show a level of ignorance of C++?
 
I have a #import strings "file.txt" in my language already.
 
user1804599
8:04 PM
and stop bikeshedding
 
@JerryCoffin I was trolling ;,)
 
@Griwes Hmm...okay.
 
@rightfold ewww
sometimes you want to just embed it and that's fine
 
@Griwes If it was fine, it would be a single line. Being multi-line, it's obviously at least somewhat coarse.
 
	var arr : int[[]] = "\
|   | ||| |   |   |||   |   | ||| ||| |   ||
|   | |   |   |   | |   |   | | | | | |   | |
||||| ||  |   |   | |   | | | | | ||  |   | |
|   | |   |   |   | |   || || | | | | |   | |
|   | ||| ||| ||| |||   |   | ||| | | ||| || ";
There. I like this.
 
user1804599
Make those asterisks and go full '70s.
 
Bitmaps should just be initialized with strings like this, so I can make pretty ASCII art.
 
In case it wasnt posted
 
@JerryCoffin It's fine, since it's just 2D, extremely lacking any measurable depth.
 
@Borgleader Making fun of women in such a situation of stress and panic is yet another oppressive display of patriarchy. Thanks.
 
8:11 PM
@GundolfGundelfinger what verbibols did you set to get such a mistyepd sentence
 
@Borgleader This is a spicy top-notch quality shitpost
 
@rightfold You need to look more carefully at some of those. When I was in the Air Force, I knew a guy who wrote a program they decided to name ALS-1. As a tribute to a thoroughly despised (female) shop supervisor, it had a splash screen with the "A" formed of 'C's, "L" formed of 'u's, "S" formed of "n"s, and '1' formed out of 't's...
 
lol
is there any organization you haven't been a part of
 
@Griwes Most of what I've been part of was disorganizations (and the few that were organized were disfunctional enough to compensate for whatever organization they had).
 
Jerry is omnipresent.
 
8:14 PM
@ThePhD At my age, more of "omnipast".
 
SNRK.
Fuck my water is all over my jeans.
 
Congrats on the baby
 
@ThePhD Yes! I have accomplished something great today.
 
user1804599
lol people believe vaccinations cause autism
 
not unreasonable when those studies were published, but they've been so firmly debunked by now
 
8:24 PM
@ThePhD I really like that.
I should write something in Rust sometime.
 
user1804599
Rust is great.
 
@Puppy Even when the studies were first published they were pretty shaky, at least IMO. The main one was based on a number of children who showed symptoms of "regressive autism" around the same time as they received scheduled MMR vaccines. Problem is they looked at things backwards: yes, some children showed symptoms following vaccination, but so do children the same age who don't get vaccinated--and anybody who'd taken even one statistics class would have spotted the problem immediately.
You could just as well try to claim that breathing or drinking water caused autism--it's certainly likely that all the children showing symptoms had done both of those as well.
 
@JerryCoffin So they started with a conclusion (vaccines cause autism) and worked backward towards an hypothesis?
 
@EtiennedeMartel More or less. Or looking at it from a slightly different viewpoint, they decided that correlation implied causation.
 
@JerryCoffin Sounds like grade A science right there.
 
8:37 PM
@rightfold People also believe Earth is flat. People are stupid.
 
user1804599
Eh, the Earth is flat.
 
It's flat for a sufficiently small definition of flat.
 
@EtiennedeMartel There's a lot of it around. Quite a bit is also driven by data that's probably misleading, such as increased rates at which children are diagnosed with autism. I've personally seen a fair amount of change here. When I was in school, I had a classmate for a couple of years who I'm sure would now be diagnosed with autism or Asperger's syndrome--but back then he was just "a little strange", "didn't play well with others", and so on.
 
@JerryCoffin I know a guy whose kid was recently diagnosed with autism. He is now pretty sure that he is autistic as well.
 
Don't get me wrong. I'm not saying it was good that back then he was (to at least some extent) blamed for what was almost certainly a condition over which he had no control. It's not clear to me, however, that the rising rate of diagnosis means anything about the actual rate of occurrence.
 
8:45 PM
Autism (and to some extent, ADD and ADHD) is interesting to me because to some extent it seems to just be describing the ways that some people are different from other people as a "disorder." I'm not sure that's helpful. Maybe it is--it means some things are more challenging for these people. But in some cases I'm not sure those things should be a requirement for life. It depends on the thing.
Trivial example: sitting still is largely overrated, but people who have a hard time sitting still may be diagnosed with ADD.
 
@caps Certainly possible--although it's a little hard to trace in specific cases, on a statistical level, there's little real question that even if autism itself isn't hereditary, at least a propensity toward it is.
 
@JerryCoffin It's not just that his son has it--in reading the "symptoms" he sees a lot of himself and the things that he struggled with as a kid.
 
@caps The problem with autism is that it can be a real disability because of how much value we place on social interactions, and how autism can interfere with a person's ability to interact with others.
 
@caps The point is, there are some things, like fidgeting, that should be more socially acceptable, rather than saying that someone who fidgets has a disorder.
 
@caps I've said for years that I think it borders on outright cruelty to take children around 5 years old or so whose primary occupations in life are: 1) get dirty, 2) move around, and 3) make noise, and force them to stay clean, sit still, and be quiet (but I think schools now are a lot less problematic this way than they were when I was a kid).
@caps Fundamentally, our society still has an attitude left over from the industrial revolution where we basically assume there are a few specific jobs with similar characteristics and requirements, and we try to push everybody to fit those requirements rather than find ways of letting them express their real strengths (fortunately, at least within some limits, programming jobs tend to be better in this regard than many others).
 
8:55 PM
@EtiennedeMartel You're not wrong.
 
@JerryCoffin And schools are probably the worst at it.
 
@JerryCoffin I think the programming industry has been getting worse at this. See: coding tests becoming a requirement of a job interview.
 
@JerryCoffin To be fair, schools are that way because of a general lack of funding. Forcing all kids into a standardized production chain is the cheapest way to "teach" them.
 
Believe it or not, "passing tests" or even "writing code in front of people who will determine whether or not you get a job" are not always on the list of strengths of a good programmer.
@EtiennedeMartel BS. Schools are that way because they haven't gotten out of the mindset.
 
Its also cheaper.
 
8:57 PM
@Borgleader I'm not even sure its cheaper.
 
When a single teacher has to oversee a class of 40 kids and teach them all kinds of subjects in a short time, you get that kind of result.
 
@caps The coding tests are there at the very least to weed out the worst candidates. Most coding tests aren't difficult. And when they are, they won't exclude you. That said, some of the interviews that I've had did have the "do or die" coding test that is really difficult.
 
There just isn't enough time in the day, and enough people doing the teaching, to account for all the different personalities of everyone.
 
I'm liking these new school models where kids learn what they want and the teacher is just there to be a catalyst of sorts.
 
@Mysticial That's not the point. Some people are bad at tests no matter how easy they are.
 
8:58 PM
So you just shove material in their face and hope they get a least a half-decent grasp of it.
 
@caps Well, there's a point where if the candidate can't write a working for-loop in C++ for a job in C++.
 
@EtiennedeMartel I'd agree to the extent that they've decided to do it based on a perception that it saves money. I'm not nearly as convinced that it really works out that way though. The old one-room schoolhouses produced good results in return for (typically) a smaller investment.
 
@EtiennedeMartel If you gave, for instance, American Public Schools four times as much money, they wouldn't suddenly stop doing all the factory-education methods they've always done.
 

« first day (2200 days earlier)      last day (2751 days later) »