Skip Navigation
ericjmorey ericjmorey @programming.dev

Data Science

Posts 218
Comments 513

Announcing Godotcaml for Godot 4.2 | Fizzixnerd Blog | Matt Walker | Jun 28, 2024

fizzixnerd.com Fizzixnerd Blog

A new way to make games

Fizzixnerd Blog

Jun 28, 2024

Matt Walker writes:

> This is an extremely early stage of development, but basically at this point it is possible to: > - Call any builtin Godot utility function or method (static, virtual, or otherwise) from OCaml easily, and with documentation comments for the original function intact an available through your favourite OCaml LSP implementation. > - Use Godot (binary) operators in a natural way from OCaml. (Unary operators are currently broken, which I will be investigating!) > - Construct Godot values from OCaml easily, and from OCaml analogues if they exist (e.g. I incur a dependency on Gg for low-dimensional vector math) > - Marshalling in and out of all these functions to/from the OCaml analogues. That is, a method that is in Godot on an object of type ClassyClass taking an int parameter and returning an int will appear in Godotcaml as int64 -> ClassyClass.t structure ptr -> int64, where the ClassyClass.t structure ptr is the “pointer to the Godot object”, commonly called self. (Note that this is always the last argument, to facilitate pipeline-style programming when GDScript programmers have a method-chaining interface.) > - Naturally define a new Godot class in OCaml that inherits from an existing Godot-registered class. (Currently NOT tested with classes defined in GDScript and/or externally.) > - Most of the code-gen for custom engines that define new stock/builtin types and classes, etc. > - Simulated inheritence for stock (and easily extendable to user-defined) classes using module inclusion: That is if Derived inherits from Base, then simply include Base in the module representing Derived, and you get access to all the methods from Base without explicit casting (or in the case of Rust’s gdext, object composition). > - Naturally define a new Godot method in OCaml and have it called from GDScript or another Godot-bound language. (ergonomics still WIP).

Read Announcing Godotcaml for Godot 4.2

See also: Setting Up a Godotcaml Project (Today)

0
Firefox Nightly for Android 130 and new navigation bar
  • I agree with you entirely on this.

  • 4 Million People Affected by Debt Collector Data Theft Hack
  • I upvote this sort if thing for visibility, but I'd rather it not be a thing.

  • On Open Source and the Sustainability of the Commons
  • I think that many developers are poor at or unwilling to work on marketing efforts or creating independent business relationships, so getting hired by a company like RedHat, Microsoft, etc. to work on a project is the way they sell their services.

  • On Open Source and the Sustainability of the Commons
  • The way to get money from libre software is to sell support services.

  • Python has too many package managers
  • This article is an excellent update on the state of Python package management tools.

  • Python has too many package managers
  • What did you end up using for your workflow?

  • Python has too many package managers
  • That means it's improving! I hope the pace of improvement can accelerate.

  • Python has too many package managers
  • I'm hoping uv is able to make itself to Python what Cargo is to rust.

    Seems like Pixi is close but confined to the Conda ecosystem.

  • Definite: Comparing Iceberg Query Engines (with Duckdb and Iceberg Full Notebook Example) | Steven Wang | 7/3/2024

    www.definite.app Definite: Duckdb and Iceberg

    Definite: Duckdb and Iceberg

    Definite: Duckdb and Iceberg

    7/3/2024

    Steven Wang writes:

    > Many in the data space are now aware of Iceberg and its powerful features that bring database-like functionality to files stored in the likes of S3 or GCS. But Iceberg is just one piece of the puzzle when it comes to transforming files in a data lake into a Lakehouse capable of analytical and ML workloads. Along with Iceberg, which is primarily a table format, a query engine is also required to run queries against the tables and schemas managed by Iceberg. In this post we explore some of the query engines available to those looking to build a data stack around Iceberg: Snowflake, Spark, Trino, and DuckDB.

    ...

    > DuckDB + Iceberg Example > > We will be loading 12 months of NYC yellow cab trip data (April 2023 - April 2024) into Iceberg tables and demonstrating how DuckDB can query these tables.

    Read Comparing Iceberg Query Engines

    0
    Hardware Study Groups Revisited
  • Any thoughts on how to get this up and going?

    Someone is going to need to pull a lot of weight in planning, organizing, and leading these meetings, presentations, and projects.

    I find that unless you communicate the time and financial cost expectations to participate in groups like this, you'll get a lot of people who are marginally interested and attached to the group and it's purpose. Which may or may not be important in a successful endeavor.

    What would we need to do on our first meeting together?

    Discuss the questiona you've raised here.

    What things would you want to learn in this course? It seems to me that many of us are already quite literate in sub-domains of what we are interested in. Maybe a teacher carousel routine could be adopted? Where we adopt a general “roadmap” curriculum, and, in an ad hoc fashion, assign people to be the instructor for the desired lesson?

    This is a what I mean by someone pulling a lot of weight, a teacher carousel has a slim to none chance of working out. One person is going to need to define and implement the vast majority of the curriculum. They'll need to do a lot of research and work in advance.

  • Virgo Laptop Project Updates?
  • I'm hopeful that there's some progress they can share even with their primary focus on COSMIC DE. Both projects feel like a big step up for the company.

  • Virgo Laptop Project Updates?

    I think that the last time I've seen any "update" about the Virgo laptop project was over a year ago. Does anyone have more recent public information about Virgo?

    2
    Rust has a HUGE supply chain security problem | Sylvain Kerkour | July 2, 2024
  • I've read that. Defining a supplier as someone with whom you have a direct business relationship with seems intentionally narrow in an unhelpful way that just further muddies the waters around the issue at hand. Making something generally available to others means that you're supplying others with that thing. While it's true that you may have no further obligations to those that receive your software, the person receiving the software needs to evaluate their risks around using and depending on that software regardless of the existence of a business relationship with the supplier. Hence supply chain risk evaluation is always necessary. That risk evaluation, or lack thereof, can result in a security problem. These problems can propagate widely within a software ecosystem. This is true with and without the existence of direct business relationships between suppliers and recipients of software.

    The whole article can be summarized by saying if you want support services related to the software written by others, negotiate a support agreement related to that software. That has nothing to do with taking a wide or narrow interpretation of the word supplier.

  • Rust has a HUGE supply chain security problem | Sylvain Kerkour | July 2, 2024
  • Developers should think about what libraries they trust, but it seems that most of the time they'll choose whatever is most convenient for handling the immediate problems they're working to solve.

  • Rust has a HUGE supply chain security problem | Sylvain Kerkour | July 2, 2024

    cross-posted from: https://programming.dev/post/16349359

    > July 2, 2024 > > Sylvain Kerkour writes: > > > Rust adoption is stagnating not because it's missing some feature pushed by programming language theory enthusiasts, but because of a lack of focus on solving the practical problems that developers are facing every day. > > > > ... no company outside of AWS is making SDKs for Rust ... it has no official HTTP library. > > > > As a result of Rust's lack of official packages, even its core infrastructure components need to import hundreds of third-party crates. > > > > - cargo imports over 400 crates. > > > > - crates.io has over 500 transitive dependencies. > > > > ...the offical libsignal (from the Signal messaging app) uses 500 third-party packages. > > > > ... what is really inside these packages. It has been found last month that among the 999 most popular packages on crates.io, the content of around 20% of these doesn't even match the content of their Git repository. > > > > ...how I would do it (there may be better ways): > > > > A stdx (for std eXtended) under the rust-lang organization containing the most-needed packages. ... to make it secure: all packages in stdx can only import packages from std or stdx. No third-party imports. No supply-chain risks. > > [stdx packages to include, among others]: > > > gzip, hex, http, json, net, rand > > Read Rust has a HUGE supply chain security problem > > --- > ### Submitter's note: > > I find the author's writing style immature, sensationalist, and tiresome, but they raise a number of what appear to be solid points, some of which are highlighted above.

    6

    Rust has a HUGE supply chain security problem | Sylvain Kerkour | July 2, 2024

    July 2, 2024

    Sylvain Kerkour writes:

    > Rust adoption is stagnating not because it's missing some feature pushed by programming language theory enthusiasts, but because of a lack of focus on solving the practical problems that developers are facing every day. > > ... no company outside of AWS is making SDKs for Rust ... it has no official HTTP library. > > As a result of Rust's lack of official packages, even its core infrastructure components need to import hundreds of third-party crates. > > - cargo imports over 400 crates. > > - crates.io has over 500 transitive dependencies. > > ...the offical libsignal (from the Signal messaging app) uses 500 third-party packages. > > ... what is really inside these packages. It has been found last month that among the 999 most popular packages on crates.io, the content of around 20% of these doesn't even match the content of their Git repository. > > ...how I would do it (there may be better ways): > > A stdx (for std eXtended) under the rust-lang organization containing the most-needed packages. ... to make it secure: all packages in stdx can only import packages from std or stdx. No third-party imports. No supply-chain risks.

    [stdx packages to include, among others]:

    > gzip, hex, http, json, net, rand

    Read Rust has a HUGE supply chain security problem

    ---

    Submitter's note:

    I find the author's writing style immature, sensationalist, and tiresome, but they raise a number of what appear to be solid points, some of which are highlighted above.

    17
    External communities not syncing?
  • Would you mind sharing some details around what you learned?

  • Beating NumPy's matrix multiplication in 150 lines of C code | Aman Salykov | Jul 1, 2024

    salykova.github.io Beating NumPy’s matrix multiplication in 150 lines of C code

    TL;DR The code from the tutorial is available at matmul.c. This blog post is the result of my attempt to implement high-performance matrix multiplication on CPU while keeping the code simple, portable and scalable. The implementation follows the BLIS design, works for arbitrary matrix sizes, and, wh...

    Jul 1, 2024

    Aman Salykov writes:

    > This blog post is the result of my attempt to implement high-performance matrix multiplication on CPU while keeping the code simple, portable and scalable. The implementation follows the BLIS design, works for arbitrary matrix sizes, and, when fine-tuned for an AMD Ryzen 7700 (8 cores), outperforms NumPy (=OpenBLAS), achieving over 1 TFLOPS of peak performance across a wide range of matrix sizes. > > By efficiently parallelizing the code with just 3 lines of OpenMP directives, it’s both scalable and easy to understand. The implementation hasn’t been tested on other CPUs, so I would appreciate feedback on its performance on your hardware. Although the code is portable and targets Intel Core and AMD Zen CPUs with FMA3 and AVX instructions (i.e., all modern Intel Core and AMD Zen CPUs), please don’t expect peak performance without fine-tuning the hyperparameters, such as the number of threads, kernel, and block sizes, unless you are running it on a Ryzen 7700(X). Additionally, on some Intel CPUs, the OpenBLAS implementation might be notably faster due to AVX-512 instructions, which were intentionally omitted here to support a broader range of processors. Throughout this tutorial, we’ll implement matrix multiplication from scratch, learning how to optimize and parallelize C code using matrix multiplication as an example.

    Read Beating NumPy's matrix multiplication in 150 lines of C code

    0
    Ladybird, a truly independent web browser.
  • I like Ladybird more than any of those alternatives.

  • External communities not syncing?
  • Federation issues are sneaky

  • Started learning Perl
  • I'm fascinated by Raku myself.

  • Anyone here heard of Wikifunctions, and if so what do you think?
  • It didn't make any sense to me when it was originally announced, it still doesn't. I don't understand the project's goals or how it's supposed to reach those goals. The mission statement is incomprehensible to me.

  • Meta (Facebook) is sharing new research, models, and datasets from Meta FAIR

    ai.meta.com Sharing new research, models, and datasets from Meta FAIR

    Meta FAIR is releasing several new research artifacts. Our hope is that the research community can use them to innovate, explore, and discover new ways to apply AI at scale.

    Sharing new research, models, and datasets from Meta FAIR
    0

    Let's reproduce GPT-2 (124M) | Andrej Karpathy | Jun 9, 2024

    Video description: > We reproduce the GPT-2 (124M) from scratch. > >This video covers the whole process: > > First we build the GPT-2 network, then we optimize its training to be really fast, then we set up the training run following the GPT-2 and GPT-3 paper and their hyperparameters, then we hit run, and come back the next morning to see our results, and enjoy some amusing model generations. > > Keep in mind that in some places this video builds on the knowledge from earlier videos in the Zero to Hero Playlist (see my channel). You could also see this video as building my nanoGPT repo, which by the end is about 90% similar.

    1
    dev.to Setting up Python on Windows

    There are many ways to set up Python on Windows—too many ways. According to the Zen of...

    Setting up Python on Windows
    6
    www.pythonmorsels.com Python Big O: the time complexities of different data structures in Python

    The time complexity of common operations on Python's many data structures.

    Python Big O: the time complexities of different data structures in Python

    Trey Hunner writes:

    > This article is primarily meant to act as a Python time complexity cheat sheet for those who already understand what time complexity is and how the time complexity of an operation might affect your code. For a more thorough explanation of time complexity see Ned Batchelder's article/talk on this subject.

    Read Python Big O: the time complexities of different data structures in Python

    8

    Your backend is too complicated | Using Gleam to Simplify Your Backend

    Isaac Harris-Holt writes:

    > Modern software engineering can be a bit of a nightmare. You've got all these different third-party services to keep track of, and often many first-party microservices too! As it turns out, things can be made more simple using Gleam. Let me show you how.

    0

    Cmdline - Neovim docs | Command-line window | In the command-line window the command line can be edited just like editing text in any window.

    neovim.io Cmdline - Neovim docs

    Neovim user documentation

    In the command-line window the command line can be edited just like editing text in any window. It is a special kind of window, because you cannot leave it in a normal way.

    There are two ways to open the command-line window:

    1. From Command-line mode, use the key specified with the 'cedit' option (default CTRL-F).

    2. From Normal mode, use the "q:", "q/" or "q?" command.

    • This starts editing an Ex command-line ("q:") or search string ("q/" or "q?"). Note that this is not possible while recording is in progress (the "q" stops recording then).

    When the window opens it is filled with the command-line history. The last line contains the command as typed so far. The left column will show a character that indicates the type of command-line being edited

    0

    Filling in gaps in the Overview documentation on odin-lang.org

    I'm sharing this Discord Message from someone that was doing their best to fill in their gaps in understanding Odin after reading the Overview documentation on odin-lang.org.

    > This was somewhat confusing, I could change the package foo at the top of the file and it makes no difference and everything works. > > From reading this Server, I learned a lot, like this: > > - 1 - The package is only linked to the directory name (folder) and nothing else, except; > - 2 - The files in the package directory must all have the same package foo header with the same name, but it does not have to be the same as the package directory name, just unique (see below); and > - 3 - No two packages can have the same directory/folder name (globaly unique); and > - 4 - No two packages can have the same package foo header names (i.e., must be globally unique but not tied to any package (directory) name needed - but would be a good idea, I mean why not...); > - 5 - You cannot have cyclical imports - ever; > - 6 - The package foo header seems powerless for the most part as far as programmer use, but I read it is used by the ABI as a prefix for symbols in the final binary; > - 7 - Sub-packages do not exist, so even nested directories are standalone packages and also do not infer dependence; > - 8 - In Odin you should put as much in one package as possible and do not use packages for namespaces since it will not work (see using) and do not use packages to organize your files, see 9 for proper reason to use packages; > - 9 - Use separate packages only as reusable (stand alone) libraries; > - 10 - Organize files within a package directory by their filenames (ala Java) and not subdirectors for all the reasons above; which is what I will do using snake case for the file names. > > If I blew it above let me know. > > imho the Overview would do better to include a little more detail like some of the stuff above. When I searched this server I found a huge amount of the above and just cobbled it together from 6-7 posts. I think what was not clear from the overview was: 1, 5, 6, 7 (its there but not clear), 9. It is clear that many people are confused by this, but on the bright side searching the Discord was very useful.

    gingerBill indicated this is a common source of confusion for newcomers to Odin: > package name has nothing to do with the thing you import. > > This is probably one of the most confusing things about Odin's packages. The exist for stable ABI and consistent linking names.

    Hopefully, I can create a minimum working example that can be illustrative for others and have a PR merged into the Overview documentation. Until then I just want something that can be found outside of Discord for other learners.

    0