« first day (941 days earlier)      last day (4012 days later) » 

5:01 AM
@ScottW Or MLP.
 
Tee heee.
List comprehension is so... dirty.
@Rapptz So Haskell has no ordering for teh arguments?
 
not that I know of.
 
[ x*x | x <- [1..20], x*x > 144]
Is that order fixed?
 
the stuff before | is
but not after it I think
Why don't you learn set builder notation?
 
5:09 AM
@StackedCrooked "The Google Play music player is currently available in select territories" :(
 
Seems weird to make list comprehensions without even understanding what they are
 
@StackedCrooked The android app has been somewhat broken for the past year.
 
@Rapptz Too much work. :c
 
Noob.
 
@ThePhD It's pretty easy.
 
5:12 AM
D:
Anyways.
I'm thinking of overloading the comma operator.
Because I'm a badass like that.
 
Make the comma operator create an alert box on windows machines; Such that the sys. admin now has to login into the headless box, and press the "OK" button.
 
char **argv...? — Mehrdad 7 mins ago
^^ lol
 
I ran a profile on OpenMP program and _callthreadstartex uses 40% of my runtime. Does that mean my program is spending 40% of its runtime creating threads?
 
probably
Sounds like you've doing some fine-grained parallelism.
 
Basically when the thing takes 20 ms everything is good, but sometimes it takes 35 ms and I am sad. Then the profiler tells me that _callthreadstartex takes 40% of the time. I do a `#pragma omp parallel num_threads(2)` only once so I am a bit disappointed...
`
 
5:29 AM
guten abend y'all
 
5:46 AM
What is prelude ?
 
@ThePhD Default imported stuff in Haskell
 
Can you change Prelude ?
 
@ThePhD A supposedly-sporty car Honda used to make.
 
No.
 
@JerryCoffin Is it cheap? <3
 
5:48 AM
@ThePhD Only available used, so I suppose price depends on age and (especially) condition.
 
Ah.
 
@ThePhD That said, Hondas generally hold their value pretty well, so probably no (at least mostly).
 
I don't think I could ever drive, though. =[
 
6:08 AM
It won't be long until SmartGit becomes a full-fledged IDE.
 
SmartGit?
 
@ThePhD Best git client I've used.
 
Oh wow
That looks really nice. :D
Huh
It seems like I can't just have a lambda sitting out in the middle of knowhere.
I'm making Hascell.
 
6:24 AM
wtf
 
@LucDanton Template metafucks?
is cend and cbegin still a thing?
 
yes
 
Does std::cbegin() and std::cend() exist like std::begin() and std::end() ?
 
No
We talked about this yesterday
 
No, we talked about how it didn't exist for c-style arrays
I'm talking about const iterators and stuff.
I REMEMBER DIS SHIT
Well, see
That's rend
and rbegin
not cend and cbegin :c
 
Xeo
6:30 AM
begin(as_const(cont))~
 
cbegin and cend are the same as const container& cont and cont.begin() would give you the const iterator
 
as_const ?
 
So the distinction is pretty useless
 
Ooh.
Also
 
Xeo
template<class T> T const& as_const(T& v){ return v; }
 
6:30 AM
Good Morning @Xeo -kun~
... Would kun apply here?
Maybe senpai, or sama instead?
 
@Xeo template<typename T> T const&& as_const(T&& ref) { return std::forward<T>(ref); }
No regrets!
 
Xeo
@LucDanton as_const(as_lvalue(get_cont())) :D
 
:|
 
I see you too live without regrets!
 
Xeo
Also, T const&& won't collapse, will it?
 
6:32 AM
Maybe.
 
@Xeo Ye
 
Xeo
Or, if anything, it collapses to T&
 
@StackedCrooked Everytime I mouse-over the error box (Chrome), the error box immediately scrolls to the top. I can't even scroll down and see my errors in Coliru. D:
Uh oh
I'm getting the need to derive from std::vector<T>
 
Ell
What are you trying to do?
 
6:41 AM
Typical tomfoolery.
I told him I wanted to make a list comprehension thing for fun but he went overboard.
 
LOL
Shit
the comma operator has such horrible precedence
@Ell Why are you awake?
 
@ThePhD don't do it!
 
@ThePhD It's quite literally last.
 
Well, tits.
 
@ThePhD because its early morning here
 
6:42 AM
That's a problem, because I need it to be first.
or at least higher than operator |
 
lol
if you need to redefine the precedence of operators, I'd say you're doing it wrong
 
I'm not doing it wrong.
I'm doing me a Haskell (for great good)
I had it working but the operator precedence is basically baking the whole thing.
 
What?
You're doing Haskell?
 
@TonyTheLion Haskell++
 
He's being stupid :|
 
6:44 AM
I'm being amazing
 
oh
fuck sake PhD, get it together :)
 
He wants to emulate haskell's list comprehension syntax in C++
 
@Rapptz Does the | in a Haskell list comprehension go on the right or the left?
 
I think @LucDanton has done that.
 
learn set builder notation
 
6:45 AM
Listen, you.
And your "set builder" notation.
 
learn set builder notation
 
Ain't got time for this math shit. There's compiler errors to be making.
 
Xeo
@ThePhD For a reason
And you can just build an AST through expression templates and manipulate precedence yourself by delaying evaluation of the a | b part until all b, c, d, ... parts have been evaluated.
@ThePhD Also, Luc tried something like that before, and I think he ended up with something like (_a + _b)[_a <= r1, _b <= r2]
 
@Xeo Uh. I guess I'm learning expression templaces then...
 
Xeo
(Psst: Boost.Proto)
 
6:55 AM
:c
But
 
@Xeo Lol this is a lot better than anything he's doing syntactically
 
But but but ;~;
@Rapptz HOW DO YOU EVEN KNOW?
 
That's exactly like goddamn Haskell syntax.
Except with lambdas. D:
Also, HAH
I got my example working.
Needed parenthesis though
I guess I'll have to use Boost.Proto if I want to make it parenthesis-less
But it looks really nice and does exactly what Haskell does.
@Rapptz There's your goddamn List Comprehension
 
It's horrendously ugly. Congratulations.
 
7:00 AM
It's beautiful, shut up. :c
 
Also wasn't remotely close to what I was talking about besides the straight forward predicate and transformation
Anyway gj I guess. Going to sleep.
 
Oh come on, it's list comprehension and it's syntax is as close to Haskell's as I could make it. D:
q_q
 
It's ugly.
 
YOU'RE ugly. D:
Okay, it's not as pretty as it could be but still.
It does what it's supposed to. D;
 
Is there an existing library for using ASCII escape codes in standard output (cout)? I'm planning to make one. Just making sure I'm not reinventing something.
Damn slow connection...
 
Xeo
7:03 AM
@ThePhD Erm...
 
@ThePhD god, it's ugly. ;) But pretty good effort, I'd say.
 
Xeo
Tis ain't Haskell list comprehension
[ a + b | a <- xs, b <- ys, a `mod` 2 == 0, b `mod` 3 == 0 ] is.
You only have the guard parts
and build the range on the lhs of the pipe
whereas the lhs is for how single elements of the resulting range should be built
 
Oh.
Well, then, I quit.
@Rapptz You're on your own.
 
Xeo
You should first understand how the syntax (read: syntactic sugar) of another language actually works before trying to copy it.
 
I don't even understand what the right side of that pipe is doing
What teh hell is xs and ys
 
7:09 AM
> read set builder notation
 
Limits?
Fuck set builder notation. D:
 
It was good advice!
 
Nobody likes list comprehension. Don't use it.
 
xs and ys are lists
 
@Rapptz I dunno, it's quite an extensive subjects.
 
7:10 AM
Well, at least the basics.
 
Oh well.
 
I'm going to sleep now.
 
I think I'll jsut write a LINQ library instead.
Because that's based on operators and structs
 
and I can do that no problem.
@Rapptz Yes I saw that, thank you. D:
 
Xeo
7:11 AM
@ThePhD lists
 
@ThePhD Read Appendix A of this: diku.dk/~torbenm/Basics/basics_lulu2.pdf
 
@MarkGarcia >_>
How does that help me?
I'm not writing a compiler.
I can't change the language syntax without some crazy shit.
 
@ThePhD It has a pretty concise tutorial of sets and set builder notation.
Appendix A
 
Xeo
Hm, interesting to think of the a <- xs part as another predicate. Makes sense in math notation, actually.
 
I can't do the results on the left side
comma operator isn't strong enough
At least, not without some parenthesis.
 
7:16 AM
@Xeo It's actually easier to think of it as a predicate, esp. when you're focused on the mathematical side.
 
Xeo
@ThePhD Which is why Luc opted for (_a + _b)[ _a <= r1, _b <= r2 ]
 
Also, it breaks if I use the lambda directly.
 
Xeo
@MarkGarcia Yea
 
Because obj[ [ ] ] <-- is all kinds of illegal.
 
Xeo
[[ is, but [ [ isn't
 
7:18 AM
@Rapptz Is it not that project where pfultz used that nasty trick (and claimed it was fine)? I can't find it back, odd.
 
[ [ isn't illegal?
 
Xeo
That was Pythy
 
Thanks!
 
Pythy?
 
[[ ]] is attribute syntax
 
7:19 AM
Ya know I can see the connection between Pythy and Linq: I'm not revisiting that kind of stuff until I have C++14 lambdas.
 
Xeo
heh
 
@Pubby That explains it.
 
That's what it feels like I'm doing too.
 
If I use operator() instead and do Haskell( ... )
 
Xeo
@Rapptz Go to sleep
 
7:20 AM
I would but this ping is so loud!
 
Xeo
Turn your PC off?
 
okay okay sleep.
I have bots running
 
it breaks because [] only takes 1 operand (and forces the expression to compile-down into 1 item) while operator() can take multiple items.
Which also breaks teh comma operator
Basically, the comma operator sucks dick.
 
@ThePhD Do you mean parameter/argument?
 
There, operand.
The comma operator is so weak it might as well not be there at all.
I suppose, though, for list manipulation, I could just use a different operator
 
Xeo
7:22 AM
It's good that it has such a low precedence.
 
Like & or something.
bitwise AND ranks about two "steps" better than |
So I could force better right-hand evaluation with &
This builds with a warning, but it looks a lot nicer: coliru.stacked-crooked.com/…
We can also eliminate the Haskell[ ... ] now that we're using operator& for filtering purposes.
 
@ThePhD is Coliru more stable lately? or is it still acting weird
 
@StackedCrooked It's still wheeling my error message box to the top everytime I move my mouse inside of the box.
I can't scroll down unless I do it manually, and then remain perfectly motionless or don't touch the error message box.
It's up-time has been fine for me, though
I've been using it for the past 2 days for everything.
 
@ThePhD What browser are you using?
 
Chrome
 
7:30 AM
I've never seen that before.
The output box scrolls to top if you move the move pointer over it?
 
Yep
Make a bunch of errors
make the box small
and then move the mouse over it
it snaps to the top
 
On Windows?
 
Yeah
Windows 7, Chrome, Version 26.0.1410.64 m
AdBlock+ and Popup Blocker (but the second is disabled for Coliru)
 
I haven't tested on Windows yet.
I should do that probably.
 
Meh. shrug
 
7:37 AM
It scrolls to top if I resize the output.
 
Hm. Moving my mouse carefully, it only scrolls to the top if I get close to a clickable error message.
 
@DeadMG IIRC this room isn't for hiring C++ consultants.
 
0
A: Lazy logic and temporary values to improve the reading of an expression

PubbyCheck this out: if(const bool isEven = value % 2) if(const bool flagsChecked = value ^ weirdFlags) if(const bool inRange = (value > threshold) && (value < ceiling)) if(const bool foo = /* lots of comparisions */) { /* do something*/ } Magic!

^variable declarations in if considered useful
 
Cute, but not the good kind of cute.
 
Xeo
@Pubby Very much so
Atleast for optional
 
7:45 AM
@StackedCrooked I've been having trouble with Coliru lately. I keep getting "execution expired" or stuff not compiling.
Hm, now it's working again. Dunno.
@LucDanton What is the good kind of cute?
 
@Pubby You are!
 
:3
 
D'awww.
 
7:57 AM
Wut.
Wow, it becomes a game.
How nice.
 
Hm.
I think I broke coliru.
For me, anyways.
The page won't load anymore. Dx
I dun wanna go back to ideone. D:
@Xeo ^ Final list comprehension
I can do basic n1 - n0 list creation and basic n0 to n1 list creation, as well as filtering and other stuff.
I don't know what other constructs are possible in Haskell but that's the best I can do knowing next to nothing about Haskell. :D
 
Jesus christ man
Tag that NSFW
@StackedCrooked Coliru is slowing down / not compiling at all. Something happen?
Oh
Execution expired...
@DeadMG You said my functor_chain sucked. Any particular reasons why?
 
8:15 AM
o_0 am I the only one around here thinks that SFW?
oh do y'all just start fapping automatically to any bit of flesh you see?
 
Uh.
I dunno, I think the mostly-naked women would qualify it as NSFW.
I mean, if my boss swung by while I had that open...
 
@thecoshman NSFW does not mean "I'm getting a boner", it means "I do not want my boss boss who just walked by to wonder wtf I'm looking at and why I'm looking at it"
 
Razi vai
 
@thecoshman ok, from reactions to this, I'm not going to click that while I'm at work.
also, good moarning!
 
My boss would have absolutely no problem with it, but I still don't want it to just pop up on my screen (while I'm at work) with no warning.
 
8:20 AM
I miss the Polar Bear :(
 
Whoa.
My Haskell ranges work right out of the box on MSVC. o.0
 
Woah
unbe-fucking-lievable
lol
 
@TonyTheLion it's only been one day!
 
I know! One day too long
 
you have abandonment issues :P
 
8:33 AM
lol
So my driving test in a bout 2 hrs
please kill me
 
@TonyTheLion 🔫 Bang!
 
You alright now?
 
Yea
thanks
I feel ready to face my doom
kek
I'm making this so overly dramatic
because I can
lol
 
@TonyTheLion I still have a lot with me: 🔪 💉 💊 👾 👻
 
8:41 AM
@TonyTheLion ah, it canny go too bad :P good luck
@MarkGarcia those must be some deadly boxes
 
@thecoshman The first three. The rest are for the unlucky ones.
 
Thanks guis3!
 
@TonyTheLion Good luck.
 
:)
Woah, it's gone dead in here now
 
8:57 AM
chat-necrosis
 
Zombie reporting in... Good luck, Tony!
 
Xeo
@thecoshman Awesome
 

« first day (941 days earlier)      last day (4012 days later) »