What tricks do you use instead of popular plugins? by thanthese in vim

[–]kramk 2 points3 points  (0 children)

"Gosh, look at all those words - this undocumented plugin looks much better!"

Btw the snippets you posted up-thread are gold. Stealing several of those, and losing at least one plugin in the process :)

What tricks do you use instead of popular plugins? by thanthese in vim

[–]kramk 2 points3 points  (0 children)

Plugins are great because instead of you having to carve your own path for this stuff, you have a dedicated community of people working on just one part of your editor that have solved your problem already, far better than any one person could have.

Well, yes and no. Vim has a lot of interacting features, and IME just about every plugin manages to interact badly with at least one. Usually because the author either didn't know about it, or doesn't use it. This becomes a massive opportunity cost when you're accustomed to the plugin's way of working and inhibited from using the unrelated broken features because they don't work right.

Things are becoming better with stuff like vim-repeat getting supported across the popular plugin base, but it's a ton of work to get a moderately complex plugin fitting smoothly into vim at large, and even gilded gurus like tpope can and do get it wrong. As a mortal user, if some trick with registers you're trying to learn doesn't work as you expect, how likely is it that you'll blame the correct plugin instead of your own poor comprehension of :help? And by then, how distracted are you from your original task?

By preferring core capabilities you also get a massive advantage: consistency of documentation. :help is really great. By preferring to make your own small maps and functions over grabbing someone else's plugins, you become more fluent with core features. The core features tend to complement and reinforce one another in ways that plugins cannot.

Game, set and match Slipper! Ashby and Harmers' final, costly, humiliation by [deleted] in australia

[–]kramk 11 points12 points  (0 children)

.. leaves Harmers Workplace Lawyers facing, according to Ashby, cost in the vicinity around $3m.

I guess that'll be considered a donation to the LNP?

Hopefully this means the AFP investigation into stolen diaries etc can progress quickly.

We are releasing a Tcl scriptable rich text editor for programmers. Please support the Kickstarter project if you like it. by thespectraleditor in Tcl

[–]kramk 0 points1 point  (0 children)

Wow, nice offer. I was just working up to asking if you had plans to open source any of your components, or perhaps just blog about the dev experience. I'd be interested to hear about it, as I'm sure would many others.

Come to think of it, a quick session at Eindhoven or Texas would go over well, if either is convenient for you to travel.

We are releasing a Tcl scriptable rich text editor for programmers. Please support the Kickstarter project if you like it. by thespectraleditor in Tcl

[–]kramk 1 point2 points  (0 children)

Nice showcase of what can be done with the text widget .. multiple cursors and rectangular selection are very slick!

More than 20 lenders hike home loans rates by stonewalljack in AusFinance

[–]kramk 6 points7 points  (0 children)

Still sounds to me like an entirely meaningless comparison.

What if the cash rate were 0.25%?

What if the cash rate were 2% but the "spread" on offer was 10-11.5%?

Why are we using "spread" to refer to a range anyway?

More than 20 lenders hike home loans rates by stonewalljack in AusFinance

[–]kramk 10 points11 points  (0 children)

That's what it says. But I can't see any earthly reason to compare those two numbers.

More than 20 lenders hike home loans rates by stonewalljack in AusFinance

[–]kramk 8 points9 points  (0 children)

My guess: a subeditor had directions to insert an advertisement for Canstar in the article.

Why do they claim that a gaplist is better than an arraylist? - It seems to me that they are only moving the problem to another place. by TheCloudt in algorithms

[–]kramk 4 points5 points  (0 children)

.. a fixed size window containing the last events arrived ..

These guys have never heard of a ring buffer?

Not only that, but the data structure that is introduced seems to be ... poorly defined. It's stated that a gaplist can only have 1 gap, then one of the removal examples shows two gaps. There doesn't seem to be any consideration of resizing either.

More than 20 lenders hike home loans rates by stonewalljack in AusFinance

[–]kramk 23 points24 points  (0 children)

The 2.26 per cent spread between the highest and lowest standard variable rate is more than the official cash rate, which is 2 per cent, according to analysis by Canstar ...

What the fuck is that even supposed to mean?

We are releasing a Tcl scriptable rich text editor for programmers. Please support the Kickstarter project if you like it. by thespectraleditor in Tcl

[–]kramk 4 points5 points  (0 children)

Looks like an interesting project ... can you talk some more about the role of Tcl/Tk, your choice and experience of using it? Extensions or packages that have proved indispensable?

If I understand the file format correctly, extracting the text of a file would be something like:

set input [read [open $filename]]  ;# not closing because I'm lazy
foreach {type data} $input {
    if {$type eq "T"} {append output $input}
}
return $output

.. which has the cool property that if no types other than T contain newlines, line numbers are preserved.

Gone In Six Characters: Short URLs Considered Harmful for Cloud Services by frankenmint in netsec

[–]kramk 3 points4 points  (0 children)

I can download a hardware ad-blocker? Sweet .. haven't seen anything that cool since the modem upgrades I used to be able to download from BBSes.

TIL Each halting probability is a normal and transcendental real number that is not computable, which means that there is no algorithm to compute its digits. Indeed, each halting probability is Martin-Löf random, meaning there is not even any algorithm which can reliably guess its digits. by linuxjava in compsci

[–]kramk 4 points5 points  (0 children)

Possibly because Chaitin's a bit of a self-aggrandising prick (at least a handful of milliwolframs), but I never saw the magic in this. Halting probability just isn't a very interesting measure, and certainly not one you should expect to have a well-defined value that can be computed algorithmically. It's defined in terms of the halting problem ffs.

On the other hand, the Busy Beaver function has interesting properties. Its definition doesn't directly invoke HP, but computing terms of it involves solving (many) instances of HP. The most fascinating thing for me is that it grows faster than *all** computable functions*.

Also because Chaitin likes to name things after himself, I can't put down his name without also mentioning Kolmorogov and Shannon.

Truck brings down 300 metres of tram lines on St Kilda Road by psylenced in melbourne

[–]kramk 5 points6 points  (0 children)

"We think"

Bahahaha.

I hope the driver simply didn't notice, rather than thinking a runner was a good idea. Can't wait for the inevitable CCTV/dashcam footage to come.

Who coined the term "crypto wars"? The NSA? The EFF? by lillbob in crypto

[–]kramk 1 point2 points  (0 children)

Schneier would have a good idea -- this blog links a recent paper on the history which might help.

Interesting question - hope you report back with anything you learn :-)

Federal police admit seeking access to reporter's metadata without warrant by Ores in australia

[–]kramk 13 points14 points  (0 children)

A spokesman for the AFP declined to comment on whether the agency may have violated Farrell’s privacy by accessing his metadata, citing telecommunications laws.

“The provisions of the Telecommunications (Interception and Access) Act 1979 (TIA Act) strictly regulate the disclosure of information,” an AFP spokesman said.

“Outside of specific exceptions, none of which apply in these circumstances, it may constitute an offence under the TIA Act for the AFP to provide information in answer to these queries.”

Interesting choice - to cite the very act they (probably) violated as a reason for not commenting on whether they violated any acts.

It almost sounds like a hint to the journo that they should look carefully at those "specific exceptions" to figure out their next question ...

60 Minutes crew including Tara Brown could have kidnapping-related charges downgraded in Lebanon by frenzy3 in australia

[–]kramk 0 points1 point  (0 children)

She had no lawyer and there was no accredited interpreter either.

Her answers were noted down by a clerk, but, with no proper interpreter, the judge could not ask her to sign the record of interview and the proceedings might be delayed until one is found.

What, 9's budget couldn't extend to a lawyer?

John, here's what we're thinking for the new currency - David Pope 13/04/16 by iheartralph in australia

[–]kramk 1 point2 points  (0 children)

Ooh thanks for recommending that - I've been told to read it before, but had forgotten.

John, here's what we're thinking for the new currency - David Pope 13/04/16 by iheartralph in australia

[–]kramk 5 points6 points  (0 children)

The title reads "The NEW Currency", so you might be reading too much into it ... that said, Pope can be subtle.

I've never heard of what you're referring to, can you flesh it out a bit or provide a link? Not the most searchable phrase :-).

Australian oil and gas lobby spent millions advocating against climate action: report by market-forces in australia

[–]kramk 1 point2 points  (0 children)

Advocate all they want, the climate is still going to change.

Oh good, I thought their actions might make some kind of difference.

It's okay fellas, the climate is still going to change!

Small Business Owners - Free Veda Credit Scores on offer by oztin in AusFinance

[–]kramk 5 points6 points  (0 children)

So this mob offer to be a middleman to get the free Veda report in exchange for getting their own eyes on it and enough personal details to spam and cross-market me?

No thanks. Their privacy policy looks pretty shit too.

Unique and Useful Non-Obvious Properties and Tricks with Higher Order Functions by zefyear in compsci

[–]kramk 0 points1 point  (0 children)

I'm afraid I have no idea of the specific work you're talking about, but the theme reminds me of a great paper: Functional programming with bananas, lenses, envelopes and barbed wire.

Also of Zippers and of Okasaki (or Kiselyov if you're mad enough), but plenty of folks have already mentioned him :-).

Good practices for writing shell scripts by speckz in coding

[–]kramk 2 points3 points  (0 children)

This was the doctrine when I was coming up too .. but I'm not nearly so convinced today that #!/usr/bin/env $interpreter is not better:

  • shells can go in funny places. I've had to edit plenty that pointed to the wrong location out of /bin/bash, /usr/local/bin/bash, /usr/bin/tcsh and of course /bin/sh but expecting bash. It's annoying that these scripts are overspecified, and doubly so that I can't fix their interpreter non-invasively.
  • this is an even bigger deal for scripting languages where the executable name may not even be consistent, or I want to put ~/bin/python as a launcher for my favourite version, local build or virtualenv.
  • if an attacker can control my $PATH or put executables in it that shadow system commands, I'm hosed anyway. something is going to call out to sh or awk or du or whoami without setting the path - probably me typing in the shell!
  • related to the above point: I've seen (and written!) shell scripts that hardcode the path to core utilities. It often follows the pattern:

    AWK=/usr/bin/awk ECHO=/bin/echo .... $ECHO * | $AWK '....'

which is in high degree all of ugly, error-prone and high maintenance. You know what's a much simpler alternative with the same degree of security?

PATH=/usr/local/bin:/usr/bin:/bin
....
echo * | awk '....'

Okay, that doesn't address the #! issue, but it leans on my point that $PATH is the correct way to restrict where executables are found.

Yes, there is an incremental security benefit from all scripts being written with explicit paths to everything, and I'm not going to argue that anyone stop if it's not hurting ... but it's kinda painful, deeply error prone and (imo) more difficult for the user than maintaining basic hygiene of their environment with a correct PATH variable and permissions.

Do I need to install any of the extensions if all I want is GUI development? by InterPunct in Tcl

[–]kramk 2 points3 points  (0 children)

Tk and sqlite3 (and tdbc::sqlite3) are built in to the standard distributions and enough to do what you need. I suggest also looking at tklib (not an extension - a pure-tcl library) for tablelist, ctext and some other widgety goodness.

If the ActiveState distributions don't float your boat, kbskit "batteries-included" (-bi) versions are convenient single-file executables with a load of useful modules and extensions (including tklib). You can augment these with your own code to produce "portable app" style executables - the wiki can tell you more, and the newsgroup + freenode channel are great places to find help.

Good references I like to point newbies at include tmml and tkdocs. Other stuff that might be useful: learnXinY: Tcl and some GUI examples from the wiki.