« first day (1103 days earlier)      last day (2152 days later) » 

12:38 AM
I can't believe that one of my family members, after bragging about how secure they were, clicked on a "clean my mac" popup, and now has some exotic virus! Oh, and they haven't updated macOS versions in 3 years... And now I have to learn how to remove a virus on macOS, so I can take to the apple store and get them to reinstall macOS. Anyone know any good antivirus programs for mac?
 
factory reset, that's the only way to be sure
 
I know, I'm going to do that, but they just can't cope without their (non-backed-up) files, so I'm trying to relieve symptoms for now. I'm going to do a factory reset as soon as they'll allow.
 
How do they know those files did not get infected?
 
I know, I'm not copying the files anywhere, they just want to manually retype some of them, and just look at others for reference.
I know the advice "Nuke it from orbit" for this info-sec.se question
 
Understood
 
12:45 AM
My goal is just to find an antivirus which will relieve symptoms for a while before I can get to do I factory reset.
 
user5870134
1:25 AM
@thesecretmaster OMG... That sounds just like my dad, sometimes he brags about how secure his computer is, but goes nuts when it gets a virus 😄
 
user5870134
I did some testing and just found out that if you run jQuery (non-minified version) through jshint & jstidy you not only get a clean(er) version of jQuery, but you remove about 1840 lines from the file (mostly white-space, the script was 8108 lines before and now it's 6268 lines, so 8108-6268=1840). Also if you remove the comments, then you'll be removing an extra ~2.8 THOUSAND lines. That leaves you with ~4000 lines of code compared to the original 8.1 THOUSAND.
 
user5870134
> Tidy & Lint your code people its totally worth it, regardless of the language.
 
user5870134
OK. That's it for me, good night guys.
 
 
7 hours later…
2:37 PM
Morning everyone!
 
Good morning.
 
2:53 PM
I had never setup a load-balancer and things like that! I'm learning a lot !
 
Awesome! What are you using for your load balancer?
 
KEMP
 
Enterprise level hardware is always intriguing to me.
Not sure if its the high performance, the sweet blade form factor, or something else
 
user5870134
Morning everyone!
 
Howdy Mango
 
user5870134
2:58 PM
Hello @Jared, how are you doing?
 
Doing well, nothing to complain about so far :D
 
I'm busy ripping out some horrible hacks, and it's difficult because the hacks are... well, horrible. But it'll be worth it.
 
This is such a good feeling after when you clean up a large piece of horrible stuff!
 
Oh yeah. The comment-to-code ratio in this code is very high, which is a good measure of just how desperately hacky it is.
 
user5870134
I would like to propose a new RGB system for smells:
 
user5870134
3:09 PM
R for (al)right, G for gross & B for bearable.
 
user5870134
For example: Fart = (0, 255, 0), Rose = (200, 30, 250) & (Warm) Baked Cookies = (255, 0, 255).
 
Haha! What made you think of it?
 
user5870134
@WayneConrad I'm not sure 😄 I just did.
 
user5870134
Does anyone know how I can request an edit on my question, I'm not sure if I should edit it or not?
 
Request an edit? You can edit your question when you want, I don't understand what you're trying to do. Could you elaborate a bit more ?
 
user5870134
3:24 PM
What I mean is, how I can I get someone else to review my question and edit it if necessary.
 
Since you're not a new user, your question won't be posted in any queue. The best you can do is ask in a room relevant to your question some feedback probably. Maybe Meta, but I don't think question like this are well-received
 
user5870134
3:37 PM
@Marc-Andre Thanks for the info.
 
user5870134
Bye guys I need to run off, ya'll have a good day.
 
Have a good day @Mango
 
4:16 PM
See ya later @Mango
 
 
2 hours later…
5:50 PM
Hey my co-worker is having a problem installing with native extensions on his Sierra version of OSX. Everything was working fine with bundle install previously, on 1.13.2, but when he ran bundle update it brought him to 1.13.7, and then every time he tried to run bundle install it would fail, saying "can't build with native extensions". He tried reverting back to 1.13.2, but the error now seems to come up every time regardless of the version he has.
Would anyone be able to help?
 
Hi Ajax, welcome. I don't have any help for that... sorry... but I wish you luck. Please feel free to hang out here, however.
 
Thanks Wayne
 
@AjaxLeung I'd have him try xcode-select --install in the commandline
maybe some build packs got out of date, and this will have XCode update them
 
Thanks Jared. He says that he doesn't have the xcode command line tools installed
Oh wait no he does
 
I had a similiar issue a while ago and that is what solved it for me =\
 
5:55 PM
He's trying it now. It's having him download some software
Okay he ran the command and it looks like everything has installed. Can he try running bundle install again, or does he need to do something else
Okay it worked!
THANKS!
 
Winners :D
 
Woohoo!
 
6:11 PM
xcode made me hate mac
 
Yea, I always wonder why all of my SDKs are handled by this... but then I remember Apple likes to control distribution
 
I just installed ubuntu on my work computer, which worked flawlessly to my surprise. Found out I wasn't getting a computer upgrade until the end of the year, and windows just wasn't doing it for me anymore
 
Yea, we have the option of Windows, OSX or a crippled RHEL virtual device
None of which are my ideal
 
I installed windows in a virtual machine, for when I need it
 
 
1 hour later…
7:41 PM
@Cereal Nice.
 
I'm pretty happy with it - If only I could get awesome (the window manager) working on it
 
Is it a laptop?
 
Yeah. The ubuntu package is missing a module I need, for some reason, and when I try to install it from source, I get some strange errors
 
There are some window managers that are optimized for keyboard use, which can be nice on a laptop. For example, the i3 tiling window manager uses the mouse, but it can also be easily driven entirely from the keyboard.
 
Hm, ubuntu told me my upgrade to 16.10 failed, but appears to now be running 16.10
Yeah awesome has a ton of keyboard shortcuts.
 
7:52 PM
Hummm maybe some part of your update fail, but not the program who shows the version ?
 
That could be
 
> Since Ruby allows you to add methods to core classes like Array, it makes some sense to add mean and sum to those classes
@WayneConrad Do you think it's a good idea ? From codereview.stackexchange.com/a/152889
 
Sometimes. If your app uses a lot of gems, or your app is a gem, avoid it to avoid conflicts between your monkey patches and other people's monkey patches. If you are using a modern Ruby, use refinements to limit the scope of your monkey patches.
 
I keep forgetting about refinements
 
Refinements never heard of it, will look into it.
 
8:06 PM
I do use monkey patching in one of my scripts (100 LoC)
 
I was about to ask if what refinements do is possible, well it looks exactly like a good way to add functionality to a class and limit the scope of monkey patching :D
I think I will comment to say that refinements should be a better option :D
 
Here's an example of a refinement in one of my programs:
  module StringRefinements

    refine String do

      def integer?
        Integer(self)
        true
      rescue ArgumentError
        false
      end

    end

  end
  using StringRefinements

  class Console
    ...
    def read_integer(*read_args)
      loop do
        s = read_string(*read_args)
        return Integer(s) if s.integer?
      end
    end
    ...
  end
It's not a compelling example, although not a bad one either. I think I just wanted to try refinements that day.
 
Well it illustrate the point to me, so it was useful past being used in your code
Nice answer, instead of adding directly in the Array class, you could use refinements ruby-doc.org/core-2.1.1/doc/syntax/refinements_rdoc.html ( I just learned from it from WayneConrad see : chat.stackoverflow.com/transcript/message/35152333#35152333) — Marc-Andre 13 secs ago
 
8:33 PM
Ah, got it installed.
That refinement thing is neat
It just looks like money patching, though
 
It is. The difference is that it is not global--the monkey patch is only applied to the specific lexical scopes where you say it is.
In the code I showed above, String#integer? exists only inside the file that defines the Console class.
@Marc-Andre Thanks for the mention.
 
No problem! I would have felt dishonest talking about it like I always knew it, when I just learned it from you :).
 
Ah, I see. Safe monkey patching
Now I can modify classes without feeling dirty
 
"safe" monkey patching. Yea okay... :P
What if i want many refinements in one module and they all overlap
 
Don't do that, I would say. Since refinements are under your control that should be easy. But you bring up a good question: What happens when two refinements define or override the same method? The answer is, I don't know.
 
8:48 PM
I'm going to go ahead and say the second gets precedence
 
I will be they stack up just like modules do. Let's find out.
They don't stack up. One of them wins.
The last one that was used wins.
 
Neat
 
module StringRefinementsOne
  refine String do
    def to_s
      "(one)#{super}"
    end
  end
end

module StringRefinementsTwo
  refine String do
    def to_s
      "(two)#{super}"
    end
  end
end

using StringRefinementsOne
using StringRefinementsTwo

p "foo".to_s    # => "(two)foo"
@Cereal wins.
 
Yay
 
 
2 hours later…
user5870134
10:29 PM
Ruby is my saviour.
 
@Mango Just in general, or did it do something specific that was awesome?
 
user5870134
I used Ruby to automate a whole days work, and did it in ~2 Hours.
 
Woot!
 
user5870134
I used Ruby to clean my system (Cache, /tmp, Etc...), format disks, encrypt usb's and back up my primary drive (~40GB of data).
 
user5870134
Whilst Ruby was doing all that for me I had time to write some more Ruby (another project) and then vacuum / clean the house.
 
10:39 PM
That's awesome, and very Pragmatic.
 
user5870134
Yeah, today is probably my most productive day in a while.
 
I'm finishing up day two of a half-day refactoring :) I ended up throwing my work away mid-stream and starting it over. It was harder than I thought going into it--I forgot the depravity of the code I'm refactoring.
 
user5870134
What language is it, and who wrote such bad code?
 
Ruby, and I did :)
I'm copying data from tables that have no primary key. Not even a unique candidate key. I had this awful hack in place to copy the tables into a temporary table with a synthesized primary key. Awful. Hundreds of lines of awful code to deal with it.
But I got permission to change the source schema and add autoincrementing keys to each table, so the whole temporary table hack is going away.
 
user5870134
You made a table without a primary / unique key..?
 
user5870134
10:46 PM
You sir, did not think that one through 😄
 
user5870134
@WayneConrad Good luck buddy, you're gonna need it.
 
@Mango Heh, no. It's a legacy database. The people who made that decision are long gone.
This is that database--I've mentioned it before--that has no foreign key constraints. Lots of foreign keys, but no constraints.
 
user5870134
@WayneConrad What do you mean by "a legacy database" and "The people who made that decision are long gone".
 
user5870134
When was the database created?
 
I wasn't here, but the database was created probably a decade ago. The programmers who created it no longer work here, and had not worked here for some time before I came, so I don't know much about what happened then.
 
user5870134
10:52 PM
Do the rows in the database have positional keys? I mean, can you access the data using indexes?
 
user5870134
If so can't you just loop through the database, then add the columns as new entries in another (newer) database.
 
I've added a unique key to each table. Mysql makes this very easy: ALTER TABLE #{table_name} ADD COLUMN #{FIELD_NAME} INT NOT NULL AUTO_INCREMENT UNIQUE KEY
It even back-fills the existing rows. Nice.
I guess I could have created another database, then used mysql's magic ability to do joins across databases.
 
user5870134
MySQL is another example of an under appreciated technology.
 
I agree. I still prefer Postgresql, but mysql has some very nice things.
 
user5870134
Hey, since Tuples are non-mutable data types in Python and Tuple comprehensions aren't a thing then why do List comprehensions with circle brackets instead of square brackets work fine and produce lists..?
 
11:02 PM
Here's something that impressed me even more about mysql. I needed a last-updated-at-or-created timestamp. I thought I'd have to use a trigger to have the timestamp updated when a row changes, but Mysql takes care of that, too: ALTER TABLE #{table_name} ADD COLUMN fld_last_updated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. It backfills, and it sets the column on creation, and it updates the column on update. No trigger needed.
 
user5870134
I thought circular brackets were used to define Tuples not Lists..?
 
Why should a list comprehension care whether it's being given a list or a tuple?
For the purpose of enumerating over elements, don't they work the same?
 
user5870134
No, I'm assigning values to a Tuple that has already been defined.
 
user5870134
Basically I'm able to update a Tuple, that's not supposed to happen (in Python) as Tuples are non-mutable.
 
It's updating, and not creating a new one?
 
user5870134
11:05 PM
Yeah, and I'm NOT getting any errors..?
 
How do you know it's updating the existing tuple?
 
user5870134
I've just proven everything I know wrong...
 
I sort of believe you, but only sort of :)
 
user5870134
I think I'm having a mental break down.
 
I don't mind if you want to paste a little Python code in here. Ruby and Python are brothers.
 
user5870134
11:10 PM
# regex's to ignore
ignore = (r"^\@define\s")
x = tuple()
(x.append(True if re.search(regex, line) else False) for regex in ignore)
# skip lines with ignore matches
if True in x:
  continue
 
user5870134
What the absolute f***?! I think I'm going crazy...
 
user5870134
11:23 PM
0
Q: Why does it work when I append a new element to a TUPLE?

MangoSince Tuples are non-mutable data types in Python and Tuple comprehensions aren't a thing then why do List comprehensions with circle brackets instead of square brackets work fine and produce regular Tuples? I thought circular brackets were used to define Tuples not Lists (I know I'm not wrong t...

 
Your confusion is apparent in the question :)
 
user5870134
0
Q: Why does it work when I append a new element to a TUPLE?

MangoSince Tuples are non-mutable data types in Python and Tuple comprehensions aren't a thing then why do List comprehensions with circle brackets instead of square brackets work fine and produce regular Tuples? I thought circular brackets were used to define Tuples not Lists (I know I'm not wrong t...

 
user5870134
Sorry, I just want ya'll to use the "share" link :)
 
user5870134
@WayneConrad Yes, I think I'm going insane.
 
user5870134
11:42 PM
Would it be bad to ask for votes..? It appears my question is 50/50 for up and down right now.
 
I think you could tighten the question up by removing all of the bold text, the WTF, etc. Just state your question simply.
 
user5870134
Obama just commuted most of Chelsea Manning's sentence.
 
user5870134
She will now be allowed to walk out of jail on May the 17th 2017.
 
user5870134
But she leaked hundreds of thousands of US government documents to WikiLeaks... Why did he let her go?
 
There are probably better forums for that discussion.
 

« first day (1103 days earlier)      last day (2152 days later) »