HackerTrans
TopNewTrendsCommentsPastAskShowJobs

soegaard

no profile record

Submissions

Show HN: Command line tool for viewing files in color

soegaard.github.io
1 points·by soegaard·hace 3 meses·0 comments

RacketCon 2025 – Live Stream

boxcast.tv
3 points·by soegaard·hace 9 meses·0 comments

RacketCon (fifteenth) October 4-5, 2025

con.racket-lang.org
9 points·by soegaard·hace 9 meses·5 comments

comments

soegaard
·hace 17 días·discuss
In DrRacket mark the section (with shift+arrows) then use tab or shift+tab.
soegaard
·hace 17 días·discuss
Looks like a real conference - but the first thing you see is a large image of Rick Astley ?!
soegaard
·el mes pasado·discuss
> I LOATHE the fact that you traverse lists and vectors in completely different ways

In Racket:

    (for ([x xs]) (displayln x))
This works for `xs` being a sequence, which includes lists and vectors.

Making the type explicit generates faster code:

    (for ([x (in-list   xs)]) (displayln x))
    (for ([x (in-vector xs)]) (displayln x))
soegaard
·hace 2 meses·discuss
The version Microsoft used is discontinued. However, you can just buy a license of the new product.

https://www.wiris.com/en/mathtype/
soegaard
·hace 2 meses·discuss
Agree. It got the ball rolling.
soegaard
·hace 2 meses·discuss
Don't you need parens here?

    (local.get 0)
    (local.get 1)
soegaard
·hace 2 meses·discuss
FWIW if you are looking for examples of WebAssembly written in the textual format, take a look at:

https://raw.githubusercontent.com/soegaard/webracket/refs/he...

As a small example, here is a definition of `$car` which extracts the first value from a pair.

    (func $car (type $Prim1) 
               (param $v (ref eq)) 
               (result (ref eq))
      (if (result (ref eq)) 
          (ref.test (ref $Pair) (local.get $v))
          (then (struct.get $Pair $a (ref.cast (ref $Pair) (local.get $v))))
          (else (call $raise-pair-expected (local.get $v))
                (unreachable))))
soegaard
·hace 3 meses·discuss
This was a great article and inspired me to add support for binary files in `peek`.

https://soegaard.github.io/peek/#%28part._binary-files%29

For me the key insight is that similar values should get similar colors. And since Fx and 0x are "similar" the color palette should be cyclic.
soegaard
·hace 3 meses·discuss
Yes.
soegaard
·hace 3 meses·discuss
Skim

https://andykeep.com/pubs/dissertation.pdf

Also see the this text:

https://www.cs.umd.edu/class/fall2025/cmsc430/Notes.html
soegaard
·hace 3 meses·discuss
Nanopass uses structures internally to represent the programs.

The Nanopass dsl just gives the user a nicer syntax to specify the transformations.
soegaard
·hace 3 meses·discuss
An Incremental Approach to Compiler Construction

Abdulaziz Ghuloum

http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf

Abstract

Compilers are perceived to be magical artifacts, carefully crafted by the wizards, and unfathomable by the mere mortals. Books on compilers are better described as wizard-talk: written by and for a clique of all-knowing practitioners. Real-life compilers are too complex to serve as an educational tool. And the gap between real-life compilers and the educational toy compilers is too wide. The novice compiler writer stands puzzled facing an impenetrable barrier, “better write an interpreter instead.”

The goal of this paper is to break that barrier. We show that building a compiler can be as easy as building an interpreter. The compiler we construct accepts a large subset of the Scheme programming language and produces assembly code for the Intel-x86 architecture, the dominant architecture of personal computing. The development of the compiler is broken into many small incremental steps. Every step yields a fully working compiler for a progressively expanding subset of Scheme. Every compiler step produces real assembly code that can be assembled then executed directly by the hardware. We assume that the reader is familiar with the basic computer architecture: its components and execution model. Detailed knowledge of the Intel-x86 architecture is not required.

The development of the compiler is described in detail in an extended tutorial. Supporting material for the tutorial such as an automated testing facility coupled with a comprehensive test suite are provided with the tutorial. It is our hope that current and future implementors of Scheme find in this paper the motivation for developing high-performance compilers and the means for achieving that goal.
soegaard
·hace 4 meses·discuss
I misread it too.
soegaard
·hace 4 meses·discuss
Loved the examples!
soegaard
·hace 5 meses·discuss
This is pretty small.

http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html
soegaard
·hace 5 meses·discuss
If you are into continuations, check Friedman's papers on ReadScheme.

https://github.com/schemedoc/bibliography/blob/master/page6....

In particular look at "Programming with Continuations", "Engines Build Process Abstractions" and "Continuations and Coroutines".
soegaard
·hace 5 meses·discuss
https://docs.racket-lang.org/rkt-tree-widget/index.html
soegaard
·hace 6 meses·discuss
I need to study the stack-switching proposal in more detail.

However, I don't see an obvious way of attach and probe continuation marks to the continuations (including the current one).

I am not an expert in continuation marks, so I'll just link to this presentation by Matthew Flatt (which you probably already know).

https://github.com/WebAssembly/meetings/blob/main/stack/2021...
soegaard
·hace 6 meses·discuss
Yes. I am following the Scheme tradition of representing immediate values as tagged pointers. And (ref i31) is the obvious choice when using WebAssembly. I am happy you and the team added GC to WebAssembly.

Details on the representation.

https://github.com/soegaard/webracket/blob/main/compiler.rkt...

I am more or less only using the linear memory for the JavaScript FFI. FASL-encoded values are passed back and forth to JavaScript.
soegaard
·hace 6 meses·discuss
> Is Racket bytecode different?

Changes to the bytecode representation were indeed rare also in Racket.

The Whalesong project was written as part of a dissertation - and when people graduate and get jobs, projects are often abandoned.