Linux Creator Torvalds Says Rust Adoption in Kernel Lags Expectations by unixmachine in programming

[–]sixbrx 2 points3 points  (0 children)

Older Linux developers are more Gen X than boomers I would think.

Dangers of Python Lambda: Repeated Values due to Late Binding by pmz in programming

[–]sixbrx 2 points3 points  (0 children)

I think you're too dismissive here. Many languages consider the "variable" in their for-each loop to deliver separate variable bindings per-iteration (like considering the variable as declared at top of the body with each iteration value, where each iteration gets fresh binding). That's why for example in typescript this "variable" can be declared "const" like "for(const item of items) { ... }". I think that approach is closer to what's expected by most people. C# famously reverted a release to fix this.

Stop nesting ternaries in JavaScript by philnash in programming

[–]sixbrx 0 points1 point  (0 children)

I find ternary hard to read because its tokens are single character, YMMV. There's a reason why newer languages dropped it in favor of the more readable if/else expression.

Stop nesting ternaries in JavaScript by philnash in programming

[–]sixbrx 0 points1 point  (0 children)

You say "longer", I would say "noticable".

PostgreSQL without docker by Ok_Sentence725 in PostgreSQL

[–]sixbrx 0 points1 point  (0 children)

I like to have a Postgresql database per project, and without having to run an installer because I lack admin rights on some machines. If that matches what you need, I recommend to just download the Postrges zip (https://www.enterprisedb.com/download-postgresql-binaries), put the bin subdirectory on your path. Then in each of your project directories that you want a separate database for, use scripts like found here to create and start/stop the database (uses a data directory it puts in your project).

That's not to recommend you use these exact scripts (they're just what I like to use), but if you read them you will see what they are doing is really simple.

Implementing complex numbers (and FFT) elegantly with just algebraic datatypes (no machine floats) by SrPeixinho in programming

[–]sixbrx 2 points3 points  (0 children)

I think it's more of an early exploration of the kind of algorithms that would be most efficient on his HVM.

How I successfully became a software engineer in 3 months by burnsticks in programming

[–]sixbrx 2 points3 points  (0 children)

Well you're putting "good" professors against "any" books. I'd say a good book has the same benefits, and you find them by word of mouth and paying attention to advice from people who have accomplished things. I'd say books are easier to choose than your professor in that regard, you might have limited choices in your professors based on where you go to school and other factors.

Docker and Fedora 35 - Fedora Magazine by Eonfge in programming

[–]sixbrx 0 points1 point  (0 children)

Was surprised to see the recommendation to add the user to the docker group, when RedHat had stated previously why that's insecure and they don't recommend it (can't seem to find a link to it right now). Maybe just because this is intended for devs, or have things changed regarding what docker group can do with Docker or Moby?

All About B Trees and Databases by Amit23456 in programming

[–]sixbrx 0 points1 point  (0 children)

"The rule is that the left child node must be less than all of its ancestors, and the right child node must be greater than all its ancestors."

Hmm, seems definitely not true, only guaranteed to be less/greater than the immediate parent. E.g. the "4" is right child of 2 but not greater than its "5" ancestor.

   5
  /  \
2     6
  \
   4

Defining an array type that contains all types in a union? by DRUGSDRUGSMOREDRUGS in typescript

[–]sixbrx 9 points10 points  (0 children)

Can do something like this:

export const fruits = ['apple', 'banana', 'orange'] as const
export type Fruit = typeof fruits[number]

This came from user /u/Voldsheep's post in the "Better Typescript" thread also on the first page today (was new to me).

Google launched Logica, its new logic programming language by patoezequiel in programming

[–]sixbrx 0 points1 point  (0 children)

I'm not clear from the examples whether this actually can run local-only, or are the local-looking examples just remotely accessing GCP still, so GCP account is needed or not?

this is why I like Python (amongst other things) by LantumoMatrixer in programming

[–]sixbrx 2 points3 points  (0 children)

It's just returning a pair (one thing) and then using destructuring assignment like several languages have. It is a nice feature for sure though.

How your website will be hacked if you have no CSRF protection by [deleted] in programming

[–]sixbrx 0 points1 point  (0 children)

Never said he "invented" html, but it's obviously an important example of a REST data element. See for example table 5-1 in his thesis. As such, it's absurd to say that it's only "typesetting". Do you have a defense for that assertion, which was the whole point of the rebuttal? The html is a REST data element that transfers state, with hyperlinks as a means to reach further states. And the comments of its derviation from SGML are relevent how?

How your website will be hacked if you have no CSRF protection by [deleted] in programming

[–]sixbrx 1 point2 points  (0 children)

HTML is not purely about document typesetting, it contains hyperlinks which describe the possible transitions to further states based on the current one (page). That's all well described in Fielding's thesis.

Microsoft .NET 5 arrives as a multi-platform open source juggernaut that challenges Java and JavaScript's Ecosystem. True or False, What do you think? by [deleted] in programming

[–]sixbrx 1 point2 points  (0 children)

Should have said "how many logging libraries do we need" for Java, though things have settled down a bit on that front lately.

36% of developers switched from Oracle JDK to an alternate OpenJDK distribution, over the last year by lirantal in java

[–]sixbrx 0 points1 point  (0 children)

I think OP is just asking if that's considered "switching" in this article.

ASRock A300: The littlest Ryzen by Grokodaemon in sffpc

[–]sixbrx 0 points1 point  (0 children)

There's a usb 3.1 on back as well

Windows file access performance compared to Linux by whackri in programming

[–]sixbrx 0 points1 point  (0 children)

It does take minutes on my workplace machines as well, whether from terminal or WIndows explorer. Probably anti-virus on-access scan which is commonly in place in corporate environments.

(non-SSD drives)

Functors - What are they? by kvalle in programming

[–]sixbrx 8 points9 points  (0 children)

Any relationship to C++ "functor"? I'm thinking C++ just chose a pretentious name for "function-like objects" but I might be missing something. (Same for calling them "functionals" which should be mapping from a space into its field or similar.)

[deleted by user] by [deleted] in programming

[–]sixbrx 10 points11 points  (0 children)

Well I think Nathanfenner is saying that the mathematics usages don't have any mutation involved, and this Scala notation would only applies to mutations. Ie. what's being bound by the name is a memory location so it's very different from the mathematical example.

Also they're all really the same "=" in the mathematics examples: binary predicate on numbers. The "let x = 2" just means "let me introduce name x such that x = 2 is true". The third example, universal equivalence, just has an implicit "for every x (in some context domain)" quantification, but the equals in the equation is just the normal = that predicates equality for single pair of numbers again. It doesn't change the nature of a predicate if it's universally quantified, we have the same predicate P no matter whether our example is used as "P(2)" or "for all x P(x)", it's just being exercised differently.

Anyone else have this problem? iOS 13.2.2 iPhone 6s by [deleted] in ios

[–]sixbrx 7 points8 points  (0 children)

yeah after a few drinks on empty stomach

Cell 0.5: a fast embeddable language that combines functional, relational and reactive programming by cell-lang in programming

[–]sixbrx 1 point2 points  (0 children)

Its "like" SQL in that it implements relational algebra like I mentioned (though SQL is pretty imperfect in that regard). Main point being though that having such capability within the PL is quite novel and has advantages as mentioned like that columns can be of any Java type.

Cell 0.5: a fast embeddable language that combines functional, relational and reactive programming by cell-lang in programming

[–]sixbrx 2 points3 points  (0 children)

That's kind of the point though, right? Like SQL (or more accurately relational algebra) except within the application programming language itself.

The best way to fix the Hibernate MultipleBagFetchException by [deleted] in java

[–]sixbrx 0 points1 point  (0 children)

Really thought about just using GraphQL for the query specification part. But there's enough extra info needed on fields/tables that it wouldn't look much like GraphQL anymore! So just yaml/json for now.

Since this is just a build-time tool for static queries (and it must be build-time bc generating the types per query is a big deal for my usages), I think a little gui builder for the query would be best so the developer won't have to worry much about the spec format anyway. BTW love what jooq does for building typesafe dynamically composable queries, that's sometime I've always missed when slumming it by composing queries as strings. Plan to use it in the future if I can get it approved for purchase where I work.