News for hackers. Stuff that matters.

anaphor

Re:My favorite prime number generator on Wednesday August 23, 2023 @12:46PM (#37238753)
There's a functional / lazy version I like that uses a priority queue in order to get the next prime number https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf

It basically uses the priority queue to store all the composites up to a certain point and then you can assume the next one is prime.

I had some (admittedly not well written) code for it too https://gist.github.com/weskerfoot/4699275

It can also incorporates the wheel factorization optimization mentioned in this article.

Because they all cheated on their coursework and got graded on a curve for exams. Source: I was a TA for an intro CS course.
Watch EEVblog's playlist on DC theory, and then play around with a breadboard and simulations using something like circuitjs. Get some basic tools such as a soldering iron (and solder/wick/sponge/etc), breadboard, wires, and a collection of components like resistors, capacitors, and LEDs, and so on. r/AskElectronics has a guide for all of the practical stuff you need. Pick a project you actually find interesting and work on it (after learning how to safely use your tools and components).

Lots of people get started with things like using a microcontroller to light up some LEDs and so on. That will introduce you to basic concepts like how transistors work as well if you dig into it.

https://www.youtube.com/watch?v=xSRe_4TQbuo&list=PLvOlSehNtu...

https://www.falstad.com/circuit/circuitjs.html

https://www.reddit.com/r/AskElectronics/wiki/beginners/

I have Teksavvy via Cogeco and had no issues (obviously). I just discovered Rogers owns 41% of their shares though :|
These are just reports people made that the sites were down. Not actual data from monitoring tools or something. I used my Canadian banking website a bunch of times yesterday and had no issues. Banking websites go down for maintenance or randomly start acting slow because of the crappy infrastructure they're built on, or because of other reasons located between your computer and their servers. Nothing I've seen shows any actual evidence that anything out of the ordinary happened. Just confirmation bias.
Re:Living on 24 hours a day on Thursday January 13, 2022 @11:30PM (#29930605)
Or block all of the non-educational youtube channels. Personally a good portion of my youtube usage is educational videos about electronics now. It feels like much less of a waste of time than twitter or instagram.
Re:Memories of the “Sneakers” Shoot (2012) on Friday January 07, 2022 @04:08PM (#29844843)
They referenced the movie on Stranger Things as well with a line similar to the one River Phoenix's character says: "It's fascinating what 50 bucks will get you at the county recorder's office"
Re:Why It’s So Difficult – and Costly – To Secure Chips on Thursday December 02, 2021 @03:58PM (#29422447)
You can even place a backdoor on a circuit without any noticeable physical changes (other than chemical differences which are extremely hard to detect). You basically change which chemicals are used to "dope" the transistors, which changes their polarity.

See: https://news.ycombinator.com/item?id=26860715

Re:Ask HN: Has Google search become quantitatively worse? on Tuesday November 30, 2021 @12:43PM (#29394989)
It works if you put it in "Verbatim" mode for that particular search, but I don't know how to make it permanent. Does anyone know if there's a way to always force it to use "verbatim" mode?
Re:Nim Community Survey on Monday November 22, 2021 @05:19PM (#29312223)
That's awesome. I didn't file an issue yet but I was hoping to try it again soon and get a better idea of what's going wrong first.
Re:Nim Community Survey on Monday November 22, 2021 @11:56AM (#29308572)
You can always call the C functions directly (from a shared lib) although admittedly it's a pain because you have to deal with unmanaged pointers very often.
Re:Nim Community Survey on Monday November 22, 2021 @11:09AM (#29307929)
I would really like to see more work on improving the use of Nim for programming microcontrollers. I stumbled on to https://github.com/elcritch/nesper recently and it looks neat, but I had issues getting my code to compile. Improved support for other MCUs like the esp8266 and atmega32u4 would be really cool and useful. It would be nice to have Nim as a higher level alternative to micropython or lua in the embedded world (your only other real alternatives being C/C++ or Rust).

I also found this https://disconnected.systems/blog/nim-on-adruino

Re:Doubling the PinePhone storage speed with a soldering iron on Wednesday November 17, 2021 @10:31PM (#29261696)
good to know! I was a bit confused by that at first :)
Re:Doubling the PinePhone storage speed with a soldering iron on Wednesday November 17, 2021 @10:21PM (#29261651)
So this blog post covers the 1.0 hardware revision, but I just opened up mine out of curiosity and realized I have the 1.2 revision, which uses the sandisk chip, so everything is different. Not 100% sure which components need to be changed there, but it would be good to figure out the exact instructions for both types.
Re:Doubling the PinePhone storage speed with a soldering iron on Wednesday November 17, 2021 @08:55PM (#29261215)
I would recommend getting a roll of kapton tape as well (make sure it's not counterfeit), and then use that to mask other components so you don't accidentally damage stuff
Re:Doubling the PinePhone storage speed with a soldering iron on Wednesday November 17, 2021 @08:47PM (#29261175)
you could use an appropriate hot air station + some flux as well I think (and a good pair of tweezers designed for electronics)

Also, kapton tape is very useful if you're afraid of damaging stuff around it

Re:ProctorU is dystopian spyware on Tuesday November 09, 2021 @12:39PM (#29164701)
Doctors google rare disease symptoms sometimes, however, and it's seen as a legitimate thing to try if you're truly stumped by a mysterious illness.
Named-data networking is literally what this is describing, except NDN works as a replacement for TCP, not HTTP. In the long term I'd rather have it work at a lower level and not have to think about it much. https://www.youtube.com/watch?v=gqGEMQveoqg
Re:Multitasking Doesn't Work on Friday October 08, 2021 @12:00PM (#28800724)
And if you enjoy piano, there's some music specially created for this purpose https://en.wikipedia.org/wiki/Vexations
Re:Multitasking Doesn't Work on Friday October 08, 2021 @11:54AM (#28800629)
I find that I can focus better if I listen to a single track on repeat (I've done it literally for hours). The repetition helps for some reason because you're not surprised.
Re:Reasons to Quit Social Media on Wednesday September 22, 2021 @02:32PM (#28619965)
They're presenting a bit of a false dichotomy. You can use social media and still be sane, you just have to have some amount of self awareness so the troubling aspects don't affect you as much.
Re:Show HN: Web browser to help programmers think clearly on Tuesday September 07, 2021 @07:13PM (#28450992)
I'm guessing this is done with WebKit so I wonder how hard it would be to port to Linux/Windows. Also it would be neat to have vim-like keyboard shortcuts.
I'm assuming you've read the book and have looked at all of the arguments and evidence in it, otherwise this might seem like an uninformed opinion.
One of the people quoted in this article, Robert E. Bartholomew, also wrote a book on the Havana Syndrome, which is most likely another case of mass psychogenic illness.

https://www.springer.com/gp/book/9783030407452

I've been reading it, and I would highly recommend it to anyone who wants to learn more.

Re:Forgetting My First Language on Saturday September 04, 2021 @12:52AM (#28412173)
Seems to be much more common as a thing with children who haven't finished acquiring both their L1 and L2 (as in multilingual) while still going through the biological sensitive period where you have to acquire language.

https://en.wikipedia.org/wiki/Language_attrition#Age_effect

Re:So You Want to Study Philosophy on Thursday September 02, 2021 @12:55AM (#28388783)
As someone with a philosophy degree this isn't a great list. Most of the recommended readings seem like random textbooks they found. It's pretty light on actual source material, and when they do list it, it's a bit bizarre, like recommending "On Formally Undecidable Propositions of Principia Mathematica and Related Systems" for philosophy of mathematics (Not that I think it's not worth reading, but not as your introduction to philos of math!), or recommending Kuhn as a supplemental reading, but not Popper, Bacon, Hume, etc.

FWIW, for philosophy of mathematics, I'd recommend reading "Introduction To Mathematical Philosophy" by Bertrand Russell. The recommendation of The Frege Reader is actually good, but I'd recommend watching some lectures or something as well, otherwise it'll be a difficult read.

Re:A Lisp interpreter written in Lisp (2017) on Monday August 09, 2021 @05:04PM (#28122317)
Sort of

  $ cat lol.c 
  #include <stdio.h>
  #include </dev/tty>
  $ gcc lol.c
  int main() { printf("lol\n"); } // hit Ctrl+D
  $ ./a.out 
  lol
That is complete nonsense. The study you're quoting was discredited. They essentially grouped a bunch of random symptoms together and said they were the same thing. If you run enough tests for different things you'll eventually find something "wrong", that doesn't mean there actually is.
Re:Do Low-Level Optimizations Matter? (2020) on Sunday July 18, 2021 @01:59PM (#27874959)
This is a thing, see https://www.youtube.com/watch?v=FJJTYQYB1JQ (talk by Andrei Alexandrescu at CppCon 2019 about this exact idea)

Older »