« first day (3113 days earlier)      last day (1834 days later) » 

12:57 AM
@ratchetfreak Recently got off the QTableView train because the interactivity was too hard to get right. Everything needed a delegate, delegates needed to be draw in certain ways to look correct. Overall a terrible mess. I wish there was some resource to get better at Qt.
 
 
2 hours later…
3:03 AM
Has anyone else spent time learning obsolete knowledge? If knowledge is obsolete, does it still carry value?
 
Is there some easy workaround for using std::transform like stuff on a collection of unique_ptrs? For example, auto biggest = *std::max_element(pointers.begin(), pointers.end(), predicate) won't work because you can't really get at the item, unlike for example with a pointer.
 
4:01 AM
idk, do something like value = (*biggest_idx)->something()
 
This is what first led researchers away from probability theory toward approximate methods for evidence combination that, while giving incorrect answers, require fewer numbers to give any answer at all.
Practical science ... </sarcasm>
 
4:15 AM
What if I don't accept the existing pecking order in human societies and consider anyone who accept pecking order as lower beings?
 
4:59 AM
@Mikhail in another era Boost.Iterator provided indirect_iterator
the Boost.Range version of that is indirected
 
 
2 hours later…
6:31 AM
So what about this issue. Windows (GlobalMemoryStatus) shows that 7 GB of memory is in use, but a sum of all processes on the system (via task manager) show >3 GB in use. Whats eating the rest of my RAM and how do I tell Windows to free up more memory?
So, "Empty Working Sets" in RamMap seems to temporarily fix the issue. Wonder how to do that from Win32
 
 
1 hour later…
nwp
7:49 AM
@Mikhail Why can you not get at the item? That seems fine as is. The predicate can dereference as much as needed.
 
nwp
8:03 AM
I want to implement a weird form of ADL for Lua.
device:paint(device.color_t.red, device.area.all)
That looks so redundant.
 
8:59 AM
@Mikhail what's the gain? It's all vritual, likely. Could it be that prefetch feature? There's almost bound to be a policy setting for it
 
@sehe basically my code needs to arena allocate a large memory buffer to dma into. It's a camera that runs at around 1000 fps.
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\set(60): fatal error C1001: An internal error has occurred in the compiler.
 
nwp
Try VS2019.
 
Ah. I suppose it could be about priority and a few proprietary virtual alloc calls. StackOverflow might know
 
CUDA won't install build tools. After 2 failed upgrade attempts, 2017 finally builds my code (mostly).
So, I told it to build again and now it compiles :-/
 
@Mikhail you could build your own. I've done custom widgets using a custom panel on which I "rubber stamp" the widgets. and managing all UI interaction from the panel instead of the individual widgets.
 
9:14 AM
@ratchetfreak So specifically showing and hiding the widgets in response to scrolling?
 
more like just having a drawWidget(dimensions, data, QPainter) and not having QObjects at all unless it's really necessary
like to simplify interacting with a selected widget
filtering offscreen widgets can happen as well, though my usecase was light enough that I didn't need that
 
So a typical adult human brain runs on around 12 watts
Not sure that is a fact or not, but I wonder whether human brain uses less power to navigate a car than a computer.
 
Oh, so you didn't have buttons, etc in that widget?
it takes about 10 ms to add the widget, but when you got 900 of them its no fun.
 
10ms for a single widget is already super long
and no I didn't have buttons, though there is mouse interaction
 
nwp
Can you even navigate through 900 widgets in a useful manner?
 
9:25 AM
scroll
 
Mostly text I assume.
 
I like the look and layout, but for performance reasons I made have to replace everything by a fucking table.
 
and if you add all the widgets without using a QLayout?
 
I am highly suspicious on whether Mik has actually tested the layout with 900 widgets on different sized screens.
 
9:45 AM
or maybe there is a hidden quadratic complexity when you add a bunch of widgets
 
nwp
If you are using a QVBoxLayout, try a QGridLayout or even a QFormLayout instead. That might cut down on computing interactions between size requirements of widgtes.
But yeah, a table seems reasonable. Even a QTableView if you can hold the data more efficiently than a unique_ptr to individual data.
 
10:33 AM
Qt's table's suck. If a cell holds a custom type you write a delegate that shows the widget. So the editor widget then occupies some area larger than the cell which looks terrible. Also you need to specify clicking rules to bring up the delegate which requires at least one wasted click. Now your editing widget overflows but the custom paint method for the delegate (Note we are repeating the layout code) will be restricted to the size of the cell.
The widgets seem to size correctly, and display the right editing controls without repeating code between the delegate and the widget the delgate uses to edit.
I don't see a hidden quadratic because even the first widget takes 8ms to add. Last one takes about 12ms..
So each one of these 900 widgets holds a widget that can show at most 20 widgets, although typically it's only showing around 10.. Once they are showing no performance problems, but adding or bulk editing starts to be an issue.
 
nwp
It's over 9000!
 
nwp
I want a shortcut for git stash && git checkout master && git merge dev && git push && git checkout dev && git stash pop.
 
10:52 AM
Some of that be done by force pushing, which I assume is how the Jedi use source control
 
 
3 hours later…
1:32 PM
if it’s fast forward and you don’t need a merge commit, you can directly push HEAD (dev) to origin/master, no Jedi powers required
i usually rebase dev branches onto master (to make them fast forward)
 
that can be occasionally dangerous, it's also not fast forward
 
 
6 hours later…
7:29 PM
I think I like it.
Despite being overly optimistic.
Probably.
 
8:09 PM
Does anyone know the algorithm used by the c++ queue
 
8:39 PM
@Rick queue or p-queue?
queue is just first in first out
it's built on std::deque
 
@Mgetz I mean the implementation algorithm/heap used to build it. I can't find it anywhere.
 
@Rick it's an adapter? it doesn't do anything special?
priority_queue is different
 
@Mgetz I assuming the underlying algorithm for both is the same, and that they just provide you a call back to control the ordering.
 
@Mgetz well then both I guess. I am just interested in the arthrogram used to implement them. But I don't know where to start looking for something like that
 
9:00 PM
@Rick in the source?
 
@Mgetz yeah, I really just want to know the name of the heap they are using. Is it binomial or something else.
 
probably implementation specific?
 
@Mgetz that's fine if it's implementation specific, that's what I want to know, I just want to know the data structure being used.
Implementation details are where it's at! :)
 
 
2 hours later…
10:53 PM
This is going to be an annoying question, but where does one start learning about template programming? I feel that the majority of people here are on another level. However most of the online resources I have found have been subpar. Where can I learn more about it?
 
@Sailanarmo Have you looked at any of the books listed in the book list? Fortunately, recent additions (especially type traits) have rendered a lot of what they try to do obsolete. The basic concepts they cover remain valid though.
 
@JerryCoffin, I did, the only two I saw was template metaprogramming and advanced template metaprogramming.
And both of them are kind of old. But I didn't see type traits in there.
 
@Sailanarmo No--I mean type traits have been added in the standard that make quite a few things pretty easy that used to require pretty deep TMP.
 
11:08 PM
Oh, I just noticed C++ templates book that is up to date.
@JerryCoffin oh I see.
 

« first day (3113 days earlier)      last day (1834 days later) »