« first day (19 days earlier)      last day (3771 days later) » 

8:02 PM
new update @voretaq7 @egid @PatoSáinz @BretCopeland
!!weather lpl
 
@DannyBeckett LPL/EGGP: Liverpool John Lennon Airport • Observed: 43 mins ago • Wind: 190°/S @ 18kts • Visibility: 6.21mi/9.99km • Sky (AGL): Few clouds @ 2,800ft; Scattered clouds @ 3,900ft • Temperature: 9.0°C/48°F • Dewpoint: 6.0°C/43°F • Pressure: 29.08" Hg/985mb • Conditions: VFR
 
!!weather jfk
 
@DannyBeckett JFK/KJFK: John F Kennedy International Airport • Observed: 12 mins ago • Wind: 270°/W @ 13kts • Visibility: 10.0mi/16.09km • Sky (AGL): Few clouds @ 3,400ft; Broken clouds @ 8,500ft; Broken clouds @ 10,000ft • Temperature: 4.4°C/40°F • Dewpoint: -0.6°C/31°F • Pressure: 29.50" Hg/999mb • Conditions: VFR
 
Anonymous
the update is that now it describes airport names?
 
yup
took a lot of code
also, it gives both airport codes now
and conditions has been moved to the end
 
Anonymous
8:04 PM
keep up the good fucking work
 
thanks! :)
 
Anonymous
maybe it should translate the conditions when !!weather is used
 
!!weather scl
 
@DannyBeckett SCL/SCEL: Comodoro Arturo Merino Benítez International Airport • Observed: 5 mins ago • Wind: 220°/SW @ 16kts • Visibility: 6.21mi/9.99km • Sky (AGL): Ceiling & visibility ok • Temperature: 32.0°C/90°F • Dewpoint: 10.0°C/50°F • Pressure: 29.85" Hg/1,011mb • Conditions: VFR
 
nice airport name :p
@PatoSáinz a couple of us discussed that (you mean VFR -> Visual Flight Rules, right?)... we decided it was ok
 
Anonymous
8:05 PM
oh alright
 
JS now at 210 lines - PHP at 104 lines
 
Anonymous
js and php?
 
Anonymous
;_;
 
yup
do you know PHP?
 
Anonymous
a veeery very little
 
Anonymous
i've done some php work... it's sort of similar to perl
 
Airport.php is what I just wrote to get the names working
yeah it's based on Perl
 
Anonymous
wait what...
 
PHP = Perl Hypertext Processor
 
Anonymous
object oriented PHP?
 
8:10 PM
of course!
 
Anonymous
OH GOSH MY EYES PLEASE STOP IT IT BURNSSSSS
 
lmao
if you say so ;)
 
Anonymous
@DannyBeckett if you have a php helper... then you can make an interface to perl too... right?
 
Anonymous
i mean, how is the php helper connected to the js bot?
 
basically the bot REQUIRES the data to be in JSONP format
the PHP just gives it that
 
8:12 PM
@DannyBeckett I always thought PHP stood for PHP Hypertext Preprocessor
 
from XML (for the weather data) and a screenscrape (for the airport name)
 
Anonymous
@DannyBeckett can you please point the specific part of the js code that does that?
 
!!wikipedia PHP
 
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP is now installed on more than 244 million websites and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1995, the reference implementation of PHP is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, a recursive backronym. PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page: PHP commands can be embedded directl...
 
Anonymous
@egid it does lol
 
8:12 PM
@egid That didn't make much sense. Use the !!/help command to learn more.
 
you're right, just Googled it
 
@DannyBeckett do you know how the chat snippets like that get made?
 
it's still based on Perl though, I thought
 
Anonymous
@DannyBeckett i don't think it is
 
Anonymous
also
 
8:13 PM
maybe that's how you could do more presentational scripts
 
@egid It's called oneboxing
 
it is a cgi script yes
php requires cgi
 
Anonymous
@egid those snippets are added by the server itself... we can't do anything to make more snippets
 
@PatoSáinz ah ok
 
30
Q: Differences between Perl and PHP

lokI'm planning to learn Perl 5 and as I have only used PHP until now, I wanted to know a bit about how the languages differ from each other. As PHP started out as a set of "Perl hacks" it has obviously cloned some of Perls features. What are the main differences in the syntax? Is it true that wi...

 
Anonymous
8:13 PM
there's nothing the bot can do
 
Anonymous
@DannyBeckett omg! now that i know that i can make my perl code interface its data to your bot...
 
bad question, but "As PHP started out as a set of "Perl hacks" it has obviously cloned some of Perl"
 
Anonymous
I'll help you
 
@PatoSáinz everything that I have written JS-wise is in weather.js
specifically, the part that does it, is:
IO.jsonp({
        url:                'http://dannybeckett.co.uk/AviationBot/Weather.php',
        jsonpName:        'callback',
        fun:                finish,
        data:                {
                                            a:        query
                                }
        });
 
Anonymous
@DannyBeckett how does it input data from the js bot
 
Anonymous
8:15 PM
is there any way?
 
what do you mean?
 
Anonymous
like if there was a way to say "!!fuck you all"and js said sendtoperlinterface->fuck('you', 'all') to the perl code... so perl knew that fuck is being invoked with those args
 
@egid not any more, AFAIK
 
Anonymous
like an ARGV for perl
 
Anonymous
inputting data
 
Anonymous
8:17 PM
since perl doesn't read the chat directly and there's no api (but JS)
 
!!tell egid google php cgi vs module
 
Anonymous
because weather.php is output-only
 
ohhhh
that's handled in JS
 
Anonymous
damn
 
8:18 PM
you just get passed the whole thing as args
 
Anonymous
@DannyBeckett can JS+node.js run a shell?
 
Anonymous
like
 
I have root access to the server, if that's what you mean
and I've installed Node.JS on to it
 
Anonymous
"if (command is invoked) { DOMIGHTYNODEJSSHELL('script.pl arg1 arg2'); }"
 
Anonymous
if node.js has a function or a module to get a shell
 
Anonymous
8:20 PM
pretty much like perl has the exec() function
 
Anonymous
or the backtick operator
 
yes, in a round about way
as I say, the external resources you call MUST reply in JSONP format
you can put a .pl script on the server
so long as it outputs JSONP
 
Anonymous
alright
 
even an empty JSONP is fine
 
Anonymous
i'll think of a feature later
 
Anonymous
8:21 PM
and when i get to my dev battlestation i'll do it
 
I already have one actually... a restart command
 
Anonymous
(long time i don't code)
 
I'm having to keep SSH open just to issue ./restart.sh
 
Anonymous
a restart? well, that's a job for pure js
 
Anonymous
cron job?
 
8:22 PM
every time the source code is changed, you have to restart the bot
i.e. when I make updates to the !!weather command
 
Anonymous
@DannyBeckett hang on a minute plz
 
lol k
 
Anonymous
this is the most ugly irc bot script you'll see in perl
 
Anonymous
but it works
 
Anonymous
8:23 PM
> if ($stuffy2[1] =~ /^\@restart/i && $access >= 10) {
my @rreason = split('@restart ', $stuffy2[1]);
print $sock "PRIVMSG ".$monchan." :\00304"."RESTARTING PER $user4[0] REQUEST: $rreason[1]"."\r\n";
print $sock "QUIT :$rreason[1]\r\n"; exec($^X, $0, @ARGV); }
 
I was literally just typing... "wtf is that monstrosity"
 
Anonymous
i had the same problem
 
but you beat me to it
 
Anonymous
@DannyBeckett i coded it thanks
 
ahahaha, sorry
 
Anonymous
8:24 PM
it was my first script
 
you don't like to use Tab?
 
Anonymous
something fucked up indentation
 
ah fair enough!
 
Anonymous
@DannyBeckett it short, it makes send a QUIT command to IRC
 
Anonymous
and then reload itself
 
8:25 PM
This is what I need to be able to run by issuing a command to the bot:
#!/bin/sh

basedir=~/dev;

cd $basedir/SO-ChatBot;
node build.js;

cp $basedir/SO-ChatBot/master.min.js $basedir/so-chatbot-driver;
exec $basedir/restartpjs.sh

cd $basedir;
 
Anonymous
> exec($^X, $0, @ARGV);
 
Anonymous
if there was a direct api in node.js where you could make it run itself again, you could do that
 
oh and there's of course restartpjs.sh as well
 
Anonymous
$^X, $0 means "run current program" and @ARGV are all command-line arguements i may have passed to it
 
......btw, we should probably stop the programming talk in The Hangar
 
Anonymous
8:26 PM
when it re runs, it reconnects the server and etc.
 
Anonymous
oh right
 
I got told off for it once before (lol)
 
Anonymous
to the testing room!
 
;)
New Air Crash Investigation in 30 minutes on Nat Geo UK (I guess EU too)
 
8:57 PM
starting... :)
it's about JFK
American 587
 
9:18 PM
hey look I have an internet connection at my desk again!
 
9:29 PM
lol @voretaq7
have you always lived in NY? @voretaq7
nice question btw
 
9:40 PM
@DannyBeckett for the most part, yes
i've spent time in California, Chicago, and a few other places
but New York is "Home"
 
all nice places!
 
@DannyBeckett Chicago is not a nice place. Not only do they bust up perfectly good airports, Winter there is like something out of Game of Thrones :P
 
lmao!
 
(and those freaks think pizza is some kind of a soup in a bread bowl)
 
9:41 PM
"Chicago style" pizza
 
!!google chicago style pizza
 
usually a sloppy wet deep-dish mess
 
!!wiki chicago style pizza
 
Chicago-style pizza includes several different pizza styles developed in Chicago. Chicago-style deep-dish pizza has a crust up to three inches tall at the edge, slightly higher than the ingredients, which include large amounts of cheese and chunky tomato sauce. Besides the deep-dish style, there is also stuffed pizza. Most pizzerias in Chicago also serve thin-crust pizza in a style characteristic to the city, although Chicago-style pizza is most commonly known for the deep-dish style of pizza outside the Chicago metropolitan area. Styles of pizza Deep-dish pizza The Chicago-style de...
 
9:42 PM
lol I'll take your word for it
ah, like this?
 
@DannyBeckett Our runway numbers bother the hell out of me. Granted if you do a fast set of your DG to the runway heading it's just the difference between being off by 4 degrees or 6, and you shouldn't do that anyway, but it bugs me :P
 
@DannyBeckett PHP in many cases doesn't have SAPI support and runs on cgi or fastcgi
 
@DannyBeckett Ayup
 
i know that dreamhost, for example, runs php with fastcgi enabled
 
@egid I need to convert my home machine to PHP+FastCGI so I can get away from the prefork MPM on my system
 
9:44 PM
@egid I have my own boxes, so that's not an issue for me ;)
 
(we switched to Worker at work because we ripped PHP out of the production environment)
 
I'm gonna watch the last 15 mins of this new Air Crash Investigation anyway guys
.....holy shit, the pilot ripped off the vertical stabiliser!!
egh, adverts.
do you remember this accident @voretaq7?
Boeing in November 2001 into the Bronx
.......god, American Airline pilots were trained to do it
to use severe sustained alternating rudder in wake turbulence
Right, I'm off for tonight. Seeya guys
 
10:09 PM
room topic changed to The Hangar: aviation.stackexchange.com Tell your friends! (no tags)
2
 
@DannyBeckett oh this is the one where they stomped on the rudder pedals so hard they tore the tail off?
 
@voretaq7 yeah exactly
 
BWAHAHAHAHAHA
 
more like, repeatedly pressed the rudder back and forth
 
> If you are using Microsoft Internet Explore (IE) v11 as your internet browser, this site may not work for you. It appears that IEv11 currently doesn't work properly with another Microsoft product that this site also uses. You could try using the "compatibility mode" feature of IEv11 with this web site. Otherwise, this problem will persist until that issue is resolved.
From the FAA Airman Registry Search page:
 
10:19 PM
thinking it was wake turbulence... it was his inputs causing the plane to go wild the whole time
 
Even the FAA picks on Microsoft.
 
@voretaq7 lol... I like the NTSB's 404 message (read it)
 
@DannyBeckett I never understood how AA trained pilots to do that. All my instructors were all about "Smooth, steady control inputs"
@DannyBeckett I want the NTSB's 500 error page to feature photos from accident investigation scenes
but they would probably say that's "in bad taste"
 
or "server investigation scenes"
since a 500's a server error
 
10:22 PM
I've seen a DC like that before actually... not a pretty site
took me 2 solid weeks of painful rewiring
when I say DC, tiny DC
right, I'm off... seeya
 
11:15 PM
OK, or ? :-) I used on this question for now but I'm not opposed to changing it...
 
Anonymous
11:32 PM
good day
 
11:46 PM
@voretaq7 if i remember right, the A300 at the time did not have control rate modifiers based on aircraft speed
most modern FBW airliners reduce the inputs as speed increases
American Airlines Flight 587 was a regularly scheduled passenger flight from John F. Kennedy International Airport in New York City to Santo Domingo's Las Américas International Airport in the Dominican Republic. On November 12, 2001, the Airbus A300-600 airliner operating the flight crashed into the Belle Harbor neighborhood of Queens, a borough of New York City, shortly after takeoff. All 260 people on board the flight were killed, along with five people on the ground. It is the second-deadliest aviation incident involving an Airbus A300, after Iran Air Flight 655 and the second-deadli...
ah the a300 was mechanical not fbw
> Most aircraft require increased pressure on the rudder pedals to achieve the same amount of rudder control at a higher speed. The Airbus A300 and later A310 do not operate on a fly-by-wire flight control system, instead using conventional mechanical flight controls. The NTSB determined that "because of its high sensitivity, the A300-600 rudder control system is susceptible to potentially hazardous rudder pedal inputs at higher speeds".
 
@voretaq7 For now, I don't think it matters. I think the ultimate answer is still tag synonyms. We'll probably start implementing them in a few weeks, and I'll make a meta post about it at that time... if that works for everyone.
 

« first day (19 days earlier)      last day (3771 days later) »