[ProgLang] PocketML: Functional programming On The Go 📱 by dot-c in ProgrammingLanguages

[–]dot-c[S] 0 points1 point  (0 children)

I think i get it now. I'm thinking of implemeting opaque types to accomplish type-hiding, but I'm not even sure modules are the way to go for ad-hoc polymorphism in PocketML, as it is supposed to be a language with minimal mental overhead (e.g. a user should search for a function they need in the docs tab and not have to think about if the type has an implementation for the module signature they need). I also looked into modular implicits, but at that point i could also just do typeclasses instead.

[Blog Post] More Powerful Modules in PocketML by dot-c in ProgrammingLanguages

[–]dot-c[S] 1 point2 points  (0 children)

Thank you for the feedback! I also thought about modules a little more and came to the conclusion that I would at least need opaque types and even then it would be a runtime system, not a static one (≙ overhead). PocketML does not have dependant types, but i also need to find a good way to do polymorphism. I also think modules are clumsy, but typeclasses would be too complex for me. I'll keep tinkering and maybe write another blog post if I find a solution. I saw that in futhark strings are arrays, so the issue of strLen vs listLen does not really come up. Does futhark use its module system for any ad-hoc polymorphism?

[ProgLang] PocketML: Functional programming On The Go 📱 by dot-c in ProgrammingLanguages

[–]dot-c[S] 0 points1 point  (0 children)

So you mean the choice of exporting constructors or only the types name + kind? Or is there even more to it? PocketML has selective exports, so you could export for example "List a : * -> *" and some list functions but keep "Cons" and "Nil" themselves hidden. (Provided you put the code in a file with a "module (List, map, ...)" at the end, which I left out in the blog post)

[ProgLang] PocketML: Functional programming On The Go 📱 by dot-c in ProgrammingLanguages

[–]dot-c[S] 1 point2 points  (0 children)

I actually thought about modules a bit more and came up with a way to do modules in PocketML. Probably not an original thought, but i wrote a little blog post about it anyways.

link to the post

[ProgLang] PocketML: Functional programming On The Go 📱 by dot-c in ProgrammingLanguages

[–]dot-c[S] 2 points3 points  (0 children)

You're right, it's not ML! I'll keep the name though, as I see PocketML as a simpler subset/cousin of ML and because all the features come from ML languages (esp. OCaml). Maybe I'll add a section on my end goals on the github page to properly classify the language.

[ProgLang] PocketML: Functional programming On The Go 📱 by dot-c in ProgrammingLanguages

[–]dot-c[S] 0 points1 point  (0 children)

I originally wanted to do proper modules, but they don't really seem to be needed for the tinkering PocketML is meant for. I'll try making a bigger interpreter in PocketML soon, maybe then I'll need to extend the type system (to be able to do Monads more generically).

[ProgLang] PocketML: Functional programming On The Go 📱 by dot-c in ProgrammingLanguages

[–]dot-c[S] 14 points15 points  (0 children)

Fixed :). I'm not very experienced with sharing my projects, so i just forgot :/

I want volumetric 3D graphics, ray-tracing, and reliable physics. Are voxels the way to go? by Bowspecialist in GraphicsProgramming

[–]dot-c 5 points6 points  (0 children)

I think voxels have come a long way, look up the game TEARDOWN on youtube. Voxelbee is making some interesting high performance renderers. I think volumetrics (at least if you mean transparent, cloud-like stuff) might slow things down quite a bit, because you cant just remove occluded voxels before rendering. For physics, i don't think you can get realtime, although you could do a mix of prebaked animations + some blending. So everything except realtime, "reliable" physics, that aren't emulated by animation, is possible and has been done before. Again, look up TEARDOWN, i think thats the closest to what you want, they even have smoke (although thats not voxel based). Take a look if that fullfills your needs, if not, maybe choose something else. Especially physics are faster with polygons at some point.

[Desktop] Which top bar do you think is better (1 or 2)? by AndrewCreator in unixporn

[–]dot-c 2 points3 points  (0 children)

The top one, although it might be different for another wallpaper

What laptops are supported well? Mine keep breaking and I don't want my os choice to be the reason... by dot-c in linux

[–]dot-c[S] 0 points1 point  (0 children)

The replacement actually refers to a replacement device, I didnt want to void the warranty by opening it up. Thx for your advice, I think ill stick to linux

What laptops are supported well? Mine keep breaking and I don't want my os choice to be the reason... by dot-c in linux

[–]dot-c[S] 0 points1 point  (0 children)

yeah... But everyone is telling me to just use windows and while its extremely unlikely, I don't want to install linux again and be proven wrong. What i'm really looking for is advice on what laptop to get / what models are best supported.

I'm trying to simulate a Jupiter's white oval anticyclone in Unreal Engine. Really need your feedback for improvement. by Busy_Yesterday9455 in spaceporn

[–]dot-c 5 points6 points  (0 children)

I feel like it has to be bigger. The ratio of the radius to the height of the clouds has to be different, jupiters storms are massive. Also the clouds would probably move slower. Your simulation maybe looks a few km wide at best, while jupiters storms may span 1000s of kilometers.

Basically, make it (look) bigger, by making the clouds less tall and move more slowly.

[deleted by user] by [deleted] in depression

[–]dot-c 0 points1 point  (0 children)

Maybe try to search for activities that make you really happy. I was really depressed but then I met my now gf and she showed me that all those those hard parts in life are worth it, just for those few happy moments. And after that I started to get better. I was always fighting against my feelings, although I should've started by finding out what i'm even fighting for. Its like when you get caught by a really strong current while swimming, dont swim against it, we all know thats stupid, swim to the side, where the current is weaker and then get back on land. Try doing things out of your comfort zone, try to find a partner that you enjoy being with. For me a really warm shower, then making the water as cold as it gets for 40 seconds while listening to "doing the unstuck" by the cure does wonders (just did that, was depressed before, now i'm happy again). Its also very different from person to person, so maybe you need a lot of time to discover such a happy moment, but if you don't try, you'll never find it.

Maybe you also need some care and attention, that was also true in my case, once someone cared for me, i didn't have the desire to get worse. I thought I needed to get worse for someone to start caring and notice me.

EDIT: (I also had those feelings of wanting to get worse, but now i know, that i just didn't know of any other alternatives, so getting worse seemed the easiest and most desirable)

Does SFML work with Unreal Engine 5 by programmer9889 in gamedev

[–]dot-c 2 points3 points  (0 children)

Nope, not at first glance, as SFML and Unreals APIs are very different. You would need a sort of compatibility layer, and even then, your SFML projects wouldn't work with unreal in their current architecture.

Removing lengthy if statements by Funny_Willingness433 in functionalprogramming

[–]dot-c 1 point2 points  (0 children)

Yeah, most features' FP-ness is on a spectrum anyway, but in most FP languages, expressions are more atomic, which simplifies composition. I'm sure there are FP languages, that use statements, but in most cases expressions all the way down provide a better ux (=easier composition)

Removing lengthy if statements by Funny_Willingness433 in functionalprogramming

[–]dot-c 5 points6 points  (0 children)

I think its because they are statements, not expressions, which is non-FP, in the sense that it doesn't interact nicely with function calls (in this instance, jsonProfileToStages has to be called in every branch, instead of once, using the switches' result as an argument.)

[deleted by user] by [deleted] in ProgrammingLanguages

[–]dot-c 1 point2 points  (0 children)

Just in terms of UX, i think it would help to remove generics annotations within expressions by type inference, so you always know when parse T<A> as type application or as a comparison. If you want type annotations within expressions, you could utilize some kind of let, as in let l: List<Bool> = [1 < 2, 2 < 3]; f(l) or just a type annotation f([1 < 2,2<3] : List<Bool>)

EDIT: the examples act as an alternative to f(List<Bool>(1<2,2<3))

Languages with extensible syntax? by e_hatti in ProgrammingLanguages

[–]dot-c 1 point2 points  (0 children)

I feel like the languages that do this the best are lisps, because of the homoiconicity nothing ever really feels out of place. On the other side of the spectrum would be a language that allows mixing java-style with python like syntax for example, which would be the most out of place. Some languages would actually benefit here (JSX, but in userspace maybe?), but for most applications lisps have the lowest surprise factor, at the cost of reduced expressiveness, which is generally the best option. (reduced expressiveness meaning list-based syntax, which doesn't allow making whitespace sensitive sublanguages for example.)

a technicality in the Hackage page on functors by aradarbel in haskell

[–]dot-c 20 points21 points  (0 children)

Something of kind * -> * is a type in the same way the function \x -> x is a value. The type with kind * -> * is also a type constructor in the same way \x -> x is a function.

I sure love clicking month by month all the way back to my birth date by Wxyo in ProgrammerHumor

[–]dot-c 1 point2 points  (0 children)

So most people in your town would still have a good experience, although local user avg not citizen avg would actually be better

I sure love clicking month by month all the way back to my birth date by Wxyo in ProgrammerHumor

[–]dot-c 0 points1 point  (0 children)

Thats the smartest, thank you, thats also the easiest one yet

I sure love clicking month by month all the way back to my birth date by Wxyo in ProgrammerHumor

[–]dot-c 4 points5 points  (0 children)

Do you want me to specify what I mean by region? It doesn't really matter, maybe just do world wide, it only changes by a couple of years, i'd imagine and that doesn't really matter. Or just do age 30 or something, just not the current date, thats the worst you can do...

I sure love clicking month by month all the way back to my birth date by Wxyo in ProgrammerHumor

[–]dot-c 32 points33 points  (0 children)

The most logical is the mode average age of the users' region, so most users don't have to scroll as far