HackerTrans
TopNewTrendsCommentsPastAskShowJobs

balnaphone

1,259 karmajoined 14 वर्ष पहले

comments

balnaphone
·कल·discuss
Unfortunately, this is unreadable slop for me. Just from the TOC, and first few lines, it puts the reader in LLM hell. "Not X. Y." "Honest results" "The real work" "Where it landed"..... Aaaaarg! Please God, no more!
balnaphone
·2 माह पहले·discuss
Re: Sandhill. This literally sounds like BNR humour circa '94.
balnaphone
·4 माह पहले·discuss
It works fine with GNU env with -S support, and a GNU-compatible kernel. I'm aware that won't work on some other systems, hence the 9 other examples. I said I would try that first and see how it goes, and low and behold it works fine on the systems I use.

  $ cat bbb.ml 
  #!/usr/bin/env -S "/home/user/.local/bin/o c a m l" -no-version
  print_endline "ok";;
  $ ls -lh ~/.local/bin/"o c a m l"
  lrwxrwxrwx 1 user user 14 Feb 27 07:26 '/home/user/.local/bin/o c a m l' -> /usr/bin/ocaml
  $ chmod a+rx bbb.ml
  $ ./bbb.ml
  ok
  $ 
But if it didn't work, you can get pretty good mileage out of abusing sh to get the job done for many popular languages.
balnaphone
·5 माह पहले·discuss
These are part of the rituals of learning how a system works, in the same way interns get tripped up at first when they discover ^S will hang an xterm, until ^Q frees it. If you're aware of the history of it, it makes perfect sense. Unix has a personality, and in this case the kernel needs to decide what executable to run before any shell is involved, so it deliberately avoids the complexity of quoting rules.

I'd give this a try, works with any language:

  #!/usr/bin/env -S "/path/with spaces/my interpreter" --flag1 --flag2
Only if my env didn't have -S support, I might consider a separate launch script like:

  #!/bin/sh
  exec "/path/with spaces/my interpreter" "$0" "$@"
But most decent languages seems to have some way around the issue.

Python

  #!/bin/sh
  """:"
  exec "/path/with spaces/my interpreter" "$0" "$@"
  ":"""
  # Python starts here
  print("ok")
Ruby

  #!/bin/sh
  exec "/path/with spaces/ruby" -x "$0" "$@"
  #!ruby
  puts "ok"
Node.js

  #!/bin/sh
  /* 2>/dev/null
  exec "/path/with spaces/node" "$0" "$@"
  */
  console.log("ok");
Perl

  #!/bin/sh
  exec "/path/with spaces/perl" -x "$0" "$@"
  #!perl
  print "ok\n";
Common Lisp (SBCL) / Scheme (e.g. Guile)

  #!/bin/sh
  #|
  exec "/path/with spaces/sbcl" --script "$0" "$@"
  |#
  (format t "ok~%")
C

  #!/bin/sh
  #if 0
  exec "/path/with spaces/tcc" -run "$0" "$@"
  #endif
  
  #include <stdio.h>
  
  int main(int argc, char **argv)
  {
      puts("ok");
      return 0;
  }
Racket

  #!/bin/sh
  #|
  exec "/path/with spaces/racket" "$0" "$@"
  |#
  #lang racket
  (displayln "ok")
Haskell

  #!/bin/sh
  #if 0
  exec "/path/with spaces/runghc" -cpp "$0" "$@"
  #endif
  
  main :: IO ()
  main = putStrLn "ok"
Ocaml (needs bash process substitution)

  #!/usr/bin/env bash
  exec "/path/with spaces/ocaml" -no-version /dev/fd/3 "$@" 3< <(tail -n +3 "$0")
  print_endline "ok";;
balnaphone
·7 माह पहले·discuss
When you say "just... run linux", are you referring to termux, or something else ? How do you run a linux userspace in Android ?
balnaphone
·6 वर्ष पहले·discuss
> Mandatory military service otherwise known as government mandated slavery

>> It depends if you think of your country as an accessory burden or as the ensemble of your fellows.

This "depends" clause doesn't logically follow, since the "slavery" label applies in either circumstance. If one's country is an "ensemble of your fellows", then volunteering for military service may logically follow from that; forcing others to do so, does not. In either case, whether one feels connected to one's country or not, being compelled by force to participate in the military can legitimately be seen as a form of slavery -- since the victim is unable to withdraw unilaterally from their compelled service.

If one cares deeply about their own countrymen, why would one want to enslave them, and remove their choice and freedom in the matter?
balnaphone
·10 वर्ष पहले·discuss
Unfortunately, there is only a single line in the linked blog post regarding the economics of the situation : "made without the benefit of mass volumes (no millions of devices here)". The rest of the post is essentially meaningless, since it doesn't address the cost issue. The complexity in a sub-1k$ mobile phone is far greater than in a typical ultrasound imaging device that is currently in the field, but the economics of mass production enable massive reductions in price.

In other words, you've provided some suggestions regarding the difficulty of the task, but have not in any way proven or convincingly demonstrated that sub-1k$ ultrasound imaging devices are an impossibility.

From my POV, having also spent many years designing imaging systems and other devices to measure the human body (ultrasound, EEG, EKG, MRI), the biggest challenge to providing cheap consumer-grade tech here is the regulatory burden. If anyone wants to buy a sub-1k$ ultrasound imaging device, there are plenty of unapproved models on Alibaba that work just fine -- provided you're willing to test the device yourself for safety, to ensure it meets your own risk tolerances.