A language as simple as python

what is it?

Other urls found in this thread:

github.com/faissaloo/layne
twitter.com/NSFWRedditImage

C

Just use py2exe or whatever then

This.
Also learn to green-text, faggot.

Scheme

You distribute Python you dolt.

AFAIK all distros and even MacOS already have python, so you don't worry about it

you underestimate the shittiness of pip

it's already installed on all sane distros you dumbass

so a poorly designed sack of shit that's spent its entire life progressing from "Guido does obviously stupid thing but it's OK because Python = ez" to "community hacks on a complex fix for stupid thing but nobody think about what this means for the language lol"?
Just pick any language that deploys well to the platform you have in mind. If you're effective in a language as bad as Python, then you'll do fine in other bad languages.
Anyway I hear normies like web browsers :^) You should probably bundle a web browser with your app.
Anyway it depends on what you actually want to do. Neither deployment or language are the barrier you think they are. What will your executable do?

i am writing an anime visual novel generator from scratch

and you are aware that RenPy and Visual Novel Maker already exist?

great way to add 20 megs of download and unnecessary minutes of install.

normalfags don't use *nix systems you autists


this is the correct answer if you wanna distribute Windows binaries

you... how do you think py2exe works?

C. It's Python for non-pajeets.

python has forced indentation, so it sucks anyway

javascript and bundle it with electron (chrome)

Enjoy your program halting execution and strange bugs. Better write directly in C or even c++

C#. It's basically Java minus the requirement of having Java installed.

Not done.
github.com/faissaloo/layne

BASIC

This is terrible:
elif i=="(": appendToken() curType="oparen" curToken=ielif i==")": appendToken() curType="cparen" curToken=i[...]
Program declaratively. Do something more like this, for example:
types = {"(": "oparen", ")": "cparen", ...}if i in types: appendToken() curType = types[i] curToken = ielif ...
If you write the same bit of code multiple times you're almost certainly doing something wrong.
And for the love of god, read PEP 8 all the way through and follow it.

Also:
If the hash of the key object changes, how does lookup work? You'd have to move the item every time that happens. The hash is used to index memory. The data structure breaks if you do that.

Yeah I know the transpiler is a horrendous mess, I'll clean it up when it actually implements the entire language (because I need to reimplement it in the language itself then).

If the hash of the object changes it's the user's problem.

You said that already. What I don't get is what your language will even do if that happens.
Does it look up with just the hash? That would make it significantly less powerful than Python's dicts, because you can't retrieve the keys.

Their fault for using Windows in the first place.

...

Go.

OCaml or Eiffel

who cares about normies?

the OP

Freebasic gets quite close to the mark, as it gives you a clean .exe that depends on nothing pretty much.
The only disadvantage is that it don't support mac computers.

I can't believe none of you fags said Rust yet.

One of the four is not correct at all.

two actually

unless you make good money on it, it's a crappy endeavor.

I dislike python a lot.

what a meme language

One of the major reasons why I really dislike Python. Its one of those retarded "everyone can kode :D" languages.

Accessibility is only a problem if it makes the language worse in other ways.

It'll be undefined behaviour, what will happen in my implementation though is it will just no longer be able to find it, it might be retrievable again if the hash table gets resized, but if there were collisions then anything it had collided with would be moved to the new place too. My dictionary implementation looks up first using a hash, then using a comparison check (both of which can be user defined), usually only one comparison check is needed unless there were hash collisions.

How exactly does this make the language worse?
Give at least one practical example (code) which suffers from this (inability to use brackets instead or in addition to indentation).

underrated b8 post

Plus it looks ugly without brackets. Python is one of those retarded "different for the sake of being different" languages.

That's a really terrible design decision.
Just automatically copy objects when they're used as keys.

That is not a thing. Languages look different because of their lineage.

Are you saying that they would understand nested loops if Python used brackets? It really doesn't make a difference. This is a problem with your classmates.
Python's use of whitespace for control flow is copied from ABC. It's not a decision for the sake of being different.

Just as expected, you have nothing to back up that bold statement. Go eat a dick.

Copying is slow and not needed half the time. Implicitly copying is also unclear and inconsistent considering regular function are just pass by reference.

bullshit
it depends on the data size, dereferencing is also not free, do you know?

Is your language supposed to be sanic fast as a primary goal?
If not, it's definitely not worth the undefined behavior.

It's up there as one of the main goals (which is why it's transpiled in the first place as opposed to interpreted), it's preceded by:
1. Dynamic typing
2. Garbage collection
3. Object orientation


I'll be dereferencing either way.

In that case it's not worth it. Copy keys if they're mutable. Give a way to explicitly opt out of the copying if you feel you really have to.

The user can copy keys if they want with an @ (the deep copy operator), but I'm not going to go slowing down a program for what might be no reason half the time because the user probably won't try to modify a key in the first place.

A miniscule slowdown is several orders of magnitude less bad than undefined behavior.
Is everything an object? Are all objects mutable?

Too vague to answer. The main two questions for OP should be: a) Is your program going to have a GUI? b) Does it have to be in an interpreted language? The first question is really the make-or-break. I'd say to look for something with Qt bindings as it's fairly easy to quickly whip something up.

Go has bindings for it, last I checked, and it's a compiled language designed to be easy to pick up (but GC and no generics). If you still want an interpreted language and are concerned with the distributable binary size for some reason, pick Lua (but with some issues like dodgy Unicode and 1-initiated arrays). Also, why can't you just get your normalfag audience to install Python? It's as easy as installing a regular program.

I disagree, if you want something like that you should be using Python. Miniscule slowdowns add up.
Yes, just like Python.
Yes, part of the reason for this is that you can attach attributes to objects (like you can with user defined objects in Python, except you can do this with ALL objects). If you do x=1 x+=1 (and yes, that syntax is correct btw) for example, it's still the same object, it's just storing a different value.

Have you thought this out?
a = 1b = ab += 1
Now a is 2. Unless you implicitly copy during assignment, that is.
And there's a non-trivial difference between "b += 1" and "b = b + 1" if you do it that way.

That's exactly what's supposed to happen.
If you were to do something similar in Python, but with a list, the same thing would happen, what I've done is made it consistent throughout.
The object stores the data, it is not the value itself.

It might be intentional, but that doesn't make it any better. Even trivial programs now don't work the way people would expect them to based on just about every other procedural programming language. Nobody wants this.
C makes a distinction between pointers and plain values. Java makes a distinction between objects and primitive values. Python fulfills the expectations people have of plain values by making some objects immutable.
They all address the need in a different way, but they do all address it. You're not addressing it.
I could dump @ symbols in front of all cross-variable assignments, but it would be annoying and it probably wouldn't even be as fast as Python's interning.

But I do and the language is designed for me to use.
Because 'addressing' it means I need to add inconsistency, I don't want to have to remember every exception to a rule, I just want to have to remember a rule.

Does it count if it's simpler than Python? If so, Pascal.

Is it a simpler language or is it simpler to use?

It was used to teach programming, so it's about as simple. It's not interpreted, though, so YMMV on ease of use. But with Free Pascal you can actually produce binaries for different platforms on your own.

if you're developing for normalfags you put it on the (((app store))), they don't know how to double click an executable anymore and their os won't let them install exes from strange men anyway
also just use renpy ffs

I'm falling for it but I'll take, "what is the .Net framework for 400."

...

I guess Tcl would work, since it's designed for embedding into C program. Then you just build C skeleton and ship it.

It's kinda stupid to use Python as a teaching language anyway. It's a fucking bloated-ass scripting language with tons of abstractions and stupid OO syntax, all of which muddies the waters. Old school BASIC was much more transparent and direct. You didn't get no stinking fancy data structures, besides multidimentional arrays. You want a stack or a queue? Build it yourslf, hoser! That's much better for learning, because you don't just use a fancy language feature or import a library to implement what you should be doing manually in order to learn.
Then one day some overrated idiot wrote "goto considered harmful" and then everyone dropped BASIC like a lead balloon, right on top of their heads.
If they were going to switch from BASIC, they could have at least moved to Scheme or Forth. That would have actually made some sense. But let's not delude ourselves here. School, including university is not about learning, it's about creating an endless supply of corporate drones that can be plugged into the machine like so many cogs.

What's the next step I wonder...

This is actually progress though.

Meh, it's dead and manages to be even uglier than Perl.
It was probably nice for interfacing C with Tk back in the day, but I would rather use something else now, like with C with Lua, C++ with Qt or GTK, or Go.
If you want to distribute your software to normies, it's better to do it in binaries.

This guy's post history is hilarious

Normies already have the .NET runtime because they've installed Telemetry 10. It's not like Java where even on Loonix it's not there by default because of how absolutely shit it is.

OpenJRE is included in Debian by default

I see the autists haven't been able to give a remotely useful answer, as usual.

You're talking about windows, so: try AutoIt or Autohotkey.

You're welcome.

Golang.

(Free) Pascal then?

No idea what you think they do at schools, but when I did comp we did need to implement stacks and queues ourselves, without using the built-in libraries

no generics

Convert to C, compile.

It isn't.

Can you elaborate?

Are you fucking autistic?

print("Hello World.")

int main() { printf("Hello World."); return 0;}

PHP.

Come hate me and call me pajeet you niggerkikefaggots.

What about this one?
import requests, sysfiles = [('files[]', open(f, 'rb')) for f in sys.argv[1:]]for file in requests.post("mixtape.moe/upload.php", files=files).json()['files']: print(file['url'])

Here you go faggot:
#define __STDC_WANT_LIB_EXT1__ 1#include #include #include #include #include #include #include int main(int argc, char **argv){ WSADATA wsa_data = {0}; if(WSAStartup(MAKEWORD(2,2),&wsa_data) != 0){ puts("Failed to start WSAPI"); return EXIT_FAILURE; } SOCKET sock = {0}; if((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET){ puts("Failed to create socket"); goto error; } const char *addr_str = "www.mixtape.moe"; ADDRINFOA *host_addr = NULL; if(getaddrinfo(addr_str,"80",NULL,&host_addr) != 0){ printf("Failed to find address %s\n",addr_str); goto error_socket; } if(host_addr->ai_addrlen != sizeof(SOCKADDR_IN)){ puts("Incorrect address size!"); goto error_addr; } SOCKADDR_IN *addr = (SOCKADDR_IN*)host_addr->ai_addr; if(connect(sock,(SOCKADDR*)addr,sizeof(SOCKADDR_IN)) == SOCKET_ERROR){ printf("Failed to connect to %s (%s)\n",addr_str,inet_ntoa(addr->sin_addr)); goto error_addr; } printf("Connected to %s (%s)...\n",addr_str,inet_ntoa(addr->sin_addr)); for(int i = 1; i < argc; i++){ FILE *fp = fopen(argv[i],"r"); if(!fp){ printf("Failed to open file %s: %s\n",argv[i],strerror(errno)); continue; } printf("Opened %s...\n",argv[i]); (void)fseek(fp,0,SEEK_END); size_t fs = ftell(fp); (void)fseek(fp,0,SEEK_SET);#define POST_BOUNDARY "----deadbeef"#define POST_HEAD_FORMAT \ "POST /upload.php HTTP/1.1\n" \ "Host: www.mixtape.moe\n" \ "Content-Length %d\n" \ "Content-Type: multipart/form-data; boundary="POST_BOUNDARY"\n\n" #define POST_BODY_FORMAT \ POST_BOUNDARY"\n" \ "Content-Disposition: form-data; name=\"files[]\"; filename=\"%s\"\n" \ "Content-Type: application/x-object\n" #define POST_FOOT \ "\n"POST_BOUNDARY#define POST_HEAD_SIZE sizeof(POST_HEAD_FORMAT)+20#define POST_BODY_SIZE sizeof(POST_BODY_FORMAT)+MAX_PATH#define POST_FOOT_SIZE sizeof(POST_FOOT) char post_body[POST_BODY_SIZE] = {0}; char post_header[POST_HEAD_SIZE] = {0}; snprintf(post_body,POST_BODY_SIZE,POST_BODY_FORMAT,argv[i]); const size_t body_size = strnlen_s(post_body,POST_BODY_SIZE); const size_t content_len = fs + body_size + POST_FOOT_SIZE; snprintf(post_header,POST_HEAD_SIZE,POST_HEAD_FORMAT,content_len,argv[i]); const size_t header_size = strnlen_s(post_header,POST_HEAD_SIZE); const size_t post_size = fs + body_size + header_size + POST_FOOT_SIZE; uint8_t *post = calloc(1,post_size); memcpy(post,post_header,header_size); memcpy(post + header_size,post_body,body_size); fread(post + header_size + body_size,fs,1,fp); memcpy(post + header_size + body_size + fs,POST_FOOT,POST_FOOT_SIZE); if(sendto(sock,(char*)post,post_size,0,(SOCKADDR*)addr,sizeof(SOCKADDR_IN)) == SOCKET_ERROR){ printf("Failed to upload %s\n",argv[i]); } puts("Uploaded the file!"); char rec_buf[800] = {0}; if(recv(sock,rec_buf,800,0) == SOCKET_ERROR){ printf("Failed to receive URL\n"); goto skip_url; } printf("%s\n",rec_buf);skip_url: fclose(fp); } puts("Done!"); freeaddrinfo(host_addr); closesocket(sock); WSACleanup(); return EXIT_SUCCESS;error_addr: freeaddrinfo(host_addr);error_socket: closesocket(sock);error: WSACleanup(); return EXIT_FAILURE;}

Now, this code would work if mixtape.moe didn't require (((SSL))) encrypted uploading, but I just didn't feel like adding that feature in, cause I already spend a couple hours on this program, i'm sure you can figure that part out. So right now it just 403's at you.

You sure showed him. :^)

Only two, C standard library and Windows Sockets API. If I used something like libCurl I would have done it much easier. Also it's only 120 lines and he uses much more libraries than me.

nim

Okay

I don't think that I've ever had a DirectX reinstall, let alone something 1GB. Direct3D is updated whenever you update your graphics drivers, since the implementation of Direct3D is supplied by your GPU vendor.

you must really have the mentality of a sand-nigger to leave the trash fire that is /g/ and then want to form the exact conditions here

how has no body said scala yet

Seems like a potentially logical marriage then.

py2exe

Can you compile it to an executable?

it doesn't change anything about the fact that they are bloated.

even if you could compile feces and urine to an executable, it would not mean you should use feces and urine.

Because OOP is for pajeets and normies.
Which are you?

Do you think graphics drivers on Linux are less bloated? You have the option of the generic graphics drivers like MesaGL that are probably not hardware accelerated, or a bloated driver from Nvidia or whatever, so you have the same problem when you want to do "anything graphical". I can just use the generic video driver that comes with windows if i'm concerned with drivers being bloat. I wont play some AAA game with that but neither will the non-bloated Linux graphics drivers.

mesa is hardware accelerated, it handles all hardware acceleration for intel gpu's now and i think it's handling radeon too, or atleast it can handle radeon.