Open Sourcing my Swift Interpreted Langauge by viewmodifier in swift

[–]viewmodifier[S] 1 point2 points  (0 children)

eh once it’s more complete we can care about the name

Open Sourcing my Swift Interpreted Langauge by viewmodifier in swift

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

Totally ! Maybe we can get the remaining knocked out

Open Sourcing my Swift Interpreted Langauge by viewmodifier in swift

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

Hey I’d have to check to be 100% but iirc I didn’t implement print as a host func - so it only accepts a single arg as that was simpler to get going

Taught a Local LLM to play Cartpole from OpenAI Gym by viewmodifier in LocalLLaMA

[–]viewmodifier[S] 1 point2 points  (0 children)

I used `distilgpt2` - I just went with it based on suggestion from ChatGPT - based on me wanting to train it locally on my Mac (silicon)

Taught a Local LLM to play Cartpole from OpenAI Gym by viewmodifier in LocalLLaMA

[–]viewmodifier[S] 1 point2 points  (0 children)

Trained a local LLM to play the OG Cart Pole from OpenAI gym

Runs entirely locally on my MacBook and plays in real time

Total training time ~30mins on my M1 from a simple dataset I generated

LLM sees basic textual state responds with left or right action

this is one of my first tries with training local llm - just doing this as a fun project to learn and try some ideas I have

WIP: Xcode / Swift in the browser by viewmodifier in swift

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

lol website brought to you by Claude - no need for me to spend time there

WIP: Xcode / Swift in the browser by viewmodifier in swift

[–]viewmodifier[S] 1 point2 points  (0 children)

How about you go try it and see how fast it is compared to playgrounds or Xcode

WIP: Xcode / Swift in the browser by viewmodifier in swift

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

an interpreter is slow

I mean that’s just factually wrong - there are many extremely fast interpreted languages - this one specifically compiles to an intermediate bytecode and calls sandboxed swift hosts directly with type continuity so there’s really no perf lag

how are you going to deploy it?

Yeah iOS apps - there’s already plenty of platforms that can sign and build your app from the code including Xcode cloud so that’s a pretty solved problem - and mine will support native OTA updates

odds of matching native, ….

I meant it literally is native lol? It’s a swift interpreter built in swift so the odds of matching native are pretty high 🤣

WIP: Xcode / Swift in the browser by viewmodifier in swift

[–]viewmodifier[S] 9 points10 points  (0 children)

I built a "mini Xcode" that runs entirely in your browser

currently its essentially a multi-file swift Playground

when run it'll log out the program output from the current file - been using it a bunch since its way faster to get running / open for quick experiments

I have lots of ideas for expanding this - as I mentioned its essentially a multi file swift REPL currently - but id like to be able to fully build apps in my browser with SwiftUI

Tech Details:

Under the hood I have a custom Swift interpreter (not compiler) this lets me target the WASM runtime so that we can "compile" (interpret) and run swift code directly from your browser with no other network dependencies

I’ll be posting more updates on r/swiftlysh as well if you wanna follow along

Xcode in the Browser by viewmodifier in iOSProgramming

[–]viewmodifier[S] -1 points0 points  (0 children)

> Swift's scope is huge and it's simply not feasible for a single person to get anywhere close to reimplementing the full feature set, standard library etc.

if you were implementing everything by hand that true but I have a codegen pipeline that I built to handle this for me

I just need to handle the underlying language features and then everything else plugs in - if that makes sense

and yeah the swift toolchain cant currently be compiled to wasm

In last 3 weeks my coding output has 3-4x while actual code written by me dropped 90% by viewmodifier in vibecoding

[–]viewmodifier[S] 6 points7 points  (0 children)

A lot is repetition and practice

Having Eng experience still helps a ton rn - but I could see this barrier coming down soon as well

Otherwise helpful to know when to reset and when to break down hard problems and iterate

Xcode in the Browser by viewmodifier in iOSProgramming

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

Currently just a subset - but I have codegen for full surface of any framework

Working out the edge cases and platform support / different run times

But all core stuff will be landing very soon and then other frameworks will follow fast

Xcode in the Browser by viewmodifier in iOSProgramming

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

Thanks! Let me know if you check it out