« first day (1718 days earlier)      last day (3230 days later) » 

9:01 PM
So. I'm live coding again :/ Let's see what SO brings
 
@sehe Live coding?
 
I picked it up yesterday by impulse /cc ty @Prismatic
 
@sehe Why the :/ face then? :)
Omg, @sehe, your voice! /o\ Totally not what I expected! Not bear like enough!
 
@wilx :/ is my ambiguous face
 
user1804599
> C/C++
 
user1804599
9:08 PM
yes I can hear you fine @sehe
 
user1804599
but ugh Dutch accents
 
Ah. Overly critic :)
 
@AlexM. I'm waiting for news. I'm seeing the guy in charge thursday, but this will start around next february so no worries
@AlexM. Also I'm trying to make a tiny game and I'm tired of ascii art
 
user1804599
C++, what a horrible language.
 
sounds german
 
user1804599
9:14 PM
sehe is a German.
 
@rightfold jquery has solved all the shortcomings of C++
join us
 
@Mr.kbok You're getting into graphics?
 
user1804599
Yes, but it has a dependency on JS which is a huge problem.
 
user1804599
Since JS is somehow even worse than C++.
 
huh true
 
9:16 PM
@Nooble I'm trying my best to make my own graphics for my game, but I'm not quite satisfied
 
we should make a fork of jquery that runs on java
 
@Mr.kbok Ahh.
 
@Mr.kbok pixel art? :)
 
yep!
 
Which game engine are you using?
 
user1804599
9:17 PM
Tk.
 
i used to hoard pixel art
cooleru
 
sample
@Nooble kbok's secret engine
 
@Mr.kbok Oooh you made your own?
I've been trying to do that for months.
 
wait you have a sprite 7 pixels wide
 
Now if I can make this damn OBJ loader.
 
9:20 PM
No I'll probably just hack something together for the game.
 
I have this class that should only be modified from a single thread. One way to enforce this is to slap a mutex on every living thing in sight. Are there any better 'patterns'
 
yes
 
don't modify it from more than one thread at once.
use something like unique_ptr<T> and only the owner may access it.
 
Ell
@Nooble tinyobjloader ?
 
make it thread local
@nick so?
 
9:24 PM
@Mr.kbok you are wasting 12.5% of your available space
 
user1804599
@Prismatic spawn a thread which deals with that object and accepts requests from a ttb::bounded_concurrent_queue.
 
user1804599
i.e. a server–client architecture
 
user1804599
the request contains another tbb::bounded_concurrent_queue on which the response is sent
 
@Ell Wonderful! Does it have documentation?
 
well isn't that fun, insurance is starting out at around €2000 :\
 
9:25 PM
@rightfold I could actually do something like this pretty easily, but the problem is I generally need to call methods on it that have return values.
 
I'd shave about 500 of that once I pass though
so only need a few months for whilst I'm practicing
 
So I'd be blocking the thread calling a function on the object until the response is ready... which seems like a bad idea
 
hopefully going onto another insurance will work out cheaper
 
@nick Oh, no, sprites are always defined as a 8x8 pixel matrix. This is for a hardware renderer
 
Hi guys, I'm looking for help understanding a SFINAE expression that I've recently encountered. If anyone knows of a good article to read, I'll appreciate it.
 
user1804599
 
user1804599
Make multiple request types for diff kinds of requests.
 
Ell
@Nooble a little. it's pretty simple though, just read the header file
you can work it out from there
 
@rightfold I wonder if concurrent_bounded_queue::pop() has the calling thread block on a mutex or yield the thread with a wait condition
 
user1804599
concurrent_bounded_queue blocks on pop and push
 
user1804599
Also use a language in which concurrency is actually feasable, such as Elixir, Haskell or Go.
 
9:35 PM
@thecoshman for a car?
 
@almosnow I found the wiki article on sfinae to be pretty good. I also like eli.thegreenplace.net/2014/sfinae-and-enable_if
 
@Prismatic Put the return values into the object, ie. have request and response members.
@Prismatic It would be difficult to process the response before it is ready:)
 
@Ell Oh I see. This is great. Thanks :)
 
my gigabit link won't gigabit
it stays at 100-tx
 
@Prismatic Looks good, thanks.
 
9:45 PM
wat do
 
@nick yeah
 
@Prismatic Still can't figure out what this is doing :( template<typename F, typename = decltype(declval<F&>()())> _c(F&& f) {}
 
@thecoshman i guess thats not too bad
i pay like that much but I'm in california where insurance is a bit more expensive than average
 
@almosnow It’s inspecting the expression x() where x has type F&.
 
Hmm...
 
Ell
10:02 PM
Oh greece
 
huh... you know how for that internet censorship thing a lot of sites blacked themselves out... how about as a sort of "racism is still a problem" sites 'white' themselves out. Set all their colours to almost pure white, so you can only just about see it...
someone get on that
or not
 
user1804599
Greece is like Belgium.
A myth.
 
whatever
 
user1804599
Also ouzo is disgusting.
 
@rightfold ... is that like Sambooca?
@sehe I can heeeear you
@sehe hey, I listen your woes :L
 
10:08 PM
@sehe's live coding?
 
yes
 
Does anyone know if calling std::thread::get_id() recklessly is a bad idea? Like calling it a ton of times very quickly continuously pretty much? Do you think it would be a slow operation in general?
 
is there a way to record it?
 
but I'd rather go read comics :D
 
oh come on this is awesome
 
10:08 PM
no
it really isn't
 
but I have to go to sleep
damn
 
night
 
@AndyProwl is saves past broadcasts it hink
 
cool
 
@sehe how do you even desktop on your PC
you don't have a start button and things
2hard4me
 
10:11 PM
@AlexM. Maybe it's just not visible?
 
I wouldn't be able to work with that IDE, I'm 2 noob
 
my tool of choice for navigating my computer is the mouse
but I noscope buttons like a pro
 
my mouse is dying... ive learned so many keyboard shortcuts lol
 
I'm a supernewber
 
@AlexM. Well. It's a partial screen cast :)
Composited
 
10:13 PM
@AndyProwl I just use a text editor.
 
@Nooble Yeah, I'm too noob for that
 
Ell
I am too Nooble also
 
@rightfold I don't choose the cat label :(
 
It looks nice.
 
10:14 PM
@thecoshman Thank you. My soul is replenished
 
Ell
I use atom & a few terminals
@rightfold where?
 
@Ell :P
 
real programmers use nano
 
Ell
Nobody uses nano
 
user1804599
real programmers use the tool they're most comfortable with
 
Ell
10:15 PM
^
Actually
 
real programmers use a magnetized needle and a steady hand
 
Ell
Real programmers use the tools they're most productive in
 
I use a shitload of tools
 
@nick Excuse me, but real programmers use Cicadas.
 
shit I'm not going to sleep :D
 
10:18 PM
@Nooble true, I get Cicada to write all my code for me
 
this is pretty much all of the stuff I ever use
 
that's funny I can't seem to find tortoise anywhere in that pic
 
Someone who actually uses the Windows 8 start menu...
 
I only keep games on my desktop
I don't like keeping tools there
 
I keep nothing on my desktop.
 
10:21 PM
so they go to the start menu
 
i launch everything with the search in win 8 start menu
 
> Favorite Language: C/C++
:D
 
i wish i could just bring up the search sidebar thing by pressing the win key instead of the whole start menu
> Languages I Want to Learn: Obj-C/Swift (iOS)
 
nooo it's over?
 
TIL Obj-C++ exists.
 
10:22 PM
obj-c master race
 
bah
got a flight in the afternoon and my boss wants me to work from home in the morning
 
user1804599
You can make iOS apps in Go 1.5.
 
user1804599
Which is really nice.
 
@Nooble did you know you can even write it on windows
 
stupid dude trying to make me work for money
 
10:23 PM
whoa
 
9 mins ago, by sehe
@rightfold I don't choose the cat label :(
 
@sehe cool thing you did
 
@AndyProwl Assuming you mean the cast, yeah. Nothing interesting on SO and I processed the backlog of today.
Unless, maybe @buttifulbuttefly wants to cast his challenge into SO format. (From earlier today)
 
@sehe I meant the cast. In the end I need to go to sleep so it's probably a good thing but awesome idea
 
@sehe What challenge?
 
10:24 PM
@Nooble lemme find
13 hours ago, by buttiful buttefly
@sehe Definitely not minimal, but working.
 
I didn't notice the Dutch accent
 
Needed optimization. Achieved 60% on my box. Buttiful confirmed 50% on hers its
 
user1804599
@AndyProwl because you're not Dutch.
 
And that was without using Boost Spirit, boost::string_ref or otherwise getting outrageously low-level.
 
would like to hear @buttifulbuttefly speak
 
10:26 PM
@rightfold Could be. But I wish I could speak English that fluently in an improvised cast while also solving a problem
 
11 hours ago, by sehe
@buttifulbuttefly Made me think of something though, I had this but refactored it away when I dropped string_ref again: http://paste.ubuntu.com/11798545/ (see spot the difference on coliru) :)
 
hmm
if you have an RSA private key, can you generate the public one?
 
@nick You should have been here in the mumbling days
 
or is it as hard in both directions?
 
@sehe mumbling days?
 
user1804599
10:27 PM
I often can't come up with Dutch words and I switch to English halfway a sentence.
 
@sehe What happened to the mumble.
It died shortly after I first talked here IIRC.
 
oh right right
 
user1804599
I do that too in issue titles in YouTrack and the client thinks it's quite amusing.
 
user1804599
but I just don't notice it
 
10:28 PM
@Nooble I stopped running it. Cat(?) has started something new on his VPS?
 
Really?
 
Now that I speak Czech most of the time words come to me in Czech when I'm not focusing
My English was better a few years ago
 
@rightfold I have the same deficiency. Some colleagues really think it's weird when you continue speaking English after all Ukranian/Russian co-workers left
I don't want to switch. ~~effort~~
 
user1804599
klasse :shrug:
 
@Nooble Me too. On technical matters it's just much easier to talk English
 
10:30 PM
@sehe Wrong ping, I think.
 
@AlexM. how is freecad
 
@Nooble nope (I assumed your "really" was targeted at "but I just don't notice it")
 
@sehe Oh.
 
@Prismatic still learning how it works, haven't gotten to using it on actual things
waiting until I can buy a 3D printer
 
@sehe Oh.
I didn't. Is it still up?
 
10:31 PM
would probably be a good idea to learn how to design parts before buying a 3D printer
 
@Nooble Yup
 
@AlexM. have you used shapeways?
 
user1804599
@sehe you are good at C++.
 
man my event handling is really... nasty. I haven't seen anything like it. I constantly compare thread_ids for threads that push new events with event loop thread_ids and change behavior based on that to avoid deadlocks for synchronous calls and the like
 
@rightfold Thanks
 
user1804599
10:35 PM
@Prismatic you are very bad at concurrency
 
hmm? (I think that goes without saying... ~~mutability~~) :D
 
@Prismatic very nice
 
@rightfold concurrency is the devil
 
user1804599
Try writing a concurrent program in Go.
 
user1804599
It has no thread IDs.
 
10:36 PM
I never use thread ids
Thread ids are not useful
 
Yeah I've begun to think that requiring thread ids means "You're doing it wrong (tm)"
 
Why would you ever need the thread id?
 
user1804599
@sehe I never use non-detached threads.
 
user1804599
I signal completion through queues.
 
@Nican mostly just to avoid deadlocks
 
user1804599
10:38 PM
What is it what you are trying to do?
 
You avoid deadlocks with proper design :) Using thread ids is a cheat in most cases
 
@sehe Now I'm hearing everything you type in your voice :D
 
Isn't that the same semantics as recursive locks?
 
@rightfold Im writing a shitty clone of how Qt does its event handling
 
Me too :S
That's actually annoying. I used to chat in a rather "dissociate" abstract voice.
 
user1804599
10:39 PM
Use the same design Qt uses, problem solved.
 
Now, when I type, I engage other parts of the brain. It's not good for my multitasking abilities because it interferes on more channels.
Just type chat is better for coding.
 
@rightfold Idunno how Qt does what it does, but I'm sure it uses thread detection as well, so id be surprised if they aren't using thread ids as well
 
@Nican Yes. Recursive locks are also frequently frowned upon for the same reasons
 
user1804599
If your lock is recursive it probably means the critical section is too big.
 
Like their behavior between two objects signalling each other changes based on whether or not those objects are in the same thread. Then again they actually have separate "Thread" objects, where as I'm cheating by using std::thread::id
 
user1804599
10:41 PM
Try using queues instead of mutable state.
 
user1804599
Don't communicate by sharing but share by communicating.
 
I am using queues? Do you mean like abstract threads out completely? Like an actor framework?
 
user1804599
pass a queue to both threads (by-ref for obvious reasons; this is where GCs shine in concurrent settings)
 
user1804599
have one thread enqueue and other thread dequeue
 
user1804599
then you don't need locks
 
user1804599
10:44 PM
you can enqueue and dequeue on the same thread just fine if the queue isn't full
 
@rightfold really?
 
user1804599
Yes.
 
user1804599
I just don't think I need them.
 
user1804599
The only reason I'd use them is for calling join later but you can implement that using queues as well.
 
user1804599
But I don't like combining threads with RAII and blocking destructors.
 
user1804599
10:45 PM
I think it's just too fragile.
 
user1804599
Change one scoping thing and everything breaks.
 
We are aware of the issues with some people having issues access our site and are working on it.
 
user1804599
With shared pointers to queues you don't have this issue.
 
engrish fail
 
@rightfold i dun get it
 
user1804599
10:49 PM
void f(queue& q) { q.push(1); }
void g(queue& q) { auto i = q.pop(); std::cout << i << '\n'; }
queue q;
std::thread a(f, std::ref(q));
std::thread a(g, std::ref(q));
 
user1804599
that's how you print 1 using two threads!
 
How is that thread safe? That's concurrent access to q with no locks
 
because queue is a thread-safe queue
 
@sehe I tried connecting to the loungecpp.net Mumble, it timed-out.
 
if (!queue.is_thread_safe()) rightfold_sucks = true;
 
user1804599
10:51 PM
@Prismatic using queue = tbb::concurrent_bounded_queue<int>;.
 
user1804599
Then it's thread-saf.e
 
user1804599
printing more numbers in Go: play.golang.org/p/SkULvw9Ecv
 
... then it has locks. Or if its a lock-free queue it has other thread-safe properties which probably have non trivial penalties
Id rather just use mutexes tbh
 
user1804599
It may have locks … internally. They're an implementation detail and don't cause deadlocks.
 
tbb::concurrent_bounded_queue is so useful
Haven't really use the unbounded queue much though.
 
10:52 PM
why bother bounding it?
 
user1804599
bounded queues are surprisingly useful
 
tbb::concurrent_queue is unbounded, but also never blocking. so if it's empty you need to spin or something.
I don't like spinning.
 
user1804599
however it'd be nice if TBB weren't so shitty and allowed queues with a capacity of 0 so that send and receive always synchronised.
 
@Nooble Obviously:
25 mins ago, by sehe
@Nooble I stopped running it. Cat(?) has started something new on his VPS?
 
spinning is better than blocking if it's a short time
 
user1804599
10:53 PM
i.e. send blocks until there's a receive and vice versa
 
user1804599
that'd be really nice
 
user1804599
but this is trivally implementable
 
@Puppy depends on the purpose and the nature of the rest of the application/OS load
 
concurrent_bounded_queue will spin for a short while before falling asleep.
 
I added a 'Task' class that wraps a future and does kind of the same thing that your example does... except the behavior for calling wait() or get() on the future and calling pop() on the tbb queue might be different
 
10:54 PM
@sehe I thought you meant that Cat was running it on his VPS.
 
For low lat/hight throughput yes spinning is better
@Nooble Probably some other URL. Find it through the lounge wiki (I never go there)
 
just did a test on mutex spinning vs locking. Spinning leads to ~300 ns latencies. Locking brings ~3us latencies.
 
yikes, 10x
 
context switching...
 
@StackedCrooked It does depend wildly on the other loads, scheduling, memory access patterns etc. Also, prepare for the electricity bill to double :)
 
10:57 PM
@sehe I'm pretty sure the Mumble is dead. Last time Cat talked about it he said he deployed it on loungecpp.net (default port).
 
while (!m.try_lock()) { asm volatile("pause;"); }
std::lock_guard<std::mutex> lock(m, std::adopt_lock);
 
Aug 22 '14 at 1:29, by Cat Plus Plus
loungecpp.net default port
 
@sehe not my bill :P
 
I wonder if future.wait() spins at all before blocking. something tells me it probably just calls wait_condition.wait()
 
user1804599
@StackedCrooked another nice use for queues (assumes the ability to wait for multiple queues at once): play.golang.org/p/nSu7VxHfHU
 
10:58 PM
Talking about locks, and latency, this was pretty interesting: blog.cloudflare.com/how-to-achieve-low-latency
 
> makeFuture()
.then(x)
.via(exe1).then(y)
.via(exe2).then(z);
 

« first day (1718 days earlier)      last day (3230 days later) »