12 ms·
The Rune Programming Language
- simonebrunozzi 4y ago> This is not an officially supported Google product. Then why is it under github.com/google ?
- sideeffffect 4y agoAre there any officially supported Google products under github.com/google ?
- threatofrain 4y agoEven if there aren't, it makes sense to clarify to media that this is an open source project made without any business commitments. I've seen other businesses do something similar; internally it reduces friction with the business admin when devs want to open source something.
- throwawaybutwhy 4y ago_without any business commitments_ - not to sound trite, but when is the last time Google stood by its commitments?
- ithkuil 4y agoGoogle still sells ads, doesn't it?
- namkt 4y agoDidn't they originally claim to never show ads in search given that it is in direct opposition to search results quality? Back in the days when Pagerank was hot.
- AlotOfReading 4y agoThat was in the original pagerank publications. Google had lots of other early attempts to make money that avoided advertising (like the search appliance [0]), but the firehose of money from ads dwarfed anything else they could ever find and that early Google didn't last long. [0] https://en.wikipedia.org/wiki/Google_Search_Appliance https://en.wikipedia.org/wiki/Google_Search_Appliance
- ithkuil 4y agoWas that a "business commitment" or a "user commitment"?
- xendo 4y agoAre there any officially supported Google products?
- bheadmaster 4y ago
- pieshop 4y ago
- memorable 4y ago
- rad_gruchalski 4y ago
- pieshop 4y ago
- 867-5309 4y ago
- deleted 4y ago[deleted]
- TylerE 4y ago
- halffullbrain 4y ago
- ayewo 4y agoWould Google Guice count? https://github.com/google/guice https://github.com/google/guice
- IshKebab 4y agoThe code is owned by Google because it was written by a Google employee on the job.
- csande17 4y agoOr off the job -- Google claims ownership either way. https://news.ycombinator.com/item?id=1969979 https://news.ycombinator.com/item?id=1969979
- deleted 4y ago[deleted]
- zelphirkalt 4y agoThat would be one more huge reason not to work for them.
- vitiral 4y agoIIUC you can request exception and have your own personal projects, you're just supposed to be transparent about it. Your request will be rejected if it completes with Google business (like if you're making a new collaborative email and docs solution), but otherwise I've not heard any sob stories.
- impulser_ 4y agoBecause Google owns the code.
- vore 4y agoI believe Google has a practice where all projects that are copyright assigned to them are under github.com/google: https://opensource.google/documentation/reference/releasing https://opensource.google/documentation/reference/releasing
- xiaq 4y agoIt's not a hard requirement, but they do make you jump through extra hoops to put them elsewhere.
- halpmeh 4y agoWouldn’t it make way more sense to write this in C and expose a typed API via language-specific packages. The functionality is cool, but nothing stops you from forgetting to use secret(string) instead of string.
- TylerE 4y agoSeems kind of odd that you’re arguing “just do it in C” and “nothing stops you from forgetting” in the same post.
- halpmeh 4y agoWhy is that odd? You could provide a typed API in other languages that leverages a suite of different side-channel proof algorithms. In order to provide such an API, you need a portable language compatible with the C calling convention for FFI support in other languages. The only language that meets such criteria is C.
- joshuamorton 4y agoYou can't provide an API that gives the security features they want in c. The core feature here is a generic secret type. In c that's a void*, defeating the purpose of the typed, safe, API.
- halpmeh 4y agoYes you can? // lib.h struct SecureString { uint8_t *content; size_t len; } bool secure_str_eq(l *SecureString, r *SecureString) { // some constant-time algorithm } SecureString *new_secur_string() { struct SecureString *s = malloc(sizeof(struct SecureString)); // initialize s return s; } And then in go, for instance, you would do something like this: // #include "lib.h" import "C" type SecureString struct { ptr *C.struct_SecureString } func NewSecureString() *SecureString { return &SecureString { ptr: C.new_secure_string(), } } func (s *SecureString) Eq(other SecureString*) bool { return C.secure_str_eq(h.ptr, other.ptr) }
- habibur 4y agoWritten in C. Uses LLVM for execution. Parsers are Lex and Yacc.
- sacnoradhq 4y agoSo a weekend toy project. Hand-coded parser-lexers are far more powerful because their diagnostics are useful and are much easier to maintain. Lex/yacc / flex/bison products by contrast have awful diagnostics and become steaming piles of confusion that have to be rewritten.
- habibur 4y agoPHP is Flex/Bison. The main point of the discussed project is to alter data structure to be more CPU cache friendly and thus try to be faster than C++. The paradigm.
- pkolaczk 4y agoThere already exists Rune programming language and that one was earlier: https://rune-rs.github.io/ https://rune-rs.github.io/ They should be more careful picking the name.
- FreeFull 4y agoThere already was a GO programming language before Google decided to use the name, too.
- subtra3t 4y agoThat doesn't justify them choosing an already chosen name now, does it?
- sieabahlpark 4y agoUnless it's trademarked it doesn't matter in the slightest
- laumars 4y agoI didn’t read the GPs comment as a justification.
- Beltalowda 4y agoRune (the existing language) is a fairly small hobby project that only got started in 2020. The developer of this new Rune probably just didn't know about it. There is nothing nefarious here. There is no cabal. These things happen all the time. I've had it happen to two of my own small/obscure projects. It happens.
- pkolaczk 4y agoGoggle's Rune is even a smaller hobby project.
- tmtvl 4y agoAh, so they're repeat offenders. How's it go again? Cache invalidation, naming tconcurrencyhings, , and off-by-one errors?
- nnoitra 4y agoCan someone explain the timing security vulnerability mentioned in the article, I'm not sure I understand.
- aflag 4y agoThis is sort of classic problem. First, you need to assume the attacker is capable of measuring checkMac's runtime reliably. Second, you also need to assume the attacker is able to control the message and the mac, but not the secret. How the attacker got there is not really relevant, the point is figuring out whether or not the system is possible to crack by having the attacker full knowledge of everything, but the secret. In most languages, a similar implementation of checkMac would not pass the test, because they will usually implement some sort of short-circuiting. Which essentially means that checkMac will take longer to execute the closer you get to the true mac of that message. Let's say computeMac(secret, "a") == "a21a". The attacker could pass in message="a" mac="0000" at first. Let's say that takes 1 unit of time, because "0000" == "a21a" only has to look at the first character. So the attacker knows that 0 is wrong. They then try "1000", then "2000", up until they get to "a000". Then, the algorithm takes 2 units of time, the first one is comparing '0' == 'a' and the second one is '0' == '2'. Now the attacker knows the first character of the mac. They keep going like this until they find out the entire mac of the message. In a nutshell, the time the function takes to execute leaks informartion that an attacker could use. In this language, when you do use the secret(string) type, it will always compare all the characters of the string, even after it knows it will be false anwyay, just to make sure no information is leaked.
- WhiteBlueSkies 4y agoCan someone explain how this works: "Assume the attacker can tell how long it takes for mac == computedMac to run. If the first byte of an attacker-chosen mac is wrong for the attacker-chosen message, the loop terminates after just one comparison. With 256 attempts, the attacker can find the first byte of the expected MAC for the attacker-controlled message. Repeating this process, the attacker can forge an entire MAC." How precisely should an attacker guess how long the comparison runs?
- JohnBooty 4y agoThey wouldn't be guessing, they'd be measuring. I'm not qualified to really explain more but if you want to learn more, "timing attack" is what you're looking for https://en.wikipedia.org/wiki/Timing_attack https://en.wikipedia.org/wiki/Timing_attack
- lgeorget 4y agoBy how fast the function returns. This is white-box security, a hypothetical setting where we assume the attacker has access to the entire knowledge of the system and to every oracle they want (like an oracle telling them how much time each function takes), but don't know any secret, like private or symmetrical keys. If you can prove that your function is secure in that setting, then it's secure in real-case situations where the attacker knows even less.
- deleted 4y ago[deleted]
- wolf550e 4y agoYou guess the MAC tag value of the message and measure how long it takes the server to return "bad MAC" error or behave in a way that means the MAC was bad. In 1/256 cases, it takes longer because the first byte was correct. You may need to send many queries to get the value because timing is noisy, but with statistics you'll find that value. Now you try all 256 possible values of the second byte and one of them will take longer because both 2 first bytes are correct. Repeat. For the normal way to safely compare MAC values, see for example: https://docs.python.org/3/library/hmac.html#hmac.compare_digest https://docs.python.org/3/library/hmac.html#hmac.compare_dig...
- nine_k 4y agoPretty interesting: imperative programming meets relational DB models meets column store, with a serving of constant-time operations on top for data marked as secret. Also, memory-safe and blazingly fast in certain circumstances. Not complete though, some tests currently fail.
- aliqot 4y agoSyntax reminds me of Go. I'm looking forward to trying this out.
- auggierose 4y agoLooks like Swift.
- jstx1 4y agoWhat's up with having two different new experimental languages from Google on the front page https://news.ycombinator.com/item?id=33756800 https://news.ycombinator.com/item?id=33756800 - did Google just happen to release them at the same time? I think when Carbon came out people's reaction was stronger than deserved (like saying that Google don't believe in Rust, or that Go has been a failure because it hasn't replaced C++ etc.) while in reality all of this is very experimental and very early in its development. I kind of expect similar reactions to Rune and Mangle with some people trying to make a big deal out of nothing.
- dvirsky 4y agoThis isn't an official Google project, the contributions seem mostly from one person, so probably someone doing this as a 20% project. Carbon OTOH has a team working on it AFAIK.
- rvba 4y agoPromotion cycle, new unfinished languages.
- UncleMeat 4y ago"I open sourced some internal project, it has no adoption and no mindshare and no plan to achieve either of these things" isn't going to make for a successful promo. "Hey I built a thing, let's toss it over the wall but let people know what not to expect" is a perfectly fine thing for anybody to do.
- vbezhenar 4y agoFirst example seems weak. Any language can use separate data type for secrets and corresponding operator for constant-time comparison. Second example is very neat. Actually I thought about using sqlite with tmpfs database for application state. That could be useful for some kinds of applications. That said, using functional API over traditional data structures seems like a traditional and widely accepted approach. Interesting to see where that experiment will go.
- henrydark 4y agoBut it's not just operator overloading, there seems to be a monad-like "secret" that makes calls to func(a, ...) -> b with secret(a) return secret(b). The example doesn't spell this out explicitly, but I think those are the semantics of secret.
- aflag 4y agoWhat makes that different from creating a Secret class that's just a container class and defines its own methods? I just don't see what it is that requires a new language to accomplish and couldn't just be implemented as a library in many of the pre-existing languages (including popular ones like C++).
- mumblemumble 4y agoIt seems like we're focusing way too much on just the very first example, instead of the feature list as a whole? There are plenty of other interesting features, such as disallowing conditional branching on the contents of secrets, all the way down to enforcing Spectre and Meltdown mitigations around secrets without necessarily globally taking that performance hit on sensitive and non-sensitive data alike.
- aflag 4y agoI think I'm just not creative enough to think of features that need to be implemented by the language and not easily done at a library level. You could prevent the access to secret's contents by creating the appropriate class, but I suppose it would be harder or impossible to allow the user to peak into the contents but disallowing using them for branching specifically. Though, I'm not sure where that can be useful in practice. Also, I'm not sure how that language feature can mitigate meltdown and spectre. How can it do that?
- chakkepolja 4y agoInterestingly the parser is generated using flex and bison, which I thought was rare these days.
- tgv 4y agoIf you want accurate error messages, you might want to write the parser by hand. If you want to make changing the grammar easy, and have a reliable, correct parser, you use a parser generator. Some have better error message than bison.
- kevingadd 4y agoI'm perfectly fine seeing nullable references in a new systems programming language, but it's disappointing that nullable is the default. If you care about both performance and memory safety, being able to compile-time guarantee that you don't need a null check in a specific location can be big!
- DefNotMe 4y agoThis is because we didn't just kill Abel, we destroyed Abel, and this caused all of Abel's children to be recursively destroyed. TT
- namkt 4y agoThe Destruction of Abel, Jeremiah 27:14.
- sacnoradhq 4y agoSigh. There's enough religion in programming languages already. Can we not add or xor actual religion?
- fidgewidge 4y agoIt's got some novel ideas: better than many new languages! Don't quite grok why it eliminates the need for ref counting though. Tree structures are fine when you have them, but frequently you don't. The docs claim Rune programmers never write destructors even though there's no GC, so is there no equivalent of RAII? How do you model graphs? The constant time stuff doesn't matter. Virtually nothing needs to be constant time like that and when it does you're probably writing in assembly anyway.
- namkt 4y agoI think the point behind "constant time" here is that the comparison always takes the same amount of time, and not based on how many characters in the two strings are equal, to prevent a timing attack. "Constant time" isn't very accurate here because given a choice of hashing algorithm, the hash is a fixed-length string and therefore even a trivial string comparison technically "runs in constant time", at least if we allow the typical abuses of language in CS.
- fidgewidge 4y agoYes, but my point is that there are only a few use cases for this, mostly in cryptography, and to ensure something is genuinely constant time you have to write in assembly. The routines needed are small enough and compilers hard enough to trust that you just bypass them in practice, so it's an odd choice for something to build into a language syntax.
- namkt 4y agoMy assumption is that it's not just the syntax, but that their compiler does the right thing. Though someone said it's based on LLVM, so who knows how much control they get.
- TylerE 4y agoI suspect for the kinds of projects this might in theory be targeting, they aren’t doing any dynamic allocation at all.
- taspeotis 4y ago> The only close competitor is C++, where the author uses the little-known MemoryPool class from the <memory> library. I was like I know C++ and I’ve never heard of MemoryPool. Turns out that MemoryPool doesn’t exist in <memory>. In the source code they’re talking about it’s an alias to std::pmr::monotonic_buffer_resource. https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/binarytrees-gpp-7.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- cormacrelf 4y agoWhy would the struct-of-arrays layout be beneficial in a binary tree where every single node is visited, and the left + right arrays constitute all of the data in the tree? The previous example they gave was touching 75% less memory. In the binary tree it's the same amount of memory. Is the order it's touched better somehow?
- blep_ 4y agoSome memory-touching orders are better than others, because CPUs will prefetch nearby memory into CPU cache during memory accesses.
- hansvm 4y agoArray of struct tends to only be better when there's high temporal locality of using nearly all the fields. This code, as written, makes left node accesses temporally correlated with other left node accesses (and by symmetry must do the same for right nodes), allowing the caches at all levels to have a higher hit rate. Whether that higher rate is actually attained depends on the architecture, compiler, other running code, linker, and all sorts of other garbage, but it has a lot higher chance of better behavior anyway.
- cormacrelf 4y agoFor anyone interested, Rune's SOA is done entirely by DataDraw. The API for creating relations is passed almost verbatim to datadraw, which will generate a bunch of C code for interacting with the DD library. So Rune didn't really write any of this, it just bundled DD with a language runtime, and used a more permissive license despite DataDraw being LGPL... ! It was taking too long to set up Rune on an Ubuntu VM, so I just replicated Rune's version of the Benchmarks Game binary-tree benchmark using DataDraw directly. DataDraw runs the depth=21 case (single threaded, -O3) in about 4.6 seconds on my M1. It has the built-in advantage of reusing the table allocations as the database is global and implicit, the indexes being u32 sized. The existing C++g++#7/MemoryPool and Rust#5/bumpalo versions (both array-of-structs) are discarding their allocations on every iteration. Running Rust#5/bumpalo with RAYON_NUM_THREADS=1 runs in about 2.7 seconds. So in addition to the implementation being someone else's and possibly misused LGPL, the claims re the binary tree benchmark are not really made out. Nevertheless you can very closely approximate in Rust what DataDraw does, without macros or anything else, by creating a single global struct of `slab::Slab`s, inserting a dummy first element, converting the usize keys to NonZeroU32 and using this as your SOA. If you do that, then you get roughly the same perf except that DataDraw isn't doing bounds checks. So the Rust version can do it in about 5.5 seconds vs 4.6. Obviously this can't be parallelised as you're passing a single &mut SOA around or using a thread-local. I also compared the perf for a `slotmap::SlotMap`. It was about 7 seconds, but it solves the ABA problem with the generational indices, so that may be worth it. Finally I compared the perf for a global Slab<Node>, i.e. global AOS style, to avoid clouding the AOS results with bumpalo's insane performance. It ran quicker than the global SOA style, in 4.6 seconds, because the overhead of managing two arrays, their separate allocations and their bounds checks was too much for the memory access pattern to do anything, if there indeed was any advantage to it.
- nsajko 4y agoThis is an interesting idea for language design: > Users of Rune are protected, because the compiler sees that macSecret is secret, and thus the result of hmacSha256 is secret. The string comparison operator, when either operand is secret, will run in constant time, revealing no timing information to the attacker. Care must still be taken in Rune, but many common mistakes like this are detected by the compiler, and either fixed or flagged as an error.
- colonwqbang 4y agoI mean, this would be relatively easy to implement in any language that have operator overloading.
- henrydark 4y agoHow do you operator overload in C++ so that calling computeHmac(secret(string)) returns secret(string)?
- vitiral 4y agoDefine the computeHmac method to return a secret(string) type? Then define the equals operator for "secret" to behave in the needed way.
- henrydark 4y agoBut now you've forced computeHmac to only work only secrets, when there is no such need. You've coupled an implementation of an abstract algorithm with the particular case that _you_ want to use it this one time with sensitive secrets. The advantages of monads include exactly the opposite decoupling: the hmac algorithm implementation is true to its bare specification, and it is the context that changes some of its behavior.
- aflag 4y agoYou could overload computeHmac's return value so that it would return either a string or a secret, then you could use it directly with checkHmac, if you wanted, or as a string in other applications.
- the-smug-one 4y agoSo there's also reveal() primitive for revealing secrets, as shown by the code for msqrt(). OK, Rune gives you a library for computing stuff in CT, but how do I implement something independent of these things and show that they are CT? Do I still need to rely on FM techniques such as relational symbolic execution? Can I jump into a "constant" mode with a special typing system or something that lets me do this without having to run a more costly verification?
- greybox 4y agoI'll be interested to see how this compares to Nim (the other python-similar systems programming language). Very interested in trying seeing how it's 'SOA memory management' turns out in practice.
- colonwqbang 4y agoImplicit nullability of all values, a very dubious design decision in a new language.
- henrydark 4y agoGiven that they mention SQL more than other things, and stress SoA and memory intensive applications, I think this makes more sense than it would otherwise
- colonwqbang 4y agoSQL null is not like the null of programming languages, it behaves more like "unknown" than "blank". For instance, null != null. Arithmetic on null values is also well-defined so that 1 + null = null. I'm not convinced that implicit nullability is a good idea, either in SQL or in newly designed languages. I don't see the connection between implicit nullability and SoA. If you have a link to some example, that would be interesting to read.
- henrydark 4y agoI'm not convinced so either, just that it doesn't not make sense. As for SoA, I'm thinking of two relatively new formats and applications that have default nullable types, are SoA, and are specifically targeting memory intensive applications: apache arrow and duckdb, both seeing some success and well deserved hype
- kibwen 4y agoEven if you want to allow nullability, you can make it both explicit and opt-in rather than implicit and opt-out.
- runeks 4y agoGo on...
- colonwqbang 4y ago
- C2H4O2 4y agoNow, it is all just a race to replace C++ as quickly as possible.
- anhner 4y agoIs there any reason the `secret` type can't be implemented in, say, Rust, or is it just Google getting really excited to reinvent the wheel again?
- kibwen 4y agoYou can have a Secret type in Rust where the Eq, Add, etc. traits are overloaded with constant-time versions. I'm unclear if there are any semantics that operator overloading doesn't address.
- yccs27 4y agoThe secret (heh) is that any function defined on non-secret arguments can automatically be applied to secret arguments as well, and just returns a secret value now - without having to think about mapping/monads/whatever.
- mumblemumble 4y agoI think that it's actually something like the opposite of that. Rune disallows conditional branching on secrets, which would imply that passing secrets into the subset of functions defined on non-secrets that branch control flow based on an argument's value would be a compiler error.
- gus_massa 4y agoWhy do they call it "Python-inspired" if it looks like C++? From https://github.com/google/rune/blob/main/benchmarks/mandelbrot.rn#L33-L35 https://github.com/google/rune/blob/main/benchmarks/mandelbr... for k = 0u32, k < 8u32, k += 1 { cr0[k] = 2.0 * <f64>(8 * x + k) / <f64>width - 1.5; }
- nine_k 4y agoNot syntactically. It's slot-based, vaguely like Python, and has reference-counting GC, like Python. That's how I understand it.
- boxed 4y agoSo.. objective-c inspired? :P
- sacnoradhq 4y agoMinus static_cast or replacing C cast parens with angle brackets.
- andrepd 4y agoQuite underwhelming. The two main features seem to be constant time operations on values wrapped with Secret, and easy SoA layouts. The former is trivial to implement in Rust and C++, the latter is a bit more complicated, but also implementable in both via macros, in a reasonably ergonomic way. What is the advantage then?
- ARandomerDude 4y ago> This is not an officially supported Google product. Oh good, maybe it’ll be here a while.
- diarrhea 4y agox^2 means x squared, orphaning the XOR operator. Rune is for crypto, so math comes first. Isn't XOR used very heavily in crypto? (As is exponentiation of course)
- troymc 4y agoIt looks like Rune still has a bitwise XOR operator: @ https://github.com/google/rune/blob/main/bootstrap/database/expr.rn https://github.com/google/rune/blob/main/bootstrap/database/... That innovation does seem like a potential footgun.
- kibwen 4y agoHere's my hot take: if you're designing a new programming language in the modern era, even a systems language, ignore the precedent of C and don't use &|^~ as bitwise operators. You can still have infix bitwise operators, but spell them out as bitand/bitor/bitxor/bitnot. Then you can just use &| for logical and/or, which are 1000x more common than bitwise and/or, and you can reclaim ^ for exponentiation as well. And don't forget to fix C's broken bitwise operator precedence while you're at it.
- lvass 4y agoHard disagree on single characters for logic and exponentiation. ASCII has too few special characters and you'd want to use those elsewhere, without creating ambiguity. Elixir got it right.
- PointyFluff 4y agoASCII has tones of unused chars we could grab for coding.
- junon 4y agoMm yes but BEL is not a character that can be typed on a keyboard with any amount of ease.
- Kukumber 4y agoAny language that's implemented in C++ already starts with a handicap That's nice to see they went with C I like the syntax
- sacnoradhq 4y agoWhat it's written in is meaningless except to religious folks. Supposedly, they use lex and yacc, which means it's a toy. Mainstream compilers use hand-written lexers and/or parsers because they're faster and better.
- grantjpowell 4y ago~I love when I see programming languages who's first advertised features are implementable in 8 lines of rust~ Edit: ^ the above had the wrong tone. Thanks to dang for pointing it out. What I meant to express was that it's possible to accomplish a similar safety/ergonomics at the library level in rust in not too many SLOC. My personal preference is towards Rust's approach because the type system gives really powerful composable primitives which makes it possible to have the compiler check a wide range of invariants, instead of just the ones that are common/special enough to go into the language itself (Example edited after comments from mumblemumble) // The struct is public, but the contents are private, meaning you can't directly access the secret once it's inside the struct pub struct Secret<T>(T); impl<T> Secret<T> { // The only public way to access the secret, returns a new secret pub fn map<U>(&self, func: impl FnOnce(&T) -> U) -> Secret<U> { Secret(func(&self.0)) } } impl<T: AsRef<[u8]>> PartialEq<&[u8]> for Secret<T> { // == does the correct thing (and only works for types that would make sense (`AsRef<[u8]>`) fn eq(&self, other: &&[u8]) -> bool { constant_time_eq(self.0.as_ref(), other) } } /* Some other file */ use secret::Secret; // Translated from the example fn check_mac<T: AsRef<[u8]>>(mac_secret: Secret<T>, message: &[u8], mac: &[u8]) -> bool { // This returns a new Secret<[u8; 32]> let computed_mac = mac_secret.map(|secret| hmac_sha_256(secret.as_ref(), message)); // This uses the `constant_time_eq` impl from above computed_mac == mac } Edit: It looks like you can implment SOA as a macro too https://github.com/lumol-org/soa-derive https://github.com/lumol-org/soa-derive Edit: mumblemumble helpfully points out I demonstrated this poorly, so I tried to better demostrate what I was going for in this comment https://news.ycombinator.com/item?id=33764037 https://news.ycombinator.com/item?id=33764037
- deleted 4y ago[deleted]
- mumblemumble 4y agoThis Rust example seems like it misses the point? Rune detects that you're working with data that is marked as secret, and gives you a compiler guarantee that it's defending against some set of known attacks. The Rust code above depends on the programmer to consistently remember to enforce safety, and to do so correctly every time. Sure, you could probably implement that as a library. But, "We don't see much value in compiler help with this, a combination of libraries and being careful gets the job done," would be a peculiar position for a rustacean to defend.
- prirun 4y agoInstead of this: do { c = getNextChar() } while c != ‘\0’ { processChar(c) } I'd prefer: loop { c = getNextChar() break if c == ‘\0’ processChar(c) } The eyesight rationale for curly braces (screen readers) is something I had never considered. But it would be nice if they were optional. I've been writing Python for 14 years and have never had a problem with mis-indenting. Edit: I had to correct my post because Tabs were used in the original, so alignment was all wrong.
- mumblemumble 4y agoAs someone who has some difficulty with reading sometimes, I find Python's way of doing things to be a genuine readability challenge. Python's the language I get paid to write, but, if I thought I could get away with it at work, I might try advocating we try out Hy simply so I could return to a world of having visible, non-whitespace delimiters to aid me in reading code. I don't want to make too much hay about my challenges because I'm not sure they realistically qualify as a disability. But my own meager experience in this department does demonstrate to me first-hand that "it would be nice if accessibility affordances were optional" largely defeats the purpose of accessibility.
- prirun 4y agoThe braces could be automatically added or removed by any editor, so I don't see the problem, unless someone wants to write code like: if a == b { do this } else { do that }
- mumblemumble 4y agoArguments about what's easy to do in any editor lose a bit of their shine in the post-GitHub era. Barring the development of a really good language-aware semantic diff algorithm that I'm guessing doesn't exist yet, you really do need to have a consistent coding standard everywhere if you want to avoid injecting unnecessary chaos (and, in this case, accessibility challenges) into exactly the parts of the modern software development lifecycle where code readability is most important.
- ryukoposting 4y agoI don't really care about the security aspects of the language (cool, but not earth-shattering), but I love seeing little passion-project langs like this. I have been doodling a language design for about a year now, and this one is eerily similar in some ways, and totally different in others. I dig it.
- deleted 4y ago[deleted]
- natas 4y agoI like the syntax a lot
- mhh__ 4y agoAs per usual with benchmark results they are measuring how much effort or knowledge the authors of the code had. For example, in D you can write a container that automatically switches from AoS to SoA but most benchmarks are just copy-pasted C++
- pphysch 4y agoThis looks brilliant. I'm a sucker for languages that offer strong support for relational modeling without slow metaprogramming hacks.
- noobhack 4y agoHaha
- hoseja 4y agoIt's not even typed in Futhark.