« first day (1059 days earlier)      last day (3907 days later) » 

12:00 PM
@wilx Ah dear god. That was the main thing i wanted to get around with unit testing.
 
You cannot, it will always be an out of process COM, afaik.
 
Isn't it an interface?
 
Xeo
@R.MartinhoFernandes We need spontaneous teleportation :(
 
You can just mock it if so.
 
@Xeo spacial or temporal?
 
Xeo
12:01 PM
spatial would suffice for now
 
yeah but i still want to use it on real vs projects, then i would need to create my own project save/load/edit functions etc.
 
@Xeo then the postal service will suffice
 
Xeo
That's not spontaneous :|
 
@Xeo you said temporal was not a concern (╯°□°)╯︵ ┻━┻
 
@Xeo It can be.
(Hint: you're using the wrong word)
 
Xeo
12:03 PM
:(
 
JBL
Spontaneous teleportation seems like a dangerous thing.
 
Xeo
thinking about it.. yea
kinda like spontaneous combustion
 
Some sorts of code should have that property.
 
Xeo
just that you're not definitly covered in flames, but only potentially - if you teleported into a fire.
 
You would have the flames within you!
Teleportation of any kind always seems dangerous to me.
Well, except for the magical one.
 
Xeo
12:05 PM
@JBL oh gawd, I'm laughing so hard at this now
Walk into the office -> zap, teleported
 
Teleported into unemployment?
 
I also presumed that what ever you are displacing is teleported to where you are teleported from, swapping the entire volume of space
@Xeo would be very hard to do your work if you kept getting teleported home
 
@thecoshman Well, the last thing I want is to have phlogistons all over between and within my cells.
 
JBL
@Xeo Try to explain that to your boss.
"I kept being teleported to my home"
 
@R.MartinhoFernandes bah! keep your dark age science out of this! We are making up shit on an entire new level here!
 
12:11 PM
Don't give me crap about phlogistons being pseudoscience; we're talking about teleportation of humans here.
 
> keep your dark age science out of this! We are making up shit on an entire new level here!
ಠ_ಠ did I stutter?
 
Do you want to be dephlogisticated?
(Man, I should use that word more often; or maybe not)
 
user1804599
¡Hola!
 
@R.MartinhoFernandes best play it safe and take the dephlogistration
 
user1804599
@Xeo \x.x?
 
Xeo
12:14 PM
@not-rightfold ahaha, oops
 
user1804599
Is that awesome piece of syntax supported? :V
 
user1804599
Oh. :P
 
user1804599
Too much lambda calculus? :P
 
Xeo
reading wiki article on Hindley-Milner
 
user1804599
Man.
 
12:15 PM
I'm sad that GHC's Unicode syntax extensions don't allow λ instead of `\`
 
Xeo
That . actually makes more sense than -> for lambda, eh?
 
user1804599
CodeIgniter is so insanely bad.
 
Xeo
what with forall a. a -> a
 
o_0 eclipse is reporting errors that an inherited function does not exist...
 
user1804599
Public methods in controllers are both used for validation callbacks and for request handlers. As a consequence, you can go to /mycontroller/myvalidationcallback and it executes the validation callback as if it were a request handler.
 
Xeo
12:16 PM
fuck library functions with exceptions, gimme expected or something like that :<
 
@Xeo Meh, why?
So you can manually propagate them?
 
Xeo
AS3, I'm asking for the class definition of something with a runtime-build name, and now I need to wrap that with a try-catch because it doesn't return null if not found.
 
@Xeo what? sometimes exceptions need to be thrown, not everything can/should be handled via a return type
 
Xeo
Dunno, feels kinda annoying to try-catch that
 
@Xeo oh yeah, 'not found exception' is a fucking stupid bit of shit
 
12:18 PM
That's a vexing exception. (nomenclature from blogs.msdn.com/b/ericlippert/archive/2008/09/10/…)
 
"please find me this thing" "huh... that does not appear to exist... erhghqarnavuharvuarvuiarq4t4~# I CANNY COPE WITH THIS!!!!" <-- throwing 'not found exception'
 
@Xeo boost.asio with two kinds of API ftw.
 
Xeo
@Abyx Yeah, that's also nice
 
because e = f(); if (e) is also very annoying
 
Xeo
@R.MartinhoFernandes According to that, there really should only be the fatal kind of exception?
 
12:23 PM
@Xeo No? You can't get rid of exogenous exceptions, and boneheaded exceptions are equivalent to assertion failures.
 
Xeo
@Abyx if(e = f()) :D
 
@Xeo if((e = f()))
 
Xeo
?
 
Hides warnings about = meant as ==.
 
Xeo
oh
 
12:25 PM
lol
 
Xeo
if(auto e = f())!
 
3
Q: Deducing a function pointer return type

Kornel KisielewiczI think code will better illustrate my need: template <typename F> struct return_type { typedef ??? type; }; so that: return_type<int(*)()>::type -> int return_type<void(*)(int,int)>::type -> void I know of decltype and result_of but they need to have arguments passed. I want to deduce th...

 
if (f()) // no e for you mister
 
Xeo
@MohammadAliBaydoun no result for you, then
 
I don't have the energy anymore to convince people they are wrong.
 
12:27 PM
@Xeo I'll make my own result with blackjack and hookers :<
 
Screw it. Let everyone look at function types directly.
 
what does ` strtok(NULL, " ");` do? When there's string inplace of null it split string into word but here in this case what will it do?
 
> error| 'meat' was not declared in this scope
 
Ugh, strtok.
 
12:35 PM
@wilx Do you think it is possible to get a EnvDte from an already running instance?
 
fuckshitties, I'm cold.
 
@R.MartinhoFernandes I prefer Martok, too
 
never before have I had the distinguished opportunity of the notion "In the future, call this function and if you're lucky, there might be a T available."
 
@R.MartinhoFernandes Consider the semantics of x.y, where x might be an expression whose type we don't know yet.
in the future, at some point when we know the type of x, we will look up y and there may or may not, in fact, be anything there at all.
 
12:49 PM
Oh. That.
That's the mess you get with C++ duck typing.
 
eh
 
how do you "not know a type yet" :S
 
@melak47 It's a template?
 
I'm totally not satisfied with the idea of spamming requires xyz; everywhere.
 
Row polymorphism and record systems are options.
 
12:51 PM
@melak47 Consider f(x) { if (x > 5) return f(5); return x; }. Now, what is the type of f(5), given that we haven't seen the rest of the body yet?
 
same as x? :E
 
@melak47 Dunno. Haven't seen return x; by the time you see return f(5);.
 
@DeadMG If you can overload names, there's little alternative.
 
eh
at the most fundamental level, I don't see much difference between inferring constraints, and inferring types, or inferring exception specifications.
 
You can't infer all constraints.
At least not with your type system.
And I doubt you want something like ADT.
 
12:57 PM
last I checked, there was no difference between boost::variant/std::tuple and ADT.
 
Wait, maybe that's not the name.
@DeadMG I mean a programming language.
Ah, meant ATS.
 
@R.MartinhoFernandes I've vaguely heard of it, but I don't know much about it.
but I don't see what constraints I can't infer, that you could reasonably check and enforce.
 
My question was removed?
 
yes, I removed it.
this is not a Q&A, it's a chatroom.
 
So, C++ chatroom is only Lounge?
 
1:01 PM
well, we do answer questions, but typically, only very high-level ones posed by existing members of our community.
 
@DeadMG Stuff like the C++ "forward iterators are just like input iterators but you can pass over them more than once".
Can you infer the "pass over them more than once" bit?
 
sure.
input ranges are move-only; forward ranges are copyable.
 
Begging the question of keeping track of not moving twice the same thing.
 
but I'd say that really trends into the "semantics" part for which unless I want to start formally verifying the entire program, there's no inference or checking available.
ultimately, it's only really possible for me to verify that a type meets an interface; and I've been thinking about some sort of tagging that would permit types to claim that they meet a semantic concept; but there's nothing I can do about inferring such things.
 
This one actually has a simple solution: linear types.
 
1:08 PM
'simple'
 
It's two words!
 
mind=blown
 
oh yeah, FTR: I intend to look at functional semantics, like StrictWeakOrdering, separately to interface constraints.
and there's clearly fuck all you can do about inferring whether or not a strict weak ordering is required.
 
Right, SWO is another good example.
 
@R.MartinhoFernandes Right, but I think that's a miscommunication here, because I'm looking at/thinking about entirely separate feature sets to handle those.
when I speak about inferring constraints, that's interface constraints only.
other constraints, I know I will need another solution.
 
1:10 PM
Hmm, I don't see them as different.
 
well
if your function requires Copyable, I can know that it requires Copyable without you having to explicitly state it.
but if your logic depends on SWO, then there's not really much I can do to know that.
 
I see it all as the interface, and that the language does not allow to express such interfaces I see as a weakness (a hard one to overcome entirely, sure). In the end, I see constraint sets as types or type families.
 
@DeadMG Some typing disciplines would require a separate operator to mean 'comparison according to an SWO' specifically.
Then that requirement can bubble up from the uses of that operator.
 
nah
 
Yes.
 
1:12 PM
then I'd have to define a new operator for every concept.
not very workable.
 
Xeo
pff
 
plus, I'm pretty sure that essentially boils down to tagging your type.
 
Xeo
Haskell does it just fine
 
1:13 PM
@Xeo Having seen the code samples people have posted in here, "fine" isn't really what comes to mind.
 
Xeo
@R.MartinhoFernandes I actually tried that, where are those two defined?
 
@DavidKron It is.
 
@Xeo Control.Applicative.Infix. You need to cabal install it.
 
Xeo
Oh
 
1:13 PM
Last time I tried it didn't compile.
 
Or define them yourself.
 
so anyway
 
(<^) = flip (<$>)
(^>) = (<*>)
 
I intend to make interface constraints and semantic constraints separate primarily because I can trivially infer interface constraints and not semantic constraints.
 
@LucDanton Yeah, it seems unmaintained and not updated to newer GHCs or something.
 
Xeo
1:15 PM
And if you coupled semantic constraints with interface constraints, you could easily do so for the latter!
 
nah
there's no real difference in my mind between x swo< y and x requires swo;.
it's still the user explicitly stating that it has to be a SWO.
it's just a much less readable way of going about it.
 
Less readable than what?
 
than trying to remember which of the ten billion comparison operators that look like < but with some semantic constraint implied actually means SWO.
 
@DavidKron See this answer (to my own question):
2
A: Visual Studio 2010 automation and environment variables

Alois KrausIs it possible to start devenv by yourself inside your environment. Then get your hands on the running Visual Studio Instance via the running object table (ROT). // Get an instance of the currently running Visual Studio IDE. EnvDTE80.DTE2 dte2; dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServic...

 
Xeo
x `sless` y!
 
1:18 PM
@DeadMG That seems to be about writing it, not reading it.
 
@R.MartinhoFernandes Well, it's also a readability issue. If I sit down and read some code, then whether or not the operator <>£$"%^"> means SWO or not is not going to be in my head.
 
Why does it have to be an operator?
 
whereas if I see x requires SWO;, then it's written right there what it actually means.
 
Have a requires SWO(<) constraint while the code looks like x < y if you want.
Does syntax really matter at this stage?
 
Well, you could make it a function with a descriptive name as well.
Luc is the one who said "separate operator" so that's what I was thinking about.
 
1:20 PM
I don't distinguish between functions and operators. Which is why I have this super huge operators namespace lol.
 
@LucDanton Not particularly, no.
 
I assumed he meant operator in the same sense we consider std::swap an operator.
 
@DeadMG Then I think it's disingenuous to claim x swo< y is going to look 'ugly' since you just invented that straw syntax.
 
How common is undefined behavior behind a "it works on my machine" problem?
 
Xeo
@Pawnguy7 Too common
 
@LucDanton Yes, it simply didn't occur to me that when you said "separate operator", you might have meant something other than literally a new operator.
 
Well, that too. (Not distinguishing means it goes both ways.)
 
@Pawnguy7 If it was well-defined, it would work on all machines.
 
Xeo
add infix notation, and everything can be a new operator!
 
That said, I think something like Haskell's Ord is somewhat wrong. Did I mention I don't like the standard typeclass hierarchy?
 
1:24 PM
class Eq a => Ord a
 
I thought it was well defined. But according to dependency walker, it no longer needs the VS libs (the previous problem), but now it calls abort.
 
did I mention that I have five thousand lines of analyzer, where I'm going to have to replace almost all uses of Expression but not enough to use an automated replacement tool?
 
My best guess is it has something to do with the screen size.
 
@LucDanton I don't like that it attaches a single total order to a type. It should be something for functions, not types. That said, I don't know if the type system could support this properly.
 
shit.
I need to rip out so much of my analyzer, and my AST, and my parser, and shit, everything.
 
1:28 PM
user image
3
 
1000th visitor prize is missing.
 
Xeo
Hm... what are GADTs good for?
 
@Xeo A G and an E and you've got a gadget!
 
Sometimes you think you should use Rank2Types, but GADTs are nicer.
 
@EtiennedeMartel I love this show :)
 
Xeo
1:32 PM
What are RankNTypes? :P
 
Another powerful function is that they can allow the designer of the datatype to restrict the terms that make up the type.
 
@R.MartinhoFernandes Indeed. Someone should do something about it.
 
@Xeo You can use it to do apply f = (f 3, f "lol"), just like you were wondering earlier.
 
(I'm being so noncommittal right now)
 
anyone ever work on a project for a long time in a new language, then review the older stuff and think "oh god what was I thinking?!"
 
1:35 PM
@Crowz You don't even need a new language.
 
Old stuff in a different language?
 
@Crowz No one. Ever.
Kidding.
 
If you look at old code and don't think about something to improve, then you did not learn enough new things in the meantime.
 
Everyone worth its salt goes through that.
 
If you go data Expr a where Str :: String -> Expr String; Number :: Int -> Expr Int then you guarantee that there won't be any Expr Double in your program. Although if e.g. you make Expr a functor you can still have Expr [Int] and what have you. So there's some genericity, but not too much.
 
1:36 PM
@Pawnguy7 yeah I've been writing in python and javascript for the last two months, sometimes I wonder what I was even doing when I started
 
I find ugly shit in three month old code.
 
Oh that was a dumb example, you can (0 :: Double) <$ of course.
 
I certainly wonder what I was doing on some early projects, yes.
 
I've never used GADTs myself although I see them all the time in posts and papers, they're fairly grokkable (assuming you're familiar with ADTs).
 
holy shit
I really screwed up today, misread RAID as RAII in an exam
and gave that definition ...
fuck you C++
 
Xeo
1:40 PM
data Obj = forall a. (Show a) => Obj a

xs :: [Obj]
xs = [Obj 1, Obj "foo", Obj 'c']
... Type-erasure?
 
lol
 
ITT Lounge is obsessed with type erasure
 
@Xeo Yes.
 
Xeo
k
 
In that instance. Passing a rank 2 typed function around doesn't taste the same, I would say.
It helped me a lot when a paper pointed out to me that a universal quantification in a data constructor means an existential quantification when destructing. That's type erasure.
 
1:44 PM
I think I'm psyched up enough to implement CPS iterators.
 
u gon die
 
Xeo
what was that again?
 
@R.MartinhoFernandes CPS?
 
Xeo
function_output_iterator?
 
May 28 at 12:52, by R. Martinho Fernandes
Don't ask me what "CPS iterators" are. I don't want to know.
Read from there.
 
1:47 PM
@R.MartinhoFernandes thanks
 
@R.MartinhoFernandes It's likely related to defillibrators, my hunch :)
 
@R.MartinhoFernandes Church encoding?
 
@sehe according to jalf its Continuously Passing Something
 
Xeo
Time to torture my PC again
@LucDanton: Y'know, I was wondering how somebody on std-discussion would worry over copyability of functors, and only now I noticed that the thread was by you :P
 
Functors, not executors.
Copying a function is a big deal. That way lie continuations.
 
1:54 PM
Hello
 
@A.H. I was thinking CPR style
 
Xeo
@LucDanton Btw, Boost.Asio doesn't allow non-copyable handlers, no?
 
@sehe would be way more useful
 
@LucDanton whoa calm there :)
 
@Xeo It doesn't.
 
1:57 PM
@sehe He's right.
 
^ so apt for my workday
 
I hate that question in interviews.
 
I'm 90% certain signing the contract with the new company :/
I'm quite thrilled. Everything is starting to fall into place
 
Well, my mouse made its way to my dog's blanket while I was in the bathroom...
Surprisingly, it's not wrecked in any way.
 
@LucDanton Hmmm, now I forgot how I was planning to implement them :S
 

« first day (1059 days earlier)      last day (3907 days later) »