-
10 votes
-
Critical vulnerability in Rust's Command library allows for command injection when using its API to invoke batch scripts with arguments on Windows systems (CVE-2024-24576)
18 votes -
Learning new programming languages with limited time: Rust, golang, or otherwise?
I want to learn a new language that I can use for personal projects. But I want to pick the right one for me, given the fact that learning it will be a time investment and I don't have a ton of...
I want to learn a new language that I can use for personal projects. But I want to pick the right one for me, given the fact that learning it will be a time investment and I don't have a ton of time for "fun" stuff these days.
I've spent a decent amount of time tinkering around with Rust and my experience has been decent so far, if I'm trying to filter it through the lens of the current Rust craze. It just seems that the code has a somewhat... ugly(?)... aesthetic to it? I'm not willing to cast it aside yet and I think the "ugliness" just comes from me not really recognizing the syntax very well.
I started looking at golang and was immediately interested in the marketing message of it being "a better C". Aside from Hello World, I haven't done anything else with it.
Some random notes/points about my experience and what I'm looking for:
- I am very accomplished with PHP, quite accomplished with C, somewhat accomplished with C++ and Python. Of those, I find Python to be too "free and easy", PHP (Symfony specifically) and C++ to be so OOP-oriented that I just end up writing a bunch of boilerplate, and C is just... C (I'd rather pull out a tooth than have to work with C strings).
- Aside from the obvious pains of C, I think it's the most fun of the bunch. I don't know why I think this, because again, I absolutely hate C strings.
- I appreciate the package management and ecosystem of Rust, from what I've seen. C-with-Cargo would be awesome.
- The older I get, the more I appreciate strong typing.
- I like a language that allows me to systematically and logically organize my code into various modules, directories, etc. This is where PHP/Symfony shines in that there's a place for everything, as opposed to a bunch of .c and .h files all dumped into a folder.
- Ideally, I'd like something that can compile into a binary that doesn't require JVM, etc.
I'm open to suggestions outside of Rust and Go... those are just the ones I've been seeing mentioned the most over the past decade.
26 votes -
White House urges use of type safe and memory safe programming languages and hardware
38 votes -
White House to Developers: Using C or C++ Invites Cybersecurity Risks
5 votes -
JavaScript bloat in 2024
51 votes -
Maybe everything is a coroutine
3 votes -
A 2024 plea for lean software
36 votes -
A reasonable configuration language
16 votes -
A universal lowering strategy for control effects in Rust
12 votes -
Koka - A Functional Language with Effect Types and Handlers
19 votes -
Is there a programming language that brings you joy?
Just for a moment, forget all of the technical pros and cons, the static typing, just-in-time compilation, operator overloading, object orientation to the max... Is there a programming language...
Just for a moment, forget all of the technical pros and cons, the static typing, just-in-time compilation, operator overloading, object orientation to the max...
Is there a programming language that you've just found to be... fun?
Is there one that you'd pick above all else for personal or company projects, if you had your druthers, because you would simply be so excited to use it?
And then, is there something missing in that "fun" language that's preventing it from actually becoming a reality (i.e. small community, lack of libraries, maintenance ended in the 80s, etc.)?
50 votes -
I want to learn Android (with Kotlin) ... should I focus on Jetpack or the old XML style?
I am an experienced programmer (mostly M$ stack -- C#, etc). I started learning mobile Android development a few months ago, learning both Kotlin and the larger Android development environment at...
I am an experienced programmer (mostly M$ stack -- C#, etc).
I started learning mobile Android development a few months ago, learning both Kotlin and the larger Android development environment at the same time. I got bogged down in tutorials and guides, because half of them teach Jetpack Compose methodology and half teach XML layout ... and, often enough, don't bother to mention which method they're using.
Which should I learn first? I am initially interested in learning Android dev for my own hobby/fun/side projects, but I would--ultimately--like to be able to put "Android developer" on my resume.
Jetpack definitely looks better, more modern, more OO, and I expect it will eventually become the new standard ... but that could still be many years down the road. Also, while it might be "better"--especially for larger projects--it also smells more complicated.
So, ultimately, I guess I should learn both if I actually intend to become an Android dev ... but I should definitely get comfortable with one, first ... so, which one?
11 votes -
An Intuition for Lisp Syntax
20 votes -
40 years of Turbo Pascal
10 votes -
How Lisp became god's own programming language (2018)
29 votes -
Rewriting a Chumsky Parser By Hand in Rust
8 votes -
Announcing TypeScript 5.3 Beta
12 votes -
Stack Overflow 2023 Developer Survey Results
19 votes -
Introducing RustRover: a standalone Rust IDE by Jetbrains
18 votes -
Perfectly reproducible, verified Go toolchains
11 votes -
Announcing TypeScript 5.2
8 votes -
Announcing TypeScript 5.2 RC
10 votes -
Representing heterogeneous data
6 votes -
Zig 0.11.0 Release Notes
12 votes -
The Val Programming Language
13 votes -
Coroutines for Go
9 votes -
Forth: The programming language that writes itself
10 votes -
Announcing TypeScript 5.2 Beta
6 votes -
What is the most advanced or creative program you can create using the LOX programming language?
Lox is a toy programming language that is designed in Java and C at craftinginterpreters.com. My challenge to you is: given the constraints of the Lox language, what are some creative or advanced...
Lox is a toy programming language that is designed in Java and C at craftinginterpreters.com.
My challenge to you is: given the constraints of the Lox language, what are some creative or advanced programs you can create?
This page provides a rundown of the design of Lox.
To kick it off, here's a simple function that estimates the value of pi:
fun estimatePi(rounds) { var pi = 0; var alt = 1; for (var i = 0; i < rounds; i = i + 1) { pi = pi + alt * 4/(2 * i + 1); alt = -alt; } return pi; } print "The value of pi is:"; print getPi(100000);
3 votes -
The Early History Of Smalltalk
7 votes -
What was your first programming language, what languages do you know now, and what tips do you have for those trying to learn any of those?
What was your first programming language, what other languages (if any) do you know now, and what tips do you have for those trying to learn any of those? Whether those tips are for beginners or...
What was your first programming language, what other languages (if any) do you know now, and what tips do you have for those trying to learn any of those? Whether those tips are for beginners or even advanced, to do with APIs, or if you've got a good library to share.
53 votes -
Introducing Hurl, a terrible (but cute) idea for a language
27 votes -
Has anybody followed along with Crafting Interpreters?
21 votes -
The ideal backend language to write web apps in 2023?
I know quite a controversial and opinionated question, one that might easily get blasted with downvotes on a site like StackOverflow or even Reddit! Nevertheless, one which I believe is still...
I know quite a controversial and opinionated question, one that might easily get blasted with downvotes on a site like StackOverflow or even Reddit! Nevertheless, one which I believe is still relevant to ask and useful one even in 2023.
The problem with backend web technologies is that we are overwhelmed with choices. Whilst getting spoilt with choices seems like a useful thing sometimes, it might easily be an impediment in decision making too. Based on my experience, there are a bunch of useful stacks and I will work on any of them if you pay me to work as a freelance coder. Each has its own pros and cons but I'm yet to find the ideal one which according to me is something that should be easy to code and deploy while also better performing at the same time.
- ASP.NET: C# is the language I started coding web apps with in my last company and ASP.NET web forms was quite the rage back then. PHP was also gaining traction in the open source world and the webdev was mostly divided between the Enterprisey .NET aristocrats of Microsoft world and the poor PHP peasants of the FOSS world! One good thing about ASP.NET was performance. Since MS controlled the whole stack, they also put great efforts at making it work faster. The bad thing, of course, was dependence on a closed tech stack and a closed black box that generated JS functionality on its own.
- PHP: When I resigned from that company and started freelancing, I came to know about open source, linux, XAMPP, etc. That was when I realized that my own attitudes and thinking was more attuned to the FOSS peasant mindset than the wealthy aristocrat's! I didn't earn quite as much in freelancing with WP, Drupal, SuiteCRM, CodeIgniter, etc. but I found great happiness and contentment in being part of the open source process. Till date, PHP remains my favorite language for backend development and most of my web projects involve CodeIgniter or even pure PHP.
- Python: Flask is what got me interested in Python web development. The sheer minimalism and flexibility of that framework is what I found quite remarkable and quite a rarity in the frameworks world. And jinja2 template system was just fantastic. The other framework called django is more popular I think and I've worked on that too but Flask still remains my favorite. Flask is good in performance dept. too but I think it gets tricky once you start scaling with too many users.
- Java: I've never really bothered with Java web development except a few tutorial experiments on the Apache TomEE server. The multi-layered approach that Java takes not only has very steep learning curve but unless you're a very gifted programmer, it's practically impossible to beat the performance of interpreted PHP/Flask!
- NodeJS: Again, not much work here except brief hobby projects like http-live-simulator. The npm packaging system really turned me off initially with so many packages and issues with that system in the earlier days. Nowadays, I've heard that it's much usable but I've never gotten into it.
And now, we also have the evolving languages like Golang, Rust, etc. taking their baby steps towards web development too! Are any of them worth giving a try? If someone were to ask you for a backend tech stack recommendation while giving equal weightage to performance, developer productivity and ease of deployment, which one will you suggest?
23 votes -
DreamBerd, the perfect programming language
14 votes -
SourceHut will blocklist the Go module mirror
13 votes -
Go generics can make your code slower
3 votes -
Sigils are an underappreciated programming technology
3 votes -
Stack Overflow trends: Weekday vs weekend site activity
5 votes -
Statically recompiling NES games into native executables with LLVM and Go
6 votes -
Google introduces Carbon, an experimental replacement for C++
11 votes -
The Helios microkernel
10 votes -
JavaScript physics engine for the absolute beginner
1 vote -
Why store code as text files?
Code is usually version controlled nowadays in git or some other VCS. These typically operate on text files and record the changes applied to the files over their history. One drawback from this...
Code is usually version controlled nowadays in git or some other VCS. These typically operate on text files and record the changes applied to the files over their history. One drawback from this is that formatting of the code can introduce changesbto the files that make no semantic difference, e.g. newlines are added/removed, indentation is altered etc.
Consistent formatting makes the code easier to read, but the style used is an aesthetic preference. There might be objective reasons for readability in at least the extreme cases, but in many cases the formatting is purely a preferred style.
If we instead version controlled code in the form of an abstract syntax tree (AST) (possibly even as just a series of transformations on that tree), we could have any formatting we'd like! When editing the code we would just be changing a projection of the AST and when we've made our changes the transformations could be made to the stored AST. If two languages shared the same AST the choice of language even becomes a choice for the programmer. Sadly this has some limitations since ASTs are usually language specific... But we could possibly take this a step further.
Could we take a compiled binary and use that as the basis for generating an AST? This is essentially what decompilers do. For heavily optimized code this is severely limited, but for debug builds a lot of extra information is retained in the binary that can be utilized to construct a sensible representation. This way of storing code the language used becomes a style preference! Code compiled from one language might become alien when viewed in another language (thinking of lazy Haskell code viewed in C), but maybe that is a corner case?
There are issues when considering binaries for different platforms. A binary for the JVM isn't the same as one for ARM64 or one compiled to run on an x86. So there are some limitations there...
One (very) good thing about storing code as text files is the ubiquity of software capable of viewing and editing text. It would however be cool if we could make programming language a stylistic preference that is compatible with other languages! At least the AST part should be perfectly achievable.
16 votes -
Experience with Crystal programming language?
I have heard just a little bit about the language Crystal every so often, probably since it was first mentioned on /r/programming. From what I know, it's Ruby-like syntax but with a static type...
I have heard just a little bit about the language Crystal every so often, probably since it was first mentioned on /r/programming. From what I know, it's Ruby-like syntax but with a static type system, which seems like a big benefit to me.
I written just a little bit of Ruby, so the syntax isn't very familiar to me, and I haven't bothered trying Crystal out, but I'm curious to know what kinds of things people do with it.
So, my questions are: Do you have any experience with Crystal? If so, what have you used it for? Was it a professional or recreational project? How did you like it? What about it stood out to you compared to your experiences with other languages?
Thanks!
8 votes -
Nim Community Survey 2021 Results
2 votes -
Unix philosophy without left-pad, Part 2: Minimizing dependencies with a utilities package
9 votes -
Following the Unix philosophy without getting left-pad
4 votes -
Rust Moderation Team resigns
20 votes -
The coming firmware revolution
15 votes -
It's time to get hyped about const generics in Rust
11 votes -
Taking the warts off C, with Andrew Kelley, creator of the Zig programming language
17 votes -
Space-related applications of Forth (1998)
2 votes -
Common mistakes and bad habits in Rust
5 votes -
FD 100
7 votes -
Go proposal: expression to create pointer to simple types
4 votes -
A recent Python Enhancement Proposal targets adding "exception groups," as well as new syntax to catch and handle the groups
4 votes -
The lead developer of curl analyzed its known security vulnerabilities and determined that half of them are related to it being written in C
12 votes -
Nx (Numerical Elixir) is now publicly available
7 votes -
[Python] Buffer overflow in PyCArg_repr
5 votes -
Why I still Lisp (and you should too!)
10 votes -
Obituary of Dr. Brad J. Cox Ph.D.
9 votes -
What’s the point of pointfree programming?
6 votes -
Why nullable types in Dart?
11 votes -
Why scientists are turning to Rust
9 votes -
Why Raku is the ideal language for Advent of Code
5 votes -
The code that controls your money
8 votes -
Benno Rice: What UNIX Cost Us
10 votes -
What's coming in PHP 8
7 votes -
Real time communication at scale with Elixir at Discord
10 votes -
The Julia programming language is emerging as the tool of choice for large-scale numerical work in scientific research
12 votes -
C++20 approved, C++23 meetings and schedule update
11 votes -
Writing the same CLI application twice using Go and Rust: a personal experience
7 votes -
Go team publishes draft design proposals for a new read-only filesystem interface and a standard way to embed files into Go binaries
2 votes -
What is Zig's “colorblind” async/await?
8 votes -
Announcing sound null-safety for Dart
7 votes -
Results from the 2020 Stack Overflow Developer Survey
19 votes -
Analyzing the simplest C++ program
12 votes -
Promise.all vs Promise.allSettled
3 votes -
Should x < $foo < y read from $foo once or twice? Perl debates
6 votes -
Variations on the Death of Python 2
8 votes -
LabVIEW: Community Edition
4 votes -
US unemployment checks are being held up by a coding language almost nobody knows
21 votes -
Programming Languages that are Both Interpretable and Compilable?
I've been thinking about the feasibility of defining a language spec that can both be compiled and interpreted lately. I first thought about it while writing code in crystal, which, for the...
I've been thinking about the feasibility of defining a language spec that can both be compiled and interpreted lately. I first thought about it while writing code in crystal, which, for the unfamiliar, is a compiled language based heavily off the syntax of an interpreted language (ruby).
Here are a couple reasons I find the idea interesting:
- It effectively neuters the interpreted/compiled language debates. Why just choose one, when both have such big upsides?
- You could develop a program in the interpreter with the same playfulness as you get in a shell, and then compile it into a speedy 'lil thing!
- It would be wonderful for metaprogramming! From my experience, languages usually define a little janked together syntax for compile-time execution. If the language had an interpreter for itself within the compiler, you could metaprogram and program in the exact same language.
I'm curious if any languages like this exist, or if you can think of more benefits.
Edit:
I just want to mention that my reference to 'feasibility' earlier is not born of disbelief - you can write a compiler or interpreter for any (to the best of my knowledge!) well defined formal grammar with enough effort. I suppose I left that word there to account for the fact that I might have unknown unknowns here.14 votes -
Zig 0.6.0 has been released
15 votes -
Crafting "Crafting Interpreters"
10 votes -
Nim 1.2.0 released
6 votes -
`zig cc`: a Powerful Drop-In Replacement for GCC/Clang
8 votes -
Is C++ fast?
9 votes -
The debate over adding support for the IANA time zone database to the Python standard library
7 votes -
F# 5.0 Preview
6 votes -
Scaling back my involvement in Rust - Alex Crichton
8 votes -
World's First Classical Chinese Programming Language
9 votes -
Why Discord is switching from Go to Rust
17 votes -
An update on bradfitz: Leaving Google
7 votes -
A Sad Day For Rust
27 votes -
Go 1.14 Beta 1 is released
4 votes -
Using PHP 7.4 typed properties
4 votes -
Infectious Executable Stacks and GCC's extension that allows closures in C
7 votes