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

9:00 PM
Write an automatic code un-uglifier.
 
user1804599
I wish I could write a while loop in a for expression.
 
Why?
 
user1804599
Because this recursive stuff is ugly.
 
huh?
 
Dang, maybe I should have downloaded the current version of pro git before I converted to PNG...
 
9:01 PM
recursion is the besterst
 
user1804599
def go(): Future[Unit] = for {
  _ <- sleep(interval)
  if !stopped
  _ = events ! Try(callback)
  _ <- go()
} yield ()
 
@FredOverflow heh
 
mordown y u reluctant to onebox https xkcd
 
bad regex
 
9:03 PM
tail recursion is just a different way to write a while loop right?
 
They can compile to the same thing.
 
non-tail-recursion is the really interesting kind iyam
I le yawned
 
Some people on meta are really obsessed with "burninating" tags.
 
somebody's gotta do it
 
Sometimes they're stupid.
 
9:08 PM
as opposed to anybody else?
 
I mean the requests.
 
@Rapptz Most people on meta are really obsessed with deleting and exercising control in general. It's certainly not limited to tags
 
> This is the worst birthday party I've ever been to.
 
user1804599
TCO is the one of the easiest optimisations to perform iff the platform allows it (fuck you, Java).
 
user1804599
9:09 PM
It could literally be s/call (.+?)\nreturn\n/tailcall $1\n/.
 
that's basically "It's easy to perform because the platform already performed it for you"
 
user1804599
In a stack-based interpreter it's just callStack.pop(); call(); instead of call();.
 
easier if you can't have references into the existing call frame.
 
jesus christ
Library has version 5.something
Docs are utter shit
This is special kind of incompetence
 
4 mins ago, by Puppy
as opposed to anybody else?
 
9:13 PM
@CatPlusPlus Aren't version numbers kinda meaningless, anyway?
 
"The full documentation is at" nowhere you fucking hack
This isn't "full", this isn't even fucking "empty"
 
Some people argue that Scala 2.8 should have been called Scala 3.0, for example.
And other people argue that Linux kernel version 3 didn't deserve the 3.
 
user1804599
what is team fortress
 
They're only meaningless if people using them try hard to make them meaningless
 
@райтфолд I think it's a computer game.
 
user1804599
9:16 PM
I wonder whether ScalaDoc finds calls to require and ensuring.
 
Why don't you try it out?
 
Is it true that try/catch/finally is no longer recommended to use in Scala, being superseded by the Try monad?
 
user1804599
@FredOverflow Meh, it doesn't.
 
what's a monad?
5
 
user1804599
9:18 PM
@FredOverflow No.
 
573
Q: What is a monad?

ljsHaving briefly looked at Haskell recently I wondered whether anybody could give a brief, succinct, practical explanation as to what a monad essentially is? I have found most explanations I've come across to be fairly inaccessible and lacking in practical detail, so could somebody here help me?

 
user1804599
try/catch/finally is totally fine.
 
268
Q: Monad in plain English? (For the OOP programmer with no FP background)

figIn terms that an OOP programmer would understand (without any functional programming background), what is a monad? What problem does it solve and what are the most common places it's used? EDIT: To clarify the kind of understanding I was looking for, let's say you were converting an FP applica...

 
user1804599
Try is useful: in generic monadic situations; when you pass around the result of something that could have failed, like in my monitor; when you want to be ermahgerd exceptions not functional kind of person.
 
9:23 PM
I am designing a language called ermahgerd. When the compiler detects a class, it complains "Your program is not functional". When it detects a function, it complains "Your program is not object-oriented".
 
user1804599
Exceptions are much more convenient in most cases, and can be turned into Try objects trivially by wrapping them with Try(…), so making methods return Try[T] is terrible.
 
user3010322
I'm trying to write a LALR(1) parser for HLSL.
 
user3010322
So I can convert it to GLSL.
 
user3010322
And then ship it off to SPIR-V.
 
you mean GPSL?
 
9:24 PM
How about ANTLR?
 
user3010322
GPSL is dead.
 
no it's not
it's pretty stable right now
 
user1804599
Just be sure to use NonFatal when you want a catch-all, like Try uses.
 
user3010322
LOOKS P. DEAD TO ME.
 
OH REALLY?
 
user3010322
9:25 PM
Yeh.
 
pfft
 
@Blob baby don't hurt me
 
@FredOverflow That language already exists.
 
@FredOverflow It should just be int main() { std::cout << "Error: your program is not" << std::endl; }.
 
@CaptainGiraffe I shall call it ermahgerd++ then.
 
9:32 PM
 
@Nooble Ooh boy, that was a doozy.
 
user1804599
@FredOverflow Just add the feature to millc; I accept pull requests. Oh wait, you can only implement half of it since Mill lacks classes.
 
@FredOverflow Good call. Sign me up for the mailing-list.
Look at this. Simula 67 introduced objects,[1]:2, 5.3 classes,[1]:1.3.3, 2 inheritance and subclasses,[1]:2.2.1 virtual methods,[1]:2.2.3 coroutines,[1]:9.2 and discrete event simulation,[1]:14.2 and features garbage collection.[1]:9.1 Subtyping was introduced in Simula derivatives.[citation needed]
 
Dear YouTube, please stop repeating the same "treehouse" ad over and over again. Learning to program in 6 months and getting exciting jobs afterwards? Yeah, right.
 
@FredOverflow YouTube keeps giving me beer ads. I do not even drink. :(
 
user1804599
9:41 PM
How do you unit test sleep?
 
[1] is not really readable.
 
@CaptainGiraffe So should we just turn back to Simula 67 and forget all the modern crap languages?
 
Quite the opposite.
Did you see the Integer u;
Ref (FittingRoom) fittingRoom1;

fittingRoom1:- New FittingRoom;
Activate New Person ("Sam");
Activate New Person ("Sally");
Activate New Person ("Andy");
Hold (100);
I'm quite comfy with a typedef and fitting1 = {"Sam", "Sally"}.
@FredOverflow Why did you think I wanted to revert?
 
The idea behind this was to just steal the "what is this site about" text and insert it directly into that space. So on Stack Overflow, for example, it would read as "Tell us more about you and your programming background." It obviously doesn't work with Meta's on-topic text. — animuson Feb 26 at 17:37
that's the stupidest programming I've seen in months
 
user1804599
val now1 = Instant.now()
Await.result(sleep(Duration.ofMillis(100)))
val now2 = Instant.now()
val diff = Duration.between(now1, now2).toMillis
assert(99 to 250 contains diff)
 
user1804599
9:49 PM
This test is so ugly.
 
stop fucking posting fucking walls of fucking code fucking rightfold
8
 
lol
 
user1804599
I hate timers.
 
wtf are you trying to unit test sleep
> After Pedroza dropped off one friend, the remaining children started arguing over who would sit in the front seat. Bachmann became so upset she announced she was going to walk home, then got out of the car and sat in the middle of the road.
 
lol Florida
 
user3010322
9:59 PM
@LightnessRacesinOrbit At.... that point....
 
@LightnessRacesinOrbit Poor girl.
 
user3010322
@Nooble It's less "poor" and more like "holy shit you can't be that dumb."
 
@ThePhD spoiled*
 
user3010322
Was it a curve? At night? Why couldn't the driver stop?
 
Most likely DUI.
 
10:00 PM
@Nican Doesn't apply here tbh.
 
@LightnessRacesinOrbit I beg of you. Go back to entertainment. Call Giraffes tree challenged or something.
 
user3010322
I mean I wouldn't fucking expect a girl to be in the middle of the road, but...
 
@ThePhD This doesn't matter -- it's the girl's fault for being in the middle of the road anyway.
 
Oh look a new "improvement" for LRiO /cc @LightnessRacesinOrbit
 
user3010322
@Rapptz I know, but still. Just had to hope.
 
10:02 PM
@R.MartinhoFernandes Thanks.
 
Regardless of that, the driver is at fault too for being drunk obviously.
 
So that he can post a new question, a new answer on the question and also close its own question so nobody can write a better answer.
 
But if it was a sober person and it was a truck they couldn't have seen the girl on the road.
 
@R.MartinhoFernandes A possible exception might be for a macro that's used in a small scope and #undef'd at the end.
I.e. when using x-macros.
Those are rare situations though.
 
user1804599
Interesting.
 
user1804599
10:06 PM
This library has an Offer which is similar to Future except that completing an offer blocks until the other side has taken the value.
 
user1804599
Whereas completing a future returns immediately.
 
@райтфолд That is how my library card works.
 
@райтфолд that's... odd...
 
user1804599
Why?
 
user1804599
It's useful.
 
user1804599
10:11 PM
It allows you to implement producers that are not faster than the consumers.
 
you could do that with a queue
 
12.5 hours at work
fuck my poor life
Also "The Bartek, Puppy and Cat" sounds like The Good, The Bad and The Ugly
3
 
Bartek's the good, eh?
 
~no particular order~
 
~very particular order~
 
10:16 PM
you know me too well
 
:)
 
anyway it seems that next day is also going to be a massive overtime
fuck releases
 
Outlook advanced search is useless.
 
@BartekBanachewicz you mean bad management
 
@BartekBanachewicz You and Cat are Bad and Ugly and I'm Good.
 
10:23 PM
I think "The Three Stooges" is more apt
 
that's why you're not good enough to even qualify as bad or ugly
 
@Puppy lel
 
@Jefffrey I like it in general. Many of the answerers on that meta post seem to encourage dumbing SE the fuck down, though, which is sad.
"no don't use the word 'duplicate' because some people may not be aware of how the SE mechanic works"
wtf
@thecoshman what the hell are you ready
@BartekBanachewicz at least you're getting overtime
 
apparently... due to some minor derp up in legislation... class A drugs (that's the really good ones boys and girls) are currently legal here in Ireland till Thursday :)
 
@CaptainGiraffe I don't know, you listed lots of features? :)
 
10:34 PM
oh, not all class A drugs, so no sampling cocaine legally :\
but shrooms are a go go!
 
read about that on the bbc
 
Hi guys... Could someone please check what's wrong with my loop trying to fill up a matrix of vector<vector<double>> ideone.com/4CNMCp
 
no
 
You don't have to check the length. If it is the empty string, you just get '\0' stored into lastChar. — Mark Loeser Aug 20 '13 at 22:02
 
10:42 PM
just for learning, i'm a beginner
 
Is that true?
 
@thecoshman but selling and distributing is still illegal, so essentially nothing's changed
@Enissay TempMat.push_back(<vector<double>); whoops
you just named a type; you didn't create an instance of it!
You also have an extra <
 
@FredOverflow oi
@FredOverflow I'm trying to teach someone something here
 
@FredOverflow In C++11 for c_str().
 
10:45 PM
*string.rbegin() is allowed for empty string?
 
@FredOverflow No.
 
@StackedCrooked That is my question.
 
I don't think it's valid.
Actually, I would be certain if it wasn't for you asking it.
 
@FredOverflow std::string::operator[] for one-past-the-end is valid and gives you '\0'; however, that rule is given as an alternative to the case where pos is < length, which is the case that defers to *(begin()+pos) (and, remember, rbegin() is equivalent to end()).
@FredOverflow There is nothing that says dereferencing std::string::end() is valid.
 
IIRC rbegin() is equivalent to end() - 1
 
10:48 PM
er yeah that too
 
no
> Returns: An iterator which is semantically equivalent to reverse_iterator(end()).
I can't find anything saying you can dereference end() like LRiO says
 
In any case it seems unwise to write this kind of code.
 
@LightnessRacesinOrbit, i'm really confused... I've already declared vector<vector<double>> TempMat; I don't understand why I'm even supposed to add that line in the loop
 
Xeo
@Rapptz yes
 
@Enissay Yeah, you created TempMat fine. Now you want to add a "blank" (default-constructed) element to it. What will that element be?
 
Xeo
10:52 PM
(If you're referring to the end() - 1 thing with that 'no')
 
And let's just take a moment to feel bad for anyone who had to go through 14 years of school with the name Mark Loeser
 
@LightnessRacesinOrbit that's exactly what I realised before adding that line... But I don't see how
 
@Enissay You're on the right track. I'm trying to guide you towards realising why :)
 
I know ;-)
oh, a NULL element ?
 
void foo(int x); int main() { int x; foo(x); }
What does this do?
bad example
 
10:57 PM
nothing
 
void foo(std::string x); int main() { std::string x; foo(x); }
What does this do?
It's not a trick question
 
a copy of x is made in the foo function... which does nothing
 
Once again I am late. Sigh
 
@LightnessRacesinOrbit linker error
 
@Enissay Right. Crucially, what is x at that point?
 
10:58 PM
oh, and x is not initialized
 
@StackedCrooked shush
 
it foos the x
 
@Enissay std::string has a default constructor. It effectively initialises itself
 
@LightnessRacesinOrbit yes, exactly
 
std::string x; is functionally equivalent to std::string x = "";
ok
void foo(std::string x); int main() { foo(std::string()); }
What does this do?
 
10:59 PM
yes yes, you're right, I knew that, i'm just a bit confused xD
 
@LightnessRacesinOrbit Oh I know! I know! Pick me!
 
user1804599
monitors += name -> MonitorData(() => events ?, stop)
 
user1804599
Does this look cryptic?
 
@sehe I have a different approach now, that doesn't force me to build a C parser
 
11:01 PM
it calls foo using an anonymous var
 
@sehe I run the source through clang with -ast-dump, process that using Python into a prefix format, and then evaluate the expressions in prefix format
 
@Enissay Great!
@Enissay One more.
 
@orlp huh. I didn't know you need to
 
void foo(std::vector<int> x);
int main() { foo(std::vector<int>()); }
 
@sehe well, a subset that has C operator precedence
 
11:01 PM
What does this do?
 
user1804599
Hehe, found another use for dependent types.
 
@orlp lol "preceedence"
 
user1804599
Dependent typing is goddamn awesome.
 
@orlp why. You hoped to get better performance? Not better conformance, mind you
 
@sehe no, I hoped to be able to evaluate the millions of functions
@sehe compiling doesn't work - it crashes the compiler
 
11:02 PM
partition
 
more effort
than just generating AST and processing it
 
@LightnessRacesinOrbit the same ?
 
@sehe and then there's the issue of division-by-zero, can't be bothered to write a C++ class to emulate integers that catches that
 
I mean, same thing as for the string
 
@orlp right
@orlp so, how do you now?
 
11:04 PM
@sehe by evaluating in python
 
when were you gonna mention that unimportant bit
 
well, I could evaluate in C++ as well
but through parsing the prefix expression, not through compilation
 
in python you compile it?
I'm miffed now. I thought the compiler crashed
 
@LightnessRacesinOrbit got it
 
@Enissay have fun
 
@LightnessRacesinOrbit thanks a lot for taking time guiding a newbie like me <3
 
@sehe the data flow right now is expression bruteforce generator -> clang ast -> prefix format (textual) -> evaluating the prefix format using a simple stack parser
 
user1804599
I like how you can create temporary unique IDs by just creating instances of an empty final class.
 
@Enissay No problem. :)
 
user1804599
Like final class MonitorID { }.
 
11:06 PM
@Nooble you did the meme wrong
 
1 min ago, by orlp
but through parsing the prefix expression, not through compilation
I don't see the contrast that explains the "but" then. You know: you have my blessing.
 
@Shog9: I'm not "confusing" them. I'm presenting my opinion that the choice of means have an effect on how effectively we can achieve our end, in the long run. In this case, the text (the means) runs the risk of mistraining site newcomers, who will over time contribute yet more low quality content accordingly, leading, ultimately, to a more literal "end" than you wanted. :P It's a subtle and more complex issue than you are going for here, sure, but I don't think that makes it unimportant (nor worthy of being summarily written off as "confusion"). — Lightness Races in Orbit 3 mins ago
Anyone else want to weigh in?
Personally, I think a big noobs-can-confirm-their-question-as-being-a-dupe button that says "Yes, I got my answer!" is a huge red flag in terms of mistraining noobs as to SO's entire purpose.
 
What if a group of noobs was called a Nooble.
 
I don't have a better text suggestion, though I imagine "duplicate" would work its way into it somehow, inevitably
Again, I just don't subscribe to dumbing down, and I certainly don't subscribe to dumbing down at the expense of deliberate mistraining. That's just irresponsible.
 
@райтфолд like, Guid()?
 
11:09 PM
The moment you optimise for users who can't follow basic instructions or read a FAQ that's thrown at them, is the moment you've lost it all.
 
Why does CamelCase start lowercased?
 
@Nooble It doesn't, always.
> In Microsoft documentation, camel case always starts with a lower case letter (e.g. backColor), and it is contrasted with Pascal case which always begins with a capital letter (e.g. BackColor).
They're called Conventions conventions.
 
it doesn't.
camelCase and CamelCase are different casings.
 
the case of the camel
 
er no
> Camel case may start with a capital or, especially in programming languages, with a lowercase letter.
"Camel case" is the term for the lot of 'em.
 
11:13 PM
Ahh. Let me rephrase then: Why do people use the lowercased convention?
What's the use of having the first letter lowercased?
 
what's the use of having it uppercased?
there's no particular reason to favour most casing conventions.
 
@Nooble Probably they use leading caps to mean something else.
But your question supposes there to be a reason when there needn't be one, beyond an arbitrary choice coupled with a desire for consistency
Although one could argue that the "camelCase" variant is not consistent at all :P
 
I use ThisVariant when I can
 
^
 
And YouCan ALotOfTheTime
 
11:16 PM
my teachers give us function signatures with names and crap to define, so I need to use thisVariant for those cases >.>
teachers referring to everyone in the CS department ;_;
i kinda get away with not following signature completely by adding optional arguments
lol
 
@Puppy The same reason titles are capitalized, I guess.
 
which is just as arbitrary as lowercase.
 
lowerCamelCase is so inconsistent though.
I just wanted to know how it came to be and why it is used.
 
consistency is irrelevant.
4
 
> The convention of variables starting with lower case, to differentiate from classes or other entities which use a capital. This is also sometimes used to differentiate based on access level (private/public).
Ok, that makes sense.
 
11:20 PM
in a "We're shit so we love hungarian notation" kind of way.
a.k.a. it doesn't really make sense at all.
 
protip: do not use tab completion when you have a 400mb ast file open in vim
 
Do not have 400MB AST file open in vim in the first place
 
I just used the special rule for auto deducing to initializer_list
:v
Guess it's not so useless!
 
CAPTCHA for foreign speakers with strange keyboards seems impossible
 
11:26 PM
@JDiMatteo how did they manage to find the website in the first place?
 
any Russian speakers care to copy and paste the text for this? a.captcha.yandex.net/image?key=60LSq88xevUDlIiTnFfeFnIfkDaqUEaA . lol, I am trying to sign up for a Russian equivalent of Pandora, because Russians seem like the best coders I know
 
Xeo
@Rapptz 'cept it is!
 
Is not
typing std::initializer_list<...> is so verbose though
what would be a good alias for it?
init_list<..>?
 
@JDiMatteo not russian. my attempt: БУХAHKA
wait hold up
the K might be a bit different
 
lol crowdsourcing captcha
 
11:31 PM
wait
maybe it uses unicode and compares the encoding thingy
then you'd need U+411, U+443, U+445, U+410, U+41D, U+41A, U+410
i think
 
@Blob: thanks, someone on freenode #russian helped me get through, but when I tried to play some music I got some message that service only works in Russia, Ukraine, Belarus and Kazakhstan. I guess I might as well be a bot
 
@JDiMatteo lol
does Hola Unblocker support Russia?
 
Hey guys
 
@Blob, sorry, I've already given up. I might just ask a Russian friend to lend me a CD to try and rub off some of his Russian genius programmer on me
 
C++ midterm n T-72 minutes
 
11:38 PM
It can't be that hard.
 
@Nooble It's not.
 
What exactly are you getting tested on?
 
@Nooble C++
 
> Since C programming language is a subset of C++ programming language, we can use a C++ compiler to
compile any C program without modification.
I'm fairly sure it's not completely backwards compatible
 
11:40 PM
@Blob It's false.
 
ok
> C++ compiler allows us to
inline
all functions to improve program efficiency.
what about that?
the code thing breaks lines :|
 
58
Q: "C subset of C++" -> Where not ? examples?

n00ki3I read in a lot of books the claim that "C is a subset of C++". Actually some (good?) books say: "C is a subset of C++ except the little Details". I am interested what these details are. I've never seen one.

 
LOL #7
 
@Blob Cannot inline main.
 
11:41 PM
@Cinch i was thinking about how it's not always gonna impact efficiency...
well
not gonna improve necessarily
 
Are we seriously helping someone cheat on an exam? or is that just a practice exam? or is it just posing as a practice exam?
 
@JDiMatteo It's the past exam that is being provided for practice
 
Why is api design so hard. How am I supposed to learn how to write good apis?
 
@JDiMatteo it's definitely not a real test
 
@Pris Talk to 12 year old; if they can use it, it's good
@Blob University of Manoa, EE 205, Spring 2015, taught by PhD
it also clearly says 2014 midterm
 
11:42 PM
@Cinch i meant: it's definitely not a test he's taking right now
 
@Blob #nocontext
 
If I was in Hawaii, I'd be windsurfing instead of caring about an exam
 
@JDiMatteo if i didn't have dreams and aspirations, yes
 
> Why is it a bad idea to overload << operator as a member function for output
it is?
oh
member function
not friend
> What are the advantages and limitations of array and linked list, respectively?
Array: everything
Linked list: basically nothing
 
It's not a bad idea per se, std::ostream does it for primitive types and char pointers. It's just not a very extensible approach.
 
11:47 PM
@Blob I'm confused... Why is this a bad idea?
 
@Nooble with member function, the first argument can't be ostream. with friend, i don't really see a problem. the question said "member function", though.
one of the requirements for the complex (a+bi) class is:
> Overload operators >> and << for input and output.
i think they intended the "friend" thing
 
He who has friends does not need membership.
 
@LightnessRacesinOrbit fake
 
@Blob You can't use an ostream as an argument for a member function?
@LightnessRacesinOrbit Real.
 
11:51 PM
@Nooble the left hand side will be the class instance itself.
 
Gotcha.
 
@Nooble You can but an operator call with an ostream on the LHS isn't going to find a binary member operator
@JDiMatteo "If I were"*
 
@LightnessRacesinOrbit please
 
But the question is
 
@sehe I think I'm doing this totally backwards. If I just generate expressions in prefix notation with the restriction that no child operator's precedence is lower than a parents' I can generate all possible C expressions directly in prefix notation
 
11:57 PM
Sure, we can be pedantic about this, I don't care. My apologies if I misspoke. Ultimately my question pertains to adding custom properties to the edge or vertex definitions needed for the adjacency_list typedef. See my second paragraph. I am having problems adding my struct/class/object to a custom property that defines an edge/vertex for the adjacency_list typedef. Correct, looking at links 2&3 that I provided, I know I can add a custom property to my adjacency_list. — lilott8 10 mins ago
Sure
 
> Charlotte Bainbridge, 14, was only reported missing from her home in Chilwell at around 6am this morning but officers and family have concerns for her safety. She is believed to be on her own. The 14-year old is described as white, of petite build with jaw line length hair, possibly tied-up. She is wearing black leggings, a t-shirt and a green coat with a fur-lined hood.
ffs
 
Xeo
@LightnessRacesinOrbit ?
 
@Xeo girl disappears, is described as "possibly tied up"
 
her hair was tied up not the girl
 
Xeo
11:59 PM
The hair is what's "possibly tied up"
 

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