diff --git a/go.mod b/go.mod index 2dd8da8..2f5a90d 100644 --- a/go.mod +++ b/go.mod @@ -69,12 +69,12 @@ require ( github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/samber/lo v1.49.1 // indirect - go.yarn.social/lextwt v0.1.4 + go.yarn.social/lextwt v0.1.5-0.20250328015012-42a9ffb46fea golang.org/x/arch v0.14.0 // indirect golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect golang.org/x/net v0.35.0 // indirect golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/sys v0.32.0 // indirect golang.org/x/text v0.23.0 // indirect google.golang.org/protobuf v1.36.5 ) diff --git a/go.sum b/go.sum index 4fd2f3a..2b5d58a 100644 --- a/go.sum +++ b/go.sum @@ -147,6 +147,8 @@ github.com/writeas/go-strip-markdown/v2 v2.1.1 h1:hAxUM21Uhznf/FnbVGiJciqzska6iL github.com/writeas/go-strip-markdown/v2 v2.1.1/go.mod h1:UvvgPJgn1vvN8nWuE5e7v/+qmDu3BSVnKAB6Gl7hFzA= go.yarn.social/lextwt v0.1.4 h1:3p3GNzIcumDk+hwBHT8F0ySAcdPpP/wQz2WnczSTv+o= go.yarn.social/lextwt v0.1.4/go.mod h1:JOPCOh+3bHv+BMaFZpKzw6soiXbIlZD5b2f7YKDDjqk= +go.yarn.social/lextwt v0.1.5-0.20250328015012-42a9ffb46fea h1:sbWswg5s8VaXB1hBQDs4KOBRBN2jPKtfFlcCQ3EThZk= +go.yarn.social/lextwt v0.1.5-0.20250328015012-42a9ffb46fea/go.mod h1:P36NPegLbhbFa1A0JOLsDyIQcdM0zdmx8kPKACXry4A= go.yarn.social/types v0.0.0-20250108134258-ed75fa653ede h1:XV9tuDQ605xxH4qIQPRHM1bOa7k0rJZ2RqA5kz2Nun4= go.yarn.social/types v0.0.0-20250108134258-ed75fa653ede/go.mod h1:+xnDkQ0T0S8emxWIsvxlCAoyF8gBaj0q81hr/VrKc0c= golang.org/x/arch v0.14.0 h1:z9JUEZWr8x4rR0OU6c4/4t6E6jOZ8/QBS2bBYBm4tx4= @@ -182,6 +184,8 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= diff --git a/go.work b/go.work deleted file mode 100644 index 774fc94..0000000 --- a/go.work +++ /dev/null @@ -1,6 +0,0 @@ -go 1.24.0 - -use ( - . - ../go-lextwt -) diff --git a/go.work.sum b/go.work.sum deleted file mode 100644 index 4a32e46..0000000 --- a/go.work.sum +++ /dev/null @@ -1,62 +0,0 @@ -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/badgerodon/ioutil v0.0.0-20150716134133-06e58e34b867/go.mod h1:Ctq1YQi0dOq7QgBLZZ7p1Fr3IbAAqL/yMqDIHoe9WtE= -github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= -github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs= -github.com/cloudflare/circl v1.5.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= -github.com/cosiner/argv v0.1.0/go.mod h1:EusR6TucWKX+zFgtdUsKT2Cvg45K5rtpCcWz4hK06d8= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.20/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.3.4/go.mod h1:8s/MCNJREmFK0H02MF6Ihv1nakJe4L/w3WZLHNkvlYM= -github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d/go.mod h1:C7Es+DLenIpPc9J6IYw4jrK0h7S9bKj4DNl8+KxGEXU= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/felixge/fgprof v0.9.5/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM= -github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62/go.mod h1:biJCRbqp51wS+I92HMqn5H8/A0PAhxn2vyOT+JqhiGI= -github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-dap v0.12.0/go.mod h1:tNjCASCm5cqePi/RVXXWEVqtnNLV1KTWtYOqu6rZNzc= -github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.starlark.net v0.0.0-20231101134539-556fd59b42f6/go.mod h1:LcLNIzVOMp4oV+uusnpk+VU+SzXaJakUuBjoCSWH5dM= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= -golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5/go.mod h1:8nZWdGp9pq73ZI//QJyckMQab3yq7hoWi7SI0UIusVI= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/test.txt b/test.txt index 2f17f8c..734f271 100644 --- a/test.txt +++ b/test.txt @@ -1,3 +1,7 @@ +marado@ciberlandia.pt https://tilde.pt/~marado/twtxt.txt 2025-02-14T00:10:12Z (#113999335411527656) #Clima: “A UE ateou o fogo e não pode esperar que outros países sejam os bombeiros”

(WWF quer mais da UE)

Excertos:

"As falhas que a UE tem vindo a cometer, alegam os autores do relatório, prejudicam os esforços de descarbonização e, denunciam ainda, incluem “subsídios aos combustíveis fósseis, licenças gratuitas para poluir para a indústria pesada ao abrigo do regime comunitário de comércio de licenças de emissão, a isenção de impostos para a aviação comercial[...]”."
 +
“O aquecimento a curto prazo (anual) não equivale a uma violação permanente do objectivo do Acordo de Paris de 1,5 graus Celsius, mas esta violação a longo prazo pode ocorrer em breve: segundo o Copérnico [programa europeu de monitorização do clima e atmosfera], se a tendência de aquecimento de 30 anos até Dezembro de 2020 se mantivesse, o aquecimento global atingiria uma média a longo prazo de 1,5 graus Celsius em Janeiro de 2034”, destaca o relatório do WWF. E isso trará consequências dramáticas impossíveis de ignorar."

"Entretanto, na segunda-feira, terminou o prazo oficial para os países entregarem às Nações Unidas os seus planos de redução de emissões de gases com efeito de estufa até 2035. Cerca de 95% dos países não cumpriram a sua obrigação — entre os quais a União Europeia (Portugal incluído, claro)."
 +
https://www.publico.pt/2025/02/11/azul/noticia/clima-ue-ateou-fogo-nao-esperar-paises-bombeiros-2122155 + marado https://tilde.pt/~marado/twtxt.txt 2025-03-07T21:28:04Z (#114123268718308452) First #FridayReads of #MarchMysteryMadness #2025 with Stephen Chance's "Septimus and the Minster Ghost" - the second in the series - in a Faber Finds edition. ![Stephen Chance's "Septimus and the Minster Ghost" in a Faber Finds edition: White cover, grey text surrounded by a red frame.](https://media.ciberlandia.pt/ciberlandia-media/media_attachments/files/114/123/256/548/807/431/original/f3b7dc96fb80186d.jpg) andros https://twtxt.andros.dev 2025-03-07T16:46:53+01:00 (#6c3lbxa) @ Thank you 😁 movq https://www.uninformativ.de/twtxt.txt 2025-03-07T14:14:24+00:00 (#xsrxvgq) @ Oh, so *that’s* the problem! 😅 @@ -17,4 +21,4 @@ andros https://twtxt.andros.dev 2025-03-05T18:23:59+01:00 I have released new up andros https://twtxt.andros.dev 2025-03-05T18:23:59+01:00 I have released new updates to the twtxt.el client.

- New feature: View and interact with threads.
- Optimisation of ordering for long feeds.
- Minor fixes.

In the next version you will be able to see all your mentions.

Enjoy!

#emacs #twtxt #twtxtel

![](https://activity.andros.dev/fileserver/01FQ7FH7RWJCEWS8FG7N1W26TX/attachment/original/01JNKN0KX74P6RFBH07V7E7ZBM.mp4) andros https://twtxt.andros.dev 2025-03-05T18:23:59+01:00 I have released new updates to the twtxt.el client.

- New feature: View and interact with threads.
- Optimisation of ordering for long feeds.
- Minor fixes.

In the next version you will be able to see all your mentions.

Enjoy!

#emacs #twtxt #twtxtel

![](https://activity.andros.dev/fileserver/01FQ7FH7RWJCEWS8FG7N1W26TX/attachment/original/01JNKN0KX74P6RFBH07V7E7ZBM.mp4) andros https://twtxt.andros.dev 2025-03-05T18:10:21+01:00 (#rudviwq) Oh my god! 😵 -andros https://twtxt.andros.dev 2025-03-05T18:10:21+01:00 (#rudviwq) Oh my god! 😵 \ No newline at end of file +andros https://twtxt.andros.dev 2025-03-05T18:10:21+01:00 (#rudviwq) Oh my god! 😵 diff --git a/twt-avro/helper_test.go b/twt-avro/helper_test.go index 5d56c5d..bc013b9 100644 --- a/twt-avro/helper_test.go +++ b/twt-avro/helper_test.go @@ -142,3 +142,57 @@ func TestEncodeRegistry(t *testing.T) { out.WriteTo(os.Stdout) } + +func BenchmarkEncodeDecode(b *testing.B) { + twt_avro.Register() + + registry, err := lextwt.ParseRegistry(bytes.NewReader(input)) + if err != nil { + log.Fatal(err) + } + + b.Run("avro-encode", func(b *testing.B) { + for range b.N { + _, err := twt_avro.EncodeRegistry(registry) + if err != nil { + log.Fatal(err) + } + } + }) + + b.Run("lextwt-writeTo", func(b *testing.B) { + for range b.N { + var buf bytes.Buffer + _, err := registry.WriteTo(&buf) + if err != nil { + log.Fatal(err) + } + } + }) + + + buf, err := twt_avro.EncodeRegistry(registry) + if err != nil { + log.Fatal(err) + } + + b.Run("avro-decode", func(b *testing.B) { + for range b.N { + + _, err := twt_avro.DecodeRegistry(buf) + if err != nil { + log.Fatal(err) + } + } + }) + + b.Run("lextwt-parse", func(b *testing.B) { + for range b.N { + _, err := lextwt.ParseRegistry(bytes.NewReader(input)) + if err != nil { + log.Fatal(err) + } + } + }) + +}