« first day (3604 days earlier)      last day (1569 days later) » 

00:23
@roganjosh Fair enough on executemany only being intended for multiple actions on one table. But for some of those, I also need to enter data in another table, then put the primary key in the row in the other table. I can pass tuples to actions in the first table, then the second, then pass back over the first entering the missing values. I don't know if it's generally worth that complexity though. Thanks.
 
7 hours later…
07:08
Morning cbg all, bugrit.
07:37
HI Python experts
I have a query, I have a python UDP client. The box has multiple network interface, how do I ensure the packet goes out of a specific interface, say eth1. Any clue ?
I am a newbie to python sockets, any help will be appreciated. Thanks.
@toonarmycaptain it isn't. You can cheat and get the ID of one row inserted into the table, and then just assume that the foreign key is a contiguous block of ints in the range of that ID to that ID +list length. Then watch it all crumble as soon as you have concurrent users :P
08:03
@ArunodoyDasGupta Listening on IPv4 address 0.0.0.0 instructs the network layer to listen on all available interfaces.
Normally you let the network layer worry about routing - why do you need to send from a specific interface?
The destination IP address determines which interface is used for the outbound packet. Most systems just have a "default gateway" (their router), through which all non-local (different IP network) traffic is routed.
Which OS are you using?
Cbg, all
@roganjosh Closed with comments.
Much appreciated :) I didn't think the task was suited to Flask any more than any other python script
Yeah, the actual backend does not matter, I'd say.
Oh my. I could have sworn I'd VTC'd but I hadn't :/ Apologies
09:32
Boo, the extra line spacing is by design :(
dun dun dunn
Actually, rene says it's by design.
Nobody has jumped to shout them down. I suspect the 6-8 weeks part is correct
Psychologists have been studying the effects of text presentation methods on comprehension and speed for decades, and the information presented by W3C is based on that research. Tons of research has repeatedly concluded that information from surrounding lines of text can interfere with reading speed and efficiency, suggesting additional spacing between lines of text is valuable. That's not even just for people with cognitive disabilities, who struggle more than usual. It is true of everyone. Stop attacking the research angle while presenting nothing of your own. We're done talking about this. — animuson ♦ 12 hours ago
heh
@roganjosh "6-8 weeks" is a meme for "whenever the company decides to do something, if ever"
I'm well aware of the meme :P
OK, just making sure :P
09:39
Though, it looks like the wrong post has been pinned because your link is far more definitive. I guess the title is too anti-change
People are creating userscripts to apply 3 lines of CSS, wow -.-'
@roganjosh too specific. The currently featured MSE post is about the whole change
@hkotsubo We're listening to the feedback we're getting about it. We are not listening to people who are simply stating "the research is nonsense" because that is not constructive to any discussion here. (The comments doing so have been deleted here, but my comment remains to deter people continuing to bash research instead of offering constructive opinions.) — animuson ♦ 11 hours ago
I guess I'm an oddball because I find it much harder to read on mobile
I think it's a generational thing
I can accept the "people with cognitive issues" angle, and I'm all for it. I'm not buying that I find it easier to read that atrocity.
Their point about research is right though, but they should've provided the research citations in the first place.
09:46
Not to mention that a backlash of people, probably bigger than the sample size of those studies, probably counts for something
On StackOverflow, sample is you!
What I don't get is that stackoverflow is a place for programmers who don't know how to greasemonkey their pages on the fly
You want it to have a different line width, nobody is forcing you to view it that way?
@holdenweb i fixed it, thanks for anyway. i just put the old elements in a list and then cleared the list just before writing the new elements. now it works perfectly.
Mmm, well, technically they are pushing it by making it the default. You'd think I would know how to override their style, but I don't. It's at least 30 mins of effort to understand how to do that, and typing my frustration doesn't take nearly as long
@nerd please see the room rules. You shouldn't bring questions from main here unless they are at least 48 hours old
user13415013
sorry, i will try
09:58
@OldTinfoil I'm only half playing devil's advocate btw :P
@AndrasDeak Yes, but you don't increase diversity by appealing to either the majority or to minorities unless there's an element of choice. UI styles can be a matter of user choice, but most UIs don't give the user much choice, or make it easy to configure the necessary options.
@OldTinfoil Cleaning up after people's random illusions of grandeur is my job. I have little desire to fiddle with every little knob off the clock as well.
I suspect this is because I'm grumpy and jaded, and tweak almost any site I regularly visit
I've also noticed my Stylus modifications for chat have broken again
@holdenweb their claim is that it helps everyone
@AndrasDeak That seems, shall we say, a little dismissive of user opinion. What sensible company would ... oh, wait.
10:08
@MisterMiyagi I like to think you have a big sign with "days since last world-destroying black hole: x". Keep up the good work :)
My bet is on "days since someone eating glue tried to split 500 TB of data into 10kB chunks"
When I was at Tesco they had a board in our office for "days since last unicycle accident". I thought it was a joke... nope. One of the guys had a unicycle and they used to all practice in the car park at lunch
@roganjosh Laurel
@holdenweb It is a private OS based on Free BSD, the node is packet listening device (Proprietory h/w), it acts as a bump in the network. Such boxs are used by service provider to implement regulatory packet dissection. There are multiple interfaces and most of them are for customer data to flow. Its own packet should not use those. Hence the question
user13415013
10:27
yes @roganjosh, i think i have somehow solved the problem
Glad to hear it
10:53
@roganjosh Nah, we're just collecting stamps. ;)
No black holes to see here. Move along.
Ahh, the old Aurora Borealis trick :P
 
1 hour later…
12:17
@roganjosh Watch it crumble...is there a library to have that automatically stream to youtube? I'm Lazy.
Probably. I think the trick is in catchy titles "You won't BELIEVE what this guy does. He had NO CHOICE but to be flabbergasted by his own decisions". You get that suggestion for free
Also, please don't do that :P
Just seemed like...for a batch of new userdata, somewhere between n+1 and 2n+1 execute statements is a lot.
Piddly. I wouldn't be surprised if setting up the connection takes more time, tbh.
Especially with SQLite because you don't even have a network to battle with
12:33
@roganjosh That library would need it's own twitter promoting the streams...
Thinking out loud...if I make several inserts as part of an executemany, then take that cursor's lastrowid, those inserts should be sequential, right? Or can multiple cursors be inserting at once such that each of their inserts won't have immediately sequential ids, despite being part of a single executemany?
Or is that dreaming in that sqlite might optimise and those INSERTS might not be in the sequence one would expect?
@toonarmycaptain I had pre-empted this, hence my original comment
5 hours ago, by roganjosh
@toonarmycaptain it isn't. You can cheat and get the ID of one row inserted into the table, and then just assume that the foreign key is a contiguous block of ints in the range of that ID to that ID +list length. Then watch it all crumble as soon as you have concurrent users :P
With SQLite I don't think it's possible because the transaction would lock the database for writes
For 5 seconds (the default) and that's quite a long time. But if you upgrade to anything else, I don't know how they process query queues
Fun fact: executemany in psycopg2 just does a load of individual transactions anyway, against sensibility. I'm gonna stress again how silly that line of thought is that I put in the comment, when it's translated to actual implementation
Is there some way to flag edits? I've seen a ~150 rep user adding information not known to them and fluff, e.g. ""not all my code is shown, the rest works fine" and "Thanks for your help."
@MisterMiyagi keep rejecting, and if it becomes recurring leave a custom mod flag pointing to some crap suggestions
adding the "thanks" message?
12:45
@roganjosh happens a lot
there should be one-week autobans for too many rejected edits meta.stackoverflow.com/questions/355721/…
@roganjosh I figured this was what you meant. I think I need to do some reading on how execute/executemany/cursor.commit all actually relate and function at the db end. My mental model is a little but assumptive and vague.
@toonarmycaptain if it were for postgres you can use extras.execute_batch but I think the bottom line that I'm trying to convey is that your code is as efficient as reasonably possible :)
@roganjosh Fair enough and thankyou. Somehow this is unsatisfying to my 'flatten the for-loop this is way too many db accesses' hindbrain.
I already know that feeling
13:00
Duly noted for postgres though :) Assuming psycopg2's implementation of execute_batch isn't borked like it is for executemany. Seems like a lot of wasted network-db time could be saved by making this more intuitive, as I'm sure I'm not the only one with such a conundrum. That said, I'm sure there's reasons all the way down why it doesn't function how I expect.
lol, you and your "reasons" :P
It'll take a second to dig up the github thread but I think they just went off-course
Heh, nope, I just had it in Google. here (zzzeek being the guy that started SQAlchemy)
13:32
@ArunodoyDasGupta At my office I had a case where I needed to generate network traffic as if it came from many different clients, so I created a number of pseudo-interfaces on a single client, and then spun up multiple test client processes, each using a different outbound interface. The bad news: this test required higher traffic activity than Python could generate, so the code was in C (cribbed from the example code that comes with libnfs).
13:45
I've been training similar neural networks my main box using Keras and PyTorch. I'm doing this while browsing the internet, etc. Anybody ever noticed a bunch spurious GPU memory allocation failures with Keras but not PyTorch.
13:58
hi
general question about password hashing ,so when a user creates a password the hashfucntion creates a hash of that password , and the hash is then stored in the database insted of the password correct ?
Yes
Aug 14 at 8:23, by roganjosh
@python_learner I use from werkzeug.security import check_password_hash, generate_password_hash for password hashing. You'll get something like pbkdf2:sha256:50000$t8eIOKts$902feab95d7255c22575b046ddb84aace4fef100f786d6c83747eec9a4bc44f2 where 50000 is the number of iterations and t8eIOKts is the salt
@roganjosh thanks for clarification, I thought first thought some one is trolling me when he talked about salt
There's pepper too, if you wanna go that far :P
14:16
:)
14:27
cbg folks
@roganjosh hi
Fair warning, @shyckh my patience is paper-thin today and I'm pretty sure (read: totally sure) that I've asked you not to ping people out of the blue
Hello all the same
 
2 hours later…
16:25
looks into the void anyone else got that Friday feeling?
16:36
cbg
@OldTinfoil you aren't alone :-)
 
1 hour later…
17:57
@OldTinfoil Do you find the void looking back? :p
18:27
That feeling you get when you spend 3 hours reading web pages Google-translated from Romanian and typing up an informative answer that's much clearer than the lousy Wikipedia page, only to have the question closed out from under you before you can submit...
Waiting for the weekend so I can play the game I waited a year for... I think I just saw the second hand go backwards for an instant
@Kevin What game?
Manifold Garden, the latest in a long line of somewhat pretentious puzzle games with noneuclidean mechanics a la Portal
The last one I played being Superliminal, which was decent but didn't quite nail the quirky feel they were trying to rip off of The Stanley Parable
Is that the one where you can resize objects with perspective?
Yeah.
18:33
Watching a playthrough video on YouTube. Disorienting a bit
I feel slightly misled by the beautiful Escher-esque landscapes in Manifold Garden's trailer, because the game itself is about 60% block pushing puzzles in rectangular rooms, and 40% beautiful Escher-esque landscapes in between the puzzles
I rather enjoyed that one, but it did feel a bit like a Stanley Parable knockoff. And later on it got too spoopy for me, so I dropped it
At least that's what the proportions are in the hour or so I've played so far
Superliminal does have a spooky chapter or two but it veers out of that into something more uplifting by the end
Have you played Antichamber?
Yes, I rather liked it
Can't remember if I 100%'d it, I think there was one double secret puzzle that I couldn't even find the location of
18:39
That one's an experience. Not exactly a lot of fun, but fascinating
Probably the best somewhat pretentious puzzle game I've played lately is The Witness, although it is (almost?) entirely euclidean
That Manifold Garden looks interesting... I like that the Steam description starts with "Rediscover gravity" - did we lose it at some point and no-one noticed? :p
isn't The Witness the one where you're left in an island with barely any help and you have to figure out every puzzle on your own?
or was that another one... I've only seen grumps on the internet
Yes, the mechanics of the puzzles are entirely unexplained
The only thing I know about The Witness is that its puzzles are all about drawing lines, which doesn't seem particularly intriguing
18:41
@Kevin but I trust your judgement way before any random internet person
@AndrasDeak sounds remarkably like the series "Lost"
I have great enthusiasm for line drawing puzzles, so factor that into your estimation
Oh... that reminds me... time to just go purchase the new free games on epicgames even if I'm never going to download/play them...
I've probably put more hours into Slither Link than any other video game
There's an android game called Euclidea that needs you to solve ruler-and-compass geometry tasks. It needs a special kind of mind to enjoy that :P
18:44
Grumps on the Internet might be annoyed that most of The Witness' puzzles aren't particularly integrated into the environment. Like, you'll be walking through a forest, and then there's a metal panel with a puzzle on it.
Woohooo... apparently "Into The Breach" is free on 3rd September... by the guys that did FTL and that was enjoyable enough, and I've read favourable reviews for it, so that's something to look forward to
@AndrasDeak "special kind of mind" - as in the sort that means the rest of society thinks you'll probably be happier in a padded room and a tight fitting jacket? :p
I can understand a grump reading a bunch of reviews gushing about the lush landscape and then finding themselves spending most of their time looking at grids
@JonClements that reminds me of a joke...
hi guys does anyone here know much about queues?
@Kevin I wouldn't mind that
18:45
@erotavlas Yes
(by queues I mean those in cloud providers like amazon or azure)
we have a few Brits...
Oh, then no
so message queues
oh ok
@AndrasDeak handy to have a few experts about hey? :p
18:47
@AndrasDeak you're suggesting we know about queues? (We're experts)
well anyway I'll ask regardless - say you have loads of files being sent by a client for processing and your using a message queue to buffer the load - is the message separate form the file (i.e. does the file get sotored somewhere else)
The only thing I remember about the Hitchhiker's Guide film is Arthur's line, "Leave this to me. I'm British, I know how to queue"
i mean do you send the file inside the message to the queue or is the queue just recceiving a marker like an ID for you to locate the file somewhere else
And here I thought the joke was that Brits are experts with clouds
Queues. We do queues.
18:50
you generally don't want large amount of data in the messages that the queue uses itself and there's generally limits on the total size of a message that can be submitted to a queue... the general approach is you store any significant data elsewhere but with enough info. to retrieve it
@AndrasDeak I've tried a couple games like that, where you need to e.g. bisect an angle or whatever. They tend to be a bit janky in the later levels, where I think I've solved it but accumulated error in the simulation makes it think I'm a tenth of a degree off
@JonClements thanks, thats what I was thinking but just wanted to make sure I was on the right track on how it is used
I wonder how hard it would be to make a simulation like that, with infinite precision... How would you handle irrationals? Is it even possible to make a line of irrational length with a compass and straightedge?
(supposing you start with a line segment of length 1, for reference)
@erotavlas yeah - it's definitely best to keep the messages themselves as small as possible... if it's maybe a couple of kilobytes or that kind of level, then it's generally not a big deal, but obviously if you've got something like a 20mb image file, you'd definitely store that somewhere and just put a reference to it in the message so that whatever worker picks it up can use that to retrieve the actual data
@Kevin Euclidea works like a charm. You can even move the reference points around, it uses some dark magic to work exactly
18:56
@JonClements so my company is using queues wrong for sure then, we have an application for processing text based reports and they are putting the entire report into the queue - needless to say they have encountered several times in the past instances where the queue couldn't accept reports over a certain size
I guess you can get sqrt(2) if you construct a right triangle with leg lengths of 1...
I wonder if you can get a line of length pi, or e
@erotavlas yeah - that doesn't sound good... on AWS for instance you'd put the source data in an S3 bucket and then the consumer uses a reference for that object to get the actual content. Amazon SES works for instance is that you can store replies to emails sent, but those replies get stored in S3, and you get (generally via SNS) a notification that you have a reply and some meta data about it, and a link to get the content of the email - that content just isn't sent in the notification
Apparently pi is not constructible because it's transcendental. Alas.
@Kevin not in finite steps
@Kevin yeah
I'm going to make a killing in the straightedge manufacturing business because I'll put a little tickmark where pi is
19:03
Archimedes would be so mad if we had a way to construct a line of length pi
I'm not scared of Archimedes, he's way over in Greece. Wait, he's got a really big lever, what's he doing with [CARRIER LOST]
19:14
Hello. How can I see the internal code of this function (mpmath.org/doc/current/functions/bessel.html#mpmath.besseljzero)?
Free libraries often host their source code on github and provide a link on their front page
Found it.
besseljzero appears to be implemented at github.com/fredrik-johansson/mpmath/blob/…
Yeah. Ty!
Gotta love functions that have a hundred and nine lines of documentation and one line of code
19:19
hahaha
math is fun, Kevin.
I prefer to admire it from a safe distance
hahaha
19:59
@Kevin And 2200 years in the past? That's some lever.
he meant a firm 4d place to stand on
I'm sure we can find something for him to stand on around in under.. in
20:19
we are not resting on the earth, the earth is resting on us
Is that a genuine quote? I'm not sure how I'm supposed the feel or think about it
no i just made it up
Thank goodness for the moon for taking up some slack
 
3 hours later…
ASH
ASH
23:30
Hi there,
Any Django fans here?
23:41
Django fan but also a flask fan
whats up

« first day (3604 days earlier)      last day (1569 days later) »