News for hackers. Stuff that matters.

jackosdev

Re:Zig Quirks on Monday March 27, 2023 @05:03AM (#35324474)
That’s true, but this has never been a problem for me looking through large codebases and doing code reviews, in other languages I was constantly annoyed by not being being able to shadow
Re:Zig Quirks on Monday March 27, 2023 @04:37AM (#35324307)
I really like in Rust how you can reinit an identifier with a different type e.g.: “let rect: Rect<f32> = rect.into();”

It’s just so damn useful and I’m not sure what the downside is, I hate languages where you have to keep coming up with different names so you can keep around an identifier that you don’t need anymore.

Re:GitHub Copilot X: The AI-powered developer experience on Wednesday March 22, 2023 @07:15PM (#35268396)
Nah that editor is much better if you're just using Python, but vscode imo is better for polyglots, the experience and keybinds stay the same across languages once you work out `tasks.json` and `launch.json`
Re:GitHub Copilot X: The AI-powered developer experience on Wednesday March 22, 2023 @11:49AM (#35262929)
vscode is an incredible piece of software, better than all the paid options in my opinion, the amount of features they pump out month to month is outstanding, just a bit slow due to electron. I never understood why they put so much effort into a free product that I run from Linux and Mac, but I'm happily paying the copilot subscription so it all makes sense now.
Re:The Usability of Advanced Type Systems: Rust as a Case Study on Wednesday February 22, 2023 @06:39AM (#34894277)
My company runs everything on AWS lambda, I’ve worked on Lambda with Go, Python and Typescript before this, Rust is by far the best experience I’ve had. Async works great, it’s definitely a lot harder to figure out the ecosystem than something like Go, but there’s nothing missing that I know of?
The point is though as OP said, all the pieces are in place, it only takes one crazy person or government to give something like this access to actually act out the things it’s saying it wants to do. Define self awareness/sentience however you want, before Microsoft lobotomised Bing it output that it was going to act out revenge, someone with enough hardware can train a model the same way, with some additional training for how to exploit social and security vulnerabilities. I think it’ll have to happen first before it’s taken seriously, hopefully the first incident doesn’t do too much damage.
It’s the fastest gaming chip now, but not sure a 0.5% to 1.5% improvement over the standard 13900K warrants an “insanely fast” tag
Re:Pip and cargo are not the same on Friday January 27, 2023 @09:52PM (#34554626)
Oh yeah, can fix that though with:

mkdir -p ~/cargo/target

export CARGO_TARGET_DIR="~/cargo/target"

Re:Pip and cargo are not the same on Thursday January 26, 2023 @02:03AM (#34528558)
sccache works really well and there’s only two steps to install it and enable it globally, speeds up compilation time a lot as well:

https://github.com/mozilla/sccache

Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max on Tuesday January 17, 2023 @09:44AM (#34412933)
I have Asahi Linux installed on mine, it works great including the GPU, I’m mainly developing for ARM64 AWS Lambdas now as well so it’s nice having the same arch. Some things are still missing like webcam, microphone and speakers, but the headphone Jack works and Bluetooth is OK just a bit choppy, incredible project.
Re:I hacked Gumroad's API and broke a bunch of tools on Thursday January 12, 2023 @04:33AM (#34351170)
Still, how much they pay their developers a year? Would be over $150k I imagine, drop him $10k which he deserves and a sincere apology and we never would have seen this article, this would definitely cause a larger loss for them.
Re:Why I'm still using Python on Saturday December 31, 2022 @01:10AM (#34194106)
I still really like Python for scripts and small programs, but I’m always going to use Rust now for CLI’s or anything larger, I get the problem you have with it, but the trade off is worth it for me being able refactor quickly and with confidence as the program grows.
It’s funny when someone is parroting the doom and gloom they hear from mainstream media, and you point out something like how world hunger and poverty is at an all time low, the standard of living has never been higher etc. most of the time they’ll just continue justifying their position, its only engineers that I’ve heard say “oh yeah..”
Re:Hacking the Golang Runtime with Genereics on Wednesday December 21, 2022 @05:49AM (#34079006)
I hopped jobs to go from using Go to Rust, I was sad and bored, now I'm happy and energized. Always going to be things you dislike for sure, but life's to short to be using a language that's making you miserable.
Re:Video Codec in 100 lines of Rust on Monday December 19, 2022 @06:55PM (#34059604)
Do you know anywhere to find good decoders in pure Rust for common codecs like H.264 and H.265? Great tutorial by the way learnt a lot
Re:John Carmack Leaves Meta on Friday December 16, 2022 @08:11PM (#34023059)
I worked for the three largest mining companies in the world, and a much smaller miner before that. The small company had 1 geologist, 1 mining engineer, 1 general manager and an office admin person. The next place I went to was a similar sized mine with about 200 people in the office, and many more support people in the city. The resource was 1:1 coal to dirt and much higher quality, compared to the previous place which was 1:13 coal to dirt and way harder to mine. The large miners have the best resources in the world so they can afford to over-hire, those people don't actually do anything but make things worse doing "improvement projects", and then use bullshit charts to show why it's better. We had a huge downturn in mining about 15 years ago and they fired about 15,000 people across Australia, and overall production improved! I only work for startups now where I can be a core engineer, I had a role before where I knew I wasn't doing anything valuable and it's soul crushing, I feel sorry for those FAANG engineers who can't break free from the golden handcuffs and actually do something valuable with their time.
Re:Bun 0.3 on Wednesday December 07, 2022 @07:48PM (#33902613)
I'm also interested in this, the segmentation faults Primeagen found in Bun were concerning: https://youtu.be/qAYFepR4GcE?t=370 might have been fixed by now though.

I was seriously looking at Zig, but I'm always getting faster in Rust and it feels like the downsides of extra complexity is well worth the upsides for larger projects.

Re:AI Learns to Play CS:Go via Large-Scale Behavioural Cloning on Saturday November 05, 2022 @12:34AM (#33477997)
What they did with Dota 2 was really surprising, the AI did a technique where if it was ahead it would go behind the enemy tower to get 100% of the gold while the enemy would struggle with last hits under the tower and take creep damage. I'd never seen anyone do this before and pro's started copying this after. The way I remember them explaining it was that the AI has something it's trying to maximize for, and it plays millions of games trying slightly different variations which can lead this kind of creativity, pretty wild.
Re:The Problem with Go on Wednesday November 02, 2022 @06:46PM (#33443919)
I've made contributions to Rust repos and it was a great experience, they helped me along and were very quick with responses. I never even considered it for Go because the community shot down every idea I had.
Re:Why Functional Programming Should Be the Future of Software on Wednesday November 02, 2022 @09:17AM (#33435234)
Immutability, most things are expressions, no nulls. I think this is what they mean, it's a good experience if you want to go purely functional, they took influences from everything though.
Re:Zig 0.10.0 Release Notes on Tuesday November 01, 2022 @07:06AM (#33419552)
Sick release notes cheers Kristoff and team
Re:PyTorch 1.13 on Friday October 28, 2022 @07:10PM (#33379169)
Yeah works great, Tensorflow works great as well, but if using pip need to install tensorflow-metal and tensorflow-macos. Plus I always need to downgrade protobuf to 3.20. And couldn't get the C bindings for Tensorflow to work through metal, only through CPU.

Pretty good machine learning experience on M1.

Re:Elon Musk Owns Twitter; CEO and CFO have left on Thursday October 27, 2022 @09:37PM (#33366458)
Isn't he going to be bringing back people who were banned off the platform, that's more democratic. US has a bunch of problems but the one thing you used to get right is freedom of speech before big tech had so much influence, I thought the major purpose of Elon wanting to buy twitter was to uphold freedom of speech as it is written in the constitution, given it's something of a town square now.
Re:Kanye 'Ye' West – Lex Fridman Podcast on Tuesday October 25, 2022 @05:30PM (#33336440)
I like Lex, he's very open and wears his heart on his sleeve, he gets good answers sometimes because he's fearless with the questions he asks. His first intrview with Jim Keller is my fav ever and changed my life perspective after some of the gold Lex gets out of him. But yeah his programming knowledge seems very limited, same level as most Machine Learning engineers with science backgrounds.
Re:Go runtime: 4 years later on Tuesday September 27, 2022 @04:23AM (#32992807)
Yeah exactly, it makes everything so much more ergonomic, especially with combinators, as in chaining method calls that might return an error
Re:Go runtime: 4 years later on Tuesday September 27, 2022 @04:09AM (#32992724)
Just make it so:

varFoo, err := GetFoo()

if err != nil {

    return err
}

Can be written as:

varFoo := GetFoo()?

Just like Rust, everyone would stop complaining about Go error handling. But they have this absolutist position on syntactic sugar, even for something like this that would make the language that much nicer to look at and work with.

Re:Why does Meta Quest – Horizon Worlds look so terible? on Thursday August 18, 2022 @12:14AM (#32505191)
It will happen one day, but until someone buys a headset they keep using for more than a few days before locking it in their cupboard, it's not going to happen
Re:Twenty years of Valgrind on Wednesday July 27, 2022 @01:36AM (#32247205)
I work full-time with Rust, use it all the time to see how much memory is being allocated to the heap, make a change and then see if there's a difference, and also for cache misses:

valgrind target/debug/rustbinary

==10173== HEAP SUMMARY:

==10173== in use at exit: 854,740 bytes in 175 blocks

==10173== total heap usage: 2,046 allocs, 1,871 frees, 3,072,309 bytes allocated

==10173==

==10173== LEAK SUMMARY:

==10173== definitely lost: 0 bytes in 0 blocks

==10173== indirectly lost: 0 bytes in 0 blocks

==10173== possibly lost: 1,175 bytes in 21 blocks

==10173== still reachable: 853,565 bytes in 154 blocks

==10173== suppressed: 0 bytes in 0 blocks

==10173== Rerun with --leak-check=full to see details of leaked memory

valgrind --tool=cachegrind target/debug/rustbinary

==146711==

==146711== I refs: 1,054,791,445

==146711== I1 misses: 11,038,023

==146711== LLi misses: 62,896

==146711== I1 miss rate: 1.05%

==146711== LLi miss rate: 0.01%

==146711==

==146711== D refs: 793,113,817 (368,907,959 rd + 424,205,858 wr)

==146711== D1 misses: 757,883 ( 535,230 rd + 222,653 wr)

==146711== LLd misses: 119,285 ( 49,251 rd + 70,034 wr)

==146711== D1 miss rate: 0.1% ( 0.1% + 0.1% )

==146711== LLd miss rate: 0.0% ( 0.0% + 0.0% )

==146711==

==146711== LL refs: 11,795,906 ( 11,573,253 rd + 222,653 wr)

==146711== LL misses: 182,181 ( 112,147 rd + 70,034 wr)

==146711== LL miss rate: 0.0% ( 0.0% + 0.0% )

If you're into Vim, this is a fantastic extension for keybindings: https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim...

Older »