News for hackers. Stuff that matters.

perttir

Re: on Monday February 13, 2023 @09:29AM (#34773790)
> This study does not contemplate shallow cloning or performance.

Hmm?

> cloneJSON is very slow and can’t do much. Please avoid it.

I always thought that javascript is fast at JSON parsing. Atleast the benchmark shows nice results: https://www.measurethat.net/Benchmarks/Show/18541/0/jsonstri...

Re:Reverse Engineering TikTok's VM Obfuscation (Part 2) on Tuesday January 10, 2023 @10:16AM (#34326057)
I used to develop Apache Cordova application that had strong obfuscation using javascript-obfuscator. Apple didn't care.
Re:Terraria Source Code (2013) on Tuesday February 15, 2022 @09:57AM (#30347238)
The code looks bad. I guess it has been refactored later.

The repo says this code is only for educational purposes. This spaghetti can be still a good example for the reasons you mentioned. Or maybe it is a good example for an ugly prototype version of an game.

This could be even better if people could see a refactored version of this codebase.

Re:PHP in 2022 on Thursday January 13, 2022 @02:47AM (#29917917)
I like Laravel, but i don't like Livewire that much. Livewire is really neat when building simple interactive stuff, but when building larger more dynamic parts it gets pretty sluggish and the livewire component codebase starts to feel harder to maintain.

Last time I tried to use Livewire with Vue, it had some issues which caused Vue to lose reactivity. (Maybe Livewire removed the DOM where the Vue instance was rendered. There was some options that prevented livewire from replacing elements with given id/classname.) But if i remember correctly, you cant have livewire element which has vue components as child elements.

Maybe i was doing stuff wrong or the livewire<->Vue compatibility is a bit better nowadays. Or maybe its because I'm too used to Vue.

It felt like the Laravel community jumped to the Livewire hypetrain quite fast and it feels like the livewire recommendation to use alpinejs in someparts is required. And most of the examples for alpinejs requires you to write inline code. (It is possible to split the code to own js files, but then again you are building something that gets closer to Vuejs.)

It feels weird to recommend to write scripts using inline javascript. That requires more CSP modifications for security and also the scripts wont get cached and are loaded every time the page loads. (If I'm correct.)

TL;DR Livewire is great for small features.

Re:Why IndexedDB is slow and what to use instead on Tuesday November 23, 2021 @03:14AM (#29315688)
I fixed some of the slowness issues in my application by writing a nice little cache adapter between my application and Dexiejs.
Re:PHP is worth learning and using on Thursday November 18, 2021 @04:03AM (#29263538)
Php has developed a lot in a decade.

Lots of new good things in php7/php8. The typecasting is way better than before, but it still allows you to be more "dynamic" if you want to.

Re:Offline-First Database Comparison on Tuesday October 26, 2021 @03:26AM (#28997399)
How fast is the Pouchdb with sqlite on android? I dont really need any replication in my application, should i just use the normal cordova sqlite instead and switch to dexie.js when using in web browser?
Re:Ask HN: How did you find your current job? on Friday May 28, 2021 @02:23AM (#27312319)
D
Re:Project Starline: Feel like you're there, together on Wednesday May 19, 2021 @03:38AM (#27205683)
Most internet providers here in Finland provides you fiber connections from 100-1000mbs pretty cheap. And 4g/5g connections from 100-300mbs for cheap prices too. Most of them does not have any data caps.

I have 300/100mbs connection which costs 20 euros in month.

If the attacker can replace the code inside your web application, then you have security issues somewhere else than in your application.
Re:How Going Back to Coding After 10 Years Almost Crushed Me on Wednesday April 07, 2021 @03:52AM (#26721615)
The main reason why the modern Web GUI frameworks does not always feel good is because they need to support wider ranges of screen sizes, ratios, resolutions, accessibility tools, touch inputs, etc.

And web browser/css if pretty good when supporting different devices/platforms.

This is the reason why i chose to use basic cordova instead of ionic in my application. I can't use cool out of the box components when building the UI, but i can implement my own UI components using Vue.

There are still some tradeoffs, the javascript webview ui components are not fast as the native ones.

Re:Helsinki Relocation Package: City as a Service on Friday November 06, 2020 @09:07AM (#25007658)
Yeah, if the problem is not acute, usually it's months and months of waiting, now even longer because of the covid.
Re:A look at modern PHP on Tuesday May 05, 2020 @04:53AM (#23077908)
Php supports (somewhat) strictly defined types.

You can defined what types/interfaces methods needs to return, what types/interfaces variables must have, what types/interfaces the method arguments needs to have.

It also supports class inheritance, abstract classes, interface classes, class traits, etc.

Re:A look at modern PHP on Tuesday May 05, 2020 @04:09AM (#23077668)
I use php daily. Mostly Symfony/Laravel stuff. There are still some stuff it needs what other languages have. (Can't really right now remember all the stuff i stumble upon sometimes which gives me the feeling "damn if i could do this like i do it in rust/java/cpp/(w/e)")

Maybe the worst thing is the composer (it's slow.)

Re:Switching from Chrome to Firefox on Monday December 30, 2019 @04:57AM (#21912232)
The devtool is nice nowadays. It supports inspecting websocket messages, log events and has a multi-line support for console.
There are a lot of people creating software/specifications without knowing what they are doing and it scares me.
Re:Show HN: Flash replacement on Tuesday December 10, 2019 @08:56AM (#21752417)
You should probably put 'APP_ENV=production' and 'APP_DEBUG=false' to your laravels .env file.
Re:A guide to Oauth2 on Monday September 02, 2019 @04:05AM (#20857494)
Im not sure there ever will be a complete complete oauth2 considering everyone who implement it have their own flavor of it.
I contacted similar Finnish based application about similar issues, where almost everything, including all the user images could have been collected from the json api end point.

Their response was that it is not bad system or insecure because the information is only available for logged users. So the api just needs authentication header.

So all the user data could have been easily collected to own database using simple script.

Re:Responsible JavaScript: Part I on Monday April 15, 2019 @07:30AM (#19664569)
Anybody else has issue with the side banners being on top of the text in the Firefox?
Re:Show HN: Messing with Telnet on Monday April 15, 2019 @06:49AM (#19664420)
Works but it is very slow.
Re:Matrix.org hacked on Friday April 12, 2019 @03:51AM (#19642888)
They had root account activated in hebe? Am i reading this right? He got an passlist of 5 million users?
Re:JQuery 3.4.0 Released on Thursday April 11, 2019 @02:05AM (#19631569)
It is a tool that make some jobs easier. Just like vue/react is an tool which makes some jobs easier.

You just need to know when to pick the right tool for the job.

The phone which send data to Chinese servers, were using firmware/software version only used in Chinese market. There were some faulty phones in wrong market where the firmware was using the "chinese version."
Re:Google hit with €1.5B fine from EU over advertising on Wednesday March 20, 2019 @07:39AM (#19441073)
That's small money for the Google.

Last year they gave Google €4.34bn fine and in year 2017 they gave Google €2.42bn fine.

Re:Google hit with €1.5B fine from EU over advertising on Wednesday March 20, 2019 @07:34AM (#19441032)
They were setting chrome as default browser in android. Also they did not allow chaning the default search engine so easily.
Re:Linux Desktop Setup on Tuesday February 26, 2019 @07:22AM (#19253669)
This is why most of people love i3 as tiling wm. Just put it in top of gnome/xfce/whatever, run the first installation wizard and you are done.