News for hackers. Stuff that matters.

ola

Show HN: Go RPC with automatically generated TypeScript client

https://github.com/turborpc/turborpc

This is a tiny Go package that is kind of a mix between tRPC[0] and Go's standard library net/rpc[1].Like net/rpc the package provides access to the exported methods of an object across HTTP and like tRPC it creates a typesafe TypeScript (or JavaScript with JSDoc annotations) client that can be used by a frontend.[0] https://trpc.io[1] https://pkg.go.dev/net/rpc

( Read More... | no comments | on HN )
Re:How Twitter poisoned politics on Friday October 05, 2018 @02:09PM (#18150333)
I phrased that badly, these aren't individuals inside the company but people we play against or play with if we don't have enough for full teams.
Re:How Twitter poisoned politics on Friday October 05, 2018 @01:33PM (#18150016)
It's not only Twitter or politics. I've been playing some Heroes of the Storm as team building with my company and when we are not a full team the toxicity can get intense, with some people going far beyond just in match flaming to harassing with death and rape threats in direct messages long after the match is over.

Mind you this in a no-stakes free to play game and the phenomenon seems common. Sometimes I think our culture is not ready for a substantial part of our communication not to be face to face.

Re:Cryptographers Urge People to Abandon IOTA After Leaked Emails on Wednesday February 28, 2018 @03:19AM (#16481527)
It still baffles me that the official response from the IOTA foundation is that the vulnerability was inserted intentionally as copy-protection.

And even more baffling that their flagship partner Bosch does not seem to have problem with this practice.

Re:MIT Media Lab's concerns about the cryptocurrency IOTA on Thursday December 21, 2017 @02:27PM (#15981979)
> The first explanation was that the flaw was intentional—that it was meant to serve as a form of “copy protection.” If anyone used this code in their own work, he said, the IOTA developers would be able to exploit the flaw and damage other systems that were using the hash function.

Is this a common practice in the cryptocurrency community? Seems sort of pointless to put flaws and bugs in an open source project as copy protection instead of just keeping it closed source.

Re:Why You Shouldn’t Use ReactJS for Complex Projects on Sunday February 05, 2017 @06:10PM (#13575291)
This article purposefully misrepresents React in favor of the author's own framework Binding.scala, all the criticism are either superficial like class being className (which is a good thing because JSX is not HTML) or has nothing to do with React like JavaScript's dynamic typing system and handling of asynchronous updates.

He also seems to believe that React is framework when it's a library, if his knowledge of React is so shallow that he didn't even read the first sentence on the React website I can't take his opinions on it seriously.

I don't like these kinds of articles which are only thinly veiled advertisements that do not offer any thoughtful criticisms, what I would really like is to hear from someone who has actually worked on a huge project which includes React and what troubles if any they ran into.

Re:Show HN: Alter – convert text/code to an image on Saturday November 26, 2016 @08:29AM (#13043397)
I am of the same opinion, always go for correctness before performance, efficiency can be tuned later if it's even needed.
Re:Create React Apps with No Configuration on Friday July 22, 2016 @12:34PM (#12144630)
I created something similar a month ago

https://github.com/olahol/reactpack

Doesn't seem like this project differs that much, although this looks to have the backing of core React developers.

Re:Has article 50 been invoked? on Friday June 24, 2016 @07:03PM (#11974169)
> If the Article 50 was not sent today, the very day after the Leave result, there is a strong chance it will never be sent.

https://twitter.com/DavidAllenGreen/status/74644174247232307...

It's just an example to show what type of code `reactpack` builds, ES6 and JSX with style loading in this case. If you want a more minimal React-like build you can switch out React with lightweight alternatives like Preact or React-lite.
Thank you :) I made it in gnome-paint, the shrubbery symbolizes okayish development practices.
Just a small utility for people who are tired of remembering what babel presets or Webpack loaders they need to build a relatively up to date React project.
Re:Dsxyliea on Thursday March 03, 2016 @01:39PM (#11218878)
You are loading things over HTTP instead of HTTPS (Mixed content warning). Change

http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.mi... => //cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js

Re:Mixpanel Lays Off 18 Employees on Friday January 08, 2016 @09:57PM (#10869882)
The analyzer is just for show, this is the code that runs it:

http://pastebin.com/w00xTRrU

If you look at max_errors there looks to be always at least 7 errors.

I think a better way of doing it would be to make the error generation deterministic on the url input.

Re:Webwatch on Monday October 26, 2015 @11:55AM (#10452222)
It's using the standard `flag` package that comes with Go, as for why `flag` parses args this way I don't know.
Re:Webwatch on Monday October 26, 2015 @10:16AM (#10451563)
Useful tool for what is a very common task, nice work jgrahamc!
Re:How David Hume Helped Solve My Midlife Crisis on Friday September 18, 2015 @06:07PM (#10242334)
My favorite passage from David Hume's work `An Enquiry Concerning Human Understanding`

“Where am I, or what? From what causes do I derive my existence, and to what condition shall I return? ... I am confounded with all these questions, and begin to fancy myself in the most deplorable condition imaginable, environed with the deepest darkness, and utterly deprived of the use of every member and faculty.

Most fortunately it happens, that since Reason is incapable of dispelling these clouds, Nature herself suffices to that purpose, and cures me of this philosophical melancholy and delirium, either by relaxing this bent of mind, or by some avocation, and lively impression of my senses, which obliterate all these chimeras. I dine, I play a game of backgammon, I converse, and am merry with my friends. And when, after three or four hours' amusement, I would return to these speculations, they appear so cold, and strained, and ridiculous, that I cannot find in my heart to enter into them any farther.”

I wrote something similar to this for playing NES games, just start the server and navigate to it with a desktop and mobile and it should work out the box.

https://github.com/olahol/greasyphone

Older »