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

Visual Basic (17)

1 Name: V.V : 2006-10-20 14:14 ID:jKZjfLf3

hay guyz, I'm a moron. Inside visual basic (Microsoft visual studio 2005 fyi) is there a way to say if variable a divided by variable b is an integer, execute some code? I know I need an If then statement, but I don't know if any syntax can make sure it's an integer they're using.

8 Name: #!/usr/bin/anonymous : 2006-10-22 01:24 ID:Heaven

>>7
even if it is (been a while, don't remember off hand), the logic would be backwards -- that block would be executed if the variable is not an integer. it needs the comparison to zero.

9 Name: #!/usr/bin/anonymous : 2006-10-22 03:33 ID:Heaven

>>8
or you could use Not...

10 Name: #!/usr/bin/anonymous : 2006-10-22 08:18 ID:Heaven

>>9
at which point the line no longer says what it means (even if it does the same thing in effect)

11 Name: #!/usr/bin/anonymous : 2006-10-23 05:31 ID:Heaven

>>7
I'm pretty sure Visual Basic won't accept 1 or 0 as a Boolean type, wanting True or False instead. It's been years though.

12 Name: #!/usr/bin/anonymous : 2006-10-23 05:45 ID:TjNo/9zV

Modulo returns the remainder, not a boolean.

If (Number Mod Test) = 0

13 Name: #!/usr/bin/anonymous : 2006-10-24 00:03 ID:P4tNAkSb

How about If (IsInt){}

14 Name: nobuyuki!GfMr2LTKW. : 2006-12-27 15:39 ID:Heaven

 If A / B = math.floor(A / B) then 'do shit

or you can do what everyone else is saying.

 If A mod B = 0 then 'it's an integer with no remainder

15 Post deleted.

16 Name: #!/usr/bin/anonymous : 2017-01-19 05:42 ID:f+q+80vG

Been years since I did anything serious in VB but you can probably do something like:

C = A / B
If C = Math.Floor(C) Then

DoSomething()

End If

Though if either A or B is floating point, C may not be exactly 0 even when it should, due to silly rounding errors. To be safe, it might be better to do something like

Epsilon = 0.000001
C = A / B
If (Math.Abs(C - Math.Floor(C)) < Epsilon) Then

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

17 Name: #!/usr/bin/anonymous : 2017-02-05 10:07 ID:Heaven

It's been 11 years, this thread is old enough to figure it out on its own

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

Groovy (52)

1 Name: #!/usr/bin/anonymous : 2008-10-09 11:29 ID:vp7zABqE

We all know that Java isn't the most elegant language, but for many other reasons it still is an attractive platform. Arises the question: Is there a nice language for Java Virtual Machine?

Yes, I'm aware of JRuby and Jython, but the whole idea of mixing two languages just seems a little silly to me. Nevertheless, I would like to hear about your experience with these two languages.

Then there is Groovy. It looks kinda nice, but I can't really understand what exactly it improves over Java. OK, so dynamic typing, closures and for some reason they rewrote few libraries.. that's it? Has anyone seriously used this? Your thoughts?

Why is that there are more and superficially better languages for .NET? Am I misunderstanding something, isn't JVM equal to CLI? I'm trying to decide between Java with Groovy and Mono with Boo.

43 Name: #!/usr/bin/anonymous : 2008-10-27 13:42 ID:Heaven

> It would save a lot of time if you would just stop saying I am wrong when I'm wrong.

I'll do that: Just stop being wrong.

Remember when you said this?

> early C++ and LISP compilers compiled the code to C and then compiled that with a C compiler.

(emphesis mine), I was responding to early LISP compilers.

> I know what you said you think makes sense, but it does not.

Then I'll type slower: It's called rhetoric. If .NET compilers first wrote CIL assembly mnemonics into a text file and passed them to an assembler, then it would make languages like LISP difficult to implement. Since .NET has the APIs that make LISP easy to implement, this must not be true. I point this out in the next paragraph.

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

44 Name: #!/usr/bin/anonymous : 2008-10-27 20:52 ID:QE2i++lf

>If .NET compilers first wrote CIL assembly mnemonics into a text file and passed them to an assembler, then it would make languages like LISP difficult to implement.

No.

First there is no "If .Net compilers...", what you described is how .Net high level language compilers work.

>Since .NET has the APIs that make LISP easy to implement, this must not be true.

What you just said is compiling a high level language like lisp to a machine (virtual in this case) assembly language would make the language difficult to implement.

That's makes no sense. By your argument we can conclude every high level computer programming language is difficult to implement.

But you say that is not true because lisp is easy to implement. You then go on to say that it is easy to implement because of magic.

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

45 Name: #!/usr/bin/anonymous : 2008-10-27 22:22 ID:uce3/Oi8

>>44

> First there is no "If .Net compilers...", what you described is how .Net high level language compilers work.

IronPython clearly doesn't work this way. Proceed to tell me that IronPython doesn't compile, that Lisp doesn't compile, and that if the result isn't a dot-exe file, compilation didn't take place.

> That's makes no sense [compiling a high level language like lisp to a machine (virtual in this case) assembly language would make the language difficult to implement.]

You cannot fathom how writing the opcodes to a textfile, performing some API to operate on the textfile, and negotiating the compiled result into the current address space is more difficult than simply writing to the current address space directly?

> >There is a plain-text assembly format for .NET. Few people actually use it when making compilers because there are better APIs.
Post too long. Click to view the whole post or the thread page.

46 Name: #!/usr/bin/anonymous : 2008-10-28 07:44 ID:QE2i++lf

>IronPython clearly doesn't work this way...

IronPython and all the other DLR lanugages are compiled to CIL and then to bytecode just like every other high level .Net lanugage.

>You cannot fathom how writing the opcodes to a textfile, performing some API to operate on the textfile, and negotiating the compiled result into the current address space is more difficult than simply writing to the current address space directly?

You continue to think you know what you are talking about but you do not. One does not write opcodes to a text file. They would write the assembly language mnemonics to a text file.

>Interactive .NET compilers almost always use Reflection.Emit and AssemblyBuilder to construct the assembly in memory, and simply run it. They don't usually mess with the asssembly-mnemonics any more than JVM-targetting compilers do.

Reflection.Emit only works for a language already running on .Net. You cannot use it to implement your newly created language.

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

47 Name: #!/usr/bin/anonymous : 2008-10-29 14:40 ID:uce3/Oi8

> Reflection.Emit only works for a language already running on .Net. You cannot use it to implement your newly created language.

Of course you can. In fact, it's the best way to make interactive languages on .Net.

> You continue to think you know what you are talking about but you do not. One does not write opcodes to a text file. They would write the assembly language mnemonics to a text file.

You're splitting hairs, but you're still wrong. Interactive compilers do not write the mnemonics to a text file. They generate the assembly in-memory and run it directly.

> So this magical compiler for a language I just created can be parsed by .Net and generate the CIL code magically. WOW!

Perhaps you've never written a compiler for .Net; you've certainly not written an interactive one. There's nothing magical about it, and you can learn a lot by doing so. Forth compilers are especially simple, and can be written by a third or fourth year CS student in an afternoon, so I'd recommend trying that.

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

48 Name: #!/usr/bin/anonymous : 2008-10-29 20:09 ID:UPy4ucWz

>Of course you can. In fact, it's the best way to make interactive languages on .Net

I should have said "you shouldn't use reflection.emit for a new language."

I thought you were talking about passing some arbitrary language code to reflection.emit and getting CIL. Instead you want to interpret some new language with C# and pass that output to Reflection.Emit.

Here is any MSDN article about doing that.
http://msdn.microsoft.com/en-us/magazine/cc136756.aspx

That method has a lot of pitfalls and the conclusion at the end of the article is, use the DLR.

I have looked extensivley at both methods for a project I did. Initially I though of just using VB.Net or C# from some scripting. But after exploring the DLR and talking to some of the devs (it is open source) I went the DRL route and glad I did. The environment I setup will be able to run dozens of lanugages as they are released without any modification, and the performance was acceptable.

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

49 Name: #!/usr/bin/anonymous : 2008-10-29 23:08 ID:YpL6Luv3

>>47
> Java doesn't have a GOTO so the virtual machine doesn't have a GOTO
Actually, the VM does. This can be used to obstruct decompilation.

50 Name: #!/usr/bin/anonymous : 2008-11-01 14:47 ID:VD/Kn+Ne

>>49

You're right, of course. JVM's GOTO however is limited in that it cannot leave the current method:

> The target address must be that of an opcode of an instruction within the method that contains this goto instruction.

making it suitable for implementing Java's IF/ELSE, or Java's WHILE/FOR blocks, or the GOTO statement that BASIC systems have, but not the GOTO in PERL, or to implement tail-call elimination.

51 Name: #!/usr/bin/anonymous : 2008-11-01 15:02 ID:VD/Kn+Ne

> I should have said "you shouldn't use reflection.emit for a new language."

You should've said a lot of things. Especially considering how interested in useless pendanticy you are.

> That method has a lot of pitfalls and the conclusion at the end of the article is, use the DLR.

The DLR includes a code generating interface that happens to use Reflection.Emit. It makes it easy to implement languages with direct dispatch, but it makes it very difficult to implement threaded interpreters or dynamic dispatch operations.

For an example: Look at what would be necessary to implement CLOS or Forth using the DLR and you'll see using Reflection.emit is much easier.

> Jython is not Python running on the JVM. It's Python syntax executing as Java would. It is not first class because it has restrictions. An Object (as in base object type too) in Jython is not the same as a Java Oject. It's all wrapped an marshalled and imposes restrictions.
Post too long. Click to view the whole post or the thread page.

52 Post deleted.

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

DDos attack (4)

1 Name: lold : 2011-05-07 13:33 ID:ipFXwWLu

Hi, kids.

I suggest you connect to the raids, or plan your gun through DDos http://dreamdivision.ru/pyshka.htm

Now 2 day hold shkolyarsky service TRISLOVAMNE a horrible lags, or simply to cancer.

2 Name: #!/usr/bin/anonymous : 2011-05-11 09:14 ID:/Vb8yOb0

How about NO?

3 Name: #!/usr/bin/anonymous : 2011-07-28 23:13 ID:Heaven

DDOS is so old hat.

The PC world has moved on to WWindows.

YYou should too.

4 Post deleted.

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

How to make my own imageboard (7)

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

>>3
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. ???
  6. PROFIT

Or just do:

[form.html]
``<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.php]

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.

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

Anyone here using the Go programming language? (7)

1 Name: #!/usr/bin/anonymous : 2016-12-03 00:26 ID:HL/XbUHA

2 Name: #!/usr/bin/anonymous : 2016-12-04 00:23 ID:4Jvf0BmQ

yes

3 Name: #!/usr/bin/anonymous : 2016-12-04 02:06 ID:l7bKneDd

What kind of Go projects are you working on?

4 Name: #!/usr/bin/anonymous : 2016-12-04 09:14 ID:kJPN3y6a

I use it at work for the heavy lifting parts of Rails projects. I play around with it a lot at home too I don't have any personal projects.

5 Name: #!/usr/bin/anonymous : 2016-12-06 00:44 ID:nFwVx5NO

What do you think of the language?

6 Name: #!/usr/bin/anonymous : 2016-12-06 07:37 ID:kJPN3y6a

it's very easy to pick up. i like how small the language spec is. code is readable. the documentation is excellent. performance wise it's a massive improvement on our usual Rails backend setups and far easier to understand and maintain. much like Ruby, i actually enjoy writing Go.

the simplicity has some drawbacks, unlike Ruby, Go is fairly rigid in how it does things and you will need a much better theoretical background to get the most out of it i think.

the way it handles object orientated programming might look strange to those who've seen conventional approaches (prototype/class based inheritance).

the standard library is okay but it's not like the third party options out there are any better, also packaging/vendoring is in a really weird place and it's hard to see how the community are going to solve that.

7 Post deleted.

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

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

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

70 Post deleted.

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

>>68
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");
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

>>74
don't worry, they wont!

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

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

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

Langton's ant (4)

1 Name: #!/usr/bin/anonymous : 2009-07-09 13:02 ID:JoKJPP6/

So I thought I'd implement Langtons ant without if, switch or the like:

#include <stdio.h>
#define W 8 //*32
#define H 256
#define CYCLES 12300

int main(){
short int x=W*16-1,y=H/2-1,d=2,c,dy,ax,bx,i;
int field[W][H];
for(i=0;i<CYCLES;i++){
x+=d/2+d%2+d%3%2-2;
dy=d%4+1;
y+=dy/2+dy%2+dy%3%2-2;
Post too long. Click to view the whole post or the thread page.

2 Name: #!/usr/bin/anonymous : 2009-07-23 13:56 ID:w+8oa1IK

Does it bite?

3 Name: #!/usr/bin/anonymous : 2009-07-23 20:43 ID:1YJaw5oA

#define DD(d) d/2+d%2+d%3%2-2
dy=d&3;d++;x+=DD(d);y+=DD(dy);
ax=x>>5;bx=(x&31)-1;c=field[ax][ay]>>b&1;
d+=c;d&=3;d++;field[ax][y]^=2<<bx;

4 Post deleted.

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

[Perl] CGI Sucks - the next best thing? (18)

1 Name: #!/usr/bin/anonymous : 2009-11-12 03:09 ID:RDYCNaIm

CGI sucks.

So, in order to make a super-duper fast "web application" big on the catchwords run fast enough that people don't moan about it, I find myself at a crossroad wondering which way to go. Any option if convincing enough will be fine (I'm a cowboy coder), so I want to see if anyone is awake enough to tell me what I should use.

mod_perl
Good News: Production grade, proven, lots of documentation, get the webserver control freak options.
Bad News: Morbidly obese worker processes even with "sharing" modules, need to separate dynamic from static greatly, restricted to Apache

Fast CGI
Good News: More than just Apache, Fast CGI servers need not be on the same machine
Bad News: Aparently Fast CGI is a pain in the ass for designing request flow.

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

9 Name: #!/usr/bin/anonymous : 2009-11-27 06:00 ID:Heaven

>>8
You have no idea what a UNIX system can do. You can't play with the hard limits unless you've got permissions.

10 Name: #!/usr/bin/anonymous : 2009-11-30 21:47 ID:+sZV6d3C

>>9
That, and most hosting providers also provide a Perl option, which isn't much different from C/C++ in terms of limiting and securing. (except for the fact that system administrators can read the source, which isn't quite as easy for compiled languages)

>>1
what >>2 said. I design my webapps for FastCGI, but use plain old CGI when debugging or adding new features (the downside of FastCGI is that code is not automatically reloaded when you make changes to it). Writing code that works in both CGI and FastCGI environments is quite easy.

11 Name: KnowItAll : 2009-12-13 00:29 ID:MZrTDkpY

>>1
Ifn' yer a cowboy yud write your own embedded web server.

12 Name: KnowItAll : 2009-12-13 00:34 ID:MZrTDkpY

Or try this one: http://code.google.com/p/mongoose/ Its actually pretty good.

13 Name: #!/usr/bin/anonymous : 2010-02-17 14:02 ID:dz6XcKsB

You could always use flash/actionscript or JAVA (or haskell, clisp/scheme, python, ruby on rails..) :/

14 Name: #!/usr/bin/anonymous : 2010-03-07 11:28 ID:Heaven

>>13
Haskell is great! Flash needs to die though, seriously.

15 Name: #!/usr/bin/anonymous : 2010-03-19 23:17 ID:Heaven

I use server-side javascript for all of my web development needs.

16 Name: #!/usr/bin/anonymous : 2010-04-05 13:07 ID:Heaven

>>15
Terrible!

17 Post deleted.

18 Name: komik hentai dan komik xxx : 2016-11-10 03:13 ID:XxjbYA64

great and thx

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

[4-ch] [sh] Keep Updated on New 4-ch Posts [tools] (7)

1 Name: #!/usr/bin/anonymous : 2016-10-19 12:44 ID:Lop6cfV3

Here's a script to help keep updated on new 4-ch posts since your last visit.

It downloads the HTML of each board and compares against the HTML from last time. If anything changed it lists that board as [NEW].

Makes it easy to look for new posts, you can edit the boards.txt file to only check on boards you are interested in checking.

2 Name: #!/usr/bin/anonymous : 2016-10-19 12:45 ID:Lop6cfV3

boards.txt:

[code]
general
dqn
iaa
img
req
tv
anime
manga
games
music
book
ascii

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

3 Name: #!/usr/bin/anonymous : 2016-10-19 12:46 ID:Lop6cfV3

#!/bin/sh

mkdir -p html

while read board; do
mv "html/$board.new.html" "html/$board.old.html"
curl -s -o "html/$board.new.html" "http://4-ch.net/$board/"
if ! diff -q "html/$board.new.html" "html/$board.old.html" > /dev/null 2>&1; then
echo "[NEW] http://4-ch.net/$board/"
fi
done <boards.txt

4 Name: #!/usr/bin/anonymous : 2016-10-19 17:05 ID:Heaven

How is this more advantageous than using an RSS reader for the boards that you do want to see?

Not that this is a bad exercise, I just don't see it a s too useful.

5 Name: #!/usr/bin/anonymous : 2016-10-20 00:56 ID:Lop6cfV3

>>4
you're welcome to use RSS...

6 Name: #!/usr/bin/anonymous : 2016-10-23 09:54 ID:Heaven

>>4
Every neat idea in the history of programming has a comment like this

7 Post deleted.

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

I love the BASIC languages... (25)

1 Name: #!/usr/bin/anonymous : 2007-05-31 08:02 ID:JyQ2vqhR

There are several reasons....

A) Its fast
B) Its easy
C) Theres MANY variations of it
D) It can be really good depending which BASIC you use
E) One of the first languages =P

Anyone else here a fan of BASIC languages (or RAD such as Delphi?)

16 Name: #!/usr/bin/anonymous : 2008-05-11 23:01 ID:YwRF6IVe

freebasic
its C with basic syntax, just alot harder to learn because you dont have a stupendous amount of tutorials to start with
youll have to learn it the hard way, or not at all :)
i use it, and ive been using C for a long long time

17 Name: #!/usr/bin/anonymous : 2008-05-11 23:03 ID:Heaven

>>16
> just alot harder to learn because you dont have a stupendous amount of tutorials to start with
A lot of inaccurate tutorials written by clueless idiots?
Maybe you don't have these in freebasic, but I don't see this as a bad thing.

18 Name: #!/usr/bin/anonymous : 2008-05-11 23:11 ID:YwRF6IVe

me neither, it was merely a heads up for those who think its a walk in the park just because it ends with "basic"
still, its a refreshing language and its multiplatform
i expect no less though

var t = threadcreate( cast(sub(byval as any ptr), @exit_on_escape), @sock )

var s = !"HTTP/1.0 200 OK\n" & !"Content-Type: text/html\n" !"Connection: Close\n\n"
s += !"<html> <head> <title> empty page </title> </head> <body> Hi. </body> </html>"

dim as socket_info si
do

dim as socket new_sock
Post too long. Click to view the whole post or the thread page.

19 Name: #!/usr/bin/anonymous : 2008-05-11 23:13 ID:Heaven

>>18
I don't know what you do, but writing a board that's on top of an http is clearly a bad idea.
As for telnet, why not use sshd?
Telnet's not safe...

20 Name: #!/usr/bin/anonymous : 2008-05-11 23:16 ID:YwRF6IVe

it IS the httpd, and yes it will be secure - eventually
first things first.. i just started with fb and i have to look at the keyword list as im going

21 Name: #!/usr/bin/anonymous : 2016-09-19 03:10 ID:VONokSwN

I am a PureBasic user,
Basic is the best programming language for all me because I don't
need to make softwares as a job.

22 Name: #!/usr/bin/anonymous : 2016-10-07 05:55 ID:p/chzj6k

>>5,6
I always found the term "online help" to be confusing back in those days, apparently it's a holdover from the days when documentation was normally a physical book that came with the program.

23 Post deleted.

24 Name: #!/usr/bin/anonymous : 2016-10-18 18:32 ID:Heaven

>>19
Unless you're running a CGI server then that's how it's done.
Also, telnet just sits on top of TCP. You could upgrade to ssh no problem.

25 Post deleted.

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: