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
MrMoo
Sep 14, 2000

Gilgamesh posted:

something stupid.
name="stupid"

Adbot
ADBOT LOVES YOU

MrMoo
Sep 14, 2000

im_afraid_of_clowns posted:

I want to allow access to a site if terms are agreed upon. If the user hasn't agreed, they are re-directed to the terms page. What is a good approach?

Any login system, make the terms part of the account signup agreement.

MrMoo
Sep 14, 2000

Rocko Bonaparte posted:

http://finance.google.com/finance?morenews=10&rating=1&q=NYSE:IBM
I am trying:

curl -d "morenews=10" -d "rating=1" -d "q=NYSE:IBM" http://finance.google.com/finance > test.html
Talk about making something way more complicated that it needs to be.

ShoulderDaemon posted:

Edit: This is sort of a pet peeve of me, I have no idea why the GET syntax settled on using ampersand to separate query components, even though many shells have used that as a reserved character for ages.

Ampersand wasn't evented for shell syntax, spaces don't work well in shell's too and that's 110% a neckbeards fault.

MrMoo fucked around with this message at 07:58 on Dec 9, 2008

MrMoo
Sep 14, 2000

csammis posted:

Looks like someone got his Cheerios pissed in on the wrong side of the bed this morning :shobon:

:v:

If you know how to edit a file with a space in it, i.e. adding quotes you would do the same with other commands that gently caress up. It just seems a lot longer to find about a -d parameter than to use quotes wrapped around the URL.

MrMoo
Sep 14, 2000

Rocko Bonaparte posted:

I just get pissy when I go into a thread that's about asking questions and get shat on.

:haw: It's not a programming question either.

It was a lovely retort though, I apologise, I updated it to something slightly less antagonistic.

MrMoo
Sep 14, 2000

Ledneh posted:

We're trying to get hold of the source code again, but in the meantime, is there anything I can do to make a 64 bit compile of my application work? Some sort of wrapper or trick I can do so I can at least test things until we get a 64 bit library?

There is no need at all unless you are moving to IA64.

MrMoo
Sep 14, 2000

fletcher posted:

I've got a situation where data is stored in two different RDBMS's and I need to essentially do a simple JOIN between two tables that are in the different systems.

I was pondering the best method for this too this week, you could try feeding everything into a temporary table.

MrMoo
Sep 14, 2000

Bob Morales posted:


Anyway, I started getting back into C about 2 months ago (due to a serious lack of things to do at work), and grabbed a Dummies book on mySQL and PHP. I don't know if it's the books fault or if PHP is just plain retarded, but I find myself saying "What the gently caress" every 3 pages. The examples are horrible but I'm getting through everything fine. It's just the constructs of the language that are driving me crazy.

Should I just finish the book and ditch PHP for something else to do little web apps with? I just want to practice and make little projects that interface with SQL databases. Picture uploader, convert portions of our timeclock system over to PHP, maybe a simple forum.

The problem is that due to critical mass there is a lot of crap PHP about. Pop over to the PHP thread or Web development thread and ask there.

In brief, use PDO, use PHP as a template language itself, and use phpmyadmin for MySQL, phpldapadmin for OpenLDAP.

MrMoo fucked around with this message at 03:22 on Mar 5, 2010

MrMoo
Sep 14, 2000

rt4 posted:

It's bad enough when you're using MySQL; don't make the suffering any worse by using an inferior tool.

http://wb.mysql.com/

WB has a lot of interface clutter, I hate phpmyadmin for it's support of views, cross-database relationships, but it runs on the server so you don't need to open up ports or tunneling and it's relatively easy and clean to use. My DB is 8,000 miles away from my desktop so it ends up more convenient way of working.

I'm not overly impressed with mysql-query-browser or mysql-admin either.

MrMoo
Sep 14, 2000

Dijkstracula posted:

Since there are no jmps in this program, there should only be one basic block, and that should only ever get executed once, so where the hell are these things coming from? :smith:

I would presume a tonne of hooks for glibc.

MrMoo
Sep 14, 2000

I would guess cond 1 0x123 == ptr and break free

MrMoo
Sep 14, 2000

Case sensitive, you probably need open a shell and run "sudo python install.py" in whatever directory it is.

(edit) not on Unix.

MrMoo fucked around with this message at 10:10 on Apr 23, 2010

MrMoo
Sep 14, 2000

Dijkstracula posted:

though in his defence, he's clearly on windows and people are telling him to use sudo, so it's not like we're on the whole giving him useful advice here

:haw: oh, "Command prompt".

I only see Windows mentioned in the testimonials page. Although from http://www.toadz.dk/2008/07/install-eric-python-ide-on-windows/ I'd guess is because he's only just installed Python and needs to reboot first for the path to update in order for Python to work.

MrMoo fucked around with this message at 10:17 on Apr 23, 2010

MrMoo
Sep 14, 2000

That's for non-relocatable dynamic library? The segment addresses will be specified on the command line or at the head of some inline assembly.

MrMoo
Sep 14, 2000

From a scalability point of view you want the servers to be rate limited so they have enough headroom for latency of the majority of the client base but not too much to cause too much server resource overhead that eats into the maximum number of simultaneous clients.

It's an interesting CS/engineering issue that causes basic HTTP delivery to win out in real terms as it is always cheaper to deliver TCP offloaded HTTP streams than dynamic RTSP streams.

MrMoo
Sep 14, 2000

I would assume Blogger should be sufficient enough as Google use it for their development blogs.

MrMoo
Sep 14, 2000

BigRedDot posted:

Another vote for cmake, in 20 years it's the best platform detection/build system I've run across. Out-of-tree builds, flexible configuration, pretty output, correct dependencies for build-time generated subtargets, simple config files for simple cases.

It's cute, especially for the administrator, but it has poor platform support and unbelievably lovely for modifying for even basic stuff like PIC enabled static libraries.

The CMake team aren't too hot at supporting the versions in stable Linux distributions so you end up with significant changes between releases that really doesn't make CMake look remotely useful.

MrMoo
Sep 14, 2000

Rocko Bonaparte posted:

Another thing is that these build directories are pooping out all over the source file system, which I didn't think was the point, so generally how do people handle this in scons?

You can check out what I have done, it certainly could be better but I don't know how,

http://code.google.com/p/openpgm/source/browse/#svn/trunk/openpgm/pgm

Autoconf isn't reliable enough for this project so I have one SConstruct for each compiler. There are plenty of SCons bugs that are tedious to workaround.

Removing flags is lovely and I have an annoying problem managing external dependencies such as Google Protobufs.

MrMoo
Sep 14, 2000

It sounds like unit testing, I managed to get Scons to cope with that. Basically make all the names #define macros then #include the source.

If you want to rebuild the same file with multiple options, clone the environment and set new object suffix or prefix.

MrMoo
Sep 14, 2000

You could try setting SO_SNDBUF to 0.

MrMoo
Sep 14, 2000

I'm using Yahoo's service, but it's only good for the US.

MrMoo
Sep 14, 2000

Rampager posted:

How does programming in another (real) language (ex German, Arabic, Japanese) work? I can understand strings and the like but if you put in say a hiragana あ as a variable name [ int あ = 5; ] would the compiler allow it? Are there specific additions to compilers made to handle this case, or is anyone who programs forced to use the English alphabet?

You can almost start to do this now, but the predominant set of tools, i.e. Visual Studio is unbelievably poo poo at i18n support. Generally it's Latin character variables with locale encoded comments.

Don't forget would be useful for doing any moderate to advanced level of math, moving from written formulae to ANSI code is awful.

MrMoo fucked around with this message at 07:46 on Dec 29, 2010

MrMoo
Sep 14, 2000

Otto Skorzeny posted:

I loving hate build systems I hate them I hate them I hate them and yes I know that isn't a question

I'm onto using three build systems now and they all suck. SCons for development, Autoconf & Automake for Unix distribution, CMake for Windows distribution.

Kill me.

MrMoo
Sep 14, 2000

BigRedDot posted:

I rather like cmake (by comparison to every other POS I've ever had to use).

Compiler support is weak and the format isn't too stable, a lot of recent changes causing significant incompatibilities with say Ubuntu 8.04's bundled version.

Typical problematic targets: ICC on Linux x64, Sun Pro on Linux, MinGW-32, MinGW-w64 and Wine-GCC.

I'm still hit bad by dependencies on unit tests, especially with Sun Pro & MinGW which have weak linkers, they don't drop unused functions and hence redundantly demand additional modules.

Autoconf support in CMake/SCons is overly verbose and definitely could do with improvement.

This doesn't appear to work anymore in CMake, it's pretty much c&p from the CMake documentation.

code:
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
      FORCE)
endif(NOT CMAKE_BUILD_TYPE)

MrMoo fucked around with this message at 00:51 on Feb 2, 2011

MrMoo
Sep 14, 2000

McFunkerson posted:

As an example MetaX does exactly what I'm asking. It's pretty much a GUI wrapper for Atomic Parsely which is covered under the GPL. In fact if you dig into the application bundle you can pull out the Atomic Parsley binary. The developer provides the source code for Atomic Parsely, but in his FAQ says he does not provide source code for MetaX. Is this ok to do or is the developer technically in violation of the GPL?

Static linking of non-GPL compatible code is usually prohibited, the workarounds are to use dynamic linking or IPC of some form. In this situation, much like any media transcoder, is to exec a GPL binary and communicate over stdin/sdout.

MrMoo
Sep 14, 2000

Also, Google's updater is open source after various complaints asking what it was doing. On Vista+ it now has a feature to use Windows' Restart Manager to handle updates when the application is still running.

http://google-opensource.blogspot.com/2009/04/google-update-goes-open-source.html

MrMoo
Sep 14, 2000

Jam2 posted:

An important factor is the authenticity of the experience.

What does this mean? Aged and tedious to use? For that go with one of the BSDs instead of Linux.

MrMoo
Sep 14, 2000

Well generally you have your Unix or similar boxes and then remotely connect via PuTTY or other SSH program. Therefore you are not ever setting at a Linux or Unix desktop to do your work unless you really, really want to. Thus it doesn't matter whether you choose Fedora, Ubuntu, Debian, or whatever distribution.

MrMoo
Sep 14, 2000

Jam2 posted:

I've been looking into xcode. Am I cheating myself out of useful knowledge by going straight out of the gate to xcode and llvm instead of a traditional editor and gcc?

llvm offers a significantly more comprehensive set of warnings and errors than gcc, unless you really like stabbing yourself in the eye I'd recommend learning with that.

MrMoo
Sep 14, 2000

nielsm posted:

A working installer shouldn't take a long time to write and requires very little maintenance.
When making a new release, if there aren't any new files to distribute, and the installation procedure hasn't changed otherwise, you'll just need to increment the version number in the installer source and click Build Installer again.

It's really easy with CPack and NSIS, it's just that NSIS doesn't have a native 64-bit version to target installs in Program Files instead of Program Files (x86).

It was pretty much the following at the end of CMakeLists.txt
code:
include (InstallRequiredSystemLibraries)
include (CPack)
Then build the installer for Win32 or Win64:
code:
nmake package

MrMoo
Sep 14, 2000

Scaevolus posted:

Have any open-source licenses been tested in court? I was under the impression that there are almost no precedents for them.

GPL has many times, the anti-Tivo clauses in GPL 3 might hit court soon though.

http://gpl-violations.org/index.html
http://infinityoverzero.com/bbox/

MrMoo
Sep 14, 2000

A question regarding bijection, a few database-free image hosting configurations like the belated Waffles use an extended base path, e.g. base64, base62, or base36, with minor modification for URL encoding. This produces a long URL, 22 characters if using MD5 checksums of the file contents for example:

https://wi.somethingawful.com/bf/bfeda567b2173dcc96f2f6b0efba56fba6c6bb93.jpg

Many of the popular sites now use shortened identifiers similar to URL shorteners, e.g.

http://i.imgur.com/dgsJW.jpg

Which would appear to be a base62 ID allowing up to a billion resources with five digits, bijection is used to randomize the number space to prevent idle snooping I guess.

Now the dumb question, is the basic psuedo-random number generator (PRNG) also a bijection function? Does reducing the size of the finite field affect the bijection status if not to a round number in the native base?

code:
f(x) = (x * 1103515245 + 12345) % (62 * 62 * 62 * 62 * 62)

MrMoo fucked around with this message at 19:44 on May 14, 2011

MrMoo
Sep 14, 2000

The code is inefficient on current hardware though, you get better performance with by prefetching the source buffer in parallel and filling the cache line:

code:
void byte_copy(to,n,from)
register char *to;
register unsigned int n;
register char *from;
{
  int i = 0, count8 = n >> 3;
  if (count8) {
    while (count8--) {
      to[i]   = from[i];
      to[i+1] = from[i+1];
      to[i+2] = from[i+2];
      to[i+3] = from[i+3];
      to[i+4] = from[i+4];
      to[i+5] = from[i+5];
      to[i+6] = from[i+6];
      to[i+7] = from[i+7];
      i += 8;
    }
    n %= 8;
  }
  while (n--) {
    to[i] = from[i];
    i++;
  }
}
That's assuming the pointers are aligned, if they are not you can do a loop to align up first. If both pointers have different alignment you are screwed no matter what.

Similarly you can get more performance by copying with longer words but not always. Best performance is to use the assembler instruction for string copy if the string is long enough to overcome the instruction startup costs. On latest Nehalem chipsets as has been posted about a lot it's actually faster to copy in reverse than forward too.

MrMoo fucked around with this message at 16:10 on Jul 1, 2011

MrMoo
Sep 14, 2000

Otto Skorzeny posted:

On a bunch of recentish Intel hardware the rep-prefixed string instructions are slower than just doing the loop yourself, no?

The 64-bit moves listed here I guess, its fundamentally a rep movsq

https://patchwork.kernel.org/patch/61240/

MrMoo
Sep 14, 2000

Thermopyle posted:

WTF do I need to look in to to write something like Google+? Not a social network, but interactive, asynchronous, web apps. Not as complex as G+ either, but how awesome it is has got me jealous of devs who know this crap.

Have a look at this recent article,

http://highscalability.com/blog/2011/7/12/google-is-built-using-tools-you-can-use-too-closure-java-ser.html

MrMoo
Sep 14, 2000

The controller is the chip on the NIC that implements the Ethernet logic, have a look at this Intel document for some insight.

http://www.intel.com/Assets/PDF/general/linecard_ec.pdf

MrMoo
Sep 14, 2000

GrumpyDoctor posted:

That being said, Python is regularly touted as a "good beginning language," although I don't know it myself.

I'm seeing listed in quite a few jobs these days, from Quants to HPC. BofA has some developer/architect positions in Python too:

http://careers.bankofamerica.com/Jo...y=&LocationID=0

MrMoo
Sep 14, 2000

Look Around You posted:

Perl's magic variables are loving insane. $$ is probably the most ridiculous (it's the PID).

Matches every shell, not that nuts.

MrMoo
Sep 14, 2000

wasabimilkshake posted:

1. If I compile a C library with MinGW, can I link against it in a MSVC project, or do I need to keep things entirely homogeneous?

Every compiler has CRT baggage, from MSVC2010 requiring msvr100.dll, Cygwin requiring cygwin.dll, and MinGW requiring libgcc.a and sometimes libmingwex.a.

quote:

2. True or false: A C++ application compiled as 64-bit on Windows (XP or 7 regardless, MSVS or MinGW regardless) will run on any 64-bit version of Windows (XP or 7 regardless). A C++ application compiled in the same fasion as 32-bit will run on WinXP, WinXP x64, Win7, or Win7 x64.

New versions of Windows introduce new APIs, so an application built for a new API won't work on an older version of Windows. Windows XP 64-bit is particularly lovely for not supporting anything useful but surprisingly popular in some financial circles.

I'd like to know how to package pyzmq into another installer as I maintain the Windows installer for ZeroMQ. Packaging Python bindings is a mystery.

Adbot
ADBOT LOVES YOU

MrMoo
Sep 14, 2000

I'm using CPack (CMake) and NSIS, luck has it there has been work on a 64-bit fork recently too.

WiX looks like way too much work, although Google seem have got it integrated with Gyp.

MrMoo fucked around with this message at 17:59 on Jun 20, 2012

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