« first day (3061 days earlier)      last day (2112 days later) » 

00:43
Cbg guys, i starting to get into longer calculations on my projects and I want to easily run the same computations from my developing on the laptop (ubuntu) on my desktop(windows) for tensorflow and the like. What can I do to insure I won't need to rewrite code or do anything fancy, just transfer the script and execute
Use the correct file path building operations and you should be good to go?
Can I get some code review on these two lines? Seems dirty
A=np.identity(5)
A[0:A.shape[0],1:A.shape[1]]=A[0:A.shape[0],1:A.shape[1]]-A[0:A.shape[0],0:(A.shape[1]-1)]
Subtracts the identity to make a derivative convolution matrix
at the moment I've been keeping all the relevant files and scripts in the same folder to step around that kind of issue
So, you might get messed up by file path building commands. Not sure what else you're needing.
01:46
anyone versed in NLP?
02:44
@AlexBollbach A little, what's your question?
simple error: this - a question from the dawn of time when pandas was young (2013), isn't really about .apply(), just about basic syntax errors referencing a dataframe column, and why do functions need arguments
2nd call: simple error (limits not set properly on plot) stackoverflow.com/q/54913867/5087436
 
3 hours later…
06:19
@Mikhail A = np.identity(5); A[:,1:] -= A[:,:-1], or even better: A = np.eye(5) - np.eye(5, k=1)
06:46
@ArtiScream Depends whether you know the length of the binary string upfront or not, then you could bit-flip by xor'ing with a known binary constant of corresponding length: ^ 0b00000000010000000001... Alternatively, you'd probably want to reverse the binary-digit string before converting to integer: int('10010100100111'[::-1], 2). Or else just process it with a list comprehension in 10b chunks.
...but if you start from a string (as opposed to an integer), then hacky string methods are probably fastest.
 
1 hour later…
07:57
@smci it's almost trivial to construct that int (the "binary constant") manually
 
2 hours later…
10:08
@AndrasDeak Not quite, because you need to know how many bits the input has. If the input is say 48 bits you want to flip bits 39, 29, 19, 9, but not the (nonexistent) bits 49, 59 etc. It might be less grief to reverse the bit-string, xor against pattern, then reverse again. But probably easiest to do everything as a string (not integer) operation.
10:37
Hey, can someone help me with a newbie issue?
I am creating a small module and I'm hitting a strange error importing other packages from my project
I have module/__init__.py
module/common/__init__.py
module/common/io.py
module/package/__init__.py
module/package/algorithm.py
when from algorithm I do from module.common.io import (some_stuff)
I hit "No module named: module.common.io"
What happens if you try import module? never mind
that's very strange indeed
if you do import module.common and print(module.common.__file__), does it output the correct path to your module? My best guess is that you're importing a different module than you think
10:54
let me see
I think it works if I use common
instead of module.common
but just don't understand why
there is an ' init.py' in my root
well maybe your current working directory is set to module/, which would let you import common. But there's no reason why import module.common would work and import module.common.io would not. That part makes no sense
@smci log2...
@Aran-Fey can't you mess with the io name in common/__init__.py?
No, the import system doesn't care what you do, it only looks at the file system to see if it can find a module with that name
So unless you do os.remove('io.py') you should be fine :P
11:07
heh
11:36
I'm not sure
because intellisense suggest me to add the module to the import, but then it fails
if I remove it, the linter tells me that the moulde cannot be found, but then it works...
it's quite strange
You should definitely use the correct imports (i.e. with module) and figure out the problem. You don't want to have broken code that works by accident
You haven't answered my previous question yet, but the next debugging step is probably print(os.listdir('module/common'))
Hey guys, I'm sorry that I'm asking this simple and unrelated question.
I'm trying to push my project on my repository but git says:"Updates were rejected because the remote contains work that you do  not have locally. This is usually caused by another repository pushing"
11:51
is this about python code now?
Nope, I said I'm sorry !
I mean is the code you're trying to push python?
oh come on, how is that relevant?
@AndrasDeak No, It's PHP
11:53
I suspect PHP room regulars also use git
What is the difference?
it's their problem :P
it's a git question, doesn't matter if he's pushing python, java, HTML, jpeg or mp4
I'd rather X4748 doesn't pick up the habit of asking all sorts of off-topic questions here. They blew their one free chance with the linked C++ question. Otherwise I'd be happy to help.
on the one hand there's no git room, on the other hand it's equally off topic in the PHP room
I don't know why you care too much about group title, That's right this is a python group, But is that mean you can not talk about something else?
11:58
You can't.
please read the room rules
example:
> Ask about Python. Go to a relevant room to ask about other languages or topics, even if that room is less active.
@AndrasDeak Which room is for this kind of stuffs? I mean git or similar problems
As I said there's no git room. You're trying to push PHP so I'd try the PHP room.
@AndrasDeak Right.
As I also said I'd be OK with helping someone else with git, but you have already asked a blatantly off-topic question here earlier, and I'm trying to prod you to improve.
patience is a non-renewable resource :P
12:56
cbg
cbg robot Paul
RoPaul...?
I have had a succession of Slack avatars that were robots (the original Robby from Forbidden Planet, Gort from the original Day The Earth Stood Still), but I hadn't changed on SO ever. So when I updated my Slack avatar to a picture of RoBoHoN, I updated here too.
13:09
@AndrasDeak No, the input was string, not integer. Dude, I used to do hardware design and verification for over a decade, and have an MSEE in it. The complicating issue here like I pointed out, is that OP wants to give the input as an (arbitrary-length) string, not an integer. If we start with a string, it's not worth the computation to convert to an integer, construct the mask, do the xor, then convert back to string.
I thought you were talking about an "if it's a number" case
then again for a string you can use len() to determine the number of bits :P
I probably misunderstood that message to imply that the previous one was in relation to numeric inputs
You misunderstood the discussion, then. My comment stands. It would
be inefficient to figure out the length, construct an *integer* xor mask of that length, apply the mask to a string converted to integer, then convert the result back to binary string. Easier to directly operate on the (specific bits of) the string. You could even do it with an iterator in chunks of ten binary digits (and handle the last partial chunk).
(Anyway, doing this sort of thing efficiently is what Verilog/VHDL were invented for)
@smci For me the bottom line to the discussion is that the string is a terrible way to provide binary information to anything but people, and since computers are so good at transformations it's usually best to store information in the most computationally efficient form, and translate at the human/computer boundary. This is hardly radical thinking.
With my outdated knowledge of hardware I can see it being relatively easy to convert a series of "0" and "1" to a sequence of bits, but the variable length requirement would but things well outside my limits of competence.
Lunch beckons. Meeting with the PythonAnywhere team!
13:32
@holdenweb I don't know why you guys are repeating back to me what I wrote hours earlier: it's self-evident that doing bitwise manipulations on an integer is most efficient when done with bitwise or integer operations. However on this particular case: ...but IF YOU START FROM A STRING (as opposed to an integer), then hacky string methods are probably fastest.* (because in this particular case you can iterate over 10-bit string chunks of string input).
Repeating things that have already been said is independent verification ;-) that's just good science.
(In any case, if you need to do arbitrary-precision binary manipulations, you do it in Verilog (or else C), not Python. But that's another story.)
I, too, think that integers are good for bit math in many contexts, but strings are also good in different contexts
I am getting erro as 'NoneType' object is not iterable at the start of the function createSplits

you can refere my code

https://pastebin.com/f9Ljd7E9

I am implementing random forest algorithm

I am follwing this https://machinelearningmastery.com/implement-random-forest-scratch-python/

but i am wrting code using class and methods

can somebody help?

dataset link :http://www.sharecsv.com
@sunil If left, right = root['groups'] is crashing with 'NoneType' object is not iterable, that implies that root['groups'] is None. You can't unpack None into two variables. One possible solution is to first check whether root['groups'] is None, and do something else in that case.
or left, right = root.get('groups', (None, None)) (or whatever other reasonable default there would be for left and right if there is no groups
@Kevin you mean if root['groups'] is not None:
left, right = root['groups']
Pretty much. Although if that's the only change you make, then I might expect the code to crash a little later with a NameError because left and right aren't defined
but logically it should not happen ,am i missing anything ?
13:51
Possibly. I can't tell why root['groups'] might be None just by skimming through that code. I think I would need a much deeper understanding of the overall architecture of the code before I could draw any conclusions.
But because I am a rube, I am unlikely to gain that understanding
ok
what rube mean?
sorry
about it
sorry for my bad English
Looking a little deeper, I see that getSplit is responsible for creating the root object, and it initializes its max_groups value to None.
Later, it may reassign max_groups to a new value, but this occurs inside a conditional inside two for loops. If either of those loops iterate over an object with length zero, or if that conditional never evaluates to True, then max_groups will remain None, and so root['groups'] will also be None
possible
let me see
14:10
with if root['groups'] is None:
return
it ran
but second time it fail again with other exception
it is confusing
jjj
jjj
cabbage all
from pickle import cabbage
None of my coworkers have come in yet. Is it a holiday and nobody told me?
What does google have to say... It's hug a GI day, Casimir Pulaski Day, Maha Shivaratri, the anniversary of the martyrdom of Saint Adrian of Nicomedia...
Or maybe it's because it rained for six hours last night and half the roads are solid blocks of ice. But that's not as funny so I'm going to assume that they're all at home fasting and meditating on ethics and virtues such as self-restraint, honesty, non-injury to others, forgiveness, and the discovery of Shiva.
Not that meditating on the discovery of Shiva is inherently funny. But it kind of is if you imagine white catholic brogrammers doing it.
14:31
@Kevin you have to meditate to know your self
not shiva
Sounds reasonable. But I'm just repeating what Wikipedia says. Maybe they need more fact checkers.
@Kevin you can try this ishayoga.org
but you have to come India
:)
The next time I'm in India, I'll definitely try it
14:50
@holdenweb Boils back to the DBA adage: "store dates in UTC, display them in whatever the heck the user hallucinates is reasonable."
jjj
jjj
>>> from pickle import cabbage
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'cabbage'
@smci ;-(
@holdenweb I take it you'd not be a fan of Binary-XMPP a la <zero/><zero/><one/><one/><one/><one/><zero/><zero/>… >:D
If I could beam one lesson into the minds of all new programmers, "understanding the difference between data and presentation" would be a strong candidate
programming april fools' jokes are the easiest way to make thousands of people sigh and roll their eyes at once
@Kevin but I really want to remove the commas from my lists
Store and manipulate data using whatever type most accurately represents the data's intent. Avoid converting to string for as long as possible. Ideally, don't do it until the actual print call, and do it implicitly
There are exceptions, but that's true of almost all lessons for newbies.
Exercise: find the exception to the above statement.
14:57
The sad part is when April fool's jokes get baked into production systems. I caught someone using my Cheshire (rot/caesar/transposition/daisy-wheel) cipher to encrypt credit card details in-DB, which is just, :hold head in hands and weep gently: levels of no.
@Kevin On the gripping hand, Decimal, and systems which don't support better than floating point. Alice's Law #132: Strings: the universal arbitrary precision math format.
(E.g. JSON. Because to heck with JSON for numeric data.)
JSON is sort of a data/presentation hybrid so I approve of converting numbers to string before serializing to JSON if this is necessary to preserve information
^ How not to float. ;^P
(1.7(15 zeros)69) XP
Programmers using floats for currency data should be given the conical hat of shame and sent to the time out corner
15:16
UTC time out?
:insert terrible "we all float down here" joke:
15:29
@smci Crassness, ignorance and stupidity probably accounts for a lot of it in my case.
15:56
Curious. I was source-diving for a regex question and I came to a dead end. sre_match calls sre_ucs2_match, which appears nowhere else in the code base. Could this be the work of a preprocessor macro?
Ah, yep. #define SRE(F) sre_ucs1_##F executes just before including sre_lib.h, which defines SRE(match).
I thought you're not supposed to define functions inside .h files but I guess anything goes when you're writing a regex engine.
16:12
Woah; that ucs is mentioned there gives me terrifying flashbacks to a segfaulting situation my team ran into years back, with a "very large" Django app. Modular, not every client deployment used every feature, but our test rig needed everything enabled. Enabling everything would cause Django to construct a singular regular expression combining all routes, which exceeded ~60KB, and would instantly die. (Due to internal UCS encoding limitations, AFIK from the time.)
@Kevin Regular expressions are themselves a programming language; no holds are barred when writing compilers.
When one is stealing fire from the gods, one does not brook criticism about how one forgot to wipe one's feet after the heist
Compiler compliers are mind-blowing. — That being the result of RPython translation of a simple Hello World example into C. In "more complete" codebases, about 1/5th of the lines are labels or gotos. "This… this I can work with." XP
OTOH one should be very careful about which conventions one should abandon for the sake of expediency. Otherwise you'll spend the next eternity getting your liver pecked out by an eagle while you think "perhaps leaving a trail of muddy footprints back to my hideout was a mistake"
"You either die a hero, or you live long enough to see yourself become a LISP programmer."
16:25
@Kevin I will choose to imagine that you believe that Prometheus' crime was making a mess in the hallway
Cleanliness is next to godliness, after all.
16:40
cbg
17:26
hmmm...do I have to patch pathlib Path and mkdir separately when testing? paste.ofcode.org/jkNUPswxmbHV7b7FBk7hRZ
17:42
I think it's probably because Path returns a WindowsPath/LinuxPath instance
Mocking those as well doesn't help though, for whatever reason
@Aran-Fey It doesn't seem to work Patching them separately either. Any ideas on how to assert that the Path object is instantiated with the correct argument (I've got a new location/old location situation and want to assert the correct one is passed), and then that mkdir is/isn't called?
well the first part is already working, but the 2nd part... no clue, unfortunately
@Aran-Fey Cheers :)
I guess I'll just test that the correct one is being passed, and have another test testing the logic. Seems unpythonic to not be able to test both the instantiation and the method calling simulataneously.
On one project, our developers began writing tests. They loved tests. Had to test everything. When they got to reimplementing the DAO layer's own tests within ours, I stopped 'em and said, "No, we must be able to assume our dependencies know what they are doing and have tests. Test how we use them, not them." :liberal foam bat application:
(I mention this because the convo so far sounded dangerously close to your own tests testing, specifically, just pathlib behaviour. ;)
18:46
Yeah - I always assume that my dependencies have tests and work properly, even despite knowing otherwise
If it fails in how you use it, then that's a problem and a worthy test. If a DAO layer fails to serialize, persist, and deserialize, then you've got bigger problems.
Paz
Paz
Please, please, what are the odds someone here knows the MVC model?
19:00
Pretty good, as it's a fairly popular design paradigm
Paz
Paz
ok, great! I have a question.
i've created a model, with a thread that keeps on receiving messages from socket server.

How can I access these from the controller? how do I know when I receive a new message on the model from the controller?
Perhaps you could create a queue that the controller adds to, and the model pulls from.
Or I guess the other way around
Paz
Paz
How can the controller know I've added something new?
@amcgregor I just want to test that I'm instantiating a Path object with the correct path, and that mkdir is called upon that object/path. Are you suggesting that's a problem?
I'd be inclined to have the controller handle messages from the socket server directly, and use those messages to modify the model.
Where possible, controller-model communication should be one-way
Paz
Paz
19:07
So like, the self.socket would be a model parameter, but the message receiving would be on the controller?
Doesn't it kind-of defeats the purpose of the model being logical and the controller being practical?
I mean that the model would have no access to the socket, and not even know that the socket exists
Paz
Paz
I'm doing a simple chat app.
What purpose would the model have then? socket communication is the only data I got
forgetting to cbg \p
The model would have responsibilities such as:
- storing the internal state of the application. For a simple chat app, this might be a history of all the messages that have been sent.
- listening for input from outside agents. This input will change the state of the application. For the server, the agents would be the sockets belonging to each client. For the client, the agents would be the user and the socket belonging to the server
- informing the view that the state has changed, and that it should update itself
Paz
Paz
And is it right structurally to put the entire Socket management on the controller?
19:15
Yeah IMO
wim
wim
is there any valid use case for doing Decimal(myfloat)? Questions like that make me think perhaps it should just be a TypeError in the first place.
Paz
Paz
alright then. thanks!
@wim only if you want to demonstrate double precision, I think
wim
wim
hmm?
working with the exact inexact value of a float :P
wim
wim
19:21
Don't follow. That would be expilictly via Decimal(format(1.4, ".64f")) for example
Here's what I'm imagining. The user starts their client. The Model is created, currently with no data. The View is created and displays an empty chat room and prompt. The ServerController is created and establishes a socket connection to the server. The UserController is created and listens for events from the View's prompt.
The server sends a listing of chat history to the ServerController. The ServerController updates the Model with this data, and the Model updates the View. The same thing happens whenever the server sends a new chat message to the ServerController.
Whenever the user types in the prompt and clicks "submit", the View informs the UserController. The UserController asks the ServerController to send this message to the server. Optionally, the UserController also updates the model; alternatively, the server's socket informs the ServerController to update the model.
Now that I type this out, it seems a bit awkward that the UserController is communicating with the ServerController... But it would also be strange if the View communicated directly with the ServerController. Hmm.
Maybe the ServerController should be a Model?
@Kevin Point of clarity… what framework are you utilizing that appears to provide MVC? (And is it actually MVC, and not MVP?) This can alter how egregious it is having "controllers" talking to each-other, if they're not actually controllers.
Most MVC separations I've seen developers write under web frameworks aren't MVC at all. Model, View, Presenter, where the "controller" is actually a "presenter" which is freed after handing back the view. (Controllers persist to process events within the view, presenters do not.)
I imagined writing these classes from scratch with no framework. I don't know what Paz is using.
And yes, everyone seems to relegate Model to just mean "data model", when it's actually where the business logic is "supposed" to go.
Thus controllers being thin bridges between, say, web front-end and model logic. Or any front-end and model logic.
The fact that server communication is essential to the working of the application is a point in favor of putting it in a model and not a controller
19:31
cbg
Maybe something like...
LocalModel - Receives updates from UserController and ServerModel. Sends updates to the View and the ServerModel.
ServerModel - Receives updates from the server socket. Sends updates to the LocalModel.
View - Receives updates from the LocalModel. Sends user input events to the UserController.
UserController - Receives user input events from the View. Sends updates to the LocalModel.
One may argue that since the ServerModel does not talk to any Controller or View, it does not actually have to be a Model; it could be a class without "Model" in the name, or its functionality could be embedded entirely within the LocalModel (which would then have to be renamed since it's no longer dedicated to only local state)
Then we've looped back around to Paz' original design from chat.stackoverflow.com/transcript/message/45529483#45529483
In which case the answer to "How can I access socket messages from the Controller?" is either "the same way the model tells the controller anything -- by passing it to the View" or "there isn't a good reason to do that -- the controller cares about user input, and the server isn't the user"
@Kevin Even though my own web framework encourages "MVC/MVP"-style separation, the only vestige of the terminology internally is that of "view", and all of the terms have very specific meanings. Presenters are referred to as "endpoints", typically callable objects called to return a view-able object, or a static value to utilize as if it were the return value of such a call. Views (registered in a type registry) then apply the return value to the response; whatever that may entail.
So… not really very MVC at all. ;^P
19:48
Kevin's Incompleteness Theorem: no single framework can completely and consistently encompass the design of all conceivable applications
I wanted a dataset which lists many windows softwares according to their categories for a project. eg: anaconda: software development, roblox: gaming, VLC: video player etc. I searched but could not find anything similar to this. Please link me to one of them if you are familiar to any such dataset.
Frameworks try to carve reality at the joints, but reality is fractal. You may as well try to measure the coastline of England.
@dreadedHarvester Can't say I know that one.
@Kevin I can prove the coastline of England is of infinite length. Very apt comparison. :D
@dreadedHarvester I doubt such a list exists. Even the comprehensive Wikipedia lists that compare technologies would require searching for a specific software category in the first place
There are some aggregate sites that might help, if you can access their categorization data in a safe and sane way, such as alternativeto.net which helps find alternatives to X within the same domain.
OTOH, the wonderful thing about standards is that there are so many to choose from. At work I deal with HR (job offer information), and just don't get me started on what HR departments call "categories" these days. (NAICS? Nah, too simple. ISCO? Pshaw, too universal…)
Hmm… weird thought of the moment. Software if sold in stores would get a UPC code… does software ever get an ISBN? (Thinking of helpers for classification/categorization.) O_o
19:58
ISBN is specifically for written text? I mean, you might argue that code was written text, but that would be pushing it.
Plus, a book is a fixed piece of published work. What would happen each time you patched software?
Although, along those lines, there may be categories for licensing of software
20:13
@dreadedHarvester Windows characterizes some of them somehow, right? Probably based on what files they open, so that they can be supplied as options to set default video player, browser etc. There might be some data-sets or methods there that might help?
docs.microsoft.com/en-us/windows/desktop/shell/… suggests that the HKEY_CLASSES_ROOT/<file extension>/OpenWithProgIds registry subkey is responsible for the "open with..." menu
I expect these keys are added to by each piece of software as you install them
So at least you can get the file associations of all the programs in your own open with menu. Whether there exists a tremendous database of every software's desired file extension, I don't know.
@roganjosh ISBNs are identifiers for titles, with ISBN-10 directly compatible with EAN-10 barcode identification. Educational video content is also typically ISBN'd, though entertainment video is not. Of course, searching for "software isbn" ignores word order and finds all sorts of not-what-I'm-looking-for results. XP
The only unique identifier you need for software is the decimal representation of its executable :-P
@amcgregor something seems wonky here. Are you sure those videos are not affiliated with an original publication?
I might publish a book or journal article with associated video content. If just plain video content with no associated publication gets an ISBN then my understanding is well off
Absolutely. From the US ISBN authority: "… If the DVD is instructional or educational, then the DVD is eligible for an ISBN."
Software does seem to be included in their list of approved material, if instructional/educational.
20:28
man, I was well off
However, that educational limitation does preclude use of ISBN for general categorization of software, sadly. XP
Clicking around Amazon's "Software -> Education & Reference -> Encyclopedia" section, I don't see any items with ISBNs. If any piece of software would be considered book-like, It's these.
Can doesn't mean they do, given there is an application process and likely fees involved. ;^P
I can understand the boiler-room "multimedia experience" companies not registering, but you'd think like Britannica would drop a millionth of their operating costs to get a veneer of respectability
they seem to be dirt cheap
Unless inflation of ISBN value has exploded since 2010
I suspect the qualifying criteria aren't as simple as that eligibility table makes out
20:35
There are only 10**13 of them, and more books are printed every day. That's a recipe for the price going up to infinity
I wonder if the British Library collects all ISBN media
The year is 2342. Culture and science have stagnated because all ISBNs have been used. All, that is, except one... A bedraggled courier tightly clutches humanity's last hope on his journey through the wasteland.
3
I'm sure I've read that they have 1 copy of everything ever published, but I assume that's texts. I doubt they have every take-away menu published, so somewhere in the middle is their criteria
@Kevin 9, 10, 13… inb4 15 digit. They've expanded the bit depth a few times already. ;P
I wonder how many Y2K gigs were pulled off for each of those changes. "We're running out of ISBNs, we'll be forced to read Topsy and Tim books as our planes come crashing from the skies because we can't publish the control manuals"
20:43
20 years prior, the ISBN consortium voted to increase the ISBN length from 13 to 15. But no decision could be reached, since the delegation was disintegrated by Amazon killdrones
Adding two bytes to all of their database rows is bad for their stock price, you see
You can't solve all your problems with killdrones, but you try telling that to the partially animate skeleton of Bezos
Paz
Paz
@Kevin It's really weird for me to create my socket and handle it through the controller.. It gives it (the controller) way to much than it actually needs to handle//
@Kevin we will have our hero: youtube.com/watch?v=EF3g4Ua5e7k
Also inb4 they allow X as a digit in places other than the checksum. That'd vastly increase the available number space with no increase in length.
@Paz Yeah, I changed my mind, socket stuff should go in the/a model. See also the conversation at chat.stackoverflow.com/transcript/message/45529757#45529757
Paz
Paz
oh
ok
20:58
TLDR: putting the socket stuff in the model still doesn't answer your original question of "how do I tell the controller about messages the model receives from the server?" because you need a really good reason to allow the model to talk directly to the controller and I couldn't think of a really good reason
Paz
Paz
Actually read it, yeah.. I guess I can solve these with multiple infinite while loops on the controller to constantly check on the model to see if there's anything new
but that's just not efficient
@kevin
:| That then steps squarely into the "centralized message bus" realm of solutions, which ought to be scary.
Paz
Paz
oops.. Didn't mean to send it, I wanted to write maybe MVC isn't right for this project
For sure, MVC is not the end-all, be-all of software design! ;^P
Paz
Paz
@amcgregor lol
21:10
It's a convenient pattern, and one designed for a very specific set of circumstances, which web developers don't seem to appreciate. (Thus abusing the term "MVC" where they ought to be using "MVP", esp. in back-end frameworks.)
Paz
Paz
@amcgregor kinda sucks cause I have all the views lined up ready to be used from the controller
@amcgregor so.. abandon the MVC on this project?.. no possible convenient turn-out?
Hard for me to say with authority. I've written a few multiuser network services in the past, and the communication layer was largely abstracted in each one. The "controller" is effectively the only thing that wrote to the clients, and the main thread loop the only thing that would ever read (and accept). (To gather a complete "message" then invoke the appropriate controller when the message was prepared.)
In MVC, doesn't the model receive messages from the controller rather than the other way around?
In my MUSH project, sockets were literal DB (model) objects moved through the stored hierarchy as the player moved. :/ So… as un-helpful as this is… I've done a variety of approaches, to good effect in each case?
Aye, it's most typical to have the controller managing everything; it invokes model, it queries model, it prepares model result for the view. OTOH, my models are very REST, so most "RPC calls" end up being state transition triggers. E.g. PATCH /invoice/27 state=accepted — the controller applies the patch, the model would then fire off event handlers for the state change.
Paz
Paz
But as I far understood you can't actually call the controller from the model
which makes everything hard af on this because it could have solve quite everything
21:19
Not normally, though some of those "event handlers" may be bound controller methods…
Controller X needs to be notified of change Y on Z.
Paz
Paz
yeah but like in my situation, where I have nothing to do with the messages I recieve..
cause I can't link between the model and the controller in a way that helps me
btw sorry if my notes are kind of out of place I just am extremely tired right now and just want to get to a proper conclusion on this
wim
wim
21:48
pickle.loads(b'\x80\x03X\x04\x00\x00\x00\xf0\x9f\xa5\x92q\x00.')
21:58
import SuperStew
When a moderator candidate says "I'm usually able to tell whether a post is good or not in a couple seconds", that's a red flag, isn't it?
What I heard is "I can do my job without reading the post"
wim
wim
Operating-system specific requirements with pip has accepted cruft, recommend upvoting that 2019 answer and downvoting that accepted answer
wim
wim
setup.py is orthogonal to requirements.txt in a way that the OP doesn't seem to grasp
@roganjosh heh.
Lol, 1 comment flagged and deleted and now they've stepped up the game
I don't know how many flags need to be raised there before the guy gets blocked
22:10
those comments have started disappearing mighty fast
It's locked now
oh, that's a neat lock reason
Oh wow, my last comment got undeleted
OP dug their own grave
@roganjosh the guy is probably a female
22:12
How can you tell?
The name
yup, user11150719, checks out
@vaultah I can't see the post any more, but the gender doesn't make a difference to me. I may have been hasty with "guy" but the person is just not very nice
they've been nuked if that makes you feel better ;)
probably not their first rodeo
22:13
or self-deleted, actually
new users can do that I think
My skin is a little thicker than be offended by that :P
rude comments don't get you nuked typically
I wouldn't be surprised if it was a ban evasion account
dunno if mods can find that out so quickly though
@AndrasDeak I don't think you can see deleted comments, but they had a whole stack of them for me and then Aray-Fey afterwards so they are not a reasonable person
they're pretty good and some users are pretty stupid, so anything's possible
@roganjosh yeah, I can't, but I figured
22:16
Or maybe you followed it as it developed. It should be enough for them to be banned.
@roganjosh nah, I just missed it
banned yes, nuked no
Next time make sure you have some Butterkist handy rather than having to go cook some :P
ugh, replying is hard
@roganjosh I don't get that reference
tbh, it's nothing to do with the Welcoming Wagon, some people are just going to be like that.
@AndrasDeak grabbing the popcorn
wim
wim
22:21
@AndrasDeak 😂
@AndrasDeak just in case, it changed after the moderator got involved
no way ;)
Oh, yes it did
just like germs: I don't see it so it didn't happen
"germs didn't happen". Wut? :P
22:23
artistic license
wim
wim
impressed with the Windows Python 3 "web installer"
just worked
I expected pieces to be falling off left right and center, given past experience with Python on windows ..
wait for the first update ;)
@wim it really isn't that bad unless you're trying to compile the scientific stack properly
On my main computer (windows) which I use for playing
Python is completetly broken
How so?
22:33
I have to pray my code works whenever I try stuff on it
idk
I remember it broke when I tried things using opencv2
wim
wim
what's the windows equivalent of docs.python.org/3/library/grp.html ?
What would be the errors when it doesn't work?
I don't remember, i don't use it much now
some dll things as far as i remember
with opencv it's probably "segmentation fault"
@wim no yamming clue what that is so I don't think I can help you there sorry
The wiki doesn't help me too much. I don't know the equivalent.
wim
wim
22:52
it's unix users/groups
does os.stat(somefilename).st_uid and .st_gid both equals 0 on windows??
if so, that's kinda bunk, because uid 0 is typically root for unix
yup, both 0
import os

print(os.stat('test.txt').st_uid)

is 0
I am an administrator on this laptop. I have no non-admin accounts to test otherwise
I must say, though, that I've not seen file permissions set on the file level on Windows. Most lock-downs just block entire directories.
I bet more than half of those will be blocked by commercial anti-virus
If you have a system that doesn't have a commercial package, sure. But most companies will have all that disabled.

« first day (3061 days earlier)      last day (2112 days later) »