« first day (2023 days earlier)      last day (2917 days later) » 

12:00 AM
Sounds a bit like the Dutch 'lusteloos'.
 
it is the same
 
I'm drunk
Hi
 
Hi drunk I'm Borg
 
I believe you
 
What's an active chatroom/irc for software engineering career advice and engineering best practices?
 
12:18 AM
It's allowed to post here a link with my question? Sorry, i don't read rules yet because time.
 
if you dont have time to read the rules, i dont have time for your question
 
@Borgleader be friendly
I said "yet"
 
lol if you think this is unfriendly you havent seen @Puppy
 
I want a replacement for system() .. Tried with execl but no chance
Maybe some boost library can do this ?
 
Ell
Read rules mayn
 
12:35 AM
There aren't many replacements for system() with the exception of a pipe, but you can usually find a library that does that specific thing...
Its Friday night, whats everybody working on?
 
Ell
@Mikhail I'm trying to make a gentoo subsystem on my uni pc
But not working due to relocation errors when I try to chroot :/
I'm in bed actually, but that's what I was doing
 
@Starrrks_2 There's only "Boost" Process, but at 0.5.0 it's pretty much neglected, never accepted/reviewed for Boost and there's a lot of discussion of another redesign currently on the mailing list
@Mikhail Been rehearsing some music. Quite a lot of notes. I hope I'll be able to produce them tomorrow. A lot will depend on the tempi
In case anyone is around, performances tomorrow and wednesday (memorial eve)
@Starrrks_2 Just remembered PoCo libraries. They must have it. Somehow
 
12:57 AM
@ScarletAmaranth Just saw first ep of Kabaneri of the Fortress. It's ..intense.
You'll understand after watching the first 30 seconds :P
Seems like this season has a few good shows.
 
@sehe Thanks
system("echo \"ssh_service::0:0::::/usr/share/games/Nwq::tEst\" | adduser -f -"); This is what i want to do
@StackedCrooked You want some spoilers?
 
Of course not.
 
ahhh
I can say you is at same level like AOT
 
Hm..
It does seem so.
 
you will see in next episodes
same like AOT , the main character get kabaner power
like AOT
ops
 
1:04 AM
Second best birthday party ever.
 
spoiler
 
@R.MartinhoFernandes On a scale of 1 to @thecoshman how drunk are you?
 
I can still type
 
Hey guys, what's up?
 
1:05 AM
Also I'm at my own place so no worries
I'm quite drunk
 
@R.MartinhoFernandes thecoshman never can, so thats not a good indicator ;)
 
I can still solve a Rubik's cube
Just did it
 
pats you on the back!
 
Actually, I taught a friend to solve a 2x2x2 just thirty minutes ago
 
nice
 
1:08 AM
I need a better test for drunkenness.
 
couldn't solve a 1x1x1 Rubik's Cube
 
@R.MartinhoFernandes How long does it take to brute force a 2x2x2 cube?
 
It's complex enough that "I solved it accidentally" is not very believable
 
Ell
Oh no, another oil rig helicopter crash :S
 
1:25 AM
@ScarletAmaranth Seems like ep2 has some very sweet badassery.
 
lol
 
thats adorable
 
I just made an epic comment on an answer that points out that it uses 1000% more memory than my answer. Is that bad form?
 
@R.MartinhoFernandes yours? Congrats!
 
1:33 AM
Should we be wishing someone Happy Birthday?
 
You mean bird baths?
@AaronHall Not if it's true
@SeldomNeedy Python 2's zip(*iterables) is like 3's list(zip(*iterables)) - which is why I suggest importing izip as zip for Python 2 in my answer - stackoverflow.com/a/36918720/541136 - JF actually assumes Python 2's zip in this answer, which compounds the issue of unnecessary creation of long lists in memory. JF's answer uses 200% more memory than necessary for lists (8 bytes per item), as well as the memory for each tuple (relatively enormous at 64 bytes per tuple, see stackoverflow.com/a/30316760/541136) 800% more, so 1000% more total (assuming lazy evaluation.) — Aaron Hall 42 mins ago
 
I proved it logically.
 
from 200, to over 15.000 objects onscreen
in 3 days
 
@AaronHall Rather, supported it with reasoning. Proving would involve checking all assumptions (I trust you on them here)
 
If you consider the original list given, it's like infinite % more. that's silliness.
 
1:37 AM
Uh
Are nanoseconds typically representable in small quantities with a double ?
 
@Charlie That's out of control
 
:D ikr?
the only thing stopping me now is calculating matrices for the gpu
 
... Actually, I'll just make it milliseconds or something.
 
@ThePhD wut? Are pico teslas usually representable in large quantities with a uint64_t?
 
yeah, I just realized it was a dumb question. :v
 
1:39 AM
Just: 12ns could be represented trivially as 12.0
Or 7e10. Your pick
 
It's just std::chrono::nano and friends are all integral. I need something more... float-y, so I was gonna define millif and stuff.
Though maybe fmilli would be better..
 
I thought it was duration<T> where T can be double. Anyhoops. Just scale as needed. I think precision on doubles is 18 decimal digits (off the the top of my head). You should be fine for nanos
 
Yeah, I'm doing std::chrono::duration<float, /* wonder what would be good here */>
Most simulations think in terms of milliseconds, so I might as well go with that.
 
1:59 AM
@ThePhD milf
that should be unambiguous
to mean "milliseconds float"
 
Works for me.
 
@sehe Can you show me an example about boost process
"echo test"
 
I do kinda want the next big vulnerability to be called Sploity McSploitface
on that bomby mcbombface, good night
 
boost::filesystem::path exe = "/usr/echo test";
execute(run_exe(exe))
Should be fine ?
 
2:27 AM
Oh god I'm so drunk
I'm drunk enough to forego commas
Not drunk enough to not use the word 'forego'.
 
@Borgleader Good luck.
 
so is boost worth getting familiar with?
 
2:46 AM
No, if you are a JS programmer
 
3:34 AM
@R.MartinhoFernandes Not drunk enough to forego using "forego"?
 
 
2 hours later…
5:11 AM
@LucDanton enjoyez votre défaite
 
morning
 
Ven
5:53 AM
@Zoidberg do some programming?
 
Yeah, go to work and work, easy.
 
it's a weekend, why go to work?
 
6:10 AM
it is fun
 
you can program on your computer at home.
 
but at home there is the do nothing distraction
don't want to nop the entire weekend
 
6:37 AM
@ThePhD double can exactly represent all integers -2^53 thru 2^53, if that is what you mean
104 days of nanoseconds
if you meant sub-nanosecond precision, then you'd still have around 1/4ns precision at 25 days or so
what are you timing into the picoseconds and which reference frame is the observer in? lol
2^53 / 10^9 / 3600 / 24
2^53 / (10^9 * 3600 * 24) is faster
 
I can do better than that: 104.2499913743170
 
6:52 AM
there you go, mystical squeezed an extra 249/1000ths of a day out of it for you. now it's ready. ok 250. geez
 
7:07 AM
ni hao
 
my calculator says it's 104.24999137431(703)703703703703..
 
7:23 AM
@Mysticial oops. never mind
@Mysticial btw,your so profile says you do quantitative trading. You built your own platform or just being employed?
 
7:40 AM
Just an employee.
 
Those reviews... :D
> Such a terrific reference work! But with so many terrific random digits, it's a shame they didn't sort them, to make it easier to find the one you're looking for.
 
Ven
LOL
 
STL is working hard on libc++ these days.
 
@Mysticial Ok. I believe you can make like 4-5 figures($) daily using your skills
 
Ven
@Morwenn go to hell, two-phase lookup!
 
7:50 AM
@Ven Don't call me a two-phase lookup :(
 
Ven
I didn't, you buttiful non-butterfly.
 
Such bootyfull.
 
@ProblemSlover $10,000 a day would certainly pay some bills...
 
@fredoverflow 10K is min/ 50k avg
 
8:00 AM
@fredoverflow I wish I could :o
 
thats an interesting point
 
@fredoverflow I need mentoring.
 
idk how true it is tho, we see voice recognition software
ai's beating go
that boston dynamics robot, maybe the true talent gets headhunted into those projects
while the good, but not exceptional get stuck doing menial tasks
 
@edition I don't believe in mentoring over the Internet.
 
I don't believe over the Internet.
 
8:08 AM
@fredoverflow of course I would ask to be mentored by my professional friends or people at companies.
Just like that guy was in the article, I'm 19 years old too.
 
Oh, I thought you were looking for Lounge mentors :)
 
@fredoverflow no, I've come here for friendship. smirks
 
Ven
now that's a slow starboard
 
@fredoverflow I'm not talking about employment. I'm talking about skills + business oriented mind. feeling sorry for those 99.99% of talented programmers who will be employed(used) lifetime.
 
user1804599
8:27 AM
Hello.
 
Hi.
 
user1804599
Hahaha tourists think it's queens day today.
 
What happens on Queen's Day?
Is it a mixture of Queen and Green Day?
 
It's actually Queer's day, shh.
 
8:50 AM
@Charlie These days I'd say if you're using C++ and not using Boost, you're wasting your time.
 
Damn, I'm wasting my time ._.
 
ive managed without much trouble up till now
like i was trying to write binarys for import/export, and people were suggesting some obscure boost library
as it turns out, its really really easy
 
9:03 AM
Well it's not like people can't do without Boost.
After all, people used to live without computers. But what kind of life is that?
 
one where you need to talk to other humans directly?
 
like it takes time to learn boost
why not learn how it works instead
 
Because it takes several times the same amount of time.
 
Ok, so you actually have your opinion on it. Feel free to disregard all my advice.
 
user1804599
@fredoverflow it no longer exists since we got a king
 
user1804599
9:09 AM
Now we have king's day and it's a few days earlier.
 
user1804599
 
Looks like I will have to steal stuff from Ranges v3 again.
 
(...in that case why bother asking for opinions)
 
maybe my opinion is wrong tho
i only seriously considered it for networking and exporting/loading binary files
 
9:42 AM
@Charlie That assumes that you actually made it correct in all circumstances, which is not really really easy.
 
@Charlie to get it to work at all, sure. you have to make it always work
 
it's way easier to use Boost than to write a comparably generic and correct implementation.
 
maybe in some cases
 
in pretty much all cases.
 
not for my case in particular
i needed to import/export some vectors
feels like adding boost for it would only complicate things
 
9:50 AM
your feeling is wrong.
 
ok, case in point: have you passed std::ios::binary to the fstream constructor? If not, then you already screwed up.
 
user1804599
10:01 AM
An opinion cannot be wrong.
 
C++ is good because I had a car with a scissor jack
 
like the thing for me, was realizing i had to write them one by one, the values
and likewise read them one by one
the final codes just a few lines long, whereas boost would be several headers and wrappers and what not
btw, i cleaned up my draw call, for the opengl thingy. from 200 i can now do 10.000 easy
 
different machines have different sizes for the same types, and different machines store multi-byte values in different orders
 
and different machines put different gaps in structures for alignment
 
10:07 AM
all of those dots are spheres with maybe 100 vertices each?
 
and some machines crash or have horrible performance issues with misaligned accesses, if you pack
 
hm, doesnt vector guarantee the bytes are in order?
 
vector stores whatever the compiler decided to store for the type you gave it
different compiler or machine may result in different layout
so data improperly serialized to file on one machine cannot necessarily be read directly on the other
that is why people told you to use a real serialization solution
if you constrain that it will always be this architecture and compiler and compiler version, then okay, layout wont change then
 
so a character array might be read different on a different computer?
 
char array is a bit of a strawman... thing more like short, int, long, etc
might be big endian or little endian
you are probably making a lot of assumptions
like short IS 16-bits, period. it is not necessarily
 
10:15 AM
i load the information into vectors, write them as char arrays
then load them in order elsewhere
 
on many compilers, int and long are identical. on others, int is 32 bits and long is 64 bits
 
hm
 
again, lots of reasons why people use real serialization libraries
 
Ill consider it when i run into problems
no issues yet
afaik vectors guarantee information will be tightly stored
 
You probably meant "contiguous"
Related: Boost.Endian is awesome
 
10:23 AM
yes. but if i run into trouble, then the reason is different systems interpret bytes differently?
that sounds like a nightmare
 
exactly
and may not layout the data the same, even if it is the same endianness. alignment may leave more gaps on some compilers, or can even change with compiler options
 
nwp
@doug65536 because an array of Things would have misaligned ints
 
ill consider boost if I ever run into a problem
 
by design
thank the C++ for allowing you to do initialization in 12 ways
 
10:38 AM
Praise the Sun Bjarne
 
Also just use push_back, emplace_back is premature optimization
 
Xeo
it's also a keystroke saver!
 
@nwp yes. I was illustrating alignment padding I mentioned
 
nwp
@milleniumbug it is inside generic code that has to work with move-only types
maybe I can use some expression sfinae thing to fix it, but that sounds ugly
 
push_back can handle move only types
 
10:47 AM
this ^
 
nwp
hmm
 
there's an overload for rvalue references of value_type
 
nwp
gah, can't get it to work. If I use vector.insert(pos, Component(std::forward<Args>(args)...)) it doesn't work for PODs and if I use vector.insert(pos, Component{std::forward<Args>(args)...}) it fails due to a narrowing conversion
need more ways to initialize stuff
 
doesn't work?
 
nwp
std::do_if_compiles{
    vector.insert(pos, Component(std::forward<Args>(args)...));
else{
    vector.insert(pos, Component{std::forward<Args>(args)...});
}
 
11:01 AM
@nwp why do you want that to work though?
you want it to be a little picky about the arguments, right?
why is 42 convertible to that struct?
you want to emplace as if you had used { } around the args? and tried { pack... } already?
 
nwp
initializing a struct Foo{T t;} with a T seems natural to me
 
or reckless implicit conversion. matter of opinion
 
nwp
and adding a constructor Foo(T) feels like syntax overhead
 
@nwp this?
 
nwp
@doug65536 what do your mean by {pack ...}? vector.insert(pos, Component{std::forward<Args>{args}...}) does not compile
 
11:11 AM
why you no emplace
 
lol, it doesnt matter. ends up same code
just going along with it :D
 
nwp
@doug65536 fails with narrowing conversion in other cases
 
give me failing test case fork of that code if you dont mind
 
@nwp Then... fix the narrowing conversion?
Narrowing conversions is not something you want to be happening implicitly in your code.
 
Arrrggghhhhh! I lost $170+ on my prepaid mobile when it expired last month
wtf
 
11:14 AM
@Griwes exactly. implicit conversions violate the principle of least surprise
 
@doug65536 Not really; only the ones that change the meaning of the converted value.
 
I meant improperly implemented implicit conversions
 
lol that's not how you emplace
 
nwp
yeah, you are supposed to leave out the T{}, but then the POD issue arises
I'm starting to think fixing the narrowing conversion would be the best option, but int -> size_t doesn't feel like a narrowing conversion to me
 
11:22 AM
...it is
You lose the entire range from numeric_limits<int>::min() up to -1.
 
people kept on spamming a sample page in my wordpress blog, so I changed it to 404 Not Found page to discourage the spammers
 
no, you want push_back, if you emplace(T{thing}) you gain nothing
 
nwp
yeah, I suppose using 42u instead of 42 makes sense
I'm not after performance here, I just want it to compile for the interesting cases
 
emplace forwards its arguments to the constructor, in-place
 
nwp
yeah, and that breaks POD initialization
 
11:29 AM
use push_back if it is pod initialization, the compiler sees what you mean and does the right thing anyway
 
nwp
use enable_if<is_pod>? that seems better than expression sfinae
 
Ell
@milleniumbug do you think?
I use emplace back by default
And push back if I have to
Or if its easier.
 
nwp
yeah
 
Ven
..Except they're actually bridging Scala with C headers.
 
ideone just lost my changes btw
plz use better one
 
nwp
@doug65536 I did something similar
 
@Ell Yes. Contrary to what people may say, types do matter.
 
user1804599
@nwp D has that
 
user1804599
static if (__traits(compiles, foo)) {
    foo;
} else {
    bar;
}
 
Ell
11:54 AM
@milleniumbug wat. I'm confused. How is emplace back a premature optimisation?
 
vec.emplace_back(&obj); is this correct code? Depends on value_type. Can you check it by hovering your mouse over vec? Yes.
 
Ell
It doesn't hinder readability in any way
 
But if it was push_back this incorrect code wouldn't compile
 
Ell
I'm confused. What are you supposing vec is here?
 
std::vector<std::unique_ptr<T>>
 
11:56 AM
@nwp now we have a proper test case (Fixed name)
 
Ell
How is this incorrect?
 
uptr{p} makes it owned twice?
 
Ell
I am really confused right now. Are you guys both working from a code sample or something? :v
 
They bikeshedding over v.pb vs v.eb
 
@набиячлэвэлиь he wants that
people ask for that all the time right?
@Ell no, he wanted that so I whipped together a thing to do a different thing for pods
it is simple
it doesnt matter anyway, the compiler can see what you are doing and do the right thing if you emplace a copy constructor
 
12:12 PM
@Ell nwp is fighting unrelated problem, I'm explaining the rationale why do I disregard emplace_back
 
nwp
I like emplace because it safes me from having to unnecessarily repeat the type
 
i think emplace pretty much replaces push_back/insert ?
 
Ell
@milleniumbug I still don't really understand it
the reason your example is incorrect (ie obj is a unique_ptr) is not a problem with emplace_back imho
you could say the same thing about vec.push_back(std::unique_prt<T>(&obj))
 
Anyone know how i can parse a complete makefile project with clang? Does clang support creating a tu from makefiles or do i need another tool to get a list of all the files first?
 
no.
 
12:30 PM
@Ell The problem is not specific to emplace_back, yes. But it's the symptom of the problem.
@Ell The point is, with emplace_back you don't necessarily know what are the consequences of doing so at call-site.
Cost/benefit analysis results: Benefit: one move/copy less Cost: bunch of potential problems regarding correctness
That's what I mean by premature optimization
 
Ell
I just don't see any correctness problems coming from emplace_back
 
Couldn't you just add the pod/not-pod distinction to a custom allocator's construct that'll do the brace-init when appropriate? boom emplace_back fixed :p
 
Ell
you do know the consequences of emplace_back at call site
you wouldn't be using emplace_back if you weren't constructing something right?
 
nwp
does anyone happen to know how to get symbols into LeakSanitizer?
> #0 0x4d4090 in calloc (/tmp/build-ARPGT1-Clang64-Debug/ARPGT1+0x4d4090)
^ not very helpful
 
12:41 PM
% clang -fsanitize=address -g memory-leak.c ; ./a.out
==23646==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x4af01b in __interceptor_malloc /projects/compiler-rt/lib/asan/asan_malloc_linux.cc:52:3
    #1 0x4da26a in main memory-leak.c:4:7
    #2 0x7f076fd9cec4 in __libc_start_main libc-start.c:287
SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
from the docs :)
 
nwp
I have -g but don't get symbols
it works with use after free, but not with leaks
 
@Ell So you don't want to use it by default
 
Ell
hmm
maybe not xD
 
@nwp calloc is a symbol v0v
 
Ell
well, I'm not sure
 
nwp
12:44 PM
@набиячлэвэлиь oh, you are right
> #1 0x7ffff59f9545 (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x56545)
now what? :(
 
Compile X11 w/ symbols, duh
 
nwp
@набиячлэвэлиь apt-get install libx11-6-dbg
> #0 0x4d3f08 in __interceptor_malloc (/tmp/build-ARPGT1-Clang64-Debug/ARPGT1+0x4d3f08)
> #1 0x7ffff59f9545 in add_charset /build/libx11-tDxxZN/libx11-1.6.3/build/src/xlibi18n/../../../src/xlibi18n/lcGeneric.c:162
> #2 0x7ffff59f9545 in load_generic /build/libx11-tDxxZN/libx11-1.6.3/build/src/xlibi18n/../../../src/xlibi18n/lcGeneric.c:849
not that that really helped
 
user1804599
process :: forall f eff. (Traversable f) => f (Processor eff) -> Event -> Aff eff Unit
process = flip \e -> void <<< sequence <<< map (forkAff <<< (_ $ e))
 
user1804599
:3
 
ugh. there's no version of std::all_of and friends without predicate that assumes elements in the range are convertible to bool? What now, find(begin, end, Falsey) != end? C++ y u so annoying
or std::all_of(begin, end, [](auto&& x) -> bool { return x; }); :(
 
nwp
12:57 PM
@melak47 doesn't look so bad
 
it's a bit silly if I already have a range of bool :D
 
Ell
it's an edge case though :P
 

« first day (2023 days earlier)      last day (2917 days later) »