HNHacker News
TopNewBestAskShowJobs

billsix

574 karma · joined October 17, 2008

github.com/billsix
submissionscomments
billsix··on XML is almost always misused
RIP Eric Naggum

http://www.schnada.de/grapt/eriknaggum-xmlrant.html

billsix··on Show HN: Methodfinder for Python
Many times, you know the input and output of a procedure that you know must exist, but can't remember the name.

Methodfinder finds the name. Let me know if you find it useful!

   >>> import methodfinder
   >>> methodfinder.find([]) == 0
   len([])
   sum([])
   >>> methodfinder.find([]) == False
   any([])
   bool([])
   callable([])
   >>> methodfinder.find(3) == "3"
   ascii(3)
   format(3)
   repr(3)
   str(3)
   >>> methodfinder.find([1,2,6,7], 6) == True
   6 in [1, 2, 6, 7]
   [1, 2, 6, 7].__contains__(6)
billsix··on Show HN: Methodfinder for Python
Many times, you know the input and output of a procedure that you know must exist, but can't remember the name.

Methodfinder finds the name. Let me know if you find it useful!

   >>> import methodfinder
   >>> methodfinder.find([]) == 0
   len([])
   sum([])
   >>> methodfinder.find([]) == False
   any([])
   bool([])
   callable([])
   >>> methodfinder.find(3) == "3"
   ascii(3)
   format(3)
   repr(3)
   str(3)
   >>> methodfinder.find([1,2,6,7], 6) == True
   6 in [1, 2, 6, 7]
   [1, 2, 6, 7].__contains__(6)
billsix··on Running Lisp in Production (2015)
http://www.paulgraham.com/onlisp.html
billsix··on “Culture fit” is a two way street (2018)
> Look at a statement of equivalence. You might say that "A is equal to B" or "A == B". There are two "flows" going on there: A has to match up with B, sure, but B also has to match up with A.

Weird way to describe the symmetric property of equality from discrete math 201

billsix··on Introduction to Bayesian Filter
That's the best introductory material on the subject that I know!
billsix··on Why Continuations Are Coming to Java
Yup, I did exactly that in Scheme

http://billsix.github.io/bug#_make_generator

billsix··on Google will no longer make its own tablet devices
As an Android user, I liked my Nexus 7 at the time, but I received security updates for a year or two max, and then never bought an Android tablet again because of it.
billsix··on An Introduction to C and GUI Programming
No callbacks, so no forced heap allocation nor lifetime management . "oh you want to use FooGUI? First let me tell you about the object hierarchy and object lifecycle". No mvc. No custom, required data structures.

The programmer just copies and pastes from the demos, makes small modifications, and it just works.

(No offense intended towards your framework, I've used gtk, qt, and swing and have never understood them like I understand nuklear and dearimgui)

billsix··on An Introduction to C and GUI Programming
Immediate mode gui frameworks make for a pleasant programming experience

https://github.com/vurtun/nuklear

billsix··on Winding down my Debian involvement
Agreed, I've tried and failed to make Debian packages, and have no idea how to proceed.

In contrast, with Gentoo and their documentation, it was straightforward for me to make my own additional, separate repo, look at other ebuilds to see how packaging works, and have everything just work.

https://github.com/billsix/billsix-portage

I submit ebuilds to Gentoo itself if I think others would benefit.

As far as I can tell, packaging for Arch is straightforward as well.

billsix··on McCarthy's Ambiguous Operator (2005)
Agreed regarding use cases. My scheme implementation does both yield and send, cleanly imho, because of call/cc.
billsix··on McCarthy's Ambiguous Operator (2005)
Incorrect. In c terms, you can think of callcc as a procedure which memcpy s the stack onto the heap for later application. And when it is later applied, the heap allocated stack is memcpy ed back into the stack region of memory, destroying the current stack.

Python and c#’s yield are nothing like that. It’s just syntactic sugar for iterators.

billsix··on McCarthy's Ambiguous Operator (2005)
Continuations also allowed me to implement python’s yield/send in 16 lines of Scheme code :-)

http://billsix.github.io/bug.html#_make_generator

billsix··on Writing an OS in Rust: Introduction to Paging
I had trouble understanding how paging worked it until it was explained in Rust
billsix··on How to Start Learning Computer Graphics Programming
Here is my work in progress for intro OpenGL programming

http://billsix.github.io/modelviewprojection/

It in python, doesn’t involve matrices. It really only requires high school math, with the exception of the z axis.

Hope it’s helpful!

billsix··on Microsoft changed how it interviews software developers
In constant time? O(1)?
billsix··on The Second Edition of “Refactoring”
It results in tautological tests.
billsix··on The Second Edition of “Refactoring”
But he learned about refactoring in Smalltalk 80, and later wrote the book in java
billsix··on The Second Edition of “Refactoring”
I thought this new book would be the third edition.

https://www.amazon.com/Refactoring-Ruby-Addison-Wesley-Profe...

billsix··on Is eval evil? Just-in-time compiling
> The thing is, it isn't just javascript eval; any eval is bad.

Eval'ing during macroexpansion in Gambit Scheme is the basis for my book, http://billsix.github.io/bug.html#_computation_at_compile_ti...

It allows me to make a compile-time unit test framework in 7 lines of code

billsix··on Trip report: Fall ISO C++ standards meeting
They are very similar. They are both applicative-order, meaning that the arguments to a procedure are evaluated before the procedure is applied.

The evaluation of a lambda results in a function value, which captures the enclosing scope, but the procedure is not yet applied to anything.

But the main difference that I've seen anecdotally is that imperative programmers as a whole tend to get confused by nested expressions, or lets just say they prefer sequential statements over nested expressions. My assumption is that they don't fully understand the order of evaluation in their language of choice.

billsix··on Trip report: Fall ISO C++ standards meeting
You neglected to quote the full sentence, which wasn’t even long.

To change your mindset, read:

http://www.paulgraham.com/onlisp.html

Or instead, how bout this. show me your implementation of generators in the “user space” of your language of choice. Show me your compile-time test framework.

Both of these are relevant to the article, what C++ may provide to users in 2 years. But I did these on my own, without requiring Marc Feeley’s approval nor his implementation (he is the creator of Gambit)

billsix··on Trip report: Fall ISO C++ standards meeting
I implemented a compile-time test framework in Gambit Scheme in 7 lines of code, and Python's yield in about 20 or so.

http://billsix.github.io/bug.html#_make_generator

Lisp code has few wasted moves. Programming in it does require changing your mindset of syntactic beauty. And once your mindset changes, you can make whatever syntax you want.

Perhaps the biggest hurdle is that the code is not best read linearly. The reader must understand the order of evaluation, which follows very simple rules, in order to understand the code correctly. That hurdle is definitely worth the jump.

billsix··on Qt Design Studio 1.0
It’s a library for making windows, buttons, etc (called widgets), for windows Linux and macOS.

If you’d like to make graphical applications though, I recommend immediate mode frameworks

https://youtu.be/Z1qyvQsjK5Y

https://github.com/ocornut/imgui

https://github.com/vurtun/nuklear

billsix··on The Little Typer
Pirate away bro, it’s just like a library, you’re correct. The word “library” is derived from the Latin word “liber”, meaning book.
billsix··on The Little Typer
I said that more than a select few can afford the book. I did not say that it is affordable globally.

Pirate away dude. The piracy of JSTOR repos didn’t help the global poor population, nor will piracy of this book.

billsix··on The Little Typer
Reductio ad absurdum.
billsix··on The Little Typer
More than a select few can afford this book
billsix··on The Little Typer
there is an extraordinary amount of freely available content online for people who want to learn, improve themselves, and to make more money.

To those who cannot afford it, here’s 2.5 years of my side work for free http://billsix.github.io/bug

← PreviousPage 2 of 9Next →