News for hackers. Stuff that matters.
Re:So you're using a weird language by poulpy123 on Thursday October 06, 2022 @07:26AM (#33106895)
I feel that. I had a look at compiled languages to replace/complement my usage of python. I wanted something simple (no manual gestion of memory, thanks) and easy to my eyes, but efficient, and if possible fresh but with a thriving community.

I looked at D, Crystal, Nim, Go, Rust, Haxe, Swift and Zig (and C/C++, even Pascal). The language I liked the most (by far) is Nim, but unfortunately the niche community makes it a no-go for using it at my job, and the lack of hype like Rust makes me pessimist about its future.

The second most interesting languages where Rust (but the borrow checker and the amount of ', |, <, > intimidate me) and go (but for a weird reason I'm not hooked by its syntax).

My conclusion was that where I work (not a dev company), I can't use nothing but java, python and javascript if I want my code to be sustainable, and that I will keep Nim or maybe Rust/Go as a low level hobby

Edit: as a funny note, during my exploration i stumbled upon array languages programming languages like K, and I'm convinced there are mainly a scheme to guarantee jobs for people using them

Re:So you're using a weird language by mejutoco on Thursday October 06, 2022 @07:30AM (#33106925)
Typescript meets your requirements I believe, althought probably you are considering together with javascript. If not, it might be interesting to try it.
Re:So you're using a weird language by poulpy123 on Thursday October 06, 2022 @07:39AM (#33106963)
Thanks ! But by compiled I meant compiled to binary, and I guess Typescript don't do it ?
Re:So you're using a weird language by nicoburns on Thursday October 06, 2022 @08:12AM (#33107218)
If you want to compile to a binary for ease of distribution, then you can do it with both TypeScript and Python (you just get an interpreter embedded in the binary), although in both cases you'll need to use a 3rd party tool to achieve this. If you want it for the performance then neither are good options, although JS/TS is significantly faster than Python.
Re:So you're using a weird language by poulpy123 on Thursday October 06, 2022 @12:14PM (#33110144)
I indeed explore this solution for python, but it doesn't look mature yet. I will have a look at the TS/JS solution, thanks !
Re:So you're using a weird language by cassiogo on Thursday October 06, 2022 @08:30AM (#33107405)
I _think_ you can get a binary from typescript code via Deno
Re:So you're using a weird language by goodoldneon on Thursday October 06, 2022 @09:37AM (#33108002)
You could use ncc to compile a binary:

https://github.com/vercel/ncc

Re:So you're using a weird language by remram on Thursday October 06, 2022 @10:28AM (#33108615)
TypeScript has a similar amount of <,>, and | though.
Re:So you're using a weird language by piffey on Thursday October 06, 2022 @08:49AM (#33107578)
In a similar boat right now. Really enjoy Nim -- and have the freedom to use any language I want at work -- but can't in good conscious develop tools in Nim that have to live beyond my time at the company without at least one other Nim user on the team or a global consensus that we should use Nim.

I'm trying to think back to when we all started moving from Perl to Python and it's been so long I can't even remember what that looked like and if it was senior developers driving that or just a subconscious decision and happened "magically".

Re:So you're using a weird language by carapace on Thursday October 06, 2022 @09:17AM (#33107818)
I'm doing a similar trawl. So far Julia is looking like the language to beat.

https://julialang.org/

Re:So you're using a weird language by poulpy123 on Thursday October 06, 2022 @12:17PM (#33110189)
I'm actually quite interested by the scientific ecosystem of Julia, and have the project to explore it more. But when I looked at it, there was no way to create binaries (or it was something like 100MB)
Re:So you're using a weird language by carapace on Friday October 07, 2022 @10:16AM (#33121655)
sheesh, you're right. They're working on it, and it's, uh, no worse than Python, but yeah I don't think it quite counts as a compiled language yet. Thanks for the heads up.
Re:So you're using a weird language by solidasparagus on Thursday October 06, 2022 @10:02AM (#33108261)
I'd give Go a chance. The syntax grows on you IMO and I think it fits what you want (easy on the eyes is arguable). If you like Python because of how productive it is, but you need performance or a compiled binary, I think Go fills that gap well.
Re:So you're using a weird language by JodieBenitez on Thursday October 06, 2022 @10:30AM (#33108642)
You didn't say why you want to replace/complement Python, but should you want to build web backends, Go is the obvious choice. Decent performance, relative ease of use, good GC, rich standard lib for the task, large third-party support and here to stay.

I like Nim too, but it needs more adoption.

Re:So you're using a weird language by poulpy123 on Thursday October 06, 2022 @12:15PM (#33110159)
A mix of wanting to try new thing, needed an easier way to distribute the software, and, why not, having better performances
Re:So you're using a weird language by kaba0 on Thursday October 06, 2022 @11:37AM (#33109618)
Honestly, what is even remotely interesting about Go? I have never understood the surrounding hype.
Re:So you're using a weird language by girvo on Thursday October 06, 2022 @06:00PM (#33114657)
Go is simple, but still decent for networking services. I don't get the "hype" per se either, but it's not a bad language really, and what it does do, it does pretty well. Local maximum, if that makes sense.
Re:So you're using a weird language by eitland on Thursday October 06, 2022 @05:04PM (#33114081)
If you have access to Java you have a good language at your disposal already, and chances are you'll get away with Kotlin too.

I came to Java as my 6th or so language (small amounts of Basic, VB, C, Assembly and Javascript before) and while I absolutely didn't like it in school, once someone told me how it was supposed to be used (rely an a real IDE) it became much easier.

I still continued to dabble in other languages (mostly php and python), but these days no way I would go back to Python.

Re:So you're using a weird language by goodpoint on Sunday October 09, 2022 @08:02AM (#33140231)
> the lack of hype like Rust makes me pessimist about its future

What really makes me pessimist is the fact that software development decisions are increasingly hype/marketing-driven than based on technical reasons.