« first day (3382 days earlier)      last day (1784 days later) » 

00:01
Is there something that combines, (std::is_finite(x) && x~=0 )?
it's a mechanism of oppression when company does it, I am just an individual
Yeah but also small companies
I know a few people with small boutique CRO style companies. They basically need to pay licenses for patents that wouldn't stand a serious test.
AKA, well fuck it, we'll just pay U of Colorado $70k to avoid legal battles
One of the biggest problems is that if you fight a patent, you can't make the patent holder pay your legal fees. So you can be right about everything but still loose a ton of money.
A related problem is that you can't really challenge a patent without a spending a lot of money. Like I can't say "bro, somebody already published this in 1987, they can't have a patent!".
(true story)
So, anybody working on anything cool?
I've been writing papers for a few months and now I can finally do some coding :-)
 
1 hour later…
user6461957
01:27
@Mikhail well the thing that I am working on RN ain't cool I suppose, but it is public domain and I am implementing yet another container lib in ANSI C.
user6461957
It is on GitHub. Two File Libs for ANSI C.
Did you think of a clever name
user6461957
:/ no
user6461957
github.com/d03
user6461957
I am probably going to implement map similar to std::map, i.e., red-black trees (it is cache unfriendly I know)
user6461957
01:38
Maybe I will consider doing unordered_map as well... (that exists since C++11 if I am not mistaking). But with vector (sequence container) and map (associative container), I will sport the most important ones.
Also try using handles rather than pointers to structures
Although I'm not sure what the requirements for a C library would be
user6461957
@Mikhail "A pointer to a pointer variable is commonly known as a handle." www2.lawrence.edu/fast/GREGGJ/CMSC480/Chapter11/Handles.html So instead of clearing out and allocating memory for the struct members only, I should also allocate heap memory for the structure itself?
Basically, don't have the users malloc your structures
So, instead of lib_vector my_vector_struct= malloc(sizeof(lib_vector)) do int lib_vector_handle = allocate_new_lib_vector()
 
3 hours later…
05:03
I, myself have not coded for a month until last night, when I was nudged to do some maintenance on an app.
user6461957
neuromorphic computing - the next big thing for decades to come?: news.ycombinator.com/item?id=22089449
Spent entire month on customer relations - mostly for that airbnb property, but also on a few other properties. Spent sometime taking care of A.I. in Robotics meetup - I would say this venture of mine is quite lucky so far, got boost from WeWork from the beginning, then support from Microsoft, now another big corporate wants to get involved too.
user6461957
You are morphing into a managing type of role?
Not morphing, it's nature occurring thing.
Airbnb property is, however, quite unfortunate (from owner point of view). It's a long term rental, until newly built apartments flooded the area. Vacancy rate tripled in the past few year.
Then the bushfire smoked out all the guests when I put this property on airbnb.
user6461957
05:20
That is probably not an area for me as I am not really interested in customer interaction nor managing or consulting stuff. I would probably make a terrible manager and many disgruntled devs who would rather see me die. Much like the new SO CEO, who is apparently hated by everyone...
But I am not complaining, the property is currently rented out until early next month. The effect of charging $165 on a property that should really cost $300 a night. But as long as there is low vacancy rate, we are not really losing money.
@d03 Depends on the goal. The goal of managing is not managing itself.
For example, the goal of managing a property is to find suitable people to live in your property because people need accommodation and you get monetary reward in return.
user6461957
You need good social skills for such a role I suppose and I am probably lacking in that area.
The goal of managing A.I. in Robotic group is to unite those who are interested in the subject, especially those who have knowledge and skills in the area to hopefully build something useful. And maybe with the help of venture capital and big corporations, to projectile those projects on to the next level.
user6461957
Social skills and communication skill are key then probably.
It's a bit far fetching, but that's my ultimate goal.
@d03 Social skills are important, which I am also lacking. More importantly, there are a lot of strategic decisions to be made.
Connections are completely useless, unless 1) they are very solid and close relationships or 2) you have something of use
 
3 hours later…
08:55
Also fuck society
@d03 So, the hooliganism in this paper is the claim that the architectures are brain inspired. In short, the brain has a very inefficient architecture, that is the product of evaluation rather than optimization. My work is funded by the NSF and specifically for neuroscience.
09:29
evolution
The bald eagle (Haliaeetus leucocephalus) is a bird of prey found in North America. A sea eagle, it has two known subspecies and forms a species pair with the white-tailed eagle (Haliaeetus albicilla). Its range includes most of Canada and Alaska, all of the contiguous United States, and northern Mexico. It is found near large bodies of open water with an abundant food supply and old-growth trees for nesting. The bald eagle is an opportunistic feeder which subsists mainly on fish, which it swoops down and snatches from the water with its talons. It builds the largest nest of any North American...
Could someone please tell me why is this bird called a bald eagle, I thought a bald eagle would look more like this:
Also sea eagle ... almost like a ... seagull.
10:08
I was researching catfish in septic tank, then I found this:
... and a whole series of sewage fishing episodes ...
 
4 hours later…
15:07
0
Q: What are "Undetectable means" and how can they change objects of my C++ program?

RobertS - Reinstate MonicaIn ISO/IEC 14882:2003 (C++03) is stated under 7.1.5.1/8, section "The cv-qualifers": [Note: volatile is a hint to the implementation to avoid aggressive optimization involving the object because the value of the object might be changed by means undetectable by an implementation. See 1.9 for d...

 
4 hours later…
18:39
@Mikhail The one proposing operator |> looks really nice and somewhat more convincing than the previous attempt
19:01
Guaranteed NRVO is nice too, because fewer copies and moves are always neat
 
1 hour later…
user7659542
20:23
Is it common for companies to write object orented C?
I wouldn't say it's common, but it definitely happens
user7659542
I recently joined a company where, for every module they implement, they have a struct with function pointers and an opaque structure containing data
user7659542
First time I see a company pushing it to that extent
user7659542
they implement a factory pattern everywhere
user7659542
curious to see whether at one point or another we ll be implementing templates and polymorphism in C
user7659542
20:25
not even sure that's possible in C
You can hack together some kinds of very rough templates with the C preprocessor or with pre-compilation step to generate code for you
user7659542
@Morwenn sounds painfull
Storing a pointer to a vtable manually basically gives C the ability to perform polymorphism
Yeah, that's why we have C++: because all those things were easier to use once implemented as language features
C also gained _Generic in C11 but it really doesn't offer much
user7659542
maybe it is because I don't have enough experience. I recently had a look at whether it is possible to implement an RCU mechanism from scratch in C without too much trouble, but that was too much for me. Let alone templates in C
user7659542
I think
user7659542
20:29
@Morwenn yep read about that!
user7659542
it is a first step towards introspection in C
user7659542
which can be interesting imo
RCU sounds like arcane concurrency stuff to my ears, so non-trivial to implement no matter the language x)
48
A: Simulation of templates in C (for a queue data type)

MorwennYou can use subtle and ugly tricks in order to create that kind of templates. Here's what I would do: Creation of a templated list Macro to define the list I would first create a macro - let's call it say define_list(type) - that would create all the functions for a list of a given type. I wou...

That's basically the best I could come up with C years ago, _Generic didn't even offer much more
Plus _Generic was so underspecified that it wasn't really usable in a portable manner until recently
user7659542
@Morwenn This approach has some similarities with something someone did at my current company and has been banned forever, ie: X-macros + token pasting
user7659542
It is difficult to read ^
20:34
Yeah, it's terrible
If you really need this just use another language or a code generator
user7659542
One of the things I recently came accross in C for the first time is the foreach macro
user7659542
that's an interesting thing
RCU sounds like a wrapper around a mutex :-)
So during the read phase you need to hold something that will prevent the reclamation phase from running?
user7659542
a foreach something close to this:
user7659542
20:39
@Mikhail yep
This is because lock-based updaters typically update data items in place,
and must therefore exclude readers. In contrast, RCU-based updaters
typically take advantage of the fact that writes to single aligned
pointers are atomic on modern CPUs, allowing atomic insertion, removal,
and replacement of data items in a linked structure without disrupting
readers. Concurrent RCU readers can then continue accessing the old
versions, and can dispense with the atomic operations, memory barriers,
and communications cache misses that are so expensive on present-day
user7659542
@Morwenn How do you even come up with such an approach? Did you come up with this from scratch?
@traducerad boredom mostly
Looks cool but its the kind of optimization that is beyond the demands of the software I writw.
20:41
Don't worry, RCU might be coming to the standard library in C++23 or C++26 - or later
@traducerad more seriously sometimes you set the goal and just try to tweak and abuse every piece of knowledge you have about the problem matter to bend it into something that approaches that goal
But there's no silver bullet and you never have a guarantee that you'll come up with something
user7659542
@Morwenn imagine waking up one day and not coming up with something
user7659542
ever again
user7659542
ok, just turned a 200 line function in a 45 line of code
user7659542
The magic of void pointers
Yeah, that's when you realize you're burning out
user7659542
20:49
@Morwenn I work approximately 12h a day
user7659542
this week I almost worked 7 days out of 7
I work officially 7.5h a day, sometimes I'm actually productive for less than 1h
user7659542
@Morwenn Lol. Let me guess? You work in the bay area and for that make a 6 figure wage?
Probably not the bay you had in mind
I make around €2k net/month
user7659542
I couldn't work like that
user7659542
20:51
I feel the need to try to outperform myself and everybody around me all the time
yeah this is a quick way to burn yourself out
user7659542
@milleniumbug I have had this attitude my whole life. That's how I have been educatesd
I try to work less redundantly than people around me x)
user7659542
I remember when I was a child. My teacher once had a discussion with my mother telling her she made me work too much
user7659542
I was 10
user7659542
20:53
@milleniumbug The only way to improve yourself is to push your limits further
I'm mostly unmotivated to do anything, so I better do it smartly enough so that I don't need heaps of motivation to make it evolve later
I've been subject to societal pressures a lot, and I found it that the best way to have everybody let go of you is to disappoint everybody upfront so you can optionally surprise them with a positive result later.
user7659542
@milleniumbug so people tell "milleniumburg is just a stupid dev. That one time he surprized us was out of luck" ?
this sounds like a misrepresentation of my argument
user7659542
@milleniumbug besides that if you want to become a lead developer or something alike, you cannot shy away. You have to be able to show that you can handle the situation/job and prove that you belong to the best
user7659542
20:55
@milleniumbug lol
user7659542
My whole life is based on that premise actually
Wow, why would you want to become a lead developer? The responsibilities are too much :o
user7659542
and that s why I got where I am today. It s not always been easy, but I don t regret it
user7659542
@Morwenn to be the best. IDK that s just how I am.
what for
user7659542
20:56
I always feel that need in me to be the best at everything I do
I just want to lead a happy life tbh, and that's difficult enough a goal in the grand scheme of things x)
user7659542
No matter if that means I won t sleep 1 entire week
Fuck competitions. When I lose I feel bad (obviously), when I win I feel bad (because imposter syndrome)
The only winning move is not to play.
I don't like to lose either, and I'm not always satisfied enough when I win - plus, yeah, the occasional impostor syndrom
In other news my new bread looks awesome /o/
user7659542
@milleniumbug you cant choose to not play. People will put you in a hierarchy even if you dont want to.
user7659542
20:57
That s just how people are
You can game the system and become a sysadmin
user7659542
You are part of that hierarchy
There's no competition: everybody needs you and they die without you
user7659542
@Morwenn hahahah
But you don't have to order anyone around, which is nice
user7659542
20:59
I for instance feel bad, for living in Western Europe and not having had the chance to study at the world's best university, ie MIT
user7659542
I have seen other prodigy students being selected and receive grants to go there
Wow, I went to my local engineering school - and got a master's degree in computer science along the way - and that was fine x)
Got some proposals from big companies around the world but I didn't want to move from here
user7659542
It s been multiple years since I graduated, but inside of me there is still a regret of not having pursued a PhD
Anyway, it's time to eat and my father prepared wok <3
user7659542
@Morwenn How did they find you?
21:00
GitHub, StackOverflow, plus now I know a bunch of people in big companies
user7659542
@Morwenn kk enjoy
thanks ;)
The constant desire to outperform yourself means people start putting more expectations on you. At the point they expect that you will keep doing more every Nth unit of time you already lost. The moment you fail you'll get ridiculed even though despite your "fail" you still were better now at your worst than you were one year earlier at your best.
Fuck competitive culture and everything that stands behind it.
user7659542
@milleniumbug don't you like sports?
Competitive sports? Yeah, I dislike them.
user7659542
21:06
Well...
user7659542
I love sports
user7659542
And I want to win at sports. Every, single, time.
user7659542
I don't like losing
user7659542
But hey, I understand your point of view!
user7659542
And quite some people dislike me, because of me considering everything around me as a competition
user7659542
21:08
Unless they are on my team
21:38
I'm with @milleniumbug on this one
The more you outperform yourself the more the industry considers it's "normal" and it ends up overwhelming for everyone
I mean, if you're on my team and say "yes we can do it in two weeks" where "we" involves the team and "two weeks" involves 12h shifts, then yes I'll definitely dislike you x)
Because that's what the managers and commercials will listen to: higher expectations
user7659542
@Morwenn WHat are some interesting projects you ve got on github?
user7659542
Ones that caught people's attention
A sorting algorithms library mostly
Then a library to perform basic maths at compile time that I'm unable to maintain myself
user7659542
@Morwenn This might be a stupid question and I am by no means trying to be rude. But are people interested in that kind of things, ie sorting algorithms?
No
Well, some are
user7659542
21:44
this sound like the sort of stuff you do at uni and then never look back at again
But the library contains state-of-the-art algorithms, has a proper test suite, continuous integration, template metaprogramming monsters, code coverage, a proper documentation and an attractive README as far as I can tell (which notably cites where the stolen parts of the code come from)
Basically it can serve as a display of skill, even though it wasn't the goal
user7659542
Haha interesting
To my surprise it even got mentioned in a research paper once x)
user7659542
git any links?
user7659542
lolol
user7659542
Hmmm, so that is what gets the large firms excited huh
user7659542
alright...
It's not exactly what gets them excited: it just shows that I know enough about C++ and a variety of skills
Some of the offers came because my name frequently appears in the online C++ community, so some engineers in big companies know me
That's because I chat way too much x)
user7659542
In which country are you living atm?
Brittany (actually France, but we love to present as a proper country)
user7659542
21:53
Bretagne
user7659542
Oui oui
user7659542
Muchas gracias
user7659542
So you are a friend of Basy starkevitch
user7659542
or however you werite that guy's name
user7659542
(He has quite a lot of posts about C/C++ on SO, is french and a lot of karma)
user7659542
21:55
*basil, basyl, basille, ...
user7659542
user7659542
I knew I would find him!
Surprisingly enough it's the first time I hear of him
user7659542
Seems to be very knowledgeable
user7659542
22:00
from my non-expert perspective
That's guy's got an impressive number of questions & answers o.o
user7659542
and has written some interesting pieces of softrware, based on his bio
Ugh, I just remembered that I'll need to upgrade a library tomorrow at work -_-
user7659542
there are worse things to do in life
Sure, but spending months just packaging C and C++ libraries, getting them all to build and interact correctly despite using a dozen of different build systems, is not the funniest thing in the world
It will take me like 15 minutes to get the packaging step right then it will compile for hours >.>
user7659542
22:16
How does a vtable actually work behind the scenes? The system at some point has to declare an array of function pointers. But those functions can have any signature
user7659542
AFAIK there is no way to create a function pointer that can point to any type of function
user7659542
I dont think Bjarne has created 1M tables with all possibilities
It's more like a structure with different function pointers
An instance has a pointer to said structure, and a virtual function corresponds to an offset in this structure
user7659542
but that structure then points to the actual function
user7659542
so this would somehow mean that this is 1 huge structure with all possible function pointers
22:19
Calling a virtual function is basically loading the pointer to the vtable, casting the pointer + offset to a specific function pointer type that depends on the virtual function declared type, then calling the code pointed by the result of the fptr cast
While a function is a simple indirection, a virtual call is a double indirection
There's basically one such structure per type that overrides virtual functions I guess
user7659542
@Morwenn that makes a lot of declarations behind the scenes...
Sure
user7659542
how does the system know which offset is needed?
See the link I sent you about trying to write templates in C a few hours ago?
user7659542
@Morwenn Oh is this related?
user7659542
22:23
I'll double check it in that case
The "member functions" implementation in that example kind of match the way a compiler might implement virtual functions
Every instance of the list type has a pointer to a global instance of a struct that contains pointers to functions
I did it for other reasons in the example, but it's fairly close to the way you'd implement virtual functions
Wait that was in 2012 already o_o
Fuck I've been getting old for way too long
user6461957
22:47
2k / m? Really @Morwenn? You should get more or are you working at a game dev company where low salaries are the norm?
@d03 I'm working in a region where it should be enough to buy a small yet nice house in 15~20 years
If I was working in Paris this wouldn't be enough though
I could probably earn more, but that means prospecting again, making sure I still get good enough conditions, it also means that I leave a good enough place from a people's point of view to jump into the unknown, etc.
Basically effort, and potential stress and anxiety: there are surely benefits, but they come at a cost
user6461957
I see.
I mean, I wish I had this kind of motivation, but I just bought a new car, need to look for a house and still have appointments with a few docs, so finding motivation - a rather scarce resource in my life - is kind of difficult
When I can just not change anything
user6461957
:/
Anyway, I need to go to sleep
Night :)
user6461957
23:03
Night :)
23:55
Yo, is there an easy fix for this problem? Qt's VS plugin doesn't want to moc my files and it seems that dragging every file in and out of the VS fixes the problem, but I have like 300 files to drag in and out, which would be sad.
I need help! I don't know much about dynamic allocation and I have issues with allocating an int array. I have a class OperatingSystem working well. The number of operating systems is user input dependent.

« first day (3382 days earlier)      last day (1784 days later) »