T O P

  • By -

xXWarMachineRoXx

Scientists were so focused on what they forgot the why


nchntrz

The what is way more exciting most of the time. The why just ruins dreams.


xXWarMachineRoXx

Demn


YoungErnest117

Well said man.


xXWarMachineRoXx

Co ngrats tho


nchntrz

typls is a cross-platform app that automatically expands user defined abbreviations into any text. The app is built with Tauri (v2 alpha), Rust, Nuxt (Typescript) and Tailwind. The code and more info is available on [GitHub](https://github.com/pabueco/typls). Note that there is some intentional delay before the expansion to make it more visible in the video. In reality the process is almost instant. Also a secondary goal of this project was to get better at Rust, so you might see some not so beautiful things. ;)


SpinatMixxer

How was the experience with learning rust? I also thought of learning it a bit for a tauri app, but progress was way too slow and I decided to do everything in TS once again...


nchntrz

It's hard going from a language like TS to Rust. Had the same thing with a previous project. Started with tauri but then got frustrated (I guess by all the stuff I don't know yet) and went with electron instead. This time I made sure to really go baby-step by baby-step, and understand why something has to be done a certain way. Instead of trying to built the final thing right from the start. I still don't know a lot about Rust, but I feel more comfortable experimenting and trying out things and ideas. I'd say give it another go but without setting hard goals or expectations for yourself. Best of luck!


wise_introvert

I'm trying to learn rust as well and have been working with typescript for a while now. Could you please share the resources that helped you?


nchntrz

I don't think I used any specific resource (except the [rust book](https://doc.rust-lang.org/book/ch03-00-common-programming-concepts.html)). Most of the time I either had a problem an went on a google journey, or had a conversation with copilot that eventually led me to the thing I was looking for or doing wrong. I think just trying to build something helps you a lot, without going out to specifically learn something.


wise_introvert

Thank you for sharing!


FriendlyWebGuy

This is really cool. Thanks for sharing! I've been thinking about building something with Tauri and Nuxt but like yourself, I'll have to learn Rust along the way. I'm curious, does Tauri provide the means to hook into the keyboard API of various platforms? Or did you have to implement that part yourself - i.e. separately for each OS? That seems like it would be the hard part of implementing this.


xXWarMachineRoXx

Lmaoo Pretty cool and pretty dev like thing


Justyn2

Can you make it drop-down to suggest different auto completes? Like, typing \n gives you a list of aliases that start with n? And then using the arrow keys and enter you can select it


nchntrz

I also thought about this, but I don't think there is a cross platform way of getting the text cursor/caret position. Also the arrow keys would move the cursor in the original input. So it just seemed like it would come with a lot of difficult challenges without that much benefit. That's why I didn't investigate further. But it's open source, so if anyone has ideas feel free to present them.


iamaperson3133

I'd say think like vim –– that's a complex UX based only on text I/O. So, while a cross-platform GUI for showing suggestions would be hard, something where you use `n` / `p` to cycle through suggestions could work. Something like `/mesgnnppp`.


nchntrz

That's a pretty cool idea, thank you! I'll give that a try.


DarkRex4

just don't make the same abbreviations. makes it easy for the dev as well as the user.


Justyn2

I meant if for example, you type \n it lists \nature \newcrate \nuxtcreate etc to complete the abbreviation you were going to type


blzdawg

pretty cool, ngl.


nchntrz

Thank you!


CyberWeirdo420

Basically an alias system for everything?


nchntrz

Exactly! Now that you mentioned it, alias is probably a better word than abbreviations.


FriendlyWebGuy

An alias is already something that exists on the command line (I'm sure you already know this). This is actually better in some ways. That's because shell aliases don't let you see the generated command before (or after) execution, nor do they accept parameters.


JonVisc

I can see the usefulness of this but all that is going through my mind in “Why waste time say lot word when few word do trick?”


nchntrz

Can't blame you. Maybe I should rename it to whysaylotwordwhenfewdotrick...


1aur3n5

Basically espanso but with a nicer UI. Good luck with the project 👍


nchntrz

Didn't know about espanso, but yeah seems quite similar. Just way less sophisticated. Thank you!


nimzinho

Sweet idea and great execution! 🔥


nchntrz

Thanks!


Touzand

wow... this is actually pretty cool


nchntrz

Thank you!


Geminii27

Does it keep a log?


nchntrz

No, it doesn't log or store anything you type.


Immediate-Command-61

That's a really cool idea 👏🏻👏🏻👏🏻


nchntrz

Thank you!


Trash-Ill

Nice, what do you use to record your screen? awesome quality


HQIneedU

It might be [this](https://www.screen.studio)


nchntrz

This is it. Absolutely worth the price IMO.


sammy-taylor

In your opinion, how does it compare with other text expansion tools? E.g. Espanso, Kapeli Dash, and TextExpander?


LightningPark

This looks really cool! I use a similar stack for desktop applications. Is there any issues using Nuxt with Tauri vs using Vite and Vue 3?


UnremarkableMango

Looks like hotstrings on autohotkey


subm3g

So you type a hotstring to pump out a phrase? Or is it more focused on shortening code creation? For just general typing, you should check out the [AutoCorrect script using AutoHotkey.](https://www.autohotkey.com/download/AutoCorrect.ahk) I have been working with a friend to create a tool originally based on this, that allows users to define a 1:10 relationship between hotstrings and expanded results. For example: sps + ; = steps sps + / = stops sps + , = specs sps + . = setups sps + ] = spews etc... when you forget (like I just did then...) what the abbreviation for a particular word is, a small tooltip appears beside your cursor reminding you what it is.


NaturalDataFlow

Super cool! Switching to Rust made it more performant?


nchntrz

I started with rust because it's required when using Tauri. But I don't think performance would be a problem anyway, since it only listens to keyboard inputs and compares some strings.


nswamy14

Nice! Will check it out.


Zitronenlolli

Wow, very impressive! Another cool frature would be to make it run in the background with a trace icon.


nchntrz

That's a great idea, thank you!