« first day (2020 days earlier)      last day (2930 days later) » 

3:03 PM
@fredoverflow Is that video worth watching?
 
@DmitriBudnikov I'm gonna guess: 72704 bytes reserved for exception handling
 
@Borgleader it's 5 minutes, you can find out easily :) (I fucking hate that interviewer guy btw, I'm glad I haven't seen him recently on MS events)
he interviews people like Erik Meier on something like applied category theory in FP yet he can't write code - his questions are always out of place
 
give this guy an SO account
@ScarletAmaranth Cinch IRL
 
3:17 PM
@ScarletAmaranth hmm, prob wont watch it then
 
@DmitriBudnikov Better that than badware that swaps in all of its memory just to free everything on exit
 
wow is that Butt Plus Plus
defending cplusplusse
 
@DmitriBudnikov Sorry, but that's utter nonsense. As is obvious to anybody with an IQ higher than his hat size, the problem here is valgrind, not C++.
 
3:24 PM
@CatPlusPlus lol
 
@JerryCoffin he meant it transitively as to speak about Valgrind being implemented in C++! (is it in C++ I don't know :P)
 
> If your partner isn't faithful, at least your mattress is
 
Who buys this?
 
@R.MartinhoFernandes People
When you stop to refuse that most of the people are fucktards, dumb IoT starts making perfect sense
cue Worstthingsforsale (I still read that regularly)
 
3:34 PM
@R.MartinhoFernandes but does it come with global leaderboards
 
Also mindless rejection of IoT is as silly as its mindless adoption.
 
@BartekBanachewicz indeed, mindless adoption is silly - you need to check genetic history and such
(ideally you want to meet both parents in person but that's not always possible)
 
@R.MartinhoFernandes competitive people that want to reach the highscore in everything they do
 
@ScarletAmaranth lol
 
I assume that’s why it tracks performance
 
3:38 PM
@ScarletAmaranth No, it's in C (at least the parts I've looked at were).
But, it was supposed to be semi-funny (blaming valgrind for pointing out the problem, rather than the compiler for causing it).
 
@BartekBanachewicz IoT is just the same old automation we've always had plus domotics that make your house insecure plus the silly things.
 
I actually got invited to apply for a job in Berlin that wants to automate everything
I should've replied with a link to factorio
@R.MartinhoFernandes some ideas are nice tho
 
Given how hard is to upgrade firmware in some hardware, we'll end up with Internet of Compromised Things
fucking locked down routers
 
you know we're all responsible for improving that
first step being demonopolyzing C as embedded language
 
second step stop actually locking down devices
 
@BartekBanachewicz Step 1: write a complete IP stack in Rust (or Haskell, if you prefer). Step 2: Write the rest of the OS to go with. Step 3: Convince somebody that it's enough better to bother installing it.
@R.MartinhoFernandes "BitBite is the first wearable device that helps you lose weight [...]." Liars.
 
@JerryCoffin Well tbh that device looks more as if it was wearing you instead
 
> ClickStick is the world's first smart and eco-friendly deodorant with accurate dosage control, eco-friendly refills and modern look!
How do these things even get funded.
 
@JerryCoffin it's not enough better... yet
but it certainly has the possibility of being better
OS development isn't special
people just claim it is, like game developers, web developers, whatever
everyone wants to feel special and the reality is that OS developers are shitty at many things everyone else already got figured out
 
@BartekBanachewicz Oh, I quite agree--but I also doubt it makes much real difference. Even without changing languages, BSD would be a substantial improvement over Linux, but it has too little market share for most people to bother.
 
3:56 PM
@JerryCoffin hey I bother! :)
 
oh, that reminds me, I had to try out BSD
 
it's nice.
As a 3rd OS (the VM-based one for experiments) works perfectly fine
 
Has anyone heard about this RH announcement ?
http://developers.redhat.com/blog/2016/03/31/no-cost-rhel-developer-subscription-now-available/
 
certainly eliminates the need for linux in my life
 
@BartekBanachewicz Yay! Now if I can convince only a few hundred thousand more people, it might make it all the way up to 1% of the market...
 
4:00 PM
@BartekBanachewicz Which one have you chosen?
 
@milleniumbug FreeBSD
@JerryCoffin popularity is overrated
 
> the first and only Bluetooth Smart-enabled pregnancy test on the market.
 
@R.MartinhoFernandes can I get a notification on my smart watch as well
 
useful⸮
 
@milleniumbug well you could mount it in your toilet permanently
and get a popup "you're a daddy"
i mean not in your but in the impregnated subject's toilet of course
 
4:06 PM
"impregnated subject's" "you're a daddy" hmmm, not in this century I think :D
argh images of FreeBSD and their checksums are distributed over FTP
hopefully no one will replace the images with something different
 
nwp
@milleniumbug maybe you get gentoo instead
 
Maybe not
 
bsdtoo
k heading home
 
:)
 
remind me to not slack off when i get back here
 
4:13 PM
I'll remind you if I see you
 
nwp
anyone got a cure for laziness?
 
truth
 
@nwp I'd tell you, but I'm too lazy to type the details :D
 
nwp
I so don't want to do the shitty things I should be doing :(
@milleniumbug then it didn't work anyways
guess there is nothing better than "just do it"
 
motivation
You can use truth to get to motivation.
@nwp How do you want to live? What do you want to be? There's no happiness in idleness.
Human psychology derives happiness from control and achievement.
 
nwp
4:21 PM
also from avoiding unpleasantness
even if it generates more unpleasantness
 
If whatever you're trying to procrastinate is aligned with your goals, it should be easy to motivate (just picture yourself having achieved it). If not: don't do it.
@nwp It's human. But that's not lazy. It's avoidance. Often, avoidance takes a lot of effort
Fixed a missing brace and made the sample Live On Colirusehe 7 secs ago
Over 3 years old. It had a typo :|
 
@BartekBanachewicz Popularity is winning the popularity contest.
 
Meta popularity it the strong favourite, being last year's winner
@milleniumbug A millstone? Yeah that works (remember to put it down before weighing though)
 
Do any of you have any experience with bad performance in rapidjson::Accept()?
 
Nope. Go to Stack Overflow though. Be sure to include MCVE/SSCCE
and tag it with boost oh no. Just drop me a note then
 
user1804599
4:57 PM
Yay it now detects conflicts.
 
@sehe I have no idea if Hate turns out to be a huge waste of time. On the other hand, being goal oriented makes me want to picture the actual things built in it. So it's kinda contradictory
 
@ScarletAmaranth Why do you think he can't write code?
 
@fredoverflow I saw him interview the guy behind terminator, that does some termination checks - and he asked him whether some trivial loop terminates and the guy had no idea
 
love the list
> make a screenshot of your code and post that instead so there is no way anybody could test your code without typing it in all again.
 
> Try to make sure that the text doesn't make any sense
@fredoverflow good one
 
5:09 PM
@fredoverflow fucking this, hahahaha
bookmarked
 
nwp
@Borgleader you have some strange preferences
 
nwp
@BartekBanachewicz you are not allowed to read that list
 
shit
I'm getting to work
 
@nwp =.=;
 
5:23 PM
wow
TIL you can derive MonadState
GeneralizedNewtypeDeriving is amazing
 
Lmao.
I need a variadic buffer concept.
 
altough uhm
I think I need a monadTrans instance anyway
 
buffer<mat4, float, double, rest<double>>
 
it's kinda annoying that
 
or maybe I should make it buffer<mat4, float, double, double[]>
 
5:24 PM
if you want a lift that doesn't depend on the structure, you need a class
 
Ad then just static_assert that any pointers are the last argument.
 
@ThePhD o.O variadic? why?
 
@Borgleader shader inputs
 
@BartekBanachewicz sc2 soon?
 
I'm actually working on Hate-UI
but I figure there are priorities
 
5:30 PM
yeah dude, work on your projects on your own time!
 
I was gonna ask you about giving me a react introduction
 
sure
 
because I kinda feel I'm reinventing the wheel now
anyway im on discord so
 
> I had juniors and seniors in a Computing and Information Systems major studying Oracle and web development and with two semesters of C++ programming and Java programming allegedly under their belts who were unable to learn how to convert small numbers between bases. The biggest reason was that they could not do addition and subtraction or two or three digit numbers on paper.
wow
 
ah I'm in sc2 ;p
 
5:32 PM
@fredoverflow I dont belive you
 
@Borgleader Why believe me? Believe this guy
 
user1804599
@fredoverflow You mean, like, parseInt(n, base1).toString(base2)?
 
@Zoidberg On paper, not program it.
 
user1804599
 
user1804599
Like that?
 
5:36 PM
lol silly you :)
 
@fredoverflow I was adressing that professor through your quote if that makes sense. Not being able to add stuff on paper?!!?
 
user1804599
dat resolution
 
@fredoverflow Wow no wonder there are so many people who can't write FizzBuzz
 
So "likely.h" defines the macro for static branch prediction hints. In order to reduce the macro scope there should also be a header that undefines the macro. Convention would be to name the header "unlikely.h". Oh, wait.
Crap.
 
user1804599
@StackedCrooked Why don't you just use #exclude instead?
 
5:44 PM
Why a header, a simple #undef MY_PROJECT_NAME_LIKELY will suffice
 
Never heard of #exclude.
 
user1804599
It undefs all macros defined by the header.
 
would be really helpful for <windows.h>
 
user1804599
#include "likely.h"

// ...

#exclude "likely.h"
 
It's flips the bits in the include file?
 
user1804599
5:45 PM
It only works on April 1st.
 
well, it would hopefully undo the effect of an include
 
Some kind of scoped inclusion would be nice.
 
a.k.a. modules :D
 
%include "likely.h" {
}
 
@Borgleader I'm thinking of just letting someone define a struct
 
5:46 PM
@ThePhD wow, risky move
 
Heya
 
also yesterday I learned that stdin, stdout and stderr are macros on Windows
some time ago I learned that major and minor are macros on GNU
 
struct buff_vars {
     csgo::dsl::mat4 first_16_floats;
     csgo::dsl::vec4* rest_floats;
};
Then buffer<buff_vars>
Problem with this approach is I can't reflect what's inside.
This is dumb.
 
nwp
5:59 PM
can someone lend me 6k rep so I can see closed questions? I'll pay you back in 3-5 years
 
Why do you want to see closed questions? They were (probably) closed for a reason.
@BitteWenden Your name sounds German...
Dec 8 '13 at 13:16, by FredOverflow
@MartinJames Us Germans have the upper hand in the Lounge. We rule das Lounge mit ein Iron Faust!
 
Ven
@fredoverflow "with an iron hand"?
 
@Ven fist not hand
 
Ven
yeah, sorry, that's a frenchism
 
Garcon, l'addition s'il vouz plait! or something
I don't French much.
 
6:06 PM
@ThePhD Tuple?
Essentially you piggyback the variadicness on the tuple
 
> void replace_all(SequenceT & Input, const Range1T & Search, const Range2T & Format);
> Returns: A reference to the modified input
 
@Borgleader Right, but then you need std::get to access the contents.
Not cool.
 
6:21 PM
@fredoverflow lol
This is gold
 
Disconnecting signals to avoid recursive calls: ✓
Oh, boost::optional in 1.61 is specialized for references.
Number of keywords in C++ with TSs: 90.
 
6:41 PM
recently ran into a problem with the synchronized keyword aliasing a member function name
 
@nwp You'll have to go to a retail bank. We only deal in loans of at least 20K.
 
@Morwenn ...wasn't it since forever
 
> Now boost::optional is specialized for reference parameters.
Sounds like it wasn't the case before.
 
Ok. I don't know what or if it is by maybe in this case and perhaps not then.
 
6:50 PM
well, it seems it allowed references before, but it's specialized properly now, which fixes some issues
 
Probably.
 
Ven
@Morwenn what does that bring?
 
Ouiiiii, mon premier jour de RTT a été validé /o/
 
according to this ^^ it makes some run-time errors into compile-time errors
 
6:55 PM
@Morwenn Retraite Trop Tôt?
 
@Borgleader Retraite is a lie (for people my age).
 
user1804599
 
@Lalaland Actually, I discovered a function that does what I want. Specifically, I'm using the rapidjson::Writer to write values into a rapidjson::StringBuffer as valid JSON. Writer has a function called RawValue() which lets you inject valid JSON into the stringbuffer. Exactly what I want.
 
user1804599
7:11 PM
Salmon is my favourite colour.
 
It's one of my favourite fishes.
Now that I'm working, I hardly ever see Andy or Cicada. It's a bit sad :/
 
user1804599
21:10 < averagehat__> @pursuit Number -> Int
21:10 < holly_> unsafeCoerce :: forall a b. a -> b (purescript-neon)
 
user1804599
helpful chatbot
 
@caps A framework having the exact thing you need is such a rare and pleasurable feeling it's worth the appreciate the moment
 
@milleniumbug Given the number of JSON libraries, it seems nearly inevitable that one of them would have to contain at least one function that was honestly useful... :-)
 
@R.MartinhoFernandes Seems strange to me that he's so down on the drivers, but never once asks: "Did the company fail to do even a single usability test before making changes that were not merely gratuitous, but in fact utterly pointless?"
 
Oh they did usability tests.
That's why newer models don't have the same shifter.
This model was the usability test.
 
@R.MartinhoFernandes Oh, I see. Following the Microsoft product development model...
 
7:58 PM
@BartekBanachewicz I don't see what is contradictory. There are always goals. If you don't know what Hate will be, you still know what you want to achieve by trying
> though -- there are lights on the shifter and a gear indicator in the gauge cluster. Did nobody take a test drive?
Who the fuck comes up with lights. As if drivers should be required to look at the gear stick, the dashboard or whatever. That's ridiculous.
All gear boxes to date have always afforded a no-look status feedback.
 
1-5 + Race gear
 
I'd say this is often the result of "this thingy is too low-level, let's add more technology to it, that'll definitely improve things"
for a example "upgraded" "mirrors" which are actually cameras + LCD screens
 
What should I learn about before attempting to implement a bpf parser?
 
@sehe A fairly typical case of having failed to consider the most basic questions: 1) what good does this do? and 2) what potential harm can this do? In this case, the answer to question one is: "absolutely no good whatsoever", which should pretty much end things right there.
 
user1804599
@StackedCrooked Haskell and Parsec.
 
user1804599
8:11 PM
Maybe attoparsec.
 
Maybe some theory first?
 
Effect of not using "-100 points" methodology to features
 
@JerryCoffin oh sure: it can reduce wear due to manual handling of the gear mechanism. I can see that. And it can improve switch performance (like in race cars)
 
Possibly it could be done with a simple switch-based state machine. But the syntax seems to large for that.
 
@milleniumbug Rear-view cameras + LCD screens can be extremely useful on large vehicles. Not in the same category at all, IMO. There is (or at least can be) a real problem (poor rearward visibility) that they can fix extremely well.
@sehe I'm not at all sure it actually reduces wear. And in this case, it appears to be on an automatic transmission, so the shifting is done without any movement of the gear selector.
 
8:14 PM
> can
@JerryCoffin Oh wow. What the hell is the goal then
 
@sehe Different for the sake of being different.
 
@BartoszMilewski Oops, I didn't mean to cause AAPL stock to crash with my tweet. Sorry guys! https://t.co/EKv9vFFS7d
 
brexit
 
@wilx reuse of screen real estate
 
@sehe WTF? Have you changed the tweet link?
@sehe Ah.
 
8:20 PM
Felt senseless to drop tweets in a row
 
0
Q: Parsing OBJ. to fit the gldrawelements() call. c++/opengl

CharlieI'm struggling trying to get this to work like it should. Ive been able to make an obj loader that fits the glDrawArrays() call, with uv and facenormals, but when trying to modify it to the glDrawElements() Im at a loss. This is the code I have this far, the function takes the addresses of the v...

 
user1804599
@JohanLarsson Brexit would be great news.
 
user1804599
Less EU, more U.
 
@Morwenn you need to add this algorithm to your library!
// Upon return, the array is sorted. void sort(int* a,int n) { for(i=1; i<n; i++) assert(a[i-i]<a[i]); }
 
user1804599
@sehe Logic programming called; they want their inefficient sort implementation back.
 
Ven
8:29 PM
@sehe LOL
 
It's not inefficient
 
> // Upon return, the array is sorted.
well that's true
 
@sehe In fact, it's O(N)--much more efficient than those O(N log N) algorithms...
 
user1804599
Look at my test, my test is amazing.
 
user1804599
  -- Concurrent: conflict
  Right var <- atomically $ Commit <$> newVar 1
  forkAff $ atomically do
    liftAff $ sleep 10
    Commit <$> writeVar var 2
  Left val <- atomically do
    val <- readVar var
    liftAff $ sleep 20
    pure $ Commit val
  liftEff $ test (val == 1)
 
user1804599
 
@Zoidberg I shall start with tokenizing :)
 
@sehe Isn't i-i always 0? :)
 
@fredoverflow Not if i is float and has some weird value?
 
@fredoverflow Not if implemented in fuzzy logic.
 
Oh, ints...
 
user1804599
8:42 PM
@fredoverflow NaN, Infinity, etc
 
Ell
8:58 PM
@fredoverflow that's a good idea
 
@fredoverflow don't you just hate tweets with typos
@TimSweeneyEpic i-1 and <= sheesh how did this pass unit tests
> This is the programming equivelant if Korean Advice
cmfeo
 
user1804599
why do so few programming languages have higher-kinded types
 
user1804599
HKTs are so fucking useful
 
they have enough trouble achieveing basic polite types
 
What are higher-kinded types
Why do the sound like the most rigtfoldy thing ever
 
9:18 PM
@sehe < was correct, wasn't it?
 
Didn't check. #thejoke
(crying my fucking eyes out)
@набиячлэвэлиь More like robotey, lucey dantoney or even bratacky
And @DmitriBudnikov lives in HKT
 
HongKong Rekt?
 
user1804599
@набиячлэвэлиь they're a bit like template templates.
 
user1804599
public interface Mappable<T> {
    public T<B> Map<A, B>(T<A> fu, Func<A, B> fn);
}
 
user1804599
This is higher-kinded types in pseudo-C#.
 
9:25 PM
How're they different from templates?
 
user1804599
public class ListMappable : Mappable<List> {
    public List<A> Map<A, B>(List<A> fu, Func<A, B> fn) {
        return fu.Select(fn);
    }
}
 
This still looks like templates to me
 
user1804599
???
 
user1804599
C# has no templates you silly fool.
 
Nobody cares about C#
 
9:26 PM
Is this some kind of implementation defect in string_view? coliru.stacked-crooked.com/a/893bb95c4f6b5e34
 
@caps no, it’s by design. although for whichever design was used at the time, it may have been fixed since, I don’t really follow that stuff
 
@LucDanton Why on earth is that by design?
The class claims to be constexpr.
But how can it be constexpr if you can't initialize it with a constexpr string??
 
@caps it’s a faulty design
 
@LucDanton What a pain
 
@caps constexpr when involved with templates follows a 'best-effort' basis
well, that’s not nearly the full story
 
9:30 PM
@LucDanton Huh
 
@caps in many situations the compiler cannot easily tell whether a given definition is in fact validly constexpr or not, due to explicit specializations
 
@LucDanton Lamesauce. Thanks for the explanation.
I'll just re-initialize the string_view at runtime from the constexpr string at every call. Or I could build it statically. Anyway, thanks.
 
@caps have an alternative (although note that I changed to GCC+libstdc++ because whichever Clang+stdlib setting is used by default on Coliru doesn’t have that)
you can write your own litop, or even a regular constexpr function (e.g. view("hello"))
 
user1804599
Hmm, lack of HKT in TypeScript isn't that huge of a problem.
 
user1804599
Since you can just declare overloads for every type. You don't have to actually reimplement the functions.
 
9:44 PM
we found it annoying when trying to define factories for generic React components
 
@LucDanton impressive, one more reason for me to like constexpr less
 
@milleniumbug what can you hope template<typename X> constexpr typename X::type foo() { … } to mean?
 
user1804599
interface SomewhatFunctor<From, To, T, U> {
    map(from: From, fn: (x: T) => U): To;
}
declare function mapConst<T, U>(functor: SomewhatFunctor<<T[], U[], T, U>, xs: T[], x: U): U[];
declare function mapConst<T, U>(functor: SomewhatFunctor<<Maybe<T>, Maybe<U>, T, U>, xs: Maybe<T>, x: U): Maybe<U>;
 
user1804599
// JavaScript
function mapConst(functor, xs, x) {
    return functor.map(xs, _ => x);
}
 
user1804599
Still quite shitty, but better than what you'd have to do in e.g. Java.
 
9:48 PM
@LucDanton Compile errors when the function is not actually constexpr? Dunno
Maybe that's even worse
 
user1804599
Now you only have to copy-paste the types, not the implementations.
 
@milleniumbug how can you know ahead of time foo<arg> will ever be called for an arg where e.g. arg::type is not a literal type (a pre-requisite to make constexpr valid)?
 
@набиячлэвэлиь close
 
Dunno, make it a compile error on instantiation?
 
@milleniumbug okay, that’s step one
step two: template<typename X> struct holder { X value; constexpr holder(X arg) { … } };
what should holder<arg> h {}; mean where arg is not a literal type?
 
9:54 PM
IMO making it also a compiler error is actually worse than the alternative
inb4 C++23 introduces constexpr(constexpr(f())) func() noexcept(noexcept(f())) { return f(); }
 
that’s what we have right now and why I call it 'best effort': try to make everything make sense in the hope that valid, useful specializations pop up to be used in the world of constant expressions; or otherwise pretend it’s not here
@milleniumbug :D
there is a rule that mandates that for a given constexpr template or constexpr member of a template, there must be a valid specialization for which constexpr would otherwise be allowed
but that’s very vague and in my mind it’s the same kind of allowance as 'compilers are allowed to assume that every loop terminates'
 
template<template<typename...> typename T> auto constexpr(constexpr(T<int>())) func() -> decltype(T<int>()) noexcept(noexcept(T<int>())) requires requires DefaultConstructible{T<int>} { return T<int>(); }
 
iow my advice is that if you write a template, you can throw constexpr at it for free (unless it involves one of those few things that, for now, will never be valid in the constant expression world)
 

« first day (2020 days earlier)      last day (2930 days later) »