« first day (2202 days earlier)      last day (2740 days later) » 

12:00 AM
Yeah. The only time over-decomposition isn't needed is when the tasks are basically guaranteed to be of the same size. And there's very little jitter.
 
I mean, just keep pushing work onto your work queue
 
:33701016 Of course. MIPS/watt used to only be a thing for embedded systems, but now it's everywhere.
 
@Mikhail Speaking of work-queues, have you ran into any scalability problems with work-queues that lock on a single point?
When I built my own thread pool, the very first (premature) optimization I did was to do away with the single-point of lock contention.
 
In one application, I had this problem and replaced it with the a spinlock of my own design... But typically no, the queued items take ~ 5ms.
 
Ah. So you just made the cost lower. But didn't get rid of the "single-point" part.
 
12:06 AM
Indeed
But I think that if your queue is limited to 32bits you can make it atomic on x86?
 
At this point, I have only implementation of a task runner. (my decentralized "push-pool") And I have nothing else to compare to other than Clik Plus and the Windows Thread Pool.
 
Well Intel's TBB
 
TBB and Cilk Plus are basically the same back-end I think?
 
I don't think so, anyways there are a few people who have written blog posts about their implementations. You can always make fun of them.
 
@Mikhail In my thread pool implementation, I cmpxchg on a pointer. So that's atomic on both x86 and x64.
 
12:11 AM
Are you spamming threads :-)
 
yes
And it's surprisingly efficient.
The expensive part of threads is creating and destroying them. But there's almost no cost to having a bunch of extra threads sitting idle.
 
Indeed, I guess the alternative is pushing to a thread. So your implementation feels similar to a scheduler.
 
@Mikhail That's actually what I'm doing. Hence the name "push pool".
When you submit work, it randomly picks a worker thread and tries to cmpxchg its work pointer. And if it fails, it tries another thread. After enough failures, it gives up and spawns a new thread.
Alternatively, instead of spawning a new thread, the "pushing thread" ends up running the work itself. That's done when a hard-limit is placed on the number of threads.
 
Hmm, the running the work itself is an interesting idea, I typically do the naive thing and have the thread wait...
 
@Mikhail It wasn't by choice. My first attempt at trying to cap the threads was to wait until a thread became available. But that deadlocked if everything in the thread pool was waiting on the stuff that you're trying to push into it.
But if the pusher thread runs the task itself rather than waiting for an opening, then forward progress is guaranteed.
The scheduling isn't optimal, but at least it won't deadlock.
The work-stealing algorithm in Cilk is also interesting. I'm not sure how Cilk does it, but intuitively, work-stealing means you need to steal the context of the work from one thread to another. Which seems to imply copying the entire execution stack?
 
12:22 AM
is that just a pusha?
 
Cilk's implementation has a fixed number of threads. One per vcore.
So there's multiple tasks per thread.
Whereas in the push-pool design has one task per thread, but multiple threads per core.
In that case, migrating work is simply a context switch.
 
Well, you can have threads equal to cores also...
 
In the Cilk work-stealing case, I (think) you need to migrate the entire stack as well?
IOW, I wouldn't know to implement a work-stealer in C++.
Perhaps using coroutines? But I don't know how coroutines work underneath.
Maybe using longjmp?
 
Yeah, I'm pretty sure you just push the stack and jump
 
@Mikhail Which sounds much more expensive than a context switch which only copies the register state.
Though I think you can avoid the stack copying if you abuse longjmp.
 
12:27 AM
Yes, because you're going back to the same function
 
@Mysticial Maybe, but probably not--no guarantee that it saves/restores everything you need. Probably need something platform specific--either something like SetThreadContext or use fibers and SwitchToFiber.
 
Wait, why isn't there a guarantee? I going to jump right back to the same place?
 
@Mikhail You need platform-specific code to save and restore the entire register state.
IOW you're implementing your own context switch.
 
From what I recall its a macro in FASM
 
@Mikhail Setjmp/longjmp are C things. As long as you only write C code, you're pretty much fine--but for something like a member function, it may not know how to save/restore this (for one obvious example).
 
12:29 AM
But the stack is safe? If the this pointer is on the stack then its safe, if its in a register, well you saved the registers so you should also be safe?
 
@Mikhail Yeah, as long as nobody tries unmap the memory that it resides in.
The state of a thread is really just a bunch of registers.
 
Why would anything try to unmap the call stack?
 
@Mikhail It won't. So you can leave behind the old stack and jump to a new stack. Copy all the registers and continue running.
That's how a context switch works.
 
Indeed, so we don't need to save the stack, we can just return to it...
 
@Mikhail Yeah. That's why the push-design is fast. Migrating doesn't require copying the stack.
In the work-stealing case with a fixed # of threads, you can achieve the same thing, but you're basically reimplementing context switches.
The drawback of the push-design is that if the decomposition is massive, you'll end up with a gazillion threads. (or sub-optimal scheduling, if you do the run-locally trick)
 
12:38 AM
aka, pooling
 
@Mikhail I don't remember the details, but once upon a time, I looked through a user-mode threads package that used setjmp/longjmp. At least from what I recall, to get reasonably portable code, it selectively did various subsets of a few (maybe half a dozen?) minor details in addition to setjmp/longjmp (and as I recall, I added one more to get an analog of TLS to work with it).
That was quite a long time ago though. It may easily be that most of what it added was really working around implementations of setjmp/longjmp that may have been at least somewhat buggy (or at least, written to a slightly different specification than the standard's).
 
1:20 AM
> I opened the Ghostly Outfit in the Style pane and my client crashed
classic anet qa
 
I want to have something like templates.
But I don't know what syntax I should use.
I think Wide used type!int or something like that.
I don't want to use type<> because that's a bit jank for the parser to handle.
Augh
I like type<> because it has open/close, and I like the idea of an open/close thing.
type() can be ambiguous with function calls though.
 
do type[] for the lulz
 
Whats the new hot way to do const mytypedef?
 
using alias = type;?
 
Are people still using this? gcc.gnu.org/onlinedocs/gcc/Typeof.html
 
1:32 AM
@Mikhail Probably--but I'd at least hope that they'd only use it in legacy code that would be a pain to convert to decltype.
 
user406009
I think it's your only option in C code though.
 
It is your only option in C code.
And useful when you don't have decltype.
As I have had to deal with, in crappier versions of g++
 
user406009
Some might argue that if your only option is C, then you are already screwed.
 
@Lalaland Depends on the target, I s'pose. For some small embedded systems, C is fairly adequate. Yes, C++ would still usually be better, but in a case like this, at least you're only screwed to a fairly minor degree.
 
Processing would be better :-)
So, If I make a pacemaker with Processing will I be unable to meet some required ISO certification?
 
1:38 AM
any of intrested in java?? lol
2
 
user406009
@Jois Some of us think Java is alright.
 
boo
 
user406009
Some of us violently disagree.
 
some of us lie awake at night contemplating how much we hate it
staring at the shadowed ceiling, wondering at the horrors it has brought into this world
 
Factory
 
1:41 AM
meditating on its vile form
personally, I'm ambivalent.
 
Its C++ with none of the speed, and verbose package syntax. Also limited to 31bits, and weird threading implementation.
Although it has JarJarLinks going for it
3
 
What demons has it wrought in the hearts and minds of humanity? From which demons did Java spring?
 
Teh 90s
 
TIL
wait I'm from the 90s too
that explains lots, come to think of it
 
So, people where like, C++ is slow how can we make it slower. And then they made Java. It was the new hip thing.
 
1:44 AM
@jaggedSpire is the H.P. Lovecraft of C++ definitions
 
@Aaron3468 <3 you know it bby
 
@Mikhail And now Java is nearly as fast as C++, but much more dubious in design. Easy library linking at least, so there's that.
 
No, it fails to vectorize a lot of stuff, and the memory limit is a real turn off if you have a laptop with 64GB of ram.
 
the seething depths of insanity await
 
@Mikhail ...not to mention a server with, say, 256 GB of RAM.
 
1:49 AM
That is true. Java's fast and somewhat usable now, but it still blows up in a lot of silly ways and has weird constraints.
 
To paraphrase Dijkstra, "Java is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums."
 
so, to answer your question: yes, some of us are interested in Java. More specifically, some of us are interested in seeing Java burn for its sins.
 
Of course, it's open to question whether another of Dijkstra's lines might not apply even better. For the obvious example: "The use of Java cripples the mind; its teaching should, therefore, be regarded as a criminal offense."
 
Don't forget its bastard child, JS
 
hisssssss
 
1:56 AM
Naturally I hate every new language I don't know how to use properly yet, but I think Rust is the only one I haven't yet discovered design decisions to hate forever.
 
I know how to use TCL (thanks to FEI's bullshit), but lord
 
@Mikhail Hmm...much less a child than a third cousin by way of marriage, or something on that order. Happen to share similar names, but not really much relationship beyond that.
 
@Jois did you come here to ask a Java question because the Java room is empty?
 
I'm told that Java was the flashy thing, so naming your thing after a flashy thing was good marketing. Although I don't know anybody who was working in the early 90s.
 
@jaggedSpire Hmm...do we need to start the "Java Sucks" room again?
 
1:59 AM
@JerryCoffin ooooh what happened to the old one?
 
@Mikhail Flashy, or at least heavily marketed anyway.
 
Yeah, the thought of paying for a programming language is foreign to 25 years in the future.
 
@Mikhail Mathematica would like a word
 
School gives it for free to grad students
 
@Mikhail you lucky
 
2:02 AM
@jaggedSpire I think everybody lost interest. It's a little like what discussion do you hold in a "plumbing is good" room? Yeah, life without plumbing sucks, but most problems are either minor or easy to avoid. Likewise, people who want to avoid Java can usually do so pretty easily.
 
Unless you're working the salt mines of Hyderabad. Or like me decided to outsource to them.
 
@JerryCoffin so the participants eventually decided marinating in hatred wasn't a good use of their time and left
 
@jaggedSpire I think so. For a while we had a feed set up that posted a link to every new question about Java that mentioned "factory" or "singleton" (or something on that order) which was actually what kept it alive for quite a while.
 
@JerryCoffin ooooh that sounds fun, actually
 
You can't keep a fire going without fuel, after all
 
2:06 AM
@jaggedSpire For a little while, but to quote the old line, it's like shooting fish in a barrel.
 
@JerryCoffin :P fair enough
 
well this explains a lot… cc @sehe the perils of using neovim :(
I guess I should try to implement unchecked_zip_with for any as I did with variant… except the name makes even less sense
 
2:29 AM
> Adding relaxed leads an exception rather than undefined behavior if the argument types are wrong.
I find the naming somewhat unfortunate
 
2:41 AM
yeah can't relax when calling it
 
2:54 AM
let's see how far Boost.TE can carry this
 
3:41 AM
Fiinally done with my section.
 
> Obviously std::launder now invites people to invent fancy things (all UB), similar to how reinterpret_cast<>s name[sic] invited people to think it has anything to do with TBAA.
> [basic.lval]/8 means "access" in the sense of [defns.access], not in the sense of class member access (which is paradoxically not an access).
makes sense
 
4:07 AM
Sorry if this is a stupid thing to ask. I just read an answer about std::launder and I'm wondering... why wasn't the solution to define the UB (which std::launder exists to fix)?
I presume backwards compatibility, but then I begin to understand how so much of C++ seems ad-hoc
 
4:23 AM
aliasing restrictions enable powerful optimizations
you let std::launder as the escape hatch for the rare special cases that need it, while the rest goes on as usual and benefits from those optimizations
dig into restrict if you’re curious about those optimizations
 
4:42 AM
@sehe Coliru is fixed for now. The yellow doesn't work yet though.
 
great, inheriting constructors are broken again
 
@LucDanton Ah, I can understand the decision now. Interesting. I suppose my general approach needs to be a bit more deliberate to avoid UB. It reminds me of when I learned a language and was told to use only what I learned, rather than trying to translate complex English into the new one.
 
to be fair avoiding UB amounts to not using reinterpret_casts and questioning every static_cast from void cv*
 
And avoiding i = i++ + ++i.
 
or dereferencing null pointers. There's probably a list somewhere, because there's a lot if I recall. But only 3 common ones that always trip me up.
 
4:55 AM
I meant with respect to the whole std::launder etc. business
 
The best way to avoid UB in C++ is to use Java.
 
5:11 AM
> a racial skill is better than the class elite skills. that's the state of necromancer and sums it up pretty well.
@GundolfGundelfinger the Sylvari are at it again
 
Ven
5:53 AM
Hey
 
Sup boyz
 
vous avez pris votre jus d’orange pour bien démarrer la journée les enfants ?
 
jeez, almost 5€ for an orange juice
 
6:11 AM
How much orange juice? It's always been an expensive beverage, but that seems about right for 2L to 2.5L
Whoa, that's twice what I'd expect to pay
 
Sam
Hello Lounge!
 
Hello, everyone
 
@LucDanton mystherbe lance croissance !
@LucDanton Je suis toute ouïe
Apparently the changes introduced by Smith will break my code
Although frankly I don't understand the rationale
But then again I'm a badlet
Also why is += { ... } legal but + { ... } isn't
 
Sam
6:37 AM
@BartekBanachewicz their different shapes have always been interesting to me... the diversity of their looks, sounds and the overall feels is fascinating!
Hello sehe!
 
@LucDanton To be honest, I run with vanilla Vim and I'm quite used to having redundant or lingering YCM processes. I've always assumed they were "legit" subprocesses. But I routinely pkill -f ycm if I (think I) need the memory
@StackedCrooked sweet. Was it CDN issues or something worse else?
@GundolfGundelfinger Now I want croissants
 
6:57 AM
@GundolfGundelfinger I assume it's because += is assignment and + is evaluation. { ... } is unique to assignment (and scoping) if I recall, but I'm also a badlet so take it with a grain of salt.
 
@GundolfGundelfinger consistency with =
@GundolfGundelfinger nah, it’s oh so extremely likely it was broken to begin with
@sehe yeah, to be fair I’ve only had problems when 'interesting' programs make Clang blow up
 
That too. But very rarely for me
 
one time, two tops
 
Xeo
@GundolfGundelfinger for what?
 
@Ell Heard of it once. Overleaf has file extension limitations, so I'm trying to include code files directly but it's not allowed, so I just called my files .hak.
I'm actually not happy with my language now that I write it.
C++: int x = 20; LePiX: var x : int = 20;
It's quite a bit more verbose.
But there's an argument to be made for just letting it figure out variable types by dropping the : int part.
Which is like auto in C++.
 
7:04 AM
Can your compiler reason about they type of an expression? I like explicit types in declarations, but you probably don't need var.
 
@Xeo pretty much anything
expr + { …stuff… } is never valid
 
You mean x = 20 ?
Versus x : int = 20; for declarations?
 
@ThePhD x : int = 20. If you really want to trim fat, allow types to be guessed by the compiler in declarations -> x : 20
 
It'd be a bit hard to tell a variable declaration from just plain assignment.
 
True. You could make the first assignment of an unused identifier (x here) automatically a declaration (with a compiler warning)
Maybe fool around with both and see if you prefer a more explicit language, or one that's less verbose. Regardless of explicitness, manipulating images will reuse nested iteration over arrays pretty much all the time. (e.g for y in array { for x in y { ... }}). If you don't have syntax sugar for that, it's worth considering before trimming down a few characters in a variable declaration
 
7:16 AM
@LucDanton As usual it's my "I reinterpret_cast a char* from read into a POD" use case. I believe @Griwes insists this is UB.
Actually, not a POD, but trivially destructible.
 
you need trivial copy
I’d need to study the changes very closely to figure out if that’s going to be affected
 
Xeo
@LucDanton Oh, TIL
@Aaron3468 I want to paint the bikeshed x := 20 :D
 
@Xeo lol. Honestly I'm a bigger sucker for syntax sugar than I am for the syntax itself
 
7:50 AM
Yay, more proposals for templates /o/
 
user1804599
lol templates
 
@Morwenn huh
TIL templates are unmarried yet
 
user1804599
This guy is great.
 
@GundolfGundelfinger I insist it's UB from C++17 onwards.
That comment is necessary for the sentence to properly reflect my interpretation of the standard. :P
 
8:00 AM
@rightfold That talk was in Rotterdam
 
user1804599
Yeah. :p
 
Notice the caption under the dude's photograph. Is this real?
 
user1804599
 
@rightfold Is that the same dude?
 
user1804599
yes
 
Definitely looks older than 16. I'd hazard 30-50 because some people age very well
 
@rightfold Well, the web is not very accurate. It gives me 10 extra years.
 
I know that local newspapers make typos and collect information incorrectly a lot more often, so I wouldn't be surprised if the journalist and editors were hurried
 
user1804599
;p
 
user1804599
@Aaron3468 then two newspapers did, see my link
 
8:13 AM
@rightfold Don't tell me you were there (I'd have gone there I think, this sounds like a reasonable pastime. Anything that focuses on "Joy" and "Coding" is)
@rightfold I'd estimate him at 35, minimum
 
^ I was like 34 then.
 
@rightfold How often do websites like huffington post propagate dubious statements made by other news outlets? They may both be wrong. The youngest I'd put a facial structure like that is late 20s. He doesn't have any of the chubbiness or the forehead/eye proportions of a teenager.
To be fair, if I saw the proportion of the rest of his body, I might relax it down to the late teens (though those facial proportions are exceedingly uncommon for me to see in that age group)
@wilx Yeah, the ability to guess age with certainty is logarithmic; you can be really accurate with younger ages and lose accuracy for older ones. Babies can be guessed within weeks of age, but by the time people get to ~50, guesses can be +-20 years accuracy
Like the picture you show would be 25-45 in my eyes. Definitely not above 50 because of how smooth your face is :)
 
@Aaron3468 The fat makes my face smoother. :)
So I guess if you are starving a lot, like the guy might have been, you could look older. But 16 it is not, IMHO.
Maybe the web is badly calibrated on "beautiful people"...
2
 
8:29 AM
@wilx No, the algorithms are just naive. Remember that a lot of current image-processing AI use colour/tone/shape functions. Estimating age is actually a function of proportion, skin health, race/background, and gender. I would not be surprised if current AI lose up to half of the accuracy a person can have.
 
how likely how-old.net uses a random number generator?
 
nwp
@Telkitty Unlikely, would be too easy to test for. They might use the last 2 digits of a hash function though for consistency.
 
Unlikely. The guesses roughly correlate to age and have a non-random distribution given my set of family and known people. Though they're definitely not very accurate. it appears to have margin of error +-(5 years * 50% of age).
 
user1804599
@sehe I weren't there
 
user1804599
8:40 AM
I went to HaskellX in London though
 
Of course I'm just guesstimating, but the margin is relatively large compared to the accuracy of people guessing other ages
 
@rightfold You wasn't?
 
user1804599
No.
 
@rightfold That's cool. Work or private?
 
Ven
private
Since everyone loves rightfold's privates
 
8:41 AM
shaved
 
user1804599
@sehe Private, but I got a ticket for free because of reasons
 
> raisins
I have to find myself some raisins
 
*+-(5 years * 10% of age)... I shouldn't have editted Q.Q
 
user1804599
 
@rightfold dat you?
 
user1804599
8:44 AM
With the arrows, yes.
 
Ven
incredible
 
That looks like a half of you.
 
user1804599
:p
 
user1804599
An eighth actually.
 
user1804599
Top-left of the backside.
 
8:47 AM
lol
 
:S I just realised you rarely get a chance to see all of someone
 
user1804599
XD
 
lol
 
user1804599
Dutch prince Bernhard raped little girls.
 
user1804599
9:02 AM
You wouldn't expect it.
 
what is the lounge doin this lovely day
 
Ven
PHP
 
what are you writing in PHP
some badass web app I presume
you know what PHP always reminds me of those forum apps
I used to spawn forums like crazy when I was in elementary lol
used phpBB and SMF, SMF was the best
 
Ven
I'm actually writing phpBB code :c
so no not very badass
 
ooo
 
9:13 AM
@rightfold is this a recent thing?
phpBB is like cobol, it's a relic of the past that refuses to die because it's still just about good enough compared to what else is out there
 
Ven
nah cobol sucks donkey balls compared to everything else
 
Hate PHP
 
Ven
on the other hands there is no good forum software
 
I would rather prefetr to code javascript than php
 
you know what forum I never tried
vBulletin
because it was not free like phpBB and SMF
 
user1804599
9:17 AM
@thecoshman Well, it happened decades ago, but it was published yesterday.
 
user1804599
He was also a nazi (but that was already known).
 
Ven
@AlexM. it sucks
 
user1804599
And not the kind of psuedo-nazi people call people they disagree with today, but an actual nazi.
 
Ven
it has hundreds of thousands of security issues, to start with.
 
user1804599
More reason to do away with the whole royal bullshit.
 
9:20 AM
@Ven well, I meant the system written in it
@Ven how many hands do you have?
 
user1804599
vive la republique
 
Ven
@thecoshman many
 
@AlexM. it's also not that much better
 
user1804599
Discord is teh best
 
> Prince Bernhard Leopold Frederik Everhard Julius Coert Karel Godfried Pieter of Lippe-Biesterfeld
...
 
user1804599
9:21 AM
screw IRC
 
Ven
@rightfold you're never on discord lol
 
nwp
Well, you always thought wrong. — nwp 31 secs ago
poor guy
 
user1804599
@Griwes lol
 
@rightfold what sort of system do you have for actual government? I mean like how the UK has a royal family, but also a parliament for real things
 
user1804599
@thecoshman Same as you, pretty much.
 
9:22 AM
This morning, I am mostly listening to Alestorm :)
 
user1804599
The royal family likewise exercises tax fraud and is not useful in any way.
 
Getting my pirate on :D
@rightfold UK makes money of theirs though, afaik, not actually checked the books personally
 
user1804599
Congrats king you're the grandson of a nazi rapist pedophile.
 
Ven
yay :D
 
@rightfold at least he wasn't... you know...
 
9:37 AM
@Griwes See @Luc. And yes I have trivial everything except construction.
And I guess that could be added with some effort
 
@GundolfGundelfinger stop cargo culting you dipshit
 
That or I need to double check what "trivially constructible" means
 
you don’t get a high score for adding trivial operations
 
@LucDanton indeed, but if that's the only way I can get rid of UB?
 
56 secs ago, by Luc Danton
@GundolfGundelfinger stop cargo culting you dipshit
 
9:39 AM
It basically means that the ctor does nothing and serves just the purpose of marking the start of the lifetime of the object (since C++17).
 
Alerte microaggression
No, the constructor definitely does something, namely a memset to some value of some byte range
But other than that the whole object can be blitted and destructed trivially
 
I'm almost sure that's not a trivial ctor.
 
I guess that's what he meant by "trivial everything except construction"
 
Could be.
 
@GundolfGundelfinger Observe the difference: coliru.stacked-crooked.com/a/8e33f6749786e714.
"Trivial" means "this is a noop".
@AndyProwl Could be.
 
9:44 AM
Woah, Erdogan wants to abandon "all the wrong perception of history", in particular the perception that the Ottoman Empire died a century ago and other sovereign entities took its place.
 
I didn't sleep too much last night, sorry if I'm missing some random things.
@R.MartinhoFernandes Oh, sounds just like Poland.
History written by the state.
 
user1804599
Sounds just like the USA you mean.
 
user1804599
Pretending people went to the Moon.
 
@Griwes what, Poland's head of state is also bringing to question the legitimacy of the country's borders, and more importantly, the legitimacy of their neighbors'?
 
9:48 AM
@R.MartinhoFernandes Well, they aren't going that far yet, but they have... a very peculiar view on history.
I doubt it'll take long for the govt to endorse the nonsense idea of an ancient "Lechistan" or whatever.
 
I find this particularly infuriating because I can't help but draw parallels with arguments for the Großdeutschland in the 1930s.
"It used to be 'ours'" for some definition of 'ours' that doesn't actually involve any living person.
(Though in the case of Germany it actually involved living people; not that it matters much)
 
I'm also pretty sure there will be claims of land that's east from Poland at some point.
Would be pretty hilarious if they tried to claim all land ever controlled by Poland, since that'd include... Moscow.
 
Haven't slept properly in days because of the fucking tinnitus.
 
My fu#% ISP is throttling my bandwidth (speed gets like 10x slower) and there is little I can do. because there is no guaranteed speed according to the contract. what the %^ :(
 
@R.MartinhoFernandes It needs more cowbell.
 
10:22 AM
@sehe Something worse. Too embarrassing to disclose.
 
you accidentally the server?
 
10:43 AM
@Griwes Take Kaliningrad again! I mean, Królewiec.
 
@StackedCrooked you're amongst friends, you can talk
 
@EtiennedeMartel Basically everything I thought as I read it.
 
@AlexM. the verb was too embarrassing to type?
:P
 
10:58 AM
Lambdas <3
 

« first day (2202 days earlier)      last day (2740 days later) »