Recently posted comments
GNOME 3.32 released
Posted Mar 16, 2019 16:56 UTC (Sat) by DOT (subscriber, #58786)In reply to: GNOME 3.32 released by sbakker
Parent article: GNOME 3.32 released
The one thing I miss from X is the ability to reconfigure monitors programmatically with a tool like xrandr.
Downloading packages
Posted Mar 16, 2019 14:25 UTC (Sat) by ms (subscriber, #41272)In reply to: Downloading packages by corbet
Parent article: Federated blogging with WriteFreely
Downloading packages
Posted Mar 16, 2019 14:23 UTC (Sat) by corbet (editor, #1)In reply to: Downloading packages by ms
Parent article: Federated blogging with WriteFreely
OK, clearly I'm pretty ignorant about how Go packaging works, and it's not as bad as I had feared. Thanks for enlightening me.
Downloading packages
Posted Mar 16, 2019 14:12 UTC (Sat) by ms (subscriber, #41272)In reply to: Downloading packages by corbet
Parent article: Federated blogging with WriteFreely
https://github.com/writeas/writefreely/blob/master/go.mod
https://github.com/writeas/writefreely/blob/master/go.sum
There's been an awful lot of thinking that has gone into this mechanism, and whilst it's not quite finished in Go 1.12, it's pretty close these days. There's a lot of writing about it all at https://research.swtch.com/vgo
Announcing the release of sway 1.0
Posted Mar 16, 2019 14:09 UTC (Sat) by mathewcohle (guest, #118622)In reply to: Announcing the release of sway 1.0 by jdulaney
Parent article: Announcing the release of sway 1.0
Announcing the release of sway 1.0
Posted Mar 16, 2019 14:07 UTC (Sat) by mathewcohle (guest, #118622)Parent article: Announcing the release of sway 1.0
Downloading packages
Posted Mar 16, 2019 13:56 UTC (Sat) by corbet (editor, #1)In reply to: Federated blogging with WriteFreely by ms
Parent article: Federated blogging with WriteFreely
From my reading, it's using a bunch of "go get" commands, with no version pinning in sight anywhere. Are those version strings hidden somewhere that I'm unaware of?
Haller: WireGuard in NetworkManager
Posted Mar 16, 2019 11:43 UTC (Sat) by georgm (subscriber, #19574)Parent article: Haller: WireGuard in NetworkManager
Static site generators
Posted Mar 16, 2019 11:05 UTC (Sat) by smurf (subscriber, #17840)In reply to: Static site generators by andrewsh
Parent article: Federated blogging with WriteFreely
Some of the static-site systems even have a Web editor, which sounds strange but happens to be quite convenient.
Five new stable kernels
Posted Mar 16, 2019 11:05 UTC (Sat) by jg71 (guest, #67102)In reply to: Five new stable kernels by alanjwylie
Parent article: Five new stable kernels
Federated blogging with WriteFreely
Posted Mar 16, 2019 10:32 UTC (Sat) by ms (subscriber, #41272)Parent article: Federated blogging with WriteFreely
They're using the built-in Go webserver which as far as I know has an excellent security record - I would have no worries about exposing it directly to the internet; I have used it a lot commercially/professionally.
The template language *is* documented. It's the standard Go templating system. https://golang.org/pkg/text/template/ https://golang.org/pkg/html/template/
That said, I agree about documenting which resources/methods/vars are available to the templates. The template entry point is Execute or ExecuteTemplate, and the last arg to that is always the "receiver" for the template, but eg https://github.com/writeas/writefreely/blob/cb1bd37f64abc... is unhelpful given it comes in as the empty interface. Generally I consider use of the empty interface in Go as a code smell... https://github.com/writeas/writefreely/blob/32e99d00415c6... is somewhat more discoverable. OTOH, depends on the intended audience - I've been working professionally in Go for over 5 years now so I have no qualms digging through this.
Just FTR, I've no association with WriteFreely and have never heard of it or looked at the code base before this morning.
Fixing programmers
Posted Mar 16, 2019 10:30 UTC (Sat) by roc (subscriber, #30627)In reply to: Fixing programmers by HelloWorld
Parent article: Cook: security things in Linux v5.0
Fixing programmers
Posted Mar 16, 2019 9:29 UTC (Sat) by HelloWorld (guest, #56129)In reply to: Fixing programmers by martinfick
Parent article: Cook: security things in Linux v5.0
Pots are made of metal and hence won't burn, and if the food burns, there will be smoke which will trigger the smoke detector, which is mandatory where I live.
Fixing programmers
Posted Mar 16, 2019 9:25 UTC (Sat) by HelloWorld (guest, #56129)In reply to: Fixing programmers by scientes
Parent article: Cook: security things in Linux v5.0
Fixing programmers
Posted Mar 16, 2019 9:22 UTC (Sat) by HelloWorld (guest, #56129)In reply to: Fixing programmers by jrigg
Parent article: Cook: security things in Linux v5.0
Yes, by other stick-in-the-muds.
Federated blogging with WriteFreely
Posted Mar 16, 2019 9:17 UTC (Sat) by xanni (subscriber, #361)Parent article: Federated blogging with WriteFreely
Static site generators
Posted Mar 16, 2019 8:37 UTC (Sat) by pbonzini (subscriber, #60935)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
A couple years ago I wrote a tutorial at https://opensource.com/article/17/4/getting-started-jekyll based on my experience building qemu.org.
The creation of the io.latency block I/O controller
Posted Mar 16, 2019 7:35 UTC (Sat) by josefbacik (subscriber, #90083)In reply to: The creation of the io.latency block I/O controller by martin.langhoff
Parent article: The creation of the io.latency block I/O controller
SUSE completes its management transition
Posted Mar 16, 2019 5:38 UTC (Sat) by alison (subscriber, #63752)Parent article: SUSE completes its management transition
https://www.socallinuxexpo.org/scale/17x/schedule/friday
I've never used OpenSUSE beyond Open Build System, but the quality of technical contribution there obviously remains high.
Security quotes of the week
Posted Mar 16, 2019 5:37 UTC (Sat) by sasha (guest, #16070)Parent article: Security quotes of the week
It took some time from me to find it out...
submitted
Posted Mar 16, 2019 5:16 UTC (Sat) by scientes (guest, #83068)In reply to: Cook: security things in Linux v5.0 by jani
Parent article: Cook: security things in Linux v5.0
https://lkml.org/lkml/2019/3/15/792
Because it is needed by distcc.
Fixing programmers
Posted Mar 16, 2019 5:09 UTC (Sat) by scientes (guest, #83068)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
Democracy...
Posted Mar 16, 2019 2:51 UTC (Sat) by Garak (guest, #99377)In reply to: Democracy... by Garak
Parent article: Security quotes of the week
The creation of the io.latency block I/O controller
Posted Mar 16, 2019 2:49 UTC (Sat) by martin.langhoff (guest, #61417)Parent article: The creation of the io.latency block I/O controller
Static site generators
Posted Mar 16, 2019 2:38 UTC (Sat) by zlynx (guest, #2285)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
That takes the same amount of time as generating a dynamic page and can be reused by every visitor until a new comment is added.
Democracy...
Posted Mar 16, 2019 2:22 UTC (Sat) by Garak (guest, #99377)Parent article: Security quotes of the week
The problem is that almost no policymakers are discussing this policy issue from a technologically informed perspective, and very few technologists truly understand the policy contours of the debate. The result is both sides consistently talking past each other, and policy proposals -- that occasionally become law -- that are technological disasters.Democracy. Gotta Love It. It doesn't get you a great solution to every problem, or even a good one. Just better than all the alternatives.
standard plug and play security convenience tradeoff thing
Posted Mar 16, 2019 1:51 UTC (Sat) by Garak (guest, #99377)In reply to: The Thunderclap vulnerabilities by nivedita76
Parent article: The Thunderclap vulnerabilities
Not for at least 5 years,-
https://arstechnica.com/information-technology/2013/12/inside-the-nsas-leaked-catalog-of-surveillance-magic/
the NSA has built and deployed its own USB cables at target locations—complete with spy hardware and radio transceiver packed inside."I also recall a few articles from those key early Snowden days where one of the oddly louder complaints from the government about Snowden's leak related to them having to replace a large number of cables.
The COTTONMOUTH series of implants are USB devices that provide a covert wireless bridge into a target network. They can be integrated into any USB plug, so check your mouse.
The Linux Foundation's CommunityBridge platform
Posted Mar 16, 2019 1:29 UTC (Sat) by em-bee (guest, #117037)In reply to: The Linux Foundation's CommunityBridge platform by keithp
Parent article: The Linux Foundation's CommunityBridge platform
greetings, eMBee.
Jekyll as a static site generator for blogging
Posted Mar 16, 2019 1:01 UTC (Sat) by michaelkjohnson (subscriber, #41438)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
I recently moved to using jekyll as the static site generator for my blog — I just git commit and push, and shortly thereafter it's updated. I like being able to track my blog history in Git. I've been thinking about running Git on my android phone to push blog entries when I'm away from my computer, but somehow it doesn't seem sufficiently important. ☺
Static site generators
Posted Mar 16, 2019 0:31 UTC (Sat) by ay (guest, #79347)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
A static site generator makes a lot of sense to me since it's easy to host (even for free) and nothing of value is lost versus a CMS type system.
Development quotes of the week
Posted Mar 16, 2019 0:20 UTC (Sat) by rahulsundaram (subscriber, #21946)In reply to: Development quotes of the week by flussence
Parent article: Development quotes of the week
Development quotes of the week
Posted Mar 16, 2019 0:12 UTC (Sat) by flussence (guest, #85566)In reply to: Development quotes of the week by mjthayer
Parent article: Development quotes of the week
Python dictionary "addition" and "subtraction"
Posted Mar 15, 2019 23:56 UTC (Fri) by quietbritishjim (subscriber, #114117)In reply to: Python dictionary "addition" and "subtraction" by jani
Parent article: Python dictionary "addition" and "subtraction"
[1] https://docs.python.org/3/library/collections.html#collec...
Fixing programmers
Posted Mar 15, 2019 23:15 UTC (Fri) by mjg59 (subscriber, #23239)In reply to: Fixing programmers by madscientist
Parent article: Cook: security things in Linux v5.0
Static site generators
Posted Mar 15, 2019 22:43 UTC (Fri) by me@jasonclinton.com (subscriber, #52701)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
Fixing programmers
Posted Mar 15, 2019 22:42 UTC (Fri) by madscientist (subscriber, #16861)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
> technically useless as the default case is - well - the default case. Whether or not this is
> correct is a different conversation, but that's something which can only be determined by
> looking at the code. There's no more reason to assume that two cases with fallthrough
> are correct or incorrect than two cases seprated by a break;. I've actually written code
> where I forgot to omit the break in the past :-).
I'm not going to get drawn too far into this conversation because it's ridiculous, but I'll say that the above is at best missing the point.
A fallthrough comment is not trying to tell you whether or not the code will fall through. Obviously it will, there's no break! The comment is telling you that someone thought about it and INTENDED the fallthrough to happen.
If lint or the compiler warns someone about a missing break and they want a break, they'll obviously just add a break. If they get a warning and they intended to fallthrough, they will add a fallthrough comment. If they didn't add either one then you don't know whether they thought about it and intended the fallthrough, or they just forgot.
Of course, even with the comment the fallthrough behavior could be a bug. Code has bugs. But the comment is not telling you the code is bug-free, it's telling you that it's intentional, rather than an omission. That's still a big benefit.
Static site generators
Posted Mar 15, 2019 22:42 UTC (Fri) by andrewsh (subscriber, #71043)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
Static site generators
Posted Mar 15, 2019 22:35 UTC (Fri) by rahulsundaram (subscriber, #21946)In reply to: Static site generators by corbet
Parent article: Federated blogging with WriteFreely
Static site generators
Posted Mar 15, 2019 22:29 UTC (Fri) by corbet (editor, #1)In reply to: Federated blogging with WriteFreely by me@jasonclinton.com
Parent article: Federated blogging with WriteFreely
I've not looked at static site generators, probably should. Can you name the one you're using?
The lack of comments leaves me rather less than upset in general...the last think I need is another comment area to manage!
Federated blogging with WriteFreely
Posted Mar 15, 2019 22:20 UTC (Fri) by me@jasonclinton.com (subscriber, #52701)Parent article: Federated blogging with WriteFreely
Have you considered a static site generator? They seem to be all the rage and I'm quite happy with the one that I'm using. Most of them allow authorship in Markdown and the images that are embedded in the posts are uploaded with the rest of the static content so there is no image hosting problem, per se. No comment section, of course. But some offer integration with Discuss or other options. Or, since the comment sections on the internet are always difficult to manage, you can avoid tcomment section entirely.
Fixing programmers
Posted Mar 15, 2019 21:44 UTC (Fri) by rweikusat2 (subscriber, #117920)In reply to: Fixing programmers by madscientist
Parent article: Cook: security things in Linux v5.0
> everyone should use them. Even if they're weren't recognized by the compiler, they're recognized by the next programmer to come > along and read the code, and make clear that you didn't forget something, so they should still always be used.
They make clear that someone was using lint (or similar). Not particularly interesting and technically useless as the default case is - well - the default case. Whether or not this is correct is a different conversation, but that's something which can only be determined by looking at the code. There's no more reason to assume that two cases with fallthrough are correct or incorrect than two cases seprated by a break;. I've actually written code where I forgot to omit the break in the past :-).
Fixing programmers
Posted Mar 15, 2019 21:36 UTC (Fri) by madscientist (subscriber, #16861)In reply to: Fixing programmers by myxie
Parent article: Cook: security things in Linux v5.0
The main problem is K&R chose the wrong "default" behavior. Usually you DON'T want to continue, so that should have been the default (that is, the current case is automatically terminated by the next case or the end of the statement), and there should be a special keyword used only when you DO want to fall through.
The one exception is empty cases ("case a: case b: case c: foo(); break;") A special dispensation could have been made that the keyword is not needed to fall through unless there are other statements in the case: empty cases don't need the keyword.
Of course, you need a different keyword. They could have used "continue", but both "break" and "continue" are already useful from within switch statements (to break out of or continue an enclosing loop) so using either one of them as meaningful inside a switch was (IMO) not a good decision. I've definitely run into situations where I wanted to break out of a loop from within a switch statement and having "break" overloaded is annoying.
A "fallthrough" or "nobreak" keyword would have been fine. Or if you REALLY didn't want to add a keyword you could have played tricks with "goto", maybe, allowing "goto case X;" where "case X:" existed somewhere in the current switch statement, plus "goto default;"
But that's not the language we have, so FALLTHROUGH-type comments that are recognized by the compiler are great things and everyone should use them. Even if they're weren't recognized by the compiler, they're recognized by the next programmer to come along and read the code, and make clear that you didn't forget something, so they should still always be used.
Federated blogging with WriteFreely
Posted Mar 15, 2019 21:26 UTC (Fri) by unixbhaskar (guest, #44758)Parent article: Federated blogging with WriteFreely
Fixing programmers
Posted Mar 15, 2019 21:15 UTC (Fri) by mpr22 (subscriber, #60784)In reply to: Fixing programmers by myxie
Parent article: Cook: security things in Linux v5.0
Fixing programmers
Posted Mar 15, 2019 20:46 UTC (Fri) by myxie (subscriber, #127909)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
I'm almost scared to look up the semantics of continue inside a switch statement.
Python dictionary "addition" and "subtraction"
Posted Mar 15, 2019 19:00 UTC (Fri) by k8to (guest, #15413)In reply to: Python dictionary "addition" and "subtraction" by NRArnot
Parent article: Python dictionary "addition" and "subtraction"
I find the methods quite clear and provide good hints about what sort of data type we're working with here anyway for code that doesn't bother to provide that information in an easily accessible way. Even with the relatively constrained set of semantics for built-in types in basic python, I often find production code where the developers haven't really understood the provided toolkit. I'm not a fan of adding semantic synonyms that offer no specific utility when in practice it's clear that programmers are otten already operating beyond their understanding of their tools.
Fixing programmers
Posted Mar 15, 2019 18:51 UTC (Fri) by rgmoore (✭ supporter ✭, #75)In reply to: Fixing programmers by anselm
Parent article: Cook: security things in Linux v5.0
To my mind, requiring explicit break statements lets you do useful¹ things that would be impossible if there was an implicitbreakin front of everycase
You could fix that by allowing an explicit fallthrough when that's what you want. Unfortunately, as you say it's too late to change the syntax now, so the best we can do is use the compiler to catch cases where the break is left out accidentally.
Fixing programmers
Posted Mar 15, 2019 17:52 UTC (Fri) by anselm (subscriber, #2796)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
Mistyping == as = is another, extremely rare error and some things will always have to be found and fixed via code rewiev and/ or testing.
You want code review and testing, but you also want reasonable compiler warnings. If a developer is made aware of a “==” vs. “=” typo by a compiler warning while they're writing the code in the first place, the issue doesn't even come up in code review or testing (where it would be more expensive, in terms of developer time, to detect and fix). This is what in security circles we call “defense in depth”.
Algorithmic errors are far more common than any kind of syntax misuse.
Yes, but the syntax problems still exist and are often easier to detect and fix. This is like saying garbage in the street is not important because there are millions of children starving in Africa.
Debian project leader candidates emerge
Posted Mar 15, 2019 17:51 UTC (Fri) by amacater (subscriber, #790)In reply to: Debian project leader candidates emerge by mgb
Parent article: Debian project leader candidates emerge
GNOME 3.32 released
Posted Mar 15, 2019 17:47 UTC (Fri) by quotemstr (subscriber, #45331)In reply to: GNOME 3.32 released by kmare
Parent article: GNOME 3.32 released
Five new stable kernels
Posted Mar 15, 2019 17:37 UTC (Fri) by zdzichu (subscriber, #17118)In reply to: Five new stable kernels by tsdgeos
Parent article: Five new stable kernels
"Not a bug in the kernel, xorg's modesetting driver needs to set all connectors/crtc's directly when using atomic. The legacy path disabled crtc B for you if you stole all its connectors for a different crtc. In the atomic case you need to disable it yourself.
This is a bug in x.org's modesetting driver."
Xorg is slowly rotting away in Wayland's world.
Debian project leader candidates emerge
Posted Mar 15, 2019 17:14 UTC (Fri) by willy (subscriber, #9762)In reply to: Debian project leader candidates emerge by mgb
Parent article: Debian project leader candidates emerge
Debian project leader candidates emerge
Posted Mar 15, 2019 16:56 UTC (Fri) by cjwatson (subscriber, #7322)In reply to: Debian project leader candidates emerge by mgb
Parent article: Debian project leader candidates emerge
It's also worth mentioning that if anyone were allowed to nominate themselves, then there would be no purpose in specifically listing it under the powers of individual developers (see 3.1(3)).
In any case, if you have a dispute about the interpretation of the constitution, you're free to ask the Secretary (under 7.1(3)).
Debian project leader candidates emerge
Posted Mar 15, 2019 16:37 UTC (Fri) by corbet (editor, #1)In reply to: Debian project leader candidates emerge by mgb
Parent article: Debian project leader candidates emerge
I don't really have a horse in this race, but I think that's debatable. The constitution says "For the first week any Developer may nominate themselves as a candidate Project Leader". It doesn't say "any interested person". The person you are referring to is not a developer, and thus does not appear to qualify.
(For the curious, this self-nomination is what's being discussed here.)
Five new stable kernels
Posted Mar 15, 2019 16:02 UTC (Fri) by tsdgeos (guest, #69685)Parent article: Five new stable kernels
Fixing programmers
Posted Mar 15, 2019 15:56 UTC (Fri) by rweikusat2 (subscriber, #117920)In reply to: Fixing programmers by Cyberax
Parent article: Cook: security things in Linux v5.0
I agree that the fallthrough is mostly useless and that all the time people and computers wasted by typing or processing
break;
statements could have been put to better uses. But overloading the syntax supposed to be used for inline documentation so that yet more useless code has to be added is not the answer, it's the problem taken to the next power.
Debian project leader candidates emerge
Posted Mar 15, 2019 15:53 UTC (Fri) by mgb (guest, #3226)Parent article: Debian project leader candidates emerge
Under the Debian Constitution there is only one valid candidate, the nomination period has closed, and no more candidates may be nominated. Those who would like to see a second election have the option to vote None Of The Above in the first.
The refusal by the cabal to allow Debian Developers to vote for the only valid nominated candidate is entirely unconstitutional.
Fixing programmers
Posted Mar 15, 2019 15:51 UTC (Fri) by rweikusat2 (subscriber, #117920)In reply to: Fixing programmers by anselm
Parent article: Cook: security things in Linux v5.0
BTW, I've come to dislike if (a = b) warnings as well: Mistyping == as = is another, extremely rare error and some things will always have to be found and fixed via code rewiev and/ or testing. Algorithmic errors are far more common than any kind of syntax misuse.
Fixing programmers
Posted Mar 15, 2019 15:28 UTC (Fri) by jrigg (guest, #30848)In reply to: Fixing programmers by HelloWorld
Parent article: Cook: security things in Linux v5.0
This could be considered a feature.
GNOME 3.32 released
Posted Mar 15, 2019 15:24 UTC (Fri) by rahulsundaram (subscriber, #21946)In reply to: GNOME 3.32 released by mathstuf
Parent article: GNOME 3.32 released
The latter. Note that it is not Wayland that should have the accessibility features. It is the individual Desktop Environments or Window Managers
GNOME 3.32 released
Posted Mar 15, 2019 14:43 UTC (Fri) by mathstuf (subscriber, #69389)In reply to: GNOME 3.32 released by yodermk
Parent article: GNOME 3.32 released
GNOME 3.32 released
Posted Mar 15, 2019 14:00 UTC (Fri) by yodermk (subscriber, #3803)Parent article: GNOME 3.32 released
IMHO essential for Wayland usability.
Fixing programmers
Posted Mar 15, 2019 13:33 UTC (Fri) by anselm (subscriber, #2796)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
What would solve it would be to add another syntactic construct providing an actual multiway conditional, where the code blocks associated with the cases are independent of each other and at most one will be executed.
That would help. But programs using this construct would no longer be C programs. If sticking to a popular and well-understood language standard is of value to you (which makes sense in a large community like the Linux kernel crowd), then this is something not to be thrown away lightly.
OTOH, code that uses the “metasyntactical sort-of language extension” is valid C whether the compiler pays attention to it or not. But if you have a compiler that does pay attention, it's probably a good idea to exploit that, much like we exploit our compiler's paying attention to all sorts of other little things that might otherwise slip us by (think “if (foo = bar) …”).
Like a surgical scalpel, the C programming language is conceptually pretty simple but using it still requires considerable care and attention to detail. I haven't done lots of C programming recently but when I do I'm humble enough to appreciate all the assistance I can get.
Fixing programmers
Posted Mar 15, 2019 13:19 UTC (Fri) by anselm (subscriber, #2796)In reply to: Fixing programmers by jschrod
Parent article: Cook: security things in Linux v5.0
The Unix guys worked shoulder-to-shoulder with the C guys
Not just that. The Unix guys basically were the C guys.
I wonder what all the fuss is about. The C language has its problems but as far as I'm concerned break is not one of the bigger ones. It's more of an idiosyncrasy. To my mind, requiring explicit break statements lets you do useful¹ things that would be impossible if there was an implicit break in front of every case (think Duff's Device), and that, together with the fact that this style of switch is fairly straightforward and minimal to implement in a C compiler based on other stuff you already have, may have been enticing to the designers of the language.
Chances are that if you were designing the C programming language from scratch today you would do various things differently, probably including switch statements. But for better or worse, we're stuck with C – at least the C switch statement – as it has been for almost 50 years, so we must remember to put a break in all the appropriate places. If we can get the compiler to remind us to do that if we forgot, or else to tell it explicitly that we didn't want one, that can only be a good thing – ace programmers of rweikusat2's calibre will of course always do the Right Thing™ from the get-go and should therefore not ever be annoyed by superfluous compiler warnings, but people like you and I (and incidentally like jschrod's, my beard is also fairly white by now) may appreciate an occasional heads-up.
¹ Useful, that is, if you think of C as a high-level portable assembly language.
Python dictionary "addition" and "subtraction"
Posted Mar 15, 2019 11:29 UTC (Fri) by jani (subscriber, #74547)In reply to: Python dictionary "addition" and "subtraction" by NYKevin
Parent article: Python dictionary "addition" and "subtraction"
Cook: security things in Linux v5.0
Posted Mar 15, 2019 11:24 UTC (Fri) by jani (subscriber, #74547)In reply to: Cook: security things in Linux v5.0 by rweikusat2
Parent article: Cook: security things in Linux v5.0
I find that more than a little condescending.
Even so, it's not about complexity of the language per se. It's about the complexity of using the language in a way to avoid common mistakes. The problem is in the language, not the people.
> inventing one bazillion /*** OMFG !! Not like Pascal !!! ***/ pseudosyntactic tags?
Granted, I would have preferred __attribute__ ((fallthrough)) with some syntactic sugar macro. But this is one. What are the other (bazillion - 1)? Or even your top three pet peeves?
GNOME 3.32 released
Posted Mar 15, 2019 11:11 UTC (Fri) by sbakker (subscriber, #58443)In reply to: GNOME 3.32 released by jhoblitt
Parent article: GNOME 3.32 released
My main problem with Wayland for now is that if the GNOME Shell crashes, my whole session is gone. Under X.org, it just restarts the shell.
Fixing programmers
Posted Mar 15, 2019 10:28 UTC (Fri) by HelloWorld (guest, #56129)In reply to: Fixing programmers by epa
Parent article: Cook: security things in Linux v5.0
Or people could just switch to C++ where is this already standardized, along with dozens of other useful features.
https://en.cppreference.com/w/cpp/language/attributes/fal...
Fixing programmers
Posted Mar 15, 2019 9:24 UTC (Fri) by halla (subscriber, #14185)In reply to: Fixing programmers by jem
Parent article: Cook: security things in Linux v5.0
Development quotes of the week
Posted Mar 15, 2019 9:20 UTC (Fri) by mjthayer (guest, #39183)Parent article: Development quotes of the week
Five new stable kernels
Posted Mar 15, 2019 9:20 UTC (Fri) by alanjwylie (subscriber, #4794)In reply to: Five new stable kernels by unixbhaskar
Parent article: Five new stable kernels
Five new stable kernels
Posted Mar 15, 2019 9:12 UTC (Fri) by nivedita76 (subscriber, #121790)In reply to: Five new stable kernels by unixbhaskar
Parent article: Five new stable kernels
Fixing programmers
Posted Mar 15, 2019 8:53 UTC (Fri) by epa (subscriber, #39769)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
A language extension is a great idea. GCC effectively provides a GCC-specific extension to the C language here -- or perhaps you could call it a restriction, since the code allowed with -Wimplicit-fallthrough is a subset of that without the warning. Either way, it's useful in practice to many programmers, and Linux has started making use of it. Pushing it upstream to the ISO C standard would be better still of course.
Fixing programmers
Posted Mar 15, 2019 7:45 UTC (Fri) by jem (subscriber, #24231)In reply to: Fixing programmers by Wol
Parent article: Cook: security things in Linux v5.0
That convention is older than Windows, possibly older than the Apple Mac GUI. The real idiot was the one who later decided to implement this functionality differently on marginal platforms like Acorn's RISC OS.
Fixing programmers
Posted Mar 15, 2019 7:11 UTC (Fri) by HelloWorld (guest, #56129)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
Actually it does.
Five new stable kernels
Posted Mar 15, 2019 3:54 UTC (Fri) by unixbhaskar (guest, #44758)In reply to: Five new stable kernels by alanjwylie
Parent article: Five new stable kernels
It might not sound rational ...but still ..I just did compile (No VM, all in the physical partition) for 6 different distros and all of them went well.
Anyway, probably I am not able to capture the point, honestly.
The creation of the io.latency block I/O controller
Posted Mar 15, 2019 3:41 UTC (Fri) by unixbhaskar (guest, #44758)Parent article: The creation of the io.latency block I/O controller
GNOME 3.32 released
Posted Mar 15, 2019 3:04 UTC (Fri) by jhoblitt (subscriber, #77733)In reply to: GNOME 3.32 released by kmare
Parent article: GNOME 3.32 released
Emacs and Magit
Posted Mar 15, 2019 2:00 UTC (Fri) by bb010g (guest, #130946)In reply to: Emacs and Magit by ceplm
Parent article: Emacs and Magit
Fixing programmers
Posted Mar 15, 2019 1:47 UTC (Fri) by jschrod (subscriber, #1646)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
As an old Unix grey beard (well, not quite literally, by now my beard is white), I'll have to say that demanding that all kernel programmers are "proficient in math" and "have to learn C" is not sufficient. Some decades ago, I was able to read binary OS/370 code, and did so everyday, not needing disassemblers. Nowadays, not so much any more; but that it is clearly the reason why I'm too old to be a kernel developer. But, since I still remember this time at the start of the 80s, it's not too far away, these kids today should get off the lawn. Obviously, this kind of my then-proficiency should be the standard for all current kernel developers -- they should stop writing that kind of code in C (a.k.a. abstract assembler of PDP-11 hardware) and should start using better abstract assembler for current hardware system abstractions. Since they are these geniuses, this should be no problem at all; if there is no such system, they can invent it. The Unix guys worked shoulder-to-shoulder with the C guys, and did it too, don't they. Insistence on C is so 70s, bring on new assemblers!
IOW: An argument that one should "fix programmers" is as silly as my paragraph above.
FTR: I've known Dennis Ritchie personally, and I'm proud that he took the time sharing several evenings with me. He was the first person who would have called these arguments "you have to learn C properly" not appropriate, since he knew the deficiency of his own creation quite well.
Announcing the release of sway 1.0
Posted Mar 15, 2019 0:01 UTC (Fri) by jdulaney (subscriber, #83672)Parent article: Announcing the release of sway 1.0
Fixing programmers
Posted Mar 14, 2019 23:03 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
Why? Switch is fine for this. In 99% of cases it's NOT used as computed goto, so implicit fallthrough is actively harmful.
That's why other more modern languages (C#, Go, ...) have ditched that stupid semantics.
And yes, it's stupid. So stupid that the very first linter for C had the "forgotten break" inspection.
GNOME 3.32 released
Posted Mar 14, 2019 22:27 UTC (Thu) by jkingweb (subscriber, #113039)In reply to: GNOME 3.32 released by josh
Parent article: GNOME 3.32 released
Fixing programmers
Posted Mar 14, 2019 21:59 UTC (Thu) by NAR (subscriber, #1313)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
Take a look at this road crossing. The 2011 October state shows something like the "C switch statement". It's clearly defined in the highway code that the cyclists coming from the north ("behind") have priority, the cars should give way to them. Yet many cyclists were hit in this very road crossing - apparently the drivers "just can't learn" and apply the highway code. So the road crossing was updated. The highway code was not changed (the semantics of the C switch statement did not change), the cars still need to yield to the cyclists. It's the radius of the curve that was changed, so the drivers have to break more, otherwise they can't turn in, and at a slower speed they have more time, more chance to notice the cyclist (the path of the cyclist was also changed, now there's no 250 m straight line before the crossing, only 20 m, so they don't arrive to the crossing at 30 km/h speed). Effectively a "look around carefully" comment was introduced to this "C switch statement".
Accidentally leaving out a break statement in the Linux kernel might not lead to actual accidents (but who knows, Linux is running on cars nowadays), but it's still better to make it safer for those who "just can't learn", just like it's better to make that road crossing safer.
Fixing programmers
Posted Mar 14, 2019 21:19 UTC (Thu) by rweikusat2 (subscriber, #117920)In reply to: Fixing programmers by HelloWorld
Parent article: Cook: security things in Linux v5.0
It is claimed that the semantics of switch, specifically, that it provides a way to jump to a certain location in a block but no automatic exit from there before the code tagged with the next case-label starts, are problematic. Assuming this problem exists (cf next paragraph), adding a metasyntactical sort-of language extension requiring an explicit something in both cases doesn't solve it. It just punishes people who need the fallthrough semantics. What would solve it would be to add another syntactic construct providing an actual multiway conditional, where the code blocks associated with the cases are independent of each other and at most one will be executed.
As to the "problematic", are we perhaps totemically repeating some "But that's not how I think it should be done!"-complaints someone initially made at least 40 years ago which since keep being repeated out of habit? According to the numbers in the text, about 99% of the warnings were false positives. Comparing the number of case-labels in a current -stable tree with the number of missing breaks indicates that this aspect of the code was correct in about 99.99% of all cases. This doesn't look like a "common" problem to me.
GNOME 3.32 released
Posted Mar 14, 2019 20:51 UTC (Thu) by kmare (guest, #113077)In reply to: GNOME 3.32 released by josh
Parent article: GNOME 3.32 released
Five new stable kernels
Posted Mar 14, 2019 20:27 UTC (Thu) by alanjwylie (subscriber, #4794)Parent article: Five new stable kernels
GNOME 3.32 released
Posted Mar 14, 2019 19:51 UTC (Thu) by josh (subscriber, #17465)Parent article: GNOME 3.32 released
Cook: security things in Linux v5.0
Posted Mar 14, 2019 18:49 UTC (Thu) by tdz (subscriber, #58733)In reply to: Cook: security things in Linux v5.0 by rweikusat2
Parent article: Cook: security things in Linux v5.0
I don't see anything wrong with this. Of all the changes from the linked article, this is the least controversial. This has no runtime/compile overhead or any form of weird semantics. It doesn't obfuscate the code base. This change has zero negative impact. If anything, I'd ask for using the related gcc attribute instead of a comment.
Fixing programmers
Posted Mar 14, 2019 18:31 UTC (Thu) by HelloWorld (guest, #56129)In reply to: Fixing programmers by rweikusat2
Parent article: Cook: security things in Linux v5.0
How is a "fallthrough comment" at the end of a case branch not a language extension, assuming that its presence is enforced by the compiler?
Besides, this has been standardized in C++17. The only reason it's not in C is that the C committee is run by a bunch of stick-in-the-muds.
