« first day (1260 days earlier)      last day (3671 days later) » 

Xeo
8:01 PM
Which effectively means: Nullable t => t causes an empty optional, and Nullable t => Maybe t an engaged optional with nulled content
does that make sense to you?
 
no.
let's backtrack a second.
8 mins ago, by DeadMG
and furthermore, how do I even describe a function which takes null as a valid parameter?
 
Xeo
k
 
here, I've solved the problem by just saying that Optional should solve the problem; rather than defining how Optional can solve the problem.
I mean, what would Optional's assignment operator to null look like with Nullable(T)?
 
Xeo
@DeadMG well, do you want the function to be polymorphic on the argument that might be null'd, or do you want an Optional parameter there?
 
8:05 PM
well, neither.
you can't take an Optional parameter there because you're back to square one w.r.t. OR, it has to accept null and null alone and be a better match for null than Optional(T) is.
and it's certainly not polymorphic on what is to be nulled, the Optional(T) is to be nulled.
 
Xeo
Wait, you want a function that only accepts null?
I think you lost me there
 
well, the only reason the previous solution solved the problem is that operator=(null_t) was a better overload when given null than Optional(T) or a potentially-nullable T.
if I want to apply that solution, I need an overload I can pick that is better than all other choices when given null.
then I can define what that means when given null in the implementation.
 
Xeo
ok, I think I got you
 
you'd still run into problems if given an optional(null_t), but I think I'm fairly happy calling that PEBKAC.
 
Xeo
Hm, overloaded assignment / construction makes it difficult indeed with polymorphic null. Lemme try something.
 
8:15 PM
yeah, I'm also finding it hard to imagine how I would define a constructor from null :P
 
why are ints longs in python 3+? :|
 
Because the distinction is not very useful?
 
going out is becoming an effort
it's just sad that every saturday night I have to convince myself to go see my friends
 
I've had that today
 
Integer types were unified in Python 2.2, long was just kept for compatibility
 
8:23 PM
early start tomorrow and I was out last night, so I can't be arsed with much more than a night in on SO and the xbox
but it's saturday and I won't be back until weds
-.-
can I pretend that you sorry bunch are my friends?
 
no.
:P
 
I doubt so
 
;)
 
I'm going to reach into your brain and rip out the cerebral cortex if you attempt such a thing.
with the power of my genius totally unbiased perfection.
 
8:26 PM
how do you guys resist the temptation to always talk about something, even if you don't know anything about it?
 
well first I solve world hunger
 
like, you go out and people start talking about things you don't know or don't care about for all the evening. At some point I just have to intervene in the discussion, no matter what that is and just say something.
 
Xeo
@DeadMG This is my idea, i.e. it all depends on the type of the null: coliru.stacked-crooked.com/a/156abd98a250eaa9 Of course I'm in too much of a Haskell mindset here, since Haskell doesn't have something like 'overloaded constructors'. Instead, it simply has different data constructors.
 
Beh
Just make Pointer non-nullable and use Maybe Pointer
I don't see why yet another layer would be useful
 
@Jefffrey I don't
 
8:30 PM
but that leads to poor performances that make you look like an idiot
 
@Jefffrey Don't go out with people who you share no interests with?
 
@Jefffrey if you don't know, you can ask what it is. If you don't care, you can try to change the topic.
 
@CatPlusPlus Doesn't solve anything, you'd still have to define a constructor from null, and the problem exists for any nullable T, not just Pointer.
 
@CatPlusPlus that pretty much equals to: don't go out with people that are in your city
 
Xeo
@DeadMG Have nothing else nullable, except Optional :)
(at which point you can forego the Nullable concept and rename Pointer to Reference)
 
8:33 PM
Yeah I don't really see the problem
 
just make it up
it's not that hard
 
Xeo
@CatPlusPlus In Haskell I think it can get kinda annoying to always go Just $ actually interesting stuff here, which is why I think that an ADT having an intrinsic "null" constructor might make sense
 
null is just Nothing I don't see why introducing another way of saying Nothing makes it any better
 
Xeo
(also pattern matching, or just general introduced verbosity. but that doesn't seem to be a problem in a C++-like language)
 
Also meh
Explicit is good
 
Xeo
8:36 PM
Sure
 
oh, yeah, yesterday I was reading about type classes and I thought about this: why doesn't Haskell splits the Num type class into, I don't know Addable, Subtractable, etc... so that you can overload +, -, /, etc for your own types where that makes sense?
 
Xeo
@Jefffrey Robot also doesn't seem to like the standard numerical hierarchy
 
Compatibility. Also classes like that have really weak laws
There are preludes based on algebraic structures
 
Xeo
Also, I think you actually want Ring, Group, etc
 
Xeo
8:39 PM
But I think to make that hierarchy work, it would be nice to have the ability to provide implementations of type class methods in 'subclasses', i.e.
 
@CatPlusPlus right, but at least you don't have to invent a new symbol for those operations for data types like a vector (2/3/4d point) or matrixes or whatever can be summed together.
 
2 mins ago, by Xeo
Also, I think you actually want Ring, Group, etc
 
Xeo
class Super a where; super :: ...
class Super a => Sub a where; sub :: ...

instance Sub Something where
  super = ...
  sub = ...
I think there was a proposal for that or something similar?
 
@Xeo Not really needed
 
@Xeo Seems to me like rather than defining a constructor from null, you've effectively defined a new null constant for every possible Nullable.
 
8:44 PM
It's called polymorphism yes
 
shut up Cat.
 
Xeo
@CatPlusPlus Sure, not needed, but seems to be useful.
 
@Xeo Oh, right. That's what I was looking for. Thanks.
 
user1804599
@Xeo I was thinking about that too.
 
@Xeo And it also seems to me like you basically dodged the problem by removing e.g. operator=(T). b = Some 5 is rejected.
 
user1804599
8:54 PM
Yay. My lexer works.
 
Xeo
Again, Haskell doesn't have the concept of overloaded constructors, so yeah. Just remove overloading from Wide :P
 
heh
that'll never happen
so null_t it is then.
 
So I'm with Tony right now and we're talking about how were all assholes.
 
user1804599
Hi Tony. :3
 
hi tony
 
Xeo
8:56 PM
how did that happen?
Did I miss something?
 
well, when two men love each other very much...
 
lol
 
Xeo
@DeadMG You might actually be able to work both in, if you make null_t constructible from Nullable t => t and make that construction preferred for OR
Anyways, why not do as Cat said and remove null-ness from Pointer?
 
eh, it doesn't solve the actual problem at hand, an Optional(Pointer(T)) is just the easiest construction of that ambiguity.
 
Tony says lol
 
8:58 PM
and secondly
whilst I'm not necessarily a big fan of nullable pointers, I feel like I'd get kickback from a lot of people used to other C-style languages, which nearly universally offer nullable pointing by default.
 
Xeo
Remove pointers! (s/Pointer/Reference/)
 
kek
oh, and I'd have to totally special-case Optional(Pointer(T)) even in the specification for C++ interop.
and deal with all the ABI fun that would involve too.
 
Xeo
Remove C++-interop!
 
by now you're just saying "Become Haskell" :P
 
Xeo
Hey, I didn't yet say 'Remove mutability!'
 
9:01 PM
yeah but I could just feel it coming
 
Xeo
nah
because at that point, you could just drop Wide and use Haskell
 
lol
 
Xeo
(Remove mutability!)
 
there we go
bah, what was I even working on
right, concepts.
 
user1804599
I hope to get this to compile and run before the end of April.
 
9:07 PM
depends on how many special cases you're willing to hardcode and how much implied meaning/functionality you're willing to cut.
after all, you could make it compile and run by invalidating every other program, then hardcoding the output.
 
user1804599
io and string will be built-in for now. :P
 
heh.
and let me guess, string.Encode and string.UTF8 will have little to no actual meaning
and you'll be writing an interpreter instead of a compiler, right?
 
user1804599
Especially since io requires system calls.
 
user1804599
@DeadMG No I want to use LLVM.
 
ah I see
well you'll be able to enter the joys of garbage-collecting (I assume?) that string
 
user1804599
9:10 PM
Just malloc and leak. :P
 
ah I see
easier to declare it a constant and just have string be a char*
then it would be pretty easy to hardcode the implementation of io.write in terms of your favourite system calls.
 
user1804599
True dat.
 
then it frankly shouldn't be too much effort.
end of April is a very generous deadline, depends on how much time you have available I guess.
 
user1804599
I’m writing parser now.
 
oops, I missed Earth Hour
 
user1804599
9:12 PM
Which shouldn’t be too difficult for this particular code.
 
eh
 
thanks Facebook for telling me about it an hour later
 
both lexer and parser are pretty irrelevant.
 
user1804599
But need to be done anyway. vOv
 
true
all I'm saying is, how many lexers and how many parsers have you written now? :P
 
user1804599
9:12 PM
I could hardcode the AST, but I want at least some play with the example.
 
user1804599
Like creating multiple functions and stuff.
 
Xeo
weird
I'm getting normal salary for this week
but it seems to be 1/3rd of my monthly salary, instead of the expected 1/4th
 
normal salary sounds good.
 
Xeo
Oh yeah, I still haven't thought of any troll question for April 1st...
can't use di-/trigraphs again this year
 
user1804599
x/*p
 
user1804599
9:18 PM
Nah, too silly and boring.
 
Xeo
hm, literal links in code might be an idea
 
user1804599
I am not sure as to how to represent names.
 
been done.
 
user1804599
Array of strings I think.
 
but then so has digraphs/trigraphs.
frankly, you'd have to go quite out of your way to find something decent
I know of so many too-overdone C++ jokes.
 
9:19 PM
write a fake proposal and ask a question about it
 
Xeo
@DeadMG but not in the style I did my bearded lambda question :P
 
@Xeo It was still terribly unamusing.
digraphs/trigraphs been done to death.
you need new material.
 
Xeo
Well you're a dog, what do you know about amusement?
 
woof woof
OTOH I do spend all day every day doing nothing but trying to amuse myself.
so you could argue that I am a master of amusement.
or lack thereof.
 
9:31 PM
hey
 
i've recently started to pop up more often in std-discussion
 
riddle time?
 
27.7.3.1/3 is great:
> If badbit is on in exceptions(), the output function rethrows the exception
without completing its actions, otherwise it does not throw anything and treat as an error.
 
lol
it it doesn't complete its actions, it can't rethrow the exception, right?
or is there something else great with it :D
 
It fucks me off when this happens
@JohannesSchaub-litb The English is exceedingly hacky
 
9:43 PM
@LightnessRacesinOrbit why does the output function set the bad bit on forced unwind exceptions?
 
@JohannesSchaub-litb I'm sorry?
 
I have no idea
 
is it just me or that code is unreadable?
 
> [C++11: 27.7.3.1/3]: If one of these called functions throws an exception, then unless explicitly noted otherwise the output function sets badbit in error state. If badbit is on in exceptions(), the output function rethrows the exception without completing its actions, otherwise it does not throw anything and treat as an error.
Does that answer your question, @JohannesSchaub-litb?
@AndyProwl It's not just you.
 
9:48 PM
What a day! No work, Stoke won and the Chelski coaching staff have been told to take Mourinho's belt and laces and check he's OK every 15 minutes throughout the night - he's on suicide watch after the Palace match:)
 
@LightnessRacesinOrbit i was in the impression that the forced unwind exception is internal magic that pthread throws on cancellation points?
 
Oh - and it's beer o'clock:)
 
anyway, do they really call malloc/new when doing cout << "foo";? wtf
 
9 hours ago, by Jefffrey
I like how Vlad's bio just says "Unemployed."
^^ no comment
@Xeo Yes, Tony's on the other side of the world right now.
 
@JohannesSchaub-litb I have no idea.
 
10:05 PM
0
Q: Why does cancelling a pthread in an IO function of istream / ostream set the badbit?

Johannes Schaub - litbI was looking into libstdc++ code and was surprised that it sets the badbit on a stream when an operator>> or operator<< is interupted by a cancellation point of pthread (which, if I understand correctly, is implemented by throwing a special magic exception object). Apparently, the C++ Standard...

@LightnessRacesinOrbit ^^
 
@Mysticial :)
 
user1804599
Hmm.
 
hi
 
user1804599
My syntax for function application is expr expr but Yacc says it’s a conflict. :V
 
well, of course it is.
expr expr expr -> expr(expr expr) or expr expr(expr)?
 
user1804599
10:09 PM
Yeah.
 
if you're using a C-derivative grammar there can be other forms of ambiguity I believe
 
user1804599
Okay, resolved it.
 
user1804599
expr : callExpr
     | nonCallExpr
     ;

callExpr : expr TokBang
         | expr nonCallExpr
         ;
 
what is a build system that doesn't suck?
 
@JohannesSchaub-litb ok
@nightcracker It is one that you can use without undue pain.
 
user1804599
10:20 PM
Rebar.
 
like what I would find ideal is something like a python script with some filesystem/globbing tools as well as a dependency/update checker for rebuilding object files
 
@nightcracker None really.
 
most build systems try to go way too far =/
like fully abstract the entire build process, but that's just futile IMO
tools, environments and library configurations are too different to just abstract
(for C++, at least)
 
ballls.
 
a compiled language with a package manager built-in and only one reference compiler with a consistent interface between versions could use an abstract build system really easily
 
10:22 PM
I thought I'd doubled the power of Fail Eleven to Fail Twelve, but it was only ~65% increase.
 
Gutted. Can't book holiday today. Have to wait until Monday (payday)
Being back in debt sucks!
Though to be fair it was to buy a house so I had good reasons
But this is bringing back memories of abject poverty *sigh*
 
fuck it, I think I'll write my own build script
 
@LightnessRacesinOrbit Could be worse- at least you have a payday.
 
user1804599
Yay parser works.
 
The C++ Stack Overflow chat. — Benjamin Gruenbaum 7 secs ago
:P
@rightfold for real?
@nightcracker famous last words :D
 
10:30 PM
@BenjaminGruenbaum hah
basically all I want is a depedency resolver =/
 
@nightcracker I've been enjoying fez, but that's for node.
Generally, since that's all it does :D fez.github.io
 
looks good
 
for posterity:
goddamn I wish I could see 'dem bananas
also goddamn question deleted too quickly
 
>Yes, and the best place to do so is in the C++ chat in stack overflow, very newbie friendly.
 
When did this room cease being the C++ Lounge?
Also, I found him a better chatroom: chat.stackoverflow.com/rooms/50160/hack
 
10:33 PM
in long forgotten times
 
> 7 Thanks, @BenjaminGruenbaum. Thanks a lot. 🍌🍌🍌🍌🍌🍌 – Lightness Races in Orbit2 mins ago
 
It's even named "Hack", obviously the right place
 
@LightnessRacesinOrbit :)
 
@LightnessRacesinOrbit nice!
 
@BenVoigt When the minorities attacked.
 
10:36 PM
His final comment asked about "useful illegal programs". I think we deleted the question prematurely. Should have waited until it hit -10<sup>10</sup> and permabanned him
How do you do superscripts again?
 
Like you did, they just don't work in chat markdown
 
@BenVoigt Like that
they just don't work in chat
it also has some message ordering problems
 
Yeah, I suspect because balpha thinks that it's possible to create mutexes from user level code.
 
@BenVoigt I hadn't even spotted that
 
10:40 PM
Or at least used to.
 
@BenjaminGruenbaum :D
 
This is the Lounge. Don't we prefer snakeexchange?
 
@LightnessRacesinOrbit No no, it's true. He uses localStorage with his own hand rolled concurrency totally missing on locking between checks and assignments rather than using storage events.
 
Chat is coded Very Well (tm)
 
10:41 PM
I called him on it in the tavern once, seemed to not care that much.
 
where is the c++ lounge i need help
 
balpha.de/2012/03/… such wrong, very wow, very atomic.
@Hellovart it's the room called "PHP"
 
@Hellovart sorry, this is the minority lounge
 
realy.... php...
 
> If you're white, straight, or employed, go away.
 
10:42 PM
im not white, im straight, im not employed
 
also PHP is a Pretty Helpful Persons lounge
 
You lost anyway
 
damnit
 
Also, PHP is the language @LightnessRacesinOrbit codes in most of the time - so there's that.
In this room, only @Cat is nice - the rest of us are assholes.
 
> On the Stack Exchange Chat, we have for a long time been using the localStorage as a way for several chat room tabs the user may have opened to communicate with each other, so that only one of the tabs has to talk to the server, and can pass the received data on to the other tabs. This communication is also used for a few small other niceties; e.g. when a user closes a notification in one tab, this is communicated to the other tabs, so they can close this notification as well.
That's nice
@BenjaminGruenbaum Er, it is?
 
10:43 PM
@LightnessRacesinOrbit it's not?
 
er, no.
 
You do code a lot in PHP, no?
 
I thought that was PERL, still the champion write-only language. Want to make a change? Don't edit, rewrite.
 
@LightnessRacesinOrbit nice, but check out the implementation on bitbucket - it's kind of very wrong :P
 
@BenjaminGruenbaum On some projects, but it's waning lately. Certainly C++ has always been my predominant language and it covers at least 95% of my work, to a resolution of approximately six months.
@BenjaminGruenbaum I'd have to study it in detail but off the top of my head are you sure the browser doesn't make this safe? Nobody in the comments seems to have a problem with it
Browserland JS is a funny beast
 
10:45 PM
@LightnessRacesinOrbit good for you, I like c++ a lot better than PHP
 
@BenjaminGruenbaum Yes so do I
 
@LightnessRacesinOrbit browser makes it safe - with storage events. That's what storage events solve. Also, they solve the problem he's solving there trivially.
 
Worth noting it's C++03. The only C++11 I get to write is here or on Coliru.
 
They have cross browser shit.
 
@BenjaminGruenbaum I shall take your word for it
 
10:46 PM
@LightnessRacesinOrbit why :'(
But... but... C++11 is acceptable, C++03 has so many more shortcomings :(
 
Isn't "Which do you like better, PHP or C++?" the question used to identify flesh-eating zombies?
 
It's actually a case of a language evolving nicely :(
 
@BenjaminGruenbaum Legacy, mostly. There is a new project I'm working on and I came very close to getting us to use C++11 for it. We even got the toolchains set up on some of the project's dev servers. However I don't want to touch the toolchains on our main build server without a damn good reason.
 
@BenVoigt I get why people might like PHP better, it's GC'd, dead simple and has lots of shit built in. Also, you pretty much shut down the whole process for every request so no leaks, etc.
 
It is in the pipeline. Thing is I can't really risk destabilising existing/old/legacy product builds.
 
10:47 PM
@LightnessRacesinOrbit I consider c++11 a damn good reason, but we might not agree on that.
Oh, can't you have two build servers?
 
In the current state you can pretty much only use C++11 for new projects
 
And I don't want to over-complicate the build server with multiple toolchains
 
because transitioning support for existing projects is hard because it'll break builds for many many people
 
@BenjaminGruenbaum No way I can convince the firm to purchase and find space for a second build server just so I can play with C++11
 
plus C++11 support on compilers is still lacking =/
 
10:48 PM
@LightnessRacesinOrbit how expensive is your build server? Our build server is just a standard 600$ computer
 
@BenjaminGruenbaum No, a few syntax improvements here and there isn't a good enough reason. Personally I want to make the switch, but I can't build a case for management and if I were them I wouldn't go for it either.
@BenjaminGruenbaum $600 > $0. Then someone has to find rack space for it. Then someone has to set it up. Then someone has to manage it and set up backups. We have deadlines; we can't be wasting time fucking around with a new build server when it doesn't solve any existing problem
 
@nightcracker better templates, better classes with initializers, move semantics, type inference, better standard library.... I don't really think I need to convince you it's more than a few syntax improvements here and there.
 
@BenjaminGruenbaum did I ever claim that?
@BenjaminGruenbaum I claimed compiler support is lacking
 
@nightcracker replied to you, and responsed to Lightness :/
 
@BenjaminGruenbaum /shakes fist
 
10:50 PM
All that being said, like I say, I want to get a second toolchain up and running on our existing server, but we need cross-compilers and it's all a bit fragile. I need to wait until we're safely out of crunch time.
 
@LightnessRacesinOrbit then we have different philosophies, I can totally see myself spending 600$ and a few hours on setting up a server for a better technology toolchain in the long run. I hate needless technical debt. + I think that c++11 makes my life easier.
 
@BenjaminGruenbaum "It's dead simple." I think that makes my point.
 
everyone knows that C++ is just a glorified brainfuck
 
@nightcracker is it? my version of clang is almost C++14 ready
 
@LightnessRacesinOrbit they are horrible people
 
10:50 PM
@DaveRandom :D
 
@BenjaminGruenbaum Our philosophies do not differ one bit; our practical circumstances seem to.
 
@nightcracker yes, it has a lot of shit in and no one likes it, but there are no real alternatives and it's effective I guess :P
Unless you like all the boilerplate in C :D
 
@Jefffrey it's not the compilers that HAVE support that's important, it's important to note that there are MANY compilers WITHOUT support
 
@LightnessRacesinOrbit ok I guess.
 
You don't go reconfiguring your main build server two weeks before product launch. And we were always tight for time on this one. I just can't take it on myself to risk fucking up everybody's work for several days when there is no existing problem. There is no way to sell that to the people that pay my salary.
Besides I've been working nights so don't have time
 
10:52 PM
That does sound like a task for after crunch time
 
Just after 1.0 I'm going to get it done, then transition our code for 1.1. All the points of improvement are marked. Much technical debt should be avoided, yes, but that's not a reason to abandon all your important responsibilities in favour of playtime. C++03 works fine for us and has done for a decade.
 
@LightnessRacesinOrbit why do you put up with that work environment?! :)
 
@LightnessRacesinOrbit doesn't have time
 
If your deadline is tight I totally get waiting.
 
sits in lounge
 
10:52 PM
@ScarletAmaranth interesting work often compensates for work conditions.
 
The work conditions are just fine
The practical realities stop me from going crazy installing unstable GCC trunk and every manic compiler extension I can find. They are a good thing!
Plus, I'm pretty much the only one in the team who will grok even half of the new C++11 stuff; I don't really want people attempting move semantics and getting them horribly wrong, because C++11 makes it easy to get them horribly wrong and not know about it
 
here goes!
fasten your seatbelts!
:D
 
I'm gonna open a beer
 
user1804599
Well.
 
user1804599
10:57 PM
Parser works. Time to implement static analysis. :V
 
@rightfold, what are you parsing
 
user1804599
Styx.
 
user1804599
use io;
use str;

func Print (text: string) {
    io.Write io.Stdout (str.Encode str.UTF8 text);
}

func Main! {
    Print "Hello, world!";
}
 
user1804599
This parses successfully now.
 
@LightnessRacesinOrbit just the simple stuff like auto and additions to the standard library can make a difference, but I totally get waiting until after a production build
 
10:58 PM
nice
 
@BenjaminGruenbaum I want ranged-for more than much else. Though some of my iterations are too complex for that, so I want auto for the iterator types, too.
 

« first day (1260 days earlier)      last day (3671 days later) »