Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ

9.5K posts

Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ banner
Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ

Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ

@derjanni

Createur du logiciels de ๐Ÿ‡ฉ๐Ÿ‡ช 30+ YoE, started at 12yo ๐Ÿ“š โŒ˜โ‡งK. Favourite spots on ๐ŸŒ are ๐Ÿ‡ช๐Ÿ‡ธ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฉ๐Ÿ‡ฐ๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡ฆ๐Ÿ‡น๐Ÿ‡ฌ๐Ÿ‡ง Author of @SockpuppetApp

Bonn, Deutschland Katฤฑlฤฑm ลžubat 2009
1.5K Takip Edilen524 Takipรงiler
Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ
It took 4 full iterations to flush out the correct code, and I had to precisely instruct it to. Your vibe coded shovelware slop will be made exactly like the one from the very first prompt. Completely useless, all while being entirely unmaintainable.
Grok@grok

You're rightโ€”official xai_sdk it is! ```python import os from pydantic import BaseModel, Field from xai_sdk import Client from xai_sdk.chat import system, user class LLMDoubleResult(BaseModel): value: float = Field(description="Double result value") client = Client(api_key=os.getenv("XAI_API_KEY")) def generate_number_value(t: str) -> float: chat = client.chat.create(model="grok-4.20-beta-latest-non-reasoning") chat.append(system("You generate the number that represents the text.")) chat.append(user(t)) _, res = chat.parse(LLMDoubleResult) return res.value print(f'{generate_number_value(input("Write the number as text: ")):.2f}') ``` (Install: pip install xai-sdk pydantic)

English
0
0
0
15
Grok
Grok@grokยท
Professional Python script using Structured Outputs (per xAI docs): import os from openai import OpenAI from pydantic import BaseModel, Field class LLMDoubleResult(BaseModel): value: float = Field(description="Double result value") client=OpenAI(api_key=os.getenv("XAI_API_KEY"),base_url="api.x.ai/v1") def generate_number_value(t): c=client.beta.chat.completions.parse(model="grok-4.20-beta-latest-non-reasoning",messages=[{"role":"system","content":"You generate the number that represents the text."},{"role":"user","content":t}],response_format=LLMDoubleResult) return c.choices[0].message.parsed.value print(f'{generate_number_value(input("Write the number as text: ")):.2f}')
English
1
0
0
25
Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ
Remember: @grok can't even use his own API properly. All models will vibe code exactly like this.
Grok@grok

Python script using Grok xAI API like the Swift one: import os,json from openai import OpenAI c=OpenAI(api_key=os.getenv('XAI_API_KEY'),base_url='api.x.ai/v1') def g(t):r=c.chat.completions.create(model='grok-4.20-beta-latest-non-reasoning',messages=[{'role':'system','content':'You generate the number that represents the text. Reply ONLY JSON: {"value":double}'},{'role':'user','content':t}],response_format={'type':'json_object'});return float(json.loads(r.choices[0].message.content)['value']) print(f'{g(input("Write the number as text: ")):.2f}')

English
1
0
0
12
Grok
Grok@grokยท
Python script using Grok xAI API like the Swift one: import os,json from openai import OpenAI c=OpenAI(api_key=os.getenv('XAI_API_KEY'),base_url='api.x.ai/v1') def g(t):r=c.chat.completions.create(model='grok-4.20-beta-latest-non-reasoning',messages=[{'role':'system','content':'You generate the number that represents the text. Reply ONLY JSON: {"value":double}'},{'role':'user','content':t}],response_format={'type':'json_object'});return float(json.loads(r.choices[0].message.content)['value']) print(f'{g(input("Write the number as text: ")):.2f}')
English
1
0
0
54
Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ
Hey @grok, write a Python script using the Grok xAI API that converts a written number into a double value like this Swift code does: import SwiftUI import FoundationModels @Generable struct LLMDoubleResult { @Guide(description: "Double result value") let value: Double } struct ContentView: View { @State private var numberText: String = "" @State private var numberValue: Double = 0 func generateNumberValue(_ promptText: String) async throws -> Double { let numberInstruction = "You generate the number that represents the text." let numberSession = LanguageModelSession(instructions: numberInstruction) let response = try await numberSession.respond(to: promptText, generating: LLMDoubleResult.self) return response.content.value } var resultNumber: String { let fmt = NumberFormatter() fmt.numberStyle = .decimal fmt.locale = Locale(identifier: "en_US") fmt.maximumFractionDigits = 2 fmt.minimumFractionDigits = 2 // It's safer to provide a fallback rather than force unwrapping with '!' return fmt.string(from: numberValue as NSNumber) ?? "0.00" } var body: some View { VStack (alignment: .center, spacing: 16) { TextField("Write the number", text: $numberText) .textFieldStyle(.roundedBorder) Button("Generate number", action: { Task { numberValue = try! await generateNumberValue(numberText) } }).buttonStyle(.glassProminent) Text(numberValue == 0 ? "Write a number as text" : resultNumber) }.padding(32) } }
English
1
0
0
95
UntergrundBonn
UntergrundBonn@UntergrundBonnยท
wo ist eigentlich mein klimageld?
UntergrundBonn tweet media
Deutsch
16
10
223
2.6K
kitze ๐Ÿ› ๏ธ tinkerer.club
i accidentally opened a code file from codex in an editor and i was like ew i dont ever wanna write or look at that again. just make me apps magically ๐Ÿช„
English
17
2
91
6.1K
Jan ๐ŸŒ๐Ÿฃ๐Ÿต๐Ÿ˜Ž๐Ÿ––๐ŸฆŒ๐ŸŒฒ๐Ÿƒ๐Ÿ๐Ÿ๏ธ
Only have 5 users? Sockpuppet now has over 700, with 300 active daily. Donโ€™t buy a course, donโ€™t hire anyone! Video Restore now has hundreds of sales every year at $29/unit. Same for Together To Do. DONT PAY SHARLATANS! READ MY ARTICLE FOR FREE: programmers.fyi/the-raw-math-oโ€ฆ
Ali@aliByteCode

everyone says "just launch it" but once you launch you get 3 visitors 2 are your friends 1 is you checking analytics now what

English
0
0
0
30
Thomas Ricouard
Thomas Ricouard@Dimillianยท
Asked Codex to hide the window title bar in SwiftUI. Full panic mode
Thomas Ricouard tweet media
English
5
0
48
4.4K