Skip to content

Instantly share code, notes, and snippets.

@raiph
raiph / .md
Last active February 17, 2024 23:12
Raku's "core"

Then mathematical neatness became a goal and led to pruning some features from the core of the language.

— John McCarthy, History of Lisp

If you prefer programming languages with a tidy and tiny core, you're in for a treat. This article drills down to the singleton primitive at the heart of Raku's metamodel ("model of a model") of a model of computation ("how units of computations, memories, and communications are organized")1.

The reason I've written this article

It began with u/faiface's reddit post/thread "I'm impressed with Raku"2. One of their sentences in particular stood out for me:

================
What I'm starting with
================
Toshiba Satellite Pro C50-A-1E0
4GB RAM
455GB drive
DVD RW drive
Celeron 1005M @ 1.9GHz, 64 bit
@raiph
raiph / trans.md
Last active January 22, 2021 22:33
trans DWEM

What this is

My documentation of P6's .trans routine for anyone who reads it.

It may be a step toward updating the official doc and/or cleaning up the relevant spec tests and/or functionality.

I have tried to be clear enough that a future me will be able to make sense of it, and hopefully anyone else who reads this.

It's supposedly exhaustive (definitely exhausting!).

@raiph
raiph / gist:5c6ce5013ff4918eab1060472de4d891
Created January 19, 2017 23:07
One body shared by multiple signatures (Tentative proposal for 6.d)
This is one of several gists I've written that relate to several distinct tentative proposals for 6.d that make sense both independently and together.
This gist discusses a long conjectured feature that would work nicely with the other proposals:
Others include:
* [Implicit/explicit mutation in 6.c]().
----
@raiph
raiph / gist:2714c5decbc9463dd095
Created December 20, 2014 05:35
BBCode grammar
grammar BBCode {
regex TOP { (<para> | <code>)* }
regex para { [\N+ [\n|$]]+ [\n|$] }
regex code { '[code]' .* '[/code]' <.ws> }
}
BBCode.parse: Q:to[END];
[code]
a := f()
[/code]
@raiph
raiph / gist:11267503
Last active August 29, 2015 14:00
bracket pairs, with thanks to ven https://gist.github.com/paulp/10885699
ASCII: ( ) [ ] { }
Full width variant:( ) [ ] { }
White variants: ⦅ ⦆ 〚 〛 ⦃ ⦄
Common Western quotation: “ ” ‘ ’ ‹ › « »
Asian:「 」 〈 〉 《 》 【 】 〔 〕 ⦗ ⦘
Asian white variant:『 』 〖 〗 〘 〙
Half width variant: 「 」
Math: ⟦ ⟧ ⟨ ⟩ ⟪ ⟫ ⟮ ⟯ ⟬ ⟭
Decorative: ❛ ❜ ❝ ❞ ❨ ❩ ❪ ❫ ❴ ❵ ❬ ❭ ❮ ❯ ❰ ❱ ❲ ❳
Vertical: ⏜ ⏝ ⎴ ⎵ ⏞ ⏟ ⏠ ⏡
@raiph
raiph / gist:5079034
Created March 4, 2013 00:16
Covering gap in #perl6 IRC log 3/2/2013 noon thru 3/3/2013 7am
[2013-03-02 07:00:30] -!- mberends [~martin@171-87-143-37.ftth.glasoperator.nl] has quit [Quit: Leaving]
[2013-03-02 07:04:57] <moritz> r: say (1, 2, 3).Array.[0] = 42
[2013-03-02 07:04:59] <p6eval> rakudo 40069f: OUTPUT«42␤»
[2013-03-02 07:06:43] <FROGGS> jnthn: I thought I pulled before that, sorry for the accusation :o)
[2013-03-02 07:07:51] -!- _ilbot [moritz@faui2k3.org] has quit [Remote host closed the connection]
[2013-03-02 07:08:53] <jnthn> FROGGS: np :)
[2013-03-02 07:09:45] -!- kaare__ [~kaare@94.191.203.192.bredband.3.dk] has joined #perl6
[2013-03-02 07:09:48] -!- moritz [moritz@ssh.faui2k3.org] has quit [Remote host closed the connection]
[2013-03-02 07:12:43] -!- moritz [~moritz@p579E998F.dip.t-dialin.net] has joined #perl6
[2013-03-02 07:13:36] -!- kivutar [~kivutar@jol13-2-82-235-181-242.fbx.proxad.net] has quit [Quit: Ex-Chat]
@raiph
raiph / gist:3734995
Created September 17, 2012 00:41
HTML showing odd cell coloring of Moritz's irclogger display
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="description" content="IRC LOG for channel #perl6" />
<link rel="stylesheet" type="text/css" href="/style.css" title="Irclog Stylesheet" />
<link rel="shortcut icon" href="/moose1.ico" type="image/x-icon" />
<link rel="canonical"
href="/perl6/2012-09-17" />
@raiph
raiph / gist:3732447
Created September 16, 2012 13:24
Feedback for Moritz about irclogger changes

What about “Communal logmarks”? To logmark a line that isn’t already logmarked, click it’s time field. From now till someone or something unhighlights it, that line will be highlighted for you. And for everyone else. It’s a communal logmark. Anyone (or anything) can click again to unhighlight.

Original gist below, with couple minor edits.

Feedback for Moritz about irclogger changes

Even if you do nothing else…

I am very happy you’ve done what you’ve done. I say the prognosis just sharply improved for #perl6 summaries, my carpal tunnel pain, and your irclogger software!

@raiph
raiph / irclog-summarizer
Created September 7, 2012 03:13
irclog summarizer
Strawman design for a summarizer version of Moritz's irclogger.
Phase 1
-------
Call the web display that you (Moritz) have currently implemented at
http://irclog.perlgeek.de/perl6/today "Full mode" or Full for short.
"Summarizer mode" is as it sounds like you (Moritz) have in a branch --
a similar display to Full but with a "Summaries checkbox" against