« first day (1606 days earlier)      last day (3568 days later) » 

10:00
Also I have a fair chance of becoming an assistant instructor for ScriptCraft in Javascript
@Xeo what the fuck
Personally, I used to use !list.isempty() but after having difficulty debugging my code by missing that pesky little exclamation mark quite a few times, I've reverted to list.isEmpty() == false, although I'm still torn on whether to use list.isEmpty() or try to be consistent and use the redundant list.isEmpty() == trueNick Cook 20 mins ago
work is shit before deadlines
@sehe ...I don't understand
And people get it wrong too:
Boolean isEmpty = strings.size() > 1; ? — Pål GD 7 hours ago
10:02
Is there a problem there? O.O
@Cinch chop chop, study is waiting
@sehe I am taking notes, good sir
@sehe wat :/
@sehe I think that's a fair argument.
There is some truth to that. However, if you say !v.isEmpty() should be v.isEmpty == false I'd suggest that v.size() > 0 is equally good :/
Xeo
Xeo
10:06
not v.isEmpty(), problem solved!
@R.MartinhoFernandes Is why I posted it :) I think that Cat or Xeo recently made this point in chat. Like, a month ago
Xeo
Xeo
ye
@Xeo Ah, it was probably you. And yes, named logical operators are the thing to use there. In C++
if only there was a programming language that allowed you to easily place inline comments where they made the most sense
i.e. v.is<<NOT>>empty()
or something less ugly
Stop abusing comments to "magically" make code more readable
10:08
@sehe Isn't that the point?
It isn't.
@thecoshman I got mixed up trying to think of an example, so I thought I could read back some of the transcript to remind me of how it works. In doing so I found the following though:
Write readable code in the first place.
7
A: Direct vs uniform initialization in std::allocator

Luc DantonI don't know what the SC considered, but keep in mind that uniform initialization doesn't really 'work' in generic contexts (barring value construction*). Consider this attempt: template<typename T, typename... Args> T make(Args&&... args) { return T { std::forward<Args>(args)... }; } You ...

Document magic places.
10:08
Point of comments is to make obvious what isn't
Alright, new argument:
Clearer, more concise languages are better than obscure languages with documentation?
Xeo
Xeo
conciseness doesn't imply clarity
Is it better to separate understanding into implementation and code and documentation with clarity or to combne clarity into the implementation?
Are you high?
user1804599
aaaaaaaaaaaaa
10:09
@Cinch Yes. Note the "abusing" part. I'm going to repeat: /cc @Griwes
> Wrap(int n = 0) : num(n) {} //ctor
~Wrap() {} //dtor
It's crap. It adds noise. Making the obvious patterns harder to read
user1804599
what moron thought it was a good idea to have a repository class with a DB field
@LucDanton reading :)
user1804599
this is as flexible as a pile of poop
@sehe This is crap code for crap testing
@Cinch That's either a straw man or a false dichotomy, I can't decide.
10:10
@Griwes It is at least a false dichotomy.
I mean clearly having clearer languages with better syntax is desirable for a large amount of peopl
yet having clear implementation is also desirable
But clarity in method and clarity in thought?
The two shouldn't be mutally exclusive
Define "better syntax".
@Cinch That makes no sense.
Absolutely zero sense.
10:12
@R.MartinhoFernandes aka it's 12:12 am and I have no business writing nice code if it's a one-off thing that will never get used for any purpose besides my own curiosity
If it's some quick and dirty throwaway thing, you don't want to waste time writing destructors that do nothing and that need not be there because they're generated automatically.
@R.MartinhoFernandes it's to remind me of the different basic class-like construct functions
in my mind at least, that's how i categorize them
@Cinch Still makes no sense. There's a difference between not making an effort to write nice code, and making an effort to write poor code.
user1804599
Now I have to make the DB field a getter for a thread-local and provide a context manager to temporarily change it because some idiot thought it was a good idea to not use parameters.
@R.MartinhoFernandes It's how I study.
10:14
@Cinch Still nonsensical! If that's the point, it's failing: it didn't remind you of the other important ones, namely the copy constructor and the copy assignment operator.
@R.MartinhoFernandes ugh.
> thread-local
What language
Btw why is Foo(Foo f) an infinite loop?
user1804599
@Pris Python.
The worst part is that soon enough that kind of code will make things break because adding the destructor will inhibit the generation of the copy members (and it already inhibits the generation of the move members)
10:15
PROBABLY NOT C++ BECAUSE POOR THREAD LOCAL SUPPORT >:[
There truly is no reason to write that sort of thing and you should let go of that bad habit. It's all it is, a bad habit.
@Pris C++11 has thread_local keyword.
@Cinch Because you need to make a copy to pass by value.
@wilx Good thing its well supported by compilers eh
@R.MartinhoFernandes ellaborate?
10:17
Which part?
"You need to make a copy to pass by value"
I don't
I can't
@Pris Both recent GCC and Clang do support it AFAIK.
@wilx recent clang requires libgcc to support it. I think msvc has partial support
user1804599
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user1804599
python thread locals don't have any way to have them copied to child threads
10:22
This chat brought to you by the letter "A"
@Cinch I don't see how that explains craptastic comments. Isn't it easier to /not/ type those even in crap testing code?
@R.MartinhoFernandes ah. you already said that
@sehe ugh i already removed it
@Cinch "special members". Also: don't gratuitously add them because that suppresses compiler-generated ones as a side-effect
@Cinch Good!
@Cinch clarity in thought seems to be not applicable here
@sehe I'm talking about languages not my shit code
@sehe If you want to see better code go to my GibHub.
enjoy
10:29
Stop linking your shit here
god
@ParkYoung-Bae Actually can you?
fucking Git
@Nooble what
fucking git-fat
fucking assets
@Cinch that's a fair defense. However, you'll still get the same response from tutors - because of the valid reasons you have seen. And you should be happy that you do, because otherwise you wouldn't learn. Cf.
40 mins ago, by Cinch
@thecoshman yes, I am writing a tutorial for myself and fellow beginners
user1804599
10:31
> .h
fucking other languages than english
@Cinch I know. I was jokingly referring to your shit logic, though.
@BartekBanachewicz shut up
@sehe Cf?
10:32
@Griwes Did I not say shitty++?
I said it was only +1 better
The abbreviation cf. derives from the Latin word confer, while in English it is commonly read as "compare". The abbreviation advises readers to consult other material, usually for the purpose of drawing a contrast. Such abbreviations appear most frequently in scholarly contexts such as in academic articles, mainly in humanities, physics, chemistry, and open nomenclature biology. They also appear widely in texts dealing with topics in philology, or in economic or legal writing. == Use == The abbreviation cf. is used in essays, theses, technical books, law review articles, legal opinions, a...
@раĐčŃ‚Ń„ĐŸĐ»ĐŽ LOL
@Griwes Ugh now you're tempting me to go through my other stuff
....
10:34
afi
user1804599
tower of hanoi is the most boring problem ever.
@раĐčŃ‚Ń„ĐŸĐ»ĐŽ It can be until you're forced to ignore recursion
then it gets harder...
By about 5%
And then you realize that you're still a bad programmer
user1804599
lol jon skeet
user1804599
This evening it's time to implement runtime contract checks in Mill.
Oh my god I didn't remove system("clear") fuck.
10:38
plonk
user1804599
Inferring ill-typed expressions as the bottom type is nice, since if 42(42) will result in only one warning "non-subroutine called" instead of two "non-subroutine called" and "non-Boolean condition" since the bottom type is a subtype of the Boolean type.
Are you a bottom type
user1804599
No cockment.
@ParkYoung-Bae I have a feeling you're a top type
Good thing I'm versatile.
> versatile Human Cinch; //I'm up for grabs, boys
@ParkYoung-Bae You can’t know until it’s too late!
10:41
@Cinch that's what she said, in a disappointed voice
@sehe Good thing my d grow about 500%
from < 1 inch
@ParkYoung-Bae suck Lee blur!
user1804599
The only thing I don't yet do is inferring ill-typed block expressions as the bottom type if any but the last expression in it is ill-typed.
user1804599
But that should be easy to implement.
user1804599
Although gotos make it difficulter. Maybe I should analyse SSA instead of AST.
10:44
@LucDanton so if we look just these few lines would you say that using UI was bad?
Both CubeCoord and Cube are POD... so trivial to initialise... with well known types...
user1804599
yummy
user1804599
doughnuts
I think my usage of UI there is fine...
@раĐčŃ‚Ń„ĐŸĐ»ĐŽ jelly
@thecoshman Looks fine to me.
inb4 no, iced
10:46
@thecoshman UI as "Uniform Initialization"?
@thecoshman You don’t have a choice: you have to initialize aggregates with braces.
Could I have simplified that to worldGrid.insert(std::make_pair({-3, 4, -5}, {"green_cube"})); I wonder?
user1804599
Also, maybe I should implement cross-module name lookup so that the type of io.writeln isn't inferred as the top type but rather as std.Sub(std.Unit, std.String)..
@AndyProwl yes
@thecoshman You don't even need make_pair, I think.
The constructor of pair is not explicit (unlike that of tuple)
10:48
@thecoshman With make_pair, no, because it’s a function template that deduces its arguments. Can’t deduce from braced lists.
@AndyProwl oh right, it's still just one arg to insert, a std::pair. thought you were going to say I could .insert(key, value) <-- still want to be able to do that.
@LucDanton oh right.
Xeo
Xeo
@thecoshman worldGrid.emplace(CubeCoord{-3, 4, -5}, Cube{"green_cube"});
@Xeo oooh yes.
Xeo
Xeo
derp
Too bad you can't cut the CubeCoord / Cube from that
It's std::trap!
10:49
yeah
C++ maps are rather different from Java maps :\
@Xeo Go back to insert then :Þ
> std::stack<int> *pegs[3]
Xeo
Xeo
Damn.
also
    // Checking empty() is necessary due to SEGFAULT if you don't check before
    // accessing
10:50
I'd stick to worldGrid.insert({{-3, 4, -5}, {"green_cube"}});
Maybe
Xeo
Xeo
yeah
Yeah, I like braces too.
Xeo
Xeo
I'm out of shape with generic C++
@Cinch most impressively, the recursive version seems to not even solve hanoi. No wonder you found it easy
Xeo
Xeo
> UBT execution time: 381,22 seconds
I don't get why it does that sometimes
it recompiled two friggin files
10:50
@Xeo The point was that we don’t do braces for generic stuff :D
Xeo
Xeo
sometimes that takes 30sec, sometimes 6 minutes
@LucDanton I'm out of shape with anything!
2 hours ago, by sehe
@wilx Basically, you should not trust computers
user1804599
def hasSubtypeRelationshipWith(other: Type) =
    isSubtypeOf(other) || other.isSubtypeOf(this)
Actually you don't even need the braces around "green_cube"
user1804599
This should work.
10:51
worldGrid.insert({{-3, 4, -5}, "green_cube"});
I went to Alt-Tegel with some friends to find some geocaches. Around midnight, after some 12km of walking, we all went back home our own ways.
I got home, and committed myself to a game of Diplomacy with some Internet peeps. I fell asleep on my chair, though, and ruined their game. I felt bad about it and decided to go out for a random walk around the city. I ended up a bus station and took the first bus that showed up.
Turns out the bus went to Köpenick. So I was in Köpenick at 6 and I had nothing to do the whole day, so I went to the Müggelsee, watched the sunrise, and walked a bit throu
13
Xeo
Xeo
"fun period"
Sounds nice.
Pleonasm
@AndyProwl wait... how come generic ... oh... that is constructing a pair, not calling template function... so as it knows the map<K,V> it knows the insert takes pair<K,V> so it knows what types are all the way.
10:55
Why are you making green cubes anyway
@thecoshman Yep, unlike emplace(), which is a function template and wants to deduce its arguments (so you can't use brace lists)
@R.MartinhoFernandes see any muggles? At the See?
@AndyProwl but doesn't emplace get it's types to expect from the map template?
@ParkYoung-Bae I make red and white ones too!!!
Xeo
Xeo
@thecoshman nope
@thecoshman Nope. It takes anything.
Xeo
Xeo
10:56
it only constructs those types from whatever you give it
@LucDanton ... isn't that... wrong?
Xeo
Xeo
but not in the interface
@R.MartinhoFernandes You may end up in the middle of Schwarzwald one day.
Xeo
Xeo
only in the implementation
oh I get it
10:56
@R.MartinhoFernandes that's a nice story indeed
user1804599
The solution is to write a function that does.
user1804599
Is it a subtype relationship or a subtyping relationship?
@StackedCrooked That's a bit far off from Berlin, though.
Well, it's not super-intuitive, and probably also not ideal, but that's how it works. It takes the arguments you provide and construct in-place the key from the first argument, and the value from the second argument.
You may ask why it has to be a variadic template then, and the actual reason escapes me honestly, but it may have something to do with piecewise construction - where you pass `std::piecewise_t` as the first argument, a tuple as the second argument (whose elements are forwarded to the key's constructor as arguments), and another tuple as the third argument (whose elements are fo
There was a discussion thread in the Asylum
11:02
Variadic because it calls the constructor on your behalf. What you pass is the arguments to that constructor. That’s the major difference with push_back/insert where you construct the value, then pass it.
@StackedCrooked But I'll try ;)
Just make sure to survive :)
@AndyProwl The Asylum? I thought this room was the asylum. :)
@thecoshman But why
11:09
@R.MartinhoFernandes Heh. I have never read that.
@ParkYoung-Bae in what regard? why those colours? why even cubes in the first place?
TBH, I was pretty sad with the ending of Hitchikers Guide.
Why?
The sad ending is in So Long, And Thanks For All The Fish.
@R.MartinhoFernandes Because they all ended on Earth in far past?
11:10
The SuperFish
@wilx That's The Restaurant at The End of The Universe
@R.MartinhoFernandes Ah, OK. It might have been two books in one then.
user1804599
This is extremely interesting.
I do not remember exactly.
> I think... I feel good about it.
Marvin's last words :(
11:12
Feck. I still feel kind of blue from yesterdays court hearing on access to my kids.
@ParkYoung-Bae hehe. I removed that cert from my mom's laptop. Turned out my spidey sense served me well when she bought that laptop: I already uninstalled SuperFish itself at the time of purchase
@wilx That's an odd thing to drop like that. Not that I know of a better way to introduce the topic. So. Ow.
user1804599
aaaa covariance and contravariance are so confusing
@wilx What happened?
11:15
@LucDanton But unless you pass std::piecewise_t and two tuples, you'll always be allowed to pass two arguments only. Two overloads could have achieved the same result, no? I understand why it's a template, but not why it's variadic.
user1804599
OK I think I got it.
guys, today I heard two loud booms and when I looked at the electricity cables (the place where they connect or w/e on the pole) above two of them were moving and there were clouds of brown/dark orange smoke above them
I dunno what to search for, what could have caused the smoke?
the electricity in the area was stopped for one second
@AndyProwl You can pass one argument too.
I secretly hope a bird exploded
@AndyProwl Oh, for consistency with other things. E.g. with a vector you don’t construct a pair.
11:16
It is also future-proof.
Well, she threw some allegations at me, I responded to some when it was my turn to be questioned by the judge but I simply couldn't remember all of it and respond to all of it. Divorces suck.
And no, it’s not just two. The pair constructors don’t have to be limited to two arguments.
Add other constructors to pair and BAM extra emplace functionality for free.
@wilx So it went bad? :(
@R.MartinhoFernandes You mean passing a pair as the only argument?
¬_¬ esc deleting your entry is annoying
user1804599
11:17
OK so for two function types F = (A, B) => C and G = (D, E) => H, G <: F <=> D <: A && E <: B && C <: H
@AndyProwl Hmmm, I thought you could make a pair out of a 2-tuple.
heh, other direction maybe?
@wilx did you have a lawyer? Did he or you take notes?
@R.MartinhoFernandes I am requesting access for weekend every second week and sleepover each week. She only agrees with weekends every second week but disagrees with sleepover every one week. It basically means it is like 9 days between the sleepover and the next weeks weekend.
@sehe Dunno. Probably not so good.
I did take notes but I was pretty stressed when being questioned and simply could not remember all of what I wanted to respond to.
@R.MartinhoFernandes Nope, it's only possible to make a pair out of 2 tuples (+ piecewise_construct)
11:21
@wilx bumma dude
@LucDanton Yeah, but I don't see why not both ways.
TBH, I do not think it would have made a difference. Even the state appointed social worker for the kids said weekend every second week and one sleepover is enough for now. But with a note that it could be more frequent when they get older.
@R.MartinhoFernandes That would make too much sense! We can’t have it!
@wilx on what grounds? I don't understand why even time is not fair. Or have you had to take a small cheap place (yes, I do presume the woman has claimed rights over the house)
user1804599
YAYAYAY
11:25
@thecoshman I have a decent place, 2+kk (kitchen corner (?)). She claimed that it is somehow not good for the daughter (3y) to change place that often.
user1804599
Hello world program now compiles without warnings.
@wilx half a month with each involves only two changes a month. Every two weekends involves four changes a month.
Does she really hate you so much that she wants the kids to not be around you at all?
@wilx ffs. nonesense. How far apart are you any way? Close enough for school to not be an issue? It's by far worse to not have a good parent.
@R.MartinhoFernandes that's usually what divorce involves. Kids turn into leverage. It's never about what's good for them it seems.
@wilx What's a kk
@ParkYoung-Bae klu klux with no klan vOv
user1804599
11:29
I should decouple walking tree and resolving names from code generation and type checking.
Are you working on Narrow?
Or whatever your language is called
I would love to an amazing language lib or tool that everyone raves aobut using, but give it a name like N-ger
@thecoshman Why "N-ger" and not "Nigger"?
r u NgrE
user1804599
Luckily it's extremely easy to do.
11:33
@R.MartinhoFernandes :( because I English not well
user1804599
@thecoshman MongoDB :p
user1804599
== §Finnish == === §Noun === mongo möngö (one 100th of tugrik, the currency of Mongolia) ==== §Declension ==== == §Portuguese == === §Noun === mongo m (plural mongos, feminine monga, feminine plural mongas) (slang) idiot === §Adjective === mongo m (feminine monga, masculine plural mongos, feminine plural mongas, comparable) (slang, pejorative) idiot; fool; retarded == §Spanish == === §Noun === mongo m (plural mongos, feminine monga) (colloquial, Chile, Cuba) idiot === §Adjective === mongo m (feminine monga, masculine plural mongos, feminine plural mongas) (colloquial, Chile...
user1804599
"Mongool" is the Dutch word for retards or people with Down syndrome and when capitalised also for Mongols.
huh, like calling something 'Minj'... 'Ming'... huh... yeah, no idea how to spell it. Slang for vagina basically
guy picks up trash too early, sentenced to jail youtube.com/watch?v=0uFyatu6J-A
user1804599
11:35
@thecoshman <coño.h>
@thecoshman Most everything can be slang for vagina, though.
rhymes with another word that I can't spell :\
@R.MartinhoFernandes rub you'r desk top!
@AlexM. too early?
11:37
@ParkYoung-Bae "kuchyƈský kout" -- kitchen corner, not a full fledged kitchen room
I want to get automated ci builds on my thing set up... probably a bit of a side track... but I want it
@wilx Get your Unicode out of my face!
@wilx oh, like a half kitchen half living room?
Alright I think I see what you mean :)
@R.MartinhoFernandes Every second weekend is what we agreed on so far.
11:38
with a vague idea of a dinning room in there too
@thecoshman Sort of.
@thecoshman Without. :)
@wilx Yes, but it involves more changes than half/half which should be the default.
It also involves the same number of changes as every other week, which is also a fair default.
It's almost like "what's best for the kids" isn't actually about "what's best for the kids" but "I want to screw you over any way I can"
Hi, I come from a java background and have a kind of noob question:
I'm using mingw, in the stdio.h there are almost no comments above the different functions.. How does one know how to use such a function? For example: how do I get to know the difference between the puts and fputs functions?
@R.MartinhoFernandes Yes. I did not get shared custody because I work and not from home.
@Mark you Google it
Also, that's C.
Hm ok, but how does eclipse cdt provide the additional info in popups? Is it baked in?
@Mark vOv what did I have for breakfast?
When I hover on the 'puts' function in cdt i get the following popup: "The puts function writes the string s to the stream stdout followed by a newline. The terminating null character
of the string is not written. (Note that fputs does not write a newline as this function does.) "
11:44
well there you go, you've answered your own question.
So it's baked in in eclipse? Or does it get it's info from .h/.cpp files?
How on earth are we supposed to know?
Do we look like an Eclipse helpdesk room?
Well, we have a half arsed idea about computers, so must know everything about anything to do with computers.
@Mark Does it matter? It probably comes from its own source.
Shut up guys. He's asking about a C++ IDE. You're being silly.
11:49
I just hoped for some kind of standard regarding documentation in cpp. I'm new to the language so couldn't possibly know
There's nothing like that.
Ok thanks for the clarification guys :)
@R.MartinhoFernandes say, can you use your powers and have peoples first nubish questions to hand. It might do good to humble people.
@R.MartinhoFernandes vOv don't see the relevance really.
@R.MartinhoFernandes well, if people jump down throats of a new guy asking a silly question, just point them to their first entrance here where they do exactly that.
11:52
@thecoshman You don't have to. You just have to shut up and not be an ass.
@R.MartinhoFernandes I'll wave it all up in yo face
@R.MartinhoFernandes so it's perfectly valid to ask why my C++ IDE isn't making me some pancakes?
It's clearly a detail that we would have way of know unless we actually looked at how the IDE implemented that feature.
@thecoshman Another graduate from Bartek's Straw Man School?
@R.MartinhoFernandes oh fine, a bit straw man, but the principle is the same. It's an ide feature, how would we know how the ide implements that feature?
don't be going all fallacy fallacy on me :P

« first day (1606 days earlier)      last day (3568 days later) »