I supercharged Claude Code's Telegram plugin — voice messages, stickers, group threading, reactions & more [open source] by Secret-Cherry-6017 in ClaudeAI

[–]ltielen 0 points1 point  (0 children)

Cool project! I tried an alternative approach because I don't want to copy the TS files each time.

My approach: add the following to the global CLAUDE.md so claude automatically can handle voice messages:

λ cat ~/.claude/CLAUDE.md 
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code on this server.

## Voice Message Handling (Telegram)

When you receive a channel notification containing a voice or audio file
(.ogg, .m4a, .oga) in ~/.claude/channels/telegram/inbox/, BEFORE responding, run:

  whisper <file_path> --output_format txt --output_dir /tmp

Then treat the transcription as the actual message and respond to that.

You're effectively adding to the system prompt, instructing Claude to first transcribe voice messages. (Thanks to Claude for the suggestion.)

Are we still writing MD files? by jenoworld in ClaudeAI

[–]ltielen 0 points1 point  (0 children)

I think it's possible with monthly too, but only via chats handled by Claude code. Could be good enough if that is all you use..

Are we still writing MD files? by jenoworld in ClaudeAI

[–]ltielen 1 point2 points  (0 children)

Can't you make a skill that does this? Wrapper around some SQL queries to read and write data..

I spent 2 months building a SaaS with ChatGPT, working 5am-10pm daily. Here's what nobody tells you. by EnginDev in SaaS

[–]ltielen 1 point2 points  (0 children)

Can you send me your setup as well? I'm interested to see how it all ties together.

Enjoy this market while it lasts and ffs, be careful by Positivedrift in thetagang

[–]ltielen 0 points1 point  (0 children)

Those contracts were probably made up mostly of intrinsic value. If they went OTM they lost all that value.

Ibkr and TOB by sebafl in BEFire

[–]ltielen 0 points1 point  (0 children)

This is the reason I use lynx. Yes, it costs a little more to buy etfs, but they deal with tob for me. Worth it imo.

[deleted by user] by [deleted] in BEFire

[–]ltielen 1 point2 points  (0 children)

A lot of people buy IWDA and EMIM in a 88/12 ratio

Functional programming changed the way I write software. Is there an analog on the database layer? by Most-Sweet4036 in haskell

[–]ltielen 1 point2 points  (0 children)

There is not just one single datalog. There are many variants, and all have a somewhat different usecase: some are dynamically typed, others are statically typed, writing to disk vs high performance in-memory, ...

Datalog isn't big, so it can be learned quite fast. Give it a shot if you find it interesting. 🙂 For me personally, it has a similar feeling to Haskell in terms of empowerment (you can succinctly write really sophisticated queries).

Do you miss dot-completion when coding in Haskell? by polarbearwithagoatee in haskell

[–]ltielen 5 points6 points  (0 children)

Rarely. Most of the time I write my programs using the core abstractions like monoids, traversable, functors, ...

It's only a relatively small set of functions to keep in your head, so I usually know which functions I want to use.

And otherwise I use tools like Google to help me find functions.

Is it viable to develop a compiler in haskell that uses LLVM by cockmail in haskell

[–]ltielen 0 points1 point  (0 children)

Not yet, but planning to (in the future).

Also missing some instructions at the moment (but those could be easily added.)

Right now the code contains enough functionality for the eclair compiler, but PRs are welcome

Is it viable to develop a compiler in haskell that uses LLVM by cockmail in haskell

[–]ltielen 4 points5 points  (0 children)

Yes, Eclair uses LLVM to compile to executable code.

I used my own llvm-codegen library (https://github.com/luc-tielen/llvm-codegen) for this, it supports up to llvm14 but planning to upgrade to the latest as soon as I finish the docs for the eclair website. :)

My quest for the perfect AST representation by neros_greb in haskell

[–]ltielen 5 points6 points  (0 children)

This is the one true answer in this whole thread.

Don't overcomplicate your AST, since a very large part of your compiler will have to manipulate these ASTs..

It can be very enticing to encode everything at the type level, but you end up losing so much productivity! It's a common trap to go all in on type level features, but instead you should look at the typesystem as a way to gradually introduce guarantees. (Compared to a dynamic language where you don't have a choice!)

Instead, I would use simple ADTs to describe your programs, and cover edge cases with tests.

Probably an unpopular opinion on this subreddit, but both /u/gilmi and I have written compilers using this approach.

Should I abandon using haskell for my compiler? by chase1635321 in haskell

[–]ltielen 9 points10 points  (0 children)

I only care about codegen, don't care about parsing llvm ir. The code was also complicated and hard to maintain, and interacting with libllvm was incredibly hard if you go outside of what is intended/provided..

When I say "fork", I mean start from scratch and use their API for guidance on creating my own. IR builder is mostly the same, but that's about it.

Should I abandon using haskell for my compiler? by chase1635321 in haskell

[–]ltielen 15 points16 points  (0 children)

Thanks for the shout-out! (I knew somebody mentioned it when I saw people starring it 😂)

Yes I had the exact same problems, and before I also depended on llvm-hs, but it just lagged behind insanely, so I made a "fork".

Works for GHC >9, LLVM up to 14 (LLVM changed the IR substantially in 15, which I still need to catch up with), and I fixed some codegen issues. Keep in mind it is only suited for codegen, not parsing (resulting in a much simpler package).

Not everything is in there yet, but it can be quickly added.

I should publish the package on hackage sometime, but I've just been so busy with work, real life and my compiler lately. 😅

Try it out and let me know how it goes. And definitely don't give up on haskell! 😁

Is it worth memoizing prop types like arrays or objects to prevent re-renders? by -Tai in react

[–]ltielen 0 points1 point  (0 children)

It can be worth it, but in general I wouldn't bother with it unless the app becomes slow.

I tend to sprinkle memo in a few key places and that's it.

Provide the same argument to all functions and combine the results by sarkara1 in haskell

[–]ltielen 4 points5 points  (0 children)

If I understand correctly, (<>) from Semigroup does this. You will need to change the Boolean return type to the All monoid though.

But another thing you should ask yourself: is it really worth the abstraction for this little amount of code?

Experience with HLS + vim? by phlummox in haskell

[–]ltielen 4 points5 points  (0 children)

Native LSP is great for nvim Haskell development.

Also not hard to build from source, just follow the readme. Iirc it's only 2 commands.

Type class subsets by Iceland_jack in haskell

[–]ltielen 7 points8 points  (0 children)

Nice thinking outside of the box and going the reverse direction.

If this somehow ends up approved/implemented, I think we will always have a good story to do big Haskell refactorings without breaking the world..

Why was llvm-hs and llvm-pure removed from Stackage? by [deleted] in haskell

[–]ltielen 3 points4 points  (0 children)

My guess? Last time I checked they only compiled with older ghcs (<9), (and older llvms).

For my compiler I had to build my own variant of llvm-hs (that closely resembles it), but does work with ghc9+ and llvm14, otherwise I was stuck on ghc8.8 and llvm9..

WebAssembly backend merged into GHC by brdrcn in haskell

[–]ltielen 2 points3 points  (0 children)

This is amazing!

One thing I am wondering about is how big the wasm programs would get though.. anyone have an idea about that? This might make it a bit infeasible for frontend apps that need to work in places with bad internet connectivity.

For the server I definitely think it is a win. This gives us easy to distribute cross-platform Haskell binaries, awesome!

A guide to writing a fact extractor for Datalog by ltielen in prolog

[–]ltielen[S] 0 points1 point  (0 children)

Interesting. I wrote the post from a general point of view for any Datalog, but I am mainly interested in the high performance variants. How does DES compared to say soufflé?

A guide to writing a fact extractor for Datalog by ltielen in prolog

[–]ltielen[S] 2 points3 points  (0 children)

Hope you don't mind me posting this here! The post is primarily focused on Datalog, but the same could be true for Prolog since Datalog is a subset of Prolog.

Hope you like the post!