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: [Sharing]Your personal projects[Inspiration] (8) 2: [perl] Kareha resources (17) 3: GameBoy Color emulator in JavaScript (15) 4: my own "yet another imageboard-script" (116) 5: What is your definition of "freedom" ? (14) 6: >EXPERT HTML PROGRAMMER (14) 7: Why can't you find /secert lounge/ RedCream, WHY? (2) 8: Backup tweets (5) 9: Tcl/Tk (25) 10: Scala thread (4) 11: Live coding tool (5) 12: [Code Help]General code help?[PHP] (12) 13: Is this board alive? (3) 14: Is Perl a dead language? (29) 15: How to make my own imageboard (6) 16: Interpreted vs. compiled labguages (30) 17: world4ch's /prog/ Emergency Shelter #4 (9) 18: This is the official /prog/riders thread (11) 19: Is Ruby as inefficient as they say (6) 20: Coding Challenge #2! (114) 21: Operating Systems vs Artificial Intelligence (3) 22: 6.034 (6) 23: Best language for starting out in functional programming? (20) 24: [SICP] LEARNING TIME [PY] (4) 25: HAX MY ANUS (2) 26: OOP vs functional (11) 27: Active (6) 28: Introduction to complexity and the idea od quantum computers (3) 29: Opinions of Codecademy? (8) 30: Programming languages with fast matrix operations (15) 31: [JS] Help me find out the correct speed to sync up with the song 太陽いわく燃えよカオス (5) 32: "4tran"? (52) 33: Spoilers in Wakaba (16) 34: Which one? (4) 35: I reproduced an error I found in safari. (3) 36: Google app engine (2) 37: Shitpostan (2) 38: What is the diff between RSS and Atom feeds? Is one better? (2) 39: Excessive file access in a perl script? (10) 40: Common useful applictions of Perl? (10)

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

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

2 Post deleted.

3 Name: #!/usr/bin/anonymous : 2014-11-13 01:37 ID:QM49J4Gd

I've started a little handheld GPS tracking/plotting app/script...
Rather modest at the moment, just a save/load function + current path plot..
Uses Js / Droidscript

4 Name: #!/usr/bin/anonymous : 2014-12-26 21:33 ID:bz9OqgWr

Fucking around with Haskell.

5 Name: #!/usr/bin/anonymous : 2014-12-27 00:45 ID:qYL9HV/R

robo raper

6 Post deleted.

7 Name: #!/usr/bin/anonymous : 2015-01-02 05:45 ID:LhLdJ/Hf

A raspberry pi motion camera that uploads photos to somewhere on the web.
I also want it to blink an LED every time a photo is taken but I don't know how to trigger that.

8 Post deleted.

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

[perl] Kareha resources (17)

1 Name: #!/usr/bin/anonymous : 2014-05-02 18:55 ID:IpwbeqOT

We like Kareha here. What have you noticed in kareha? Have you made any hacks or otherwise made use of it?

I saw that Storlek used Kareha as a base for his blog in the past. This seems sane to me, and not all too hard to do. When you think about it, Kareha is (in essence) a community blog.

Entering "fusianasan" in the name field or "2ch-sep93" in config.pl's date field do two quite obvious things.

pseud0ch.css, interestingly enough, does not support italics by default.

8 Name: #!/usr/bin/anonymous : 2014-08-20 23:13 ID:mrBSe2Wz

>>7
Its bi-annual on some sites. It might even be monthly here.

9 Name: #!/usr/bin/anonymous : 2014-12-04 08:04 ID:iMAkilQG

>>2
Seriously though, why did you remove the dates? What purpose did that serve?

10 Post deleted.

11 Name: #!/usr/bin/anonymous : 2014-12-07 07:19 ID:7NrtL/+s

>>9
all posts on sageru.org are timeless classics.

12 Name: #!/usr/bin/anonymous : 2014-12-11 19:37 ID:hZA9235F

I'd really like to see some people get together and work on Kareha and its CSS to make it all 2015 update.

13 Post deleted.

14 Post deleted.

15 Post deleted.

16 Post deleted.

17 Name: #!/usr/bin/anonymous : 2015-01-16 03:58 ID:Heaven

>>12
update how? just remove the stuff that's there for compatibility with ancient browsers? switching from XHTML to HTML5? or do you mean make it ugly and hard to use by shuffling everything on the page around randomly and making everything big colored squares that you have to inspect closely to find anything?

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

GameBoy Color emulator in JavaScript (15)

1 Name: #!/usr/bin/anonymous : 2011-08-04 08:17 ID:Qeftnp5w

Someone made a GameBoy Color emulator in JavaScript, now you can play all the classics!
http://www.grantgalitz.org/gamecenter/

6 Name: #!/usr/bin/anonymous : 2011-12-24 17:25 ID:BvKBdNGo

>>5

wth man

He said JavaScript. NOT JAVA.

7 Name: #!/usr/bin/anonymous : 2011-12-26 23:20 ID:z8oT3Vji

>>6
Just pretend he was trolling.

Is there any sort of easy-to-read guide or manual on the Game Boy and its instruction set (Z80?)?

9 Name: #!/usr/bin/anonymous : 2012-01-04 05:53 ID:PyTm9YAw

10 Name: #!/usr/bin/anonymous : 2012-01-04 09:32 ID:gvG7mhwu

>>7

>(Z80)

Nice ID :o

11 Name: #!/usr/bin/anonymous : 2012-01-17 19:38 ID:wR2Te6ws

This reminds me of the PC emulator someone wrote in javascript:
http://bellard.org/jslinux/
It isn't very fast, but it's still very impressive.

12 Post deleted.

13 Post deleted.

14 Post deleted.

15 Post deleted.

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

my own "yet another imageboard-script" (116)

1 Name: #!/usr/bin/anonymous : 2007-02-26 01:26 ID:Hw07jnmQ

So - I promised a friend to set up a imageboard for him, but I quickly realized that the only good (open source) imageboard out there is written in Perl.

I didn't take long before I got hooked on the idea of writing my own board.
I have to admit I'm a ruby fanboy (no flameing please :) ), but that doesn't change the fact that 90% of webhosts out there only supports PHP, so I decided to write it in PHP5/MySQL5.

Yesterday I had my first, sort of, working release which I really would like some feedback on.

It's not, in any way, intended to be used in real life yet, but I some of you would help me download it, test it, report problems, give feedback, suggestions etc. etc. etc. It would be really cool :)

thanks in advance

oh yeah - and the URL to the project page is: http://code.google.com/p/4chandk/

107 Post deleted.

108 Post deleted.

109 Post deleted.

110 Post deleted.

111 Post deleted.

112 Post deleted.

113 Post deleted.

114 Post deleted.

115 Post deleted.

116 Post deleted.

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

What is your definition of "freedom" ? (14)

1 Name: #!/usr/bin/anonymous : 2014-04-22 10:49 ID:kQlYfQNM

Discuss.

5 Name: #!/usr/bin/anonymous : 2014-05-30 09:49 ID:lW3PjXp1

I don't have one

6 Name: #!/usr/bin/anonymous : 2014-06-13 20:54 ID:4tpzojyy

"Freedom" only really has meaning in context. Freedom to do something, freedom not to have something done to you. On it's own it's an empty ideal.

Seeing as this is a programming board, I assume you mean "freedom" in a free software context, in which case my vote for free license goes to the MIT license. Simple and to the point, and not "copyleft" (which IMO is just trading one master for an arguably more benevolent one.)

7 Name: #!/usr/bin/anonymous : 2014-06-20 13:34 ID:Heaven

>>6
Your opinion is not appreciated. GPLv3 is the only license. We don't need shitty companies. We need transparency. Freedom as in free. The end.

8 Name: #!/usr/bin/anonymous : 2014-06-20 22:18 ID:4tpzojyy

>>7
Hello Stallman.

9 Name: #!/usr/bin/anonymous : 2014-07-02 09:23 ID:5H6su3Ag

But what if I want the freedom to have my work ripped off and exploited for commercial gain by leading companies such as Apple?

10 Name: #!/usr/bin/anonymous : 2014-07-11 13:34 ID:xtFFI2kx

>>9
That happens already on their side since they just ignore licences anyway, but if you really want such freedom, just upload your code on the interbutts without a licence.

11 Name: #!/usr/bin/anonymous : 2014-08-07 23:41 ID:muqlh1bG

>>10
In some countries, that's rather difficult. Luckily, the WTFPL covers such cases.

12 Name: #!/usr/bin/anonymous : 2014-10-14 20:48 ID:bGisZxUq

Freedom = being able to show Micro$oft, Apple and Stallman the middle finger whenever I want to.

13 Name: #!/usr/bin/anonymous : 2014-11-13 01:21 ID:c5eCjDpZ

It is my definition of freedom ^^

14 Post deleted.

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

>EXPERT HTML PROGRAMMER (14)

1 Name: >EXPERT HTML PROGRAMMER : 2014-04-21 17:52 ID:lot+OX0a

>EXPERT HTML PROGRAMMER

5 Name: #!/usr/bin/anonymous : 2014-10-24 20:58 ID:Is1ApMpB

><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>"http://www.w3.org/TR/html4/strict.dtd">

who uses html 4 these days?

<!DOCTYPE html>
<html>
...

6 Name: #!/usr/bin/anonymous : 2014-10-25 05:02 ID:Heaven

>>5
That's XHTML 1.0.
Well, actually it's both.
That trick isn't possible with HTML5, because HTML5 isn't XML or SGML.
IMO, once they decided to ditch XML and SGML, they really should have gone with a more sensible style of markup... maybe something like RTF. But I guess there's some unwritten law that standards can't be sensible.

7 Name: #!/usr/bin/anonymous : 2014-10-28 04:46 ID:W/pqbgBQ

>>6
prefix hypertext markup with continue indications

(leltype!!! phm)

(phm
(charset shift_jis)
(parse until (end)))

(title standards@4ch)
...

(fuck wakabamark)

8 Name: #!/usr/bin/anonymous : 2014-10-28 04:52 ID:W/pqbgBQ

>>7
It doesn't have to be strictly prefix though, so likely another name..

9 Name: #!/usr/bin/anonymous : 2014-11-08 13:04 ID:6gr+1q6t

>>7,8
S-expressions are a thing, you guys.

10 Name: #!/usr/bin/anonymous : 2014-12-07 07:27 ID:Heaven

>>9
they're a shitty thing. i-expressions are superior.

11 Name: #!/usr/bin/anonymous : 2014-12-07 12:17 ID:Heaven

>>10
I guess you don't write Lisp. Semantic formatting is the antithesis of brevity, expressiveness, and beauty of code. S-expressions, on the other hand, deliberately make syntax not matter at all, by virtue of there being practically none.
If you want a layout-looking markup language then use markdown or whatever other shit is currently popular.

12 Name: #!/usr/bin/anonymous : 2014-12-25 02:07 ID:Heaven

>>11
Shitty, hard-to-read syntax is not the same thing as no syntax.

13 Name: #!/usr/bin/anonymous : 2015-01-07 21:18 ID:Heaven

>>12
You clearly don't Lisp.
Come back when you've even tried to use it.

14 Name: #!/usr/bin/anonymous : 2015-01-23 20:43 ID:Heaven

>>11

> This SRFI descibes a new syntax for Scheme, called I-expressions, whith equal descriptive power as S-expressions. The syntax uses indentation to group expressions, and has no special cases for semantic constructs of the language. It can be used both for program and data input.
> I guess you don't write Lisp. Semantic formatting is the antithesis of brevity, expressiveness, and beauty of code. S-expressions, on the other hand, deliberately make syntax not matter at all, by virtue of there being practically none.

...

Why do so many LISPers lack basic reading comprehension skills?

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

Why can't you find /secert lounge/ RedCream, WHY? (2)

1 Name: #!/usr/bin/anonymous : 2014-10-21 19:22 ID:cPjN8J+6

RedCream you are a blowhard!

2 Post deleted.

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

Backup tweets (5)

1 Name: #!/usr/bin/anonymous : 2012-03-28 13:38 ID:DenC9bHu

How would I use wget to backup all a users tweets into a html file? There's 20 tweets per page so you need to iterate { TWEETS/20 } times

3 Name: #!/usr/bin/anonymous : 2012-05-20 18:01 ID:2e2u3CdO

>>2
Someone did it just in BASH without the API.

Then some guy defaced his site :(

4 Name: #!/usr/bin/anonymous : 2012-09-14 05:38 ID:Heaven

$ man wget

5 Post deleted.

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

Tcl/Tk (25)

1 Name: #!/usr/bin/anonymous : 2008-08-24 01:33 ID:LD6S4lTz

Tcl is one of the most underrated computer languages today.

It has a weird syntax, but on the other hand the syntax makes it more extensible than any other language besides the Lisp family.

Tk is reputed for it's antique-looking widgets. However with the latest 8.5 releast TTk, Themeable Tk is the default which means native look on Vista, XP, OSX. (Not Linux though, but what can you call native there anyway?)

So if you don't know Tcl yet, go and learn it. It's extremely simple, has an interactive shell, and will expand your mind... much more than learning most other languages!!

Tcl/Tk rocks!

See http://www.tcl.tk/

16 Name: dmpk2k!hinhT6kz2E : 2008-08-28 19:17 ID:Heaven

> Python has a peculiar syntax that appeals to hackers because of its simplicity.

Compared to what?

http://svn.python.org/view/*checkout*/python/trunk/Grammar/Grammar?rev=65872

That's not particularly simple.

17 Name: #!/usr/bin/anonymous : 2008-08-29 11:27 ID:Heaven

>>15
Jeez, you're bitchy. I take back my previous statement. Take some Midol.

18 Name: #!/usr/bin/anonymous : 2008-08-29 21:18 ID:Heaven

>>17

Well fuck you too.

You want to dump on my favorite language? I'll dump on yours.

Lisp is more readable than python. It has fewer parenthesis, and is easier to post/copy/paste into forums with fewer mistakes.

19 Name: #!/usr/bin/anonymous : 2008-08-30 00:08 ID:Heaven

>>18
Who the hell said it was my favorite language, and where did you ever read in my post that I didn't like lisp?

Get off the internet.

20 Name: #!/usr/bin/anonymous : 2008-08-30 23:51 ID:Heaven

> those with a less immediately readable syntax (for example, C, Haskell, Lisp, or god forbid, APL)

Lisp's syntax is far more readable than Python.

21 Name: #!/usr/bin/anonymous : 2008-08-31 03:58 ID:Heaven

>>20
I said immediately. Try explaining a cdr or progn to a non-programmer, both which are very prevalent in lisp. What common Python idioms are likely to pose a problem for a new programmer?
Serious question. I've tried teaching people Python and Lisp both. Of those, Python is far, far easier for the average person to grasp. Not to mention it forces good indentation habits, but that's again a different story.

Once again trying to bring this thread back on topic, Tcl is kind of in the middle. It's fairly easy to teach to people that have at least a basic understanding of programming, but I imagine the complete non-coder would have a difficult time understanding the idiosyncrasies (e.g. the -switches for commands)

22 Name: #!/usr/bin/anonymous : 2008-08-31 20:36 ID:Heaven

> Try explaining a cdr or progn to a non-programmer, both which are very prevalent in lisp.

They're just words. All the words that are in lisp, are in this book: http://l1sp.org/cl/ or you can learn about them by typing:

(describe 'WORD)
> What common Python idioms are likely to pose a problem for a new programmer?

It all seems problematic for a new programmer. Explaining why sometimes you use [] lists and sometimes you use () tuples. Explaining why print isn't a method is also problematic. Explaining why they check __name__ also seems to cause problems. Operator-order is also difficult; explaining why they sometimes read a statement right-to-left, and other times from left-to-right seems problematic.

Someone who is familiar with some algol-like syntax such as is seen in a shell or in another language will have a completely different set of problems- the if, postfix-if, yield, self, and so on.

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

23 Name: #!/usr/bin/anonymous : 2008-09-01 15:18 ID:Heaven

>>22
Caution: Smug Lisp Weenie threadshitting.

24 Name: #!/usr/bin/anonymous : 2008-09-01 18:16 ID:Heaven

>>23
Caution: Pyfag.

25 Name: #!/usr/bin/anonymous : 2014-09-24 21:19 ID:5RXkJc27

>>22
Lisp is shit. The worst kind of shit: The kind [i]other people swear they like to eat.[/i]

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

Scala thread (4)

1 Name: #!/usr/bin/anonymous : 2012-02-08 21:38 ID:/YIKnO1d

Hello, Anon. Scala programmer is here. Ask questions.

2 Name: #!/usr/bin/anonymous : 2012-02-10 16:35 ID:Heaven

What's the difference between "null", "Null", "None", and "Nil"?
And why is there any?

3 Name: #!/usr/bin/anonymous : 2014-05-06 01:15 ID:rN/fvWh0

I heard that Scala gives weird backtraces due to the fact that the JVM was built for Java, not a functional language. Any comment on this?

4 Name: #!/usr/bin/anonymous : 2014-06-22 12:04 ID:B2Tt70/Q

>>3
Scala gives weird backtraces because like all ML derivatives, the compiler takes extreme liberties with regard to how its output ends up looking. Much like a segfaulting Haskell program is nigh-impossible to debug with a e.g. gdb, which is oriented towards procedurally-structured compiler outputs.

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

New thread

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