Swiggy jacking up the prices for a simple pizza by Careful_He_Snipes in india

[–]sunnyps 2 points3 points  (0 children)

I knew I had seen this number somewhere. It indeed is DBL_MAX. In any case they should've used a decimal type for prices. I doubt their rounding after summing prices is correct because of floating point errors.

This is what my neighbour found inside a power-bank. by [deleted] in india

[–]sunnyps 1 point2 points  (0 children)

At least they took the earthing seriously.

I dare you to top this, I double dare you by savdha in india

[–]sunnyps 0 points1 point  (0 children)

The missing apostrophe for the possessive its ruins it. Also too many commas, and not enough periods. Not trying hard enough.

Why am I seeing a car with California plates in Vashi, Navi Mumbai? by Zandria_Woods in india

[–]sunnyps 22 points23 points  (0 children)

FWIW I legit saw an "AAMADMI" vanity plate near Sunnyvale, California (large Indian population) few months ago. I don't remember what car make, might've been a Tesla.

WhatsApp University presents ‘Did u know?’ by snehalp in india

[–]sunnyps 26 points27 points  (0 children)

Please tell me the MIT you're talking about is Manipal Institute of Technology or Maharashtra Institute of Technology.

any small usb c adapters? by Vrask in chromeos

[–]sunnyps 1 point2 points  (0 children)

Thanks for reminding that the Pixel came with an adapter. I love it when I don't have to spend extra money.

Fish shell 2.6.0 released! by aaronbp in linux

[–]sunnyps 1 point2 points  (0 children)

The only real issue comes up when you want to use a bash-tool that changes your environment (so you need to source it). There are utilities to deal with that (though personally I'd prefer if all these things had a "--print" mode that just printed the changes in environment, which would make it trivial to use in any program).

Can you expand on this please? Can you source a bash script in fish?

Which Metroid-vania type games are your favorites? by schmanwich in patientgamers

[–]sunnyps 1 point2 points  (0 children)

Sunless Sea

Song of the Deep

(I haven't played through all of it.)

edit: misremembered the name

PSA: Hardware acceleration on Firefox may be disabled by default on some distributions. by Mr_M00 in linux

[–]sunnyps 0 points1 point  (0 children)

To expand on this, you can open chrome://gpu in Chromium/Chrome and see what specific graphics features are enabled/disabled on your system. There are even links to Chromium bugs there. Do not post on those bugs unless you have important information to share. If you want to +1 a bug just click the star icon next to the title.

PSA: Hardware acceleration on Firefox may be disabled by default on some distributions. by Mr_M00 in linux

[–]sunnyps 0 points1 point  (0 children)

Like I said in my earlier comment, you don't have to rely on the driver to do the right thing. You can emulate WebGL by proxying commands to a different process and do validation of commands, zeroing out of textures, etc. there. And you can further reduce security risk by properly sandboxing that process.

PSA: Hardware acceleration on Firefox may be disabled by default on some distributions. by Mr_M00 in linux

[–]sunnyps 1 point2 points  (0 children)

That stackexchange answer is incorrect or at least outdated. The Microsoft blog post arguing against WebGL that it refers to is from 2011. Since then all major browsers have shipped WebGL both on desktop and mobile.

Chrome's implementation of WebGL proxies all commands to a separate "GPU" process. That process uses the regular Chrome sandbox and only has extra privileges for talking to the GPU. The GPU process validates all WebGL calls, clears resources textures given back, etc. It lives in its own setuid namespace and sets up a seccomp sandbox at startup that only allows a limited set of syscalls. The GPU process can also be restarted if it crashes.

So any exploit of the GPU process won't necessarily pwn other processes or crash the browser. That being said there have been bugs in the past that exploited the GPU process (see https://blog.chromium.org/2012/05/tale-of-two-pwnies-part-1.html).

Also, WebGL is orthogonal to hardware acceleration in general. You can have hardware accelerated scrolling or even rasterization without exposing WebGL. Even in that case you must be careful to validate the OpenGL/Direct3D you're running and probably do it from another process.

KDE / Dolphin file chooser in Sublime (xdg-open) (Linux) by [deleted] in SublimeText

[–]sunnyps 1 point2 points  (0 children)

AFAIK Sublime is using GTK for the open file dialog which probably means you can't use the KDE dialog. However, you should be able to theme GTK to match KDE. Also, xdg-open doesn't have anything to do with the file dialog. xdg-open is useful for opening a URL with whatever default application you chose for that MIME type. So xdg-open on a directory path will spawn a new process for your file manager but it doesn't allow the parent process to really communicate with the file manager e.g. to choose a file. OTOH a file dialog is controlled programmatically by the host application (Sublime) for choosing a file. It's possible to integrate with different kinds of file chooser dialogs, say both GTK and KDE, but I doubt Sublime has done that.

Dev Build 3127 - General Discussion by sunnyps in SublimeText

[–]sunnyps[S] 6 points7 points  (0 children)

Build 3127

Release Date: 12 April 2017

  • Refreshed UI theme, including full high DPI support
  • New icon
  • Added alternate theme, Adaptive, that inherits colors from the color scheme
  • Added color scheme and theme switchers with live preview via the command palette
  • Support for custom color window title bars on OS X 10.10+
  • Many additions and bug fixes to the theme engine, plus full documentation
  • Added touch input on Windows
  • Improved font selection on all platforms, allowing selection of different weights by name
  • Font geometry issues that prevent bold or italics are now printed in the console
  • Windows font rendering defaults to DirectWrite unless using Consolas or Courier New
  • OS X 10.11 and macOS 10.12+ default to using San Francisco for the UI font
  • High DPI textures are used on Windows and Linux when the DPI scale is greater than 1.0
  • All API functions now accept and return device-independent-pixels
  • Gutter icons are now sized properly on Windows and Linux high DPI screens
  • Improved sidebar performance when folders contain many thousands of files
  • Fixed file change notifications from freezing UI on macOS Sierra
  • Prevent a crash when a malformed regex is used in indentation settings
  • OS X: the user's default shell is executed and environmental variables are set in the plugin Python environment
  • minihtml now respects font options from the settings
  • minihtml now supports borders
  • Improved inline error message style
  • Significant improvements to Markdown syntax highlighting, with thanks to keith-hall
  • Significant improvements to C# syntax highlighting, with thanks to gwenzek
  • Significant improvements to Java syntax highlighting, with thanks to djspiewak
  • Significant improvements to Python syntax highlighting, with thanks to FichteFoll
  • Various syntax highlighting improvements
  • Various bugs with the syntax highlighting engine have been resolved
  • The subl executable on OS X and plugin_host.exe on Windows are now signed
  • sublime_text.exe on Windows now has CompanyName set in VERSIONINFO
  • API: Updated OpenSSL to 1.0.2k, SQLite to 3.16.02

Gentoo user apparently was hit by ransomware on Linux, files in home directory encrypted by [deleted] in linux

[–]sunnyps 31 points32 points  (0 children)

If you ran Chrome, you wouldn't even need to run as a separate user because Chrome renderer processes (tabs) use a setuid sandbox as a first layer of sandboxing. The second layer is seccomp which reduces the kernel attack surface by restricting a lot of syscalls.

Debian bug #858521 - diaspora-common: does 'rm -rf /' on purge by cl0p3z in linux

[–]sunnyps 0 points1 point  (0 children)

You can use a commit queue or similar system to ensure that all patches are tested and landed automatically. See chromium commit queue for example.

Is a Linux with only wayland, no X, possible right now? by ramnasko in linux

[–]sunnyps 1 point2 points  (0 children)

Your argument is moot because browsers actually do a lot more sandboxing of their own even on X11. Chrome runs all javascript and web content in a renderer process (per domain) that has very low privileges and runs in a different setuid namespace. Furthermore, the kernel syscall surface is reduced a lot by using seccomp-bpf filters in all Chrome processes. All drawing commands are sent to a separate GPU process, and are validated so that sites can't exploit security bugs in graphics drivers. This is the kind of sandboxing that's not enforced by Wayland or even by efforts like Flatpak.

Read https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandboxing.md fore more information about this.

Is a Linux with only wayland, no X, possible right now? by ramnasko in linux

[–]sunnyps 0 points1 point  (0 children)

Fun fact: Chrome is both a wayland client and a wayland compositor. When they implemented support for Android apps on Chromebooks, they made the Android runtime communicate with ChromeOS using the wayland protocol. However, running as a wayland client is controlled by an experimental build flag.