HN user

billsix

574 karma

github.com/billsix

Posts6
Comments244
View on HN

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

LineageOS 19 4 years ago

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.

Pharo 9 5 years ago

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.

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”

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.

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.

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

Qt 6.0 6 years ago

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...

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...