lainchan / λ

Modern general purpouse compiled programming language

lain is love · 2019-04-18 08:26
I can use C and C++ but they are rather old languages and for writting some easy app or game it's usually overkill. So i was thinknig of learning some modern programming language that is general purpouse and compilable. Any recommendations?
⍕ · 2019-04-18 10:51
You might give lua a shot, there are loads of libraries avaiable too. I think libs are available on http://luarocks.org and lua itself on http://lua.org
Gyula Kovacs · 2019-04-18 13:01
I haven't used it, but isn't this the exact rationale behind Go?
Jet Black · 2019-04-18 14:56
Rust
lain is love · 2019-04-18 16:33
>>13266 Lua is like javascript i heard and js is nogo and poopoo so i will pass >>13268 Go is google no thanks i don't wanna make software that is part of botnet >>13269 will consider
Erik Johansson · 2019-04-18 17:06
ocaml
The Plague · 2019-04-18 19:46
Haskell or OCaml
JARGON · 2019-04-18 23:29
Depends what you want to do, but if you need to go fast & therefore manage memory yourself, they are still the best languages we have so far and 90% of languages rely on a runtime environment written in C or C++ anyway. Maybe Rust and Ada are nice to mitigate memory management errors on large-scale applications, but C/C++ are still king for DSP, embedded programming and so on. It always depends of what you want to do. If you want a binary with garbage collection, take a look at D, Go, Haskell... If you are okay with JIT compilation, try Java, C#, Scala, F# or LuaJIT :)
t · 2019-04-19 01:18
>>13271 > Lua is like javascript It is, but without the poo in the loo community, which is like 90% of the problem with javascript. Lua is mostly written by academics or video game modders, neither of which have the usual industry-standard deadlines, and as a result the libraries are mostly pretty good. Lua has some sister languages like Moonscript (https://moonscript.org/), Terra (http://terralang.org/) and (not done yet) Titan (https://github.com/titan-lang/titan) depending on your needs. If you were more specific about what you liked and didn't like about C and C++ we could probably give better recommendations. Also, you said "compilable", but that word doesn't really mean anything anymore. Outside of a few academic toys or embedded computing, everything is running on a virtual machine nowadays; especially if you want to make apps or games. >>13282 >>13278 I'll second these recommendations for Haskell. It's not really a "just get it and go" language, but it's got the strongest type system out there. Also maybe consider Nim (https://nim-lang.org/)
Cypher · 2019-04-19 10:41
>>13271 >Lua is like javascript i heard Lua is designed to be embedded in larger software products and allow people who are typically not professional software developers to make changes and add extensions e.g. game designers or IT staff or hobbyists. The intention of Lua is not to be the main language you use for a whole project but that doesn't stop people and if all you're not doing anything more complicated than gluing together 3rd party libraries then it might work out well. >and js is nogo and poopoo so i will pass Any language that prioritizes diversity and inclusivity over everything else will be overrun by idiots who can't code and don't care about writing code. Python is also fair way down the same road. >>13271 >Go is google no thanks i don't wanna make software that is part of botnet In theory it's open source but future is doubtful if Google ever soykafcans it.
Naomi Nascimento · 2019-04-19 14:28
Object Pascal.
lain is love · 2019-04-19 14:48
>>13289 that gotta be troll
Cutter · 2019-04-19 22:31
>>13287 > In theory it's open source but future is doubtful if Google ever soykafcans it. It's all open source and based on a public spec so anyone can implement a compile for Go and make it fully compatible. There is already a fully functional GCC frontend you can use if you are afraid of Google botneting their compiler I use both and they both work fine. Official is slightly faster and has a couple extra features but GCC catches up every release. Take advantage of all the money Google pumps into and use to to make anti-google free software tools imo
Yet Another Lainon · 2019-04-19 23:07
>>13283 >Outside of a few academic toys or embedded computing, everything is running on a virtual machine nowadays; especially if you want to make apps or games. You forgot three major exceptions: low-level OS programming, high performance computing, and writing virtual machines. With the addition of bytecodes like JVM and web assembly, the space of compiled languages gets even bigger. Obviously this is not all of computing but
Yu-ichi · 2019-04-19 23:08
>>13294 Its a pretty big portion, and compiled languages aren't going anywhere for exactly this reason.
Morpheus · 2019-04-19 23:24
>>13290 what's wrong with object pascal?
quote · 2019-04-20 02:55
Modern? Nim, D, Crystal. These all have a heavy focus on programmer ergonomics (Nim'll probably feel original--it just has unusual roots, no it's not just Python; Crystal is just Ruby) while remaining efficient and still having decent type systems. Of the other recommendations in the thread, OCaml's not bad, but it won't feel "modern" unless you use Reason instead. OCaml's also more likely than any of my other suggestions to throw you off--like a horse throwing off its rider. It's not exactly the horse's fault; you just weren't ready for it. Haskell and Rust are traps. If you want a modern language without a GC... personally I'd go with Ada or D -betterC, and I've have a hard time recommending Ada over D even though D has some problems and even though -betterC leaves you without most of D's stdlib. Ada definitely won't feel modern, and although it's such a good language, you can't even type it comfortably without editor support. On the off-chance you consider Ada, here's some vim to keep your fingers from falling right off:au BufRead,BufNewFile *.adb,*.ads,*.gpr set ts=3 sts=3 et sw=3 au BufRead,BufNewFile *.adb,*.ads,*.gpr colorscheme industry au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -<Space> -<Space> au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap - _ au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap --<Space> --<Space><Space> au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -0 -0 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -1 -1 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -2 -2 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -3 -3 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -4 -4 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -5 -5 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -6 -6 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -7 -7 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -8 -8 au BufRead,BufNewFile *.adb,*.ads,*.gpr inoremap -9 -9 au BufRead,BufNewFile *.adb,*.ads,*.gpr map <C-p> :w<Return>:silent:%!~/opt/GNAT/2018/bin/gnatpp --name-mixed-case --pipe -D$(if [[ -f dict ]]; then echo dict; else echo $HOME/ada/dict; fi) %<Return>:silent:w<Return> au BufRead,BufNewFile *.adb,*.ads,*.gpr set ignorecase That lets you type "with ada.text-io; use ada.text-io;" while putting "with ada.text_io; use ada.text_io;" in your code. Then hit Ctrl-P to reformat your code so you don't have to care about it. Seed your dict with*IO* OS_Lib GNAT OS_Exit
lain is love · 2019-04-20 19:27
>>13298 Why haskell and rust are trap?
Tequila · 2019-04-21 00:39
>>13301 http://catb.org/jargon/html/B/bondage-and-discipline-language.html http://wiki.c2.com/?BondageAndDisciplineLanguage
Unsigned · 2019-04-21 00:44
>>13301 they both have a lot of elements from ML, so they're very appealing. You learn that stuff and, because you've never used an ML before, you think it's pure genius. And then you leap into the spiked pit with the stupid misfeatures that both languages also have. "That earlier stuff was genius, why does this hurt so much? Maybe I'm too stupid :("
藤原純一 · 2019-04-21 12:17
>>13303 Rust and Haskell are "traps" because they take ideas from ML but are not actually ML and this is an opinion you expect people to care about for some reason?
Fred Nurk · 2019-04-21 20:00
>>13303 IME rust is more like a learning-cliff the first time you use it, and then you get used to the borrow checker and it's a peice of cake.
Colmerauer · 2019-04-21 22:49
>>13306 the ML element are part of what's attractive about the languages, but OCaml isn't also a trap. They're traps because they're terrible languages. and no, I don't expect you to care: precisely because these are such bad languages, it's not worth the high effort of persuasively arguing against them. So go and waste a lot of time if you don't believe me. I've wasted a lot of time as well.
lain is love · 2019-04-21 23:22
>>13302 Bondage And Discipline is bad thing? Why? It's hard to follow you guys for me (yep still op there) Nim looks super interesting, gotta check it out
Mr. Roboto · 2019-04-22 01:52
>>13265 https://crystal-lang.org >as fast as C, as slick as Ruby This is supposed to be a good option for a modern compiled language, but they're not yet in version 1.0, so tread carefully lain.
nibble · 2019-04-22 09:16
>>13310 >I have an opinion but I can't back it up with any kind of argument so just take it or leave it Leave it it is. >>13311 >Bondage And Discipline is bad thing? Why? It depends on your values. It's a bad thing if you want to do things quickly or solve problems creatively without the language getting in the way. On the other hand if you're writing literal life or death software like a flight control system then you want a language that stops people being lazy smartasses and forces them to do things correctly.
Lord Nikon · 2019-04-22 18:53
>>13318 >interrogate anti-X sentiment to 11th degree >wholly accept pro-X sentiment as valid >other people are just bad at attacking X I've had this argument a thousand times already. It's not worth my time. >you want a language that stops people being lazy smartasses and forces them to do things correctly. no language does this well. The best languages offer tools, but to force their use still requires policy, and for their use to be meaningful still requires programmers to take it seriously. The best tools are 1. contract-based programming with pre- and post- assertions, as in Eiffel, SPARK, and Ada 2012. If you use these even once, even to write a little stack data structure, you'll be converted. 2. precise and distinct types--what you get from dependently typed languages or languages like Ada (or Nim) that you define a type as a subrange of another type, or that let you say "this type is just an int but don't let it implicitly mix with ints". 3. type checking and a minimum of implicit conversions, but this goes without saying. Even JS programmers know to avoid == because of all the conversions can try to make before the test. Be careful of complexity homeostasis. "This language is easier to reason about, so I need to work a lot harder to make my code harder to understand :)"
Six · 2019-04-22 20:11
>>13322 >interrogate anti-X sentiment to 11th degree >wholly accept pro-X sentiment as valid This isn't about anti/pro anything. It was a nudge for you to follow rule 4.
Agent Jones · 2019-04-23 01:24
Have you tried Myrrdin? [1] It's a programming language by the suckless.org people. [1] https://eigenstate.org/myrddin/
Junichi Fujiwara · 2019-04-23 03:29
>>13335 I don't think if it's correct to say Myrddin is by the suckless.org community. It definitely seems to try follow the suckless philosophy though. It looks interesting.
Joe Bloggs · 2019-04-23 13:23
>>13337 My bad. I should have said "one of the suckless.org people" instead.
Ender · 2019-04-23 15:08
>>13335 >that pic I know the guy on the left is supposed to be Bjarne Stroustrup but who is the ugly bloke/dyke on the right side?
Tomohisa "Tom" Kanezaki · 2019-04-23 15:22
>>13343 That's Steve Klabnik, the de facto spokesperson of the Rust community.