« first day (1228 days earlier)      last day (3737 days later) » 

10:02 AM
which database is that
 
user1804599
Neo4j.
 
lol. shoulda told
of course that works
Soooo. I wanted to play around with the R# for C++ beta, but it expired(?!) already. Anyone have an even more recent build than Jan 27th?
 
user1804599
 
user1804599
, go solve it!
 
busy with that
 
10:07 AM
well that's a great tool. Let's you search for labels to merge to your current view, but you can't then select one of those to use, you have to manually type it in.
Yeah... I'm back to being fucked off at clearcase ಠ_ಠ
 
user1804599
Hey @thecoshman.
 
user1804599
Can you use ClearCase from the command-line?
 
Hey @rightfold
You can
 
user1804599
Write scripts that provide a better UI. :P
 
user1804599
Or use AutoHotkey.
 
10:08 AM
it is marginally less painful to do so
@rightfold IIRC NoMachine stops AHK from working :(
@rightfold might do...
 
user1804599
lol
 
oh god, a non trivial merge in a god class... I am genuinely scared to see these conflicts.
 
@sehe I think so.
Lemme check.
 
Coolness
 
@rightfold erm, why would you have function foo call itself when in a receive block? Does that receive just sit there waiting for something, so you have to call it so it can receive the next thing?
 
10:12 AM
I have a uint32_t, from a network frame format. It should be interpreted as an IEEEwhatever float. *reinterpret_cast<float*>(&theInt) breaks type-punning rules. How am I supposed to do it?
 
user1804599
@thecoshman can you give a code example?
 
user1804599
Functions that call themselves are used to implement loops.
 
@rightfold sure, one sec.
 
@sehe Ah, nope. January 27th is also my last one.
@LightnessRacesinOrbit memcpy
 
@R.MartinhoFernandes kthx
 
10:13 AM
@R.MartinhoFernandes ah. too bad.
I'll be in Vim if you need me :)
 
user1804599
@thecoshman receive blocks quit after they receive something or after a timeout if applicable.
 
user1804599
If you want to receive two things, you need two receive blocks.
 
user1804599
And a loop is a generalisation of doing the same thing twice.
 
user1804599
And recursion is a particular implementation of a loop.
 
@rightfold see here
@sehe it really is a state of mind :P
 
user1804599
10:18 AM
You need to loop there because you want to keep receiving and forwarding messages until receiving stop.
 
ooooh... I think I see
 
user1804599
Without the loop() call, the receive block would quit and the process would terminate after receiving one message.
 
does that mean that it only handles one message at a time, then loops around to 'receive' again. a) are messages buffered by the VM for you then? b) how does that not SO due to call itself over and over?
 
user1804599
Messages are queued and a receive operation dequeues the first element that matches any of the patterns.
 
@thecoshman Trivial infinite recursion is an infinite loop in any decent compiler; not a stack overflow.
(Yes, that includes C++ compilers)
 
10:21 AM
@R.MartinhoFernandes so it's ~optimized~ into working?
 
user1804599
Erlang has to do tail recursion optimisation because this is the only way to loop.
 
@thecoshman Stack overflow is an implementation detail.
 
user1804599
If a call is the last thing in a function, it is guaranteed to be a tail call optimisation in Erlang.
 
ok... I think I get it.
 
@Robot That was a nifty little chat Q&A, right there, innit?
 
10:22 AM
I can at least work with it :P
 
user1804599
If you say loop(), ok; instead of loop(); it will eat memory like the plague when it receives lots of messages. :P
 
@LightnessRacesinOrbit You mean with memcpy? I have an answer about that posted somewhere, btw.
16
A: Fast Inverse Square Root algorithm in modern C++

R. Martinho FernandesForget casts. Use memcpy. float xhalf = 0.5f*x; uint32_t i; assert(sizeof(x) == sizeof(i)); std::memcpy(&i, &x, sizeof(i)); i = 0x5f3759df - (i>>1); std::memcpy(&x, &i, sizeof(i)); x = x*(1.5f - xhalf*x*x); return x; The original code tries to copy the initialize the int32_t by first accessing...

Sadly the question is... :S
(Edited)
Fuck you chat.
I like that answer because it also includes comments with the usual bullshit.
 
user1804599
@thecoshman Also this is fun: gist.github.com/rightfold/9206433. Try to start that process, then modify the loop function to print something additional in the {From, Msg} clause in the source file and reload it using c(echo). in the shell, send {self(), foo} and see what happens. Now send reload and send {self(), foo} again.
 
"Oh but memcpy slow cast fast I have no idea what I'm talking about".
 
@rightfold you just add the 'reload' message handler?
 
user1804599
10:31 AM
@thecoshman yeah.
 
yeah I've just learnt about those :P
 
@LightnessRacesinOrbit Also, that fast inverse square root thing annoys the hell out of me.
 
user1804599
Start the process with the code I gave, then add io:format("Hello~n"), somewhere in the receive block in the {From, Msg} handler, then use c(echo), then send {self(), foo}, then send reload, then send {self(), foo} again.
 
it's quite nice that you can do that.
 
Soooooo I finally caved and globally defined _SCL_SECURE_NO_WARNINGS on MSVC.
 
10:32 AM
will do in a bit, in theory I have work to do :S
 
I mean, it's impossible to trace the source, and it's somehwere in a boost / cppnetlib header.
@R.MartinhoFernandes I was gonna edit it just now :)
 
No -isystem in MSVC is painful.
@sehe Edit what?
 
Or that
@R.MartinhoFernandes The Q titlte
 
Ah.
What annoys me is the Fast InvSqrt() deal, not the title.
 
InvSqrt? you mean...Sq?
 
10:36 AM
1/sqrt(x)
 
oh right :P
 
That codegen comparison is pretty amazing tinyurl.com/ovrrlgq (Godbolt)
 
It annoys me because "OMG someone used Newton's method to compute a square root" (that's surprising?); because "OMG Carmack" (not); because they didn't even do it properly and just trial-and-error'd the constant.
 
@R.MartinhoFernandes is the constant off?
AAAAGRGRAGE MSVC Stop being dim
 
user1804599
@sehe I like this tool too. assembly.ynh.io
 
10:41 AM
I have a
#define unreachable_code() \
    logicErrAssert(!"unreachable");
 
user1804599
Y u macro.
 
user1804599
> KPN neemt de VARA over van de PvdA.
 
where logicErrAssert throws a logic error in the obvious case. However MS is too fucking dumb to notice that this is a statically constant condition expression and hence keeps complaining warning C4715: 'foo' : not all control paths return a value
@rightfold because I actually want the compiler to see the throw statement there (and SHUT THE FUCK UP)
 
user1804599
Make it a function with [[noreturn]].
 
user1804599
vOv
 
10:43 AM
Right. That's gonna go smoothly with MSVC right
 
user1804599
No, the current code works smoothly with MSVC.
 
I don't see what you're solving.
 
@sehe Yes. It's good, but sub-optimal because it was just eyeballed.
You must rename this to at least InverseSquareRoot. A square is not a square root. I would go as far as naming it FastInverseSquareRoot to make its trade-off of accuracy for speed explicit. And since we're on it, there's no reason to use 0x5f3759df other than as a nostalgic tribute to the original code. The constant 0x5f375a86 produces the most accurate results. — R. Martinho Fernandes Jul 22 '13 at 14:42
 
why should we click?
 
10:50 AM
^ Courtesy of my boss. //cc @ThePhD @melak47 @Borgleader
@sehe it's about OpenGL, so probably won't be of interest to you
lol
the video could have ended at that
 
@BartekBanachewicz They know about it.
They posted it before.
 
oh well. I thought the other video was posted
@R.MartinhoFernandes Better to dismiss as "seen already" than miss altogether, methinks.
 
Ah MSVC Is the ICE-ing on the cake:
c:\work\pocpp\src\azure\storage\table\cloud_table.cpp(20): fatal error C1001: An internal error has occurred in the compiler.
  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\ehexcept.c', line 956)
   To work around this problem, try simplifying or changing the program near the locations listed above.
  Please choose the Technical Support command on the Visual C++
   Help menu, or open the Technical Support help file for more information
 
11:11 AM
ಠ_ಠ what the fuck has happened to my new tab page
 
Oh, and MSVC gets confused with raw string literals inside macros (my unit-tests)
Too cute
 
11:27 AM
@sehe yep. it sucks =\
it also can't digest escapes in raw string literals in macros
 
Ah, that was the culprit here
It's amazing
I don't particularly like raw literals anyways. Whenever you /need/ them, you know you're already deep in the water
 
@rightfold 'spawn'... that's more or less saying 'call this function, in this module, and run it as a separate process and let me continue'... right? The third argument is parameters?
 
@sehe They're pretty much required for using regices.
 
@R.MartinhoFernandes Yeah I meant like it was a nice quick to-and-fro. Just what chat questions should be :)
@R.MartinhoFernandes Oh god yeah
 
11:43 AM
vim... substitution... how do globally? and not just current line?
ooooh, start it with %
 
@thecoshman :set gdefault too.
(Or add /g at the end everytime)
Without it it only replaces the first one in each line.
 
yeah, I knew about trailing g, but I didn't realise that only defaults to a local global :P
oh, you confirm each swap too, very swish :P
now I know what it looks like, you think I'm starting to like vim, what with all it's rather sensible once you learn them things and swish little features, but it still sucks... because.
hung.... it can even do ranges to do the regex over :|
:g/^baz/s/foo/bar/g
oh my...
that's some might fine shit right there :')
 
wow
the part of the video when he shows the context/frame recreation is amazing
It feels almost impossible
 
12:06 PM
hm, yeah, very good talk
those tracing tools they've talked about look very promising
@Xeo I have another, even more funny problem; how to write a += b where both a and b reside in the state :F
I can imagine something like get >>= a += extract b
 
needs proof
 
needs a helper function I think
 
Xeo
@BartekBanachewicz a <~ (+) <$> use a <*> use b, maybe
 
what the...
 
Xeo
12:16 PM
<~ runs a monadic action, and stores it in a lens
 
I got get >>= \s -> player.inst.position.x += realToFrac (view (player.speed) s) to work
@Xeo ooooh
 
Xeo
similar to <- in do-notation
 
shiiinnyy
 
Xeo
would look even better with wings, a <~ use a <^(+)^> use b
I think that should work, anyways
 
it's pretty scary
 
user1804599
12:23 PM
@Xeo cum operator!
 
user1804599
@thecoshman Yes.
 
user1804599
But you can also pass a closure like spawn(fun() -> … end), or a node (to run it on a different computer in the network).
 
I love typeclasses
instance Glisha.Drawable Player where
    draw p = draw $ _playerInst p
and theeeeen
use player >>= glishaDraw
 
morning
 
user1804599
12:27 PM
You usually want spawn_link such that if the child crashes, you crash too and vice versa.
 
user1804599
You can catch crashes with trap_exit.
 
a: I did not know they were wrong b:I have better things to do than sit here trolling stack, literally that code (which is posted above) is in my compiler, I run it, it works fine other than it does not multiply. — Marriott81 1 min ago
oh dear
 
hiya
 
@LightnessRacesinOrbit now whos trolling :P, not sure what it was, but I went through and rewrote it all and it worked, I dunno if it was wrong code (tho I had no other forms open?) — Marriott81 1 min ago
called it
 
who needs java to be verbose?
 
user1804599
12:44 PM
 
user1804599
#region increment i

++i;

#endregion increment i
 
haha
i found a stylecop rule that prevents regions
 
I remember thinking that regions were cool back when I was 15 or so
 
if I knew how to i would configure the gate check in
I'm fighting with two consultants who are region lovers, they have "20 years of experience" (the argument they use)
I switched over from fighting to just deleting them when I see them
if they don't go away I'll write a script to do it
 
Oooooh
I found so many operators
<||=
 
12:49 PM
20 years of experience with regions? Impressive.
 
C# has 13 years.
 
I'm glad someone knows math
 
maybe it was 20 years between them
 
1:17 PM
They have 20 years of experience in being useless consultants
 
@BartekBanachewicz "We're also committing to support the compatibility profile" Sigh
 
Well, they have to, seeing as every implementation ever is like GL 1.1 and you have to dig out all the newer stuff
 
Also I like how there's "If Valve is pro-OpenGL, why do they ship their games with DirectX on Windows?" comment under that video and it can be answered with "because Intel" which is double funny in context
 
is it terrible?
 
1:26 PM
@TonyTheLion yes this is
 
I'm not interested in butt crack
 
don't hate me, kz? crack needs <3 too!
 
@CatPlusPlus hihihihi
@CatPlusPlus Erm, that has no impact in what they support in a debugger.
 
I canny workout what this clearcase merge tool is telling me o_0
 
Oh, I thought you were talking about Khronos
Not like I watched that long-ass boring video
 
1:28 PM
Creating a compatibility context just to get a core context and discard the compatibility context straight away is pointless to debug.
 
Debuggers have to support entire thing, otherwise people with shitty code will complain and debuggers will lose customers vOv
 
> doIknowThatThisMethodMaybeSlow
what the fuck? why is that a parameter for a function?
 
@CatPlusPlus Oh gawd the replies on it. Such nonsense.
> oh, and Source originally ported in D3D that's why they made Source 2 which ports to OpenGL. even the most recent Counterstrike GO was still made with the original source engine and the engine automatically ports to D3D.
"automatically ports to D3D" is genius.
> confused by earlier errors, bailing out
been a while.
 
user3010322
5th Century == 400 -> 500 AD, right?
 
user1804599
No.
 
user1804599
1:42 PM
401 to 500.
 
user1804599
There is no year 0.
 
user1804599
1st century: 1 to 100
2nd century: 101 to 200
3rd century: 201 to 300
4th century: 301 to 400
5th century: 401 to 500
 
user3010322
Ah.
 
user3010322
Mmkay.
 
user1804599
1st century BC: 100BC to 1BC :P
 
1:44 PM
@ThePhD If you used the (400,500] notation, it would have been right. :)
 
user1804599
@wilx [401, 501) because 400.1 isn’t in the fifth century.
 
user3010322
If he specifies Z+ as the domain, he's okay
 
@rightfold Years are whole numbers.
 
user1804599
Depends.
 
user3010322
(Z+ being all positive integers)
 
1:45 PM
Years are timespans, not whole numbers!
 
lol
OK.
 
user1804599
Also interval notation is terrible as per xkcd.com/859.
 
user1804599
Use set builder notation. :v
 
@rightfold Heh.
 
Bob the set builder.
2
 
user1804599
1:48 PM
lol
 
user3010322
I took a trip through tumblr a bit earlier.
 
user3010322
The world is really full of spite. ;~;
 
that's a bit over the top
I <3 you
so there's at least one person that has no spite
 
user1804599
ノ┬─┬ノ ︵ ( \o°o)\
 
1:59 PM
flip it
 
user1804599
(╯°□°)╯︵ sɹǝpɹo
 
user1804599
Table flip.
 
hahah
 
Ah yeah, I read about that
 
2:08 PM
its a bit of silly rule, because what is the probability someone is going to make a one way trip to mars in the next 5 years?
 
@TonyTheLion Well, people are planning it
 
> planning
exactly
my point
 
it looks pretty unrealistic, but a company is planning it and has asked for volunteers and whatnot
 
I did read that
 
I guess it helps them figure out if it's ok to volunteer for the trip, whether or not anything ever comes of it
 
2:10 PM
I suppose
 
At least it's ok if you buy a return ticket.
 
user3010322
They're going to launch people by an expected 2024.
 
user3010322
So. vOv
 
'memcpy(sendbuf + (2+ 2*ETH_LEN), msg, strlen(msg));' - I don't even have to look at the rest of the network code.
 
user3010322
2:11 PM
Lolololololol.
 
I kind of like it. Considering how busy other religious authorities are with telling you who can marry who and such, I think it's pretty sympathetic to instead focus on "can you volunteer for a one-way mission to Mars without getting into trouble with your god"
 
@MartinJames haha, strlen
> I am a little too fond of good old mother earth for a one-way trip to a barren red planet.
 
@R.MartinhoFernandes It's free rep when n00bs do it but, when seemingly experienced developers, writing complex code, still do not understand the basics of the language they are using, it just amazes me.
 
Yes this is possible — sehe 13 secs ago
@R.MartinhoFernandes in the side bar "men accused of sexually abusing cows". Now.. /that's/ disturbing
 
2:26 PM
Men, not one man? :)
 
@jalf Yeah, religion is the goto norm-maker to prevent accidents (whereby entire societies just vanish because of "fad" like, I dunno, everybody building a tower to the heaven going on one-way trips to Mars)
 
@sehe Hmm? I have no idea what your point is. (Or what you read into what I said)
I'm just saying that given what other religious authorities waste their time on of actively harmful stuff, I like ones that instead go "Thou Shall Not Get Thyself Killed On Mars"
 
@jalf Or On Thee Way, Thy Heathen.
 
Thy Way, Ye Heathen?
 
Thee, I think?
 
2:31 PM
Anyways I was clearly making fun of the relative sense-makingness of it
 
Ye sounds more like the name of a pub or something. "Ye Olde Heathen"
 
> sense-makingness
 
Ah, clearly
 
that's a thing?
 
Of course
 
2:32 PM
@TonyTheLion sense makery
 
nah, the correct word is sensification
 
AbstractSenseFactory
it makes sense
 
@AlexM. that... was actually pretty good.
 
trying as hard as I can boss, thanks
 
2:43 PM
MSVC's crappy EBCO is annoying.
 
what's crappy about it?
 
It is close to nonexistent. Sneeze a bit too hard and it's gone.
 
user3010322
^ this.
 
user3010322
Makes tuple ordering hard and shit.
 
user3010322
Makes having base classes in general just a useless exercise.
 
2:53 PM
well base classes kinda are useless
inheritance-based schemes are meh in general
 
@BartekBanachewicz Oh, shut up.
 
@R.MartinhoFernandes yeah, inheritance master race, everyone use C++
:F
remember to use a lot of templates.
 
I use composition, primarily.
That it takes the shape of base classes is incidental.
 
user3010322
IIRC, I think the order for MSVC for EBCO to kick in was... left to right?
 
user3010322
As in, once you had one non-empty base class, the rest of the empty base classes went bananas.
 
2:59 PM
@R.MartinhoFernandes composition via inheritance gotta be the new design pattern
 
@BartekBanachewicz It's old as fuck.
 

« first day (1228 days earlier)      last day (3737 days later) »