This article is unnecessarily hard to read because of its plain-text nature and Pastebin.com’s styling. Here is a formatted version I made so I could read it more easily: https://gist.github.com/roryokane/d02addfa9329c579f15daef5b4ebae2f
The OptiCSS part of CSS Blocks, a sub-library that compiles stylesheets for peformance, seems to do the same thing as the existing library Styletron. Styletron does the same splitting of rules into a rule for each set of styles that is shared across elements, followed by giving multiple classes to elements that assemble all subsets of rules they need. Styletron’s introductory blog post explains more about the concept.
This is a beautiful technology. It is very sad that many people will ignore this because of Oracle v. Google lawsuit. What a tragedy.
This looks suspiciously like an “embrace, extend, and extinguish” play by Oracle to the observer.
Anything from them potentially is one just due to their legal team. I’m avoiding it specifically for that. Java, too, just in case.
That’s copyright law mostly with patent provisions in some licenses for the specific work as is. That leaves patents for how it’s used or combined with other software. Oracle, Microsoft, and IBM in particular like to file lots of those. I dont know if any are on GraalVM because just looking triples the damages. I never look.
I’m not a lawyer, but openJDK, which now includes Graal, is GPL licenced which includes patent protection.
This is incorrect; the patent grant applies to the official OpenJDK builds but not forks of OpenJDK.
Do you have a source for that? That wouldn’t be GPL then under my understanding.
The GPL seems relatively clear on this: http://openjdk.java.net/legal/gplv2+ce.html
If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
Seems to me that the patent clause is opt-in rather than required. OpenJDK uses the GPL v2, which lacks the clear patent grants of v3.
See also https://www.skife.org/java/jcp/2010/12/07/the-tck-trap.html and the lawsuits Oracle fired at Google. (The patent claims ended up getting thrown out because Google has excellent lawyers in that case.)
Edit: more details about the weak language used around patents in v2: https://www.infoq.com/articles/java-dotnet-patents
In 2004 Dan Ravicher, senior counsel for the Free Software Foundation, warned about the weak patent guarantees for BSD and GPL and recommended attaching patent grants.
With further digging it seems that Oracle joined the OIN and OIN explicitly covers the openJDK for patents:
http://www.openinventionnetwork.com/community-of-licensees/
https://www.zdnet.com/article/linux-patent-defense-group-expands-open-source-protection/
Thank you. That is very interesting reading. Sounds like the waters are muddy and we need an actual lawyer to chime in.
I partially side with Oracle on the Google case (excluding copyrighting APIs). Google had plenty of opportunity to licence Java from Sun, or indeed to buy Sun entirely, but they chose to incompatibly re-implement it and developers have been paying the price for that choice ever since. But it looks like Google finally did the right thing in the end: http://www.fosspatents.com/2015/12/google-switches-to-open-source-license.html
Not all of it. The GraalVM Downloads page makes it clear that there are two versions of GraalVM: Community Edition (CE) and Enterprise Edition (EE). GraalVM EE is closed-source, and it’s the only version with support for macOS and with “additional performance, security, and scalability”.
The developers have stated the only reason for the macos absence is they haven’t gotten around to it yet, and also there is currently no difference in performance.
The terminal app iTerm2 for macOS has this feature built-in. Just activate the menu item View > Show Timestamps (⇧⌘E) to display an overlay with the timestamps of every line in history. You don’t even have to turn the feature on before running the command to profile – iTerm2 is always saving past timestamps just in case.
Some extra details from the linked bug report and commit:
What about triple-dot ranges that exclude the end value? The bug report said “I don’t think ary[1...] (exclusive) is meaningful.” Despite this, I see from the commit that endless ranges with triple-dot were implemented. There is only one test case that uses the range in a way other than inspecting its attributes, and that test shows that a 3...nil range iterates over the same numbers as a 3..nil range when passed to Array#fill.
What about infinite ranges in the other direction, (..0) and (nil..0)? They could theoretically be used for checking if a number is less than 100, for example. Well, they are not part of this feature because it would be too hard to implement in Ruby’s grammar:
It is better to have
ary[..1]as a consistency. But it will cause a shift/reduce conflict. Anyway,ary[0..1]looks not so bad to me since it have no cursed negative index. So I don’t push it.
Couldn’t you apply a unary minus to the infinite range and get the same thing? Or am I missing something?
It’s not fashionable, but perl took from Larry Wall’s linguist background the concept of ‘it’ - i.e. the “thing we are talking about”.
It’s spelt “$_” explicitly in perl, but also many operations use $_ implicitly if no arg is given (e.g. regex/sub, print, etc). Also the looping constructs (for/map/grep) bind $_ to the ‘current element’. So you can:
print for @lines;
and have:
Or:
while (<STDIN>) { # Loop over each line on input
chomp; # remove trailing \n
s/foo/bar/; # regex-and-replace
say; # Print to stdout with \n
}
The schwartzian transform (https://en.wikipedia.org/wiki/Schwartzian_transform) uses this, and also the convention/feature that in a block/lambda passed to ‘sort’, the two items under comparison are ‘$a’ and ‘$b’. Which are hence sufficiently magic that you should never use them for any other purpose in perl :-)
anaphoric macros create a name that must be referenced to actually refer to it though. I guess in Perl, it’d be roughly equivalent to super lisp pseudocode:
(defparameter *it* (make-parameter #f))
;; str defaults to *it* if called without arg
(define (chomp (str *it*))
....)
(define (say (str *it*))
...)
(let loop ((*it* (get-line)))
(if *it*
(begin
(set *it* (chomp))
(set *it* (sub ...))
(say)
...)))
The jQuery library for JavaScript also supports a similar feature. In a function passed to $.each, this will be the current array element, and in an event handler, this will be the element that the event was fired on (which I think matches the browser’s DOM event handlers). The handlers can also take those same variables as optional function parameters if you want to name them.
As a semi tangent, I seriously think github should have an integration for paid support or ticket bounties that are only claimable by org members. Perhaps there would be some challenges, but I think there is a need to allow:
Bountysource is a third-party website that already does this. It takes a cut of payments as its business model.
Wow I couldn’t agree more with his assertions around e-mail. I’m seeing a generational divide happen, ADD youngsters are telling me “Email is awful!” on a fairly regular basis now. WHY? I’ve yet to get an actual, viable, useful answer.
Mostly what I get is “It’s so 5 minutes ago”.
This is a good point. Email and Slack are just communication tools. The workplace is full of low-quality communication because most workplaces are low in quality: inept management, no real desire to motivate people, stupid projects, and crappy ideas. The problem never was email itself. Nor is it Slack per se.
It’s like the common comment about dating sites: the sites are a solved problem, but people are broken.
Now, Jira is evil and should die in a taint fire. That’s just an objective fact.
I’m on board with your core sentiment here, and broadly characterizing a generation as suffering from a disability isn’t much better of a rationale than those “youngsters” are giving you for not liking email.
(Having spent a decade as a teacher and middle school administrator before venturing into dev work, I’m well aware of the very real challenges of keeping the attention of people younger than me…)
Not trying to poke you in the eye (metaphorically or otherwise). Just saying… 🍻
What’s doubly amusing about your choice of wording is that I am in fact blind in one eye and low vision in the other, so go ahead and poke away as long as it’s the left side :)
And, to address the meat of what you’re saying, you’re right. I had no business being cavalier about the term ADD. Thanks for pointing that out.
I need to find a new turn of phrase to describe the ever shortening attention span of humans :)
Haha… Well clearly I stepped in it there with my choice of metaphor. 🤦🏻♂️
Agreed. We definitely need a better shorthand for shrinking attention spans…
My main issue with email is that unless everyone uses the same email client and email client settings things become a mess. Some people add replies at the bottom of the chain, others at the top. Some people use HTML email, some don’t. Some people have signatures 8 miles long.
It’s just so darn messy.
What I like about instant messaging is that it is quicker, (to me) more organized, and most of his arguments against it are mostly due to not knowing how to set status. If you don’t want to be distracted set yourself to “do not disturb”. I haven’t worked with a team where this was a problem (assuming you do eventually answer questions).
It doesn’t have to be messy. HTML versus not should be transparent to you (I use mutt for work) - the top posting problem is a larger issue, and I blame Google and Microsoft. They’ve attempted to make mail act like IM.
There is only one true way to respond to email messages, and it was defined in RFC-1855
I’m not saying it has to be messy, I’m just saying it is in the real world. And while I could start sending mail that complies with RFC-1855, I still have to deal with everyone who sends me mail and doesn’t comply to any standard.
HTML versus not should be transparent to you
How? I use outlook at work because I need it for meeting requests, shared address books, etc.
So, wait, you’re complaining about HTML email because you choose to use a GUI client?
Fascinating, captain :)
I too use Outlook/Exchange for meetings, but that’s all I use it for. My mail pipeline is fetcmail/procmail and mutt and it works famously with Exchange. Google it and see :)
Your point about not being able to control unruly senders is valid, but I’m not sure that merits throwing the baby out with the bath water.
Email has good properties, but I see many problems with email that other tools avoid:
With email, it’s harder to jump into an existing conversation. You can’t just visit a link and read the existing conversation. You have to wait for someone to post something new to the mailing list, or ask someone to forward you the discussion so far. And then you have to read the previous messages with a zig-zag path – read top to bottom within each message, but read the list of messages bottom to top.
The culture of email suggests that you surround your message with salutations and sign-offs. In most environments, every time you write a new email, you have to write “Hi John,” or “Greetings all,” at the beginning, and then “Thanks, Rory” or “Sincerely, Rory” at the end. It takes time away from writing the content of the message, time that is usually not worth the signaling it provides.
In some companies, emails have signatures at the bottom that repeat information you already know such as the contact information of the company. It requires more scrolling and mental filtering to see the actual content.
Emails have a sending delay and require writing subject lines. This makes them less appropriate for messages that should be sent in real time, because they are relevant to a real-time conversation. For example, if you are telling a coworker about a relevant blog post and why they should read it, it’s better if you can just paste the URL into a message with them and they get it instantly.
Emails can’t be edited. If you make a stupid typo or forget an attachment, you have no choice but to either accept the error or to send another email with the correction. If you send a correction email, all readers have to manually apply in their heads your described patch to the original email – no one can apply the fix so the others don’t have to. And if someone else sends an email with a subject line that is revealed to be irrelevant, you can’t change the subject line to focus future discussion – the best you can do is send a correction email.
Though this article was published recently, the author is out of touch with the current versions of software.
Chat, at least on slack, isn’t grouped or threaded.
Slack supports threads now. Any top-level message can be replied to in that messages thread. People aren’t notified of new messages in a thread unless they are following it.
My company, which has about 35 regular users of Slack, uses that feature often. I find it easy to keep track of the current conversations.
I agree that rooms don’t provide much separation of topics, but at least there is the #random room by default, so people are discouraged from posting funny links to the work-related rooms.
SO has become relatively shitty now, and replaced docs for a lot of OSS libs.
I don’t see the relevance of the official Stack Overflow website, which still supports the same features it used to, when the context is about a hypothetical company-specific Stack Overflow. But this statement is out of date. Stack Overflow deleted their experimental Documentation section of the site, and migrated worthy Examples from there into normal questions and answers.
I’d argue that slack threads are even MORE annoying and distracting. They’re an unneeded and poorly implemented abstraction when the actual solution to room overcrowding and noise is to simply get your own room.
Happy to see people writing screensavers. In many ways, they’ve outlived their namesake purpose, but there is still something so charming about them! I also recently wrote a mac os screen saver (for my first time) and unfortunately found that the fragment shader I wrote really heats up my machine.
They’re possibly still useful on display types that burn in in the modern day like OLED - and for people still on plasma and god forbid, CRTs, they still have a use.
Is a screen saver better than just turning the monitor off (i.e. turning turning monitor output off which makes the screen go into standby mode)? Are/were people using screen savers just to avoid the few seconds the monitor needs to turn back on or is there another reason?
Certain screensavers can help with burn in on OLED displays, turning the display off does not help. I don’t know the actual science behind it, I just know it worked on an OLED display I had that had burn in. ;)
Note that a screensaver is unlikely to have that property unless it was designed to. Those screen-healing screensavers usually use colored geometric patterns.
I remember one of the patterns in such a screensaver was a series of black and white vertical stripes that slowly scrolled sideways. I once had the idea of making a free clone of that screensaver, so I replicated that pattern in Quartz Composer, Apple’s visual programming tool for generating graphics. I never remade any of the other patterns though.
I think, personally, I would solve this by calling git log twice, and joining the inputs. Nowhere near as clean, but easier to escape (no special characters).
I would love to see how to solve this with OSH, as an extension of this post. Seeing a real problem that I can empathise with concretely, and then having “OSH will fix this ;)” feels like a tease!
If I’m understanding you correctly, I think the joining solution is a little fragile with respect to:
Also I’ve used the “join” or “paste” commands and I honestly find them very difficult.
As for Oil, that’s unfortunately a little far off (hence the call for help in the post!). OSH is the bash clone, so you will solve it the same way as bash.
Oil is the new language, and one improvement is would be a way to store structured data in memory! In particular, tables!
I’ve summarized some notes here:
https://github.com/oilshell/oil/wiki/Oil-and-the-R-Language
The slogan is that “the output of ls and ps are tables”. And the output of git log is a table. So Oil will be able to parse arbitrary data and store the “correct” values in memory. Then it can serialize them to any output format. So bash has the paradigm:
$ input | process text in a hacky and probably incorrect way | output
Oil will still allow that. You can play fast and loose if you want. But it will also allow:
$ input | properly deserialized | structured data | properly serialize | output
I also thought of @dominicm’s solution, but you’re right, that solution has problems.
The simplest solution I can think of, while being obviously safe against adversarial input, would be a script in a scripting language. The key improvement over “the pedantic solution” in the blog post is that you don’t actually need a Git API. You just need a language that can easily call system commands. What’s more, you can fetch the information for just one commit at a time with something like git log HEAD~3 -n 1, which avoids having to stitch together git log’s output for multiple commits.
Using those ideas, here is how I would do it in Ruby, calling out to Git with system:
#!/usr/bin/env ruby
require 'cgi'
def escaped_git_log_part(commits_back_from_head, format)
log_output = system "git log HEAD~#{commits_back_from_head} " +
"-n 1 --pretty='format:#{format}'"
CGI.escapeHTML(log_output)
end
puts '<table>'
0.downto(4).each do |commits_back|
part_H = escaped_git_log_part(commits_back, '%H')
part_h = escaped_git_log_part(commits_back, '%h')
part_s = escaped_git_log_part(commits_back, '%s')
puts "<tr>
<td> <a href='https://example.com/commit/#{part_H}'>#{part_h}</a> </td>
<td>#{part_s}</td>
</tr>"
end
puts '</table>'
It’s kind of repetitive, but good enough for a safe but quick-to-write shell script, I think.
The full-page link, for mobile: https://codepen.io/tomhodgins/full/oeKOOO/. This should be the actual link – the markup powering this article is irrelevant.
You might want this link: https://s.codepen.io/tomhodgins/debug/oeKOOO
That book A Fire Upon the Deep sounds awesome. Reminder: Wikipedia pages about books are about 90% spoilers.
uh yeah you can get rooted by a PNG these days… When I was a boy, it was safe to download .exe files, so long as you didn’t RUN them before at least inspecting the visible strings inside… Of course, all that quickly changed as automatic parsing of incoming data became the norm.
A Fire Upon the Deep and prequel A Deepness In The Sky are great. Pass on the other sequels, they’re not very good.
Deepness is probably my sentimental favorite scifi novel of all time. This passage from it should be fun to this audience: http://akkartik.name/post/deepness
And it inspired Lobsters’s own @drmaciver to write Programmers at Large (worldbuilding notes), which I’ve really been enjoying.
At this point my distraction alarm pinged. I’d passed some threshold of deviance from my intended task and it was making sure I was aware of that.
Man, I could do with one of those. So long as I got to set it of course.
I’d say those 2 novels are legitimate part of the SF canon at this point. Vinge got major props for being hip to Usenet back in the day (and who can say? Store-and-forward is probably going to be the best communication for interplanetary distances).
The thing that rubbed me the wrong way with A Fire… was the telepathic aspects of the Tines. But otoh this is a universe where for some reason technology works differently depending on how far you are from the galactic center so who really cares amirite?
Were they actually telepathic? My recollection is that they were meant to communicate by extremely broad-band audio, but ICBW.
They weren’t telepathic. They communicated via audio, mostly above the range of human hearing. There’s a technological development midway through the story that makes it unambiguously audio.
for some reason technology works differently depending on how far you are from the galactic center
The reason this happens, though not how it works, is explained later in the book.
It’s fantastic. Recommended, along with it’s prequel A Deepness in the Sky.
I wouldn’t bother with the sequel that was published recently though: I really didn’t think it matched up to the previous two books at all, which was a great shame.
NB. You should read Fire before Deepness - the latter works standalone but gains additional depth when the reader has more information about the context gained from reading Fire.
Is there a non-HTTPS version of this site for those of us too weak-willed to join the Glorious Anti-Certificate-Authority Rebellion?
For those who missed it, here is Tedu’s explanation of why he is using a self-signed HTTPS certificate: https://www.tedunangst.com/flak/post/moving-to-https. (You might have to add a temporary exception to view that page.)
I really want to like Firefox, but it feels increasingly clear that Mozilla doesn’t seem to consider anyone who wants to adapt any of the choices Mozilla made for him/her to be part of their target audience anymore.
I don’t really know what their target audience actually is to which they are trying to pull off a Gnome-like pivot, but given the fall in market-share it’s baffling that retaining existing users doesn’t seem to play a more important role.
Having tried the nightlies of Firefox 57, Mozilla has basically reset my browser usage to a vanilla install. All my extensions will stop working (marked as “legacy” – and I only have three: mouse gestures, an ad-blocker and tree-style tabs) and my theme causes tabs to crash on load (which I only use because the default theme keeps gradually eating more and more screen space).
While I’m positive that a solution can be found for mouse gestures and ad-blocking, it seems that tree-style tabs (or any kind of UI customization) is thoroughly dead. Even if they addressed the dozen of bugs that were filed to get tabs working again, it’s quite clear that the required level of visual integration to avoid making it look like a second-class citizen will not be supported anymore with WebExtensions.
The whole switch to WebExtensions feels like going from a positive, user-empowering stance of helping and encouraging users and extension developers to adapt their browsing experience to their liking, to a model where the possibilities of customization and extension is severely limited to protect the users from potential harm that seems to lurk behind every extension.
It’s not just about protecting users from harm, it’s also about:
There are a lot of really good reasons to make this switch. And while it will be frustrating to a lot of loyal users and developers, I think it will be the right decision in the long term. I’m feeling the pain too, a bunch of my extensions no longer work either. But I’m confident I’ll either find replacements in due time, or adapt my workflow to live without them.
Btw, u-block origin already has a web extension posted to their AMO dev channel.
Since I don’t see many people sharing this sentiment, I just want to chime in as a long-time Firefox user and say that I’ve been really pleased with the work in Firefox over the past several years. Performance has improved massively, and it seems like every time I open the developer tools, I find some cool new thing I didn’t know about before. I’ve also gotten a lot of mileage out of several of the experiments in TestPilot. All in all, I’m quite pleased.
Keep up the great work!
As another random data point, I don’t remember ever even having a real problem with Firefox.
But now the new version worries me because there might not be a good mouse gesture plugin available.. soooo if you wouldn’t terribly mind implementing mouse gestures the way Opera v12 had them, that would be nice :)
As another random data point, I don’t remember ever even having a real problem with Firefox.
But now the new version worries me
Likewise, Firefox has always been great for me, but only because I use an extension which allows me to rebind the keys. This extension doesn’t exist for Chrome because Chrome hard-codes ctrl-n to “open a new window” for security theater reasons. (I can’t remember the last time I opened a new browser window on purpose, but it wasn’t in the past decade.) If Firefox starts copying Chrome in that regard I’ll be forced to choose between staying on the old version forever or spending half my day closing those seventeen windows that just opened because I was trying to scroll down.
I found this: https://addons.mozilla.org/en-US/firefox/addon/foxy-gestures/
Not sure if it solves your use case or not though.
Just tried it, doesn’t really work. (In the sense of “fails to save any changes and crashes reproducibly”.)
Thanks for the note on uBlock. The dev channel thing was quite hidden, but I found it.
Well, all I can say is that I think it is sad to see that Firefox is switching from the software repository approach popular on Linux distributions to the walled garden approach of app stores (like on Windows/Mac).
I can understand why it is more convenient for developers this way, but I don’t try to be a developer of every technology I use. (Ok, I’m still sitting on this reproducible Firefox crasher and I installed the debug symbols to figure out where it comes from … but sometimes I just want to be a user.)
Currently my only hope is that the official roll-out of WebExtension gets delayed just enough for another Firefox ESR release based on the current code. This would give me another few years out of Firefox, but in the long term I really don’t see a future for me on Firefox. That’s kind of sad because I have been an user since it was called Netscape Navigator.
It’s kind of clear that vertical tabs will never be a first-class citizen with WebExtensions (even under the assumption that all of the dozen current bug reports get sorted out).
Firefox’ stance reminds me of the saying “if the government is unhappy with its citizens, it should swap out its citizens” and the CADT that happened with Gnome. (XFCE user ever since.)
Well, all I can say is that I think it is sad to see that Firefox is switching from the software repository approach popular on Linux distributions to the walled garden approach of app stores (like on Windows/Mac).
Would you mind clarifying? The distribution model for WebExtensions is the same as for non-WebExtensions. Or are you referring to the use of sandboxing?
Having to beg Firefox developers to allow me to make the changes I want to my browser feels counter to everything Mozilla stood for in the past.
I see. On the other end, every API exposed to extensions becomes something that Mozilla has to commit to maintaining into the future, imposing architectural constraints. This was most painfully evident in the long process of the e10s (multiprocess) roll-out.
There is a tree style tabs in “Firefox Testpilot”, that’s not going to break because of the API changes
Are you talking about Tab Center? That’s sadly not a tree style tabs extension, merely a vertical tabs extension. But yes, the point remains that you can write functional alternative tab bars with the new API.
From what I have seen, the UI from tab center will not be supported with official WebExtensions.
For instance, the obnoxious sidebar header will be mandatory: https://github.com/Croydon/vertical-tabs-reloaded/issues/13#issuecomment-294589274 That’s a killer for me, right there.
This is what I currently have: http://imgur.com/a/OemGy
This is what I’d like to have: http://imgur.com/a/cWEsE
This is probably the best I will get with WebExtensions: https://addons.cdn.mozilla.net/user-media/previews/full/185/185415.png
Thanks, but no, thanks.
The test pilot has ended, and I can’t find a way to install the add-on now. Which is a shame, because they had one feature that would have actually improved my experience: Tabs taking the whole area on the left side, instead of being under the location bar. https://testpilot.firefox.com/static/images/experiments/tab-center/details/tab-center-1.ceef2f45.jpg
I’d love to have a tab extension doing that.
holy hell, another tree-style-tabs-er - people don’t understand us. - I moved to vivaldi cos chrome had no capability to do vertical tabs (and always felt strangely icky on chrome). Vivaldi has vertical tabs but not tree style :(, is all chrome under the hood but with plenty of customizability and most of the “i wish i hads” from firefox. It started out buggy when i was using it but has generally gotten better. not OSS is the only thing that mildly annoys me.
I personally jumped away from firefox when i eventually got sick of it regularly slowing down after a few hours of use (to the point of barely scrolling while rendering another tab i had just middle clicked on)
that said, none of the news coming out of the ff camp is making me think “wow i should totally give it another shot”. Your comment only reinforces that - I hate not having control over other people’s stupid decisions on my system.
There are dozens of us using tree-style-tabs.
https://addons.mozilla.org/en-US/firefox/addon/tree-tabs/ is the Tree Style Tabs replacement. It’s not as good, but it’s improving.
I switched to https://addons.mozilla.org/en-US/firefox/addon/tab-center-redux/ and it’s pretty great.
I tried them all. They are quite restricted in what they can do, and the mandatory tab header makes it pretty clear that stuff like this will always be a second-class citizen under WebExtensions.
Think about it: Why doesn’t the “official” tab bar get one of these headers, too? Because it is completely jarring and obnoxious. Firefox devs know it sucks, so they don’t follow these rules, but everyone else has.
and the mandatory tab header makes it
It’s not “mandatory”. There are bugs open for a webextension API for removing it, and Firefox devs seem to be open to adding one. This API doesn’t exist now, but you’re painting it as if it will never exist.
This stuff is still new, and will improve over time as new APIs get added. Like I said, “it’s not as good, but it’s improving”.
Please assume good faith.
It seems like from Mozilla’s perspective the sidebar header is not a bug, but desired behavior: https://github.com/Croydon/vertical-tabs-reloaded/issues/13#issuecomment-294589274
I’d love to see the tickets though, because I couldn’t find anything in the official bug tracker (but maybe I used the wrong search terms).
And that’s not the only issue: it seems like the place is fixed to be beneath the location bar, either at the left or right side, falling way short of Tab Center.
This is a nice summary for someone who might have written JS a decade ago. It hits the main points in the field of ‘weird things you have to do to write JavaScript these days’. But there’s one major omission - package managers. I still have a hard time explaining to myself why we have bower, npm, and yarn all solving the same problem with varying degrees of success.
Bower is officially deprecated. Yarn was created to solve problems that existed in npm < 5 [1]. With the release of npm 5+, you can ignore package managers other than npm at this point.
[1] Exactly reproducible dependency trees & performance being the main ones.
[1] Exactly reproducible dependency trees
Did they remove the ability to re-publish a given version of a package? Hopefully - if not, this feature is just a cake-lie.
From the npm 5 release announcement:
npm will
--saveby default now. Additionally,package-lock.jsonwill be automatically created unless annpm-shrinkwrap.jsonexists. (#15666)
This package-lock.json is what provides reproducible dependency trees. It’s the equivalent of Yarn’s yarn.lock.
Well. I guess I have a different meaning of reproducible.. Previous versions of NPM would have variance in things like Makefiles that gyp puked out.. this meant that something that was “npm shrinkwrap’d” and then tar’d up, would be different every time. This is the reproducability I was hoping for.. guessing the lock file doesn’t give me that.. But I will play around and see.
Not sure if it’s possible to enforce that. You would need to ensure that any postinstall hooks are deterministic, so no calls to Math.random() or new Date().
You also would have to forbid making network requests, accessing the filesystem and really anything that leaves pure javascript land.
It still seems like yarn is faster, according to a few blog posts. The margin is much closer, however.
If nothing else, it’s much more consistent. At my company I’ve been migrating our apps from using bower and npm packages to exclusively npm packages, and setting our build servers to use yarn instead of npm. It solved our issue with npm intermittently crashing our builds.
I use yarn because it’s way faster than npm, doesn’t even compare. I develop under WSL though so maybe the difference is more noticeable there.
I use yarn because it’s way faster than npm
This has not been my personal experience. npm 5 has been consistently as fast or faster than yarn in my testing on Windows 10. YMMV.
I’ve just tried deleting the node_modules directory in my current project with 780 packages and ran npm install- it took 53s. Then I’ve done this again and ran yarn install and it finished in 27s. It’s possible it’s something specific to my project or to the fact that I’m running under WSL (maybe npm hits some under-optimised part of it), but anyway in my particular case it’s indeed faster with yarn.
Marking possible improvements (TODOs) in the code
This one is a personal annoyance of mine. When in the history of software development has anyone browsed through a codebase and implemented a TODO that some other developer left?
The two main cases I see TODO comments seem to be:
The developer is acknowledging that they know the code could blow up under some circumstances, but are passing the buck of creating a more robust implementation to the poor sap who gets the bug report about it when it inevitably goes wrong.
The developer intends to actually do the work in the coming days and is using the codebase as a work tracking system.
When in the history of software development has anyone browsed through a codebase and implemented a TODO that some other developer left?
Er, a month ago, when I did this. I was adding a new string to the translations JSON file for some component. In the section of strings for that component, I saw a TODO to reorganize them by grouping the strings better. While I was there, I did that reorganization and put my new string in the correct place for that new organization.
I can’t say whether it was a good idea for that developer to leave that TODO there. Maybe they were being lazy, or maybe writing that comment was all they had time to do. But the comment did point me in the right direction by pointing out what area of code I might have trouble understanding, due to its bad organization. And that TODO did end up getting done, months later, thanks to that comment.
Also, 3. The developer is passively-aggressively taking a potshot at someone else’s code that annoys them, but not enough to fix it.
I’ve through the blog post, the associated proposal, some of the draft specs, and a bunch of other stuff.
Nowhere do I see anything that motivates this. Why is this feature being added? What problem does it solve? Why is the leading underscore convention insufficient? The draft specs suggests that there is significant new complexity added to various core algorithms in the object system, but it feels unjustified.
Is it just assumed that “encapsulation” is good and therefore necessary? Is it further assumed that enforced encapsulation is a requirement? Is there speculation that JavaScript may be eventually object-capability secure? Is that even a feasible goal? Would it even be useful in the absence of process abstractions? Feels like more skyscrapers on foundations for sandcastles.
Apparently you overlooked the proposal’s FAQ answer “Why is encapsulation a goal of this proposal?”, which is linked from the middle of the article. This is the proposal’s reasoning:
Library authors have found that their users will start to depend on any exposed part of their interface, even undocumented parts. They do not generally consider themselves free to break their user’s pages and applications just because those users were depending upon some part of the library’s interface which the library author did not intend them to depend upon. As a consequence, they would like to have hard private state to be able to hide implementation details in a more complete way.
I agree with this overall sentiment. It seems un-necessary.
Perhaps there is a performance angle to this somehow? Since external code can’t reference these fields, yada yada yada
I feel like Javascript has hit a pretty good spot in terms of utility with recent revisions, at least for front-end work. I understand more people want to get this stuff into the backend as well, but do we really need runtime support for this? Typescript could surely offer you similar functionality on a static level.
I want to know the reasons
Unlike the leading underscore convention, it prevents access to private state from outside the object. In some ways it is a formalization of the leading underscore convention. A leading underscore is just a hint that can be abused intentionally or accidentally, without any error being indicated.
You could make some easy, though shallow, improvements over C just by changing a few features of the syntax. I once prototyped such an improvement for a class project, published at github.com/roryokane/cs283-final-project. As the README explains, my compiler changed C syntax in three ways (inspired by Python and Ruby syntax):
{} for blocksif, while, and for loops need no parentheses around their conditionsI am aware that indentation-sensitivity is a controversial feature. Each of these potential improvements are orthogonal and could be considered on their own.
You can see an example of real code with this syntax in the file test/test-cases/k&r-cat-v2.betterc, which is the equivalent of the C code in k&r-cat-v2.c.
I once tried to implement this for an in-browser editor using the
tab-sizeCSS property, only to find that no browsers implement that property fully. The CSS standard says that you should be able to pass any distance such as17pxto set the width of each tab character, but in practice browsers only support passing an integer such as2, which makes the width an exact multiple of the width of the font’s space character.It’s a shame that no text formatting API I have ever seen makes implementing elastic tabstops easy.
Though, thinking about the above limitation of CSS implementations, maybe it would be possible to combine
tab-sizewith a web font that changes tab characters to be one pixel wide? Theunicode-rangeproperty of a@font-facedeclaration can be used to specify that the font is only used to render certain characters.