Open Source Computing

Week 12



AI performance of the MIT license

https://app.suno.ai/song/da6d4a83-1001-4694-8c28-648a6e8bad0a



Discussion of how to explain what a calculator does

Internal modes and states

Actions (from galculator):

Demo of qalculate and galculator

expression evaluation: ~/271/expressions (code should be in pld.cs.luc.edu/courses/271/spr18/demos/expressionsij.zip)

    java expr_eval     (traced version is expr_exp)

    java expr_assign

Notes: pld.cs.luc.edu/courses/271/spr18/mnotes/recursion.html#exprtrees

Demo of command-line expressions

With a calculator interface, things are a little different. Generally, the '(' key clears the display and starts a new subexpression. Operator keys might display the current operator on the screen. The ')' key acts like the '=' key for the current expression, displaying the results so far. galculator takes this approach.

The other alternative is to display the entire expression on the display line. qalculate does this.


Some open-source projects and how they handle:

Many of these are from medium.com/@likid_geimfari/the-list-of-interesting-open-source-projects-2daaa2153f7c.

BrowserBox

github.com/dosyago/BrowserBox, dosyago.com

This is a kind of remote browser. It might not display the full rendered content of the page, but you can use it to make remote browser GET/POST requests, and get the results. Results by default are downloaded to the remote server, but it is straightforward to fetch them from there; security-scanning is recommended. (Note the "WTF is this?" section, which was added a week or so after the project first went up (the readme continues to expand rapidly).)

The monetizing-open-source model here mostly seems to be that the open version is a trial version. It's not time-limited, but nor is it quite open-core.

Things to look at:

What do you think of that license?

The Polyform Project

polyformproject.org

The argument here is that these are just various "source-available" licenses. They do state outright that "Polyform is not ... Open source or free software."

Licenses to look at:

They give a list of related licenses:

commonsclause.com: an add-on license (to any "permissive" open-source license) that restricts sale, but still allows forking.

Elastic license (www.elastic.co/licensing/elastic-license): note the "Copyright" and "Limitations" sections. You do get to fork the original project, subject to the Limitations, which here are relatively substantial. Can you rewrite the portions of code covered by the license key, so the functionality is available without a license? Looks that way to me, though that might be a big project.

Confluent license (docs.confluent.io/platform/current/installation/license.html): Note the Developer (no time limit, but "single-broker") and Trial (30-day) licenses. No copyright rights are extended by the license.

Wednesday

Some open-source projects and how they communicate

plotly

A python plotting library

github.com/plotly/plotly.py

Has CODE_OF_CONDUCT.md. Also migration-guide.py, for users

Monetization: https://plotly.com/consulting-and-oem/

Lower down, there is a "contributing to plotly" link and a "Community forum" link.

pycallgraph

github.com/gak/pycallgraph

Most recent update is 5 years ago; most are 9+ years ago

Project Abandoned

astropy

An astrophysics library for Python

github.com/astropy/astropy

Has a contributions page at www.astropy.org/contribute.html

At www.astropy.org/team.html there is quite a discussion about the project organization. There is a very long list of contributors, and a list of around ~45 voting members.

\System32\curl.exe

Don't delete it! Even if your antivirus tells you to. See daniel.haxx.se/blog/2023/04/24/deleting-system32curl-exe.

Amazon's Quiet Open-Source Revolution

www.infoworld.com/article/3694090/amazon-s-quiet-open-source-revolution.html.

At least they are no longer fighting open source so strongly.


The Early Days of Linux

As told by Lars Wirzenius, classmate of Linus.

Usenet played a role.

lwn.net/SubscriberLink/928581/841b747332791ac4

Red Hat

How did they manage to make so much money selling Linux? IBM bought the company for $34 billion in 2018.

See opencoreventures.com/blog/2023-04-red-hat-model-only-worked-red-hat.

Red Hat started when Linux was novel (March 1993; Linux didn't start until August 1991), and RH offered support. They supported all the weird "system-administration" stuff. At this point, that's easily found online and is often automated.

The OpenCoreVentures argument is that selling support collects pennies per dollar of added value (their term: "low rake"). VCs are not interested in that kind of business model.

In any event, it seems clear nobody today is going to be able to start selling Linux.


Linux kernel source

Brief overview of TCP

Start with af_inet.c::tcp_protocol() and tcp_ipv4.c::tcp_v4_rcv
    => __inet_lookup_skb => __inet_lookup()
    => tcp_v4_do_rcv
        =>     tcp_rcv_established() | tcp_v4_hnd_req(sk, skb) | tcp_child_process
        =>     tcp_input.c::tcp_rcv_state_process()
                    -> icsk->icsk_af_ops->conn_request(sk, skb)
        == tcp_v4_conn_request()        // see table at tcp_ipv4.c::line 1758

tcp_v4_hnd_req():
    inet_csk_search_req: this is looking for the "request socket", a mini-socket with additional info
    tcp_check_req: checks if there is space in the accept queue
    inet_lookup_established: we *did* just call this: same as __inet_lookup_established with hnum=dport
    main path: ends up returning sk

Caller is tcp_v4_do_rcv();
    caller falls through to tcp_rcv_state_process
        -> icsk->icsk_af_ops->conn_request(sk, skb)
        == tcp_v4_conn_request()        // see table at tcp_ipv4.c::line 1758

tcp_v4_conn_request():        // handles incoming SYN
    // error cases first
    tcp_clear_options();
    tcp_parse_options;
    tcp_openreq_init
    save saddr/daddr in ireq, which is a cast of req, which is a struct request_sock.

    saves req using inet_csk_reqsk_queue_hash_add(sk, req, TCP_TIMEOUT_INIT);    // csk = Connected SocKet
    see also inet_csk_search_req
    calls __tcp_v4_send_synack

tcp_input.c:
    int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)    // called by tcp_v4_do_rcv for states besides ESTABLISHED, LISTEN
    ESTABLISHED: tcp_data_queue()

Brief overview of HTB

htb_classify()

htb_dequeue()

    jiffies

    htb_dequeue_tree()