I've seen people hook up Emacs to Eclipse for Java smarts, but TIL that lsp-intellij exists for Emacs too! https://github.com/Ruin0x11/lsp-intellij
miniblog.
I've released difftastic 0.11! In this release:
* Basic syntax highlighting of keywords and comments!
* Substantially improved performance! I've seen 0.5x runtime on larger programs.
* Basic Mercurial support!
Plus an bunch of smaller fixes and polish:
Should we incentivise open source contributions more?
"You use feature FOO a lot! You're probably an expert, have you considered helping with FOO issue triage on our bug tracker [link]?"
Encouraging power users to contribute back could certainly help when communities grow.
The docs for autochrome are incredible. It's just a readme.clj file, so the worked example is just running the library inline!
No screenshots, just perfect HTML. The stdlib functions in the examples are even linkified.
Are there any programming languages that combine REPL-style "redefine a single function" development with static typing?
I feel like many languages are prioritising the latter, but in principle we could totally have both.
Normally "make bad states unrepresentable" is super helpful advice.
I keep trying to use itertools::EitherOrBoth in my APIs but I go back to (Option<T>, Option<T>) every time. I just end up with too much duplication in between the Left, Right and Both cases.
Interesting idea from a discussion around limiting rustc error output: why don't compilers use a pager when there are a lot of errors? Git uses this for large output and it works well there.
(origin: https://github.com/rust-lang/rust/issues/27189#issuecomment-291420407)
Inevitably I find some small thing to change in my code just after I've done a release.
I'm feeling motivated, I'm paying attention to detail, and stuff just jumps out. I suspect it's because I end up looking at different parts during a release.
The Computer Language Benchmarks Game isn't solely about language performance. It's also about how much optimisation effort has gone into each program.
In principle, more popular languages might do better! There are more people who might tune and optimise.
lib rs has a bunch of interesting statistics about the number of crate authors, the number of dependencies, etc.
For example, weekday traffic is now 2.3x of weekend traffic, so presumably more folks are using Rust in their day job.
https://lib.rs/stats
Line-based diffs are easily muddled by wrapping/unwrapping with delimiters.
If whitespace matters, you show the indented lines, and if whitespace doesn't matter, you don't know which } to match!
Compare GitHub with difftastic here.
I occasionally see people debate whether important functions should occur first, or helper functions first.
I've not seen it enforced though. It's hard to programmatically enforce.
OCaml takes a side: you have to put helper functions first!
I've hacked together a black-and-white syntax highlighter for difftastic. Here's it running on a historical commit, showing keyword and comment highlighting.
@Azure I've never noticed that before, but now you point out, it feels really inconsistent!
I've been experimenting with black-and-white syntax highlighting in difftastic. Comments are dim gray, keywords are bold. Here's a mock-up.
I'm trying to avoid garish colour combinations or distracting from the red/green of what's changed.
What do you think? Too subtle?
My favourite page in the difftastic manual is the Tricky Cases discussion.
Syntactic diffs/tree diffs have a completely different set of corner cases to textual diffs. It's a useful resource for anyone exploring this space.
https://difftastic.wilfred.me.uk/tricky_cases.html
Neat cargo plugin I haven't seen before: https://crates.io/crates/cargo-expand
`cargo expand` will expand macros so you can see the regular Rust code produced. For example, println!(); expands to this (even syntax highlighted!).
TIL some operating systems do not provide a stable syscall interface, and expect you to use libc. Go 1.16 is switching to libc on several platforms due to this: https://utcc.utoronto.ca/%7Ecks/space/blog/programming/Go116OpenBSDUsesLibc
It's such a tiny thing, but I really like the Python or Lisp convention of putting the doc string inside the definition.
I find I write the signature first anyway, and figure out what I want to call my function, before I know how I want to describe it.
I've released difftastic 0.10!
This version adds four new languages: C, C++, C# and Haskell! See screenshots for examples.
The manual is also substantially expanded, discussing other tree diffing projects and code samples that are hard for tree diffs.
Showing 61-80 of 345 posts