« first day (3099 days earlier)      last day (1850 days later) » 

12:21 AM
waow, two nondescript green blobs talking to each other
 
it's what we do
 
hmm, bulletin board feels a bit spammy these days. For example, this... is it really important for people to see this? I don't recall them making threads for the other 678 valued associates.
 
I think he's a token "look we're not all just computer nerds here" person
LARP and Harry Potter, interesting choice
 
 
1 hour later…
1:33 AM
@AndrasDeak worked fine. Thank you !!!
 
 
3 hours later…
4:11 AM
I accepted the nominated duplicate because it probably constitutes required reading for solving this problem. If you think it's not enough, please ping me (or another Python gold badge holder) to remove the duplicate marking and perhaps find a better one. — tripleee 15 secs ago
very quick backlash
@TomKarzes Thanks for the feedback; I removed the duplicate then. I'm afraid this exercise also removed your vote to close for other reasons /-: (I guess too broad?) — tripleee 18 secs ago
 
4:48 AM
@AndrasDeak Speaking of Harry Potter, JKR has been tweeting out some rather questionable plot extensions to the original story for a while
 
 
1 hour later…
5:58 AM
 
cbg
OOP Design Advice:

I have a class GoogleSearch, to which I can search on specific site, or simple keywords.
It involves Taking a query from user, validating it and then searching it.

I since my parsing logic would be different for different scenarios, I was thinking to use polymorphism and create a site specific class in which only parse() would be reimplemented.

Is this correct? What else can be done here?
 
Sounds like a reasonable solution to me, though "my parsing logic would be different for different scenarios" is not exactly a fantastic description of the problem. Maybe a strategy pattern would be a better solution. Hard to say.
 
Good morning..I am Geekdroid new to this room.. Nice to meet you all..
 
6:19 AM
hello, welcome
 
@MayurBhangale many search sites search with the q parameter, many don't and require extra parameters to be passed, so your class can and will require some extra logic for each site, it's not just parsing logic that will differ
 
@LFLFM True, But as of now I'm only concerned with Google Search
 
I build a small component once to use a single text box on a page to search different sites and translations etc (eg. bing/google/yahoo/worlfram/gmaps/bingmaps/gpictures etc...).
What I did there was have all the different requirements for each site in hidden fields on the page and the final submit had the logic to pick where the query would go and which hidden fields to actually include with what little logic was required for them (if any other than some hardcodes)
yes, you're right to start with one and go from there; of course.... :)
and I agree with your approach to have the different sites to inherit the base site class
I'm merely giving you a heads up to the different parameters that you might need to take into consideration... just keep those in mind (even for google only, there are several options to the q search)
 
@LFLFM I'll definitely consider your suggestion. Thank you!
 
stackoverflow.com/a/55625971 arbitrary sql injection
 
6:36 AM
Sounds like the OP is asking how to accept and execute arbitrary SQL queries to me
 
they have some predefined set and want to choose which to run
need to add a dupe for variable variables to complete the dupe set
the canon delivers once again: sopython.com/canon/130/…
 
Do we have a duplicate for "what does a, b = x, y mean?" questions? I've found a bunch of related questions ("how exactly does a, b = b,a work internally", "is there a difference between a, b = b, a and a = b; b = a", etc), but nothing that simply asks "what does this mean/do"
 
7:02 AM
is logging in python asynchronous ?
this is a silly question but i have doubt
 
I'm pretty sure it isn't anychronous
By "asynchronous", do you mean that calling the logger would start a thread that does the logging instead of blocking the current one?
 
7:33 AM
@PM2Ring thanks :) that is faster
 
user7437554
Hi guys, I'm writing this simple code:
 
user7437554
def donuts(count):
  s='Number of donuts: '
  if count<=10:
    print s + str(count)
  else:
    print s + 'many'
  return
 
user7437554
but when I call the funtion as donuts(5), for example, it returns an error
 
user7437554
name 'donuts' is not defined, why it is so?
 
7:48 AM
Seems to work just fine: repl.it/repls/LightEachArgument
(on an unrelated note, try to write code with python3 if you can, not python2)
You probably need to import the function to wherever you are calling it. If they are in the same file (and the function definition before the function call), it works.
 
user7437554
Thanks @Arne Hmm, I dont understand very well
 
user7437554
I don' t know what's the difference between python3 and 2
 
user7437554
I defined the function in a python environment, and when trying to use it, it returns that error
 
@santimirandarp Did you write it into a file, or did you write it in an interactive python session?
@santimirandarp python2 is just an older version of python, that's all. you'll probably hear about the differences to python3 sooner or later, and when that time comes just remember that iin 99.9% of all cases there is no good reason to work with python2
 
@arne
I am assuming the logging parameter will send to handler and rest will work in background. in the same time, other work will come to that handler new thread will be created
 
8:12 AM
Unless you write a handler yourself that handles the message with async, each of them (the standard library handlers) will be blocking
 
user7437554
@Arne interactive python session
 
@HardikGajjar I spoke too soon, there is a QueueHandler, which you can set up with a QueueListener in another process or thread.
@santimirandarp Kind of hard to say what goes wrong in that case. If you type what you sent here line by line in the same interactive session it should just work...
 
user7437554
@arne damn. Fine. thanks a lot anyways
 
8:30 AM
@HardikGajjar The QueueHandler makes a lot of sense, design wise. I can see why you'd want to avoid having things like file writes blocking your main thread, but starting a new thread or even process for every log message is way too expensive for most use cases where you have easily a couple dozen log messages every second. Having a daemon that is just in charge of logging seems much more reasonable.
 
@GeekDroid hello, you were here at the end of March but I'm happy to act as if that hadn't happened :P Welcome!
also cbg
 
cbg =)
 
cbg
 
8:45 AM
I'm getting a SyntaxError on the following:
return name</string:name>
^
SyntaxError: invalid syntax

Coming from the following tutorial: https://pythonspot.com/flask-web-app-with-python/ is the tutorial wrong?
 
Yep, it is
 
Ooh that's fun :)
 
uuuugh
from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
return "Hello World!"

if __name__ == "__main__":
app.run()
sic ^
 
That works, its the Creating URL routes that doesnt function
 
"I don't even know how indentation works but I'll write a python tutorial to be sure" :P
@mtbrands that contains at least two syntax errors
 
8:49 AM
stackoverflow.com/q/55628232/1222951 dupe or no MCVE, you decide
 
I'm sensing I should ditch this tutorial
 
sounds like a good idea to me
 
good sense
semantic problems and anti-patterns won't get caught by your interpreter
 
As a beginner is hard to tell what's good and what's bad. Just learned again haha
 
I recall my grandmother-in-law who when heard that there's pseudoscience and conspiracy theories galore on youtube said "but they wouldn't let people say lies, would they?"
@mtbrands yeah, better to look for a reliable source for a good source first
if you want to learn flask, have you considered the official flask tutorial?
official is often best, at least it's usually not wrong
 
8:52 AM
@Aran-Fey I hammered it
 
Funnily enough I didn't, got pointed to this one by a colleague. Let me facepalm for a minute
 
@mtbrands That's a bad tutorial, ugh, even bad indentation...
 
@U9-Forward that's the point :P
@mtbrands ah, got below the radar. Shame on the coworker :P
 
@AndrasDeak Yeah
 
I'll be sure to let him know haha
 
8:59 AM
Day of Poetry in Hungary today, and google doesn't have a fancy logo. I'm offended!
(I don't even use google)
 
maybe google's offended.
 
@AndrasDeak Yeah, strange
 
9:12 AM
@arne We are using 2.7 so we have implemented multiprocessing queue. But some how thread is not stopping whene Django send stopping signals
 
thread or process? or are you mixing both?
 
And how are those "stopping signals" implemented? That's not something standard, right?
 
> We are using 2.7
tapping out right there =D
Also, 2.7 doesn't have the QueueHandler, it's python3 only
 
9:31 AM
So our product is so big. as of now we cannot go with 3.X. Can we do QueueHandler like thing with 2.7 ?
 
@PearlySpencer wrong room
 
user8682794
@AndrasDeak oops sorry. lack of caffeine evident.
 
No worries
 
@PM2Ring No worries :). I was trying set a timeout for a db that calls close automatically without using class
```

@contextlib.context_manager
def get_connection():
threading.Timer(30, some_func_calls_close_on_conn)
// Get an instance of db connection conn
yield conn
conn.close()
```
 
You can't mix code and non-code in a single chat message
 
9:40 AM
@HardikGajjar Sure. You can log to syslog instead. I think I even read an article not too long ago that said as much as "all (python) loggers that want you to configure rotating file handles are crap, just use syslog"
 
What if the path ends with a space, though? You'll end up stripping that, as well. — Aran-Fey 17 mins ago
thanks, Satan
 
It's always annoying that when someone down-votes, but doesn't day anything, and when i edit for my mistake, i can't know who down-voted and can't tell them that i edited it, or when i edit, and they also comment for there down-vote, but they don't check there SO account for inbox and don't undo it...
 
oh hey
yeah, i just move on at that point. there's no point worrying over it
 
yup
 
9:53 AM
@ParitoshSingh That's true, thanks for the up-vote
 
@AndrasDeak It's a valid concern, isn't it?
 
no worries, the edit deserved it
 
@Aran-Fey I guess it is but having whitespace (and trailing whitespace at that!) in a path is a crime of its own :D
 
Well, considering that this is SO, I don't want to have any answers with subtle bugs. We want the answer to be useful to people who aren't working with file paths as well, after all.
 
Not asking you to vote
 
9:58 AM
@Aran-Fey yeah, it's an honourable effort, I just cringed at the possibility you're anticipating
@U9-Forward then don't
 
@AndrasDeak Thanks for saying that
 
You seem to have an unreasonable dislike for links to answers, Andras
 
That is true. I hate anything that looks like fishing for upvotes.
"oh look here's an answer I like and I need 3 more votes on it" looks like fishing for upvotes
 
10:30 AM
even though it may not be intended as such :)
Looks can be deceiving...
 
11:15 AM
Hi
Can someone help me on a problem?
 
Hello, we can try
 
Can I divide a random input by a regular expression?
 
I don't understand the question. Please provide a small example of what you mean.
 
Say I have a random input like 799
I want to divide it by every possible combinations of 4 and 7(till its a last three digit combination in this case) as well as 4 and 7 and see if the remainder is 0 or not
 
What do you mean "every possible combinations of 4 and 7"?
And do you want to divide as a string or divide as an integer number?
 
11:27 AM
as an integer number and by every possible combinations like 47, 74, 477, 774 etc.
 
that has nothing to do with regular expressions
 
How do I approach it then? @Aran-Fey
 
I don't understand what you want but yeah, no regex
what has 47, 74, 477, 774 etc have to do with 799?
Show a proper example, with an input and expected output.
 
It has to be divisible by 4 or 7 or any combination of 4 or 7
Like 799 is divisible by 47
 
oops, it is
 
11:29 AM
yeah 47 * 17
 
I messed up my quick factor loop, sorry
oh yeah, I ran it on 779, pfft
So for a given number you want to find all its divisors the digits of which only contain 4 and 7?
 
Not find divisors , just print 'YES' if it is divisible by 4 or 7 or any combination of 4 and 7
else 'NO'
 
I see. That's straightfroward enough.
Loop over every possible combination of digits of 4 and 7, concatenate them and turn into the corresponding number, see if the number divides the input.
 
Surprisingly enough, I can't find a SO post about generating combinations with replacement of varying length
 
You'll first need a loop over number of digits of your testing number, then for the given number of digits you need to loop over the Cartesian product of 4 and 7.
it will probably contain itertools.product([4, 7], repeat=number_of_digits)
 
11:38 AM
how will I convert that back into number to divide the input?
I tried a generator expression [''.join(i) for i in lst] but I think this won't work right?
 
oops, sorry, I meant itertools.product(['4', '7'], repeat=number_of_digits)
@RaphX if i comes from the product then that's almost it, you still need to convert the string to an integer with int()
 
Its not working @AndrasDeak
I can't convert it back to int
TypeError: int() argument must be a string, a bytes-like object or a number, not 'itertools.product'
Tried by making it a list first too
Should I try the map function?
 
No
you probably don't want to keep all the numbers in memory, so just loop over the product one by one
In [221]: for comb in itertools.product(['4', '7'], repeat=3):
     ...:     print(int(''.join(comb)))
444
447
474
477
744
747
774
777
the corresponding list comp would be [int(''.join(comb)) for comb in itertools.product(...)]
the point is to join and convert each combination on its own
 
11:54 AM
@Aran-Fey I'm surprised. ;) But I'm not motivated enough right now to look for one. OTOH, I get a vague feeling I may have written one...
 
I tried this :
import itertools
n = input()
count = len(n)
n = int(n)
a = list((itertools.product([4, 7], repeat=count)))
for y in a:
b = ''.join(y)
print(b)
if n % int(b) == 0 or n % 7 == 0 or n % 4 == 0:
print('YES')
else:
print('NO')
Why is it not working?
b = ''.join(y)
TypeError: sequence item 0: expected str instance, int found
That is the error message
 
@taritgoswami I'm glad it's faster. I still haven't thought of a better algorithm. I'm hoping my subconscious turns up something. Is this a task from a puzzle or coder challenge site?
@RaphX Please stop posting unformatted code here.
 
ok
sorry
 
20 mins ago, by Andras Deak
oops, sorry, I meant itertools.product(['4', '7'], repeat=number_of_digits)
note the quotes
also this will only catch three-digits divisors for three-digit input, whereas you probably want every possible divisor
 
yeah
 
12:03 PM
here's a quick guide to formatting multiline code in chat
 
Thanks@AndrasDeak for the formatting guide
@AndrasDeak I could then loop from 1 to the number taken as input just as we do in the case of prime numbers
 
yup, or maybe no
 
Will that work?
 
what you have (with the error fixed) is almost complete, you just need to loop with the number of digits from 1 to count
 
and here a guide to talk salad language
 
12:07 PM
@Neoares nobody asked for that though
 
:D
 
:D
 
Once you have a working version you could try pre-computing the divisors of the number (in a set), and filtering the possible divisors based on that. I suspect that starts to become more efficient as the number of potential divisors starts to grow.
and the next step is storing only those divisors of your number that contain 4 and 7 as digits
 
Thanks@AndrasDeak
Btw just out of curiosity, when will I be able to upload things here as that guide shows?
Also, I don't see any fixed font button, when will that be available either?
 
Fixed font button appears for multiline input. Images come at some reputation threshold, I'm not sure which.
 
12:18 PM
cool
 
and you can always practice in the sandbox room
 
I am there right now
Is CapricaSix a bot there?
 
I'm under the impression that CapricaSix is a bot no matter where she is.
 
yes, she is
 
I'm becoming increasingly self-conscious that the formatting guide is poorly formatted because it's quite often that people read the page and then ask a question that the page is supposed to answer
 
12:25 PM
we need to filter that impression considering how much attention the given user has given the guide
 
I think the instructional text can get a little lost in between the illustrations. Maybe I should try adding a border around them.
 
could the headlines be smaller? I find it hard to use because the big text prevents you from looking at an entire subsection at the same time (the size of the images contributes too, of course)
the giant on-screen keyboard is probably the easiest to fix and that would go a long way already
 
I have about as much style control as one has when composing a post on the main site. Same markdown engine.
 
all the dancing animations are kind of distracting too, is there an easy way to have e.g. a play button on each? (that would not work with plain gifs of course)
 
that's probably a "no"
 
12:33 PM
Fancier things are possible if you are willing to make PRs to the SOPython repository
I don't hate the idea of the images initially being hidden and then revealed by a "show example" button
 
@Kevin Did you see tarit goswami's palindrome problem? Aran-Fey had a go, and I had a few ideas that didn't pan out, so I ended up writing a brute-force solution. I was hoping you might think of something clever. :)
@tripleee Disguise it as a Code Snippet for a HTML / CSS / JavaScript question on the main site. :)
 
I'll take a look after I'm done yelling at imagemagick for not having an out-of-the-box "add border to this image" command. No, imagemagick.org/Usage/crop/#border doesn't count. That's like three whole parameters.
I demand a feature that looks like magick --addblackborderwithathicknessoftenpixels
 
you're spoiled
 
@PM2Ring hmmmm, that ... could perhaps work
 
12:47 PM
@Kevin In NetPBM, you'd use pad. And IIRC, it's easy in Pillow, but I forget what they name it. IMHO, crop operations should take positive & negative margin widths.
 
I.M. is essentially doing exactly what I asked of it - adding a black border around every frame of my gif. Too bad that not all of the frames are the same size.
@PM2Ring My first crack at it with PIL was partially successful in that it added the border, but erased every frame other than the first one.
I'm pretty sure IM has a "blow up every frame of this gif to the same size" command exactly for problems like this one. Just gotta find it among the zillions of other switches.
 
I don't trust PIL, or most other things, to always handle GIF anims properly. So I usually do stuff semi-manually, by using good old gifsicle to split & recombine the frames.
 
I'm also in the habit of half-manually doing this kind of thing. But if I'm going to borderize all ~10 gifs in the formatting guide, it'll be worth it to get things as non-manual as possible.
Hmm, coalesce probably does something...
I think that worked. magick convert 4IeiKzF.gif -coalesce -bordercolor Black -border 10x10 result.gif
It dectupled the file size though. Where's the "un-explode all the frames" command...
 
@Kevin IM is amazingly powerful, but it's so easy to get lost among all the options. I have used it a bit, along with its convert & display utilities, but not enough to easily navigate the docs, or even the help forum. That's why I like NetPBM, which uses the ancient Unix model of a family of related but separate programs that have fairly clear separation of duties.
 
github.com/kms70847/Animation/blob/master/lib/animation/… uses -layers optimize. Thanks, past self.
 
1:02 PM
@Kevin Did that get the filesize roughly down to where it was before the borders?
 
I have a function
def get_new_line(self, old_line, d):
return re.sub(self.pattern, lambda m: self.gen_ip_alias(m.group(0), d), old_line)

I want to override multiple patterns in a single pass. Could I in some way have multiple patterns in self.pattern AND know which of the specific patterns I got a match on?
 
@PM2Ring Original is 18.8 KB, borderized is 55.5 KB. The un-optimized borderized was something like 300 KB.
 
user7437554
Guys, is the next idea wrong? I want to replace a letter in a word
 
user7437554
def fix_start(s):
for letter in s:
s.replace('s','a')
return
fix_start('santisgo')
 
@Jonaswg It's possible, but it's not pretty. You're much better off doing multiple re.sub calls.
 
1:05 PM
18 -> 55 hardly seems optimal. The only frame that absolutely needs to change is the first one.
@santimirandarp .replace does nothing if you don't do something with the result. Try s = s.replace('s', 'a')
 
@santimirandarp yeah, it's wrong. Strings are immutable.
 
user7437554
immutable?
 
user7437554
def fix_start(s):
  snew = s.replace('s','a')
  return
fix_start('santisgo')
 
@Aran-Fey Issue is that performance takes a big hit with mutliple passes.
Could it be that I will have to take that performance hit regardless?
 
user7437554
(modified version)
 
1:08 PM
@santimirandarp better, but no
 
In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created. In some cases, an object is considered immutable even if some internally used attributes change, but the object's state appears unchanging from an external point of view. For example, an object that uses memoization to cache the results of expensive computations could still be considered an immutable object. Strings and other concrete objects...
 
you probably want to return snew; this doesn't modify s
 
you're returning None and ninjad ^
return the new string and rebind the return value on the calling side
 
@Jonaswg I don't see why that would negatively affect the performance. If you have multiple re.sub calls, that'll loop over the string n times in total. If you merge all the patterns into one, the regex engine will attempt to match n different patterns at each character in the string. Either way it's n * len(string).
 
@Kevin Ok. That's not so bad. And at least it's not megabytes. :) There might be a way to reduce it further, using GIF's various frame disposal options, but not all GIF viewers understand those options correctly, so you end up with horrible artifacts.
 
1:22 PM
cbg all
 
@Jonaswg What Aran-Fey said. It might be a little faster, it could even be slower, if the patterns aren't just fixed strings. And the resulting regex will be harder to read, and so will the code. Doing multiple passes that take a few seconds longer is better than spending hours debugging confusing code that you barely understand. ;)
 
I'm worried that multiple passes of string substitution will lead to undesirable effects. Suppose you want to replace A with B and B with C. If you do it in two passes, "A" will become "C".
Amusingly, this observation applies to both santimirandarp's problem and Jonaswg's problem
 
@PM2Ring Sure for a couple I would but I am looking at 100 million calls
 
good day all
Can I ask Django related questions here?
 
@Jonaswg over what kind of time period? are you sure you should be using Python?
 
1:28 PM
@ConnelBLAZE hello, yeah, ask away
 
@Jonaswg Ah. Ok. What are your patterns like?
 
@Kevin IP addresses, MAC addresses and other similar stuff
 
@AndrasDeak okay.
Just want to know if the admin won't get mad
 
@tripleee I would use something else but managers say I have to use python..
 
I'm dealing with NoReverseMatch and it's been frustrating enough
 
1:29 PM
@ConnelBLAZE If you want to make sure read our rules but asking is fine as long as it's python and not something that's been asked on SO main in the last 2 days.
@Jonaswg please format your code, see also the formatting guide
 
def get_new_line(self, old_line, d):
    return re.sub(self.pattern, lambda m: self.gen_ip_alias(m.group(0), d), old_line)
 
The gen_ip_alias function checks the pattern matched in a dict and generates a new alias if none exists for that specific match
 
@Jonaswg You could combine all of your patterns into one pattern, and identify each sub-pattern with a named group. Then the replacement function can examine the match object to determine which named group was captured. Example.
 
how confident are you that the regex(es?) you use are safe and efficient?
 
1:37 PM
Quite. They have been used several times at my company by others
In telco software
 
@wim (old 3/2017 comment of yours) "...and store it in a variable in Python" is redundant, where else would we store it? Anyway that question's not a generalizable resource, it's just asking for a specialized regex.
 
@Kevin This looks interesting. Let me have a try, thanks.
 
@Jonaswg Is this the same search & replace problem you were talking about the other day? chat.stackoverflow.com/transcript/message/45881103#45881103
 
@PM2Ring Yes...
 
2:05 PM
There, I've added a screaming red border around the images in the formatting guide. Hopefully that makes it easier to distinguish the gifs from the text.
 
it does scream, as advertised
 
I think I'll smallify the headers while I'm in here
 
giant text saying, "Use ctrl-K"
 
cabbage
Has anyone worked with numpy before?
If so, it is require to know anything beyond basic maths (arithmetic) to use or understand numpy?
 
I have about three hours of experience with numpy. From what I can tell, the amount of math knowledge you need is equal to the complexity of the thing you are trying to do.
Adding two arrays requires knowledge about adding. Taking the fourier transform of an array requires knowledge about fourier transforms.
 
2:19 PM
You need some linear algebra to understand the dot product (matrix multiplication), one of the strong suits of numpy
 
2:34 PM
Oh man, that Java HNQ... they upvote this spaghetti and downvote the sanest answer?!
 
That's it! From now on, I'm going to format my code to look like a Christmas Tree.
 
I'm not qualified to critique Java, but that spaghetti definitely isn't DRY, although maybe the compiler can optimize that to some degree. And I guess the sane answer uses an exception, and they aren't as (relatively) efficient as Python exceptions are, so are only used in truly exceptional circumstances. But as I said, I don't know Java, so I can't accurately judge these things.
 
2:50 PM
I think what they're worried about is not the efficiency of exceptions, but the possibility of accidentally catching an exception that was thrown inside one of the getter methods. Which is reasonable enough, but even so that's by far the most readable solution.
 
@samayo It's very helpful to have a solid knowledge of core Python before you try to master Numpy.
@Aran-Fey Maybe, but the OP is lumping all of those null cases together, so I don't think they'd care too much about a null they weren't expecting.
 
3:06 PM
Ah, didn't see the responses. I was on break
But thanks to everyone who responded.
I have to learn about Algebra and linear algebra now
 
I just heard a great new blues harmonica song about Paterson, New Jersey. Sounds like a pretty tough town. ;) I just had a quick look at its Wikipedia page, which tends to confirm that impression.
@samayo No worries. Numpy is used for number crunching, so if you understand your number problem, and the maths necessary to solve it, you shouldn't have much trouble implementing the algorithm in Numpy, once you understand its main principles. But it's a big library, so it takes a while to become familiar with all of its features.
 
@tripleee I've tried modifying the images at sopython.com/wiki/… so they start out minimized. How's that?
 
@PM2Ring Thanks. Btw, do you think I should learn first about Matrix or Agebra?
Which one is easiest, or should come first?
 
IIRC, @Kevin lives at the opposite end of New Jersey to Paterson, which is probably a healthy choice. ;)
 
We of the South Jersey don't go into the north without hazmat gear
 
3:18 PM
Despite having driven across the State, although not getting off the turnpike, the most I know about it is probably Bon Jovi...
 
@samayo Matrices & Linear Algebra are intimately related. Linear Alg can get very abstract, though, and you can learn useful practical stuff about matrices without knowing much Linear Alg. Eg, you can use them for solving simultaneous equations, and for doing transformations in 3D geometry.
Many people find it easier to learn stuff that they can do practical calculations with, that are easy to test out. Learning about abstract vector spaces in isolation can be a bit, well, abstract. :) But some people thrive on the purity of hard-core abstraction.
 
If anyone is using Firefox and sees weird rendering problems in sopython.com/wiki/…, let me know... I'm trying to figure out if it's just a problem on my machine.
 
The first GIF looks particularly grainy (Chrome)
 
it does look like it has chicken pox on firefox
 
@vaultah Yeah. It's got horrible Floyd-Steinberg dithering.
 
3:26 PM
you know it's serious when it has a name
 
Two names (so doubly serious)
 
The dithering might be a result of the imagemagick operations I did this morning... Maybe I should revert them.
 
@PM2Ring Thanks. I lost my mind to visualize a simple matrix table given to me by my instructor, thinking it was like mysql table and rows. I only discovered it was in its own another subject
Back to learning maths again, I guess YAY :/
 
the basics of linear algebra aren't too difficult at least
 
Ok, I reverted to the versions from before this morning. There's still dithering, but it's less prominent (on my machine).
 
3:32 PM
Floyd-Steinberg is extremely common, and it's probably the most popular error-diffusion / dithering algorithm. That chicken pox problem can often be fixed by judicious juggling of the base palette colours. Or quantizing the original image colours so that F-S doesn't use heavily contrasting colours when it tries to represent a colour not in the base palette.
 
Now the image quality should be precisely as good as it was before I made any changes today.
 
yup, looks better
 
@Kevin I don't see any images. So pretty terrible.
 
Perhaps this is a silly question: did you click on any of the "Example" links?
 
I've decided that I will no longer accept "Works like a charm" as a compliment.
 
3:39 PM
@Kevin It is not a silly question, but yes, and all I saw was a placeholder (which is what I presumed the links were in the first place, just rendered like links). I may be a less useful test case as imgur appears to be blocked by my employer. Of course, so might another user seeking that information.
 
@Kevin Yep. It looks mostly ok on my phone, in the Samsung browser, which I assume is a fork of Chrome. Of course, that page is a bit unwieldy on a phone. :) OTOH, most of that info isn't relevant to people using Chat on a mobile touchscreen device.
 
@piRSquared How about..."Works like transfiguration?"
 
@Kevin that's looking very good -- thanks!
 
@toonarmycaptain imo both represent some mystical inner workings. I'd rather get "Works like a self documented robust process"
 
I wonder if there should be some prodding for people to click the examples on firefox
 
3:44 PM
@toonarmycaptain The images are all hosted on imgur, so it would make sense that they wouldn't render for you. There isn't much I can do about that. Still, it's a good data point that styling the twisties like links isn't the best way to indicate they're actionable.
 
One relatively new colour quantiztion algorithm which can be quite impressive is NeuQuant. I've used it to convert 24 bit colour images to 256 colour. I've also used it in conjunction with various other techniques, eg use NewQuant to make a palette, and then use my own custom dithering algorithm to produce the final image.
 
They're supposed to have a little triangle which is a semi-universal signal for "click me to make something happen" but bootstrap is interfering in a hard-to-fix way
Or possibly an easy to fix if you're smarter than Kevin way
 
poor man's solution: "click for example" or something like that
 
Yeah :-/
 
3:46 PM
I get the triangles on Samsung.
 
The triangles do appear on Chrome and I assume many other non-FF browsers
 
mobile firefox looks the same as desktop
 
@piRSquared "Positively Dumbledorian" probably doesn't jive well either then... "Works like Weatherwax"?
@Kevin Is there a reason to not simply display the images, are they long?
 
that was square 1
3 hours ago, by tripleee
all the dancing animations are kind of distracting too, is there an easy way to have e.g. a play button on each? (that would not work with plain gifs of course)
 
@toonarmycaptain They're pretty large, and they contain a lot of text that makes it confusing as to what parts of the page are images and what parts are actual content
 
3:48 PM
@Kevin I don't insist, I'm told firefox is getting negligible on the market
 
I've removed the link styling from the summaries, and changed the text to "click for example". Ideally I'll also be able to make the triangle appear.
 
I won't bother testing it on my ancient Firefox. It doesn't cope well on modern sites. Yesterday, I discovered it no longer handles most stack exchange buttons, apart from simple links. So I can't expand comment lists to see the hidden comments. I can't even vote on questions, answers, or comments. :(
 
@Kevin I didn't mind the link style, now it looks weird. Anyway, rbrb for a pupper while
 
what is this "Firebox" you guys keep talking about?
 
Because the point of these modifications was to reduce the number of new users who view the "formatting multi-line code" page and still do no format code correctly, I would like to reiterate the importance of emphasizing ctrl-V followed by ctrl-K. Is any other formatting information more important than that?
 
3:53 PM
Firefox has ostensibly supported <details> since v49. My hope is that for older versions it simply renders the contents unconditionally.
That's what IE does at least.
@Dodge I can rearrange things so ctrl-k is more prominent.
 
Hello Everyone
actually i have a question which is :
Is Dejangi framework is better in building a website than React.js ?
 
@Dodge Good point. Maybe we need a bare-bones formatting essentials in basic HTML that links to the full animated tutorial.
 
@Kevin I would do this myself but I'm a little embarrassed to admit that I have never made a pull request before and will probably just screw things up. I get cloning the repository locally but am not sure why I need to do pip install -e '.[dev]' as is suggested on the readme on github...
Anyway, the ctrl-K thing is what made my life much easier, with respect to code formatting in chat
 

« first day (3099 days earlier)      last day (1850 days later) »