Live data from Hacker News

Create React apps using Kotlin

github.com

61–68 of 68 posts

Re: Create React apps using Kotlin

#61

How is the debugging experience? Is there a debugging experience? I'm currently a typescript user and I like what VS code has going on with attaching to chrome and providing debugging within the ide. Source maps are okay but a seamless experience in the source language is better. Does the kotlin IDE have facilities for debugging what is going on in the browser?

You can debug the app in IntelliJ IDEA (and in the browser) and put the breakpoints in the Kotlin code, thanks to the source maps. It's kind of similar to what you get when debugging TS in VS Code, WebStorm or IJ: the IDE will open Chrome and connect to it. But it's not possible to avoid source maps – to debug you still need to compile the app to JS to run in the browser.

Re: Create React apps using Kotlin

#62
post #7

Can I use this outside IntelliJ (Atom perhaps)? I despise JavaScript, GWT is underwhelming and Kotlin seems like a nice way to bypass these issues + React is becoming a de-facto standard. IntelliJ became too big/slow/feature creeped and I am not having good time with the latest code completion changes, so I am considering dropping it (PyCharm as well) for something more light-weight.

> React is becoming a de-facto standard The Vue.JS community would beg to differ. But yeah, if JetBrains could implement something like the Rust Language Server for Kotlin I would be so happy.

Beg to differ it can, but as it stands the statement is correct.

http://www.npmtrends.com/angular-vs-react-vs-vue-vs-@angular...

Even more so when you consider that Vue itself is a React clone underneath. Templates compile directly into createElement calls internally and if you'd strip off Vue's outward complexity, the api surface, the syntax parsers, the observable system, etc., what would remain is React.

Re: Create React apps using Kotlin

#63

Does this mean that Kotlin -> React -> React Native is feasible too? It's a bit ridiculous on its face, but is there a better way to run Kotlin on iOS? Kotlin is a godsend for Android but if you have to support both platforms one codebase is better

There's an announcement and some example code for building iOS apps with Kotlin/Native here, including reusing some of the code across iOS and Android:

https://blog.jetbrains.com/kotlin/2017/11/kotlinconf-keynote...

Re: Create React apps using Kotlin

#64
post #15
post #13

Earlier quoted context omitted.

I am happy JetBrains became a full-blown real software company (where I count only companies with their own programming language) instead of aping Atlassian (their main competitor), and Kotlin has some interesting ideas. They are closest to Borland we have these days; independent small company with quality development tools. Though the code completion quality dropped so much lately (e.g. in PyCharm it became complete…

I wouldnt go as far as comparing them to borland Remember that the community edition is open source They are an open company and do offer a lot completly for free Borland was .. a very traditional closed company

>> Borland was .. a very traditional closed company

One of the great things about Borland was they published the source code to their VCL (their main platform library Delphi and C++ builder applications used). So you could read, learn from, troubleshoot and debug with the source code. At a time when Microsoft and most companies didn't.

And the VCL design patterns were/are incredibly elegant, and studying them an excellent and accessible way for an interested programmer to learn some real software architecture skills.

Re: Create React apps using Kotlin

#65

Earlier quoted context omitted.

Being a grumpy old man: it's not programming if I can't set a breakpoint.

You've obviously never done embedded systems programming. Try debugging timing issues with a breakpoint.

Does Apple ][ 6502 assembler count?

Re: Create React apps using Kotlin

#66
post #52

Earlier quoted context omitted.

You've obviously never done embedded systems programming. Try debugging timing issues with a breakpoint.

Actually, how do you debug those? If you put in a breakpoint, use DTrace & co or do logger output, you won't likely hit the issue. I did this with super low-level distributed systems and they were mostly resolved by hard thinking and modeling execution path in my head...

You've got the process figured out :)

Reason through the code. Sometimes, reason through the output assembler (in case the C code is making invalid assumptions). Stare at oscilloscope traces. Think really hard about what's happening, come up with a hypothesis, and test that hypothesis.

The hypothesis testing part is key. I've worked with embedded developers who "fix" a bug by making a code change, but can't at all explain why the change is likely to fix the bug. In many cases, the reason it seems to fix the bug is that it changes the timing just enough so that the bug happens less frequently, but without having a really solid causal explanation, it likely just means that it's going to be even harder to find the bug when it pops back up again.

Re: Create React apps using Kotlin

#67
post #52

Earlier quoted context omitted.

You've obviously never done embedded systems programming. Try debugging timing issues with a breakpoint.

Actually, how do you debug those? If you put in a breakpoint, use DTrace & co or do logger output, you won't likely hit the issue. I did this with super low-level distributed systems and they were mostly resolved by hard thinking and modeling execution path in my head...

With great difficulty and annoyance.

Once when developing with the 8051 family (using a development board that included a debugger), the program worked perfectly on the dev board, but when I burned it onto EEPROM, a subtle timing issue with a peripheral caused the program to fail. Much frustration ensued; had to develop that section with a long winded code->compile->burn->test cycle. Then we found out the particular 8051 variant we were using had been discontinued :(

Re: Create React apps using Kotlin

#68

Earlier quoted context omitted.

What's the fix to config mgmt jitter, entropy? Every time I set aside a few hours to do a React tutorial, I'm defeated by the stack. I'm very late to docker. I always liked the idea, but didn't have the immediate need. But Python, trying to fix bugs in someone else's project, has now made that need urgent. After spending WAY TOO MUCH TIME getting the exact right constellation of stuff installed. Switching from macpor…

Can you clarify what you mean by "defeated by the stack"? Are you having trouble setting up a React development environment? If you want to try using React without any build tooling or process at all, the main suggestions are: - Use an online IDE like https://codesandbox.io , which is a complete online editor that lets you write React apps, view them in the browser, and even make use of NPM packages . CodePen and Sta…

Belated reply, sorry. I've bookmarked this for later. Great links, thanks.
Post reply on HN