Better HN
topnewbestaskshowjobs
Log inSign up

alexanderbrevig

14 karma · joined Apr 29, 2013 (13y ago) · 11 submissions

Submissions

comment 2y ago · link · parent

This project is finally at a point where it makes me more productive writing our in-house documentation using GitHub Pages. I think it may help you too!

I hope you like it and contribute to it with issues or PRs.

Time to make up for my lost time making the LSP, by using the LSP :)

2.

GitHub LSP for Markdown links to issues, users and repos(github.com ↗)

1 points · by alexanderbrevig · 2y ago · 1 comment

comment 12y ago · link · parent

This is what the windows developer community needs!

comment 13y ago · link · parent

* not all languages have macros * you don't use test frameworks for enabling and disabling code inline while you're developing

Please read the protip, understand my intention (keyword TRICK) and have a delightful cup of coffee. You've earned it.

comment 13y ago · link · parent

This is exactly what this trick can be used for. Thank you for voicing your opinion. Happy coding!

comment 13y ago · link · parent

This is not an attempt at branching, this is a trick.

The protip is not to use the trick, but to know about it. Read the tip, try to understand the intention - then criticize. Thank you kind sir.l

comment 13y ago · link · parent

You're the one not knowing how to read and comprehend. This is a trick, I hope you learn some some day. My god this is tiring...

comment 13y ago · link · parent

"I'd appreciate if you'd have this discussion on Coderwall. That way I could 'defend' the post where it's due. However though, please read https://news.ycombinator.com/item?id=5626456 and summary is: It is a trick, not a silver bullet. It prevents code from being compiled to the binary, in a portable - yet hacky - way."

comment 13y ago · link · parent

Run that with vanilla JavaScript, Java, SQL or anything but C/C++ [this is the premise of the protip] and I'll bake you a cake! (One that's not a lie;) Nothing that's discussed here does the same thing, though I completely agree there is a lot of better techniques for various tasks, nothing is functionally the same as the trick. (Why can I not reply the the reply of this post? I'm new here.)

comment 13y ago · link · parent

I'd appreciate if you'd have this discussion on Coderwall. That way I could 'defend' the post where it's due.

However though, please read https://news.ycombinator.com/item?id=5626456 and summary is:

It is a trick, not a silver bullet. It prevents code from being compiled to the binary, in a portable - yet hacky - way.

comment 13y ago · link · parent

I understand the criticism, it's not supposed to be _the_ way to toggle code in and out.

It's a TRICK, and that's all it will ever be.

However, it is the only way I know of that is not language specific for a particular dialect of C (#ifdef) that enables code to _not_ become a part of the compiled binary, or in JS terms - not available from the runtime.

Best regards -OP