Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
My Linux Rig
Mar 27, 2010
Probation
Can't post for 6 years!

rotor posted:

nope, its fine

no it really isn't

Adbot
ADBOT LOVES YOU

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

ahhh spiders posted:

slap a node on it

YOSPOS: slap a node on it

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

My Linux Rig posted:

no it really isn't

the subject really isnt open for debate. its fine. end of story.

All Hat
Jul 11, 2008

He that is without int among you, let him first cast a long

rotor posted:

YOSPOS: slap a node on it

All the single threads (all the single threads)
All the single threads (all the single threads)
All the single threads (all the single threads)
All the single threads, now put your callback

Cause if you like it then you shoulda put a node on it
If you like it then you shoulda put a node on it
Don't be mad once you see that he want it
If you like it then you shoulda put a node on it

Wha-oh-oh-oh-oh-ooh-oh-oh-oh-oh-oh-oh
Wha-oh-oh-oh-oh-ooh-oh-oh-oh-oh-oh-oh

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
to the left
to the left


to the left
to the left

all of your garbage in the ram on the left
in this array, that's my char
yes if i defined it, please don't touch (my var)

And keep allocatin' that mess, that's fine
Could you push and pop, at the same time?
And it's my label that's on that junk
so go collect your garbage, let me call you a func

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
KegDroid: Combining Arduino, Android, and NFC to Dispense Beer

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
i'm a Maker. i Make things. also i have no understanding of basic electrical concepts and think LEDs are light bulbs.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
i'm a Maker. the most fascinating thing in the world to me is a static html page with "FURNACE IS OFF"

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

i'm a Maker. i have no skills or talents except for the ability to read blogs and exactly copy other peoples ideas

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
I have a great idea for a new social network. I need someone with expert command of design and backend development work. I can pay $20/hour.

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
Must sign an NDA for more information!

Crankit
Feb 7, 2011

HE WATCHES

Jonny 290 posted:

i'm a Maker. i Make things. also i have no understanding of basic electrical concepts and think LEDs are light bulbs.

RAM IS MEMORY

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
crankit please change your avatar i dont want people to confuse my posting with yours

arts and craps
Nov 20, 2011
hard to confuse poo poo with more poo poo

passionate dongs
May 23, 2001

Snitchin' is Bitchin'
if you can get paid to copy blog posts to 'prototype' problems that have already been solved that sounds pretty sw8 to me

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

the subject really isnt open for debate. its fine. end of story.

GameCube
Nov 21, 2006

since the php thread got closed somebody who isn't dumb explain this to me http://ompldr.org/vZGxxaQ
apparently it's a mirror because the original got marked private

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

it means php is bad

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Werthog posted:

since the php thread got closed somebody who isn't dumb explain this to me http://ompldr.org/vZGxxaQ
apparently it's a mirror because the original got marked private

this only happens if your server is set up in a weird stupid way using an old module nobody uses anymore. i saw a link earlier this morning explaining it but now i can't find it

Sock on a Fish
Jul 17, 2004

What if that thing I said?

Werthog posted:

since the php thread got closed somebody who isn't dumb explain this to me http://ompldr.org/vZGxxaQ
apparently it's a mirror because the original got marked private

php more like lol

http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/

quote:

Whose fault is this exactly? And why does the query string get parsed into command line arguments anyway? We went on a little trip around the internet to find out.

To answer the first question, there is the following text in the CGI RFC:

quote:

4.4. The Script Command Line

Some systems support a method for supplying an array of strings to
the CGI script. This is only used in the case of an 'indexed' HTTP
query, which is identified by a 'GET' or 'HEAD' request with a URI
query string that does not contain any unencoded "=" characters. For
such a request, the server SHOULD treat the query-string as a
search-string and parse it into words, using the rules

search-string = search-word *( "+" search-word )
search-word = 1*schar
schar = unreserved | escaped | xreserved
xreserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "," |
"$"

After parsing, each search-word is URL-decoded, optionally encoded in
a system-defined manner and then added to the command line argument
list.

If the server cannot create any part of the argument list, then the
server MUST NOT generate any command line information. For example,
the number of arguments may be greater than operating system or
server limits, or one of the words may not be representable as an
argument.

The script SHOULD check to see if the QUERY_STRING value contains an
unencoded "=" character, and SHOULD NOT use the command line
arguments if it does.

We checked the Apache source, and it complies exactly with the RFC: if there is NO unescaped ‘=’ in the query string, the string is split on ‘+’ (encoded space) characters, urldecoded, passed to a function that escapes shell metacharacters (the “encoded in a system-defined manner” from the RFC) and then passes them to the CGI binary.

Unfortunately, it appears the PHP devs forgot about this section of the RFC, and decided to remove the code which defends against it somewhere in 2004:

quote:

From: Rasmus Lerdorf <rasmus <at> lerdorf.com>
Subject: [PHP-DEV] php-cgi command line switch memory check
Newsgroups: gmane.comp.php.devel
Date: 2004-02-04 23:26:41 GMT (7 years, 49 weeks, 3 days, 20 hours and 39 minutes ago)

In our SAPI cgi we have a check along these lines:

if (getenv("SERVER_SOFTWARE")
|| getenv("SERVER_NAME")
|| getenv("GATEWAY_INTERFACE")
|| getenv("REQUEST_METHOD")) {
cgi = 1;
}

if(!cgi) getopt(...)

As in, we do not parse command line args for the cgi binary if we are
running in a web context. At the same time our regression testing system
tries to use the cgi binary and it sets these variables in order to
properly test GET/POST requests. From the regression testing system we
use -d extensively to override ini settings to make sure our test
environment is sane. Of course these two ideas conflict, so currently our
regression testing is somewhat broken. We haven't noticed because we
don't have many tests that have GET/POST data and we rarely build the cgi
binary.

The point of the question here is if anybody remembers why we decided not
to parse command line args for the cgi version? I could easily see it
being useful to be able to write a cgi script like:

#!/usr/local/bin/php-cgi -d include_path=/path
<?php
...
?>

and have it work both from the command line and from a web context.

As far as I can tell this wouldn't conflict with anything, but somebody at
some point must have had a reason for disallowing this.

-Rasmus

Oddly enough, the PHP documentation still claims that PHP ignores command line arguments when run in CGI mode. That documentation page also describes another mitigation used in PHP: the REDIRECT_STATUS environment variable must be set, or PHP will refuse to run as a CGI script. This means we cannot directly access /cgi-bin/php5-cgi. This doesn’t really inconvenience us though, as mentioned earlier :-)

double sulk
Jul 2, 2010

Sock on a Fish posted:

php more like lol

http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/


We checked the Apache source, and it complies exactly with the RFC: if there is NO unescaped ‘=’ in the query string, the string is split on ‘+’ (encoded space) characters, urldecoded, passed to a function that escapes shell metacharacters (the “encoded in a system-defined manner” from the RFC) and then passes them to the CGI binary.

Unfortunately, it appears the PHP devs forgot about this section of the RFC, and decided to remove the code which defends against it somewhere in 2004:


Oddly enough, the PHP documentation still claims that PHP ignores command line arguments when run in CGI mode. That documentation page also describes another mitigation used in PHP: the REDIRECT_STATUS environment variable must be set, or PHP will refuse to run as a CGI script. This means we cannot directly access /cgi-bin/php5-cgi. This doesn’t really inconvenience us though, as mentioned earlier :-)

this is a lot of words. does it mean that php sucks?

tef
May 30, 2004

-> some l-system crap ->
Rasmus :allears:

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

tef posted:

Rasmus :allears:



:swoon:

Inverse Icarus
Dec 4, 2003

I run SyncRPG, and produce original, digital content for the Pathfinder RPG, designed from the ground up to be played online.

Jonny 290 posted:

i'm a Maker. i Make things. also i have no understanding of basic electrical concepts and think LEDs are light bulbs.

this is me

hello

Opinion Haver
Apr 9, 2007

Tiny Bug Child posted:

this only happens if your server is set up in a weird stupid way using an old module nobody uses anymore. i saw a link earlier this morning explaining it but now i can't find it

ghc had a similar but where you could do ./foo +RTS -p /path/to/outfile.prof -RTS and it'd scribble over that path with profiling data, which was a pretty obvious problem for cgi and setuid stuff

they fixed it in 7 so that you have to explicitly enable runtime system options at compile time

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Tiny Bug Child posted:

this only happens if your server is set up in a weird stupid way using an old module nobody uses anymore. i saw a link earlier this morning explaining it but now i can't find it

lmao you are such a loser

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Necc0
Jun 30, 2005

by exmarx
Broken Cake

Anal Tributary posted:

ive been doing interviewstreet challenges to learn how to do Real Programming Problems

for some reason, they have support for loving lua, but not javascript. i'm using python instead but still, what the gently caress? ugh.

e: also if anyone can give me hints on the "unfriendly numbers" challenge (not a solution obviously!! i aint no cheater) that'd be nice; i timed out on the last 3 test cases. it really sucks that they don't show you any details about the test cases :(

pick up an algorithms book and learn some math

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post

Necc0 posted:

pick up an algorithms book and learn some math

but i want to program, i dont want to waste time with math

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
seriyos question does anyone know why newer gccs link against multiple precision complex number library http://www.multiprecision.org/index.php?prog=mpc

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Inverse Icarus posted:

this is me

hello

learn:
ohm's law
power law
kirchoff's rule

and you're way ahead of most Makers

ppp
Feb 13, 2012

by angerbot

Lysidas posted:

seriyos question does anyone know why newer gccs link against multiple precision complex number library http://www.multiprecision.org/index.php?prog=mpc

GCC has been integrated with the MPC library. This allows GCC to evaluate complex arithmetic at compile time more accurately. It also allows GCC to evaluate calls to complex built-in math functions having constant arguments and replace them at compile time with their mathematically equivalent results. In doing so, GCC can generate correct results regardless of the math library implementation or floating point precision of the host platform. This also allows GCC to generate identical results regardless of whether one compiles in native or cross-compile configurations to a particular target. The following built-in functions take advantage of this new capability: cacos, cacosh, casin, casinh, catan, catanh, ccos, ccosh, cexp, clog, cpow, csin, csinh, csqrt, ctan, and ctanh. The float and long double variants of these functions (e.g. csinf and csinl) are also handled.

Necc0
Jun 30, 2005

by exmarx
Broken Cake

Necc0 posted:

pick up an algorithms book and learn some math

not being a dick any help we give you would prob fly over your head unless you have a baseline understanding of certain things

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Inverse Icarus posted:

this is me

hello
tbf there's lots of EEs who understand circuits and digital logic perfectly well but they glaze over at standard CS theoretical concepts

its like that line in hitchhiker's guide, "they still think digital watches are pretty neat"

(this includes university professors btw)

Nomnom Cookie
Aug 30, 2009



Necc0 posted:

pick up an algorithms book and learn some math

anal, if you're going to do this and also keep programming JS then also learn yourself some VM internals. knowing an algorithm is worth dick poo poo if you can't implement it.

Nomnom Cookie
Aug 30, 2009



Jonny 290 posted:

i'm a Maker. i Make things. also i have no understanding of basic electrical concepts and think LEDs are light bulbs.

umm you supply power and ground and it lights up it sounds like a lightbulb to me??? have you been to home depot lately they even have led light bulbs now :owned:

Nomnom Cookie
Aug 30, 2009



Nomnom Cookie posted:

anal, if you're going to do this and also keep programming JS then also learn yourself some VM internals. knowing an algorithm is worth dick poo poo if you can't implement it.

i still don't get why people are saying this guy who likes front end work should learn algos though. if you're doing anything that counts as implementing an algorithm on your loving webpage or code-behind or whatever the gently caress then you hosed up bad.

abraham linksys
Sep 6, 2010

:darksouls:

Nomnom Cookie posted:

i still don't get why people are saying this guy who likes front end work should learn algos though. if you're doing anything that counts as implementing an algorithm on your loving webpage or code-behind or whatever the gently caress then you hosed up bad.

idk every time i hear someone's tale from an interview it's not "so they had me mock up a quick web application on the platform of my choice using a provided API" (this would be a killer loving way to interview a front-end dev btw) it's "well they had me whiteboard code these 17 different math/algo problems"

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

ppp posted:

GCC has been integrated with the MPC library. This allows GCC to evaluate complex arithmetic at compile time more accurately. It also allows GCC to evaluate calls to complex built-in math functions having constant arguments and replace them at compile time with their mathematically equivalent results. In doing so, GCC can generate correct results regardless of the math library implementation or floating point precision of the host platform. This also allows GCC to generate identical results regardless of whether one compiles in native or cross-compile configurations to a particular target. The following built-in functions take advantage of this new capability: cacos, cacosh, casin, casinh, catan, catanh, ccos, ccosh, cexp, clog, cpow, csin, csinh, csqrt, ctan, and ctanh. The float and long double variants of these functions (e.g. csinf and csinl) are also handled.

Turns out I don't care about this nearly as much as I thought I did

Adbot
ADBOT LOVES YOU

CaptainMeatpants
Jun 1, 2010

they're just trying to get him interested in programming and not the shitbutt business logic of web "development"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply