« first day (4425 days earlier)      last day (516 days later) » 

11:50 AM
Will the adventofcode room be reopened/defrozen? I'm asking since it seems like there gonna be some stuff coming soon.
 
 
1 hour later…
12:53 PM
I'm unfrozen chat.stackoverflow.com/rooms/info/225306/advent-of-code - an RO there might want to change the topic for a new code or something...
 
@JonClements Thanks Jon :)
 
 
2 hours later…
3:12 PM
is there any canonical/related post on SO for "converting" multiple functions to a single class? (by "converting", I mean doing it manually of course)
 
4:07 PM
Hey guys, I wanted to know what kind things needs a modern GUI toolkit for you and what kind of issues do you have with tkinter?
@NordineLotfi there are many different techniques to do that. It depends on your raw material. Python offers different ways to do so
 
@Thingamabobs I see, didn't know there was different way.
 
As everything in python is an object. You could just go ahead and have a module my_functions.py and have a lot of functions and treat it like a class.
You could have a main.py importing from string_manipulation.py and request_calls.py importing functions and write a class as composition.
 
Interesting. Didn't think of doing it like that.
 
class MyClass:
translate = string_manipulation.translate
get_text = request_calls.get_text
oops forget to us format, but you get the idea.
 
yeah, indeed since everything is an object, this opens up more ways to do that :o
 
4:14 PM
That's just two of the possible solutions. Python is awesome ! :D
10 mins ago, by Thingamabobs
Hey guys, I wanted to know what kind things needs a modern GUI toolkit for you and what kind of issues do you have with tkinter?
if someone wants to make a stand I would be thankful for :P
 
I think you'd have more luck on Monday, since weekends are mostly silent here (from what I noticed). Maybe someone will answer later
 
@NordineLotfi There is also the DRY principle and Code-Reuse principle that advice you to write small functions that can be reused instead of one giant function that uses code you are using elsewhere probably again.
@NordineLotfi thanks for the suggestion, will do.
 
@Thingamabobs I mean, I could really make a stand and argue that everything will move to being browser-based due to cloud providers and (if it actually gains steam) WASM. But I'm not sure that's the kind of stand you're looking for?
 
I think the main problem with tkinter is that it's simply not powerful/flexible enough for a serious GUI. Sometimes you just need more than basic buttons and frames and labels
 
@roganjosh That is a hint what people need nowadays and why they call tkinter aged.. maybe. Thank you.
 
4:26 PM
A modern GUI toolkit should probably be able to run in a browser and probably also be async
 
I only ever used Tkinter when I was first learning python so I can't really talk from experience. But I build tonnes of interfaces for business to control and monitor production facilities, which would normally have been software packages with GUIs themselves, only I build all the interfaces via web frameworks
 
And it should have good documentation, unlike Gtk and Qt
 
@Aran-Fey so basically, portability? or do you just want it to be inside the actual browser (and interact with other non-browser part of your running OS)
@Aran-Fey I'm glad we can agree those two don't have good/enough documentation, sadly, tkinter isn't there either
 
@Aran-Fey async should be possible. running in a browser is kind a hard to do. Do other toolkit offer this functionality ? Because, at the moment it is kinda enigma to me. Either you have a normal app or you do have a web app. Don't you ?
 
I feel like what people might want when they want GUI would be: raw.githubusercontent.com/linebender/druid/screenshots/images/…
 
4:32 PM
@Aran-Fey That is something I hear often. But for tkinter there are thousands of tutorials and websites showing how things can be done. There is the documentation of NMT and the "mother" documentation but yea, it points to tcl, but python's implementation is really straight forward.
@NordineLotfi I might be able to do this in Windows, but nothing I could do in other OS since I just using Windows :P
 
@NordineLotfi Ideally it should run in an actual browser, but I guess that's only a feature if the programming language can also run in the browser, like Rust
 
@roganjosh I don't have anything against WASM (I never used it), but from what I understood, aren't the system resources inaccessible from WASM side? Unless: 1. you use a server-client setup, and the server part will handle the "system resources" and other restricted parts, and communicate with the client part (wasm). 2. You convert/run everything on WASM side, (even computation heavy part).
@Aran-Fey I see :o
 
You could probably get around that. dash, for example, could be considered the foundation of a GUI that is programmed in python but runs in the browser. But it's so far from being generalised that I would never stack it up against tkinter. Still, it wraps bootstrap for component placement and you need never <heavily caveating this> write JS
 
@NordineLotfi that's not my understanding of it, though I'm still only pencilled in to play with it properly. The bytecode should be sent to the client and it should use their resources
 
4:45 PM
hmm, I guess I'll need to properly try it out later since I don't have a clear enough understanding of it yet
 
Actually, I'm not sure what your "unless" means here since (2) seems to cover it, so what is missing in "aren't the system resources inaccessible from WASM side?"?
Is this stuff like your server database etc?
 
I meant that as a way to say "I don't know how it could do that unless here I would be guessing"
basically, whether I was right or not, I was just guessing, after the "unless" that is
@roganjosh I was thinking more of a socket based server-client, instead of DB, but yeah
 
Ah. Well, to my knowledge, there are issues about passing secrets in WASM (for example, db access) but I could imagine a reasonably happy medium whereby I could use a regular web interface for all the simple stuff and then pass back a solver with all the necessary parameters, then let the client PC sound like a jet aircraft as it chugs through all the iterations
I'll have to play with it first, though. Atm it might be the blind leading the blind. There's a lot of hype and it's hard to pin down concrete examples, for my domain at least
 
@roganjosh jet aircraft :D why don't you use (more) silent fans? (eg: Noctua fans seem pretty silent I think)
@roganjosh yeah, for sure. I'll have to see too since I was just guessing earlier
 
However, even without WASM, it's all gonna be web-based interfaces in the end; I'm almost certain of that. I could do most of my work on a Raspberry Pi if I really needed to, because I have plenty of resources to offload to. And I could do the same as a customer on the other side of the solvers
@NordineLotfi you don't generally get to pick the fans in laptops/Macbooks but I certainly can scale to any number of cores you have :)
 
4:56 PM
@roganjosh I see. I never doubted you could out-cores me though. In my mind, I already see you with thousand of Amd threadripper running dozen of things related to your domain :D
 
If you feel like saying "thank you" for all my work trying to keep control of the chat room, threadrippers would be greatly appreciated
4
Although, Nvidia is making some astonishing claims about pushing vehicle routing into GPUs. I have to crack their secret...
 
4090 is something I'd like too :')
 
@roganjosh If you want to thank me back for giving you the idea, feel free to send one my way :P
@roganjosh you can use their local server I think, but you need to be a "member". Don't know how to do that on the nvidia website though.
@DelriusEuphoria me too. I think it'll be 10 years until we can see this being sold at half it's price
 
5:12 PM
@NordineLotfi I don't want to use their service, I want to compete
 
Fair, but if you try it out, you could see if its claims are true? Maybe timings against your own work/performance, etc
 
There's a couple of things that I can't visualise quite correctly in a format for a GPU, and they're not insubstantial aspects to a useful solver. Maybe I will try it out. I've said several times before (possibly not to you) that nobody has a proper implementation for driver breaks
 
@roganjosh it's all gonna be web-based interfaces in the end; I'm almost certain of that. -- but all you want is basically be able to have something like an echo client, don't you?
so your application response in an "easy way" from the other side of the world. Is that what you are looking for ?
 
Not in the slightest. Stuff I have produced in the past is fully stateful and impacted every user in the factory. It wasn't a dashboard, it was a control panel
 
5:29 PM
Could you explain it to me a little bit more? I'm not sure what you are aiming for.
I mean I don't get what that has to do with the UI-Toolkit.
 
I had a single server running a single flask app. That was broadcast across a whole factory. The Production Planner could sign in and generate a full production plan for the next few months. Every Production Manager was logging into the same site and then saw their plan for the week. I read machine data in real time, to see conformance to plan. All of this is in a central control panel. How is that any less than what you would build with tkinter?
It's a full GUI, just in the browser. It wasn't just interactive graphs - if the production planner decided to cut a shift for a department, there was a section for them to do that, and it impacted everything in real time. The whole thing was recalculated and immediately communicated to every user
 
Ok gotcha, but I mean that same thing could be done with tkinter. I think we agree on that. But it might be helpful to have async support. Right ?
or threading or both. :P
 
Why would I do it in tkinter when everyone can just log on to an intranet site?
 
Because of security issues ?
 
Like
 
5:39 PM
I missed the first half of this conversation and I'm wondering what "async support" means in this context
 
@Kevin asyncio. I basically want to write an extension to tkinter and want some insights what is missing.
 
I see. It reminds me of a common antipattern that novices try to employ -- they create a textbox / dropdown / etc, then immediately try to get its value without running the mainloop. They expect the user to have typed in something or selected something by that point, but in reality the window has only been open for a nanosecond
 
@roganjosh I mean messages on the web can be targeted and corrupted, that seems to me common sense, with a "closed system" it should be harder to get sensitive data.
 
It might be interesting to write a framework that allows that antipattern to actually work exactly as the novice developer expects. Perhaps the main process suspends itself until the user actually does enter something. (although this begs the question, how do you tell when the user is finished entering something? Hard mode: no explicit "submit" button)
 
@Thingamabobs Do your tkinter interfaces interact with a database on a server?
 
5:46 PM
@Kevin gotcha, that is what I was thinking @roganjosh was suggesting with the web application. And I think that is an interesting feature that might be worth a try
 
I am being deliberately obtuse btw. I did say that I probably wouldn't give you an answer along the lines of what you wanted :P
 
re: web security. Keep in mind that an intranet site can only be accessed by users that have already been vetted for intranet access. That filters out the average evil user.
 
At the same time, it's possible to run across an intranet so you have the external firewall
 
@roganjosh No but there could be an entry point out of the box. But I would need to think about that a little bit. Not sure how I would implement it in a useful way.
 
The evil user would have to get a job at roganjosh's company before he could start wreaking havoc. At that point it would probably be easier for him to just pick up a pipe wrench and smack some expensive looking machines
 
5:51 PM
But there are tonnes of things that would be exposed to the internet too - you probably use online banking, for example. Also consider that local machines are probably less secure - every company will have that one person that'll download a virus that could either work locally or run rampant across the company network
 
one way would be to make a framework that works across the different remote configurations. Could be through internet/intranet, or through tcp/etc, might be done with socket, websocket, etc. The problem then would be to make this available to people in an intranet and internet settings. I can concede that with a wasm/web application, one can just use an URL and see it being displayed, but with a non-web application, you would need to go through some hops in order to do the same.
eg: moving the executable around, etc
 
To be clear here, I'm not talking at all about WASM. I think that has its own risks that I don't properly know or understand. But you can make browser GUIs without it
 
yeah, for sure. usually a bit of HTML/JS and CSS is enough to do that
I meant that as an example/possibility. I think some people already noticed, but I use the form x/y a lot when I talk/write (you get the idea)
 
In any case, I know a lot of software now that either gives you the option of "self-hosted" or "cloud" and it's a web server interface in either case. It's all moving to the browser.
 
@roganjosh people will still need to build browser.. snipping tools.. office tools. Don't think you can do everything or should do everything with a web application. I think that is just a portion of what is needed on the market.
 
6:00 PM
The company I work for insists on us using google services for all office tools. So, googlesheets etc. We've also got SOC-2 and ISO 27001 accreditation. We're not supposed to do anything locally
 
Might be because they're using Gsuite, and thus, it's easier for them to give permissions, send files, etc. Lots of companies do this.
 
Again, the only thing I'm arguing is that everything is going to move to browser interfaces :P
 
I mean, there are a lot of things I could say in that regard, but I'm gonna refrain since there would be way too much to write, and by extent, way too much to read for the patient viewers.
 
That's fair. Also, I have to say that I'm not exactly happy with this move in general anyway. I have always valued having something physical in my hand, even if I can't read a HDD anyway... but it's here. And putting everything online leaves people unable to control their own home lighting if the system goes down. I'm just playing devil's advocate in some sense, but I believe my prediction is true anyway
 
It doesn't seem so bad for your systems, though, which were all on-premise as far as I understood.
 
6:08 PM
Nope. AWS and Google. We're at their mercy. When (not if) they go down, we just stop functioning
 
I'm not happy about it either. I first noticed it with Win8 and Chromebooks. Now everyone and everything tries to do the same. In a way, Google Chrome did show some possibility of making it harder (eg: by removing/lessening the permissions of certain key features to make browsers access systems resources more easily, mostly because of existing vulnerability, etc) but I don't think this will stop anyone from doing it still.
 
@roganjosh Oh, erm, well, then, "Bad boy, bad boy! wags finger" is what I meant. :P
 
When that did happen, I wish I was in the office to shout 'What does it take to get a mainframe around here?!" :P
 
I remember we talked about mainframe once.
 
Maybe my beloved AS400 that still had products listed with prices in "d" before decimalisation of our currency?
@MisterMiyagi ah, maybe I misspoke sorry. 2 different companies. Indeed, the flask software was running locally on the intranet. Where I'm at now, everything is online
 
6:34 PM
another question that I'm fiddling around is licenses and until somewhere in the future (shouldn't be forever with tk 8.7) there is no SVG support and if I should use pycairo in the framework or PIL or none at all and leave it to the users what they want to use if any. Any thoughts on this one?
 
user20508351
how to send a specific amout of packets and return only answered packets ?
 
user20508351
*amount
 
@unknown there seems to be a missing context here.
 
7:25 PM
@Thingamabobs you could ask that question on opensource.stackexchange.com. I asked a question myself there, and they were pretty welcoming.
 
@NordineLotfi didn't knew there was a thing. thank you
 
@Thingamabobs if you ever get an answer, feel free to ping me to it. I'm actually curious about similar cases, where I want to make a project with support for X features, but don't know whether to upload it with X,Y,Z licenses.
 
there is already an help for which license to pick for your open source lib. My question is more about if the licenses underneath will scare users off. I'm confident to find an answer there and will look for a link to that help I was referring to
 
@roganjosh So you're the good cop and the bad cop at once! Dr Rogan and Mr Josh! I hope you regularly practice an "I told you so" speech.
 
@Thingamabobs so you mean like, for people who wouldn't want to contribute to the project, or use the project? I know both are valid reasons for some people, although the latter would be a bit weird but not uncommon (GNU fans, and such)
 
@Thingamabobs ah, didn't know this site. Thanks :D
 
@NordineLotfi yes GNU is a no go for a good portion of devs.
 
yeah, heard the same too
good thing I plan on using MIT as much as possible
 
8:28 PM
@MisterMiyagi "I don't follow the rules, chief. I just get it done"
 
@unknown depends on who you are hacking :D I would avoid the united states in any case :P
 
I started dowsing off to some random Netflix series - "Flavorful Origins". Good lord. After some lengthy explanation about how people make Souherb (a kind of nettle soup, basically) there was a bombshell - "but some people take this a whole lot further. They pour the soup into a pan and stir fry it. The locals call this... 'stir-fried Souherb'". Mind. Blown.
@unknown you need to find somewhere else to discuss this
 
user20508351
i ajust asking bro
 
user20508351
i am*
 
And I'm just telling you, bro
 
8:40 PM
I see, a happy family is made. lmao
 
"Dowsing is a type of divination employed in attempts to locate ground water" I don't know how to even spell the English slang. Both would make Netflix series in themselves - I'm either out trying to divine water with sticks, or the other is I'm taking different doses of different intoxicants. Note to self - just use "starting to fall asleep"
 
8:57 PM
Doze. Problem solved but too late to edit :/
 

« first day (4425 days earlier)      last day (516 days later) »