8 ms·
I like the idea of a compiled language that takes the look and ethos of Python (or at least the "looks like pseudocode, but runs"-ethos) I don't think the arti
by wodenokoto 1y ago
I like the idea of a compiled language that takes the look and ethos of Python (or at least the "looks like pseudocode, but runs"-ethos)
I don't think the article gives much of an impression on how SPy is on that front.
- summarity 1y agoYou can have that today with Nim.
- Imustaskforhelp 1y agoNim feels like a really amazing language. There were some minor things that I wanted to do with it. Like trying to solve a codeforces question just out of mere curiosity to build something on top of it. I felt like although it was similar to python. You can't underestimate the python's standard library features which I felt lacking. I am not sure if these were skill issues. Yes these are similar languages but I would still say that I really welcome a language like SPy too. The funny thing is that I ended up architecting a really complicated solution to a simple problem in nim and I was proud of it and then I asked chatgpt thinking no way there can be anything simpler for it in nim and I found something that worked in 7-10 or 12* lines and my jaw dropped lol. Maybe chatgpt could be decent to learn nim imo or reading some nim books for sure but the packages environment etc. felt really brittle as well. I think that there are good features of both nim and SPy and I welcome both personally.
- summarity 1y agoGPT is amazing at Nim. Ive used it to find a subtle bug in a macro that’s hundreds of lines of code.
- odie5533 1y agoThere don't seem to be great web frameworks like Flask, Django, or FastAPI for Nim.
- cb321 1y ago"Great" smells very subjective. I went to https://forum.nim-lang.org/ https://forum.nim-lang.org/ . Put "flask" in the search box. Second hit (https://forum.nim-lang.org/search?q=flask https://forum.nim-lang.org/search?q=flask) is this: https://forum.nim-lang.org/t/11032 https://forum.nim-lang.org/t/11032 . That mentions not one but 2 projects (https://github.com/HapticX/happyx https://github.com/HapticX/happyx & https://github.com/planety/prologue https://github.com/planety/prologue). If either/both are not "great enough" in some particulars you want, why not raise a github issue? (Or even better look into adding said particulars yourself? This is really the main way Python grew its ecosystem.)
- walterlw 1y agoI believe that Python is as popular and widely used as it is because it's old enough to have an expansive ecosystem of libraries. It's easy enough to implement one in pure Python and possible to optimize it later (Pydantic is a great recent-ish example, switching to a Rust core for 2.0). That same combination of Python + (choose a compiled language) makes it quite difficult for any new language to tap into the main strength of Python.
- rangerelf 1y agoIt's not just its age, it's how easy it is (was?) to jump in and start writing useful code that could be revisited later on and be able to read it and understand it again. All of these efforts to turn it into another Typescript are going to, in the end, kill the ease of use it has always had.
- ReflectedImage 1y agoPython is popular because of it's expansive ecosystem of libraries, which only exist because the language is duck typed. If it was statically typed, the expansive ecosystem of libraries wouldn't exist. There is a factor of 3x difference in dev speed between the two typing systems.
- greener_grass 1y agoThis is what F# provides. F# has a similar whitespace syntax to Python, but is statically typed and can be compiled AoT. Bubble sort Python: mylist = [64, 34, 25, 12, 22, 11, 90, 5] n = len(mylist) for i in range(n-1): for j in range(n-i-1): if mylist[j] > mylist[j+1]: mylist[j], mylist[j+1] = mylist[j+1], mylist[j] print(mylist) Bubble sort F#: let mylist = ResizeArray [ 64; 34; 25; 12; 22; 11; 90; 5 ] let n = Seq.length mylist for i = 0 to n - 2 do for j = 0 to n - i - 2 do if mylist[j] > mylist[j + 1] then let temp = mylist[j] mylist[j] <- mylist[j + 1] mylist[j + 1] <- temp printfn "%A" mylist
- deleted 1y ago[deleted]
- stOneskull 1y agoNim: var mylist = [64, 34, 25, 12, 22, 11, 90, 5] let n = mylist.len for i in 0..n-2: for j in 0..n-i-2: if mylist[j] > mylist[j + 1]: swap(mylist[j], mylist[j + 1]) echo mylist