Results 1 to 7 of 7
-
2024-02-04, 02:09 PM (ISO 8601)
- Join Date
- Jul 2010
Best true compiled programming languages for language processing?
Basically, what true compiled (not JIT) languages are the closest to Python for ease and capability of programming parsers and language processing?
I'm not asking for any speed increase. I'd just use Julia for that. This is for the capability of making a truly closed source software product, and to make runtime binaries that do not depend on an interpreter or JIT compiler on the target system at all.
-
2024-02-05, 04:13 AM (ISO 8601)
- Join Date
- Jun 2013
- Location
- Bristol, UK
Re: Best true compiled programming languages for language processing?
How long is a piece of string?
On the other hand, I'm interested in seeing what answers you get. I've looked at Python, and on the whole I don't get it, it's just too different from c or Basic, for me, not that it's probably that different. There are complied Basics, and c is usually compiled, but I suspect they aren't what you want, and somebody probably knows something better. Pascal is something like c or Basic I've heard, but it's as old as they are.
On a third hand, if you really want whacky out there languages, there's Forth, Prolog and Lisp.Last edited by halfeye; 2024-02-05 at 04:17 AM.
The end of what Son? The story? There is no end. There's just the point where the storytellers stop talking.
-
2024-02-05, 01:25 PM (ISO 8601)
- Join Date
- May 2012
- Location
- The Algol System
- Gender
Re: Best true compiled programming languages for language processing?
Or, in other words, what colour of string parser would goimpile like?
Sounds like the requirements are:
1) At least a little bit like Python because you value Python's "easy" string processing. Maybe this would be more accurately stated as "The language must be decent enough at parsing text and sorting things into data structures", but that's basically every programming language. Even most assembly languages are pretty good at that, and assembly is pretty far from user-friendly in a modern context.
2) Decent, publicly-available tools for parsing text that don't have copyleft licenses (so your software can be closed-source).
A lot of the best tools for older compiled languages are open-source (and often with copy-left licenses that require you to also open-source your code), so closed-source means you're going to be building a lot of the tools yourself (or just not using those languages).
-----------------
My thoughts on the languages I know well enough to talk about:
I'm a big fan of C (it's a classic!), but the things C shares with Python (potential for treating data types as fuzzy, heaps of GPL2-licensed libraries, very simple syntax and few base-language features) probably make what you're trying to do harder instead of easier.
If you're okay with a bit of learning overhead, I'd recommend C++. Modern C++ is a weird beast, but it's decent enough at organizing data and offers several tools for string parsing that aren't available in C - it's definitely more "like Python" in that way. C++ also has some tools in its standard library to make memory management less manual (e.g. smart pointers), which is much friendlier to someone who isn't used to managing memory themselves.Avatar by FinnLassie
A few odds and ends.
-
2024-02-05, 03:49 PM (ISO 8601)
- Join Date
- Jul 2010
Re: Best true compiled programming languages for language processing?
Well, here's the problem. I know how to do these things in C, C++, Lisp, Forth, and Basic. I used to use all of those languages for language processing. But, I got a lot less work done in those languages(in NLP, specifically) than I can do in Python or Julia.
The problem is that Python and Julia's builtins are amazing for this sort of thing. But, in all the compiled languages I used to use or am aware of, often what would be a 2 line function in Python or Julia becomes 2 or 3 screens of code and/or requires researching and including some library or header that is not a standard library.
-
2024-02-09, 05:26 PM (ISO 8601)
- Join Date
- Aug 2011
Re: Best true compiled programming languages for language processing?
"Ease" and "compiled" don't really go together, but I'd probably suggest Rust. Of the compiled languages I've played with, it feels the most "pythonic", which isn't saying much but still.
Originally Posted by crayzzOriginally Posted by jere7my
-
2024-02-27, 03:49 PM (ISO 8601)
- Join Date
- Aug 2022
Re: Best true compiled programming languages for language processing?
If you are really going for a closed license system though, you kinda have to do this. You must build your own libraries/headers/functions/whatever using base code rules, and then construct your code from that point. I guess it all really depends on how truely "in house" this is supposed to be. I'm not an actual coder professionally (I just play one sometimes), so I can't comment on specific languages (though you've listed off a pretty comprehensive set already). I'm honestly the idiot who will go off and write a whole code base of functions in some language I'm not super familiar with, only to have someone say "why didn't you just include <some available library>?", so... maybe not the best source. I actually sometimes struggle with newer languages precisely because they are so dependent on adding in modules or libraries to do anything.
Then again, I once made a perl programmer cry by replacing his hundredsomething line script with a single command line once, so there is that. He was *so proud* of his work...
-
2024-03-10, 03:43 PM (ISO 8601)
- Join Date
- Aug 2013
- Location
- Italy, Turin
Re: Best true compiled programming languages for language processing?
Isn't there some kind of compiled version of Python? Something like Cython or whatever? I don't remember, my research about this are at least 7 years old... But I'm almost sure that something exists...