HackerTrans
TopNewTrendsCommentsPastAskShowJobs

soegaard

no profile record

Submissions

Show HN: Command line tool for viewing files in color

soegaard.github.io
1 points·by soegaard·3 bulan yang lalu·0 comments

RacketCon 2025 – Live Stream

boxcast.tv
3 points·by soegaard·9 bulan yang lalu·0 comments

RacketCon (fifteenth) October 4-5, 2025

con.racket-lang.org
9 points·by soegaard·9 bulan yang lalu·5 comments

comments

soegaard
·17 hari yang lalu·discuss
In DrRacket mark the section (with shift+arrows) then use tab or shift+tab.
soegaard
·18 hari yang lalu·discuss
Looks like a real conference - but the first thing you see is a large image of Rick Astley ?!
soegaard
·bulan lalu·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
·2 bulan yang lalu·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
·2 bulan yang lalu·discuss
Agree. It got the ball rolling.
soegaard
·2 bulan yang lalu·discuss
Don't you need parens here?

    (local.get 0)
    (local.get 1)
soegaard
·2 bulan yang lalu·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
·3 bulan yang lalu·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
·3 bulan yang lalu·discuss
Yes.
soegaard
·3 bulan yang lalu·discuss
Skim

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

Also see the this text:

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

The Nanopass dsl just gives the user a nicer syntax to specify the transformations.
soegaard
·3 bulan yang lalu·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
·4 bulan yang lalu·discuss
I misread it too.
soegaard
·4 bulan yang lalu·discuss
Loved the examples!
soegaard
·5 bulan yang lalu·discuss
This is pretty small.

http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html
soegaard
·5 bulan yang lalu·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
·5 bulan yang lalu·discuss
https://docs.racket-lang.org/rkt-tree-widget/index.html
soegaard
·6 bulan yang lalu·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
·6 bulan yang lalu·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
·6 bulan yang lalu·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.