Nim, a pretty solid alternative to rust?

I'm pretty tired of the SJW non-sense going on at Rust, so I decided to search for an alternative.
Found this: nim-lang.org/

So far it feels pretty good, just wondering if any of you experienced with it could share some positives and negatives before I jump in.

Also they don't have a CoCk.

Attached: nimeme.png (1187x900, 42K)

Other urls found in this thread:

nim-lang.org/docs/gc.html
twitter.com/NSFWRedditVideo

>solid alternative to rust
Nim is garbage collected. Rust is not, so Nim isn't a perfect alternative and Rust is still needed for some uses.

Rust isn't needed for any uses. It can be replaced by C.

>replaced by C
I think that's the job of Rust to replace other programming languages.

So far the tests reports its garbage collection is ridiculously fast (and can be disabled). I will test some GC-disabled coding, maybe the language breaks apart.

There's no demand for Rust. It's a problem looking for a solution. How can it replace anything at all?

Disabling collection just means it will leak memory, turbo hitler

People will begin to see as an unsafe C option for a programming and since people see the words "fast", "systems programming", "safe" they will automatically flock to Rust never even touching C in their life.

Unless you... free the allocated data?

I tried some GC-enabled coding. It triggers on memory allocations, not on a timer (like C#, I believe), and can be tuned VERY easily, allowing you to "leave GC for later", limit it to run only x nanoseconds per run, etc...

The fact that it runs on allocations removes the biggest problem for me (game development) which is unexpected stuttering.

Can you do that in Nim? I thought the allocator API always invoked the GC

Yep: nim-lang.org/docs/gc.html bottom of the page. Barely documented, but it works.

I guess it's pretty much a direct translation into C's malloc and free, but it also allows allocating on a thread-shared memory pool. I have no idea about the internals, I'm too lazy to check the generated code :P

Rust's solution to memory safety "let the compiler yell at you" is absolutely retarded.
It's unironically better to just use a garbage collector.
Go is the systems language of the future. If you need speed use C/C++ and just program correctly.

I don't care at all about programming language group politics, but if you want a really good functional lang then try OCaml considering the excellent core libraries provided by a wall street finance corp, and it's ability to compile into anything like Javascript using Bucklescript (also see ReasonML or ReasonReact.. basically syntax sugar on top of OCaml compiler). The only rub there is it's not multicore stable yet.

Other good func langs to play around with are Erlang with it's totally crazy OTP standard library and BEAM vm. Or just write C++ using contracts so you know your code will do what you expect it to do.

Yeah, you'd be wise to avoid Rust
The stench of failure is starting to surround Rust
The only major production application with any significant amount of Rust is Firefox Quantum
Since release, the only thing Firefox leaks faster than memory is its userbase
Rust is memory "safe" though. Leaking memory is "safe"
Rust is safer than C because Rust binaries depend on libc
Rust is high performance. That's why it gets annihilated by JVM based Vert.x in techempower benchmarks
Rust never even managed to put together a native IDE
The Xi text editor is a half done research project, I've never seen anyone use it seriously
Without bolt-on solutions like Eclipse or Idea's Rust support, they wouldn't have anything
There still isn't decent libraries for core functionality like dates or crypto
ESR pitted Rust vs Go for a new project, Go won
Rust compiles are horrible and slow
Rust is "low level." It doesn't even compile itself to machine code, just LLVM IR
Rust hello world more than half a megabyte
There are no Rust jobs
Rust has a code of conduct about inclusivity
Their community outreach team is lead by Ashley "Kill all men" Williams

How would one go about building a game in Nim?

>Rust is still needed for some uses

Attached: 1503661153104.jpg (1200x630, 57K)

>No demand for rust
C is a security dumpster fire that cost billions of dollars in damages. It should have never have become popular in the first place. Thank God something is finally popular enough to replace that worthless piece of shit.

C gives you fair warning but does exactly what you tell it to. If you're driving a car and you jump over the divider into oncoming traffic, you can't blame other cars for hitting you.

I agree with you, I only picked up Rust to test it out and was incredibly disappointed.

I don't care much about efficiency, but so far all my serious projects all in C++ and C, I kind of love how these languages "look like" (Also I'm used to them). I guess I fell for the Rust evangelists, wasted plenty of time learning that mess.

Staying with C/++ for now (dumping Rust), but going to mess around with Nim, loving it so far!

Rust is not garbage collected, but it collects garbage anyway...

In Rust you are going to have to use ``Rc``s in almost all programs.

Referenced counted pointers are, in fact, a form of garbage collection. So if you have to use these things for everything then you are kinda forced to either use "garbage collection" or go unsafe.

Reference count pointers also exist in C++ (std::shared_ptr), and you can implement them in C (obviously), but you are not "forced" to use them.

Just use Ada like a sensible person.

>write rust compiler in c
>use that compiler to compile rust compiler written in rust
>use this new compiler
>no c involved
>profit

Wew, I thought someone will get the joke I made

You aren't forced to use them in Rust either. Where do you come up with this shit?

I wish there was a redpilled langauge but rust is non gc and has c++ goodies but without the c++ retardation. so far there is NO good alterantive to rust.

zig-lang is a out there but I unironically quit using them because of the akward array sytanx the use (same as c). that and I also don't know about the nature of the main creator of the langauge. might come back to zig tho.

I get it now, I'm stupid :P

Experience, you are not forced but good luck not using Rc's... You are going to have to do one hell of a set of weird hacks (or go unsafe).

Attached: 2123409808098345987.jpg (950x547, 79K)

What experience? The circumstances in which you'd need reference counting aren't any different from C++.

>"c with classes" meme

This image is a pretty good representation of what happens when people who haven't used either try to have opinions about programming.

>he doesn't know about Ada
Christ user, it's only been around for literally decades. No excuse.

Directly from my codebase, trying to store a list of entity references, which at the same time are stored in some tile entries of a tilemap. The C/++ (simple but unsafe, would require some CAREFUL coding) way would be to simply store a pointer to said entity in the tile, and in the entity manager store a vector of pointers to entities so they can be iterated over for rendering, updating, etc...

In rust good fucking luck doing that, you are going to fight the borrow checker like hell, even though you have planned every single data path of your code 10 times. You are going to end up storing, in the tilemap, the indices of the entities in the vector.

In C++ you can guarantee safety with 10 minutes of thinking (good thinking, not fucking randomly hitting keys until it compiles), in Rust, even though safety is guaranteed, you are going to be fighting the compiler to admit your ideas for 20 hours.

>ada
ada is a shitcoin

>in Rust, safety is guaranteed
That's worth it. Vulnerabilities should have been depreciated a long time ago

>c/c++ is good if programmed correctly
>rust is bad because it warns you when programming incorrectly
nice cognitive dissonance

>Rust is high performance. That's why it gets annihilated by JVM based Vert.x in techempower benchmarks
vertx shits on c/c++ in those same benchmarks too
>ESR pitted Rust vs Go for a new project, Go won
oldtime c dev prefers an easier c with gc? more news at 11
the same c dev also had this to say about rust, presented without comment:
>Even things that should be dirt-simple, like string concatenation, are unreasonably difficult.

welcome to Jow Forums

Attached: 1531336476436344660.jpg (789x960, 115K)

>You are going to end up storing, in the tilemap, the indices of the entities in the vector.

What's wrong with this? Storing pointers/references to anything in a vector is dangerous due to reference invalidation. Yes it works if you know you'll never reallocate but rust is correct to point people away from doing that in the general case, and it's not any harder to work with.

Ada is named after a woman. The guy you replied to specifically asked for a "redpilled" language, so stick to languages made by people who disavow the existence of women.

Looks like rust sucks major CoCs.

Attached: binary_size.png (752x452, 69K)

ESR knows what the fuck he's talking about and owns a bunch of guns. Questioning or criticizing him is not allowed.

are they still transpiling to C?

actually, it's
>rust compiler written in rust
>rust compiler doesn't the machine code
>rust compiler compiles to LLVM IR
>LLVM IR turned into native code, using libc
>muh low level
>muh safety

Attached: yay.jpg (600x393, 46K)

I like competition, but from my experience Nim is a buggier alternative to Crystal.

Good analogy people shouldn't be driving cars either. They kill a crazy amount of people every year. Car use should be drastically reduced just like C.

They said the same thing about alcohol. People won't stand for having their freedoms taken away.

From what I've read about it, Nim appears to be one of the strangest and most confused languages I've ever seen. It has no clear reason to exist, and is neither particularly general nor particularly good at any one thing. It's definitely not an alternative to Rust.

>SJWs CoCk degeneracy!!!!!!
Nevermind, you're an idiot.

They don't need to be banned dumb ass. We just need superior alternatives like good public transportation and a system language with good libraries that isn't absolute trash like C. Rust isn't the best but there have been better ones that haven't caught on. I'm just glad something is going to end that piece of shits reign of terror. I wish bell labs never existed.

>1.6MB for hello world
But why

Why the fuck would you bring a non-sjw infested language to Jow Forums? Are you a dumb nigger that hates fun?

Waiting for Jai.

Go embeds a runtime that handles the GC, etc. in every binary. Its niche is replacing Java and Python in server applications, not maximizing byte shaving for 16-bit DOS.

>just add more RAM lol
But I guess that makes sense.

The goal with a lot of Go projects is to drop a binary and some configuration files into a sub-10MB Docker container rather than spinning up a full VM. It's very space efficient by the standards of its role.

ghostware

>alternative to rust
you're asking the wrong question dumbass

it's even more meme tier than rust

Thats how compiling works you idiot. And the language the compiler is implemented in doesnt say any thing about its safety

>I'm pretty tired of the SJW non-sense going on at Rust, so I decided to search for an alternative.
Did your parents never teach you to treat other people with respect? That's literally all that is expected of you by the CoC. God, you're pathetic.

>I'm pretty tired of the SJW non-sense going on at Rust
name one incident
because you just sound like a parrot

>Nim, a pretty solid alternative to
no. because what said
/thread

its trying to replace golang

>>SJWs CoCk degeneracy!!!!!!
>Nevermind, you're an idiot.

if you ignore politics you are literally an idiot by the classical meaning of the word, that is a person ignorant of political affairs.

>I pick my languages based on the political orientation of its community
That guy who literally doesn't get anything done but stupid programming challenges

Ada is the CoC free alternative to rust

>if you ignore politics
Ignoring politics isn't the same as being able to deal with people who have different political opinions.

Let's laugh at all the people who decided to use the "stable" rust only to get eternally btfo the next month when their shit didn't compile anymore.
Language where you have to rewrite your codebase every other months won't replace shit. Only used by mozilla fagtrons and half the issues are concerning the retardedness of rust as a production language.

>Let's laugh at all the people who decided to use the "stable" rust only to get eternally btfo the next month when their shit didn't compile anymore.
What are you on about?

>use crate base64
>month later, API changes and yourshit doesn't compile
How do you use this language in production again? Oh yeah, constantly spend man-hours on fixing other people's shit instead of fixing your own shit.

I wonder which group of undesirables has a higher suicide rate, trannies or Rust programmers?

Trick question. Every rust programmer is a tranny, so the suicide rate is the same.

>Making shit up
Base64 was never part of stable Rust's standard library.

Wow another language used in even less commercial applications than rust. I'm good I'll stick with c++

>crate base64
>crate std
>reading comprehension
Pick one and buzz off, you have some code to fix from last week's API change.

Attached: 1513200395632.png (645x729, 40K)

>"stable" rust
>in production

>talks about stable rust
>explicitly uses 0.x crate
>complains when unstable code has api changes
are you developmentally challenged?

What are you even trying to say? Stop giving vague answers and actually point to a (significant) breaking change in stable Rust or it's standard library.

People should respect me, I shouldn't have to respect other people.

A language by itself is no use, it's defined by it's ecosystem, a chain is only as strong as it's weakest link, if one thing is unstable it might as well all be

The runtime has a fixed RAM cost, shithead.

Yaeoo