Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

09-24-2015 , 01:17 PM
Quote:
Originally Posted by Roonil Wazlib
Bomb squad gave you explosive diarrhea?
THAT'S how they got their name. Dirty bomb just took on new connotations for me.

@Grue that really sucks though hope everything was ok besides dead guy in the front seat.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-24-2015 , 01:40 PM
It was fine just had to throw 2 pissed off cats in the car and move away a couple hundred feet and watch a robot try to open a car door because the guy's crack pipes or something could be a bomb I guess.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-24-2015 , 04:40 PM
Quote:
Originally Posted by Roonil Wazlib
I mean, I say I'd be in slytherin, but that guy would super extra be in slytherin.
I'm an excellent schemer and power player but I'd still be in ravenclaw cause books are ****ing awesome.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-24-2015 , 04:57 PM
Quote:
Originally Posted by jmakin
I dont like assembly language
Do some reverse engineering hackmes...those are fun (0x90, JNZ->JZ etc.)

Or just write some C code and read the assembly GCC creates and experiment. "I wonder what a function call looks like, what about this loop, what about X,Y,Z...if I change this I guess the assembly would change that way"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-24-2015 , 05:05 PM
motherfkn god damn piece of ****

i just wasted an hour and a half trying to debug this fscking PHP problem

apparently, there are certain situations where you cannot have any trailing newlines after the final php ?> close tag.



suck a mfing dick you god damn POS language

apparently the community's "solution" is to just omit the tag just to save themselves from this ******ed design flaw

http://framework.zend.com/manual/1.1...ormatting.html
https://www.drupal.org/coding-standards#phptags
http://stackoverflow.com/questions/3...losing-php-tag
http://stackoverflow.com/questions/4...-the-close-tag
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-24-2015 , 05:59 PM
Yep php is pos language, switch to nodejs or go and be happier.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-24-2015 , 07:40 PM
Wouldn't a decent php lint tool catch this?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 08:16 AM
Quote:
Originally Posted by jmakin
I don't like assembly language
This class single handed let me know I would never be a Software Dev. and write code for a living.

The irony is of course that as my job has evolved over the last year or so I am learning a bunch of Automation languages just by default
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 09:20 AM
I enjoyed my class on assembly language (including an assignment where we had to write a small program using a giant manual to look up the actual machine code), but I definitely wouldn't want to do it all the time. Pretty interesting stuff though and really reinforces that programming is all about layers of abstractions.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 09:20 AM
Quote:
This class single handed let me know I would never be a Software Dev. and write code for a living.
That's like saying you saw a complicated diagram of a car engine and realized you'd never drive a car.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 09:27 AM
No, it's like trying to put together a 500,000 piece jigsaw puzzle of a blank canvas and realizing you don't want to go insane even if there are 100 piece versions of the same puzzle in your future.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 10:25 AM
I wrote an assembler. Expression evaluation is the only difficult part really. Two passes, one to build a symbol table more or less, the second pass to generate relocatable object module which is basically machine language with relative info about branches and subroutine calls that the linker users to resolve for virtual addresses more or less. Plus I've written more than my share of assembly language code and I am doing a fair amount now. The nice thing about assembly language code is that when you are debugging you don't have to re-assemble and rebuilt the image all the time. Since you are the machine level you can generate patches on the fly by altering memory directly and try the fix out. Of course the obvious drawback is that managing complexity is like a really, really significant challenge. Even on microcontrollers the vast majority of code is written in C/C++. Managing complexity is still a challenge at that level but much better for that than assembly language. Code optimization in C/C++ compilers has evolved to the point where it is pretty damn good too.

Last edited by adios; 09-25-2015 at 10:36 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 10:57 AM
This discussion reminded me of "The story of Mel", which I'm sure most people have read, but is so good its always worth posting: http://www.pbm.com/~lindahl/mel.html
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 12:12 PM
God why is JIRA such a piece of crap in 2015? They really can't do any better than this? Its a software development tool FFS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 12:33 PM
Quote:
Originally Posted by Grue
God why is JIRA such a piece of crap in 2015? They really can't do any better than this? Its a software development tool FFS.
It's what happens when you try to make something infinitely flexible. Everyone tries to customize it in some way that makes a ton of extra work or it's somewhat incomplete, and you end up fighting fitting things into boxes instead of just working on stuff.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 03:35 PM
.net v4.6 is kind of irritating. It introduces a bug in the garbage collector. My application is very parallel, and this change kills the performance.

There is also another error it introduces, where it can produce wrong answers with no warning.

Microsoft have issued a hotfix for windows 8.1 and earlier, but windows 10 is still broken.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 05:47 PM
Quote:
Originally Posted by greg nice
motherfkn god damn piece of ****

i just wasted an hour and a half trying to debug this fscking PHP problem

apparently, there are certain situations where you cannot have any trailing newlines after the final php ?> close tag.



suck a mfing dick you god damn POS language

apparently the community's "solution" is to just omit the tag just to save themselves from this ******ed design flaw

http://framework.zend.com/manual/1.1...ormatting.html
https://www.drupal.org/coding-standards#phptags
http://stackoverflow.com/questions/3...losing-php-tag
http://stackoverflow.com/questions/4...-the-close-tag
M-x delete-trailing-whitespace

Learn it. Love it. Live it (or whatever your editor of choice has).

If you think PHP is bad for this, wait until you get a rise of YAML.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 07:57 PM
Quote:
Originally Posted by daveT
M-x delete-trailing-whitespace

Learn it. Love it. Live it (or whatever your editor of choice has).

If you think PHP is bad for this, wait until you get a rise of YAML.
trailing whitespace doesn't usually kill new lines at the end of file.

in fact, many times a new line at the EOF is recommended, and git even has settings to add one automatically for you
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 08:22 PM
I'm not one for scripting, but how hard would it be to write a script to ping a host name from a list of host names, then append each line with the IP address that responded?

Scale of 1-10
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 09:19 PM
Quote:
Originally Posted by greg nice
trailing whitespace doesn't usually kill new lines at the end of file.

in fact, many times a new line at the EOF is recommended, and git even has settings to add one automatically for you
Well, this is a Windows -vs- Linux thing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 09:28 PM
Quote:
Originally Posted by Roonil Wazlib
I'm not one for scripting, but how hard would it be to write a script to ping a host name from a list of host names, then append each line with the IP address that responded?

Scale of 1-10
I'm def no expert, but it shouldn't be that hard (might depend on which route you go though). I messed around with some Ruby code and came up with this. Pretend we have a set of hosts as an array:

Code:
hosts = ["www.google.com", "www.facebook.com", "www.twitter.com", "forumserver.twoplustwo.com"]

host_ip = hosts.map { |host| host + ", " + `ping -q -c 1 #{host}`.split(" ")[2].slice(1..-2) }
I googled your basic question and saw this link (http://stackoverflow.com/questions/2...e-host-in-ruby), which explains the `ping -q -c 1 #{host}` portion. I messed around with it to figure out what the response would be. The rest is just manipulation of the response array and string. It should look a little like this:

Code:
puts host_ip
www.google.com, 209.85.146.99
www.facebook.com, 31.13.74.1
www.twitter.com, 199.59.149.198
forumserver.twoplustwo.com, 204.232.160.145
=> nil

Last edited by fredd-bird; 09-25-2015 at 09:35 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-25-2015 , 09:39 PM
i looked for an answer in java, but i'd have to use sockets, which i don't know yet, as java doesn't natively support icmp apparently.

looking at maybe bash scripts now, but i'm not sure how well those would be able to write to a file. also python.

Don't particularly know how to run py/ruby though. The online courses never seem to cover that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-26-2015 , 06:42 AM
In the above ruby example he's just shelling out to the unix `ping` command. That's what the backticks allow you to do. You could probably do the same thing in java with different syntax.

With bash all you have to do is redirect the output to a file. I'll let you figure out the loop part yourself but here's how you could parse out the IP address of the ping command.

Code:
ping -q -c1 google.com | awk '{ print $3 }' | head -n1
And if you want to write the output to a file:

Code:
ping -q -c1 google.com | awk '{ print $3 }' | head -n1 > ip_list
If I were you I'd do something like:

1. Have a file with a list of host names on each line
2. Write a bash script that takes that file as input
3. Loop through the file, splitting on a new line
4. Append the IP address next to each host in each loop iteration as a string
5. After the loop is done, write the new file

If modularity isn't of great important, just store #1 inside of the bash script as an array.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-26-2015 , 09:37 AM
I thought the Bash Cookbook was online but I'm not seeing it after a quick google. You should definitely be learning some bash tricks if you are going to be doing any *nix adjacent dev work. Fortunately it was around as long as the internet so there are tons of examples and help online.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-26-2015 , 10:38 AM
Well, it's not exactly software dev related. Just trying to find a way to save myself a large amount of time. Much easier to script from a list of 3000 hostnames than to do it manually, I'm hoping.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m