Programming thread -

  • There is a bug with the post editor. Images pasted from other websites from your clipboard will automatically use the [img] tag instead of uploading a copy as an attachment. Please manually save the image, upload it to the site, and then insert it as a thumbnail instead if you experience this.

    The [img] should essentially never be used outside of chat. It does not save disk space on the server because we use an image proxy to protect your IP address and to ensure people do not rely on bad third party services like Imgur for image hosting. I hope to have a fix from XF soon.

Shoggoth

kiwifarms.net
Work in progress.

Also fuck around with all the throwaway commits you want. Just squash them into one logical unit before spamming them to the world at large.
That's what I do. I usually have WIP commits when working on something new or just want to save my progress.
 

Info Player Start

*spawns*
kiwifarms.net
Got a random color generator for a simple sketch program running, just for fun.
DoodlePadColor.png

every time you click the Color button, the lines you draw change to a new random color.
 

Leotardo DaVinci

Clothes are meant to be worn!
kiwifarms.net
so if you pass an int or comparable type to a function that was defined to accept a char, C++ will do the conversion and try to run the function with the type coerced parameter.
Dear God this is why I really like strict parameter types. If I specify a function to accept a char, accept a char, don't just auto cast an int to a char, let me do the casting.
 

Leotardo DaVinci

Clothes are meant to be worn!
kiwifarms.net
That is why i am deeply against teaching python as a first programing language, it leads to bad habits in relation to parameters.
I'm so grateful I only used Python to understand the idea of functions, objects and everything intro to programming.

I immediately dived into C straight after because my university does it like that. I've been teaching other guys who get into programming the same way and they really like it.
 
Dear God this is why I really like strict parameter types. If I specify a function to accept a char, accept a char, don't just auto cast an int to a char, let me do the casting.
The compiler boffins need to add a way to turn implicate type coercion off. The worst part is you can't tell anything is wrong until you start analysing the program's behaviour; which not all implementations are subjected to. After taking a break from C stuff for some decades and then doing python which turns into writing exceptions for ever type that the function can't accept, the realisation that types are a fundamental way to communicate intent though a programming language is unambiguously clear.
That is why i am deeply against teaching python as a first programing language, it leads to bad habits in relation to parameters.
Python is a good programming language to learn first because it gets you up and running fast. It does not have entry-point function. The name spacing semantics are simple. The standard library has most things people need to write useful scripts. For students the problem of a X type is not suitable for this algorithm is not such a problem because students are writing most of their own modules and code that they are going to be the only user of and most algorithms aren't being implemented for other projects where calling type matters. and is likely to be miss-called. Python is also different that you can introspect the parameter types, this is not a feature in C\+?. (You can use the compiler build-ins to get function names and type names, but it's not going to tell you the type that was passed before coercion.)

There is also a difference of expectation in regards to typing when comparing C\+? and Python. Python does not need you to add a type, which because of C\+? type coercion is a suggested type that will end up accepting any type that can be coerced to the stated type. Which is just poorly defined class resolution amungst primitive types in C. So, If it's just going to be a any type the stated can be coerced into, why ever require a type? Why have different integer types that aren't just flavours of Integer when because of coercion the distinctions are not respected? An int should have a profoundly different meaning from float or unsigned int, but they don't in C\+?.



I hate javascript and I'm not even using it in the browser.
> see attached
(I copied that phrack for loral ipsome.)
[
{"h1":"1 - Introduction"},
{"p":"The Java platform is broadly deployed on billions of devices, from servers and desktop workstations to consumer electronics. It was originallydesigned to implement an elaborate security model, the Java sandbox, thatallows for the secure execution of code retrieved from potentiallyuntrusted remote machines without putting the host machine at risk.Concretely, this sandboxing approach is used to secure the execution ofuntrusted Java applications such as Java applets in the web browser.Unfortunately, critical security bugs -- enabling a total bypass of thesandbox -- affected every single major version of the Java platform sinceits introduction. Despite major efforts to fix and revise the platform'ssecurity mechanisms over the course of two decades, critical securityvulnerabilities are still being found."},
{"p":"In this work, we review the past and present of Java insecurity. Our goalis to provide an overview of how Java platform security fails, such that wecan learn from the past mistakes. All security vulnerabilities presentedhere are already known and fixed in current versions of the Java runtime,we discuss them for educational purposes only. This case study has beenmade in the hope that we gain insights that help us design better systemsin the future."},
{"h1":"2 - Background"},
{"h2":"2.1 - A Brief History of Java Sandbox Exploits"},
{"p":"The first version of Java was released by Sun Microsystems in 1995 [2]. Oneyear later, researchers at Princeton University identified multiple flawsenabling an analyst to bypass the sandbox [3]. The authors identifiedweaknesses in the language, bytecode and object initialization, to name afew, some of them still present in Java at the time of writing. It is thefirst time a class spoofing attack against the Java runtime has beendetailed. A few years later, in 2002, The Last Stage of Delirium (LSD)research group presented their findings on the security of the Java virtualmachine [29]. They detailed vulnerabilities affecting, among others, thebytecode verifier and class loaders leading to type confusion or classspoofing attacks. In 2010, Koivu was the first to publicly show thattrusted method chain attacks work against Java by explaining how to exploitthe CVE-2010-0840 vulnerability he has found [32]. In 2011, Drake describedhow to exploit memory corruption vulnerabilities in Java [4]. He explainshow to exploit CVE-2009-3869 and CVE-2010-3552, two stack buffer overflowvulnerabilities. In 2012, Guillardoy [5], described CVE-2012-4681, twovulnerabilities allowing to bypass the sandbox. The first vulnerabilitygives access to restricted classes and the second allows to modify privatefields. Also in 2012, Oh described how to exploit the vulnerability ofCVE-2012-0507 to perform a type confusion attack to bypass the Java sandbox[6]. In 2013, Gorenc and Spelman performed a large scale study of 120 Javavulnerabilities and conclude that unsafe reflection is the most commonvulnerability in Java but that type confusion is the most common exploitedvulnerability [8]. Still in 2013, Lee and Nie identified multiplevulnerabilities including a vulnerability in a native method enabling thebypass of the sandbox [9]. Again in 2013, Kaiser described, among others,CVE-2013-1438 a trusted method chain vulnerability found by James Forshawand CVE-2012-5088 a Java reflection vulnerability found by SecurityExplorations. Between 2012 and 2013, security researchers at SecurityExplorations discovered more than 20 Java vulnerabilities [7]. Starting in2014, the developers of main web browsers such as Chrome or Firefox decidedto disable NAPI by default (hence no Java code can be executed by default)[11] [12]. The attack surface of Java being reduced, it seems that lessresearch on Java sandbox bypass is being conducted. However, exploitsbypassing the sandbox still pop up once in a while. For instance, in 2018,Lee describes how to exploit CVE-2018-2826, a type confusion vulnerabilityfound by XOR19 [18]."},
{"h2":"2.2 - The Java Platform"},
{"p":"The Java platform can be divided into two abstract components: the JavaVirtual Machine (JVM), and the Java Class Library (JCL)."},
{"p":"The JVM is the core of the platform. It is implemented in native code andprovides all the basic functionality required for program execution, suchas a bytecode parser, JIT compiler, garbage collector, and so forth. Due tothe fact that it is implemented natively, it is also subject to the sameattacks like any other native binary, including memory corruptionvulnerabilities such as buffer overflows [1], for example."},
{"p":"The JCL is the standard library that ships together with the JVM. Itcomprises hundreds of system classes, primarily implemented in Java, withsmaller portions being implemented natively. As all system classes aretrusted, they are associated with all privileges by default. Theseprivileges give them full access to any sort of functionality (filesystemread/write, full access to the network, etc.), and hence full access to thehost machine. Consequently, any security bug in a system class canpotentially be used by analysts to break out of the sandbox."},
{"p":"The main content of this paper is thus separated into two larger sections -one dealing with memory corruption vulnerabilities, and the other onefocussing on vulnerabilities at the Java level."},
{"h2":"2.3 - The Security Manager"},
{"p":"In the code of the JCL, the sandbox is implemented with authorizationchecks, most of them being permission checks. For instance, before anyaccess to the filesystem, code in the JCL checks that the caller has theright permission to access the filesystem. Below is an example checking theread permission on a file in class _java.io.FileInputStream_. Theconstructor checks that the caller has the read permission to read thespecified file on line 5."},
{"pre":" 1: public FileInputStream(File file) throws FileNotFoundException {\n 2: String name = (file != null ? file.getPath() : null);\n 3: SecurityManager security = System.getSecurityManager();\n 4: if (security != null) {\n 5: security.checkRead(name);\n 6: }\n 7: if (name == null) {\n 8: throw new NullPointerException();\n 9: }\n 10: if (file.isInvalid()) {\n 11: throw new FileNotFoundException(\"Invalid file path\");\n 12: }\n 13: fd = new FileDescriptor();\n 14: fd.incrementAndGetUseCount();\n 15: this.path = name;\n 16: open(name);\n 17: }"},
{"p":"Note that for performance reasons, authorizations are only checked if asecurity manager has been set (lines 3-4). A typical attack to escape theJava sandbox thus aims at setting the security manager to null. Thiseffectively disables all authorization checks. Without security managerset, the analyst can execute any code as if it had all authorizations."},
{"p":"However, authorizations are only checked at the Java level. Native codeexecutes with all authorizations. Although it might be possible to directlyexecute arbitrary analyst's controlled native code when exploiting memorycorruption vulnerabilities, in all the examples of this paper we focus ondisabling the security manager to be able to execute arbitrary Java codewith all permissions."}
]
const fs = require('fs');

const FILENAME = "./htmljson.json";

let data = JSON.parse(fs.readFileSync(FILENAME, 'utf8'));

function tag(block)
{
for (let key in block) {
console.log(`<${key}>`);
console.log(block[key]);
console.log(`</${key}>`);
}
}

for (let x in data) {
let it = data[x];
tag(it);
}
<h1>
1 - Introduction
</h1>
<p>
The Java platform is broadly deployed on billions of devices, from servers and desktop workstations to consumer electronics. It was originallydesigned to implement an elaborate security model, the Java sandbox, thatallows for the secure execution of code retrieved from potentiallyuntrusted remote machines without putting the host machine at risk.Concretely, this sandboxing approach is used to secure the execution ofuntrusted Java applications such as Java applets in the web browser.Unfortunately, critical security bugs -- enabling a total bypass of thesandbox -- affected every single major version of the Java platform sinceits introduction. Despite major efforts to fix and revise the platform'ssecurity mechanisms over the course of two decades, critical securityvulnerabilities are still being found.
</p>
<p>
In this work, we review the past and present of Java insecurity. Our goalis to provide an overview of how Java platform security fails, such that wecan learn from the past mistakes. All security vulnerabilities presentedhere are already known and fixed in current versions of the Java runtime,we discuss them for educational purposes only. This case study has beenmade in the hope that we gain insights that help us design better systemsin the future.
</p>
<h1>
2 - Background
</h1>
<h2>
2.1 - A Brief History of Java Sandbox Exploits
</h2>
<p>
The first version of Java was released by Sun Microsystems in 1995 [2]. Oneyear later, researchers at Princeton University identified multiple flawsenabling an analyst to bypass the sandbox [3]. The authors identifiedweaknesses in the language, bytecode and object initialization, to name afew, some of them still present in Java at the time of writing. It is thefirst time a class spoofing attack against the Java runtime has beendetailed. A few years later, in 2002, The Last Stage of Delirium (LSD)research group presented their findings on the security of the Java virtualmachine [29]. They detailed vulnerabilities affecting, among others, thebytecode verifier and class loaders leading to type confusion or classspoofing attacks. In 2010, Koivu was the first to publicly show thattrusted method chain attacks work against Java by explaining how to exploitthe CVE-2010-0840 vulnerability he has found [32]. In 2011, Drake describedhow to exploit memory corruption vulnerabilities in Java [4]. He explainshow to exploit CVE-2009-3869 and CVE-2010-3552, two stack buffer overflowvulnerabilities. In 2012, Guillardoy [5], described CVE-2012-4681, twovulnerabilities allowing to bypass the sandbox. The first vulnerabilitygives access to restricted classes and the second allows to modify privatefields. Also in 2012, Oh described how to exploit the vulnerability ofCVE-2012-0507 to perform a type confusion attack to bypass the Java sandbox[6]. In 2013, Gorenc and Spelman performed a large scale study of 120 Javavulnerabilities and conclude that unsafe reflection is the most commonvulnerability in Java but that type confusion is the most common exploitedvulnerability [8]. Still in 2013, Lee and Nie identified multiplevulnerabilities including a vulnerability in a native method enabling thebypass of the sandbox [9]. Again in 2013, Kaiser described, among others,CVE-2013-1438 a trusted method chain vulnerability found by James Forshawand CVE-2012-5088 a Java reflection vulnerability found by SecurityExplorations. Between 2012 and 2013, security researchers at SecurityExplorations discovered more than 20 Java vulnerabilities [7]. Starting in2014, the developers of main web browsers such as Chrome or Firefox decidedto disable NAPI by default (hence no Java code can be executed by default)[11] [12]. The attack surface of Java being reduced, it seems that lessresearch on Java sandbox bypass is being conducted. However, exploitsbypassing the sandbox still pop up once in a while. For instance, in 2018,Lee describes how to exploit CVE-2018-2826, a type confusion vulnerabilityfound by XOR19 [18].
</p>
<h2>
2.2 - The Java Platform
</h2>
<p>
The Java platform can be divided into two abstract components: the JavaVirtual Machine (JVM), and the Java Class Library (JCL).
</p>
<p>
The JVM is the core of the platform. It is implemented in native code andprovides all the basic functionality required for program execution, suchas a bytecode parser, JIT compiler, garbage collector, and so forth. Due tothe fact that it is implemented natively, it is also subject to the sameattacks like any other native binary, including memory corruptionvulnerabilities such as buffer overflows [1], for example.
</p>
<p>
The JCL is the standard library that ships together with the JVM. Itcomprises hundreds of system classes, primarily implemented in Java, withsmaller portions being implemented natively. As all system classes aretrusted, they are associated with all privileges by default. Theseprivileges give them full access to any sort of functionality (filesystemread/write, full access to the network, etc.), and hence full access to thehost machine. Consequently, any security bug in a system class canpotentially be used by analysts to break out of the sandbox.
</p>
<p>
The main content of this paper is thus separated into two larger sections -one dealing with memory corruption vulnerabilities, and the other onefocussing on vulnerabilities at the Java level.
</p>
<h2>
2.3 - The Security Manager
</h2>
<p>
In the code of the JCL, the sandbox is implemented with authorizationchecks, most of them being permission checks. For instance, before anyaccess to the filesystem, code in the JCL checks that the caller has theright permission to access the filesystem. Below is an example checking theread permission on a file in class _java.io.FileInputStream_. Theconstructor checks that the caller has the read permission to read thespecified file on line 5.
</p>
<pre>
1: public FileInputStream(File file) throws FileNotFoundException {
2: String name = (file != null ? file.getPath() : null);
3: SecurityManager security = System.getSecurityManager();
4: if (security != null) {
5: security.checkRead(name);
6: }
7: if (name == null) {
8: throw new NullPointerException();
9: }
10: if (file.isInvalid()) {
11: throw new FileNotFoundException("Invalid file path");
12: }
13: fd = new FileDescriptor();
14: fd.incrementAndGetUseCount();
15: this.path = name;
16: open(name);
17: }
</pre>
<p>
Note that for performance reasons, authorizations are only checked if asecurity manager has been set (lines 3-4). A typical attack to escape theJava sandbox thus aims at setting the security manager to null. Thiseffectively disables all authorization checks. Without security managerset, the analyst can execute any code as if it had all authorizations.
</p>
<p>
However, authorizations are only checked at the Java level. Native codeexecutes with all authorizations. Although it might be possible to directlyexecute arbitrary analyst's controlled native code when exploiting memorycorruption vulnerabilities, in all the examples of this paper we focus ondisabling the security manager to be able to execute arbitrary Java codewith all permissions.
</p>
 
Last edited:

Shoggoth

kiwifarms.net
This probably gives me a few autismo points but I still think the best language to get started with is Scheme in Dr. Racket
I'm still baffled by their decision to implement that crappy match-case statement. At this rate I'm pretty sure Python 4 is gonna be strictly typed. These people don't understand consistency.
Why? It's not a bad idea, although open polymorphism is better
 

Nathan Higgers

You can call me Nate.
kiwifarms.net
Why? It's not a bad idea, although open polymorphism is better
Indentation hell. Furthermore, it has some questionable design choices that will lead to ton of crappy code (already a problem in the Python world) and bugs if you're coming from a C background.

I wanted to talk about compatibility as well, but as Python 3 has shown us, Python devs simply don't give a crap about compatibility.
 

Anstiv

{{{{{{{}}}}}}}
True & Honest Fan
kiwifarms.net
Indentation hell. Furthermore, it has some questionable design choices that will lead to ton of crappy code (already a problem in the Python world) and bugs if you're coming from a C background.

I wanted to talk about compatibility as well, but as Python 3 has shown us, Python devs simply don't give a crap about compatibility.
Ngl man you sound entirely like you're falling for /g/ memes and aren't actually a Python dev.

Python's main problem will and always will be that it is very slow. In practice this is helped with it's C interop so you can have fast computation for tensors, but that's C, not Python.

My only main gripe with Python as a language (outside of performance) is that it uses whitespace for syntax. Otherwise it is a fairly expressive language that is extremely readable. If you're comfortable writing in OOP and FP, you can read any library or project you come across very quickly if it's in Python, quicker than most languages than I can think of.

This is probably the main reason Python has exploded recently and has eaten up other projects. It's not that huge swaths of idiots have entered the industry because Python is an easy language, it's because most of the problems with programming languages are social ones, and Python's acceptance of multiple paradigms and it's ease of reading have greatly helped those social problems.

So while it's a pretty meh language for personal development, for projects that you just want to work on with a super powerful and fun language, it's genuinely a great language for the overall programming "community".

Going off this line of thought, this is why Lisp failed and never became popular again after the AI winter (though it's had some resurgence in various forms).


At the end of the day programming is about building shit. If you want to go an enjoy academia and play with monoids in Haskell be my guest. But if you actually want to build shit, you have to be cognizant that building really big shit usually involves working with other people.
 

Nathan Higgers

You can call me Nate.
kiwifarms.net
Ngl man you sound entirely like you're falling for /g/ memes and aren't actually a Python dev.

Python's main problem will and always will be that it is very slow. In practice this is helped with it's C interop so you can have fast computation for tensors, but that's C, not Python.

My only main gripe with Python as a language (outside of performance) is that it uses whitespace for syntax. Otherwise it is a fairly expressive language that is extremely readable. If you're comfortable writing in OOP and FP, you can read any library or project you come across very quickly if it's in Python, quicker than most languages than I can think of.

This is probably the main reason Python has exploded recently and has eaten up other projects. It's not that huge swaths of idiots have entered the industry because Python is an easy language, it's because most of the problems with programming languages are social ones, and Python's acceptance of multiple paradigms and it's ease of reading have greatly helped those social problems.

So while it's a pretty meh language for personal development, for projects that you just want to work on with a super powerful and fun language, it's genuinely a great language for the overall programming "community".

Going off this line of thought, this is why Lisp failed and never became popular again after the AI winter (though it's had some resurgence in various forms).


At the end of the day programming is about building shit. If you want to go an enjoy academia and play with monoids in Haskell be my guest. But if you actually want to build shit, you have to be cognizant that building really big shit usually involves working with other people.
Yes, in theory and in an ideal world, everything you're saying is correct. But we don't live in an ideal world. Once you get away from well known open-source Python libraries and have to deal and debug the code that people have written USING these libraries, you will see that Python's permissiveness and simplicity is a massive fucking hurdle when it comes to maintaining a codebase. I have seen Django apps that can make a grown man cry.
This gets worse when it comes to AI/ML stuff. The amount of subpar and shit code people write using PyTorch or libraries like pandas and whatnot can drive someone to suicide.

And yes, at the end of the day "there are only two kinds of languages: the ones people complain about and the ones nobody uses." I will still use Python, but that doesn't mean I am not gonna complain about it.
 
Last edited:

AmpleApricots

kiwifarms.net
Phython is awful especially as language to newcomers because it teaches terrible habits that'll be hard to overcome if you ever want to write anything in a different language, making sure you stick to Python forever and write terrible spaghetti code that's dependent on 30923923 other libraries because you never learned how to reverse a string and now suffer from impostor syndrome because people actually pay you for the garbage you copy&paste from stack exchange and only barely understand because the only thing python ever really thought you is that there's a library for that and you don't have to understand things.
 

Considered HARMful

kiwifarms.net
This is probably the main reason Python has exploded recently and has eaten up other projects. It's not that huge swaths of idiots have entered the industry because Python is an easy language, it's because most of the problems with programming languages are social ones [...]
This is the most exceptional take that I've seen in this topic. Congrats.

Retards going all hurrr programming is a social activity durr is the cancer that is killing /b fun in programming. This exact mindset led to Code of Conduct mania.
 

Shoggoth

kiwifarms.net
Indentation hell. Furthermore, it has some questionable design choices that will lead to ton of crappy code (already a problem in the Python world) and bugs if you're coming from a C background.

I wanted to talk about compatibility as well, but as Python 3 has shown us, Python devs simply don't give a crap about compatibility.
Python is ass, in general, but imagine combining MyPy for the type safety and Hy because fuck indentation and fuck your coworkers
At the end of the day programming is about building shit
This is why (Common) Lisp fails. The programmers are in a sort of eternal state of Nirvana which makes them both never put something new forward (everything was done already) and be so insufferably smug and obnoxious no one wants to work with them.
Which is why neolisps will win, Clojure, Hy, Fennel, Janet, etc.
Not to be too meta, but the /g/ memes are correct, if taken in perspective.
 
This is why (Common) Lisp fails. The programmers are in a sort of eternal state of Nirvana which makes them both never put something new forward (everything was done already) and be so insufferably smug and obnoxious no one wants to work with them.
No. It fails because of its absurdly unreadable syntax (which all of its successors continue to double down on), and fancy yet hardly useful in real world programming idea of S-expressions (i.e. code is data). Yeah, it is very powerful concept, but like for backend implementations, such as compilation & optimization, but not for human operations. How often do you need to write self-modifying code in real programs, or programs to generate programs? There are saner ways to do generic programming than full-blown macro-generation, which with already fucky syntax of Lisp gives even bigger fuck you to program's maintainer. Same goes for DSL, why do you need to invent new ways for expressing things that you already can express in base language? What, you are expert in your field, but not good at programming, so DSL is a very handy way to express yourself to computer? Well, no, if you not good at programming, than no amount of DSL will help your programming, you always will end up with shitty code, just in DSL. That route was already explored by COBOL. So, gid gud and learn to design and develop in proper programming language.

Lisp itself was invented as an autocode for symbol processor machine, and is perfectly fitted exactly for that. Retards was blown away of new concept that computers can be more than simple number crunchers and run away with Lisp as a high level general purpose programming language, which it never was. For fuck sake, all Lisp's descendants to this day don't have a proper mathematical expression syntax, the first thing that started the high level programming.
 

Anstiv

{{{{{{{}}}}}}}
True & Honest Fan
kiwifarms.net
No. It fails because of its absurdly unreadable syntax (which all of its successors continue to double down on), and fancy yet hardly useful in real world programming idea of S-expressions (i.e. code is data). Yeah, it is very powerful concept, but like for backend implementations, such as compilation & optimization, but not for human operations. How often do you need to write self-modifying code in real programs, or programs to generate programs? There are saner ways to do generic programming than full-blown macro-generation, which with already fucky syntax of Lisp gives even bigger fuck you to program's maintainer. Same goes for DSL, why do you need to invent new ways for expressing things that you already can express in base language? What, you are expert in your field, but not good at programming, so DSL is a very handy way to express yourself to computer? Well, no, if you not good at programming, than no amount of DSL will help your programming, you always will end up with shitty code, just in DSL. That route was already explored by COBOL. So, gid gud and learn to design and develop in proper programming language.

Lisp itself was invented as an autocode for symbol processor machine, and is perfectly fitted exactly for that. Retards was blown away of new concept that computers can be more than simple number crunchers and run away with Lisp as a high level general purpose programming language, which it never was. For fuck sake, all Lisp's descendants to this day don't have a proper mathematical expression syntax, the first thing that started the high level programming.
Nigger if you can't figure out how to write and read s-exps I feel bad for your teeny-tiny brain.

Install a bracket-pair colourizer, The extension in VS Code even underlines the current form in a very helpful way like this:
1634210964435.png

1634213661211.png

(there's almost definitely a better way of doing this)

Make use of the thread first/last macros. Use a paredit. If you do all those fairly simple things your code will be very easy to read and it'll be easy to write.

If your functions are massively nested behemoths that go past 79 columns then you're writing your code like a nigger. Refactor that shit into smaller and more abstract functions.

Sure there is a bit of a learning curve to reading it but once you've done it for like a day or two it's like reading anything else.

Also I literally have no idea how someone could think treating code as data is a bad idea, generally it's the thing most people look at Lisps and go "oh yeah that's actually really useful". Even if you leave macros aside, being able to write EDN over a wire is very useful.
 
Last edited:
copypasted

Nigger if you can't figure out how to write and read machine code I feel bad for your teeny-tiny brain.

Install a macro preprocessor, and a pretty-printer, and a colorizer, The extension in IDE (Imbecile Developer Enabler) even underlines the current form in a very helpful way like this:

kindergarten-playdo-color-shit.jpg

(there's almost definitely a better way of doing this)

Make use of pen and paper and allocate all your program memory beforehand. Memorize your register allocations. Always count your jump points. Use a paredit (PARaplegic Editor for Disabled Information Technicians). If you do all those fairly simple things your code will be very easy to read.

If your functions are massively nested behemoths that go past 7 lines, then you're writing your code like a nigger. Refactor that shit into smaller and more abstract one-line functions.

Sure there is a bit of a learning curve to reading it but once you've done it for like a year or two it's like reading anything else. At this point I can read machine code in plain binary Grey code without syntax highlighting as long as it's decently formatted, and I've only been working with it for about a decade or two.
 
Top