« first day (2017 days earlier)      last day (2933 days later) » 

12:01 AM
So whats new in the C++ world?
 
@Mikhail its the operator that allocates memory and instantiates an object in it (inb4 it isnt and i suck)
 
@doug65536 That was one thing I thought I might do, but I haven't finished doing a deep-benchmarking of the various kind of bound functions and their overheads, so. That'll also have to wait. q_q
 
Did they fuck up the unified calling convention?
 
12:14 AM
@Mikhail you mean amd64 calling convention in windows, with the weird "leave 4 slots of room" stuff?
 
@doug65536 No, I mean something like this: open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4165.pdf
 
ah ok. amd64 abi has been called "unified" because __fastcall and __cdecl __stdcall and everything are all fastcall
 
yes, all heil fastcall, actually probably vectorcall
 
so basically F(T1, T2) is callable from C++ as T1 p; p->F(T2) ?
it would be nice for C callbacks
you can shim it already with a template
 
tfw you need a template, but you're overriding a virtual function.
Where did I go wrong with my life.
 
12:32 AM
I mean when windows callbacks give you a void* and you cast that to your class type and call a method on it, using that void pointer value as this. You can make a static function template that casts that void* to something and calls some method, no vtbl, statically compiled
you pass that template as the "callback" (but it is the static wrapper that converts the void* to concrete type and calls the real callback with a proper this pointer
 
1:00 AM
@ThePhD I mean this wrap template function
 
@doug65536 Sort of my problem... mine's a bit different.
It's more like I have a value T hidden by some more-derived class. In my case, it's typed_constant<T>, and I have a constant base. I store the T value in the typed_constant<T> base, but now I need to override the default "write" functionality. Not... sure how to do that though without just dynamically casting.
 
1:23 AM
eeevenin'
 
My manuscript keeps causing 500 servers in the Nature Communications submission system.
Whats the best way to check equality between two std::vector<std::strings> where the number of strings can be different?
 
1:39 AM
@Mikhail operator==?
 
don't I have to use something like string_compare?
 
why would you? std::string has operator == overloaded and so does vector
 
Okay cool, I blame my incompetence on somebody else.
 
how important is getting a good understanding of templates?
how to make your own etc
 
@Charlie Its a must if you want to write software for software engineers.
 
2:31 AM
@Charlie you want to learn templates. C++ is annoying without them. templates can reduce repetition of similar things and let you stay specific to types and not cast things away like C
 
hm
just curious if its a meaningful technique, like seems it could be easier to just (typecast) or manage types urself
 
@Charlie that sounds awful like C memory management
I stab myself in the leg when I want pain instead of writing C-like memory management code :)
 
vector.pushback() isnt as quick as vector.resize() and then filling ;)
trust me, I had to find out the hard way
 
you can .reserve then .push_back will go fast
 
=)
allocation*
 
2:40 AM
even without reserve, if you push back 16 million items it only reallocates 24 times
 
hm? no
 
0.00016% of the push_back calls will reallocate, even if you naively pushback without reserve
 
im pretty sure it will recast the entire vector each time u pushback
 
@Charlie no
> Vectors usually occupy more space than static arrays, because more memory is allocated to handle future growth.
 
uhm, are you sure? like i remember trying to build a custom vector class
 
oh right
cool =)
bit useless tho, since u should pre-size or reserve, or?
 
they have to double in size when they overflow to have amortized constant insertion time
 
interesting
 
oh your vector class might do whatever, but std::vector must grow exponentially (guaranteeing fast append no matter how big it gets, on average)
@Charlie sometimes you cannot know how many there will be, and std::vector behaves such that it goes fast. if you already know ahead of time, you can go super fast by doing .reserve once then it already has exactly the correct space
both could work at the same time: you might "know for sure" that there will be at least 1 million entries, but sometimes it can be up to 16 million. you can .reserve 1M and if it grows, worst case is 4 reallocs
 
2:59 AM
I found that reading the size in bytes and using that to set the size, before reading/filling was faster
I guess it doesnt cover every situation?
 
@doug65536 Not exactly. Although a geometric growth pattern is guaranteed, the exact multiplier is not. You'd be right for an implementation with a factor of 2. That was once common, but more recently, most use a factor more like 1.5 or 1.6 (but there's an advantage to its being smaller than the golden mean).
 
> think I'm done
> bug report comes in
q______________q
It never ends
3
 
4:07 AM
Yoooooooooooooooo
what's up
 
cricket sounds apparently
zounds
 
4:22 AM
aw
k
 
=)
I finally found some time to code in peace
 
4:50 AM
Now thinking about it, I really don't deserve a lot of the things I have got in my life - I have quite a few close friends. I don't deserve them. I have got a bit assets too, being a lazy bum who always chooses to do whatever she wants to do, I don't think I deserve those either. I have also got talent (so I claim), but I could be born talentless, so there is no reason for that either.
Some people say life is meaningless, I think life is like a blank cheque, you can put whatever amount on it and people still cry over not being given any amount.
 
u feel the need to justify, what exactly?
having things?
 
I need to say random things at random times
to keep this chat alive
 
its pretty late
no wonder
maybe I could ask here then
for (auto x : mydebris)x.draw(); this call should work right?
but it doesnt. when i do a manual debris[0].draw();debris[1].draw() etc, it does however
 
5:05 AM
@Charlie Perhaps for (auto const &x : mydebris) x.draw(); would work better.
 
yup, im derp, thanks
 
 
1 hour later…
6:11 AM
you are with retarded (so it seems) :p
 
6:21 AM
=)
 
@Charlie remember that auto doesnt handle references as it handles copies and pointers :)
 
yeah, I gave it the right type too
 
auto& reference
 
Hows it going peeps?
 
now its for (debris & const x : mydebris)x.draw();
still need to clean up the drawcall tho =/
 
6:25 AM
Oh no need to set the type like that. Just do as Mikhail. auto& x
 
yeah? I thought it'd be faster
 
auto has 4 characters
 
Yeah, auto detects the type for you. As long as its .. "obvius" for the compiler. And you cant use it for multiple types
 
also unsigned integer subtraction
 
Void f(auto a);
Int b =3; char c = 'c'; and then calling f like f(b) will work but if you then call f(c) ull get an error. I THINK
 
6:30 AM
uhm well either way, this is how it looks i.imgur.com/bqoO2H5.png
 
Shouldnt matter in ur case anyways :D
 
yeah, Im not sure I need that function
trying to make a shoot asteroids in orbit game
 
Ah i havent done any graphics programming
 
=) i found a great library for it
freeglut
 
I'll note that down
 
6:32 AM
i dont think its very popular, but its so intuitive
 
But seriously, don't use freeglut
 
why not?
 
its ancient
 
its getting updated
actually
i havent found a single thing i cant do with it
unlike glfw which hurt my head
 
The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. This is really unfortunate, since GLUT is getting old and really needs improvement. Also, GLUT's license is incompatible with some software distributions (e.g., XFree86).
 
6:34 AM
freeglut is an attempt at keeping it alive
it got updated october 2015 i think?
 
Yes i messed up and didnt read the rest before i posted ^^
 
like I only use it to load a window and setup the callbacks
the rest is all glsl anyway, openGL shading specs
 
use qt
 
qt? no, idk. Doesnt seem very specific
theres a particular function in freeglut that I love
 
Uhm freeglut is programmed in C?0.o
 
6:39 AM
glutTimerFunc();
Like ive tried some approaches, direct3d, glfw
freeglut is just so intuitive. unlike the other ones
 
Grrrr how can i search for a room on the mobile version
 
Maybe polymer doesnt have its own chatroom
19hours to go hoho
 
7:24 AM
TIL the human brain is perfectly capable of controlling four extra limbs
 
that's pretty neat
lol
 
7:56 AM
0
Q: How do I write a range pipeline that uses temporary containers?

R. Martinho FernandesI have a third-party function with this signature: std::vector<T> f(T t); I also have an existing potentially infinite range of T named src. I want to create a pipeline that maps f to all elements of that range and flattens all the vectors into a single range with all their elements. Instinct...

@Borgleader ^
 
8:08 AM
Is there any reason a gcc+cmake project cant compile in visual studio?0.o
 
cmake chooses a compile so the question isn't well formed
 
Oh.. sorry im nuubish at it.
Just got a message that my project isnt compiling by the guy who is evaluating it xD
 
8:26 AM
@sciencefyll wait... did you use the right generator when you ran cmake? you/they/whatever
did you extract what you gave him somewhere else and try it? you probably can't build it as given either. if it does, it may use stuff on your machine in places he doesnt have
use a vm that is not your dev machine to test it
TIL people have alarms enabled on their phone that make annoying noise in the middle of the night all the time
my kvm windows vm is spending 50% cpu time in interrupts :( installing visual studio for some com stuff I have to do
 
Ven
How many edits did you make to get to my first solution? Originally all you had was the MSDN link. Then you had SCOPE_IDENTITY. Then the OUTPUT clause. So -1 because you shouldn't have the upvotes. — gbn Mar 8 '11 at 5:55
 
microsoft should write the elapsed time of msi installer file extraction to a log, followed by the string "LOL"
 
@doug65536 yeah we focused on using only stl and portable code. So my buddy is on a windows machine to compile it using vs now.
The guy who said he couldnt compile, honestly just said "your project doesnt compile", so im kinda trying to hunt down any potential problems while waiting for a more detailed response xD
 
8:42 AM
You should probably install Windows and try compiling it... Look up MS DreamSpark
 
> Galveston is built on a low, flat island, little more than a large sandbar along the Gulf Coast. These residents proposed a seawall be constructed to protect the city, but their concerns were dismissed by the majority of the population and the city's government.
(...)
On September 4, the Galveston office of the National Weather Service began receiving warnings from the Bureau's central office in Washington, D.C., that a "tropical storm" had moved northward over Cuba. The Weather Bureau forecasters had no way of knowing where the storm was or where it was going. At the time, they discoura
WTF.
 
user1804599
@sehe yes it is a form of value-dependent types
 
user1804599
One that is laughably easy to implement
 
problem with kvm (libvirt) is, the default cpu is Haswell-NoTSX on my machine, and windows vms go crazy trying to do haswell MSR stuff. picking kvm64 fixed it
 
user1804599
9:05 AM
Haskell, no TSX.
 
9:17 AM
blech jsx/tsx
 
9:28 AM
@ThePhD You don't return anything here:
int pre_existing_system( lua_State* L ) {
        sol::state_view lua(L);
        lua.script( "print('bark bark bark!')" );
}
IOW control reaches end of non-void function
 
Yay.contributed fixes to Boost Graph github.com/boostorg/graph/pull/58#event-638858057
Or better. It finally got merged
@набиячлэвэлиь someone is 🏃 with ✂
Or at least without warnings (why is there no emoji for that)
Wow. This place is dead. I'm off. See you after the gig
 
I'm not dead
 
Hang on. I'll see whether we can get some conformation you're not "this place".
 
9:44 AM
@sehe "someone is RUNNER with BLACK SCISSORS"?
 
9:57 AM
@R.MartinhoFernandes I believe that the answer is that they don't because that would mean holding the result in containers inside the range and OH MY GOD THE PERFORMANCES!
 
@набиячлэвэлиь probably that man in business suit levitating at it again
 
Wait why would it require storing result in containers
 
@milleniumbug Because the source vector is going out of scope.
so if you try to just view the source vector, you're gonna have a problem.
it's that kind of thing that makes me wish to investigate further offering garbage collection in Wide
 
Let the src | transform(f) create an object which contains the range and the function inside it. Then, only if you want to materialize it, the function is called
 
10:13 AM
ok, but in that case, you cannot refer to the contents, since the vector must live somewhere whilst you do that.
 
> (2/6) upgrading go
I have it installed without my knowledge
Is @Zoidberg responsible for this
 
Ven
always
 
nwp
10:39 AM
what are desktop notifications supposed to do?
the so chat ones
 
Fuck. Somehow, I broke Clementine. It does not want to play anything:
> GStreamer could not create the element: gsettingsaudiosink. Please make sure that you have installed all necessary GStreamer plugins (e.g. OGG and MP3)
 
@nwp Impregnate your mother
 
nwp
@набиячлэвэлиь doesn't seem to work then
 
lolwhat
 
That's pretty cool if it works
Two additional gigs of memory might be life-saving in some situations
 
Hi.
 
user1804599
11:19 AM
getEdges (UCG { edges }) vid1 vid2 =
  edges # filter (snd >>> match) # map fst
  where match (Tuple vid1_ vid2_) | vid1_ == vid1 && vid2_ == vid2 = true
                                  | vid1_ == vid2 && vid2_ == vid1 = true
                                  | otherwise = false
 
user1804599
Great.
 
Ven
yet another example if rightfold posting a snippet showcasing exactly nothing special.
Today's tidbit: function composition.
 
x)
Yesterday's concert was good but there were only ~30 people :/
 
11:35 AM
@R.MartinhoFernandes Waiiiiiiiiiit.
 
11:49 AM
@R.MartinhoFernandes impressive
 
well in theory I don't see why it shouldn't work
VRAM is probably not all that fast for general-purpose tasks but it might well beat out swapping to the HDD
 
Shameless plug out of desperation:
0
Q: Clementine does not play after update to Xenial

wilxAfter the update, Clementine does not want to play music any more. A dialog with this error pops up (the bold font is added): GStreamer could not create the element: gsettingsaudiosink. Please make sure that you have installed all necessary GStreamer plugins (e.g. OGG and MP3) I have tried ...

 
user1804599
Shameless buttplug out of arousal.
 
> WSL executes unmodified Linux ELF64 binaries by virtualizing a Linux kernel interface on top of the Windows NT kernel.
 
11:53 AM
@wilx Did you try installing it off an on? :D
2
 
@Griwes Yes. :)
 
@набиячлэвэлиь q_q leave my poor code alone
 
@ThePhD But that's UB, make the function void or sth jeez
 
There's no UB if the function is never called :D
 
Fun fact: UB includes compile-time behaviour
e.g. compiler crashing
or all the other fun stuff like buffer overruns wiping your HDD
 
12:09 PM
@milleniumbug Yes, there is. Not calling the function is a potential result of UB.
 
@набиячлэвэлиь Yup, if the function is called then the UB can cause compilation error in the past which would make the program non-existent and cause the time paradox :D
 
wouldn't the compiler compile the function weather it's used or not?
 
Ven
the compiler doesn't care about the weather
 
user1804599
I am so bored.
 
12:15 PM
Write a compiler
 
Ven
Write a transpiler
 
@Zoidberg Clean up your room.
 
user1804599
It isn't a mess.
 
user1804599
@Ven I could work on ftsc.
 
user1804599
ADTs work but you can't extract data from them yet.
 
user1804599
12:17 PM
Only create them.
 
Arrgh.
I don't want to name it sol::tie because of potential ADL mishaps
but if I don't, people keep thinking I mean to write sol::bind instead of sol::bond
 
Put it behind an ADL barrier
 
if they do using namespace std; make them suffer :D
my gdb library already has thread and source_location
 
@milleniumbug That's not really fair. ;;
 
10
Q: Why is ADL not working with Boost.Range?

ShoeConsidering: #include <cassert> #include <boost/range/irange.hpp> #include <boost/range/algorithm.hpp> int main() { auto range = boost::irange(1, 4); assert(boost::find(range, 4) == end(range)); } Live Clang demo Live GCC demo this gives: main.cpp:8:37: error: use of undeclared ...

 
12:21 PM
@ThePhD yeah, I guess
 
namespace blerb {/*colliding functions*/} using namespace blerb;
 
Bah. So I logged in as different user and Clementine worked.
I guess I will have to nuke some .config .cache and .local directories.
 
And it works now.
But I still do not know which part fixed it.
 
Ven
12:37 PM
@Zoidberg do it
 
@набиячлэвэлиь But then people who do using namespace sol would suffer, right?
 
user1804599
@Ven no
 
Ven
do it
 
@ThePhD fuck if I know read the answer above
 
user1804599
boring
 
12:39 PM
vOv oh well.
 
user1804599
12:53 PM
I want to make a video game in PureScript.
 
What is PureScript
 
user1804599
Non-lazy dialect of Haskell without legacy stdlib crap.
 
user1804599
And proper records.
 
1:14 PM
redo backup, now @ 3%
 
@R.MartinhoFernandes Meh, couldn't get it to work without writing my own adaptor that owns the temporaries.
It needs mutable, though :S
 
Ell
@milleniumbug what is your gdb library?
 
user1804599
I wanna use SVG for my game.
 
Ven
i'm so damn bored
 
user1804599
@Ven write a video game in PureScript
 
> CatPlusPlus: I call all my temp variables '' where '' is a varying amount of zero-width spaces
 
apparently snowstorms are hitting europe
 
Ven
 
1kg of watermelon contains 300 calories ... wtf
I only need to eat 6kg of watermelons to obtain the 1800 calories I need a day
 
1:29 PM
uhg
click on Netflix' "SciFi" -> redirected to section called "scifi and fantasy"
 
user1804599
> Turkey remembers 100 years denying Armenian genocide.
 
how come these two genres are thought related I don't even
 
user1804599
There's also a single Stack Exchange site about both.
 
@Ven Ugh, how to not write a process creation interface github.com/eidheim/tiny-process-library/blob/master/…
 
@Ven Good catch. Replacing this process library with another one is on my TODO list
That's why this is a separate class, to make the change fairly non-intrusive
Not to mention, it's PIMPLed away
 
1:32 PM
Should be Process("echo", "Hello world"), not Process("echo 'Hello world'") or whatnot
 
user1804599
Yeah. You can always get to the shell by invoking sh -c
 
user1804599
The danger of high-level primitives.
 
user1804599
Always expose low-level APIs.
 
It was probably written by a Windows user who complains about programs that don't support spaces in paths.
 
OK, now Parole is broken as well. It does not play my porn or any other H.264 video. FML.
 
1:35 PM
Also it's not actually launching a process. It launches a shell which launches a process
 
Which explains the bad interface.
 
user1804599
> If a "hitman" takes the money but then fails or refuses to perform, the customer (or hiring partner) cannot sue for specific performance or for damages for breach of contract.
 
user1804599
> Conversely, if the hitman performs the killing as promised but the customer refuses to pay, the hitman cannot sue the customer for monetary damages.
 
Ell
@BartekBanachewicz sci fi is fantasy right?
 
@Ell I don't think so
 
Ell
1:39 PM
Why isn't it?
 
> Fantasy is a genre of fiction that uses magic or other supernatural elements as a main plot element, theme, or setting.
 
Ell
I disagree
 
well no one cares
 
Ell
lol
we both agree then :P
 
you should stop having opinions really
i mean the bad ones
3
anywas
sci-fi that doesn't involve magic or supernatural things isn't fantasy
 
Ell
1:40 PM
to me fantasy means set in some alternative world
 
and my initial point was that when I click "sci-fi", I don't want supernatural elements in the thing I want to watch
 
user1804599
Bukkake
 
user1804599
It's a fantasy
 
user1804599
And it's real-world
 
@Ell so is Gravity fantasy?
 
Ell
1:41 PM
No
 
Ell
gravity is set in this world
unless I'm thinking of a different film :V
 
no it's alright, that's what I meant
that's why conflating "sci-fi" and "fantasy" into "sci-fi and fantasy" is dumb
that's like making a category "romance & horror"
 
But romance is horror
 
i can see why a virgin like you would say that
anyways\
 
user1804599
1:43 PM
 
I actually found a 1954 sci-fi movie so
you'll excuse me
 
I dunno
sci-fi and fantasy seems pretty related to me
 
Fantasy just involves unexplained science.
 
@Morwenn um. Science always has unexplained parts
 
they are both about building worlds that have different rules to our own, not just different characters.
the only difference is that in one case, it's lasers and force fields, and in the other case, it's orcs and dragons
 
1:44 PM
@Puppy who said they have to have different rules
I mean it's fine for me to call Star Wars fantasy
but if you call Gravity or Martian that way it just doesn't make sense
 
There is a whole part of science fiction which is indeed fantasy.
 
you might call Saving Private Ryan fantasy as well, just like about any other movie
 
On the other hand, you hardly ever get hard science in full-fantasy novels.
 
@Morwenn To be honest I am not really sure where you're seeing "science" in star wars
"science" isn't "lazers and force fields"
 
@BartekBanachewicz Robots everywhere, science :o
 
1:46 PM
that's what a 5yo might say
@Morwenn ...
 
@BartekBanachewicz I personally thought that Gravity was pretty fantastical. Some of the mechanics in there were complete nonsense.
 
Ell
I wouldn't call gravity fiction or sci-fi
 
Well, let's just split « fantasy » and « hard science fiction » then :p
 
After a decade of being a staple in gaming, Sony is ending production of the Xbox 360: http://onforb.es/1TlHxZC https://t.co/hzWPqpV4HU
 
and as for Martian, I'm not sure that some of the things depicted are even remotely possible
 
1:47 PM
> historically science fiction stories were intended to have at least a faint grounding in science-based fact or theory at the time the story was created, but this connection has become tenuous or non-existent in much of science fiction.
 
@Borgleader lol Sony
 
@Borgleader lmao
 
Apparently the guy who wrote Martian just picked NASA's Mars scenarios and possible solution and organized them into a story.
 
apart from anything else, it sounds rather fantastical to me that America would ever fund such missions
 
user1804599
sci-fa, problem solved
 
1:48 PM
@Morwenn He might have neglected to notice that they're completely impractical and unbudgeted, to the tune of about half a trillion dollars or more, over decades.
 
Probably.
Speaking of hard science fiction, I really enjoyed the first Rama.
 
and that the whole thing is overseen by a bunch of nutjobs who care less about getting anywhere near Mars and only about keeping government-funded jobs in their area, needed or not.
 
@Puppy so were the man-on-the-moon missions, and yet they happened
 
@BartekBanachewicz That's wrong.
Objectively wrong.
 
@R.MartinhoFernandes go and fix the wikipedia page then
this sentence alone has 3 sources attributed to it
 
1:49 PM
@BartekBanachewicz The man-on-the-moon missions were a trainwreck until America realized they might lose the space race to the Soviets.
there's no Cold War now.
 
It's trivial to find countless examples of "historical" scifi that has no grounding in science whatsoever.
 
Installing mesa-va-drivers has fixed Parole!
 
@Puppy it's really not that hard to imagine Cold War 2
 
@BartekBanachewicz NASA's budget was a mere 4% of the federal budget.
 
@R.MartinhoFernandes aaaand?
 
1:50 PM
So... science-fiction always includes civilizations that do science, then? Is it general enough?
 
> Science fiction often explores the potential consequences of scientific and other innovations, and has been called a "literature of ideas."[1] It usually eschews the supernatural, and unlike the related genre of fantasy
and then the first thing I quoted starts
 
science-fiction is about rule changes imposed by men, and fantasy is about rule changes imposed by nature.
 
but since robots argues its objectively wrong then dunno
 
@BartekBanachewicz It seems you think the Apollo project was excessively expensive.
It wasn't.
 
@BartekBanachewicz The first definition sounds like « anticipation fiction » to me.
 
1:51 PM
SLS though certainly will be,
especially since they can't use the fucking thing for a decade or so at least
and compared to having actual access to LEO through re-usable rockets is just fucking bananas
 
there's too many opinions in this thread
I'll just go and watch that movie
@R.MartinhoFernandes well, a lot of people would argue
 
@BartekBanachewicz It's really hard to argue so. The current US military expenditure is 22% of the budget.
NASA gets 0.4% these days.
 
NASA has no plan, no budget, no direction, no nothing.
they're just vaguely thinking of Mars and going "Gee, wouldn't that be nice?"
 
4 mins ago, by R. Martinho Fernandes
It's trivial to find countless examples of "historical" scifi that has no grounding in science whatsoever.
Actually, just by doing some tallying in my head, historically science-fiction has been less based on fact than it is these days.
 
that's because sometimes fiction is less awesome than fact
 
1:57 PM
@Puppy Nah, I'd guess it's just because as the genre grew the market for the harder variants grew as well.
 
Doing programming stuff on Sunday? What a shame because I do the same rather than hanging out with girls :(
 
@BartekBanachewicz no sc2 then?
 
@Puppy later.
:)
 

« first day (2017 days earlier)      last day (2933 days later) »