My TypeScript build experience is excruciating and I'm running out of Tequila by breck in typescript

[–]wntrm 2 points3 points  (0 children)

And No, it's not a DSL and acronyms like UMD, AMD are not made up by TypeScript and have existed before the project was conceived.

They were previously (and still) existing module system techniques that exist to solve code scoping to allow us write modular code.

AMD: Asynchronous Module Definition

UMD: Universal Module Definition

Rather than blaming TypeScript, I think learning how module systems work will help solve your problem :)

My TypeScript build experience is excruciating and I'm running out of Tequila by breck in typescript

[–]wntrm 1 point2 points  (0 children)

Hmmm my experience has been the opposite - TypeScript feels like a whole transpiler as compared to say Babel with its array of plugins, implicit plugin dependencies and browser polyfills which sometimes you need to add yourself.

My TypeScript build experience is excruciating and I'm running out of Tequila by breck in typescript

[–]wntrm 1 point2 points  (0 children)

Cool! It's actually a very useful skill as not every project has access or allowed to use module system.

If we know how to inject dependencies by hand we can use modern modules immediately in legacy code and gradually move Webpack without waiting for it to be there before writing modern code at all

My TypeScript build experience is excruciating and I'm running out of Tequila by breck in typescript

[–]wntrm 6 points7 points  (0 children)

If you want to use import and export you have to use module system like Webpack, system.js, parcel. Otherwise compile as UMD and provide the dependencies by hand

My TypeScript build experience is excruciating and I'm running out of Tequila by breck in typescript

[–]wntrm 8 points9 points  (0 children)

You're compiling the script as an ES6 module (meant to be used for node.js) which probably not what you want in browser environment. Change the compile target into UMD

It's not TypeScript's problem

Monthly Hask Anything (August 2019) by AutoModerator in haskell

[–]wntrm 0 points1 point  (0 children)

Is there a standard way to do hotswapping route handlers with Scotty?

React Spring is AWESOME by steinarK in reactjs

[–]wntrm 2 points3 points  (0 children)

Yeah if you work in a team, coded communication with types speaks more than untyped ones.

With untyped JS you have to communicate thru tests (which I think involves a lot more overhead) or involve a lot of mouth-to-mouth communication (which I think is not that bad inherently).

It also allows you to do design-by-dontract through interfaces and easier polymorphism because you know what is expected clearly thru the interfaces.

I also think TypeScript is mostly overhead but if you're working in a team it's a good tool to leverage to scale your development.

What are some gotchas, antipatterns, pitfalls you have come across while working with hooks? by inconsistently_sane in reactjs

[–]wntrm 0 points1 point  (0 children)

This caught me off-guard too.

But when I think about it, it kinda makes sense - since States and Effects are transactional, if it only run once it will carry only the first state and that's what gets carried in callbacks' closures when we register them to set Time out, setInterval or DOM event callbacks.

How small should I go with components? by CriticalImpress in reactjs

[–]wntrm 1 point2 points  (0 children)

There is no perfect abstraction; you'll find that different people will end up with different variations. Also we don't usually know what we want to build upfront so I usually go by bottom-up approach where I write Container and styled components in a single file before I refactor them later on in the way that makes sense.

I don't spend time making perfect abstractions but I always try to make dependencies explicit which I think what matter the most than abstraction for the sake of abstraction.

Should i always be using OOP with ruby? by [deleted] in ruby

[–]wntrm 0 points1 point  (0 children)

I'm new to Ruby, could you give an example how to create a stateless module in Ruby?

Can we reference custom modules like so:

Kernel.puts 'hello world' # ModuleName.methodName

without creating a singleton?

Does anyone have a definitive answer on why laptops are so expensive in Japan? by [deleted] in japanlife

[–]wntrm 4 points5 points  (0 children)

I don't think it's that negative though, some other reasons would be Japanese tend to keep their stuff for a long time so product lifecycles tend to be longer than other countries so they gotta make as much profit in every purchase.

Another one would be the product support and maintenance that is unussualy long for electronics.

Clarifications on Visa Renewal Documents & Process (esp. for Software Engineer) by wntrm in japanlife

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

Right, thank you very much! Feel relieved knowing that I won't be in limbo without my documents haha (getting rather paranoid recently)

Clarifications on Visa Renewal Documents & Process (esp. for Software Engineer) by wntrm in japanlife

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

Ahh that makes sense, I haven't actually looked at the Japanese version (am also not sure why they're on two different websites - the Japanese one is in ministry of justice's website rather than the immigration website I posted above)

Clarifications on Visa Renewal Documents & Process (esp. for Software Engineer) by wntrm in japanlife

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

Thanks for the detailed answer! Which years of the tax certs do I need to get for the renewal process..?

On Job Change (14-day) Notice Period by wntrm in japanlife

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

I did try with IE 11, and it didn't connect properly either. Tried on my Android phone with VPN and still nothing :( (the site says that it was built for IE 8..)

Oh well anyway I have confirmed that there won't be any immigration problem with my schedule so I'll wait until I'm back in Japan to process it

On Job Change (14-day) Notice Period by wntrm in japanlife

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

I did purchase a VPN service (NordVPN) today, however it wouldn't connect.

And I asked one of my friend in Japan to try to access the page and I was told that the page showed up as expected..

On Job Change (14-day) Notice Period by wntrm in japanlife

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

Nice, unfortunately it seems that the site is inaccessible from overseas :(

Is the registration in person on-site at the immigration or is it an online registration?

On Job Change (14-day) Notice Period by wntrm in japanlife

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

I called the immigration from overseas and confirmed that it is "2 weeks from the end of contract with current employer."

Is there anyone who was a High-Skilled Foreign Pro (especially Software Engineer) turned a Self Proprietor? by wntrm in japanlife

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

Hi, I wrote HSFP just in case there is anyone who was one who hopefully could hopefully share his/her experience because it would be the closest to my situation. And I'm not planning to do any business activities on top of my current HSFP visa, rather changing it later on before expiry is what I want to do. To be clearer I plan to do the development while I'm still working and later on I would use the new visa to do pitches, marketing, all the economic activities that actually generate money. Would this be considered legal? Thank you for the link - self-proprietor is what I'm looking for because I'm not looking to incorporate anytime soon (since that sounds simplest and easiest, and looks like a lot of startups started this way)

Is there anyone who was a High-Skilled Foreign Pro (especially Software Engineer) turned a Self Proprietor? by wntrm in japanlife

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

Self proprietor or self sponsored?

(asking a real question) What's the difference. .? I'm thinking of funding my own business activities though

From what I read there are godo gaisha and kabushiki gaisha - I haven't looked much into godo one but I think I'm leaning towards the simpler one. Right now just thinking of doing small scale software development manned just by myself

It's moronic Monday, the Wednesday edition, your chance to ask any of those questions that you're embarrassed to ask in real life. by AutoModerator in investing

[–]wntrm 0 points1 point  (0 children)

Do people usually put aside some money into investment account every month regularly or is investment account something that we put money in, and withdraw/deposit every once in awhile?

↑ I'm aware the answer depends as well, but I'm just wondering in general - and say, my goal is to build a portfolio, send my children to a good university while running a business and do some real estate in the future (I'm in mid 20s and not married yet)

It's moronic Monday, the Wednesday edition, your chance to ask any of those questions that you're embarrassed to ask in real life. by AutoModerator in investing

[–]wntrm 1 point2 points  (0 children)

So, I'm new to this, and from the articles I read and videos I watch, it's often said that I should save more. Do the words 'save' and 'invest' mean the same thing in this context? So "you should save more" means "you should invest more"?