« first day (1456 days earlier)      last day (3493 days later) » 

3:00 PM
other than that it looks essentially valid
 
What's ?: again?
 
I see
 
@sehe [TestCase("1.2E-3m", 1.2e-3)]
 
@JohanLarsson Validator.Range Method (Double, Double, String) for starters. Or just TryParse (what's the context)
 
user1804599
3:00 PM
Still not sure about letbe vs let=.
 
@Johan The only thing you're missing is that .2 is valid in C++. Whether that matters to you is your call.
 
Some languages consider 0. to be valid IIRC
 
@sehe problem is I need to extract the double from a string containing other things <value><unit symbol>
 
@Sofffia Yes, like C++
 
@JohanLarsson you mean, parsing :)
 
user1804599
3:02 PM
That regex doesn't match any Styx float literals. :D
 
So yeah should be \d? inside the second optional capture I guess
depends on your requirements
 
@LightnessRacesinOrbit yeah, hacked that one. Will use formatprovider next
 
@rightføld Yay, another impossible-to-Google programming language
what is wrong with people
 
@LightnessRacesinOrbit gonna test it in C# ty sir
 
@LightnessRacesinOrbit That's not impossible to google. "Styx + programming" would be plenty clear. It's just that it exists in the same sense that Wide exists (only, less mature)
 
3:04 PM
it lives in this chat
 
So, google this chat
 
@sehe excuse for writing a pattern like that?
this chat is indexed by google no?
 
Yes
 
@JohanLarsson nah. use ANTLR, CoCo/R or sumtin' else
13
A: Does C# have (direct) flex/yacc port? Or what lexer/parser people use for C#?

Andre ArtusI think your best bet is going to be GPLEX/GPPG, it's the closest thing to Yacc/Lex for C# that I know of, and you will need to port your actions into C# regardless. I have also used Coco/R, ANTLR (of course), and have more recently played with Irony.net, fslex/fsyacc (F#), and fparsec (F#). He...

 
@sehe Ok genius tell me which result under google.co.uk/webhp?q=styx%20programming is the language in question
 
3:05 PM
Not sure whether they come with ready made numeric parsers
@LightnessRacesinOrbit None (didn't even have to look at it).
 
@sehe Right, so how is it not "impossible to Google"?
 
How is that relevant if it "doesn't even exist" (ICBWT, since you're getting so agitated)
 
..... what?!?!
 
styx is @rightføld's language of course google wont find it, its not done yet
 
@sehe don't want a lib for this simple parsing all I'm parsing is "1.2 cm" ect
 
3:07 PM
I said it's impossible to Google, which is true, because it does not appear in any Google search results, even for the search phrase you said "would be plenty clear" in your argument that "that's not impossible to Google". You make no sense.
 
3 mins ago, by sehe
@LightnessRacesinOrbit That's not impossible to google. "Styx + programming" would be plenty clear. It's just that it exists in the same sense that Wide exists (only, less mature)
 
googling is easy
 
Oh okay let's just repeat all our messages
that's fun
 
@LightnessRacesinOrbit Note the tail ^
 
What about it?
 
3:07 PM
@LightnessRacesinOrbit your blood pressure, watch it
 
It is obviously impossible to Google a language that is not on Google
 
@LightnessRacesinOrbit It does
 
> It's just that it exists in the same sense that Wide exists (only, less mature)
IT DOESN'T EXIST
 
user1804599
It seems styxlang.org is not indexed by Google. :P
 
3:08 PM
WHICH IS WHY IT IS IMPOSSIBLE TO GOOGLE
what is your problem?
 
@LightnessRacesinOrbit lol. really. Well, fine, I'm happy you found such an amiable way to agree
 
fucking hell sehe
plonked for good this time. had enough of your bullshit
 
It accidentally handles .1 :)
test passed
 
@JohanLarsson how? o.O
 
collapsed
all green
 
3:09 PM
Where are the tests with bogus input?
 
user1804599
My idea is that you have to add an f, d or m suffix. Without it, it's a syntax error. There is no default to Double.
 
TIL People can complain about things that are "impossible to google" - regardless of whether they exist. I guess I expect too much logic.
 
@rightføld m for magic?
 
Consider my mind blown
 
user1804599
m is for Decimal like in C#.
 
user1804599
3:10 PM
No idea why they chose m (money?).
 
money
 
really?
that's lame
 
I use it for metre
 
damn capitalists
 
Why? You mostly need decimal floating point for money.
 
3:11 PM
What?? You shouldn't be using decimal floating point for money!
 
Why not?
 
user1804599
@FredOverflow Don't want accidental use of Double especially with type inference.
 
Are you kidding me right now
 
Are you confusing decimal floating point with binary floating point?
 
3:11 PM
 
No, though the former is certainly better than the latter
Money is actually fixed point, usually in cents or tenth-cents or your equivalent
There is no reason to use floating point with it, ever.
 
@LightnessRacesinOrbit What about converting between different currencies?
 
You're just opening yourself up to quiet, hidden precision problems
@FredOverflow What about it?
 
user1804599
The correct data type for representing a monetary value is MonetaryValue.
 
user1804599
Which keeps an amount and a currency.
 
3:12 PM
@LightnessRacesinOrbit Well, if you convert 1 US cent into eurocent, you get 0. That's not very good, is it?
 
std::make_tuple(52, buttecoin)
@FredOverflow What you were expecting somebody to put 0.62123523487 eurocents into your bank account?
newsflash: world doesn't work that way
 
No, but what if you multiply that by 1000 before you put it in your bank account?
 
Then convert 1000 US cents into eurocents and get the right answer
 
user1804599
Speaking of which, my compiler can now almost parse this: gist.github.com/rightfold/9ca65e0843434a58f685
 
But I like associativity :(
 
3:13 PM
But tough
 
come back when you can analyze it
then you can have a cookie.
 
This is precisely the problem. People assume money is associative. It's not. It has a fixed lower bound on precision
That's why you use fixed point
 
user1804599
I can analyse part of it!
 
@Puppy How was your... 2nd? 3rd? week at the job?
 
user1804599
The function calls and the literals. :P
 
user1804599
3:14 PM
Not the imports though.
 
i guess they haven't fired him yet
 
@LightnessRacesinOrbit Ok fine, you win.
Where can I find your floating point moneyfesto, so I can forward people to it in the future?
 
@FredOverflow ;)
 
user1804599
@FredOverflow How about 1234.5678b8 where you can specify the base? :D
 
@rightføld The b doesn't stand out very well. Would other characters work better, maybe?
 
user1804599
3:16 PM
How about b for base 1, bb for base 2, etc?
 
bbbbbbbb
 
@rightføld The "TeX" way would be 1234.5678_8
But you probably want _ for digit separators already?
 
user1804599
I want no digit separators.
 
@rightføld Base 16 is going to be a pleasure.
 
user1804599
lol hexadecimal floating point.
 
3:19 PM
@FredOverflow good.
 
Ell
@LightnessRacesinOrbit impossible to google means that were there any pages google had indexed, you wouldn't be able to reach them in the first place because the terms are full of special characters or would give results for other unrelated pages
 
user1804599
@FredOverflow 1) fuck large magic numbers and 2) you can do e.g. 1e6d if you want a million.
 
user1804599
I have never felt the need for digit separators.
 
10 ^ 6 ftw
 
All constants are magic numbers yes
 
Ell
3:20 PM
"not on google" is different from "impossible to google"
 
user1804599
@Ell The former is a subset of the latter.
 
@rightføld At least it's precise ;)
 
Ell
@rightføld I disagree
 
user1804599
I don't.
 
Ell
@rightføld you can't :P
 
user1804599
3:22 PM
Bullshit.
 
Ell
how can you disagree with yourself?
 
@Ell It means whatever I say it means.
 
Ell
@LightnessRacesinOrbit to you of course
 
@Ell To you as well
 
Ell
but it doesn't always mean that to other people
@LightnessRacesinOrbit well. no not really
 
3:23 PM
@Ell The barber shaves every man who doesn't shave himself or something.
 
Ell
Words or phrases mean different things to different people a lot of the time
 
@rightføld Did you miss the place where LRIO presented me with a page of search results, challenging me to identify which search result to choose for the programming language Styx? [The point is, had the language been publicized, it would not have been hard to google.]
 
@Ell You have obviously been brought up inadequately by your parents.
 
Ell
@LightnessRacesinOrbit I disagree with this also
 
@Ell Yes, it is true, unfortunately; lots of people are very often wrong. But I can't do anything about that!
 
Ell
3:24 PM
@LightnessRacesinOrbit Of course when you say wrong you mean they don't agree with you
 
@Ell Those are the same thing.
 
Ell
which isn't the same thing
 
@LightnessRacesinOrbit It is bad for morale if you fire someone after 2-3 weeks. It's best to wait a month or two before finding some excuse to take out the trash:)
 
You must have skipped all the Tomalak Prayers at school.
 
Ell
@LightnessRacesinOrbit No offence man but I don't think you know everything there is to know
 
3:25 PM
@MartinJames You assume that a company who saw fit to hire Puppy is not intellectually bankrupt ;)
@Ell No offence taken; I know that your ignorance is not your fault. You have been led astray by false teachings.
 
Puppy is smart
 
@LightnessRacesinOrbit I couldn't possibly comment..
 
Puppy is intelligent and clever and knowledgeable and highly capable. I wouldn't necessarily extend that to "smart"
@MartinJames of course not!
 
@Sofffia A well-known truth.
 
Puppy is also a jerk
 
3:26 PM
For one thing, he's still here
 
We are starting the memory and storage upgrades in the New York data center.
 
nobody smart sticks around in this dump
 
@LightnessRacesinOrbit That is a very dangerous combination.
 
@Feeds what, again? will you do it right this time?
@MartinJames Yes :(
 
Ell
@LightnessRacesinOrbit then why do you persist to erm "bless" us with your presence, all knowing one?
 
3:28 PM
@Ell because my omnipotence has reduced my smartness
 
Ell
@LightnessRacesinOrbit to all knowing from... ?
 
@Ell I think you misunderstand what "smartness" is. It is orthogonal to all-knowingness.
 
'Smartness' is not telling everyone at the progress meeting that the design is inherently flawed and can never work, (after they've spent 70M on it:).
 
-1
A: How to make an array with a dynamic size? General usage of dynamic arrays (maybe pointers too)?

manueli tried to declare and array using this: int* x=new int[]; this allows me to have an unlimited array size. i record values by this: int end=0; int index=0; while (end == 0) { cin >> x[index]; if (x[index] != 0) { index += 1; } else ...

wow, great "answer" :D
 
@MartinJames It is if it's true.
 
3:31 PM
@Puppy lol - sadly, I've worked on a couple of those:(
 
> this allows me to have an unlimited array size
 
@FredOverflow I had to downvote virtually every answer to that question.
 
I daren't open it.
 
it's the usual run of new[].
 
Guessed that:(
 
3:32 PM
Does new int[] actually compile??
 
an oldie but a goodie:
@Noah Clark: What book are you reading to teach yourself Python? It's not very good. I'd like to know so I can recommend against it. — S.Lott Jul 2 '09 at 18:34
 
@FredOverflow I dunno - I would never try it.
 
S. Lott, I'm actually using yours! Should I stop using it? — Noah Clark Jul 2 '09 at 20:55
 
user1804599
inb4 GCC language extension
 
I like the virtual destructor on this one.
 
3:35 PM
that was the "virtually"
 
user1804599
I'm losing all my rep to downvotes dammit.
4
 
@rightføld I've managed to lose only one today.
 
Don't open that question then.
Also the question doesn't even specify what language to use.
 
Thank you for sucking terribly and causing everyone reading to write terrible code? Not in this universe. — Puppy 2 mins ago
Rude. Flagged. Try again.
 
I think I'll buy this one. And if it's any good, he gets a twin brother.
 
3:44 PM
seriously, out of all the submissions made by students that I've taken a look at; no one is using explicit correctly. either they mark all constructors as explicit, or they do none
freakin' heck
 
you'd best teach them better!
 
"all constructors" include the copy/move-constructor
 
@FilipRoséen-refp you know who to blame now dont you? :P
 
Is it legal C++ to declare a multi-argument constructor as explicit?
 
@Borgleader it's not me, it's the "real" course leader; but honestly it's the students, the assignment says; "make sure that the you mark appropriate constructors as explicit", and they got a book
 
3:45 PM
Probably
 
@FredOverflow yes
 
@FredOverflow Yes. It's explicitly allowed.
 
Guys I have a tricky one: Recieving json on a stream, want to have a jsonreader read it and write tokens to a stream or something. Then a token reader will read this something. What is the something in C#?
 
@FredOverflow and it makes a lot of sense in C++11
 
@JohanLarsson Another stream? Events? An MT queue? Whatever is more convenient?
 
3:46 PM
Lounge<C#>
 
What would the other stream be? A memorystream would just fill until OOM no?
@LightnessRacesinOrbit don't be jealous
gonna google MT queue, sounds rightish
 
Yes no maybe I don't know
 
@FilipRoséen-refp Because of the {} syntax for constructors, right?
 
@CatPlusPlus events is a nice idea, ty cat.
events + rx perhaps
 
lol (prolly a repost but w/e)
 
3:51 PM
@Sofffia yes, I can't see the paste at coliru but it's because of braced-initializers
 
well I did buy fresh mushrooms to see if the sauce tastes better vs. canned mushrooms
it was also 3 times cheaper
but FML, I spent 2.5 hours preparing them
 
I think I'll order pizza
 
considering the sauce take 15 mins until it's done and the spaghetti 8 mins to boil
it's fair to say I spent more than enough time cleaning mushrooms
 
user1804599
I thought of making @debug let x = … and @experimental let x = … raise warnings when x is used in production mode.
 
user1804599
(Applies to types and modules as well.)
 
4:01 PM
How clean do your mushrooms have to be?
 
user1804599
 
Does that answer the question?
 
@TomW there's a thing on the cap's surface that goes off
you have to remove that first of all
 
user1804599
It points you to a place where you can find an answer.
 
btw, the horseshit they grow them in is UV-sterilised so although having particles of manure in your dinner may sound unpleasant, it's not like it'll make you ill. Mushrooms are more vulnerable to bacterial infections than you are
@AlexM. I have never done that, I eat mushrooms quite a lot, and I've never had any ill effects
 
4:04 PM
I don't like spots on my mushrooms or anything like that
take that thing off and it's white
 
* if you shop in supermarkets who get all their produce from giant agribusinesses
 
user1804599
Only in silly countries bad mushrooms are sold.
 
this is how I do them
 
user1804599
This is how I clean my mushrooms: not.
 
user1804599
4:05 PM
I just eat them raw out of the box.
 
user1804599
Sometimes cooked.
 
user1804599
For 19 years. Never been a problem.
 
Likewise. I trim off the scabby bit of the stalk but the rest of that stays on as well. They're basically homogenous all the way through
 
what's a good C++ IDE for working with OpenGL?
 
@corvid Any IDE is fine for that purpose.
You just have to include the right header files and link to the right libraries.
@rightføld except your penis fell off
 
user1804599
4:11 PM
lol
 
user1804599
user image
2
 
user1804599
Well, let's implement a GC.
 
user1804599
Shit, I think I need to depend on UB.
 
Does anyone of you know if ** in .gitignore files was added after git v.1.9.3?
 
Why don't you read the release notes?
 
4:17 PM
371
A: Matching numbers with regular expressions — only digits and commas

tchristWhat’s a Number? I have a simple question for your “simple” question: What precisely do you mean by “a number”? Is −0 a number? How do you feel about √−1? Is ⅝ or ⅔ a number? Is 186,282.42±0.02 miles/second one number — or is it two or three of them? Is 6.02e23 a number? Is 3.141_592_653_58...

 
weird question, but I've noticed python interpreters online. Does anything similar exist for C++ or java, or is that exclusive to interpreted languages?
 
@LightnessRacesinOrbit poor q, nice answer
 
omg like every new question is just total crap with shit titles
SO is done
and there is a new question every 0.0000000000000005 seconds
 
> Ok fine, I typed all the others in without any syntax errors either, but I’ve been doing this for a while.
 
4:25 PM
Nope
** doesn't work on 2.0.1
 
> All erupted with joy, praising Jesus and embracing one another in tears.
oh fuck off
 
so. Is there any difference between visual studio and visual studio express?
 
user1804599
Oh woot llvm.init.trampoline intrinsic.
 
user1804599
That's useful.
 
Scratch that. ** was indeed introduced after 1.9.3.
 
4:29 PM
@corvid Yes.
 
anything a terrible C++ programmer would notice or care about?
 
You cannot install plugins on express
 
I think the debugger is limited also
 
@corvid Express doesn't cost anything.
 
s/be a maths genius/be capable of basic arithmetic/ (thanks BBC for further stigmatising the ability to multiply three numbers)
 
4:32 PM
are things like OpenGL considered "plugins"?
 
No. OpenGL is just a library.
I don't think the word "Plugin" has any meaning in C++ world.
 
> Comparing rival operators might need major calculations
fuck me -.-
 
all the math on that chalk board kind of looks like middle school algebra
 
it's high school stuff
and I'd argue that's closer to calculus than algebra
 
looks like algebra to me
but I don't think it's trivial objectively
it might be for some of us, but considering the possible range of customers of a post service...
 
4:38 PM
nvm, I saw that infinity and thought it was about limits
 
@rightføld It's not tremendously useful.
 
user1804599
Ok.
 
TIL if you find the derivative of ln(ln(ln(...))), you get a leaning tower of lns
 
there's lots of restrictions on where and when it can be used.
and there's no way to know how much buffer you need.
better to just employ a real JIT (say, the one that ships with LLVM) to JIT trampolines
 
I interpreted that infinity as a set builder, like {x (element of) R | x < 2 or x > 4}
 
4:41 PM
@corvid btw this page includes a list of limitations
 
@AndyProwl it's sad how the majority of people can't do "basic" maths
 
I suck at math .-.
 
are you any good at maths tho
 
I love math, but I'm not particularly good at it
 
what about maths?
 
4:46 PM
oh I am a total genius at maths, I only suck at math
 
what is this, the UK? It's math here in 'Murickah
 
@corvid the Lounge is not "'Murickah"
 
user1804599
for (std::uint32_t i = 0; i < object->type->memberOffsetCount; ++i) {
    auto member = reinterpret_cast<styxrt::Object*>(reinterpret_cast<char*>(object) + object->type->memberOffsets[i]);
    recursivelySetMarked(member, newMarked);
}
 
user1804599
This is so terrible. :(
 
I don't even get what it is trying to say
 
4:49 PM
did you write it?
 
I'd use a range-based for and extract some of those sub-expressions into separate functions
that should improve readability
 
user1804599
lol
 
I'm not kidding :P
 
user1804599
Range-based for doesn't work on std::uint64_t const*. :v
 
Just define your own integer range and instantiated it from 0 to blabla->count in your range-based for
 
4:52 PM
@rightføld Just don't forget that the object at that member has to be a real styxrt::Object* and not a derived class pointer.
 
user1804599
It is.
 
user1804599
This is terrible hack.
 
user1804599
 
we're all hacks
 
4:54 PM
lol reinterpret
 
user1804599
struct Object is just the common start of all objects, but what comes after that depends on the user's data types (i.e. in LLVM IR I have { %type*, i8, i32, other members here }).
 
@Borgleader I don't think I'm a fraud
 
user1804599
And the offsets to those members are needed by the GC.
 
user1804599
Maybe I should generate recursivelySetMarked in LLVM IR separately for each type.
 
user1804599
4:56 PM
Oh wait shit I need one more star I think.
 
user1804599
So auto member = *reinterpret_cast<styxrt::Object**>(reinterpret_cast<char*>(object) + object->type->memberOffsets[i]);.
 
@rightføld That would be a good choice.
 
@CatPlusPlus Thats basically the plot for "The Last of Us" but with mushroom spore virus replaced with Ebola
 
4:59 PM
Not really
 

« first day (1456 days earlier)      last day (3493 days later) »