« first day (3202 days earlier)      last day (1743 days later) » 

12:13 AM
@LucDanton No lurker has ever given me more than a minor flesh wound!
 
 
3 hours later…
2:51 AM
@JerryCoffin Lurking is pretty innocuous ... but ... there is a fine line between lurking and stalking. Pigeons might look like they are lurking around, but in fact they are stalking the chickens in order to obtain some leftover. Moderators/CMs appear to be lurking around but they could be stalking some 1337 tr011z ... or not. :x
 
3:30 AM
Anyone here play with ROS much?
 
Damn it should be a crime for company to actuall get near excel to manage their enterprises
I'm generating xml with generated python code from a set of formula in an excel sheet (which is used to generate product for BoM etc... )
 
pretty sure you can just dump excel to xml
 
4:34 AM
Probably, but excel won't format the correct xml file I need
Btw, I finally installed my comp in its new case, I was kind of deceived by the experience.
The box has its PSU on the bottom but the case isn't designed to have it installed with the fan up
so my psu is blowing under (which has luckily a vent out there) but it also means that the LEDs are hidden under the case
 
@Mikhail Yes, by clicking "save". An .xlsx file is mostly xml (along with some other stuff, inside of a zip file). Save a file, rename it from .xlsx to .zip, and you can look at the files that make it up.
 
5:05 AM
yes but that's pointless unless you need ooxml format
 
5:16 AM
@LoïcFaure-Lacroix That depends. There are at least parts of it that are (somewhat) easier to manipulate than .xls files. If you want some other xml format, you may be able to take their xml and transform it to what you want with xslt.
 
ooxml isn't as bad as odf but it would be hard to parse using xslt
the way cell and columns are structured (sparse table with missing empty cells). It's much easier to create a formula in excel that concatenate cell content into a cell that format xml
I have around 150 rows to parse with 1 column with a formula and 1 column for a python code that map variable name to one column with variable name, aka 1 row is one variable
=CONCAT($E$2, " * (math.ceil((", $E$59, " - ( 2 * ", $E$22, ") - (", $E$28, " - ", $E$8, ")) / (", $E$28, " - ", $E$8,")) + 1)") this generate some python code
 
5:41 AM
I'm trying to write a bash command that can change. My string in XML
for file in $PWD/*.xml
do sed -i 's/>JPEGImages</>VOC2012</g' $file
done
----------------
The above bash command adds VOC2012/ in front of JPEGImages
but what I want is to change the below
<path>/home/redtwo/nsir/VOCdevkit/VOC2012/JPEGImages/1.jpg</path>
to
<path>/home/red/Images/1.jpg</path>
and there are 130 images...Any Idea how do I do that using bash?
 
6:39 AM
@LoïcFaure-Lacroix I'll take your word for it. I've done a bit with manipulating some xlsx files (well, mostly extracting data from them, but try to stay away from using Excel itself as a rule.
 
7:16 AM
if an ebay seller lies on their items description and says it ships from your country, but really they order it from another country after you "purchase it from them" ..would you ask ebay for a refund and stick them with the return shipping (likely on a $10 item?) , or wait ot out and just give them a review reflecting your experience?
i dont want to be a dick and get the item for free because theyre not willing to pay the return shipping..but I also think it was a shitty thing to do..i bought from a local reseller to avoid the long shipping time..
reading their feedback, this is not the first time theyve done it.
 
 
2 hours later…
user8104581
9:16 AM
@ABuckau they don't deserve your sympathy. save your mind from regretting it and give them some justice. even if it did not give you all that much trouble, it's likely to happen/have happened to someone else who did. they will lose time they could have spent scamming someone else. and you will get $10, for like, less than an hour spent handling the refund. and i think going that path you still can post a review :-)
 
user7659542
9:39 AM
why would somebody ever decide to check whether a received value is in valid (ie smaller than 32768) by doing:
 
user7659542
if ((value & 0x8000) == 0){
    fprintf(stderr, "Invalid\n");
}
 
user7659542
why not simply value > 0x8000?
 
user7659542
just boggles my mind!
 
user8104581
to make it harder for other programmers to read your code, in an attempt to increase your program's performance by a few picoseconds
 
user7659542
@andreyrk is this implementation really quicker?
 
user8104581
9:54 AM
no idea. doubt it's worth the cons in any case
 
11:36 AM
@thecoshman feeling my pulse – apparently yes!
@traducerad What's the type of value?
 
user7659542
@fredoverflow uint16_t
 
@traducerad You mean value < 0x8000?
 
user7659542
@fredoverflow no the check is to see whether value is larger than 0x8000
 
@traducerad But (value & 0x8000) == 0 is true for values smaller than 0x8000...?
 
user7659542
11:58 AM
@fredoverflow my bad. Yes, you are right$
 
user7659542
my point is just that I find this an extremely strande way of checking whether a value is greater than a given number
 
12:23 PM
It is
It's possible that the person once knew that on some hardware, that operation would be faster
 
@fredoverflow How do we know this reply is not from an A.I. program running on your computer the cloud pretending to be you? @_@
 
12:51 PM
@thecoshman in theory the compiler should be able to optimize that, I suspect this is a case of someone "helping" the compiler when they didn't need to
 
 
1 hour later…
2:02 PM
An A.I. robotic group member posted this. If it's really based on machine learning/A.I., then I must say it's pretty amazing.
 
2:32 PM
@Mgetz I kinda meant to imply that
old compilers were not always that smart for optimizations
 
2:53 PM
God is forgiving, even the wicked ones. So my job is to send the wicked ones to God.
 
3:06 PM
So many brilliant people in youtube comment section. :p
 
@thecoshman Considering that even nowadays, not all compilers should be aware of the timing of all the instructions of all existing CPUs ever. So this could be justified if it was designed for some specific hardware and that was a particular bottlneck. I mean, it's unlikely that a comparison is a bottleneck but if it's called millions of time. uSeconds can add up to 1ms.
 
Well yeah
except, bad maths
micro seconds only need to be called a thousand times to add up to milliseconds
a million calls and it's an entire second wasted!
 
3:35 PM
OMG!!1 Fruits Basket 2019? I might have to watch some anime once again.
 
 
1 hour later…
5:02 PM
@wilx yeah
 
 
2 hours later…
6:54 PM
@traducerad I've seen things like this fairly routinely from electrical engineers who think in terms of "if line 15 is set, that's an error", and so the test directly for "if line 15 is set".
 
7:11 PM
@traducerad It's much clearer as written since the & makes it explicit that it is a bitwise operation.
On x86, the & version should be no slower than the compare since there's an instruction to directly test bits like that. Whereas for the comparison, you need to encode an immediate for 0x8000.
 
@Mysticial Not necessarily. You could do if ((signed)foo < 0), which could generate code like mov eax, foo; test eax, eax; jl wherever, with no immediate value involved. (For the moment I'm writing this as 32-bit code out of habit; 64-bit code should be similar).
Note, however that this particular optimization depends heavily on the value being 0x8000.
 
Is case of unsigned to signed with an overflow UB or IB?
 
@Mysticial Probably UB. It wouldn't be nearly as fun and exciting if it might be defined! :-)
 
I think you'd need to use 16-bit integers for that example.
So (int16_t)foo < 0. Otherwise all that sign-extension crap is gonna mess it up.
 
7:26 PM
@Mysticial Well yes, the cast should probably be to unsigned short. I wasn't really thinking of writing the code that way explicitly, but of the compiler realizing your comparison to 0x8000 was equivalent, and generating code that basically treated it as a signed 16-bit number.
 
user8104581
8:16 PM
I can't tell if this chat's messages' fonts are changed when inlined code is written or if my mind just automatically makes the code stand out, due to me being used to programming.
 
its real, use single quotes to inline code
 
user8104581
I think I'll need to check the markdown later. lol
 
user8104581
ah, alright
 
user8104581
thanks
 
8:30 PM
@Mikhail Ummm...okay?
 
You're no fun.
 
@Mikhail Never was. I'm just mildly insane, which some people mistake for fun.
 
@Mysticial I'd be careful about that sort of comparison if that as intended as portable code... sign extension is a real pain
and IIRC 0x8000 is signed to the compiler unless they declare it as 0x8000u. So it's perfectly legal for the compiler to extend to 32bit or word size and then do the &
 
@Mgetz I may be wrong, I thought I heard somewhere that hex literals are unsigned by default.
 
@Mysticial I'd have to check the standard, CPPref isn't useful here. It looks like it can be either.
 
8:40 PM
@Mgetz But I don't know how the promotion rules work.
actually nvm, the example I had in mind doesn't work.
Since unsigned is considered "larger" than signed.
I was thinking like 0x8000 gets promoted to int16. Then it gets sign-extended to int32 - which then fucks up your logic.
 
@Mysticial looks like it's int unless it won't fit into int... then it switches to unsigned until it can't fit into that... then long long etc
 
So it's signed.
 
moreover all integers are positive, until the unary minus negates
 
0x8000 as a signed 32-bit integer. Meaning that it's positive.
 
yes
 
8:45 PM
So 0x80000000 with a 32-bit int would actually be unsigned since it doesn't fit in signed?
 
@Mysticial If I'm reading the standard right yes
not the clearest language
 
IOW, it's slightly harder to fuck up if you're writing hex literals.
 
Yes, I'd still personally append the u suffix but that's me
I like the explicitness in that case
 
 
1 hour later…
10:04 PM
Fuck, I just realized that as part of my front end changes I'll need to do more back end changes. The obvious, predictable thing happened, and this project is going over time. Anybody ever charged a client for work that took too long?
 
Only if you could justify for it.
 
10:21 PM
Is it wrong if I am still smiling after a night of short, troubled sleep because too many things going on?
Although 99% of the problems are caused by myself. I have no one else to blame but myself.
 
10:53 PM
@Mikhail Depends. Did you just underestimate the difficulty of the project, or did the client change requirements? If requirements changed, it's definitely legitimate to add charges to cover the extra work they added.
 
Underestimated the difficulties. But I did tell them there was a good chance it would go way over time. Legally, I signed a contract for work for time. AKA work from this period to that period. They paid. Problem is that they want me to continue work for free, despite the contract being for time. So, I did some work this week for free. Somehow I don't want to do work for free.
 
@Mikhail Everybody wants something for nothing. The obvious question is whether there's a possibility of follow-up business (that you want) that's more likely to happen if you throw them a bone. If there's none (or you wouldn't want it, even if there was) then you might as well bill them.
 
Do you think I should try billing them and see if they pay?
 
Bill them now. Don't give them the finished product until they pay.
 
The "product" is kinda weird. Its a private company paying for software features for a piece of software owned by UIUC. But really, it lives in my private source control repository. The client is not aware of source control :-/
 
11:00 PM
@Mikhail Was the time "N hours" or "work from date A to date B"? If it was "N hours", they probably do deserve a warning that "we've used up all N hours, any more you want done is going to cost extra". if it was work up through date B, so they know it's extra, then yeah, bill them.
 
What was the name of the "optimizing c++ compiler" mid-late 90's. Wacom? Watson?
 
Visual C++?
 
user8104581
Watcom C/C++ (currently Open Watcom C/C++) is an integrated development environment (IDE) product from Watcom International Corporation for the C, C++, and Fortran programming languages. Watcom C/C++ was a commercial product until it was discontinued, then released as non free Open Source software under the name Open Watcom C/C++. It features tools for developing and debugging code for DOS, OS/2, Windows, Linux operating systems, which are based upon x86, IA-32, x86-64 compatible processors. == History == Though no longer sold commercially by Sybase, the Watcom C/C++ compiler and the Wa...
 
@andreyrk So close, and so far. Thanks!
 
@Mikhail well in a company I worked at, we had pretty much 2 billing style. 1 the client pay for a bank of time and when the bank of time is depleted the client ask for more time until he's happy with the result
the other is per project, you get paid for the project regardless of the time you take to finish it
It looks like you're on the first case, but you should renegotiate a new contract to continue working and get money
billing them out of nowhere is probably not a good idea
 
11:14 PM
Okay, so I guess everybody agrees sending them an unsolicited invoice isn't a good idea. Although I suspect that they would pay such an invoice, as we have more than five years of working history.
That's too pedestrian. More like invent something, have company pay for you to build it into a commercial product. Company has ~$3.50 in total assets. Product would cost $1,000,000 to develop. Take the money you can, while using it for you thesis. Do this twice...
 
@Mikhail So you're saying that the company is nothing to pay you with, but you worked for them anyway?
 
No, they have enough to pay me. They also paid. They just don't have enough to pay for the total product.
Startups, especially when they only have SBIR Phase I rarely have more than $150k.
 
So instead of you being fucked, it's them that's fucked?
 
11:30 PM
But because they don't have infinite money. I feel like I did a ton of work. They also might realize that the stuff I'm writing is going into a research paper so they don't really need to pay me anything - especially if they are "okay" with waiting.
 
11:43 PM
@CaptainGiraffe Metaware.
 

« first day (3202 days earlier)      last day (1743 days later) »