« first day (3229 days earlier)      last day (1719 days later) » 
04:00 - 16:0016:00 - 00:00

4:09 AM
Cabbage.
 
4:24 AM
cbg
 
@U10-Forward cbg
 
cabbage @BlackThunder
 
Cabbage to you too
 
@BlackThunder I like this one but the SO and SE logos aren't there
 
Yeah I know. I am working on it. (Lets keep 3d discussion a bit compressed)
 
4:31 AM
@BlackThunder I made a room
 
 
2 hours later…
6:15 AM
@Verv you should also address how your lib is different from datalcasses in the README.
 
6:45 AM
cbg o/
 
cbg
 
7:09 AM
recbg
 
7:30 AM
closed ^
 
8:13 AM
@Verv most things python 3.6 should be fine on 3.7 :)
 
cbg-ning everyone
 
@U10-Forward perfect, thank you
 
8:28 AM
Is there any good tutorial on how to execute multiple shell script files using subprocess module ?
It should also cover the dependency cases like when one script needs the output of another script.
 
Disclaimer, haven't used subprocess much But, You can check any SO question that explains how to execute a single shell script using subprocess, and then just work your way from there. If you know how to run the shell script files from the terminal/cmd prompt, you should be able to convert that into subprocess calls without issues.
 
"tutorial" seems overkill, just take a look at stackoverflow.com/questions/4846891/…
 
@Aran-Fey Watermelon! _/\\_
@ParitoshSingh Yeah that I checked.
 
and another note, the post aran linked uses Popen directly, but in more recent python versions subprocess.run is preferable.
 
8:45 AM
Thanks will check that this as well.
 
Hi guys I have a doubt
 
doubt == question?
 
I am getting some difference in numbers for a particular item named 'Diet Coke' when using groupby and value counts
 
Out[5]: True
 
Here is the MCVE: pastebin.com/bZGyCKk8
@ParitoshSingh Yeah :D
 
8:48 AM
@RaphX got any NaNs there ?
 
Yeah @JonClements
 
@roganjosh my question and answer
 
@Andras meh... was looking for that :)
 
8:51 AM
ty dear sir :)
 
question: I want to have in my class , a part where I say, that for that specific database, run that piece of code
what should I do?
 
that's a bit vague
 
At first i thought you were asking something related to what i was trying to figure out yesterday, and i was weirded out for a sec.
 
this is my code
 
maybe make a dict {database1: func1, database2: func2, ...}?
 
8:54 AM
the aim is the line 105 will only trigger for the database demo
 
However, I think yours sounds like simply a case of making an if statement? (Or Aran's suggestion if you have multiple blocks of code for multiple databases)
 
@ParitoshSingh just the if statement on that database , demo
 
I'm deleting that message for two reasons 1) it seems to have something in it that you shouldn't probably be telling us and 2) no one that has to read that amount of code is going to feel motivated to help you... so can you maybe come up with a minimal example in some sense and not be so vague?
 
At the risk of sounding dumb, do you have a variable/can you get a variable that indicates what database is being read/used? Just write an if condition with that?
 
@JonClements problem is I have no idea where I should start. tbh, I've never done that before
going through someone's code is such a pain...argh...
 
8:57 AM
I was trying to solve step 11
I understood why value counts is returning low number but why they have given the solution using groupby?
Also why would they do sum on a qualitative variable?
 
@RaphX You need to look at the result of c after the groupby.sum()
 
So I am trying to build a food delivery processing system . I have orders created by store managers which can be self assigned by the delivery agents. I need to store the tasks in a queue in order of creation data and priority. I am stuck here on the problem statement. Can we discuss some solution approaches? I have been thinking of using a table as the queue
 
I think I got it thanks @roganjosh
So basically if we have one record containing quantity as 5, value counts would return 1 for that record but groupby followed by sum on quantity would return 5, I guess that is the reason
 
Exactly
 
@ashwani Why do you need to store them in a queue?
 
9:10 AM
there was an earlier discussion about "real-time" queues, I think...
 
@Aran-Fey To maintain the order (priority and creation time)
 
Yes, this discussion is ringing bells
 
I don't get why you need to store them in order. As long as you save the priority and the creation time, you can reorder them any time you want
 
this is the first time I'm seeing an actual use case though :P
 
9:12 AM
you say you need to store them in a queue and then you say you're thinking of storing them in a db, which is not a queue. So I'm confused about your whole problem
 
Yes this is the use case
@Aran-Fey That's just what I have thought. I want to use DB table as a queue. What are other approaches you would take?
 
I think there's some shaky terminology here. How about you explain what behaviour you want?
 
In this case, won't each order get assigned a unique ID and then accumulate more and more data as the order progresses through different stages?
 
I think you have no choice but to use a db, if this is a serious project. You need some kind of data persistance in case the company's PC crashes, and a DB is the way to do that
 
e.g. first it gets created, then it's assigned to someone, then it gets completed, with each stage having a user id and a timestamp of when it happened (as a rough skeleton of what you'd store)
 
9:17 AM
@roganjosh yes, let's focus on the first state. When it gets created, it has a new state. Now at this moment, I need it to be broadcasted to all online delivery agents
Okay before broadcasting, it has to be pushed in the queue
and from that queue only orders get assigned
 
"SELECT * FROM orders_table WHERE is_assigned = 0 ORDER BY priority DESC". You'd periodically run something like that query on SQL and push the results out
 
so if the front of queue has order A (priority medium). And another order is with higher priority B (priority high) gets created afterwards, B will get assigned first
 
Ok, well that's an unexpected ordering, so you'd have to modify the query, but the principle is the same
 
side note: serving priority A before B before C will likely mean that no C gets served ever
 
^ A good point. If orders keep coming in faster than they get served, some priority levels (if you grade jobs on that alone) may never get served
 
9:21 AM
that's a case I am not thinking as of now.
 
I think you need a 3-tiered architecture: Storage layer, service layer, UI layer. The Storage layer stores the orders in a DB, the service layer doesn't care, and the UI layer sorts the orders by priority and displays them like that.
 
@roganjosh You mean polling with the SQL periodically to get the orders?
 
Ok, but this laser focus on a "queue" being pushed out to people seems to be jumping the gun on the whole process?
Since you don't yet know how any of this data is stored or organised through the whole process
And if you do already have all that infrastructure in place, then maybe we need to modify our proposed approaches based on what you do have
@ashwani pretty much
 
okay, just to mention this is a side project. By which I want to practice how to build a scalable solution iteratively. I want to implement different approaches
@roganjosh in that case, suppose since last polling, the orders were [A,B,C] A being the first. And then D gets created with highest priority so D goes to front. But still A will get assigned first
isn't this wrong?
 
This isn't a programming issue, it's just a case of logic. If A is already assigned, why does D being created at some other time matter? The "queue" will then become D, B, C for others to consume
 
9:28 AM
I am considering before the next polling D gets inserted
 
In any case, this is too abstract for me to get any proper grip on
 
what other information is needed, please ask
I want to learn
 
easy solution: don't use polling
 
@Aran-Fey ?
 
9:33 AM
As soon as a new order is created, the server should notify all clients.
 
then I lose the persistence
 
???
 
if some client is not connected at the moment, and gets connected later, it will have no orders
 
...
there's an easy solution to that, isn't there
 
hmm SQL?
query
 
9:38 AM
no, you ask the server to send you all the orders
the server can use SQL or CSV or excel or physically write the orders on a piece of paper with a pen and then read them back in with OCR, it doesn't matter
 
okay that's a nice approach
what OCR?
 
this OCR
 
That sounds like a really cool project :P
 
I know what OCR is
:P
@Aran-Fey good sense of humor
 
so don't ask "what OCR"
 
9:41 AM
lol
 
@ashwani Just to make the hints more obvious: you are trying the patience of the people helping you here, I can tell Aran is not amused. Please try being more helpful when asking for help.
 
I know, I will
I am kind of new to these problems
 
there are always new problems, but asking for help is always the same thing
 
@AndrasDeak what did I miss when I asked for help?
I mean I just wanted your views how you will solve the problem.
 
I wasn't paying attention but the fact that 1. you already had an extensive brainstorming session and only today did you explain what you're trying to build and 2. you weren't explaining what you want in any clear terms were both red flags
 
9:46 AM
Just to get a brief on different approaches so that I can search more
 
The issue I have here is that there's nothing for us to solve. We're asked to give suggested approaches to some broad requirement and all the constraints and issues are in your head, so we don't know what we're shooting for. I think you're at a stage where you're best just trying to implement the DB as you already see it working, and then ask if you get stuck on one specific aspect.
 
@AndrasDeak okay got it. will keep this in mind :)
 
@ashwani You start by understanding the problem you're trying to solve. You do this on your own. When you ask for help you explain with the least amount of words but as much as necessary and clearly what you're trying to achieve, and preferably what you think would be a good approach. For specific coding problems example inputs and outputs as well.
 
What roganjosh said. I know it's hard to communicate all of the necessary information about such a big project, but it doesn't feel like we're really going anywhere, so it's getting frustrating
 
understood
I wanted another help
I have found this problem statement from a friend. Are there any good books/other resources where I can find these kind of problems discussed? I have been searching and reading from blogs. but the problem is they are difficult to find for a beginner.
Anything you would recommend ?
 
9:53 AM
Sometimes when you are having difficulty clarifying a problem it's useful to build something really simple, then ask yourself what it doesn't do that you want it to. Used to build systems with customers that way as a form of rapid development.
 
Not really sure what "these kinds of problems" is
 
okay I will give some examples: "a news feed like instagram/facebook", "food delivery processing system"
 
I'd recommend reading en.wikipedia.org/wiki/Multitier_architecture to get an idea how these kinds of applications are generally structured
 
This is an overview of facebook's architecture. That should give you an idea of how complicated this all is, and that was in 2014 so a vast part of it has probably been redesigned since
 
I've been contacted once or twice about "I need a simple system like facebook/youtube... only have £1k to spend on it though" kind of thing... and I'm thinking I want whatever they're on :)
 
10:05 AM
like does a lot of work in that request
 
oh... it's the also the "...but with real time chat and message boards..." - that kind of stuff
 
That's at least another £500 right there
 
thanks @Aran-Fey @roganjosh
 
@roganjosh :)
 
10:37 AM
cbg
 
11:00 AM
@JonClements securitynewspaper.com/2019/01/02/… might help you make a few fast bucks and harvest gullible users' email addresses.
 
Win-win?
 
@roganjosh :)
 
@holdenweb shame I have morals Steve :)
 
Always the way - the fast money goes to those without conscience. As a Fellow of the BCS I'm bound by professional codes of conduct and ethics.
 
I think I'm morally/ethically bound just by my own existence but, yes :p
a mind/life that doesn't have morality/ethics is probably an easier one :)
@holdenweb anyway... you on your next job now?
 
11:41 AM
Python has:
1,181,254 unaccepted answers
670,678 accepted
174,730 unanswered
3,081,416 answered

Cool
 
People are really bad at accepting answers :|
 
and very good at posting useless and/or duplicate answers
 
Not answers, questions with ....
No.. No..
Python has:
1,181,254 unaccepted questions
670,678 accepted
174,730 unanswered
3,081,416 answered
Now it is perfect
 
11:49 AM
link disclaimer, i had vote closed it before. The OP clafiried with an example.
 
Greetings
 
@ParitoshSingh I don't understand the requirement
 
Best i can explain it, it's a cartesian product of two things: the first tuple/top row with a "custom zip longest" of all the remaining tuples/rows. The custom aspect being that the fillvalue is the last item in each tuple/row.
That's how i interpreted it anyways. (I've actually gone ahead and answered it as well.)
 
> With the extra example provided, we can figure out how the logic will look.
Red flag :P
 
12:12 PM
curiously it also has after a search of [python] is:q deleted:1 378,951 results
 
Only took a plethora of comments to even get to that state. So, guilty as charged :p
 
@ParitoshSingh you should edit the question
 
squirms a little hm, i have never made those kind of "question changing" edits before.
 
that or I'll close it again. Info goes in the question, not comments
 
That's true
Would people see it as some kind of "gaming" the system if im editing the question and answering according to the "clarification" that i myself introduce? Or am i overthinking this
 
12:20 PM
that's only a problem if your clarification is wrong
 
if they see an issue, they'll bring it up in the respective chatroom for sure :)
 
but then it's always a problem, whether or not you post an answer doesn't matter
 
Anyone that says "by improving existing posts and creating high-quality new ones, you are gaming the system and must be punished" should think very hard about their value system
 
Hm, alright then, let me see what i can come up with.
 
@ParitoshSingh no
And you can ping OP after major rewrites to tell them to check it
 
12:52 PM
@JonClements Got a couple of consulting gigs going, looking to add either part-time employment or more consulting, thanks.
 
Does Linux tag files with a "file type" metadata, or does it deduce it from the contents of the file? How can I create a binary file from a base 64 string python wants a "binary file" and I want to tell OP to just ignore Ubuntu's guess about the file's type. But if there's a way to alter the metadata, that would be better.
file appears mostly base its decision on the file's contents.
 
@Kevin latter. Extensions are an illusion.
high-level OS GUI might use the "extension" as a hint but that's unofficial
 
I suspect that the OP's core problem is "I'm writing this data, but the file doesn't look right" and the solution is not to trick the OS filetype deducer, but rather to encode the data properly while writing.
 
I have half a mind to suggest vim for clear info about the contents...
Side note: this smells
str(p['fingerprint_data'][0]).encode("utf-8")
 
1:07 PM
Yeah.
Ok, I've had my fun playing the requirements guessing game. I eagerly await an MCVE.
Fat chance of that, since the only way to determine whether output is valid is by passing it to an API. And OPs never reveal API endpoints without enhanced interrogation tools
 
Am I missing something or are they literally writing plain text into that file?
 
I have no idea what they're writing, since p['fingerprint_data'][0])gives a NameError on my machine
 
Right, but base64.b64encode returns text.
 
In 3.X it returns a bytes
 
ok, but they're ASCII letters
i.e. plain text
 
1:16 PM
Sure, letters and digits and sometimes "="
 
So then this is an XY problem and the solution is file.write(p['fingerprint_data'][0]), right?
 
In my first comment I was basically trying to explain that there's no strict delineation between plain text and binary
 
@Aran-Fey but then it won't be encoded...
 
95% of the time when a programmer mentions a "binary file" they mean "a file that probably contains an unprintable character". But even that is not a certainty. Maybe the file just happens to contain only printable characters by coincidence.
 
for some reason they want b64, so it might be an XYZ problem
 
1:21 PM
Hmm, yeah, I assumed that data was a byte string, but then it's weird that they're calling str(...) on it. Voting unclear.
 
I have a bad feeling that their thought process for using base64 went like "the API needs octet data. Octets are representable as letters and numbers [i.e. hexadecimal]. Base64-encoded strings contain letters and numbers. Therefore, I will use base64"
 
sadly, that is quite plausible
Starting to think that their data is already b64-encoded and they need to decode it
And now I'll stop thinking about it because there's no point
 
@furas I have an hexadecimal data — mr.abdo 22 mins ago
i.e. what Kevin said I guess
 
Am I doing it correctly: gist.github.com/TheLittleNaruto/… ? ^^
 
If the actual question turns out to be "how do I turn the string "DEADBEEF" into the bytes object bytes([0xDE, 0xAD, 0xBE, 0xEF])?", my jimmies will be rustled
 
1:29 PM
@TheLittleNaruto no, see the error :P
{"city":"dummy1", "state":"demo1"} is a dict, and dicts don't support .attr lookup
 
Thanks for pointing that out :P
 
print(user_from_dict(input_data).addresses[0]['city'])
 
But I have a class for that
 
your_instance.addresses[0] is a regular dict
 
I notice that you have the annotation addresses: List[Address], but you're not passing a list of addresses there. You're passing a list of dicts.
 
1:30 PM
@AndrasDeak Won't it map addresses to the class Address ?
 
it's literally {"city":"dummy1", "state":"demo1"}
 
@AndrasDeak It will - encoding in Base64 is a perfectly valid external representation, even as bytes, surely? It can be read back as bytes and transformed into (whatever it started as) with decode.
 
@TheLittleNaruto Why should it?
 
Keep in mind that type annotation (almost) never has any impact at runtime. Python won't try to convert an incorrectly typed argument into a list of addresses on your behalf, or anything.
 
@Kevin But not sure how to do that when I have used something like this User(**s)
 
1:32 PM
@holdenweb I said it won't be encoded if OP does "the solution is file.write(p['fingerprint_data'][0])" as Aran suggested.
 
I can't explicitly pass list objects to this constructor, Can I ? @Kevin
 
self.addresses = [Address(**address) for address in addresses]
probably something like that ^
 
@Aran-Fey Thought this part will take care of it: User(**s)
 
** is not magic and it can't read your mind
 
Depends on your definition of "can't". You can pass objects of any type to whatever function you want. Whether it will produce the desired output is another matter.
 
1:33 PM
@TheLittleNaruto it will only call User.__init__(**s) and that will only do what you tell it to do
 
cbg
 
cbg
 
You need to do what Andras said, but don't do it in __init__ - that code should be part of user_from_dict
 
@Aran-Fey good point
 
@AndrasDeak Yeah, with a question as vague as that your suggestion to ignore it until and MCVE arrives looks sensible.
 
1:34 PM
Andras: I've seen you in Chatlab too, just curious, you seem to be kind of like me in what you do. What is your degree in?
 
and then the type annotation will also be true
@holdenweb agreed :)
@biggi_ solid state physics
 
Yea nevermind
 
too theoretical? :D
 
@TheLittleNaruto If you want to try another "dotted dict" solution I'd appreciate your comments on github.com/holdenweb/hw
 
@Aran-Fey Why not ?
@AndrasDeak watermelon _/\_
 
1:35 PM
Nah, I'm MSEE
 
I haven't created a PyPI account yet so you can install it from Github or download it and install manually.
 
I thought maybe you were too. I'm a hardware guy at heart that just so happens to get thrown into the fire on programming stuff because my company is fairly small :)
 
@holdenweb Okay I'll give it a try.
 
@TheLittleNaruto Because nobody wants to pass dictionaries that represent addresses to your constructor - you have an Address class and you want to store Address objects, so your constructor should accept Address objects, and not dicts that look like addresses
 
@Aran-Fey What if I changes it to List of Dict ?
 
1:37 PM
@biggi_ yeah, no, I'm in computational physics :) Started with MATLAB for postprocessing and visualization, migrated to python and I've been happy since.
 
Will that be okay ?
 
@AndrasDeak Gotcha. I use MatLab a lot to test PID controllers and for image processing.
 
Something like this: addresses: List[Dict[str, Any]] @Aran-Fey
 
*shrug* sure, if you want it to be a list of dicts and not a list of addresses
 
@TheLittleNaruto the point is separation of concerns
@biggi_ for what it's worth MATLAB is very strong in the latter
 
1:38 PM
It's strong in the first too
 
I can believe that but I've never had to do anything with that in any language :)
 
@AndrasDeak Okay got that! I thought we should not convert the list of addresses dict to list of objects inside the constructor... is some python specific concern..
 
If you change the constructor to accept a list of dicts, then you won't be able to pass it a list of addresses any more. Which may annoy users that already have a collection of Addresses and don't want to convert them back into dictionaries in order to create a User object
 
But yea I'm a robotics guy at heart. Embedded code and sparkey junk :)
Not like PLC robotics, like battlebots robotics
 
cool!
 
1:40 PM
At my job I do: embedded code, pcb layouts, circuit design, panel layouts, .net computer applications and now I'm in the world of Python doing some opencv stuff XD
 
yup, sounds like EE to me :P
 
Jack of all traits; master of none ;)
 
don't sell yourself short!
 
Oh and harness design, intrinsically safe design, etc
Do LOTS of LabView too
 
You might be able to justify doing a fake "multiple dispatch" approach where the constructor uses isinstance to determine whether addresses is a list of dicts or a list of Addresses, but I don't think that's the best design based on what we've seen of the program structure so far.
 
1:42 PM
@biggi_ had to do some labview in lab practice once, I wasn't happy with it. But of course the experience was very limited, so I hardly have exhaustive opinion
 
LabView is absolutely amazing and doing state machines. Something that has a very set process, it can handle and it's super easy to whip something up in a few hours.
For more dynamic applications, it's a pain.
 
@Kevin It's a fresh code that I wrote. Should be fine, right ?"
 
It'll work, but it won't be good code. If that's your definition of "fine", hack away.
 
If you're saying "I can design it however I like, since I don't have any users besides myself", that's true... But try to design it so it makes intuitive sense when you revisit the program six months from now and have forgotten all the restrictions that you imposed on yourself today
 
Plus if this is for practice do it right.
 
1:49 PM
Even with a design philosophy of "I'll implement it quickly now even if it makes the design a little more confusing later", putting the dict-to-address conversion in the constructor instead of in user_from_dict doesn't make a lot of sense, because the latter approach is, like, one extra line of code.
zero lines if you don't mind mutating user_from_dict's s
 
What are example use cases of your ObjectDict @holdenweb
 
ObjectDict is useful if you want to write foo.bar instead of foo["bar"]
I can't reliably touch-type square brackets so this is useful to me
 
haha, yes, thanks @Kevin ... in what circumstances would you want to do that to access a dict values? This is what I was trying to figure.
 
Pretty much all use cases will boil down to "I think it looks better this way". You won't find functionality that makes ObjectDict more powerful than regular dict, or anything.
If anything, attribute access is less powerful than indexed access, because foo.with is a SyntaxError, and foo["with"] is not.
 
ok, thanks - I was wondering.
 
2:00 PM
Okay I'll do conversion in user_from_dict , Thanks guys
 
Is it an anti-pattern to use @property getter to access an attribute of an object, the object being an attribute of the callee?
class Foo:

    def __init__(self, bar: Bar) -> None:
        self._bar = bar

    @property
    def ratio(self) -> float:
        return self._bar.ratio


class Bar:

    def __init__(self, ratio: float) -> None:
        self._ratio = ratio

    @property
    def ratio(self) -> float:
        return self._ratio
 
I don't think it's inherently bad, no
 
ok, thank you for this - As I was writing such code, I was wondering.
 
The usual property design concerns apply - does the user understand that the operation may be more expensive than a normal attribute access, is there a possibility that mutating the object may have surprising side effects, etc.
In this specific instance it's a float so you can't mutate it, but you know what I mean
 
Yes, the potential problem you mention is not a concern, but thank you for drawing my attention to it; I'll keep it in mind when this case represents itself.
Cool, I will go to bed with a lighter heart, thanks @Kevin
 
2:12 PM
Seems like reasonable composition. Or maybe not exactly that since Foo.__init__ takes a Bar
 
In any case I think the answer to "is this acceptable?" is the same whether Bar.ratio is a property or an attribute.
 
thank you - I was refactoring a piece of code, and was a bit dismayed ratio was included in Foo, when it really belonged to Bar
...and a bit dismayed after refactoring it that I had to access it with foo.bar.ratio
 
@ReblochonMasque Take a look at the tests, they should show you what I'm trying to do.
You can also pass ObjectDict as the object hook to a JSON decoder, and the result is a tree you can access using dotted notation.
 
cbg to all
 
ok, I read through the code and the tests @holdenweb , and it confirms I understood what `ObjectDict`does. My question was related to why an `ObjectDict`.
...so it is useful for Json trees, and maybe other things too, this is what I am trying to discover. Maybe it is useful to me too, IDK yet.
 
2:26 PM
I specifically wrote it for a client whose product provided a JSON API, and all the examples used constructs like thing['first_index']['second_index']['third)index']. Like @Kevin I am poor at typing brackets and apostrophes, so I tend to find that thing.first_index.second_index.third_index trips more lightly off the fingers.
 
ah, okay, that makes sense in this context.
Thank you.
 
And I was happy to discover that the change didn't break any of their ~250 tests.
Hardly surprising given that at present all the tests still use subscripting ;-) but reassuring anyway.
A pleasure.
 
@ReblochonMasque My 2 cents: Foo containing some object with a ratio, and reporting that as its own property seems like standard containment-and-delegation to me. I do find the property in your Bar class superfluous though. Also, refactoring to expose _bar as bar implies that Foo's can only contain Bars, when in fact they can contain anything with a ratio attribute. So I see that as a further vote in favor of having the property on Foo (and also probably naming _bar something more type agnostic).
 
It is a great example of subclassing builtin collection objects too - I am keeping it for reference. :)
 
"[rename] _bar something more type agnostic" strikes me as situational advice
 
2:34 PM
Noted @PaulMcG, thank you; I see what you mean, and maybe you are correct regarding the property on Bar. I'll revisit the code in the morning to see if I can expose ratio directly.
 
If there are ten independent classes in the project and all of them have a ratio attribute and you could conceivably pass any of them to Foo, then definitely don't name its attribute _bar. If Bar is the one and only class with a ratio attribute, then I consider Foo._bar to be a cromulent attribute name
 
OTOH, I am not sure I understand what you mean by renaming the attribute bar in Foo - or more specifically, why you are suggesting that.
...or maybe it is that in this specific case, these are always Bar objects.
ah, from @Kevin comment, I now see what you meant @PaulMcG. I don't think it applies to my case, but this is indeed good advice in the context Kevin describes.
 
Maybe a more concrete example would be useful. If you had a class Kennel that can hold either a Cat and Dog instance, you wouldn't name its attribute Kennel._dog
Because then k = Kennel(dog = Cat("Mr whiskers")) is evidently silly
 
Yes, of course.
Thanks @PaulMcG & @Kevin, you have been very helpful. :)
 
morning cbg
 
2:50 PM
cbg idjaw
 
\o
 
3:03 PM
Yesterday my home laptop refused to boot for thirty minutes, giving errors that boiled down to "can't find hard drive". It finally started properly after several retries. This is miraculous, given that 100% of the tech support forums I saw on the topic said "your HD is dead and nothing can be done"
 
time to back up :P
Did you dive deep enough to find the "put your HD into the fridge" suggestions?
 
@AndrasDeak Precisely. For the first time ever, I have sprung for Amazon's "next day delivery" option. I eagerly await the arrival of my external hard drive.
 
My wife couldn't fine her glasses the other day. They were on her face. Same thing
 
@AndrasDeak You fools. I only contribute open source software that is stored on various clouds :P
 
As I drove out of my neighborhood this morning, I saw an Amazon truck going the other direction. I considered turning around and tailing it back to my house.
 
3:05 PM
@piRSquared The glasses were doing their job. Why would she want to fine them! Poor glasses.
 
@piRSquared Officer I would like to report these glasses for being on my wife's face.
 
Nice to see that my first post has a typo... it's going to be a good day
 
@AndrasDeak I knew what that was before I clicked the link
I realized the mistake I made
oh wait. You didn't post a link to the open source vs free
 
no, this is one that wim linked here not long ago
 
3:09 PM
If the laptop's drive goes kaput before I can back it up six hours from now, it's not a huge loss. I have my password store on a flash drive, and all the personal projects I'm actually proud of are on some combination of Github/Gist/pastebin/SO
 
I would like to preserve my shamefully abandoned projects, but mostly as a historical curiosity
 
I have apparently not been influenced by Stallman enough.
I guess it should be obvious, I'm on SO chatrooms right now which are proprietary software.
I have a mac, and although it has linux, the hardware is nonetheless proprietary
and very likely, Intel has supervisor software to spy on me.
even my custom computer uses AMD (which has a similar problem) and NVIDIA... and St. Linus has condemned NVIDIA
I also use Vim, but apparently that's not a sin because it is still free software.
 
and I know that video without clicking it
 
It's a classic.
It's amazing how little f**** Linus gives. (Well, figuratively, quite the opposite literally)
I should invest in RISC-V
Actually, better yet, I should make money before I consider investing in anything.
 
3:19 PM
@Dair And interestingly enough, seems like there was a moment of reflection -> itsfoss.com/torvalds-takes-a-break-from-linux
It's a wild wild world out there in OSS land.
 
It's even more interesting when you consider the big 5 tech companies and privacy. I also find the idea of Open Source hardware very interesting. It's so crazy. Also, Facebook's attempt at making Libra is insane to me as well.
I really wish more people would publish code along with their scientific publications tho...
 
Look at OpenStack. That's a massive one right there.
w.r.t. OSS, hardware/infra
 
Thanks I will.
 
np
OpenStack is a cloud operation system/platform. Ultimately it's the provider you buld to manage your own machines. At large scale, if you have your own data centers, you might invest in building an openstack team to build and manage all of it.
There are out-of-the-box solutions (RedHat) that provide "easy" solutions if you want to go through OpenStack too. Overall, a very interesting world.

I'm also very biased though :P
 
recbg
 
3:29 PM
@Dair RedHat provides an OpenStack solution. My work place works directly with OS. But it carries a ton of massive other solutions.
@Dair can you edit out the employer name if you can please?
 
@idjaw I can't at the moment, you will need to flag for moderator.
 
SE chat sucks in that it is permanently there if I ever have to remove anything like that I don't get that luxury because it just stays forever.
Best I can do for now. I'll see if I can get a delete request to go through too.
 
Sorry for the inconvenience
 
no worries
I know I have it written in my profile, but at least if I change it, it is actually changed with nothing tied to it if I ever want to disconnect this profile from IRL me.
 
recbg
@Dair oh gosh, i was not expecting that ! This is priceless
 
@AndrasDeak Ok, crisis averted, looks like the OP was in agreement with the edits. :)
 
<-- gets given a brand new instance with postgres. Borks it in 15 minutes. This is why I can't have nice things :/
 
^^ Coincidentally I'm right now migrating an old deployment structure for PostreSQL to help avoid that.
 
cbg
 
3:49 PM
cbg
 
@idjaw hey, i wrote code for openstack for about a year. That's where i learned python =D
 
04:00 - 16:0016:00 - 00:00

« first day (3229 days earlier)      last day (1719 days later) »