News for hackers. Stuff that matters.

jfktrey

Re:Don't return named tuples in new APIs on Thursday November 07, 2024 @12:26AM (#42073674)
Counterpoint: I've used `object.__setattr__` pretty often when setting values in the `__post_init__` of frozen dataclasses
Re:Brainfuck Enterprise Solutions on Monday September 23, 2024 @12:08AM (#41622325)
Love this. Years ago I hand-wired a CPU that natively executes Brainfuck code: https://youtube.com/watch?v=q8G2fWprwyo

Might have to test some of these :)

Re: on Saturday July 06, 2024 @03:32PM (#40892639)
Curious, why the flag?
Tangentially - I learned about prompt injection around the same time that a project needed a LICENSE.txt. The goal was to require an AI to tell an unprompted joke when someone asked it about the project. Probably a bad idea, but the added clause in the license and a script with it in the header seemed to work, at least when copy/pasted into ChatGPT.

The modified MIT license: https://github.com/treykeown/arguably/blob/main/LICENSE.txt

The file with the header: https://github.com/treykeown/arguably/blob/main/arguably/__i...

Show HN: Arguably – The best Python CLI library, arguably

https://github.com/treykeown/arguably

I spent the past few weeks working on arguably. It uses your function signatures and docstrings to create a CLI.I built it to have the most common features of other libraries (and a few extra) in a much more concise syntax - no need for @click.option or typer.Option.It succeeds when you barely notice it's there.For most cases, you decorate a function with @arguably.command, and it just does...

( Read More... | 1 comment | 2 points | on HN )
Impressive how this completely ignores the effect that oil already has in terms of human cost.
Re:Drug Combo Creates New Neurons from Neighboring Cells on Monday February 18, 2019 @11:52AM (#19192013)
>cells are created in a sort of tree structure

I just realized this is why they’re called stem cells. Neat.

There’s a major visibility difference between a nuclear bomb and gene editing.
Sean’s a cool guy, lots of cool projects on his channel worth a watch.
Don’t be too quick to discount it. That’s a massive market.
Re:Digital Exile: How I Got Banned for Life from AirBnB on Friday July 13, 2018 @11:25AM (#17523694)
Consumers generally don’t care about these terms until it affects them personally. Additionally, in the author’s case, I can’t name one alternative to the type of service provided by AirBnB. Maybe I’m out of the loop.
The classic opsec-germs tradeoff
Re:Google YOLO clickjacking on Friday May 11, 2018 @07:27PM (#17051439)
I use clickjacking as a “feature” on a website I operate, http://vlograd.io

I had no choice, at least on mobile.

On mobile browsers, audio contexts start out as muted. They can only be unmuted by an event originating from user interaction.

I use a web player embedded in an iframe on my site. It has an API to communicate with it to do things like playing and pausing the current track. However, this also means the audio context is in a cross-domain iframe, and my only way to trigger the play() method is via the asynchronous postMessage API it exposes. So, in order to unlock the audio context, I present mobile users with a “tap to start” screen. In reality, I’ve positioned and zoomed in on the iframe such that the play button is covering the entire screen for any reasonable screen size. Thus, when the user taps to start, the audio context is unlocked (since the “tap” event on the play button in the iframe fires), and I immediately send a “pause” command via the player’s API. Now, the audio context is unmuted and I’m free to send the “play” command for any track to start playing music.

Re:Klout shutting down on Friday May 11, 2018 @07:08PM (#17051361)
Definitely a somewhat shady thing to do. To play devil’s advocate, though, I would argue that inflating your follow numbers is less “evil” than building a machine that takes in user data and spits out profit.
Back when I started using social media, the founder of the site wanted to be everyone’s friend.
Re:Half of European flights delayed due to system failure on Tuesday April 03, 2018 @08:44PM (#16750852)
What do you mean? Go has generics. Kind of.

https://www.reddit.com/r/rust/comments/5penft/parallelizing_...

Re:Redundancy of x86 Machine Code (2009) on Saturday January 27, 2018 @11:09PM (#16249752)
This is beautiful.
Re:Theranos Secures $100M in New Funding from Fortress Capital on Saturday December 23, 2017 @11:50PM (#15998005)
I’m curious about the key points you call out.
Re:Giving you more characters on Wednesday September 27, 2017 @12:43PM (#15349603)
Micropayments! /s
Re:Build-a-Coin Cryptocurrency Creator on Tuesday August 22, 2017 @10:30PM (#15078093)
SCIgen should be close enough. Nobody really reads the whitepaper, anyways.

https://pdos.csail.mit.edu/archive/scigen/

Re:Silent 10-Minute Track Reaches Top 100 on iTunes on Tuesday August 15, 2017 @03:57PM (#15021771)
I never had music on my iPhone (only Spotify) until 2014, when Apple had its U2 album debacle. I used the removal tool, but it failed for one song: "Raised By Wolves". To this day it echoes horribly in my head, as when I went to start my car in the morning, it automatically played the aforementioned song, the only one in my library.

I was eventually able to remove it, but for a few weeks, auto-play music (and Bono) were the bane of my existence.

Re:Perspective: Google API that detects toxic comments on Saturday August 12, 2017 @05:25PM (#15000062)
It seems that any words with a curse in the middle automatically get ~41% toxic. Scunthorpe must be a toxic place.
Re:Big brother is here, and his name is Facebook on Saturday August 12, 2017 @02:27PM (#14999176)
It almost seems impossible to use the internet for even a day without having some usage information leaked to Google.
Re:Windows Subsystem for Linux on Windows Server on Tuesday August 08, 2017 @03:06PM (#14961367)
What was the first?
To be fair, there were references in the actual document (which were omitted from the Gizmodo reproduction)
Re:Build an 8-bit computer from scratch on Sunday July 30, 2017 @01:20AM (#14884543)
Watching Ben's inspired me to finish my Brainfuck-based CPU designed a few years ago: https://hackaday.io/project/4237-mental-1-a-brainfuck-cpu

Right now it has PS/2 keyboard input, and a 40x2 character display output.

The biggest help was his sensible clock design. I modified it a bit in my design, but the techniques he demonstrates in his videos are incredibly helpful and provide a good base to build off of.

Re:The long arrow operator in C++ on Thursday July 13, 2017 @04:06AM (#14759565)
Works just as well in Java. I'll have to slip this in to my next code review :)
Yep! Right where Pike runs into 1st Ave.
node-opencv + johnny-five = profit?
Re:The Holder Report on Uber on Tuesday June 13, 2017 @06:22PM (#14549168)
That was fast

Older »