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

【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...

RIP /prog/rider (36)

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

27 Name: #!/usr/bin/anonymous : 2017-03-31 07:34 ID:7JiWcdhm

Terry Davis is on fucking hackernews, I don't think he's a /any/ thing specifically.

28 Name: #!/usr/bin/anonymous : 2017-04-02 17:14 ID:Heaven

You sure proved your point by using meme arrows. Go ahead and call him a cuck too.

29 Name: #!/usr/bin/anonymous : 2017-04-02 17:47 ID:Heaven all decided to meet up and have a discussion.

"This goatfinger, it's a shit board." World4ch took a long draw from hyr cigar, savored the smoke, then exhaled decisively. "Boys, it's time we give it a taste of it's own medicine."

26ch gasped. "But, but sir! What has goatfinger done?" 4x13, trembling with excitement, let out an autistic shriek. World4ch looked them both in the eye and continued speaking. "On April 2nd, we attack. Goatfinger is a piece of garbage that should not exist. True /prog/gers go to 4taba." 26ch nodded solemnly. "Yes, the shitty textboard that deserves progrider's legacy is" The brave textboards called an uber and the rest is history.

30 Name: #!/usr/bin/anonymous : 2017-04-02 21:59 ID:PjrpPeWF

Oy vey! It's anuddah /prog/olocaust[i]![/i]

31 Name: #!/usr/bin/anonymous : 2017-04-03 18:42 ID:7u94De9v

4taba is trash

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?

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...

Harga Lantai Kayu, Lantai Parket vs Lantai Vinyl (4)

1 Post deleted.

2 Post deleted.

3 Name: #!/usr/bin/anonymous : 2017-03-13 21:42 ID:ACjGSKQT

dicks out for Harambe

4 Name: #!/usr/bin/anonymous : 2017-04-06 18:53 ID:7BDuNql0

Take the poo to the loo.

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

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

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/.

71 Name: #!/usr/bin/anonymous : 2016-10-29 17:24 ID:Ar0frgQ5

Yes, despite having never done any OOP or GUI work in my life I was able to get it up and running in about an hour. That's also due in part to the very nice documentation they have on their object/class-system and how the GUI system uses it.

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.

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

Befunge, Brainfuck, Obfuscated Crap (45)

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.



36 Name: 36 BITS FOREVER : 2007-02-15 03:59 ID:Heaven

TECO called and said to tell you copycats to go suck eggs.

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!

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

Reading rar-content into memory using Java (5)

1 Name: #!/usr/bin/anonymous : 2008-06-26 12:25 ID:LdvOIobC

I've already done it for zip in my Java program which was pretty straight forward and thought I'd expand it to cover the other most common format rar as well. But I can't find any information about reading the content of rar files to memory.

It is the best example I've found of extracting to disc. I'm no code guru so I might be missing some obvious change you could do to that code to write to memory instead disc.

So if someone could tell me how to change it to reading into a BufferedImage or so instead of to a File, or have some good links to other ways of reading/unpacking rar-content to memory it would be a real help.

2 Name: #!/usr/bin/anonymous : 2008-06-26 13:21 ID:ELkTrT2v

Your best bet is using unrar.dll and writing a JNI wrapper. It's possible to do this without going via disk.

3 Name: #!/usr/bin/anonymous : 2008-06-26 13:22 ID:Heaven

Or I guess you could try using JNA to access the DLL directly.

4 Name: #!/usr/bin/anonymous : 2008-06-27 01:09 ID:Heaven

JNI is for pussies, and dear god why do you want to read RAR files?

5 Name: #!/usr/bin/anonymous : 2017-03-14 16:19 ID:wALzs4rq

dicks out for Harambe

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

website without protection (5)

1 Name: anyone : 2016-03-24 15:17 ID:zj0nyDOS

found a website without protection

user & pass: admin

how to fix this bug ?

admin link :

2 Name: #!/usr/bin/anonymous : 2016-03-24 17:31 ID:Heaven

Send them a condom in the mail

3 Name: #!/usr/bin/anonymous : 2016-03-29 04:18 ID:VsZwb3MW

Use it first before sending

4 Name: #!/usr/bin/anonymous : 2016-04-03 10:27 ID:Heaven

On its way.

5 Name: #!/usr/bin/anonymous : 2017-03-14 14:25 ID:fpS98v60

dicks out for Harambe

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

New thread

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