Advertisement · 728 × 90

Posts by Mark Di Marco

`lt` has been a fun toy project. I doubt the population of TUI enthusiasts and Linear.app users is very big, but the point of the project was to build something for me, and learn some #rust along the way.

9 months ago 1 0 0 0

Thanks for the post! It was fun to see a few GH stars trickle in. Thanks for your work on @ratatui.rs, it is a fun library to work with.

9 months ago 1 0 1 0
Post image

Is this vibe coding? Asking for a friend.

1 year ago 0 0 0 0

Thanks! In mobile the menu is rough. Sort of slapped the mobile fix on at the end, not super proud of that. I’ll take another look and see if I can make that better.

1 year ago 1 0 0 0
Programming Language Comparison Compare programming concepts across different languages

I put together a website that lets you compare programming language features across multiple languages: dialectical.dev

I’ve got Zig, Rust, Nim, Python, Kotlin, Typescript, Elixir, Go, and Gleam in there.

LMK if I should add anything else! Language concept or language.

1 year ago 3 1 1 0
Preview
ep9 v8: Initial implementation of optional chaining ⛓️‍💥 A quick tour through compiler design to see how v8 implemented optional chaining in Javascript

It was fun to see how v8 (and this @nodejs.org and @chromium.social and co) added optional chaining (?.) to the language. Just ~250 lines of code to get the initial version in!

open.substack.com/pub/commithi...

1 year ago 1 0 0 0
Preview
Node.js — Node v23.6.0 (Current) Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Node.js v23.6.0 is out! 🥳🎉

This release enables the flag --experimental-strip-types by default.

Node.js will be able to execute TypeScript files without additional configuration!

⚠️ This feature is experimental, has limitations and is subject to change.

nodejs.org/en/blog/rele...

1 year ago 99 30 3 6
Screenshot of code Preamble in COBOL:
IDENTIFICATION DIVISION.
       PROGRAM-ID. NUMBER-PAIRING.
       
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT INPUT-FILE ASSIGN TO "INPUT.TXT"
           ORGANIZATION IS LINE SEQUENTIAL.
       
       DATA DIVISION.
       FILE SECTION.
       FD INPUT-FILE.
       01 INPUT-LINE.
          05 LEFT-NUM   PIC X(5).
          05 FILLER    PIC X(3).
          05 RIGHT-NUM  PIC X(5).
       
       WORKING-STORAGE SECTION.
       01 WS-ARRAYS.
          05 LEFT-ARRAY  OCCURS 1000 TIMES PIC S9(5).
          05 RIGHT-ARRAY OCCURS 1000 TIMES PIC S9(5).
       
       01 WS-VARIABLES.
          05 EOF-FLAG    PIC X VALUE 'N'.
          05 ARRAY-SIZE  PIC 9(4) VALUE 0.
          05 TOTAL-DIST  PIC 9(8) VALUE 0.
          05 TEMP-NUM    PIC S9(5).
          05 I           PIC 9(4).
          05 J           PIC 9(4).
          05 DIFF        PIC S9(5).
       
       PROCEDURE DIVISION.
       MAIN-PROCEDURE.
           DISPLAY "=== STARTING PROGRAM ==="
           OPEN INPUT INPUT-FILE
           PERFORM READ-NUMBERS UNTIL EOF-FLAG = 'Y'
           CLOSE INPUT-FILE
           
           DISPLAY "=== SORTING ARRAYS ==="
           PERFORM SORT-ARRAYS
           
           DISPLAY "=== CALCULATING DISTANCES ==="
           PERFORM CALCULATE-DISTANCE
           
           DISPLAY "=== FINAL RESULT ==="
           DISPLAY "TOTAL DISTANCE: " TOTAL-DIST
           STOP RUN.

Screenshot of code Preamble in COBOL: IDENTIFICATION DIVISION. PROGRAM-ID. NUMBER-PAIRING. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT INPUT-FILE ASSIGN TO "INPUT.TXT" ORGANIZATION IS LINE SEQUENTIAL. DATA DIVISION. FILE SECTION. FD INPUT-FILE. 01 INPUT-LINE. 05 LEFT-NUM PIC X(5). 05 FILLER PIC X(3). 05 RIGHT-NUM PIC X(5). WORKING-STORAGE SECTION. 01 WS-ARRAYS. 05 LEFT-ARRAY OCCURS 1000 TIMES PIC S9(5). 05 RIGHT-ARRAY OCCURS 1000 TIMES PIC S9(5). 01 WS-VARIABLES. 05 EOF-FLAG PIC X VALUE 'N'. 05 ARRAY-SIZE PIC 9(4) VALUE 0. 05 TOTAL-DIST PIC 9(8) VALUE 0. 05 TEMP-NUM PIC S9(5). 05 I PIC 9(4). 05 J PIC 9(4). 05 DIFF PIC S9(5). PROCEDURE DIVISION. MAIN-PROCEDURE. DISPLAY "=== STARTING PROGRAM ===" OPEN INPUT INPUT-FILE PERFORM READ-NUMBERS UNTIL EOF-FLAG = 'Y' CLOSE INPUT-FILE DISPLAY "=== SORTING ARRAYS ===" PERFORM SORT-ARRAYS DISPLAY "=== CALCULATING DISTANCES ===" PERFORM CALCULATE-DISTANCE DISPLAY "=== FINAL RESULT ===" DISPLAY "TOTAL DISTANCE: " TOTAL-DIST STOP RUN.

Screenshot of main procedures in COBOL for day 1 of advent of code solution:
       READ-NUMBERS.
           READ INPUT-FILE
               AT END MOVE 'Y' TO EOF-FLAG
               NOT AT END
                   ADD 1 TO ARRAY-SIZE
                   MOVE FUNCTION NUMVAL(LEFT-NUM) TO LEFT-ARRAY(ARRAY-SIZE)
                   MOVE FUNCTION NUMVAL(RIGHT-NUM) TO RIGHT-ARRAY(ARRAY-SIZE)
           END-READ.
           
       SORT-ARRAYS.
           PERFORM VARYING I FROM 1 BY 1 
               UNTIL I > ARRAY-SIZE - 1
               PERFORM VARYING J FROM 1 BY 1 
                   UNTIL J > ARRAY-SIZE - I
                   IF LEFT-ARRAY(J) > LEFT-ARRAY(J + 1)
                       MOVE LEFT-ARRAY(J) TO TEMP-NUM
                       MOVE LEFT-ARRAY(J + 1) TO LEFT-ARRAY(J)
                       MOVE TEMP-NUM TO LEFT-ARRAY(J + 1)
                   END-IF
                   IF RIGHT-ARRAY(J) > RIGHT-ARRAY(J + 1)
                       MOVE RIGHT-ARRAY(J) TO TEMP-NUM
                       MOVE RIGHT-ARRAY(J + 1) TO RIGHT-ARRAY(J)
                       MOVE TEMP-NUM TO RIGHT-ARRAY(J + 1)
                   END-IF
               END-PERFORM
           END-PERFORM.
           
       CALCULATE-DISTANCE.
           PERFORM VARYING I FROM 1 BY 1 
               UNTIL I > ARRAY-SIZE
               COMPUTE DIFF = LEFT-ARRAY(I) - RIGHT-ARRAY(I)
               IF DIFF < 0
                   COMPUTE DIFF = DIFF * -1
               END-IF
               ADD DIFF TO TOTAL-DIST
           END-PERFORM.

Screenshot of main procedures in COBOL for day 1 of advent of code solution: READ-NUMBERS. READ INPUT-FILE AT END MOVE 'Y' TO EOF-FLAG NOT AT END ADD 1 TO ARRAY-SIZE MOVE FUNCTION NUMVAL(LEFT-NUM) TO LEFT-ARRAY(ARRAY-SIZE) MOVE FUNCTION NUMVAL(RIGHT-NUM) TO RIGHT-ARRAY(ARRAY-SIZE) END-READ. SORT-ARRAYS. PERFORM VARYING I FROM 1 BY 1 UNTIL I > ARRAY-SIZE - 1 PERFORM VARYING J FROM 1 BY 1 UNTIL J > ARRAY-SIZE - I IF LEFT-ARRAY(J) > LEFT-ARRAY(J + 1) MOVE LEFT-ARRAY(J) TO TEMP-NUM MOVE LEFT-ARRAY(J + 1) TO LEFT-ARRAY(J) MOVE TEMP-NUM TO LEFT-ARRAY(J + 1) END-IF IF RIGHT-ARRAY(J) > RIGHT-ARRAY(J + 1) MOVE RIGHT-ARRAY(J) TO TEMP-NUM MOVE RIGHT-ARRAY(J + 1) TO RIGHT-ARRAY(J) MOVE TEMP-NUM TO RIGHT-ARRAY(J + 1) END-IF END-PERFORM END-PERFORM. CALCULATE-DISTANCE. PERFORM VARYING I FROM 1 BY 1 UNTIL I > ARRAY-SIZE COMPUTE DIFF = LEFT-ARRAY(I) - RIGHT-ARRAY(I) IF DIFF < 0 COMPUTE DIFF = DIFF * -1 END-IF ADD DIFF TO TOTAL-DIST END-PERFORM.

The Day 1 #AdventOfCode solution we've all been waiting for: COBOL

65 years ago a committee met in the Pentagon to standardize a new programming language, and soon COBOL-60 was born.

Can you guess the name of the sorting algorithm used in the SORT-ARRAYS procedure?

adventofcode.com/2024/day/1

1 year ago 1 0 0 0
Advertisement
Post image

I look for commits in all sorts of programming languages, and so far throughout my research, Zig has been my favorite “new” language that not enough people are talking about.

Here were a few patterns from my Bun.sh episode that stuck out:

@ziglang.bsky.social

1 year ago 1 0 0 0
Preview
waffle tips + waffle stroke + waffle unit: auto by Fil · Pull Request #2215 · observablehq/plot unit: auto (closes waffle unit: auto #2214) waffle tips #2132 (merge commit, closes Waffle mark tooltips are always on axis line #2129) waffle stroke #2204 (merge commit closes Waffle pattern doe...

@fil.rezo.net and I are working on further improvements to the waffle mark, including better tooltips, better stroke, and a better default unit for very large or very small values. github.com/observablehq...

1 year ago 3 1 0 0
Preview
ep8 plot: waffle mark 🧇 Observable's data visualization library is full of fun little tricks, especially with this waffle mark commit

The implementation of the waffle mark in @observablehq.com’s Plot library is a lot more elegant and clever than I thought it would be: open.substack.com/pub/commithi...

#javascript #dataviz

1 year ago 29 5 1 0
Preview
ep5 zed: Improve performance of select-all-matches Speeding up Zed's select-all-matches by a factor of 250 with 75 lines of Rust

A review of a fun small commit to the @zed.dev editor that had a huge performance boost - always fun digging into commits like these. open.substack.com/pub/commithi...

1 year ago 0 0 0 0
Preview
ep7 duckdb: Add Damerau-Levenshtein string comparison function A flashy new open-source database and it's relationship to academic papers from the 60s and 70s

I had a lot of fun exploring the origins of some @duckdb.org functionality in my latest Commit History episode! open.substack.com/pub/commithi...

1 year ago 4 1 0 0

I’m looking for interesting open source projects to do an episode of my show on!

1 year ago 0 0 1 0