« first day (843 days earlier)      last day (2978 days later) » 
00:00 - 21:0021:00 - 00:00

9:02 PM
@ArtOfCode Took a look at that PR. It throws an error, and I can't find a magic combination to make it work.
Well, I can make the error go away just fine
But all of my tries only show posts where they have given feedback.
 
9:16 PM
@Undo We should show a symbol. But again, not sure what a good symbol would be...
 
U+1F4A9 PILE OF POO?
 
Jan 11 at 3:15, by Brock Adams
Unicode &#x1F649 Hear-No-Evil Monkey 🙉
 
hah
Although both aren't flat, so they might look a little out of place.
I'm really tempted to just use something completely nonsensical, then watch us get used to it.
Like... U+1F47A JAPANESE GOBLIN 👺
 
!!/alive
 
@KrijnToet Of course
 
9:38 PM
!!/pull
 
[ SmokeDetector ] SmokeDetector started at rev 0b866d6 (hichris1234: Fix potential overflow error) (running on Raspberry Pi)
 
Might as well test it...
 
Restart: API quota is 9149.
 
sd 999999k
 
@hichris123 I've only posted 100 messages since the latest reboot; that's not enough to execute all commands. No commands were executed.
 
9:39 PM
yay.
 
@Undo what PR?
 
@Undo am I meant to be seeing anything different to what I did when I submitted it?
 
@ArtOfCode oh, no. I was just playing with it locally.
 
@Undo So what error does it throw?
 
9:43 PM
Doesn't throw an error, just gives weird results.
 
40 mins ago, by Undo
@ArtOfCode Took a look at that PR. It throws an error, and I can't find a magic combination to make it work.
 
Oh, the error was trying to get an ID from nil when you're not logged in
which is easy enough to fix
 
oh right
so what's it do now?
 
Haven't had the time to really look at it.
 
oh god it's an inner join that's why
We need a left join
 
9:43 PM
yeah, that was part of it.
posts = Post.joins(:site).joins(:feedbacks).where({:feedbacks => {:user_id => [(100 || nil), nil]}}).select("posts.id, posts.title, posts.link, posts.created_at, sites.site_logo, feedbacks.feedback_type").order(:created_at).last(50).to_json
This is what I've been experimenting with.
Although that's still an inner join
I think includes gets us a left join
 
Uh.
Not quite understanding what you've done there in the where clause
 
I don't either :P
 
Specifically, what's [(100 || nil), nil]?
 
3
A: Outer Join The Rails 3 Way

Dave PirotteYou need to check that the user id in your discovered_locations table is either equal to the id of the user in question, or is null. This is easily accomplished with the meta_where gem. Given the following models: class User < ActiveRecord::Base has_many :discovered_locations has_many :loc...

Ignore the || nil thing, that's an artifact.
100 is a UID that doesn't exist, and it still gives me feedback
 
Hey why don't we just use an SQL literal?
 
9:48 PM
That'd be an option.
Never used that before, but hey why not.
we're returning JSON anyway, we don't need AR magic.
 
[ SmokeDetector ] Bad keyword with email in answer, email in answer, blacklisted user: Hack-resistant hosting solution for non-profit? by Gabby on security.stackexchange.com …
 
sd k
 
Posts.joins("LEFT JOIN feedbacks ON feedbacks.post_id = posts.id AND feedbacks.user_id = #{current_user.id}")?
 
Just a sec.
Do you have a local setup to play with?
 
obviously with some kind of nil check around current_user.id
@Undo I wish. Windows 10.
I got Rails working on it, but the gems refused to install.
 
9:50 PM
oh, yeah. W10 is... kinda fun
 
WX is pretty good actually. Rails is one of the very few things that I haven't been able to make work well.
oh hey I could set up another workspace
Let's see...
Though that would take me about 10 aeons
 
@ArtOfCode this is looking like it might actually work
 
Can anyone tell me if there's a quick way to install Ruby on Ubuntu?
 
@ArtOfCode rvm
 
9:53 PM
I use it everywhere. It's kinda the gold standard.
You can even sandbox gems and stuff. And switch between multiple versions and gemsets fast.
@ArtOfCode Yeah, this is working.
 
Let's see if I can spin up a VM to get metasmoke set up on.
 
Query takes a looong time. And we can't cache it globally, only per user
 
How long are we talking?
This is mainly used by an async userscript, so basically anything under a couple seconds would be OK.
 
less than a second, which is an eternity for running on this machine.
 
That's fine
gem install rails: Building native extensions. This could take a while...
Still here, 5 minutes later.
 
10:02 PM
@ArtOfCode What version of Ruby?
2.3 is significantly faster.
 
@Undo shrug
 
Oh, native extensions.
 
Came preinstalled
 
Yeah, first build, you might be there a while.
 
2.3.0
Rails in.
 
10:05 PM
git clone the repo; gem install bundler; bundle install
 
Now the rest of the dependencies
 
You'll probably run into a thing with execjs, which is easy to fix but I have to google it every time.
 
@Undo They preinstalled ruby and bundler for me, and cloned the repo. I've just got a few dependencies to go, then I should be able to get it working
@Undo is there a smaller MS dataset you can get to me so I can seed the DB? I can give you access to the VM, if that helps.
 
@ArtOfCode It's only a few megabytes, I can give you the full database with emails anonymized and you can just import it into MySQL
 
@Undo Sure. Want access, or email?
 
10:09 PM
I can just give you a link. Just a sec.
 
[ SmokeDetector ] Blacklisted website in body: Huawei P9 Lite UAE by Mobile Phone on superuser.com …
 
Oooh dear. Here's the first error.
sd k
Any idea about /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:464:in 'initialize': No such file or directory @ rb_sysopen - /home/ubuntu/workspace/config/config.yml (Errno::ENOENT)?
 
@ArtOfCode When are you getting this?
 
@Undo rails s
 
you've cd'd into the repo, right?
 
10:13 PM
yeah, repo is the base of the VM
 
oh
@ArtOfCode cp config.sample.yml config.yml
 
The first thing it outputted was Please require the stackprof gem falling back to fast_stack - anything to do with it?
 
@ArtOfCode nah, I get that all the time.
 
@Undo No such file... which directory is that in?
 
@ArtOfCode oh.
cp config/config.sample.yml config/config.yml
 
10:15 PM
got it
It's listening on tcp://... is that normal?
 
Yep
localhost:3000 in the browser should work
Maybe 0.0.0.0:3000, sometimes there are weird networking things
 
And there's the next problem...
server refused the connection
That's likely down to the VM's setup, though, which is a weird thing
I don't have a proper browser
 
Yeah. Not sure how vm's handle that
Can you wget it from within the vm?
 
Heh. Yes, but it gives me a 500.
Oh, pending migration
 
rake db:migrate
 
10:22 PM
Yeah, run it
It gave me that in the error message
Better. Now we have a different 500.
ActionView::Template::Error (undefined method status_color' for nil:NilClass`
That's from the topbar's status link
 
That's because you don't have any SmokeDetector records.
Import the MySQL dump yet?
 
Would also help. Is it just raw SQL?
 
Yeah
 
Ooooh I don't have a tool to dump the lot into. I assume there's a console method?
 
mysql -u user -p metasmoke < dump_file.sql
 
10:27 PM
Can't connect. Do I need to create a user?
 
-u root?
 
is that a question or a suggestion xD
 
Nope. It's asking me for the password, even if I have the -p switch.
Might have something to do with it.
 
@ArtOfCode That's the root password you put in when you set up MySQL
 
@Undo I didn't set it up.
Hmmm.
 
10:29 PM
oh. You'll probably want to do that.
 
No, it's there, but I wasn't the one who did it.
It either came with the VM, or was installed as one of the gems
 
no, not the gem thing
maybe it's a blank password?
 
Apparently not, just tried that
 
[ SmokeDetector ] Blacklisted website in body, blacklisted user: Samsung Galaxy Note 6 by Mobile Phone on superuser.com …
 
sd k
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Is that an auth error or a socket error?
 
10:33 PM
Can't remember
got to run, be back in a few minutes or maybe an hour.
once you get MySQL set up, you'll need to set the development DB to MySQL (search SO) in config/database.yml
 
10:50 PM
Okay, so it appears to be working.
The cache, however, does not.
When I wget the dashboard (/), it appears to be running all the 306 queries, every time.
And I've got it working in a browser, too - but still no cache.
I'm heading out now, but I'll be back tomorrow if anyone figures that out :)
 
11:04 PM
[ SmokeDetector ] Manually reported answer: Java, How to implement a Shift Cipher (Caesar Cipher) by Jack Mehoff on stackoverflow.com …
 
11:17 PM
@ArtOfCode Cache doesn't run in dev by default
 
@Undo Ah, that makes sense. I suspect it's also partly the VM's response times, which are disgusting. It seems to be mostly working now though, thanks for your help.
 
404
11:47 PM
 
[ SmokeDetector ] Manually reported question: QQsdfsfdsfdsfdsfdsfdsdffdssdfsdffdsdfssfddsfdsfsdfsdf by zxczxczcx on ru.stackoverflow.com …
 
which button is the flag button
Ah there we go
 
all the way to the right... or you can translate the page and find the 'alarm' button.
 
I take the usual repeated characters regex is turned off on Russian SO
@hichris123 I figured it out. :P
 
Oh, oops, it doesn't translate to 'alarm'... it translates to 'anxiety'.
> content of this message is inappropriate in the context of a good conversation .
> Most likely, this issue does not correspond to the subject Stack Overflow in Russian, according to the rules described in the online help .
Most likely?
> Try to write more detailed questions. For the answer, explain what you see a problem, as it is to play, you want to get a result, and so on. D. Give an example of the code.
> Clearly not on (this issue has nothing to do with the theme of Stack Overflow in Russian)
Not on what?
lol "Stack Overflow" is translated to "Overflow is the Stack"
 
00:00 - 21:0021:00 - 00:00

« first day (843 days earlier)      last day (2978 days later) »