5 ms·
The Q Programming Language
- pbohun 1y agoThis looks very interesting. I'm hoping there will be more documentation. For example, docs for the standard library/packages and explanation about the design of the language (does it use garbage collection? how does the type system work? how does the foreign function interface work? etc.). Technically I could find all these things out by reading all the source code, but that's a lot of work just to see if the language meets my needs.
- pbohun 1y agoLooking through the code a bit. This is quite impressive for such a short time working on it.
- tromp 1y agoNot to be confused with any of https://en.wikipedia.org/wiki/Q_(programming_language_from_Kx_Systems) https://en.wikipedia.org/wiki/Q_(programming_language_from_K... https://en.wikipedia.org/wiki/Q_Sharp https://en.wikipedia.org/wiki/Q_Sharp https://q-lang.sourceforge.net/qdoc.pdf https://q-lang.sourceforge.net/qdoc.pdf
- kagevf 1y agoWhen I saw the headline, I thought it referred to "Q" the array programming language (looks like your first link).
- a96 1y agoWhy oh why don't these projects even do simple web searches or stop to think that their users might want to search (and find relevant answers for) their language, library, or other project before picking the same bad names over and over again?
- deleted 1y ago[deleted]
- rickcarlino 1y agoIt really ought to have a simple example in the readme to give people a feel of the syntax.
- draxil 1y agodoes quickly draw attention to it's examples directory though
- rickcarlino 1y agoI saw the examples directory. It should still be at the top of the readme.
- a96 1y agoYes. Screenshots or examples, broad dependencies or used platform/technology should be the first things to show. It's incredible how far down they are buried many times. It's like they want potential users to give up before figuring out if it's a useful thing or not.
- derdi 1y agoThis is someone's private project for their own amusement. It's clearly not in a state where it would be "useful" to "users". Nor is it meant to be. At the moment it's meant for compiler geeks to look at. Not every readme is a sales pitch for Enterprise Quality(tm) software.
- thisislife2 1y agoA quick look suggests strong typing and that's a huge plus. The syntax is easy to understand and read, but I hope it will be consistent - if writeInt, why not writeStr etc. too?
- koehr 1y agoI think the syntax is really pretty!
- burnt-resistor 1y agoThere's already a Q language from KX. https://code.kx.com/q/ https://code.kx.com/q/
- fsckboy 1y agoI wish we could get away from putting syntax and naming betweeen us and languages. io.write is really annoying to me. rw.read and rw.write makes much more sense, or io.in io.out. io.writeInt writes an int as what, ascii/unicode, or binary? an Int is likely already binary/2's complement, and the language should print strings too, it's just a bad name. leaving parentheses out surrounding predicates and/or a semicolon at the end should be my choice, not yours, it has nothing to do with the language and I have preferences. If languages provided flexible syntax per user, divorcing themselves from syntax, then the further description of the language would be semantic. I have no idea what the semantics of this Q are, or are intended to be, and that's what matters. Compilation speed? that's not a language.
- theamk 1y agoSounds like you may like Perl, with its TIMTOWTDI ("There's more than one way to do it") principle. For example you can do "if" and "unless", in regular or suffix notation... If you go to Perl 6 (Raku) you can redefine major parts of the language like operators. Of course this flexibility is one of the reasons why Perl is no longer popular - everyone has "preferences" and allowing too much freedom just means you cannot read others' programs easily.
- fsckboy 1y agoi've coded a lot of perl, and i hate "there's more than one way to do it". not that there is more than one way, but the idea that it's a good idea. when there is only one way to do it, then you and i will write identical code and it will be therefore easy to maintain, an idea put forward by Charles Simonyi before you were born. perl's hodgepodge semantics do make sense if you had already lived on the cli in a perl-less world and already knew grep, sed, awk, etc. because that's where perl grabbed its ideas from and you would already be familiar with them and it would not seem like more of a hodgepodge than what you already knew. there is more than one way to do it (semantically) is not there is more than one way to write it (syntactically) The boolean algebra of sets and the boolean algebra of logic are isomorphic (which in a strong sense is "same syntax"), but they are not semantically the same at all, is what I mean by semantics. the point I was making has nothing to do with perl's hodge podge of semantics, i simply want to know what the semantics of Q are, and the syntax presentation in the examples hardly distinguishes its semantics from any other post algol language. I'm not saying the language should support multiple/lax syntaxes, I'm saying that when I edit a file I should see what I like, and when you edit the file you should see what you like; I should never see what you like unless we agree to share. Same semantics, not same syntax. The syntax would not be part of the language. The fact that syntax is part of our languages is how noobs get syntax confused with semantics and then never learn that semantics are the only important thing.
- hmry 1y agoFrom reading the readme, it seems the Language was designed to explore increasing compile speed, and producing optimized code without using LLVM. Yet all the comments are about the syntax. Never change, programmers. Personally, I would have painted the bikeshed blue.
- debo_ 1y agoYup. I really like the design goals. It's neat to think of golang being used to make a compiler that builds very tight executables! They might end up with a 100+mb go executable as a compiler. The syntax of the language itself seems somewhat go-inspired, which I suppose is natural.
- anta40 1y agoCan build the compiler on macOS 15.6 but it crashes. ./q examples/hello/hello.q signal: killed ./q examples/collatz/collatz.q signal: killed Even copying q files into q's folder doesn't work Ah, didn't notice the issue is already in discussion: https://git.urbach.dev/cli/q/issues/6 https://git.urbach.dev/cli/q/issues/6 Interesting that one of the goals is not to depend on llvm :D
- weiwenhao 1y agoI did something similar. Similar in every way. https://github.com/nature-lang/nature https://github.com/nature-lang/nature
- IshKebab 1y agoYeah normally I hate those "but there's already an abandoned programming language from the 80s that had a total of 2 users called X" but in this case the Q array language is pretty well known.
- fuzztester 1y agoI read almost all the examples, except for fizzbuzz. The syntax looks clean and concise. The small binaries and claimed speed are pluses. Hope it picks up.
- wosined 1y agoMajor vaporware vibes.