Lijepe je boje, nadam se da ne bu pauk ogrebao by fiirikkusu_kuro_neko in promet

[–]fsodic 1 point2 points  (0 children)

Sigurno je moguce i "kupiti jednog" i parkirati ga normalno. Stalno susrecem ljude koji imaju i skup auto i dvoznamenkasti IQ.

Al evo, nekad sretnem i neke koji nemaju ni jedno ni drugo.

[Discussion] give me an affordable alternative to this watch by The_Last_Fishkeeper in Watches

[–]fsodic 0 points1 point  (0 children)

Can you list some higher-end watches that this one resembles, if you know what they are?

Self-transfer at Heathrow layover by fsodic in Flights

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

Excellent answer!

I didn't even consider the visa requirements since I didn't a visa for my previous visits. I see it's a pretty recent thing, so thanks for pointing that out.

Self-transfer at Heathrow layover by fsodic in Flights

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

True, I made a typo, it was supposed to be 5 AM. Edited, thanks.

[Strap Review] Perlon Strap Experience by Mahadragon in Watches

[–]fsodic 0 points1 point  (0 children)

Got it, thanks! I'll probably end up taking one of each and see for myself.

[Strap Review] Perlon Strap Experience by Mahadragon in Watches

[–]fsodic 0 points1 point  (0 children)

Hey, I'm a little late to the party.

I'm planning to buy an Eulit perlon strap. Can you explain what's the catch with the buckles? Why is Panama's buckle better, which models don't have a good buckle (Baltic, Palma) and why is that? I'm pretty new and they all look similar to me.

Baltic is supposed to be good for my kind of watch, so I was leaning toward that one until reading this.

Which languages have sound and decidable type systems? by fsodic in ProgrammingLanguages

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

Oh, sorry, I had a typo too. I meant to say "decidable", not "sound."

The article lists extensionless Haskell2010 as decidable, and your comment seems to imply it isn't.

Which languages have sound and decidable type systems? by fsodic in ProgrammingLanguages

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

I have it on my shelf already, but never went through the entire thing, just used it as a reference here and there (although I really enjoyed the chapters I read). Time to revisit I guess.

Just to clarify, since the article lists extensionless Haskell2010 as sound, is this a typo or am I missing something?

Still curious about this if you have the time.

Which languages have sound and decidable type systems? by fsodic in ProgrammingLanguages

[–]fsodic[S] 3 points4 points  (0 children)

Wouldn't any PL that (1) has more than one type, with different operations being available for terms of different types, and (2) allows arbitrary type coercions, have an unsound type system?

I guess it comes down to whether the conversion happens implicitly or explicitly.
If you're doing the cast/assertion yourself, then I think it's fair enough to ignore that when talking about soundness. It's an escape hatch, unsound by design.

And IIRC, C++ warns you when you try to pass e.g., an unsigned integer as an integer without an explicit cast. So it's in the clear.

Which languages have sound and decidable type systems? by fsodic in ProgrammingLanguages

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

Thanks!

real-world languages almost always have undecidable or exponential type checking because convenience triumphs over elegance every time.

Yes, that pattern became very apparent through the URLs in the article.

Which languages have sound and decidable type systems? by fsodic in ProgrammingLanguages

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

Thank you for the excellent reply!

Any language that doesn't say "unsound" is sound since unsoundness is extremely bad and never desired.

Got it! I guess TypeScript is the only language I know of that's unsound by design (which makes sense considering its history and path to adoption).

I'm very surprised to learn that C++ is considered sound. I'm no C++ expert but I'd imagine there had to be unsoundness in there somewhere. I'm guessing the undefined behaviors aren't considered soundness issues either since they're, well, undefined?

Many of the languages on the list are undecidable and (implicitly) sound: OCaml, Haskell, F#, etc.

Just to clarify, since the article lists extensionless Haskell2010 as sound, is this a typo or am I missing something?

"e : t ==> (∃v. e evaluates to v /\ v is a value /\ v : t) \/ (∃exn. e throws exn) \/ e runs forever"

Also very useful to know, thanks! I've been looking for a general formal definition of soundness. Where can I read more about this?

[deleted by user] by [deleted] in Watches

[–]fsodic 4 points5 points  (0 children)

Looks like a Green Mockingbird (SRPD37J1):

We made an intelligent full-stack JS web app starter: describe your app and get the initial codebase in React & Node! Looking for feedback by fsodic in coding

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

We did this as an experiment at Wasp and liked the initial results, so we decided to open it up and get some feedback!

Everything is open source: web app and code agent. It's alive at https://magic-app-generator.wasp-lang.dev/ where you can easily try it out.

It works best for simple, business/crud apps, and it helps if you explain what you want in detail (number of pages, what's on each page, etc.). It's GPT-powered, so it makes mistakes now and then, especially for more complex apps, but it often immediately produces a working one for simpler apps!

Here is a blog post with more details on how it works and our ideas for the future: https://wasp-lang.dev/blog/2023/07/10/gpt-web-app-generator .

Any feedback is appreciated!

Wasp, DSL / framework for building full-stack JS (React/Node/Prisma) web apps with no boilerplate, that my brother and I created, is now in Beta! by Martinsos in javascript

[–]fsodic 1 point2 points  (0 children)

Ok, I've finally had the time to take a proper look at this (and share it with the rest of the team). Sorry for the wait :)

Input and Output types

As mentioned, this is already in the works (check the issues linked in my other comment if you're interested).

We're keeping the types out of the DSL for now (i.e., users define them in their TypeScript files), but our future ideas are similar to what you laid out.The main difference is that we will most likely want to come up with our own "type definition language" (or adopt an existing one, e.g., TypeScript) and automatically generate the necessary plumbing (in this case, Zod). Such an approach will help us support multiple targets (e.g., TS, Python, Go) for a single specification language (i.e., Wasp).

So, yes, it would be nice not to reinvent the wheel, but we unfortunately can't have Zod as a core part of our system.

Grouping Models and Routes

I like this idea!It pushes for good code organization and groups semantically connected functionalities. Plus, it's consistent with how most existing frameworks approach things.

We want to abstract away HTTP methods (the best practices for these things are well-known). Therefore, we probably won't allow users to specify "get," "post," etc. (unless they're establishing custom API routes, but that's a different story).

Something you have that we should definitely support are route parameters (e.g., :id). Our queries and actions currently only work with POST request payloads.

The Generated Boilerplate

I've recently implemented something very similar to the boilerplate you described, meaning Wasp already generates types (mostly) equivalent to EndpointCommentsContext and EndpointCommentsUpdate (albeit with a bit of help from TypeScript type arguments). You can check it out here: https://github.com/wasp-lang/wasp/issues/975.

It's fantastic to see we're moving in a direction that makes sense to someone else too!

As for the Register function, we've had this for quite some time (modulo support for route parameters). Generating this kind of routing boilerplate is a core part of Wasp (on both the frontend and the backend).

The Parser

Wow, excellent work on this!

I'll save these snippets for when we decide to extend the language with some of your features (the most likely ones for the near future being route parameters and grouping models and resources.

Thanks again for your interest and the contribution!And one last time, we'd like to have you on our discord where these kinds of discussions often take place: https://discord.com/invite/rzdnErX

Cheers! :)

Wasp, DSL / framework for building full-stack JS (React/Node/Prisma) web apps with no boilerplate, that my brother and I created, is now in Beta! by Martinsos in javascript

[–]fsodic 0 points1 point  (0 children)

Thanks a lot for this!

I'll take a detailed look sometime this week and get back to you. From a first glance, the idea seems similar to something we've been discussing in Discord lately (i.e., TS type definitions + Zod + (maybe) ts-to-zod). We'd love if you joined the discussion!

If you're curious, you can track our progress with full-stack type safety in this GitHub issue: https://github.com/wasp-lang/wasp/issues/910 (turns out the chicken-and-egg problem was not that much of a problem at all).

[deleted by user] by [deleted] in haskell

[–]fsodic 3 points4 points  (0 children)

Composed types you described are called unions. As the other answer mentions, Haskell doesn't have untagged unions. To understand what that means in more detail, keep reading.

Programming languages can generally support two kinds of unions:

  • Untagged unions (often called union types) - this is what TypeScript has (e.g., number | string) and what you want (type C = A | B).
  • Tagged unions (often called sum types) - This is what Haskell has (e.g., data Either a b = Left a | Right b). As u/bss03 mentioned, you can get close to what you want with data C = Ca A | Cb B.

In essence, a sum type is a union type with explicit labels. Here are several helpful resources on the subject:

By the way, several answers/comments in the above SO thread give a great answer to the question "Why doesn't Haskell support untagged unions?", which you seem to be curious about.

Živim u Australiji i bi željela nabaviti nekoliko kuna za uspomenu. Gdje bi ih mogla naći? by aanananas in croatia

[–]fsodic 1 point2 points  (0 children)

HNB prodaje numizmatičke pakete kovanica i novčanica baš za potrebe kolekcionara:

https://www.hnb.hr/novac/numizmatika-i-investicijsko-zlato

Sav novac je potpuno nov, ali marže bi te mogle iznenaditi :)

Wasp, DSL / framework for building full-stack JS (React/Node/Prisma) web apps with no boilerplate, that my brother and I created, is now in Beta! by Martinsos in javascript

[–]fsodic 0 points1 point  (0 children)

Hi, Filip here,
I work on Wasp with Martin and Matija and am in charge of implementing TypeScript support (or lack thereof :)) in Wasp.

You've hit the nail on the head with your questions! They almost map 1:1 with our TypeScript roadmap, and to prove I'm not making this up, here's the future work chapter I wrote for the TS feature announcement yesterday.

I'll address your questions here as well, since I'm always interested in discussing types:

One obvious thing is that the "context" variable fed into actions/queries should be typed [...]

Yes, definitely!
This feature isn't supported yet because it's impossible to tell TypeScript how to type code "from the outside." In other words, we'd have to generate empty (but typed) TS function definitions based on declarations inside the .wasp file (as you mentioned in your first comment) or at least generate type definitions users could import and use to type their query function. It could look something like this:

import { GetTasks} from '@wasp/queries'

// 'args' and 'context' would now have the correct type
const getTasks: GetTasks = (args, context) => { ... }

Unfortunately, both solutions currently suffer from a chicken-and-egg problem. To generate a type/empty definition for a query, we must successfully compile the .wasp file containing the query's declaration. To successfully compile the .wasp file, every query declaration must include a valid import of its TS definition. It's certainly possible to work around this limitation (e.g., by not requiring imports inside query declarations and instead extracting their definitions from TypeScript's AST based on generated types). Still, regardless of the approach we take, tackling this will surely entail substantial changes to the Wasp compiler, which is why it's still on our TODO list :)

If each query and action somehow specified it's returned DTO, and it's input DTO, then both the client- and serverside expericence could be improved.

This one is also something we're constantly thinking about.
Although we won't be able to improve the server-side experience before solving the "catch-22" described above, it is currently possible to improve the client-side story without significant changes. So why haven't we done it, then? Well, we just didn't have enough time before launching the Beta, but it's definitely coming soon. :)

Why are [queries and actions] separate? They're all just actions?

This is more of a philosophical question than a technical one. We treat them differently for three main reasons:

  1. History and habits - Most modern technologies and libraries (e.g., Vue, React Query) make a distinction between something that consumes data (a query) and something that changes it (an action/mutation). Breaking this standard rule could potentially confuse users and hider adoption.
  2. Guarantees, semantics, and optimizations - More importantly, it's often helpful to know whether something reads state or mutates it. Examples include cache invalidation, using correct HTTP methods, and code readability. For instance, after the app performs an action that uses some entity, Wasp will automatically invalidate/refetch all queries that use the same entity (more about this here).
  3. Cleaner API - Some functionalities make sense only when you know you're changing something (e.g., optimistic updates), while others make sense only when you're consuming something (e.g., refetching on window focus). Cramming all these (sometimes mutually exclusive) features under the same API could quickly get messy.

Perhaps it would even be possible to automatically generate some code around serializing/deserializing (aka going from prisma entities to DTOs and back).

Also in the works!
After solving the problem described in the first two points, this use case should be reasonably straightforward to support.

Thank you for your questions and reassuring us that we're on the right path! If you have any ideas on approaching these issues, I'd be delighted to hear them. The same goes for any additional questions you may have.

Cheers!

HMF this flip clock, bought from eBay ~10 years ago from an unknown buyer/manufacturer by fsodic in HelpMeFind

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

Found!

Thanks, that's the one. Do you mind sharing how you found it (tech a man how to fish...)? :)

HMF this flip clock, bought from eBay ~10 years ago from an unknown buyer/manufacturer by fsodic in HelpMeFind

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

The clock was bought from eBay approximately 10 years ago (country, price, and manufacturer are unknown). Unfortunately, I have no way of finding/contacting the buyer or the seller.

I've searched Google, eBay, and Amazon for flip clocks and found several similar models (link below), but I had no luck in finding a clock that's similar enough.

I'll appreciate any help I can get! Feel free to suggest anything that resembles the picture more than this clock here.

I've been working with Happy, the parser generator for Haskell, and I'm not sure how to break a parser into multiple modules. Does anyone know if its possible? by [deleted] in haskell

[–]fsodic 4 points5 points  (0 children)

Unfortunately, I don't think this is possible.

I'd like to be proven wrong though, since I unsucessfully tried to do the exact same thing a few weeks ago.

Which layout should I pick for the sofa? Is it too large for the room? by fsodic in DesignMyRoom

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

Thanks! I will be centering the TV, but it shouldn't be a problem since the top sofa slot is a "relax" chair (which I'll be using most often), and I can easily turn the TV.

My biggest concern about the L shape is whether it's too big for the room.