News for hackers. Stuff that matters.

xashor

Re:Merino Wool: The Good, the Bad, and the Not-So-Stylish on Sunday February 26, 2023 @07:19PM (#34951356)
When buying Merino please inform yourself about mulesing beforehand. Those sheep got bred so they have wrinkly skin, so more surface for wool growth. They suffer and likely die when not taken care of: the wool around the buttocks get encrusted in feces and urine, and the parts get often infested. Instead of breeding further sheep that are vulnerable to this, many farmers, for example most in Australia, cut off skin, so the scarred tissue won't grow wool. Google some images and decide if you want to support such practices. If you can't live without Merino wool, check up your sources, as there are less violent methods. But in the long run it would be better if those sheep weren't further bred.
Not saying that you actually believe this, but because of mentioning "small farms" I want to highlight the fallacy of believing that in general smaller farms are better for animal welfare: https://www.fondation-droit-animal.org/proceedings-aw/is-ani...

The abuse is often just different.

Here it is: https://www.youtube.com/watch?v=_Jk26iKx5GU

If you eat meat, eggs, drink milk, you are supporting the things shown in the video.

Re:Unicode character “ꙮ” (U+A66E) is being updated on Monday September 19, 2022 @09:42AM (#32898176)
Too bad I have to adjust my business cards for ꙮ.world
Re:Functors, Applicatives, and Monads in Pictures (2013) on Thursday October 21, 2021 @04:49AM (#28941970)

    (a -> b) -> T a -> T b
  T (a -> b) -> T a -> T b
  (a -> T b) -> T a -> T b
Re:Obfuscated Tiny C Compiler on Monday February 15, 2021 @08:00AM (#26142303)
It's part of the tokenizer. t contains data in the format of [char 0][char 1][base 64 encoded token id …], whereas the id is as long as the entry is smaller than 'b'. So it's ('++', `#m`), ('--', `%am`), ('*@', 'R<^1c'), and so on. '@' is used as a wildcard. As you can see this part parses operators.
Re:Awk: `Begin { ` Part 1 on Friday October 30, 2020 @10:06AM (#24942301)
Instead of the gawk manual, I recommend the OpenBSD manpage: https://man.openbsd.org/awk.1 It's concise and well written (as most OpenBSD manpages), so you can learn AWK even in less than 2 hours. Of course it handles only AWK, not the gawk extensions.
Re:Awk: `Begin { ` Part 1 on Friday October 30, 2020 @09:57AM (#24942215)
CSV to TSV via robust program, use AWK, and convert back if needed. Then you only have to remember the \\t\n\r escapes, not the whole quoting shenanigans.
Re:F (2006) on Friday August 21, 2020 @08:15PM (#24240345)
In J (which might be slower than K) with excessive comments for a one-liner:

    echo@> (2{ARGV) -.&([: <;._1 LF, 1!:1) (3{ARGV)
    NB.    2nd arg                          3rd arg
    NB.              g&f execute f for each, then g on both
    NB.                              1!:1 read file
    NB.                          LF, prepend newline
    NB.                 [: <;._1 split based on first char
    NB.             -.  remove right elements from left array
    NB. echo@> echo each line
    exit 0
On two ~1.6MB files with ~15k lines (both the same except 3) I had lying around:

    $ time j9 -c ./pseudo_grep.ijs test_b test_a
    …
    real   0m0.064s
    user   0m0.032s
    sys    0m0.017s
    $ time grep -vf test_b test_a
    …
    real   0m5.815s
    user   0m5.234s
    sys    0m0.576s
Note that most of the script is for loading each file into an array of lines. Most work is done by -. on the two arrays, which is exactly what you asked for, e.g. 0 1 2 3 4 -. 2 4 is 0 1 3. https://code.jsoftware.com/wiki/Vocabulary/minusdot#dyadic
Re:APL386 Unicode – An APL Font on Wednesday August 19, 2020 @02:14AM (#24207667)
Perfect! Thank you.
Re:APL386 Unicode – An APL Font on Tuesday August 18, 2020 @04:26PM (#24203924)
Still hoping for someone to design a font for J with ligatures so it can match APL's beauty for reading without making it more difficult to type, i.e. automatically rendering /: as ⍋, |: as ⍉, |. as ⌽, etc.
Re:A Tour of Acme (2012) on Thursday July 09, 2020 @05:07PM (#23785239)
Re:EnTT: Gaming meets Modern C++ on Sunday May 10, 2020 @07:06AM (#23131722)
Side note: The vel+pos example is a common one in ECS. It also often follow that you should put them in one type in the real world. However, nowadays thanks to SIMD instructions, it is probably faster to have them separate, as you don't have to unpack/align the various fields:

  // p={(x0,y0),(x1,y1),...} and v={(vx0,vy0),(vx1,vy1),...}
  for(int j=0;j<2*SIZE;j++)p[j]+=v[j];
vs.

  // pv={(x0,y0,vx0,vy0),(x1,y1,vx1,vy1),...}
  for(int j=0;j<4*SIZE;j+=4)
    pv[i+0]+=pv[i+2],pv[i+1]+=pv[i+3];

  LABEL = sys._getframe().f_lineno
  print(1)
  j(LABEL)
Re:Battle Chess on Sunday November 24, 2019 @10:39PM (#21625268)
That's quite fun (especially chain-capturing!), can't beat Alpha Beta 3 yet. Any reasons for Rule 6?
I think $IFS is only used by the shell (with read and expansions), not by e.g. sort. It is so at least on my system.
We took the wrong path quite some time ago. Most of the POSIX utils like sort, cut, grep only support \n (or sometimes \0) as row separator.
Re:Quiet Hacker News (2017) on Monday July 22, 2019 @05:48AM (#20496545)
- Original position on the HN frontpage

- Score

- Link

- Upvotes

- Comments

Re:Quiet Hacker News (2017) on Monday July 22, 2019 @05:17AM (#20496406)
Not really using it, I sort the frontpage by (votes/comments) to filter 'Comment sections that will devolve into discussions (see: condescending, pedantic arguments)' and their links: http://xash.in/hn/
I use it for playing around with some game ideas, really liked the ease of it. Clean, compact API.

Only nuisance is that SUPPORT_BUSY_WAIT_LOOP is defined in the defaults, so I can't use the package from my distribution but have to compile it myself – as I don't want 100% CPU usage when prototyping (where I can happily live with inaccuracies of the timers). I considered opening an issue and forgot about it. But you, Ray, seem to be reading this thread anyway. :-) Thanks, by the way!

Re:Why Telegram is insecure (2015) on Sunday January 06, 2019 @01:02PM (#18839581)
For text? Nah. Most apps automatically store photos on your device, and that's fine. Mobile phones have several GB for storage. That is enough for hundred thousands of messages, before even noticeable. Please reconsider your E2E policy and don't make the world a more insecure place.
Re:Why Telegram is insecure (2015) on Sunday January 06, 2019 @12:48PM (#18839487)
You must link a client with a mobile device, but after that apparently you can use e.g. the Desktop client without your mobile phone turned on.
Re:Why Telegram is insecure (2015) on Sunday January 06, 2019 @12:37PM (#18839424)
Yeah, I'm not sure about it. I'm not a security expert that can look at the protocol for some weeks and come to a conclusion. Believing them after they did things wrong is not very convincing. Given some years and many eyes, and I might believe it. But until then?
Re:Why Telegram is insecure (2015) on Sunday January 06, 2019 @09:51AM (#18838572)
>Telegram regularly has contests to break its encryption with a reward of 300K USD https://telegram.org/blog/cryptocontest

>If it's not secure, then surely people would be cashing in on that sweet money. So, why is it that we constantly see articles talking about how insecure Telegram encryption is, but nobody is showing a proof of concept attack or collecting the prize?

regulary != 2 times with limited time. Also, E2EE is not only about decrypting a message. E.g. signing messages as someone else isn't awarded. Also, you might need a lot of computation power. SHA-1 used in MTProto 1.0 for example is practically pretty secure, but not against a well funded attack.

But that aside, Telegram's encryption is probably good enough. But we already have standards that are good enough. Why risk it?

For example, from On the CCA (in)Security of MTProto[0]:

>Telegram is a popular messaging app which supports end-to-end encrypted communication. In Spring 2015 we performed an audit of Telegram's Android source code. This short paper summarizes our findings. Our main discovery is that the symmetric encryption scheme used in Telegram -- known as MTProto -- is not IND-CCA secure, since it is possible to turn any ciphertext into a different ciphertext that decrypts to the same message.

>We stress that this is a theoretical attack on the definition of security and we do not see any way of turning the attack into a full plaintext-recovery attack. At the same time, we see no reason why one should use a less secure encryption scheme when more secure (and at least as efficient) solutions exist.

>The take-home message (once again) is that well-studied, provably secure encryption schemes that achieve strong definitions of security (e.g., authenticated-encryption) are to be preferred to home-brewed encryption schemes.

And that aside, E2EE is not default and neither E2E group chats or E2E video calls are supported. This is the biggest security problem.

[0] https://dl.acm.org/citation.cfm?id=2994468

Re:Why Telegram is insecure (2015) on Sunday January 06, 2019 @08:09AM (#18838131)
It doesn't relly matter that much if Facebook has your metadata or Telegram has your metadata. What's more important: WhatsApp E2E is more secure than Telegrams self built E2E, that needs to be enabled and doesn't support group chats.

Also, Telegram isn't that open source either: server side is closed source and the client side seems to be still an undocumented, mirrored mess.

So for me at least, as I don't want anyone that easily to read my messages: many other solutions > WhatsApp > Telegram.

Re:Why Telegram is insecure (2015) on Sunday January 06, 2019 @07:21AM (#18837982)
With Signal, if a the numbers registers a new account like in this attack scenario, 1. the attacker cannot access old/pending messages (as they are always encrypted), and 2. the person on the other side of the conversation gets a warning that the keys have changed, thus need new verification before continuing the conversation. So, Signal is more secure on that front.
Re:Non-Euclidean Worlds Engine [video] on Thursday January 03, 2019 @05:53PM (#18820156)
Here is an example level [0]. You can see some scripts in there enclosed by InitScript { … }, RunScript { … }. This gets parsed, compiled and called in [1]. In [2] you have your scripthelpers.h, defining what parts of the engine the script can see. On a first glance I don't see support for persistence across recompilation for scripting variables, and things like position/orientation of the camera are simply stored in the engine and not recompiled.

For a similar approach, see e.g. Interactive Programming in C [3], which relies on re-loading a shared (recompiled) library. But this step could also be done by recompiling via tcc. There the persistent data lives just in the heap and pointers to it get passed to the next version of the library.

[0] https://github.com/cnlohr/noeuclid/blob/0831b9ce21620704257a... [1] https://github.com/cnlohr/noeuclid/blob/0831b9ce21620704257a... [2] https://github.com/cnlohr/noeuclid/blob/a8e1e038829686f39d48... [3] https://nullprogram.com/blog/2014/12/23/

Effectively there will be no consequences. Technically Zwiebelfreunde could file charges against the judge who signed the orders or the police who executed them, but effectively they will not be prosecuted, let alone convicted. Nearly all illegal police activity in Germany had no real consequences, because there is a „high trust” in them by ruling parties.

Some examples from the last year:

http://www.spiegel.de/panorama/justiz/g20-polizei-soll-recht...

https://www.hessenschau.de/panorama/durchsuchung-des-asta-st...

Older »