Better HN
topnewbestaskshowjobs
Log inSign up

rhengles

92 karma · joined Dec 1, 2011 (15y ago) · 127 submissions

Submissions

1.

Show HN: Windows 8 inspired transfer speed graph(speed-transfer.arijs.org ↗)

2 points · by rhengles · 6mo ago · discuss

comment 1y ago · link · parent

Didn't we have flying birds before even the dinosaurs, let alone the Homo Sapiens ? So we had physical evidence that flight was possible.

comment 4y ago · link · parent

Source ? Also, have you seen the former ministry of environment Ricardo Salles in the April 22, 2020 video of the ministries meeting with Bolsonaro ?

comment 4y ago · link · parent

+1. I also recommend this template[1] based on Vitesse, a starter project created by one member of Vue core team. It includes the NaiveUI library with many advanced components ready.

[1] https://github.com/arijs/vitesse-modular-naiveui

comment 4y ago · link · parent

I'm rewriting a ERP system my late father wrote in Delphi (with my help when I was a teenager), to be a modern system in PHP (to be hosted for dirt cheap) with a GraphQL api. As I don't have the manpower to write this API manually, I wrote a JS code to read and parse a MySQL Workbench diagram file, where I define the tables and relationships in the visual editor, and then I parse the XML config file to create the GraphQL Schemas and Resolvers.

This API is already working with queries, filters (conditions for the 'where' clause in sql) and forward and reverse relationships (depending on which table points to the other). This system already create 'create' mutations, but I still have to do 'update's and 'delete's. And the entire frontend still.

6.

Astro and Mitosis: run the same component in 4 frameworks(github.com ↗)

2 points · by rhengles · 4y ago · discuss

comment 4y ago · link · parent

One of the ideas I have, but will not have time to do, it's to make a site or browser extension to allow users to send extra content, reactions, memes, pictures, etc on Hacker News submissions and comments without having fear of the downvotes.

There's many many times that I wanted to post a funny reply but I'm certain that I'd get many downvotes from it.

comment 4y ago · link · parent

I did a little proof-of-concept a long time ago using Mozilla Rhino + SWT apis and managed to get a small window on the screen with a few buttons with only javascript, but I couldn't figure out the api to make a simple http call...

comment 4y ago · link · parent

I simply created a throwaway account during installation. However, I ended up using a fake birth date that was under 18 yo. So later I ended up having to create _another_ fake account with the age of an adult to allow me to create a local account with admin priviledges...

comment 4y ago · link · parent

I can't edit my post anymore but I found the solution. All I had to do was to convert the random input value (X above) to an uint32 using (X >>> 0).

comment 4y ago · link · parent

Forgive me for replying here, I couldn't find an option to DM you. And I cannot find any implementation of this in javascript, nor anyone else able to help me.

Can you shed some light here why I'm getting these differences?

https://jsfiddle.net/7kf15dje/

Here is an example of the output I'm getting:

  //       X  A  B           X^1         X^-1 :: Difference
   471490377  6 13 =  1365552781 =  471490377 :: 0
  1528396978  9 11 = -1576695076 = 1528396978 :: -0
  1592322722  9 20 =   622346385 = 1592322722 :: -0
  1214152986  8 16 = -1748578289 = 1214152985 :: -1
  1193897367  2 16 =   907713766 = 1193897366 :: -1
   335642564  9 10 =   318891964 =  335642564 :: -0
   486208953 16 23 =   894211128 =  486208952 :: -1
   629577059 13 14 =  1383225523 =  629577058 :: -1
  1609442937  8 18 =   674046110 = 1609442937 :: -0
   234450967  6 12 =  -459008694 =  234450966 :: -1
  1840721644 19 28 =  -602984005 = 1840721644 :: -0

comment 4y ago · link · parent

Would it require too much energy to spin it away from earth instead of towards it ?

comment 4y ago · link · parent

Reading only the title, I thought "I am having this problem exactly now!". However, it is not about lack of security updates (it's an old Motorola phone). It is a smartphone that belonged to my late father who passed away in 2020. He had a google account with password and the phone has a pattern to draw in the lock screen.

I know Google and the phone manufacturers are concerned with the stealing of phones, so they make it as hard as they can to use a phone without authorization, even if you try to reset the phone and erase all user data. Does anyone know if there is a process to remove a google account from a phone even if I have to prove to Google that he died of natural causes?

comment 4y ago · link · parent

One thing that always put me off about webpack is the default way it compiles your code. One of the ways is(was?) compiling code as _eval_(!!) statements and code as string. It is absolutely impossible to debug such code.

You were meant to rely on sourcemaps to get something on your debugger, but despite using the latest Chrome and developer tools at the time, I could never get it to work to actually debug sites.

I know Rollup, Vite and etc had a much easier time providing an easier developer experience because they rely on the browser's native ESM support, but I never could understand why webpack decided to mangle the code so badly.

comment 4y ago · link · parent

CSS - Yes. JS - Not since 2015, I'll admit that is somewhat recent. HTML IDs - IDs are only good if they're unique. Since HTML had no notion of scope, they became global. Shadow DOM is the web platform answer for modularization, however any JS framework will allow you to slice your CSS and HTML in components.

comment 4y ago · link · parent

Maybe those users simply aren't interested enough in your product? I think adding a simple note "click on the labels to see a demo" should be enough discoverability.

comment 5y ago · link · parent

This depends a little on the taste of each person, but personally the most elegant way of doing PHP apps I ever found is with Siler: https://siler.leocavalcante.dev/v/main/ and Create Siler App: https://github.com/leocavalcante/create-siler-app

comment 5y ago · link · parent

That's a kinda chicken and egg problem. I could argue that the more financing you give to people, the more they're gonna be willing to pay, so this actually drive prices up.

comment 5y ago · link · parent

The best example I ever saw, and a great UI framework/component library on top of it, it's NaiveUI - www.naiveui.com . The code is all in JSX + Typescript, I didn't find a single component with html templates.

comment 5y ago · link · parent

If you have a Windows 10 license, you already have a Windows 11 "license", since the update is free.

comment 5y ago · link · parent

They tried that with Windows 8, the backslash was so enormous that I think they will be on the safe side and stick with 'familiarity' for the foreseeable future.

comment 5y ago · link · parent

I found a link to a tool[0] that checks your PC compatibility with Windows 11, but it seems that many many people with powerful devices are getting a "No" answer.

[0] https://twitter.com/_h0x0d_/status/1408075658350108674

comment 5y ago · link · parent

Yes, I opened it from windows explorer icon

comment 5y ago · link · parent

As Mark Twain said, "Buy land, they're not making it anymore". Nothing can make land "free". The planet's resources are vast but finite. If people continue reproducing with no limits they're reducing everyone's share of the pie. This is the actual reason why "the poor gets poorer", there's more of them but the resources stay the same.

This is the same logic that explain why building more roads does not reduce traffic congestion, because new demand is created to use the new roads and the traffic stays bad.

25.

Node.js script to make an average of corrupted file copies(github.com ↗)

1 points · by rhengles · 5y ago · discuss

comment 5y ago · link · parent

I think Rich Harris is to front-end as John Carmack is to games development, and no doubt Svelte is a marvel of technology, however I dispute the notion that it is more close to "traditional html / js / css" than either React or Vue. For example, most frameworks use webpack which extend es6 module syntax in a way that they don't work natively in the browser without compilation, and I don't think Svelte is any better than them in this regard.

comment 5y ago · link · parent

I think the only reasonable thing that js can do here is what it does - copy the reference. Also, there is a simple way to copy all properties from a object: const copy = { ...object }; Of course, if these properties are themselves objects, then changes in one of them will appear in the other.

One way to have a deep copy which shares nothing is const copy = JSON.parse(JSON.stringify(object)); but that may not always work. In short, copying a arbitrarily large object will probably waste memory, so it should be a little hard so you don't do it unless it's really necessary.

comment 6y ago · link · parent

I built a project for my company a little over a year ago, the project is live now. It's a recruitation tool, where the candidates fill out a questionnary with several questions and three types of question: multiple choice, text typing and video recording.

When searching for a tool to use to record the videos, I was very happy to find this open source server, so I wouldn't be locked to some service provider. The documentation is quite good and I didn't have difficulty integrating it to our project, despite the fact that I'm mostly a front-end and NodeJS developer.

Now that the project is live, we are having a few problems with some users. The videos that our users record are stored and watched later by specialists, we don't watch them live. But after the user start and stop recording, sometimes the .mp4 video file is not found on the server. But it is very nice that Ant Media has a admin page with CPU and memory usage, and it also reports when there's been a server crash.

It asks my email address and the support service receives the log files and reply at most a few days later. We're in contact right now, I'm sending them all the information I can to help resolve this issue. Of course we tested the integration ourselves, with 5 concurrent users recording, but not a single one of our tests has failed the way our users are reporting.

comment 6y ago · link · parent

This looks like the perfect place to mention my project template used to create Vue 3 apps without the need for Webpack or any other build tool:

https://github.com/arijs/vue-next-example

I already integrated vue-router, and am currently on the process of fully integrating Vue server renderer. I already have a basic usage implemented, where the home page is compiled to a html string, but I still need to make it easy to compile all pages and to implement client-side component hydration.

12345