Programming @4-ch

Programming @4-ch

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: Blue Moon Buun Futaba Headline Mercury Pseud0ch Toothpaste
1: RIP /prog/rider (41) 2: [ITT]Ppost your current programming thought[NOT WORTH AN ENTIRE THREAD] (10) 3: Reasons why Python 3 (and 2) is shit (9) 4: Befunge, Brainfuck, Obfuscated Crap (46) 5: How to make my own imageboard (10) 6: [Sharing]Your personal projects[Inspiration] (81) 7: 【Unix】new unix file types (23) 8: About "the -notation of Church" [sic] (6) 9: THE FUTURE OF TEXTBOARDS, IN !! (2) 10: SOCK_DGRAM (3) 11: Harga Lantai Kayu, Lantai Parket vs Lantai Vinyl (4) 12: Reading rar-content into memory using Java (5) 13: website without protection (5) 14: Will progrider ever come back? (6) 15: Brainfart: GCC and templates (11) 16: Corporate corner-cutting (5) 17: OUTSOURCED TO INDIA (4) 18: Unreadable scripts that print cool things (19) 19: help with emacs for Win32? (8) 20: LOLCODE (12) 21: Is imitating == plagiarism? (24) 22: Is There a magic solution to get first on google ? (15) 23: HAX MY ANUS (7) 24: DDos attack (5) 25: Visual Basic (17) 26: Groovy (52) 27: Anyone here using the Go programming language? (7) 28: Langton's ant (4) 29: [Perl] CGI Sucks - the next best thing? (18) 30: [4-ch] [sh] Keep Updated on New 4-ch Posts [tools] (7) 31: I love the BASIC languages... (25) 32: Agen Bola | Judi Bola | Casino SBOBET (9) 33: Anonymous BBS (18) 34: download lagu terbaru (5) 35: Free SMS/eMail On Anonymously (3) 36: How do you motivate yourself to learn (9) 37: Preferred Editor(s) (176) 38: Is this board alive? (4) 39: os suggestions (11) 40: Agen Judi Poker Online dan Bandar Domino (2)

RIP /prog/rider (41)

1 Name: #!/usr/bin/anonymous : 2017-03-04 20:05 ID:QUE518++

progrider finally kicked the bucket.. shame. there's news about a new one at

32 Name: #!/usr/bin/anonymous : 2017-04-04 02:27 ID:hAq39soT

I actually love 4taba. forgot it existed.. it's awesome though. A real cute little site.

33 Name: #!/usr/bin/anonymous : 2017-04-06 06:33 ID:7u94De9v

A crap little shite*

34 Name: #!/usr/bin/anonymous : 2017-04-07 22:59 ID:hAq39soT

Collected memes

35 Name: #!/usr/bin/anonymous : 2017-04-08 03:54 ID:0Fa/lxv6


> ga/y/

Not clicking on that.

36 Name: #!/usr/bin/anonymous : 2017-04-21 08:06 ID:07N1kL1y

The pedophile /prog/ was the worst /prog/ ever. Do we have a pedophile-free replacement?

37 Name: #!/usr/bin/anonymous : 2017-05-09 20:39 ID:UBjv7BE9

>anonymous board

Pick one.

38 Name: #!/usr/bin/anonymous : 2017-06-07 08:23 ID:QpGFNZ2G

39 Name: #!/usr/bin/anonymous : 2017-06-15 04:05 ID:Heaven

why not just use 4-ch

40 Name: #!/usr/bin/anonymous : 2017-07-19 21:16 ID:DdkJdGdT

it is a cult. its posters are on psuedo-crack. I used to be a big fan until I realized how harmful its way of thinking is. As a fan of survival shows, I will make an analogy:

On Naked and Afraid XL, there was this one incident where half of the survivalists had to tap out on the same day. It began when they found a fruit tree and ate the fruit. they enjoyed it, it was good, but it took a couple hours for some, a whole twelve or so hours for others to begin feeling the awful excruciating pain that was caused by eating this fruit. Some were lucky, and did not get the poisoning.

Ladies and gentlemen, much of the things you read on here, the things you absorb here, are like this scenario. You get hooked and soak it all in, but it may take a good amount of time, perhaps years, before you notice the negative effects, and will you have the wisdom to know where it started?

goatfinger has a unique affect on people. it has the ability to bewilder and "change someone's entire perspective on life" as was with me and as I often hear. However, this perspective change is not so different from a psychotic experience. Beware.

41 Name: #!/usr/bin/anonymous : 2017-08-01 16:23 ID:DdkJdGdT

goatfinfer - incredibly shit

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

[ITT]Ppost your current programming thought[NOT WORTH AN ENTIRE THREAD] (10)

1 Name: #!/usr/bin/anonymous : 2017-05-04 20:01 ID:xt+YgsKm

Only the popular OOP styles are shit. Smalltalk and CLOS are what it should be, not the abominations that wrought AbstractCockSplitterFactoryFactory.

2 Name: #!/usr/bin/anonymous : 2017-05-23 00:33 ID:8L+pRFz6

using underscores as word separators in identifiers makes your code look clumsy and unprofessional

3 Name: #!/usr/bin/anonymous : 2017-05-29 14:27 ID:/Rr1imNS

Multiple words at all? Variables are nouns, functions are verbs. One word needed for each.

Also SmartCasualBusinessCase instantly bores me to tears

4 Name: #!/usr/bin/anonymous : 2017-06-01 18:21 ID:7bvGeVDb

הַשְׂכֵּל [hˈaskə͡l] is a popular Jewish name, it means "wisdom". Ironically, the Haskell programming language was named after this Hebrew word.

5 Name: #!/usr/bin/anonymous : 2017-06-01 20:36 ID:Heaven

Clojure is not a Lisp

6 Name: #!/usr/bin/anonymous : 2017-06-02 20:50 ID:/Rr1imNS

most developer blog posts are someone extolling and/or discovering something entirely mundane and obvious

7 Name: #!/usr/bin/anonymous : 2017-06-11 22:36 ID:7bvGeVDb

If you think about it, ``undefined behavior'' is a form of Russell's paradox.

8 Name: #!/usr/bin/anonymous : 2017-06-30 18:26 ID:/Rr1imNS

In Idris, = is a type constructor as well as the equality operator
i.e. 4 = 4 is a value (True) and also a type

my poor little brain.

9 Name: #!/usr/bin/anonymous : 2017-06-30 18:55 ID:Heaven

I lied, == is value equality

10 Name: #!/usr/bin/anonymous : 2017-07-29 18:54 ID:/Rr1imNS

Don't fucking toString because what kind of string? String for human eyes? String to turn back into thing? Descriptive string or secret string? Binary string? Is unicode okay?? Everything has toString, what if you had a car by accident but you wanted a string of a boat? Fuck

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

Reasons why Python 3 (and 2) is shit (9)

1 Name: #!/usr/bin/anonymous : 2017-06-16 00:22 ID:jv9oB1f2

  • FOIC
  • reduce is not built-in
  • no do-while statement
  • singled expression lambdas
  • no index lists
  • no frozenset literals
  • awfully bad scope rules
  • terrible OOP design
  • no pattern matching nor switch-case statements/expressions

2 Name: #!/usr/bin/anonymous : 2017-06-17 05:19 ID:Heaven

The forced indentation of code

3 Name: #!/usr/bin/anonymous : 2017-06-17 17:43 ID:ilN/++Zs

  • Try the Don't Indentation Any Code at $WORK for a month and tell me how that goes
  • reduce is Microsoft speak for fold-left, so that's actually a plus
  • why single out do-while? Do you even have named let in your favorite language?
  • Correct
  • I don't know what this is but it sounds specific to your favorite language
  • See above
  • Correct
  • As with all OOPs other than Smalltalk and CLOS
  • Correct, but switch/case is a specific form of pattern matching, and most other popular languages only started thinking about very limited pattern matching and destructuring bind (as separate features) in the last 5 years

4 Name: #!/usr/bin/anonymous : 2017-06-19 22:30 ID:jv9oB1f2

``reduce'' have been in LISPs before Microsoft was even created.
Frozensets are immutable sets in Python.

5 Name: #!/usr/bin/anonymous : 2017-06-21 19:33 ID:ilN/++Zs

Oh damn, busted. I must have been thinking of "accumulate".

They really don't have that? Does it at least have immutable map literals?

6 Name: #!/usr/bin/anonymous : 2017-07-03 23:23 ID:jv9oB1f2

No and no. Guido van Rossum is against immutability. He is also against TCO and recursion in general (search for: "neopythonic" "tail recursion elimination")

7 Name: #!/usr/bin/anonymous : 2017-07-16 19:53 ID:M3qI9Fmx

There is nothing wrong with forced indentation. A good programmer shall indent their code regardless. A bad programmer will make everything look like shit so forced indentation makes his good usable to others besides himself.

8 Name: #!/usr/bin/anonymous : 2017-07-16 19:55 ID:M3qI9Fmx

> no do-while statement

There already is while. A do-while construct is redundant.

9 Name: #!/usr/bin/anonymous : 2017-07-20 19:37 ID:ilN/++Zs

Both for and named let subsume while, to boot.

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

Befunge, Brainfuck, Obfuscated Crap (46)

1 Name: #!usr/bin/anon 2005-12-05 00:45 ID:PXVSoaQm

This thread is for my fellow brothers (and sisters?) who have embraced useless, obfuscated languages like Brainfuck.



37 Name: #!/usr/bin/anonymous : 2007-02-15 13:29 ID:Heaven

>>36 bits

Turning called and &c &c.

38 Name: #!/usr/bin/anonymous : 2007-02-15 16:19 ID:Heaven

Or rather, Turing. I spel gud.

39 Name: #!/usr/bin/anonymous : 2007-02-21 08:16 ID:Heaven

How should I do to make a loop in unlambda?

40 Name: #!/usr/bin/anonymous : 2007-03-10 04:13 ID:ATMDVxRe

I found a cool blog site with nice accessible introductions to esolangs:

41 Name: #!/usr/bin/anonymous : 2007-03-10 12:28 ID:Heaven

> nice accessible introductions to esolangs

That seems inappropriate!

42 Name: #!/usr/bin/anonymous : 2007-03-10 14:51 ID:ATMDVxRe

Well, esolangs have this "image" that they're about pain and masochism, but I rather prefer the mind-stretching quality of them. You're exposed to things you would never think of.

43 Name: #!/usr/bin/anonymous : 2017-03-07 17:56 ID:ry9qaaLI

dicks out for Harambe

44 Name: SHILLER : 2017-03-14 12:33 ID:d6KkahGl

...:::;;;; ・∀・)
∬;;__つ/ ̄ ̄ ̄/__ I made a /prog/.
旦 \/Win2000/


45 Name: #!/usr/bin/anonymous : 2017-03-18 10:48 ID:AgKmTw9h

5 shillings! I'm rich!

46 Name: #!/usr/bin/anonymous : 2017-05-23 00:36 ID:5GQ8Ujkt

Apparently your website isn't going to be available for another 24 hours.

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

How to make my own imageboard (10)

1 Name: #!/usr/bin/anonymous : 2013-12-13 02:52 ID:ivLZN6o0

I am very new to the imageboard setup stuff so I have no clue how to set it up. And I haven't/don't know how to make a table for a DB. If someone could he that would be great.

2 Name: #!/usr/bin/anonymous : 2013-12-13 02:59 ID:ivLZN6o0

Like step by step help.

3 Name: #!/usr/bin/anonymous : 2014-01-03 22:03 ID:+wYIocZK

you need at least a 4 year degree to make an imageboard

4 Name: #!/usr/bin/anonymous : 2014-04-12 09:43 ID:Heaven

You need at least a 4 inch cock to fuck my anus.

5 Name: #!/usr/bin/anonymous : 2014-04-21 20:10 ID:rqtFFo91

  1. Learn HTML and CSS (or find a cheatsheet)
  2. Learn basic PHP or Perl (one or the other)
  3. Install apache and PHP/Perl and MySQL
  4. Learn SQL commands like SELECT, INSERT, UPDATE, and DROP
  5. ???

Or just do:

``<html><body><h1>Post here:</h1><form name="theform" action="post.php" method="post"><textarea name="comment" placeholder="Post a comment here" rows="8" cols="64"></textarea> <input type="submit" name="submit" value="Reply" /></form></body></html>


Post too long. Click to view the whole post or the thread page.

6 Name: #!/usr/bin/anonymous : 2014-05-03 05:47 ID:Heaven

tl;dr - it takes 4 years 2 weeks 1 second to make an imageboard!

7 Post deleted.

8 Name: #!/usr/bin/anonymous : 2017-05-09 11:48 ID:yejGrNaH

read all the scripts at then come back

9 Name: #!/usr/bin/anonymous : 2017-05-11 09:21 ID:U9no1vcm

huh, didn't know that existed. Thanks.

10 Name: #!/usr/bin/anonymous : 2017-05-16 05:02 ID:uDa0QT6N



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

[Sharing]Your personal projects[Inspiration] (81)

1 Name: #!/usr/bin/anonymous : 2014-11-08 13:20 ID:p3iUEkWT

What are your (current) hobby projects? What languages or libraries are you using? How usable or complete is it? What makes what you're doing novel or great?
No need to be smug or anything, or get all angry at other people for using <thing you hate>. Just share what you're up to. Add a URL if it's public too, if you want.

I'll start. I'm writing a stack-based language in Racket for use in embedded devices. It's already got Hindley-Milner style type inference, it just needs to actually produce output.
I'm also planning a modal text editor that feels like vim and a music-making program somehow.

But enough about me. Let's get some actual content on the front page of /code/.

72 Name: #!/usr/bin/anonymous : 2016-10-30 12:36 ID:+d2Zo5b2

I am writing a music program where the UI is an AKAI APC MINI and the instruments are the Korg volca beats/bass/keys.
I am using ChucK as the backend for IO and scheduling, via a protocol over OSC/UDP. Low-latency scheduling and input polling are very fiddly to get right, and ChucK does it perfectly.

73 Name: #!/usr/bin/anonymous : 2016-10-30 16:24 ID:/XKYs9lR

#include <stdio.h>

void main( int argc, char *argv[] )
printf("    ∧_∧   / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄\n");
printf("    ( ´∀`) < "); puts(argv[1]);
printf("     /    |  \________\n");
printf("  /     .|\n");
printf("   /\"⌒ ヽ |.イ |\n");
printf(" __ |  .ノ || ||__\n");
printf("    ノく_つ ∪ ∪   \\n");
printf(" ̄ ̄ ̄ヽつ ̄ ̄ ̄ ̄ ̄ ̄ ̄ | |\n");
printf(" _____________| |\n");
printf("  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| |\n");
Post too long. Click to view the whole post or the thread page.

74 Name: #!/usr/bin/anonymous : 2016-11-02 14:39 ID:Ar0frgQ5

I've been so busy with classes that I haven't had any time for my project. It really sucks. I miss working on it, and I feel like my programming skills might atrophy if I don't use them.

75 Name: #!/usr/bin/anonymous : 2016-11-02 19:06 ID:CCbly2Ll

don't worry, they wont!

76 Name: #!/usr/bin/anonymous : 2016-11-02 20:16 ID:jdDDUZ5G

Nah, all you lose is what the hell you were doing on that project more than a week ago.

77 Post deleted.

78 Name: #!/usr/bin/anonymous : 2016-11-13 15:36 ID:cfTgRxUb

Just playing with making a very dumb sorta-BBcode-to-HTML converter in flex, just for the hack of it.

79 Name: #!/usr/bin/anonymous : 2016-12-14 08:16 ID:FM/xpue5

I really want to sit down and give Perl 6 a spin but I simply don't have the time.

80 Name: #!/usr/bin/anonymous : 2017-03-30 20:02 ID:zsYtzRP0

I'm >>72 and I originally started it in Haskell. I've since restarted the project in Guile because there's a bit too much boilerplate in Haskell to get what I want.
I've simplified all the code heavily (I'll figure out the SLOC difference later but it's got to be <5%), and made it so that the whole thing is a library rather than a program, and a "setup" (which instruments are plugged in where, what UI pieces you want to see, etc) is a simple program you write. You should be able to live-code the thing in the REPL if you want, too, because that's hot these days.

81 Name: #!/usr/bin/anonymous : 2017-05-07 17:12 ID:ed9UcoP8

I swear I could have written this post, since I also started a roguelike after dumping my previous, over-scoped project.

I'm working in love2d, since I'm most familiar with scripting shit, and honestly, I'm really enjoying it. It's just free enough to not feel like I need to switch to a heavier-duty engine to get basic shit done, and the rotLove library for 437 display is flexible enough to be used full time, after you tweak it a bit.

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

【Unix】new unix file types (23)

1 Name: #!/usr/bin/anonymous : 2015-07-10 22:20 ID:t1CnYWeK

I was thinking of some file types that afaik don't exist.

One is filesystem entries of files stored in memory from disk files, updated when the disk file modification time changes. This would be a big disk-access optimization in some cases.

The in-memory entry permissions would be ignored, and writing to it would write to the disk file.

Another one is dynamic files that (only) have the name of a executable, which when opened would be executed by the kernel, creating a process child of init with its standard output piped to the file descriptor obtained by opening the dynamic file.

Here reading would depend on both the dynamic file's read permission and the named executable's execute permission. The idea is that it's transparent to the reading process.

Whether they could change the file to which they point to without deleting it would depend on the implementation, I think. (

14 Name: #!/usr/bin/anonymous : 2016-07-23 04:37 ID:3Yvi0TSj

OS development is a major undertaking, it's not the sort of thing you can do in a weekend, especially considering it requires low-level programming techniques that are avoided in modern application development. The appeal of things like Linux and BSD is that the hard work is already done for you, but unlike Windows or Apple operating systems you have the freedom to modify the user interface (which is all most people really care about, messing around "under the hood" is really only called for when working with embedded systems or mainframes, where you need to get every last bit of performance out of the machine - and only low level programming specialists really have the ability to effectively optimize in those areas, anyway). And the UNIX architecture, although rather old, wasn't really made for "mainframes", one of its main advantages at the time was that it could run on lower-end systems.

15 Name: #!/usr/bin/anonymous : 2016-07-23 23:33 ID:r1UKj3cT

All sort of things require low-level programming.

16 Name: #!/usr/bin/anonymous : 2016-07-25 02:31 ID:5UP++Rz8

I think I understand your idea.
How about a daemon that handles that stuff? You give the daemon the name of a script and of a fifo. Your daemon calls inotify on the fifo and waits. When one of the registered fifos is open, the daemon triggers the script with it's output descriptor directed to the fifo.

17 Post deleted.

18 Name: #!/usr/bin/anonymous : 2016-10-05 03:09 ID:VgjjOm7C

It is an idea that has already been implemented at the socket level: inetd[1]. It is a system that spawns a specified process when a connection to a port/socket has been opened. No fancy inotify crap.

Also, systemd supports all of this, including FIFOs.[2]


19 Name: #!/usr/bin/anonymous : 2016-10-05 04:07 ID:Heaven

Also, inetd can work with unix domain sockets, as well as TCP and UDP sockets.
> Unix domain sockets use the file system as their address name space. Processes reference Unix domain sockets as file system inodes,

20 Name: #!/usr/bin/anonymous : 2016-10-05 08:35 ID:QkyVH69a

[b][o][u][i]Meta-Circular Evaluation[/i][/u][/o][/b]

21 Post deleted.

22 Name: #!/usr/bin/anonymous : 2016-11-06 20:21 ID:Heaven

Is that supposed to make it any simpler?

23 Name: #!/usr/bin/anonymous : 2017-04-22 17:28 ID:7Yv7jdnv

UNIX and C are highly overrated. They were made popular by commie students who liked to share software.
There were systems prior and after UNIX which were made better - MULTICS, IBM MVS, DEC VMS, etc
Systems for personal computers have nothing to do with unix too.
And for programming language C is nothing special. It has a lot of undefined behavior and ways to shoot your leg. And it's nothing but little impoved BCPL, nothing really new. There were better languages(ada, algol, fortran, lisps, etc, etc)
And Windows NT based on VMS. The only thing came from unix(not original unix but bsd) is sockets, but there were other solutions.

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

About "the -notation of Church" [sic] (6)

1 Name: #!/usr/bin/anonymous : 2017-04-04 04:44 ID:yxuMaIae

> To use functions as arguments, one needs a notation for functions, and it seemed natural to use the -notation of Church (1941). I didn't understand the rest of his book, so I wasn't tempted to try to implement his more general mechanism for defining functions. Church used higher order functionals instead of using conditional expressions. Conditional expressions are much more readily implemented on computers.
- John McCarthy (

Is this the final proof that LISP is not a FP language?

2 Name: #!/usr/bin/anonymous : 2017-04-04 14:19 ID:K0ls67Vw

reminder that "lisp genius" john mccarthy didn't even implement lambda correctly

3 Name: #!/usr/bin/anonymous : 2017-04-04 18:30 ID:dCis9hEe

Please don't shout `Lisp'. It's no longer the 50s.

4 Name: #!/usr/bin/anonymous : 2017-04-04 23:37 ID:OL4CQL8Y

It's called the hat calculus. McCarthy didn't have the Unicode emoji for hat when he wrote that paper. Lambda is literally a ``worse is better'' printer's error.

5 Name: #!/usr/bin/anonymous : 2017-04-17 19:51 ID:OupIvYgF

Fart calculus

6 Name: #!/usr/bin/anonymous : 2017-04-17 22:00 ID:B+bBEK9E

Loser's Intensely Shitty Programming

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


1 Name: THE FUTURE OF TEXTBOARDS, IN !!PLn6PKe7 : 2017-04-11 01:32 ID:Lekp8xZ4


2 Name: #!/usr/bin/anonymous : 2017-04-14 13:15 ID:kECm1HTL

Finally, a place where I can gas the kikes.

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


1 Name: #!/usr/bin/anonymous : 2017-03-29 20:03 ID:R6uP8VII

Apparently you can't recv() on a UDP socket you have already called connect() on.

2 Name: #!/usr/bin/anonymous : 2017-04-06 18:56 ID:6qOhG8MC

Any relation to Paul Graham?

3 Name: Sock D. Gra'm : 2017-04-08 21:46 ID:Heaven

No sir

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

New thread

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