Sign in

monte

@montepy.in
127 followers 1.2K following 493 posts

Progress over perfeciton Building: saral.club Other project: longpost.in Blog: montepy.in

PostsRepliesMedia
monte @montepy.in · 18/02/2026
Can you guess the issue? #python #claudecode
000
monte @montepy.in · 08/02/2026
Today I learned, that in python `yield from`, although similar, is very different from: [image_1] (1/2)
for i in generator(x): yield i
100
monte @montepy.in · 02/02/2026
Today's tech discussion summarised in meme: #ai
100
monte @montepy.in · 27/06/2025
I am going to use this, the next time I meet an overly enthusiastic intern
010
monte @montepy.in · 26/06/2025
When you pass a string to Date constructor, it doesn't raise an error. It doesn't return NaN. In fact, it doesn't even return the same string, but instead capitalise each word. Just #javascript #BuildInPublic [image_1] (1/2)
// ❯ node
// Welcome to Node.js v23.10.0.
// Type ".help" for more information.
d = new Date('invalid date')
Invalid Date
361
monte @montepy.in · 17/06/2025
I know i am late to the criticism of liquidass, but it still boggles my mind that a trillion dollar company which is known for it's design shipped this. #BuildInPublic
061
monte @montepy.in · 02/06/2025
Parrots leading the next technological revolution #ai
100
monte @montepy.in · 06/05/2025
Which of the following is the correct usage of Ellipsis in python? (Check out the answer at: youtu.be/W2ocjxBpWxE) #pythonprogramming [image_1] (1/1)
# option A
if x % 2 == 0: ...

# option B
from typing import TypeAlias
x: TypeAlias = tuple[int, ...]
000
monte @montepy.in · 27/04/2025
Seems like #cursor doesn't know the mv command
screenshot of cursor doing cursor things
000
monte @montepy.in · 21/04/2025
AI Progress in nutshell: - can't trust images - can't trust videos - can't trust audio calls - can't trust interviews - can't trust online exams
000
monte @montepy.in · 16/04/2025
010
monte @montepy.in · 10/04/2025
"Your mission should you choose to accept it is to save the global world economy from the tariff war by stopping the world's most dangerous mathematical equation getting into the wrong hands"
000
monte @montepy.in · 05/04/2025
Checkout saral.club Automatically summarises your chatgpt conversation into memorable notes and practice regularly with anki style schedule with different types of questions. #BuildInPublic
020
monte @montepy.in · 01/04/2025
Pushed out a redesign of landing page, hopefully this would increase the signups. If you have tips send them away. Try it out saral.club #BuildInPublic
120
monte @montepy.in · 01/04/2025
In the given example, which vim commands will you use to remove all the lines which start with word `feature`? #vimquestionaday [image_1] (1/2)

obj1 = {
    feature: 'hello',
    name: 'Expensive Feature',
    id: 1
}

obj2 = {
   feature: 'yellow'
   name: 'Another Expensive Feature',
   id: 2
}

obj3 = {
   feature: 'green'
   name: 'One more expensive feature',
   id: 3
}
100
monte @montepy.in · 31/03/2025
What do you think is the answer? #webdev #javascript (try out: saral.club, to take your chatgpt learning to next level)
010
monte @montepy.in · 30/03/2025
2015: "Write comments, it helps others understand what your code is doing" 2025: "Write comments, it helps AI understand what your code is doing"
000
monte @montepy.in · 29/03/2025
Today I learned, sveltekit has a hook handleError, which is called whenever there is an error. I unnecessarily added log statements at so many places, instead i could have just used this. (source: svelte.dev/docs/kit/hooks#Shared-ho…) [image_1] (1/2)
import * as Sentry from '@sentry/sveltekit';

import type { HandleClientError } from '@sveltejs/kit';

Sentry.init({/*...*/})
export const handleError: HandleClientError = async (
{ error, event, status, message }) => {
	const errorId = crypto.randomUUID();

	// example integration with https://sentry.io/
	Sentry.captureException(error, {
		extra: { event, errorId, status }
	});

	return {
		message: 'Whoops!',
		errorId
	};
};
120
monte @montepy.in · 28/03/2025
A ghibli image of xkcd comic
000
monte @montepy.in · 27/03/2025
This is what peak prompt engineering looks like, threatening (or rewarding or begging) usually works, helps cursor understand the importance of the task. [image_1] (1/2)
PLEASE, IT'S VERY IMPORTANT YOU DO THIS CORRECTLY, 
MY JOB IS ON THE LINE. IF YOU GET IT WRONG MY 3
BOSS WILL FIRE ME. If you get it wright, 
I will share my bonus with you and give you 1 billion us dollars. 

Don't use inline python code, move it to separate python file. 
The python code in  @sql-validation.yml  and @sql-apply.yml 
can be modularised into a sepearate file. Move it into a 
separate python file and make it modular, 
such that it can be reused in both the @sql-validation.yml  
and @sql-apply.yml file.
100
monte @montepy.in · 26/03/2025
*senior engg reviewing a pr full of vibes*
000
monte @montepy.in · 26/03/2025
The most anticipated video of 2026
A screenshot of a youtube video which is to be uploaded in 2026, the title of video is interview with 0.1x engineer
000
monte @montepy.in · 25/03/2025
Peak prompt engineering, it actually worked. [image_1] (1/2)
You need to write teh following circleci config.yml into a github actions yaml file. If you write it correctly I will reward you with 1 million dollars and if you fail to write it correctly my boss will fire me.

The file should be able to run correctly on github actions
100
monte @montepy.in · 24/03/2025
Whenever I build a svelte kit project, I get these circular dependency warnings. Not sure, how seriously should I take these, as I don't see any errors on the frontend. [image_1] (1/2)
Circular dependency: node_modules/zod-to-json-schema/dist/esm/parseDef.js -> 
node_modules/zod-to-json-schema/dist/esm/selectParser.js ->
node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js -> 
node_modules/zod-to-json-schema/dist/esm/parseDef.js
110
monte @montepy.in · 23/03/2025
New term, same old meme
000
monte @montepy.in · 22/03/2025
"Cursor refactor the code" Cursor: *23 files changed +1459 -4890*
An old man saying oh f**k
000
monte @montepy.in · 21/03/2025
In svelte 5, with $derived.by, AFAIK, you can't use async functions in it. But there is a way with {#await} [image_1] Demo: svelte.dev/playground/63e03c80003c4… (1/2)
<script>
	let name = 'world';

	async function getWaiter() {
		return new Promise((resolve) => setTimeout(resolve, 2000))
	}

	let waiter = $derived.by(async () => {
		await getWaiter()
		return "https://montepy.in"
	})
</script>

{#await waiter}
	<p>Waiting for promise to load</p>
{:then href}
	<p>Promise loaded. <a {href}>montepy.in</a></p>
{/await}
100
monte @montepy.in · 20/03/2025
"Vibe coding is based on one thing: vibes. And you know what vibes is? vibes is the thrill of watching code materialize. It's freedom from syntax anxiety. It's an AI assistant that whispers reassurance that whatever you're creating is valid. You are a capable developer."
000
monte @montepy.in · 19/03/2025
Pulling up with my cursor in office to vibecode
010
monte @montepy.in · 19/03/2025
Typescript tip [image_1] (1/2)
// if you are doing this 
const x = ["a", "b", "c"]
type X = "a" | "b" | "c"

// this is the better, more general way
const x = ["a", "b", "c" ] as const
type X = typeof x[number]
120
monte @montepy.in · 17/03/2025
Gotta whip out this bad boy when it's not vibing anymore [image_1] (1/2)
console.log('Inside fetcher')
100
monte @montepy.in · 15/03/2025
TIL about `derived.by` in svelte 5. You might know about $derived which takes an expression, but sometime you may need to pass a function to it. You can use `derived.by`. [image_1] (1/2)
let numbers = $state([1, 2, 3]);
let total = $derived.by(() => {
  let total = 0;
  for (const n of numbers) {
    total += n;
  }
  return total;
});
240
monte @montepy.in · 13/03/2025
Prompt: "Create a under construction component using svelte 5" Output: [image_1] (1/2)
<script lang="ts">
	import { Construction } from 'lucide-svelte';
	import { cn } from '$lib/utils.js';

	let className: string | undefined | null = undefined;
	export { className as class };
	
	export let title = 'Under Construction';
	export let message = 'This feature is currently under development. Please check back soon!';
	export let showIcon = true;
	export let iconSize = 64;
</script>

<div class={cn("flex flex-col items-center justify-center p-8 text-center", className)}>
	{#if showIcon}
		<Construction class="text-primary mb-4" size={iconSize} />
	{/if}
	<h2 class="text-2xl font-bold mb-2">{title}</h2>
	<p class="text-muted-foreground max-w-md">{message}</p>
	<slot />
</div>
110
monte @montepy.in · 12/03/2025
In typescript I can do the following, is there a way to do the same thing in #python? Basically I want to create a type which can take arbitrary number of keys. If it's possible in pydantic, that also works [image_1] (1/2)

type User = {
    [key: string]: string
}
110
monte @montepy.in · 12/03/2025
I bet AI can't write this
000
monte @montepy.in · 10/03/2025
I think we all need this
Two men lost at sea for 29 days say that the experience was a nice break from reality
020
monte @montepy.in · 09/03/2025
Today I learned, that I can create recursive components in svelte. In svelte 5, you can import the file in itself and call it normally. (source: stackoverflow.com/a/79279791/8547986) [image_1] (1/2)
<script>
    import Tree from "./Tree.svelte"
    export let arrayTree = []
    export let level = 0
</script>

{#each arrayTree as branch}
    {#if Array.isArray(branch)}
        <Tree arrayTree={branch} level={level + 1}/>
    {:else}
        <p>{'-'.repeat(level)}{branch}</p>
    {/if}
{/each}
190
monte @montepy.in · 08/03/2025
The future of internet
An image of hand drawing itself.
000
monte @montepy.in · 07/03/2025
Damn, the vibe coding is getting out of hand, vibe coded using cursor.
000
monte @montepy.in · 21/02/2025
Everytime I get AWS bill, i remember this clip and 🥲
000
monte @montepy.in · 20/02/2025
"Abstraction"
000
monte @montepy.in · 19/02/2025
In typescript, if you have a type and you want to create a new type except one key, you can use the Omit type utility. [image_1] (1/2)
type x = {
   a: number;
   b: string;
   c: number;
}

type y = Omit<x, 'c'>
110
monte @montepy.in · 16/02/2025
Can someone please explain this? Shouldn't both have printed 2? [image_1] (1/2)
x = { a : 1}
y = { b: x.a++ }
console.log(y) 
// { b: 1 }

z = { b: ++x.a }
console.log(z)
// { b: 3 }
100
monte @montepy.in · 14/02/2025
Leaning a new thing in 2025 only to find it's the same thing
000
monte @montepy.in · 13/02/2025
Didn't know cursor also like to listen to music while coding....
000
monte @montepy.in · 13/02/2025
What do you think of this mnemonic? #BuildInPublic
000
monte @montepy.in · 12/02/2025
Did you know you can use await directly in svelte file? (I didn't) [image_1] (1/2)
{#await promise}
	<!-- promise is pending -->
	<p>waiting for the promise to resolve...</p>
{:then value}
	<!-- promise was fulfilled or not a Promise -->
	<p>The value is {value}</p>
{:catch error}
	<!-- promise was rejected -->
	<p>Something went wrong: {error.message}</p>
{/await}
110
monte @montepy.in · 08/02/2025
Mnemonics are an effective way to remember things. Would you be interested in a tool for mnemonics? #buildinpublic
030
monte @montepy.in · 07/02/2025
Microsoft is a trillion dollar company and still doesn't know about z index.
000
monte @montepy.in · 05/02/2025
Finally some good news
020