« first day (1814 days earlier)      last day (3134 days later) » 

3:00 PM
already? it's not even november yet
 
It's always november in Brest.
 
oh yeah, that :)
I need a name for my new computer
 
Sofia
Stella
 
why?
i won't name my computer after xeo's cat ><
 
R2-Stella-D2 then
 
3:04 PM
@Mr.kbok Pick a random beer name.
And make a bad pun with it.
Like Anti-Viru or something.
 
I usually name my machines after 8bitpeoples but I'm afraid I ran out of names xD
 
@Mr.kbok I thought his cats name was Taiga or something
 
My PC names all start with A: Adjutant (from SC2), Asgaard (from SG), Ajunta-Pall (from SW), Albion (from Fable), ...
 
elo every1
 
user1804599
3:08 PM
@Mr.kbok kim-jong-trois
 
I accept your suggestions gladly
 
user1804599
@Mr.kbok mrandmrskbok
 
@elyse stuck on a strict
 
@Mr.kbok Name it "ggot", and pick "f" as username. This way your prompt can look like: f@ggot ~f $
 
user1804599
@JohanLarsson You cannot divide an integer by a float.
 
3:09 PM
@GregorMcGregor lol
inb4 flag
 
@elyse yes I glean that much, must be a cast or something no?
 
user1804599
You can cast it, yes.
 
@ʎǝɹɟɟɟǝſ * inb4 fag
 
@GregorMcGregor nice. but it's a windows box
 
user1804599
@JohanLarsson is.gd/X8HaSl
 
3:10 PM
Then install Linux on it duh
 
I'm hungry
 
I'll name it savant
 
-1
Q: Where can I find the Turing Award speech video of every year?

markliangI want find the Dennis Ritchie && Ken thompson's turing award speech.Thx

 
@elyse ty ty
 
user1804599
The comma on this line is why Rust is better than C++: github.com/rightfold/frl/blob/master/src/interpret.rs#L9
 
3:11 PM
It seems that eveybody want a different flavour of array_view.
 
You have a fetish for set-ending commas
 
user1804599
It makes merging possible and diffs readable.
 
@elyse no it sucks
 
ITT opinions
 
I don't like trailing commas but I have to agree that they make some things easier.
 
3:14 PM
I have weird display glitches on my w10
 
user1804599
Terminators are easier to work with than separators.
 
tell that to sarah connor
 
Especially when you generate code.
 
installing visual studio 2005 on my brand new computar
 
@Mr.kbok VS2005!?
 
3:18 PM
yes!
oldest version my library supports
so I have to test on it
 
@ʎǝɹɟɟɟǝſ but hey rust is pretty intuitive
@Mr.kbok why would you support it?
I find rust much harder to write than Haskell
but much easier to get it to actually compile
 
@elyse mut, mut, mut, ...
Is it only mutable within that scope?
 
but I could see rust being an actual replacement of C++ I think
 
@Mr.kbok lol
 
I kinda wish I could omit parens in data constructor calls though
 
3:26 PM
@BartekBanachewicz people at work interested in using it
 
what does the library do?
@ʎǝɹɟɟɟǝſ I need to decide if I want to keep that lift or not :S
 
all kinds of crazy shit
 
@Mr.kbok lol
 
well, no, actually. Only a single kind of crazy shit
 
which is
 
3:27 PM
example usage
 
oojh
It looks like a brilliant solution to a problem that shouldn't even exist in the first place.
 
it's just annotations. it should have been part of the language for 5 years already
 
@BartekBanachewicz why not
 
3:29 PM
@ʎǝɹɟɟɟǝſ obscure? unreadable?
maybe there's a better design?
 
> TeamCity server memory usage for PermGen pool exceeded 95% of 166 MB maximum available. It's recommended to increase maximum PermGen pool size as described in documentation.
Ugh, Java.
 
this one is easy
 
> /* PUGIXML Y U DO THIS :'(
* No easy way to convert to a given type with pugixml, so
* we just list all the conversions */
 
I find a lot of solutions in Rust very temptingly easy
 
3:30 PM
@ʎǝɹɟɟɟǝſ wot
 
Haskell would require you to write much more to support this design
and in Rust it's just "oh so it lifts into the state of this object sure"
 
yes I know, but what about it?
 
@Mr.kbok Looks like this could be macroized, btw
 
@Mr.kbok I was expressing my empathy
 
3:31 PM
@ʎǝɹɟɟɟǝſ hahahah thanks :D
 
XMACRO it all the way down.
 
It's not that big an issue, but pugixml is excellent in many regards and I find that this thing is lacking
@AnalPhabet what, are you crazy
 
@Mr.kbok well it could
 
3:33 PM
Boost.PP master race
@Mr.kbok oh man the memories
 
Installed an installer. How nice
 
it was my first VS
I was using C++ and OpenGL 1.x
those were the times
 
@Mr.kbok lol is this Visual Studio: A Link to the Past
 
@GregorMcGregor yes :)
 
3:34 PM
@AnalPhabet yes I know but you're still crazy
 
2005, I wasn't even in high school.
 
@Mr.kbok lol
 
@Mr.kbok No, why?
 
@AnalPhabet won't work unless you also do using uint = unsigned int;
 
okey so how do I unit test rust
 
3:35 PM
Because there's seven instances and the marginal gain from the macro is severely counterbalanced by the, well, usage of a macro
 
CONVERT_PRIMITIVE(bool, bool)
CONVERT_PRIMITIVE(int, int)
CONVERT_PRIMITIVE(unsigned int, uint)
 
ie it sucks
No, the code is much clearer without the macro
 
@AnalPhabet oh, yeah. still, boo macros! :p
 
How do you debug that shit?
 
...normally?
 
3:36 PM
@BartekBanachewicz what do you need tests for, I thought rust was safe! :p
 
@Mr.kbok Debug as in?
 
The same way you debug it without the macro? duh
 
@BartekBanachewicz you can write tests inline using #[test] only for lib projects I think
 
@melak47 this sentence is so stupid i don't know where to start
 
user406009
@melak47 So I guess you consider a non-crashing program completely functional?
 
3:37 PM
@JohanLarsson uhwh
 
@Griwes duh, you step into a macro usage
 
user406009
I think Bartek has higher standards than that.
 
@BartekBanachewicz ...I think we need to introduce the concept of jokes to you
 
@Lalaland hey, non-functional languages can produce non-crashing programs, too :(
 
3:37 PM
@Lalaland yes I'd like it to not crash and also sometimes work
 
better to step into dog shit than an unexpanded macro
 
@Mr.kbok ...that's literally a single line function.
 
yes, so no need for a macro
 
...
....
...
 
Macro Polo
 
3:38 PM
Repeated 7 times
 
gratuitous use of macro is the shortest route to insanity
 
v0v
 
It's a single-line function that takes half of my screen.
Nice jab.
 
Well said
 
it makes the code ugly, unreadable, dumb, and prevents you from seeing actual refactoring opportunities that don't involve macros
 
3:39 PM
The code's dumb even without the macro
 
the first three adjectives describe the current version of your code
 
Even more unreadable and error-prone
 
user406009
Nah. I agree with Mr. kbok.
 
user406009
That code is simple and readable.
 
whatever you both suck no macros
 
user406009
3:40 PM
You know exactly what you are getting.
 
inb4 "oh look you have overloads you can generate with macros in your variant.h"
 
I don't even understand why we are discussing this are you C programmers?
 
No, we aren't
 
lol
 
ITT macros = C programmers
C++ancer
 
3:40 PM
also
 
But code repetition like this is so error-prone
 
@BartekBanachewicz I'm actually not stopping
 
user406009
My only suggested change would be to use template specialization instead of function overloading.
 
I just mentioned it because gaining deep knowledge of haskell is on a different level than for other languages
 
@AlexM. yeah I wasn't talking about you.
 
3:41 PM
I recently learned how I can make macro-generated non-intrusive polymorphic interfaces work!
 
because it branches out in mathematics
 
I should implement that even if just to implement that.
 
@AlexM. mostly because it's just unlike most languages vOv
how's the CW task going?
 
user406009
@Griwes You could just use a template.
 
@Griwes :+1:
 
user406009
3:41 PM
Macros suck.
 
@Lalaland No, I can't.
 
@Lalaland yeah, no idea why I used overloading here
 
You could just use a macro.
Templates suck.
 
I can't generate member functions that way.
 
@Lalaland See you back at repeating 12 lines of almost identical code 30 times
 
user1804599
3:42 PM
@BartekBanachewicz lol
 
user406009
The curiously recurring template pattern (CRTP) is an idiom in C++ in which a class X derives from a class template instantiation using X itself as template argument. More generally it is known as F-bound polymorphism, and it is a form of F-bounded quantification. == History == The technique was formalized in the 1980s as "F-bounded quantification". The name "CRTP" was independently coined by Jim Coplien in 1995, who had observed it in some of the earliest C++ template code as well as in code examples that Timothy Budd created in his multiparadigm language Leda. == General form == Some use cases...
 
@Lalaland you clearly have no clue what I'm talking about
so let me explain it to you
watch this
 
user406009
Yeah, that's just normal templates.
 
user406009
No macros involved.
 
@BartekBanachewicz I've done a bunch but didn't get to the interpreter part yet
 
3:43 PM
and then figure out how much code - without, you guessed it, macros - it takes to make an interface with 5 functions.
The one in the presentation had one.
That's simple enough.
But at the 5th, you start wanting to kill someone.
 
it's sunday so it's pizza time :D
 
Especially when those functions start taking multiple arguments.
Because you have to repeat all the signatures three fucking times.
 
oh pizza :(
 
And two of those three times you are just forwarding the arguments down the call chain.
 
my girlfriend want to make vegetables tonight
 
3:44 PM
(and the third time you write = 0 at the end)
 
@BartekBanachewicz what do you use for haskell on your PC? I uninstalled leksah
I could install the eclipse plugin but meh eclipse
 
Are you getting it now, @Lalaland?
 
user406009
Yes. I see your point.
 
user1804599
> Make me a vegetable.
 
user406009
Theoretically, these issues will go away once we get the reflection proposal implemented.
 
3:46 PM
@AlexM. I use ST and commandline. No plugins.
 
first... err, no
second... there's no "the" reflection proposal
 
I've realized that most of the time I'm either browsing docs, which can be done in the web browser, or writing code, for which I only need a text editor
 
Reflection let's you inspect. For this you need to inject.
 
this takes so much time that time lost on organizing imports, code navigation, stuff like this simply doesn't matter
in a language like C# you're supposed to churn hundreds of LoC every hour and then it actually helps to have all this tooling
but in Haskell I'm mostly stuck thinking
 
@BartekBanachewicz so no fancy debugger like VS has?
by that I mean GUI for it
 
3:52 PM
@BartekBanachewicz like this, struggled with getting that beast to compile :)
not sure I love to have tests in the code like that
good and bad I guess
You can always move them to a separate folder
 
lel /cc @Nooble
 
do compilers transform if(cond) a = ...; to conditional moves? how do they decide it?
it may produce thread-unsafe code by adding data races, but on the other side is a good optimzation opportunity to miss.
so, gcc for example, will it do the optimization when not adding -pthread, and doing it otherwise, or something like this?
 
@Griwes did you take a look at boost.typeerasure? Sounds prettt much like what you're describing
 
user406009
@JohannesSchaub-litb A compiler will not add data races.
 
3:57 PM
@JohannesSchaub-litb why data races? they must preexist
 
Also, the Poly library (not Adobe.Poly)
 
@JohannesSchaub-litb They decide based on the cost of the branch compared to the cost of computing the cmov predicate
 
@AndyProwl I did... but that was after my initial decision to write that... :P One day I'll look at it and try to understand its internals (and then I might even use it at some point!).
 
@Lalaland so I wonder whether a compiler can detect that code is only single thread so that a particular optimization will be safe`
 
A compiler will always assume single threaded code
 
3:58 PM
I still haven't given up virtual concepts
 
@GregorMcGregor but if it is a local whose address have been escaped, potentially other threads can modify the variable concurrently
 
@AndyProwl Good to hear :D
 
Worked a bit on it yesterday although I'm a bit rusty
 
do compilers detect this and decide on some basis whether or not to do this conditional move?
 
@JohannesSchaub-litb That's on the user, not the compiler. Atomics, volatile, etc.
 
3:59 PM
@GregorMcGregor oh hm
 
A compiler will always reason in terms of a single thread
 
The worst problem with boost.te is the horrible diagnostics you get when you do something even slightly incorrect
 
the c++ spec guarantees ,as far as I can see, that if(foo) a = x; that a is not modified if foo is false
but a conditional move modifies a regardless, so here a compiler could introduce a data race no?
 
"Modifies a regardless"?
 
@GregorMcGregor hm but doesn't it violate the C++ standard then?
 
4:01 PM
What's a conditional move?
 
@GregorMcGregor Modifies 'a' regardless
 
What do you mean by regardless :o
 
sorry should have choosen b instead of a :D
@GregorMcGregor as I understand, a conditonal move always assigns to its target, even for a = x ? y : a;
 
Nah, cmov is a predicated instruction, executes only if the predicate is true
 
user406009
@JohannesSchaub-litb Could you provide a simple example of the code running on each thread?
 
4:03 PM
@AndyProwl according to the gcc manpage, it has a transformation that transforms if(cond) b = ...; to b = cond ? ... : b; conditional moves can be faster than if branching (it has drawbacks sometimes, afair.. but apparently there can be benefits, since this optimization exists after all)
@Lalaland one thread doing if(cond) b = 0; another thread doing b = b + 1;
 
user406009
That's a race condition.
 
@JohannesSchaub-litb By that it means it will use cmov rather than jmp, doesn't it
 
user406009
Two threads are modifying the same b at the same time.
 
user406009
Race conditions are undefined behavior.
 
@JohannesSchaub-litb but where's the move there?
all I see is a copy
 
4:05 PM
@Lalaland not if cond is false
 
@AndyProwl nothing to do with std::move, it's conditional assignment if you will, in Intel lingua
 
@AndyProwl i'm not talking about std::move but about mov assembler insns
 
@GregorMcGregor oh, that move
sorry, misunderstanding
 
@GregorMcGregor ah interesting
 
Anyway cmov writes only when predicate is true
 
4:06 PM
yeah I think the compiler cannot make that transformation since C++11
but it could before
 
Data races are UB, but is there any way it can actually screw up if several threads try to write the same data at the same memory location?
 
I think I've read an article at some point about it
 
user406009
@Morwenn If the writes aren't atomic.
 
gcc on -ftree-loop-if-convert-stores says that "Attempt to transform conditional jumps in the innermost loops to branch-less equivalents ... This transformation can be unsafe for multi-threaded programs as it transforms conditional memory writes into unconditional memory writes."
 
user406009
For instance 64 bit integers on a 32 bit cpu.
 
4:07 PM
my x86 assembly is rough.. but does it mean something else than I think?
 
@Lalaland What would/could happen?
 
user406009
You could have a one half come from one value and the other half come from another value.
 
Yeah, but if you know both threads are writing the same value, the halves should be the same regardless, right?
 
Yeah but in theory it's UB.
 
I know that it's UB in theory, but I was trying to know what could go wrong i practice.
 
4:10 PM
I don't think it can
 
user406009
@Morwenn The more important issue is that the compiler could reorder writes and reads surrounding that write.
 
user406009
Look into memory barriers.
 
Section "out of thin air stores"
 
@Morwenn but perhaps they have revision counters and the cpu caches increment a counter whenever changing a location. and when it tries to merge the caches, it goes all crazy when two modifications from different caches are visible?
 
@JohannesSchaub-litb Ok, I think I get it.
 
4:12 PM
regardless of their value.. not sure
@GregorMcGregor ah please enlight me :)
 
> Compiler transformations that introduce assignments to a potentially shared memory location that would not be modified by the abstract machine are generally precluded by this standard.
 
@Lalaland I ask this question become I one write a parallel sieve of Eratosthenes. Basically, I had several threads writing false in an array and several could write false at the same time. I think it couldn't ever go wrong in this case.
 
1.10/25
 
@AndyProwl I agree, but my question is more like how do detect compilers that they can do the optimization under the as-if rule??
s,??,?,
if there is only a single thread, compilers are perfectly in their right to modify additional memory locations as long as those are not volatile
 
@JohannesSchaub-litb I think they're referring to something like this:
 
4:14 PM
you mean how do compilers decide if it's safe to do the optimization?
 
Optimize the code from:
if (condition)
    x[i] = 123;
to
int tmp = x[i];
if (condition)   //  cmov tmp, 123
    tmp = 123;

x[i] = tmp;
 
user406009
@Morwenn Yes, but there is the issue that your threads might never see each other's writes.
 
@JohannesSchaub-litb Apparently cmov on x86/64 can only have registers as operand? So you have a write regardless indeed.
 
@GregorMcGregor Exactly.
 
user406009
@Mysticial So it's basically moving the read and write out of the if statement?
 
4:15 PM
Which is kinda silly btw
 
@Morwenn This should be pinned
Can someone pin it?
 
@Lalaland Yeah. In the first case, the write is conditional. But since cmov can't be used with a memory destination, it forces a branch. In the second case, you pull the write out of the branch. Now it's cmov'able, but you unconditionally write to the memory location.
 
@Mysticial ah i see
that explains why it's unsafe indeed
 
AVX512 will have predicated instructions (including writes), but only for vector registers.
 
Concurrency is hard...
Thanks for your insights anyway :p
 
4:19 PM
@BartekBanachewicz :<
I couldn't solve it.
 
BTW anyone knows why my information-hiding character union doesn't work?
I can't spot the UB
 
link?
 
wtf
Might be good enough for the main site.
 
user406009
My guess is that the copy or move constructor is broken.
 
4:29 PM
I'd say decltype(d)'s copy/move ctor isn't guaranteed to copy (lack of) state
With optimization the copying is elided
 
user406009
Yep, looks like I was right. Adding the appropriate copy operations made it work. Let me get the link.
 
d doesn't have any data member, so there's nothing to copy
or rather, the compiler is not forced to copy the content of the single byte the object occupies in memory
 
mm this pizza is great
 
ew chicken on pizza
 
they didn't have pizza on chicken
 
4:36 PM
those two things should be kept separate
 
Chicken is good everywhere.
 
@Mysticial is that ever coming to desktop processors?
 
@Mgetz Probably not for a long time. Cannonlake at the earliest.
 
@Lalaland Where's the damn link
 
@Mysticial any reason other than intel doesn't want to?
 
4:40 PM
Probably because hardly anyone will use it and it takes up a lot of area.
 
@Mysticial but they have silicon coming out their nose... why not just make the cache a tiny bit smaller?
 
Not just area, but yields.
 
@Mysticial I was under the distinct (albeit probably incorrect) assumption that caches had the most issues with yield... not logic
 
user406009
@AnalPhabet Sorry, corilu performs quite badly on ~50% packet loss. Fuck you Comcast.
 
@Mgetz They probably do. That's probably why the Core i5s have less cache than the Core i7s. Of there's a defect in part of the cache, disable it and sell it as a lesser component.
If they bring AVX512 to desktop, they may have to do the same, but with the entire AVX512 ISA.
 
4:43 PM
I want to cuddle stuff :(
 
@Mysticial or in intel's case... just disable it anyway, knock 100USD off the price and sell it anyway
 
I suspect there might also be some anti-trust thing going on.
If Intel completely destroys AMD, it could get ripped apart by anti-trust.
 
@Lalaland Just gist it
 
@Mysticial to quote a friend at UCAR "AMD stays afloat because intel trucks cash into it"
 
4:45 PM
@Lalaland thanks
 
@Morwenn we have a puppy, a kitten and a furry bear, pick one
 
@JohanLarsson I guess I'll take the furry bear.
 
I understand why, tell us when you are done.
@sehe stream some rust?
 
@JohanLarsson that makes it sound like @sehe is powerwashing an old truck
 
4:50 PM
FTR I'm not
@Morwenn :cuddle:
 
:3
 
@AndyProwl it's a fast food place specializing in chicken
it's their signature pizza
I think it works well
not my favorite overall but definitely something I'd pay for any time
 
Variant
 
@JohannesSchaub-litb I think the compiler is optimizing out the memcpy (for legal reasons). g++ says this: paste.ubuntu.com/12681867
4 hours ago, by Bartek Banachewicz
only noobs say "variant" when they mean "GADT"
 
A funny word for a horrible disease
 
4:55 PM
Then it's a mutation. Not a variant :)
 
And yes I read that :v
 
LAZOR SHARK!!!!
 
I'm overclocking my laptop hehe.
 

« first day (1814 days earlier)      last day (3134 days later) »