« first day (1162 days earlier)      last day (1697 days later) » 

11:37 AM
@LanYi don't use a tool that requires short path names?
 
Can you create a subprocess on Windows in c++, not a thread a subprocess, if you know a library that can do so, please let me know.
 
11:57 AM
@anand_v.singh no idea what you're asking
 
Okay I think some backgroung might hrlp
I work with Tensorflow
There are multiple Issues similar to this one, none with a proper solution
My idea is to get TensorFlow to release the GPU memory and continue with my process
Maybe I can shift the tasks of tensorflow to the subprocess
So the subprocess gets all the resources it needs and once it's done, the subprocess gets killed freeing the GPU memory
In my pipeline I have to call quite a few tensorflow models, so I need the GPU freed once my work is done
________________________________________________________________
So my idea is create a parent process
Create a subprocess for each tensorflow model
 
@anand_v.singh That's incredibly expensive on windows
 
Once the subprocess is done, it releases memory that can now be assigned to another subprocess
@Mgetz what approach would you suggest in it's stead
I tried all these, I couldn't come up with a solution

https://github.com/tensorflow/tensorflow/issues/15880


https://github.com/tensorflow/tensorflow/issues/20387


https://github.com/tensorflow/tensorflow/issues/19731


https://github.com/tensorflow/tensorflow/issues/17048


https://github.com/tensorflow/tensorflow/issues/19571


https://github.com/tensorflow/tensorflow/issues/1578
 
@anand_v.singh I don't know tensorflow well enough to make suggestions on resource management patterns using it. But in general on windows favor the threadpool and then threads.
 
12:06 PM
Please don't just ping me
I'm paying attention and responding
 
But threads share resources
and sorry about ping
 
@anand_v.singh no they share memory space, they don't have to share resources
 
The issue with tensorflow is a tensor object going out of scope doesn't clear it's resources
 
@anand_v.singh then fix that bug
don't try hack arounds
 
But that's from tensorflow, google hasn't been able to fix that
It's on their end because of how tensorflow is designed
Subprocess is a suggested workaround by the community and it can work quite well in linux, my application is to be cross platform (Windows and Linux not mac)
Anyways thank you for your time, if I can find a way to do this I will, or else looks like I will have to take the route of gPRC
 
12:16 PM
@anand_v.singh Linux doesn't have true processes so I'm not surprised. But they give a hint to avoid sessions in the bugs you linked.
 
Yeah can't really do that
In the end in tensorflow you have to use sessions, you can postpone it but not avoid it
What is a TensorFlow Session?
A graph defines the computation. It doesn't compute anything, it doesn't hold any values, it just defines the operations that you specified in your code.
A session allows to execute graphs or part of graphs.
Sorry that was just google of session
So I can't really get what I want without session
Whoever suggested to avoid sessions, I am not really sure they understand
Still really thanks for the help, it means a lot
 
1:15 PM
@Mgetz well but the tool CMake invoked was VS2017's cl.exe...
 
Which one is correct way to do?

One:

str1.append("\"");
str.append(str2);
str1.append("\"");

Two:

str1.append("\"" + str2 + "\"");
 
nwp
How about str1 += "\"" + str2 + "\"";? Besides the typo of str instead of str1 those should do the same thing. But if you do it one at a time may as well use str1 += '"';.
 
1:30 PM
Now I'm curious if it's possible to achieve C#'s string interpolation in c++ with some macro/template/user literal operator magics
 
@LanYi which version of CMake are you using?
@LanYi short paths in general don't support unicode, they are inherently 8.3
Also looks like this is a known issue with ninja github.com/ninja-build/ninja/issues/1195
 
2:28 PM
@Mgetz 3.12
@Mgetz and... How can I not use 8.3 names?...
 
@LanYi so it looks like it's actually a ninja issue.. so blame google
 
 
2 hours later…
4:16 PM
noob question alert
if c++ is used for systems programming (and java, python are used for applications). surely most of the software work in this language has already been done? ie we have good operating ystems already
 
nwp
Our operating systems are terrible, operating systems are written in C and C++ is mostly used for applications. That last part is questionable since nobody really knows what people use C++ for.
 
@Permian systems programming can have a wider meaning then you seem to imagine. Server backend stuff, databases, games, software tightly interacting with hardware, custom protocols, drivers, etc.
Also most Operating System Kernels seem to use mostly C. C++ seems to find more applications in userland in general
 
so what is c++ used in industry now?
 
Like I said server backend stuff, drivers, hardware interacting stuff, games, HFT and yes even some regular ass desktop apps (I wouldn't recommend it for front-end stuff though)
oh and image processing of course
 
nwp
Nobody knows exactly. Github can give you an idea.
 
4:24 PM
exluding games and HFT
server backend stuff, drivers, hardware interacting stuff. could you elaborate on this?
 
If I look at the job ads then it's mostly automotive and security, but that's biased because I look at job ads in Germany
well when you have custom server backend services or software that needs to communicate tightly with hardware (mostly periphery devices) via low level protocols you might use C++ (industrial automation or automotive mostly). And device drivers are, well device drivers for everything you plug into your PC.
I'm not saying C++ is always the best choice for all those things, but that's what it seems to be used for
 
nwp
You use C++ for the same programs as you would use Java. Most applications don't need performance and C++ is still a decent choice, assuming you are good at C++.
 
mostly true I guess, I would not recommend people write Desktop application interfaces with Java either :P
 
@PeterT why not java? why something else?
@nwp i swear there are no libraries in c++ for rest api, web type things
 
nwp
I find Java's inability to express custom value types very annoying, but maybe that's just me. If you are happy with Java stay with Java. Unless you absolutely need performance and are willing to put a huge amount of effort into it it's not worth switching.
 
4:34 PM
The Java toolkits for Desktop seem to suck almost as much as the C++ ones. Modern interfaces with a lot of animations don't seem to work too well with them. Haven't really tried JavaFX, but neither seems anyone else. Also, having to ship the JVM is almost always a crummy UX
 
nwp
C++ people tend to stay away from anything web related. But I'm sure you can find something somewhere.
 
Well a lot of networking backend stuff is written in C++, and I use it plenty at work, including REST APIs and websocket protocols
it's not the best choice if web-communication is the main thing you do though
 
@PeterT with what libraries?
 
well we have a mix of boost asio and Qt for different parts
but sure, if you have layers upon layers of xml and json that you're processing and that's the main thing you do, then using C++ could just be making life hard for you for not much benefit
 
java rest apis just seem so complicated to me
spring is literally a mess
learning how to write a java backend i swear shouldnt be as hard as I am finding it
 
nwp
4:40 PM
If you're looking for something easier consider Python, not C++.
 
python flask is so straightforward
can it provide the same performance as a java based solution
 
I am just such a fiend for static typing that I'd rather use TypeScript than Python, that's just me though
 
@PeterT windows user space is almost all C++ with a procedural API, kernel space is another very strange matter.
@Permian blame java for that
 
@Mgetz its a complete mess
all these decorations which dont seem to add much
 
yeah, I considered the microsoft REST SDK but when I was looking for libs we were still stuck at VS2013
 
4:47 PM
aop = wtf
 
@Permian Java is what happens when you take someone's graduate research language and try to turn it into something people use
 
@Mgetz what is good for developing web apps etc (ie things to make money out of)
 
@Permian AOP is what happens when you try to recreate functional or a sane language in java
@Permian anything you're comfortable with that you like?
 
@Permian whatever gets the job done faster, what you know and what has the libs/bindings you need
 
For example most of facebook is still written in a custom dialect of PHP known as hacklang
 
5:07 PM
@Permian If you like Flask, but would prefer C++ for improved performance, you might want to consider Crow.
 
is he really going to get much of a perfomance improvement if he's just serving some content? With normal web stuff most of his latency is going to be the network
and he's probably not going to write his own storage backend but use some database or objectstore
 
5:53 PM
@PeterT Depends heavily on what his back-end is doing (which he doesn't seem to have specified much). I've written some code that benefited from it, but certainly not all code would.
Then again, at least for me there didn't seem to be much penalty either--writing code with it isn't drastically slower than writing similar code in Python using Flask. In my case, I needed Websockets, which Flask doesn't support on its own, and adding it on is (or at least at the time was) fairly clumsy. Crow supports Websockets directly, so for me it was probably a bit easier than using Python would have been.
As far as performance goes, a lot of it is less about latency for an individual request, and more about the number of simultaneous requests you can service and still provide reasonable latency for each. Or looking at it from the other direction, how wimpy of a (virtual?) server can you get away with to carry a given level of loading. With little difference in development cost, saving a few bucks a month on hosting can be worthwhile.
 

« first day (1162 days earlier)      last day (1697 days later) »