Programming @ 4-ch Archives

Programming @ 4-ch Archives

Be it HTML, C++, Java or whatever language you prefer, programming is what we do best around this board.
Markup languages are also fine around here, as with all the "not so real" languages of Shell script, CSS, and other various third party scripting languages.
  • We are sick of language discrimination, more so the PHP/Java bashers. There will be little tolerance of blatant and repetitive insults. You are still welcome to bring forward a sensible, insult-free argument regarding a certain topic at the appropriate time and place for it.
  • Please use WakabaMark or the appropriate HTML tags (with HTML enabled, of course) to format your code.
Rules · 規則
基本的には英語の使用を強く希望します。ただ日本語板の場合は日本語か英語。
Board look: Amber Blue Moon Buun Channel4 Futaba Headline Mercury Mittens Pseud0ch Tanasinn Toothpaste

[JS] Help me find out the correct speed to sync up with the song 太陽いわく燃えよカオス (5)

1 Name: #!/usr/bin/anonymous : 2012-08-10 08:31 ID:2Uhzsz2B

Hi, so a friend made this for me after I linked them to the Nyaruko-san OP on YouTube. He said that using the + and - buttons, it ought to sync up with any beat.
My apologies if I mesed up the indentation in the following copypaste:

<html>
<head>
<title>(」・ω・)」うー!(/・ω・)/にゃー!</title>
<script type="text/javascript">var speed = 250;
var looper = setInterval(function(){ u.style.display="inline";
nya.style.display="none";
setTimeout(function(){ u.style.display="none";
nya.style.display="inline";
},speed);
},speed*2);
function unya(){
Post too long. Click to view the whole post or the thread page.

2 Name: #!/usr/bin/anonymous : 2012-08-10 08:32 ID:2Uhzsz2B

I should probably add that the title of the Nyaruko-san OP is 太陽いわく燃えよカオス.

3 Name: #!/usr/bin/anonymous : 2012-08-10 08:33 ID:2Uhzsz2B

err, not 太陽いわく, but 太陽曰く. My apologies.

4 Name: #!/usr/bin/anonymous : 2012-08-14 21:35 ID:owHAmwwP

I think Audacity has a beat-matcher built in. That is, it can detect the BPM of a song. I used it to make StepMania simfiles.

Also, you should send this to Tokiko when it's finished (if you're not him).

5 Name: ni : 2012-08-25 07:41 ID:vzwhkGjH

http://ieserver.net/

roujinkai dip.jp pass//// 4rfv6yhn1qak

This thread has been closed. You cannot post in this thread any longer.

"4tran"? (52)

1 Name: #!/usr/bin/anonymous : 2008-01-02 08:24 ID:x3wju2qA

I don't know too much about programming, but I am curious about this: Is it possible to make a 4chan (or any *chan) site, however simple it may be, in fortran? I seriously doubt it, but hey, that's what I asked for.

43 Name: #!/usr/bin/anonymous : 2011-09-02 22:41 ID:Heaven

FOOGERTS

44 Name: #!/usr/bin/anonymous : 2011-09-09 20:54 ID:Heaven

frogettes

45 Name: #!/usr/bin/anonymous : 2011-09-17 02:05 ID:Heaven

Baguettes

46 Name: #!/usr/bin/anonymous : 2011-09-25 22:57 ID:Heaven

fat gits

47 Name: #!/usr/bin/anonymous : 2011-10-03 02:29 ID:Heaven

FAT GITS

48 Name: #!/usr/bin/anonymous : 2011-12-21 23:02 ID:Heaven

Gadgots

49 Name: #!/usr/bin/anonymous : 2012-01-26 01:40 ID:K0BjkvGN

If you want to be cool and challenge yourself, write the website not in "modern" Fortran, but in Fortran 66 or Fortran 77 <- DUBS languages!!!

7^2 GET

50 Name: #!/usr/bin/anonymous : 2012-04-20 21:13 ID:Heaven

51 Name: #!/usr/bin/anonymous : 2012-07-31 16:35 ID:5/0f+pg0

check out Factor http://factorcode.org/

52 Name: #!/usr/bin/anonymous : 2012-10-20 14:12 ID:Heaven

Well, it's obvious there is just not enough love for trans-fortran programmers. Every link google knows for "THE" operation (C->F translator, so you can compile regular cgi/php) is 404.

This thread has been closed. You cannot post in this thread any longer.

I reproduced an error I found in safari. (3)

1 Name: !!nxAAFzeH : 2012-04-20 18:02 ID:bYNH13z5

I recently reproduced an KERN_INVALID_ADDRESS error I found in Safari. Where should I go from here? Could the right person make an exploit out of this?

gdb log is here.

http://paste.pocoo.org/show/584311/

2 Name: !!nxAAFzeH : 2012-04-20 20:50 ID:bYNH13z5

Also, I disassembled all of the functions in Safari.
http://minus.com/mbohY4UH2o/

3 Name: #!/usr/bin/anonymous : 2012-05-17 04:15 ID:oSu5BkGN

Put it in html and then troll Mac users?

This thread has been closed. You cannot post in this thread any longer.

Google app engine (2)

1 Name: #!/usr/bin/anonymous : 2012-05-06 12:43 ID:EcvP9V7E

I want to make a small webapp and learn Python at the same time - because I might want to do a 2d game later and I figured that I would use python for that as well and this project would be a good chance to do so. The problem is, I would want free hosting. Google app engine is free afaik... any experiences using it? Anything?

2 Name: #!/usr/bin/anonymous : 2012-05-09 14:14 ID:k9eAMYMj

Just get some shared hosting or buy a VPN. It's not expensive and a sensible investment.

This thread has been closed. You cannot post in this thread any longer.

Shitpostan (2)

1 Name: #!/usr/bin/anonymous : 2012-02-24 20:39 ID:RfrRcM3F

Check unary dubs.

2 Name: #!/usr/bin/anonymous : 2012-02-24 20:58 ID:Heaven

Bad frog! Don't pee-pee on strangers! Come back home!

This thread has been closed. You cannot post in this thread any longer.

What is the diff between RSS and Atom feeds? Is one better? (2)

1 Name: #!/usr/bin/anonymous : 2012-02-19 01:29 ID:j4+woF/p

Most news feed programs I have seen say they support both, but I do not see a difference between the two.

This thread has been closed. You cannot post in this thread any longer.

Excessive file access in a perl script? (10)

1 Name: #!/usr/bin/anonymous : 2011-07-22 16:53 ID:5HtMA4vP

I'm working on this perl script for a website - I have basically two types of pages, A and B, each with a title, some text and other details stored in an individual text file. Each A is associated with a number of Bs, up to 100 or so, which are listed on its page. In order to generate the list of B's for an A page it has to open each relevant B file to read the title out of it.

So as it stands, to generate certain A pages it might be opening 100+ different B files. Now I don't know jack shit about servers but I am aware that file access takes time. And given that it's on shared hosting, am I likely to run into problems here when it goes public? Would I be better off putting all the B's in one big file, or splitting them into blocks of say 10-20, or even just biting the bullet and using some SQL database? Or is it fine the way it is?

2 Name: ᴍʀ. ᴠɪʟᴇ!PRoGN.piPE : 2011-07-24 16:24 ID:Heaven

if you want database-like functionality but don't want to use SQL, try using Storable

use Storable;
my %big_hash = (
...
);
store \%big_hash, 'this_file.db';

and to open:

use Storable;
my %hash = %{ retrieve 'this_file.db' };

3 Name: ᴍʀ. ᴠɪʟᴇ!PRoGN.piPE : 2011-07-24 16:25 ID:Heaven

*** DOUBLE POST ***

note that Storable works with scalars and arrays too of course

4 Name: #!/usr/bin/anonymous : 2011-07-24 23:38 ID:5HtMA4vP

>>2-3 Thanks, I'll keep that in mind.

do you know if the way I'm doing it now will cause any significant performance issues though? I'm happy enough sticking with it for now if it works just as well, rather than redoing everything.

5 Name: ᴍʀ. ᴠɪʟᴇ!PRoGN.piPE : 2011-07-27 17:00 ID:Heaven

>>4

you will take a significant performance hit from reading 100+ files every time you generate a page

6 Name: #!/usr/bin/anonymous : 2011-07-27 22:14 ID:Heaven

>>5
ok, thanks. I suspected as much, I was just vainly hoping there might be some obscure reason that it'd all be fine and I wouldn't have to rewrite everything. :D

7 Name: #!/usr/bin/anonymous : 2011-07-28 21:51 ID:Heaven

you should really generate the A pages as static html files and only regenerate them when the content changes.

8 Name: #!/usr/bin/anonymous : 2011-07-31 10:28 ID:Heaven

I agree with >>7

9 Name: 1 : 2011-08-01 04:57 ID:Heaven

>>7-8 yeah that's a good plan actually. I may well do that.

10 Name: #!/usr/bin/anonymous : 2012-01-15 16:18 ID:2W+UB1mm

Just curious: I have a similar type of site as >>1 but it uses a MySQL database, is it worth doing something like >>7 suggested with that too?

This thread has been closed. You cannot post in this thread any longer.

Common useful applictions of Perl? (10)

1 Name: #!/usr/bin/anonymous : 2012-01-07 00:13 ID:6xrC+DlV

I am currently teaching myself perl for web/cgi things. But what are other common or useful things that people often use perl for?

2 Name: #!/usr/bin/anonymous : 2012-01-07 18:05 ID:lCRjMB9o

Nothing that I can think of. Most web stuff is done in PHP or ruby.

3 Name: #!/usr/bin/anonymous : 2012-01-07 21:54 ID:l/weRgnQ

Perl was invented to replace awk and sed for shell scripts that parse the output of other shell scripts, so that's what it's best for. Eventually it became used for CGI, but it wasn't great for that, and was replaced with PHP which is sort of like Perl for the web with built in features like templates and SQL queries. Nowadays, Java, Python and Ruby have web frameworks which are replacing PHP. Perl is still useful for shell scripting but it being replaced by Python as the de-facto all-purpose scripting language.

4 Name: #!/usr/bin/anonymous : 2012-01-08 09:14 ID:/jXCujNJ

>>3

is mostly if not absolutely correct

5 Name: #!/usr/bin/anonymous : 2012-01-08 23:15 ID:Heaven

> was replaced with PHP which is sort of like Perl for the web with code/html mixing and lots of security vulnerabilities.

FTFY

6 Name: #!/usr/bin/anonymous : 2012-01-09 08:26 ID:Heaven

>>3 is completely incorrect and mostly harmful

7 Name: #!/usr/bin/anonymous : 2012-01-10 06:17 ID:uyPS5dyb

>>3
>>6
Okay, cite sources, give reasons why.

8 Name: #!/usr/bin/anonymous : 2012-01-14 19:09 ID:Heaven

>>7
Larry Wall.

9 Name: #!/usr/bin/anonymous : 2012-01-17 00:04 ID:Heaven

>>7 should realise that >>3 should be the one providing citations since they made the stupid claim in the first place

10 Name: #!/usr/bin/anonymous : 2012-09-20 14:40 ID:Heaven

Wakaba and Kareha, I think they're useful.

https://www.socialtext.net/perl5/Applications. Yeah, most of them can be found in CPAN.

Also, http://padre.perlide.org.

This thread has been closed. You cannot post in this thread any longer.

How does one put AA art into HTML? (4)

1 Name: #!/usr/bin/anonymous : 2012-01-07 22:03 ID:SP7bgO4b

I tried when I went to put some aa into a plain html on my server, after saving I refreshed the page to look at it and this [aa]( ´・ω・)[/aa] had turned into ( ´・ω・)

So obviously that does not work. How does one do it?

2 Name: #!/usr/bin/anonymous : 2012-01-07 22:13 ID:SP7bgO4b

>>1 lol my aa tags

Also when I tried (ノ ಠ益ಠ)ノ it came out as (ノ ಠ益ಠ)ノ

3 Name: #!/usr/bin/anonymous : 2012-01-08 19:07 ID:Hd2db/sX

Several ways, you can do <pre>AA here</pre> and/or make sure your using text/html; charset=utf-8 as your content-type.

4 Name: #!/usr/bin/anonymous : 2012-01-09 20:37 ID:uVz27d74

>>3

Ah thank you. The <pre> tag did not work but changing it from "text/html; charset=ISO-8859-1" to what you posted did work. Thank you!

This thread has been closed. You cannot post in this thread any longer.

Starting With C - good idea? (39)

1 Name: #!/usr/bin/anonymous : 2011-04-13 14:59 ID:2wrpajD3

Hey all, I'm thinking of going into programming, self-studying it and stuff. Currently, I'm a high schooler in a school with no programming classes, and I want to know if C is a good place to start. I heard that once you learn C, other languages would be easier to learn - is that true? Anyways, if anyone has some useful books/websites for learning programming, I'll appreciate it if you share it with me. Thanks in advance!

30 Name: #!/usr/bin/anonymous : 2011-10-14 02:46 ID:758Rs05M

>Skip the C and jump to C++. It is only a revamping of C after all.

I'm just going to go ahead and assume you've never used C.

C and C++ are world apart.

31 Name: #!/usr/bin/anonymous : 2011-10-15 03:05 ID:Qw1zTgvV

From my comprehension, they are not far apart. C++ is built on C's concept. Hence the name C=C+1; The core of C is Pointer, and C++ expands the structure of C's object. A lot of scripts borrows this method.

For the condolence of Dennis Ritchie, it is time to study C.

By the way, Kintaro Oe learned C in one week.

32 Name: #!/usr/bin/anonymous : 2011-10-15 15:15 ID:73ruzNfJ

>From my comprehension, they are not far apart.

If you think this way you doesn't know the power of C++ fully. Just look at stl and boost, they aren't close to C at all.

33 Name: #!/usr/bin/anonymous : 2011-10-16 20:20 ID:758Rs05M

>Just look at stl and boost, they aren't close to C at all.

STL and Boost are both terrible and you should feel terrible for using them.

34 Name: #!/usr/bin/anonymous : 2011-10-18 18:55 ID:Cj4FxbGM

>STL and Boost are both terrible

Maybe boost is too complicated, but STL is the part of language. Don't stay in 90's.

35 Post deleted.

36 Name: Anonymous : 2011-11-01 18:41 ID:Sl6AonB7

I'd start with java. Its 'similar' to c++ in terms of syntax, but it is much more forgiving in terms of how it handles memory and how it compiles. C/C++ are a more powerful languages, but for a beginner it doesn't really matter. You have to learn the basic constructs before you can do anything anyway so early on the functionality is about the same.

37 Name: #!/usr/bin/anonymous : 2011-11-04 17:31 ID:OrbhywVG

The only thing I'm most concerned about for the original poster is that they are somewhat timid to try to learn something. It may be that they need to start with another language in order to be more productive in doing the things that they want to do, but what would it cost them to find that out themselves the hard way? Probably not much at all. The cost in stepping back and worrying if it is going to be hard is going to be more, in lost time, and in perhaps cutting them off from their potential.

38 Name: #!/usr/bin/anonymous : 2011-11-05 14:40 ID:FtRXRPJX

Java.

  • Results quickly
  • Compiling basics without nightmares
  • You can work in mobile, android, desktop and web dev
  • Migration to PHP/C# easy
  • IDE magic, but one can also rock the console
  • Jobs

39 Name: #!/usr/bin/anonymous : 2011-12-27 23:37 ID:PYLqK/5E

Start with some script like Perl or Python, then go to C.

This thread has been closed. You cannot post in this thread any longer.

New thread

Title:
Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: