News for hackers. Stuff that matters.

billsix

I teach a class on computer graphics, where I want to embed my working source code into my web based explanations, so perhaps the following could help you

I have my source code in one directory, and in another I use Sphinx to make the documentation. In the documentation, I reference certain sections of code, which you can do by line number, or you can do by some pattern to begin and end.

Since I control all my source code, I put in comments with certain flags for regions of code.

I can then reference said section of code as follows

  .. literalinclude:: ../../src/demo06/demo.py
     :language: python
     :start-after: doc-region-begin define uniform scale
     :end-before: doc-region-end define uniform scale
     :linenos:
     :lineno-match:
     :caption: src/demo06/demo.py
https://github.com/billsix/modelviewprojection/blob/master/b...

The generated book is here https://billsix.github.io/modelviewprojection/

For your purposes, using a third party's code, I would make a new git repository, and copy the current status of their code in, I would then annotate the sections that I want to with comments, And then generate the documentation using Sphinx, referencing you annotations of their code

I've liked Jonathan Bartlett's books, his newest is "Learn to Program with Assembly"
Off topic but Kill Bill 1 and 2 were great but I hope they stop at Kill billfive
Nice! PortableGL is also great, OpenGL api that is defined in entirely in C and writes the “framebuffer” into an SDL window

https://github.com/rswinkle/PortableGL

I tried building it from source a year ago on multiple tagged releases and it failed to build. Been using minidlna instead, which I’ve been pleased with.
Re:LineageOS 19 on Tuesday April 26, 2022 @11:56AM (#31169077)
Good to know, thank you!
Re:LineageOS 19 on Tuesday April 26, 2022 @11:56AM (#31169068)
Moto g7 plus on straight talk (using att sim I think)
Re:LineageOS 19 on Tuesday April 26, 2022 @11:55AM (#31169059)
Yeah I update it every week
Re:LineageOS 19 on Tuesday April 26, 2022 @08:33AM (#31166659)
I love Lineage and used it as my main phone OS but since my carrier required in February for VoLTE to work, I can’t receive or make phone calls anymore.
Re:Why won’t anyone teach me math? on Friday February 11, 2022 @11:15AM (#30303138)
Graphics programming where applied linear algebra is built from the ground up

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

Most of it is done but I’m updating the content in web form weekly

Re:How to Squash and Rebase in Git on Friday January 07, 2022 @11:52AM (#29841439)
I use a “squash” alias to make it simpler for me

https://github.com/billsix/dotfiles/blob/master/.gitconfig

When implementing Python's yield in scheme, I found it straightforward to add the equivalent of send!

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

Re:Pharo 9 on Thursday July 15, 2021 @08:11AM (#27843810)
I remember while learning Smalltalk how surprised I was when if statements and loops weren’t syntax of the language, but methods on objects. True and False are singletons of a Boolean class, which has a method ifTrue:ifFalse which take lambdas as arguments. For loops, a lambda which returns True or False has a method whileTrue: which takes a lambda as an argument.

Although I like Python, and I don’t know JS well, I really enjoyed learning Smalltalk, even though I will likely never use it professionally.

Regarding hooks, you can put hooks into the repo

https://www.viget.com/articles/two-ways-to-share-git-hooks-w...

Granted, each team member must set core.hooksPath in their config.

Hope this helps.

Re:Programming is hard on Tuesday April 06, 2021 @10:46AM (#26712412)
Are you using Swift? Swift was released in 2014.
Re:Cory Doctorow: IP (2020) on Saturday January 30, 2021 @08:51PM (#25974986)
> Now, free software advocates – and free culture advocates – hate the term “intellectual property.” The argument against IP rails against its imprecision and its rhetorical dishonesty.

Now?

https://www.gnu.org/philosophy/not-ipr.html

https://www.gnu.org/philosophy/words-to-avoid.en.html

Re:Ask HN: I want to start learning Lisp. Where do I begin? on Wednesday December 16, 2020 @09:36AM (#25442973)
Yes
Re:Ask HN: I want to start learning Lisp. Where do I begin? on Wednesday December 16, 2020 @08:45AM (#25442375)
Books

-ANSI Common Lisp by Paul Graham -On Lisp by Paul Graham -Simply Scheme -The Little Schemer -Structure And Interpretation Of Computer Programs -Paradigms of Artificial Intelligence Programming

Implementations

Common Lisp - any should be fine, I’ve used sbcl and clisp

Scheme - I like gambit scheme. It has a macro system that can be used like described in “On Lisp”

Re:Growing the .NET Ecosystem on Tuesday December 15, 2020 @07:13PM (#25437275)
Regarding building from source, ~8 years ago, I built Mono, Monodevelop and their dependecies from source on Linux, no binaries, and it was straightforward. Created a language plug-in for a custom language, and I loved the dev environment. Shout out to the Mono community! (And thank you!)

Unfortunately, today, I can't figure out how to build that stack from source, even Gentoo's dotnet overlay can't seem to build it. Oh well. I'd appreciate any pointers.

Re:Zig 0.7.1 Released – 69 bugs fixed on Sunday December 13, 2020 @09:51PM (#25413001)
I had been unaware of the volume of PRs that you receive, apologies, I had thought that my PR was just ignored.

Thanks for your reply and thank you for Zig.

I'll reopen that particular issue, and will try to fix any example zig apps that I can't compile, and will submit PRs for them.

Re:Zig 0.7.1 Released – 69 bugs fixed on Sunday December 13, 2020 @09:23PM (#25412834)
With respect, although I think zig is very fascinating as far as language design and is great work, I've had trouble compiling most example zig programs, which I assume worked on older versions of zig. This minimizes my motivation to continue to learn zig.

Please accept pull requests that fix older example code, or please make the provided examples work on newer versions of zig.

https://github.com/andrewrk/sdl-zig-demo/pull/8

Re:Qt 6.0 on Tuesday December 08, 2020 @08:46PM (#25354366)
Sure, if they don’t mind Qt automatically being relicensing under BSD

“The little known KDE Free Qt Foundation makes sure that Qt stays free and open-source. It guarantees that all Qt modules currently licensed under LGPLv3 must continue to be available under LGPLv3 in the future. This covers all modules from Qt Essentials and many add-on modules. If The Qt Company discontinued the FOSS version of Qt, the Foundation would have the right to make Qt available under the BSD license. This is a very powerful protection of free and open-source Qt.“

https://www.embeddeduse.com/2019/12/21/safe-guarding-the-lgp...

https://dot.kde.org/2016/01/13/qt-guaranteed-stay-free-and-o...

Re:Qt 6.0 on Tuesday December 08, 2020 @10:14AM (#25346208)
Qt is also licensed via LGPL
From watching the Ted talk, I think that Linus was using a cs101 example to effectively communicate to a large audience of programmers about good design for system level work such as for an Operating System.

His example, I think, can be extrapolated to explain the design of Linux’s “clone” system call for threads, which creates a new process that uses the same virtual address space as the parent process, with a different stack location; but more importantly, those “threads” are scheduled by the OS’s scheduler like any other process is. I’m unaware of any other OS which implements threads this cleanly.

From his talk, “Sometimes you can see a problem in a different way and rewrite it so that a special case goes away”

https://eli.thegreenplace.net/2018/launching-linux-threads-a...

Re:Reasons to prefer Linux over Windows (2014) on Sunday November 15, 2020 @08:05PM (#25106773)
IIRC, Qt has been licensed under the LGPL for many many years, so you can develop proprietary software that dynamically links to Qt no cost.
Re:Restarts in Common Lisp on Wednesday April 01, 2020 @10:58AM (#22749290)
Re:Lisping at JPL (2002) on Saturday January 18, 2020 @09:16PM (#22088910)
The density of parentheses is high, but the number of parentheses is small, relatively.

Older »