Re: c/unix q

2013-10-25 Thread E.S. Rosenberg
2013/6/6 Erez D erez0...@gmail.com:



 On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz wrote:

 On 04/06/13 15:28, Erez D wrote:

 thanks,

 so i guess if i use unidirectional connection, and the reader does not
 expect to get an EOF()
 thank i'm safe.

 Why are you so keen on doing it wrong?

 No, you are not safe. If the child process dies because of a segmentation
 fault (or whatever), the parent will notice this through the EOF received (I
 am assuming here, since you couldn't be bothered with closing a file
 descriptor, that you did not install a SIGCHLD handler to monitor for this
 possibility). This means that should one process die unexpectedly, the other
 will hang forever.

 it's not a matter of being bothered. closing a file has it's implications

 1.  close the file for one thread closes for all
thread and fork are 2 very different things, best practice for fork
('full' children, I think everyone understands fork() when you say
child) is to close, when using threads that is I believe not the case.
 2. what if i want later children using the same pipe, as in all childs write
 to same pipe read by parent...
so the children are all closing the read end and the parent only
closes write, where is the problem?


 Best practices are there for a reason, despite what others here might have
 you think.

 Shachar



 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Off topic - technology use survey

2013-10-25 Thread E.S. Rosenberg
Google docs form with the survey of your questions and analyse the results?

2013/10/23 Steve G. word...@gmail.com:
 Hi Everyone,

 I am looking for a survey (research instrument) that I can use to ask people
 about their digital communication habits and preferences. I need access to
 the content - the questions, if you will, and instructions if any in use of
 the data.

 By digital communications I mean cell phone (smart, feature, regular text
 only), Internet access (high speed, work/home/library), computer hardware
 (desktop, laptop, tablet), computer software use (mostly communications -
 skype, twitter, facebook, messaging software - computers or cellular).

 By survey I mean - if possible - a validated research instrument, one that
 has been used for a while, and is known to be accurate. It is better if it
 were in Hebrew, but I can translate from English or Spanish if needed.

 I know that both commercial, public and academic surveys are run every now
 and then. If you know of one, or can refer me to someone who does, I'd
 appreciate it.

 This is for a University research project. I can give details off-list if
 anyone is interested.

 Thanks,

 Z.

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Is forbidding concurrent ssh sessions a good idea?

2013-10-25 Thread E.S. Rosenberg
2012/11/12 Yedidyah Bar-David linux...@didi.bardavid.org:
 On Mon, Nov 12, 2012 at 06:32:25PM +0200, E.S. Rosenberg wrote:
 +1 for tmux, this does however imply that all the admins are using the
 same account to login (bad scenario) with or instead the tmux/screen
 line should be added at the end of /root/.profile and not ~/.profile

 IIRC screen, perhaps tmux too, has some rather complex set of permissions
 management options, which I would not be surprized if it turns out that
 actually do allow sharing a session from two different users. I did not
 try this. I su to the person's user if I want to share a session. Note
 that (by default?) you need to chown your tty to the other user or
 screen won't work.


 Just note that tmux inside of tmux or screen inside of screen tend to
 behave bad/not work, screen inside of tmux works, I never tried the
 other way around.

 Never had problems with screen inside screen. Actually, my everyday
 work environment comprizes of 3-level screens, some of which also have
 tmux inside them. I use different key combinations to travel around and
 it works very well. IIRC I did have to change a few configuration options
 when moving it from RedHat/CentOS to Debian, but other than that, it
 worked more-or-less error-free for something like 5 years now.

 Tell me if you want my configuration. It's not very elaborate, only
 does what it's meant to do - if you google for things like screenrc
 you'll find many examples of what people do with it.
Oh sorry I meant by default, if you take the time to modify the
key-bindings of the screen/tmux you want to nest then you should be
fine.
Regards,
Eliyahu - אליהו
 --
 Didi


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Motherboards for new Ubuntu install

2013-10-25 Thread E.S. Rosenberg
2013/6/30 Baruch Siach bar...@tkos.co.il:
 Hi Eliyahu,

 On Wed, Dec 26, 2012 at 04:11:57PM +0200, E.S. Rosenberg wrote:
 2012/12/26 Baruch Siach bar...@tkos.co.il:
  On Wed, Dec 26, 2012 at 03:45:27PM +0200, E.S. Rosenberg wrote:
  What is the output of 'lspci -n'?
 1969:1090
 
  The weird thing was that the driver detection program didn't realize 
  this...
 
  Either way the package that provides the 'alx' driver on Ubuntu 12.10 is:
  linux-backports-modules-cw-3.6-quantal-generic
 
  Are you sure it is not 'atlx'?
 my modprobe history don't lie ;) neither does lspci -v

 The alx driver was merged into the mainline kernel a few days ago (commit
 ab69bde6 alx: add a simple AR816x/AR817x device driver). Its list of
 supported PCI IDs include PCI_VENDOR_ID_ATTANSIC:ALX_DEV_ID_AR8162 (=
 1969:1090). Kernel version 3.10 which is about to be released in a few days,
 should have support for this hardware out of the box.
Cool :)
I hope they also solved the issue with it preventing suspend (I
now unload it manually and only reload it when I need wired
networking)
Although that may be a pm bug and not kernel...

Regards,
Eliyahu - אליהו


 baruch

 --
  http://baruch.siach.name/blog/  ~. .~   Tk Open Systems
 =}ooO--U--Ooo{=
- bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Emacs Hebrew

2013-10-25 Thread Eli Zaretskii
 From: w...@zak.co.il (Omer Zak)
 Date: Sun, 10 Jun 2012 19:11:51 +0300
 
 On Sun, 2012-06-10 at 18:56 +0300, Nadav Har'El wrote:
  On Sun, Jun 10, 2012, Tzafrir Cohen wrote about Re: Emacs  Hebrew:
   The Bidi has landed!
   
   Quoting https://www.gnu.org/software/emacs/NEWS.24.1 :
  
  Do you know if there's an option to NOT do Bidi, and just show
  everything left-to-right as previously?
 
 +1
 
 It is a very important option.  Sometimes I open a mixed language file
 in Emacs just to see the logical order of glyphs in a segment which is
 visually messed up.
 
 Will Emacs 24.1 rob me of this use case?

You know, it is quite ironic that, having heard about a major Free
Software project which now fully supports bidirectional scripts
including Hebrew, the first thing people here ask is how to disable
that feature.  Not whether it works, not if it's any good, not how
well it supports this or that aspect of bidirectional editing -- but
how to turn it off.  A sobering experience, I must say.

I sincerely hope that from now on people here will speak much more
about bidi on emacs-de...@gnu.org, reporting bugs, asking for
features, contributing code, etc.  This cannot be one-man's war like
it was until now -- that is, if we want Hebrew support in Emacs to be
not just good, but exceptional.

Enjoy Emacs 24.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: anybody knows of a mifi i can run linux on ?

2013-10-25 Thread E.S. Rosenberg
2012/11/20 Erez D erez0...@gmail.com:


 On Tue, Nov 20, 2012 at 5:48 PM, Jason Friedman write.to.ja...@gmail.com
 wrote:

 Hi Erez,

 Your original email was pretty vague:

  I am looking for a Mifi (i.e. cellular wifi) router which i can run
  linux on.

 So I'm not sure why you are surprised with the responses. I interpreted
 that as you wanting something relatively small that runs linux and can
 connect to cellular networks. You might want to be a little more specific
 with what you want if you want more specific responses.

 Here is another suggestion (again, it depends on why you want to run linux
 on it). Get a cheap android phone. It runs linux (sort of) and can act as a
 router.

 Hope that helps :)

 This suggestion is a lot better,
 however I would still preffer a mifi, as it is cheaper, and exactly does
 what i want, nothing more, nothing less
 ( i do not need the screen, audio, computing power, etc, )

 Thanks for your help,
 Erez.

 btw, did i made anybody smile with the true story of the zebra ?


 Jason



 On Tue, Nov 20, 2012 at 5:28 PM, Erez D erez0...@gmail.com wrote:

 A real story:

  In the Palestinian zoo, they didn't have a zebra, and they wanted one,
 So they took a donkey, and drew stripes on it with paint.


 Why am i telling this story,
 because i wanted a MIFI, and i got 10 replies telling me to take  a
 wireless router and add a 3g dongle.
 and that reminded me about the donkey with painted stripes.

 no offense but,
 maybe this is because people are too eager to help
 but a wireless router is not built with small size, low battery
 consumption and many other consideration a mifi does.
 do you thing i can sell a wireless router + 3g dongle + battery as a
 product ? people will laugh at me and i will be out of business.

 so thanks for your help, but if you know of a MIFI I can put some kind of
 Linux on, please let me know
If you trust alibaba:
http://www.alibaba.com/product-gs/667512945/openwrt_router_mifi_3g_router_usb.html

Second result of google search for mifi router openwrt...
Although my guess is that you also found that and your real question is:
Has anyone else done this and can they recommend some device so that
I spend my money well

HTH,
Eliyahu - אליהו


 Thanks
 Erez

 (and again, no offense meant)

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




 --
 Jason Friedman, PhD
 Department of Physical Therapy
 Tel Aviv University
 email: write.to.ja...@gmail.com
 web: http://curiousjason.com



 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Is forbidding concurrent ssh sessions a good idea?

2013-10-25 Thread E.S. Rosenberg
2012/11/12 Yedidyah Bar-David linux...@didi.bardavid.org:
 On Mon, Nov 12, 2012 at 12:51:46PM +0200, Nadav Har'El wrote:
 On Mon, Nov 12, 2012, Elazar Leibovich wrote about Re: Is forbidding 
 concurrent ssh sessions a good idea?:
  While I can certainly see what's broken with it for using a regular
  computer, whose stability I do not value much, and while there are
  difficulties this may cause, do you see anything specific that will break
  in the use case of a production server?

 Let me offer another completely different idea, without any kills and
 similar tricks: End your ~/.profile with screen -R -D

 What will this do?

 The login shell will start screen(1), and let the admin work in it.
 If another admin logs in, he doesn't just kill the existing session - he
 also takes over the existing instance of screen, and can see what the
 other admin was in the middle of doing.

 This screen will also allow the admin to have multiple screens - which
 you prevent him from doing with several separate sshs, so he'll
 appreciate screen anyway.

 If you don't know screen(1), I suggest you learn it - it is an
 absolutely wonderful tool.

 ...and also look at its '-x' option which will allow sharing a session
 from two (or more) connections. This way your two admins will be able
 to talk over the phone while solving a problem together and not having
 to tell each other what they did and what happened.

 And while at it, also have a look at tmux, which is a screen replacement.
+1 for tmux, this does however imply that all the admins are using the
same account to login (bad scenario) with or instead the tmux/screen
line should be added at the end of /root/.profile and not ~/.profile

Just note that tmux inside of tmux or screen inside of screen tend to
behave bad/not work, screen inside of tmux works, I never tried the
other way around.

Regards,
Eliyahu - אליהו

 --
 Didi


 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: replace string foo to bar AND bar to foo in the same file

2013-10-25 Thread E.S. Rosenberg
echo foobar foo bar | sed 's/foo/@foo/g; s/bar/@bar/g; s/@foo/bar/g;
s/@bar/foo/g'

based on:
http://stackoverflow.com/questions/13991017/swap-two-strings-simultaneously
found through:
https://www.google.co.il/search?q=sed+swap+foo+and+bar

חג שמח,
Eliyahu - אליהו

2013/9/25 vordoo vor...@yahoo.com:
 Hi,

 I know how to: sed -i 's/foo/bar/g' *.txt

 But how do I: replace string foo to bar AND bar to foo in the same file??

 Thanks!

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: OT: mailbox generator

2013-10-25 Thread E.S. Rosenberg
Not just here, also in the US, and Europe they can search
computer/storage devices without a warrant when passing the border

2013/4/25 Tzafrir Cohen tzaf...@cohens.org.il:
 Off topic, but may be interesting:

 I heard recently that it is now legal for the security checks in the Ben
 Gurion airport to require that I show my mail account.

 Any existing software to automatically (and periodically) generate email
 on a mailbox which will appear to be used, so if anybody wants a casual
 look at my mailbox, I don't have to provide any real email credentials?

 --
 Tzafrir Cohen | tzaf...@jabber.org | VIM is
 http://tzafrir.org.il || a Mutt's
 tzaf...@cohens.org.il ||  best
 tzaf...@debian.org|| friend

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: filesystem capable of deduping tar.gz's content

2013-10-25 Thread E.S. Rosenberg
2013/5/8 Elazar Leibovich elaz...@gmail.com:
 On Wed, May 8, 2013 at 10:47 PM, Oleg Goldshmidt p...@goldshmidt.org wrote:


 Disclaimer: I am definitely not an expert on the subject matter and I
 hardly know what I am talking about (in this case?). Creativity is no
 substitute for knowing what you are doing.

 Now let me try and get creative.

 What is your purpose? Just doing something fancy to impress your boss


 My real purpose, or the official stated purpose ;-)
 The thing is, we build 400MB artifact multiple times a day. Say
 5×200×400=400Gb a year, not sure I have the space. This means I have to
 maintain the repository (delete old build results, etc).
 OTOH, if I use dedupe technique, I can keep all build artifacts and forget
 about it altogether. I'll never ever fill a modern 250Gb disk.

Considering the _low_ price of storage these days why in the world
would you invest expensive time and effort in a complicated way of
saving a few bytes here and there?
3xx NIS buys you 1TB, considering you want some data safety so you
mirror or do some form of redundant RAID or RAID 5 and you spend some
more but have storage that should last you for several years by your
calculations.
In addition if you build lots of times and every build result is one
tar.gz you can just clean up all the tar.gz files that never became
production periodically (I assume builds that get shipped get
moved/copied to a different location) for far less the cost then
developing a layer on top a filesystem that does a task that is beyond
what a filesystem should do (ie. open a [compressed] file and examine
its' contents).
[find /path/of/builds -mtime +30 -exec rm {} \;]


 or
 truly save space, e.g., if this stuff - everything that gets built - is
 backed up? I'll assume the latter.

 [Aside: if it is not backed up, how many versions do you really need to
 keep and why is it an issue?]

 1. I would probably look into using a version control system rather than
a filesystem.

a) Modern version control systems are often/usually capable of
   storing binary diffs between revisions. Frankly, I've never looked
   at how git or mercurial do that (probably quite well), but even,
   say, SVN should be able to store a binary diff on commit. IIRC SVN
   diffs using xdelta or similar.


 I suspect they don't work well on gzipped content:

 Binary file with diff:

 (fabenv_mac)❯ du -h .git/objects
 4.0K .git/objects/08
 232K .git/objects/3d
 4.0K .git/objects/44
 4.0K .git/objects/84
 232K .git/objects/d7
 4.0K .git/objects/ee
   0B .git/objects/info
   0B .git/objects/pack
 480K .git/objects
 (fabenv_mac)❯ git gc
 Counting objects: 6, done.
 Delta compression using up to 8 threads.
 Compressing objects: 100% (6/6), done.
 Writing objects: 100% (6/6), done.
 Total 6 (delta 1), reused 0 (delta 0)
 (fabenv_mac)❯ find .git/objects/ -type f|xargs du -h
 4.0K .git/objects//info/packs
 4.0K .git/objects//pack/pack-bd546ad638a3a27e16e57298469558cdd5018879.idx
 216K .git/objects//pack/pack-bd546ad638a3a27e16e57298469558cdd5018879.pack

 However when it's gzipped:

 (fabenv_mac)❯ find .git/objects/ -type f|xargs du -h
 4.0K .git/objects//2a/8fc1caff72cb043bbf18d240c54315f9d0
 4.0K .git/objects//4e/71017582e4f46b3641d27084e5cae0c3303974
 216K .git/objects//70/81d2b08bc00dff607aea60e9c6fecbc6950b16
 216K .git/objects//8e/71116f4a7f89af36051b8b431427c0e88ab741
 4.0K .git/objects//92/00e8eaf6093e6cfd07735bc9fe30da4e86db33
 4.0K .git/objects//9d/e5e4af60673998992579be40960d65a5b498a3
 (fabenv_mac)❯ git gc
 Counting objects: 6, done.
 Delta compression using up to 8 threads.
 Compressing objects: 100% (6/6), done.
 Writing objects: 100% (6/6), done.
 Total 6 (delta 0), reused 0 (delta 0)
 (fabenv_mac)❯ du -sh .git/objects
 440K .git/objects
 (fabenv_mac)❯ find .git/objects/ -type f|xargs du -h
 4.0K .git/objects//info/packs
 4.0K .git/objects//pack/pack-5253e59d6e6950fbbf8455310bb32e3004ded6b2.idx
 432K .git/objects//pack/pack-5253e59d6e6950fbbf8455310bb32e3004ded6b2.pack

 Note the total size didn't change when the same two versions of the file
 (gcc binary with the first byte changed) were gzipp'd.


b) I suppose one can write commit/get (I use this terminology only
   because I mentioned SVN, consider it generic) hooks for most
   version control systems to tar/untar (and possibly zip/unzip jars)
   if you really need something close to what you described.


 All your suggestions are basically good, but they mean I have to change the
 work style of all the team.
 The main benefit in my suggestion is, that it's completely transparent. I
 add a single mount command to the directory I already keep my binary files,
 and that's it. Everything still works as usual, except I never need to worry
 about deleting anything.
Yes but the disadvantage is that you still have to develop the whole
thing (which breaks out of fs boundaries), is the value of developing
that and not getting people used to decent verioning systems (which 

Re: [YBA] Linux on Intel R1000GZ

2013-10-25 Thread E.S. Rosenberg
2013/2/25 Jonathan Ben Avraham y...@tkos.co.il

 Hi Linux-IL colleagues,
 Last night I installed CentOS 6.3 on an Intel R1000GZ server.

 My intent at first was to install Debian Wheezy, but I was unable to find
 information on drivers for Debian that support either the RSTe or ESRT2
 (LSI) configuration of the RAID card.

 So after giving up on Wheezy I tried to install Ubuntu 12.04 desktop. This
 distribution detected the RAID in RSTe configuration, but apparently not
 correctly since at the end of the installation it was unable to install
 grub anywhere.

 It seems that Intel only supports RHEL and Oracle Linux on the R1000GZ
 servers, so my third option, which succeeded, was to install CentOS 6.3
 with the BIOS RAID in RSTe configuration.

 The reasoning behind not trying harder to find a solution for Wheezy is
 that by using a base OS that supports the board OOTB I will have a better
 chance of getting automated notification of updates for the RSTe drivers
 and any other proprietary drivers without manual searching. In any event, I
 only intend to use the CentOS as a host OS for other mostly Debian-based
 OS's. Is this reasoning sound, or am I a wimp for giving up on Wheezy? In
 general, would installing the base OS that best fits the board regardless
 of other (mostly ideological) considerations be the best advice to
 customers, considering the support implications? (I am assuming that
 selecting the board for the OS is not, in general, an option.)

If you know what OS you need/want you should always select the hardware
accordingly, regardless what environment (*nix/MS/other), once the hardware
has been dictated to you then you find the best matching OS for hw  needs.
פורים שמח,
אליהו


 Purim Sameah,

  - yba


 --
  EE 77 7F 30 4A 64 2E C5  83 5F E7 49 A6 82 29 BA~. .~   Tk Open
 Systems
 =}**ooO--U--**
 Ooo{=
  - y...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

 __**_
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/**mailman/listinfo/linux-ilhttp://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Blu-Ray and Linux

2013-10-25 Thread E.S. Rosenberg
2013/6/27 Omer Zak w...@zak.co.il:
 On Thu, 2013-06-27 at 10:14 +0300, Nadav Har'El wrote:
 On Wed, Jun 12, 2013, Omer Zak wrote about Re: Blu-Ray and Linux:
  external disk drive of equivalent storage capability.  The only
  advantage of Blu-Ray would be immunity against EMP.  Even then, I have

 Have you considered a second backup disk, in a faraday cage? :-)

 I have two 2T backup disks and routinely back up my PC's hard disk using
 a script which is based upon 'rsync -avH --link-dest'.  To back up about
 550GB data (most of it is unchanged) takes, in my case, about 1:30
 hours.  YMMV.

 Does anyone know where to buy (or how to make) a Faraday cage suitable
 for protecting a hard disk against EMP from an A-bomb exploding at
 distance of say 10Km?
 (The use case being my home city getting attacked while I am elsewhere.
 For the moment, let's ignore any other disruptions which would prevent
 me from actually using the data in the preserved hard disk.)

Build one yourself and stick it in the local shelter, the shelter
should to some extent act as a cage, as should the harddisk housing
itself, though both insufficient, if you encase it, it may work, it
may also not work, they have bombs these days that are specifically
aimed at creating EMP that penetrate faraday cages, however they is
Israel and US not Syria, Iran etc.

To be honest I think if you are that worried about your data, make
sure it is hosted on a server on a different continent and that will
be a lot safer then a faraday cage that may or may not succeed in
protecting your hard-disk.


  So the only reason to buy a Blu-Ray drive would be to view Blu-Ray
  movies and TV series (such as Dr. Who).

 Or look those up in bittorrent ;-)

 Are there any legal means, available to oxymoron_alertfrayer
 Israelis/oxymoron_alert, who wish to buy such content and download it
 via Internet, without bothering with physical media?
Downloading is legal (at least in a lot of countries), uploading is
generally considered problematic.

But if you insist on overpaying (I am all for paying for content you
like to support the artist but generally the prices asked are way to
high, though with digital media it is improving) I am pretty sure
every cell provider/ISP has online stores these days have online
stores, amazon, itunes all do business here.

Regards,
Eliyahu - אליהו

--- Omer


 --
 As long as there are families which throw their teenager sons and
 daughters out of home if they turn out to be gays or lesbians, Gay Pride
 Parade events are needed.
 As long as the most common cause of suicide by teenagers is their
 finding out that they are gays or lesbians, Gay Pride Parade events are 
 needed.
 My own blog is at http://www.zak.co.il/tddpirate/

 My opinions, as expressed in this E-mail message, are mine alone.
 They do not represent the official policy of any organization with which
 I may be affiliated in any way.
 WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html


 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: c/unix q

2013-10-25 Thread E.S. Rosenberg
2013/6/6 Erez D erez0...@gmail.com:



 On Thu, Jun 6, 2013 at 5:04 PM, E.S. Rosenberg e...@g.jct.ac.il wrote:

 2013/6/6 Erez D erez0...@gmail.com:
 
 
 
  On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz
  wrote:
 
  On 04/06/13 15:28, Erez D wrote:
 
  thanks,
 
  so i guess if i use unidirectional connection, and the reader does not
  expect to get an EOF()
  thank i'm safe.
 
  Why are you so keen on doing it wrong?
 
  No, you are not safe. If the child process dies because of a
  segmentation
  fault (or whatever), the parent will notice this through the EOF
  received (I
  am assuming here, since you couldn't be bothered with closing a file
  descriptor, that you did not install a SIGCHLD handler to monitor for
  this
  possibility). This means that should one process die unexpectedly, the
  other
  will hang forever.
 
  it's not a matter of being bothered. closing a file has it's
  implications
 
  1.  close the file for one thread closes for all
 thread and fork are 2 very different things, best practice for fork
 ('full' children, I think everyone understands fork() when you say
 child) is to close, when using threads that is I believe not the case.
  2. what if i want later children using the same pipe, as in all childs
  write
  to same pipe read by parent...
 so the children are all closing the read end and the parent only
 closes write, where is the problem?

 if the parent closes the write side, then new forked children have their
 write side already closed.

That's why we are able to check if we are a child or a parent with the
fork() function.

 
 
  Best practices are there for a reason, despite what others here might
  have
  you think.
 
  Shachar
 
 
 
  ___
  Linux-il mailing list
  Linux-il@cs.huji.ac.il
  http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
 



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Emacs Hebrew

2013-10-25 Thread Eli Zaretskii
 From: dov.grobg...@gmail.com (Dov Grobgeld)
 Date: Sun, 10 Jun 2012 19:17:09 +0300
 
 I'm using org-mode extensively during the last year, and getting Hebrew
 support helps with writing recepies and taking care of the home financies.
 There are still bugs though, e.g. like the interaction between org-tables
 and bidi is really broken.

How about if you M-x report-emacs-bug RET and describe all those
broken features?  Emacs 24.1 was in pretest for almost 9 months, but I
have no bug reports in my archives about anything related to bidi and
Org tables.  So your experience is quite unique; please make it
public, so that these bugs could be fixed.

The Org maintainers don't really care about bidi, so if we here don't
take the initiative, these problems could remain unfixed for a long
time.

Thanks in advance.

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Permissions to access USB camera under debian

2013-10-25 Thread E.S. Rosenberg
2013/7/2 Evgeniy Ginzburg nad@gmail.com:
 ls /dev/ before and after connecting camera let you determine which /dev/
 nodes are creared.
*if* device nodes are created...
 ls -l /dev/something gives you user and group this device node created
 under.
 id [username] gives you in which groups this user enlisted.
 Add this user to group that have read/write access to node.
 If unfortunately device node under root:root you'll have to mess with udev
 rules.
I would go with the suggestion above on udev rules, if your kernel has
drivers for the device, some automagically generated rules may already
exist, on Debian that would be /etc/udev/rules.d/
As a quick and dirty fix you can of course just run chmod a+rw on the
device node.
Also tail syslog while connecting/disconnecting the device and maybe
also during the access attempt there's a wealth of good info there.

HTH,
Eliyahu - אליהו

 Regards, Evgeniy.

 On Jul 2, 2013 8:09 PM, Micha Feigin mi...@post.tau.ac.il wrote:

 Hi All,

 I'm trying to connect a camera (Mesa Imaging Swissranger specifically) to
 a Debian unstable box. I'm getting an error that the user does not have
 permissions to open the USB device (needs read/write access). Couldn't find
 any relevant group to add my user to to solve the problem. Any idea as to
 how to grant access?

 I've manged to get some information when running as sudo although it still
 was a bit problematic, and I'd rather explore the issue as a regular user
 and not root.

 Thanks

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Home made NAS

2013-10-25 Thread E.S. Rosenberg
2012/12/5 Geoffrey S. Mendelson geoffreymendel...@gmail.com:
 Oleg Goldshmidt wrote:


 All of the above is probably negligible compared to two important
 arguments that have already been mentioned: 1) as a home appliance
 there are better, more economical, and - most importantly! - quieter
 solutions for a modest price; 2) tinkering with such a heterogeneous
 system will yield invaluable experience, especially in terms of never
 trying anything like this for anything important.



 I want to point out that disk failure statistics may be less useful than one
 would think. The majority of hard disks came from a factory in Thailand
 which was wiped out by a flood about 2-3 years ago.

 This caused a large rise in the price of disks, and the reamining
 manufacturers scrambling to produce more disks from existing factories at
 lower prices.

 The price of hard disks has yet to be as low as it was.

 Since those new disks have not been around long enough for long term
 failure statistics, I would be careful using the old ones.

 BTW, in an unrelated discussion somewhere else two days ago, several
 professional sysadmins I know recommended OpenIndiana (an open source fork
 of Solaris) and ZFS for home NAS's.
If we're going off on fs tangents, has anyone here started playing
with btrfs yet? As far as I understand it supposed to be pretty stable
by now but so far I am still sticking to ext4
Regards,
Eliyahu - אליהו

 Geoff.

 --
 Geoffrey S. Mendelson,  N3OWJ/4X1GM/KBUH7245/KBUW5379
 Owning a smartphone: Technology's equivalent to learning to play
 chopsticks on the piano as a child and thinking you're a musician.
 (sent to me by a friend)






 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: accounting software *free open source*

2013-10-25 Thread E.S. Rosenberg
2013/7/7 Ori Idan o...@helicontech.co.il:



 On Sun, Jul 7, 2013 at 1:53 AM, Geoffrey S. Mendelson
 geoffreymendel...@gmail.com wrote:

 On 7/7/2013 1:20 AM, Micha Feigin wrote:

 On the other hand as memory serves, you can run your books using an open
 source software and then submit the printouts to a certified accounted
 to make a legal report. You may need to work with generic receipts in
 parallel though.



 As it was explained to me by my accountant, the tax authorities don't care
 how you keep YOUR books, they only care that the submissions to them are
 done properly.

 Properly means that an accepted (certified?) program is used and that the
 data was entered by a level 3 (starts at 1) certified bookkeeper or a
 certified public accountant (CPA).

 In real terms this means for small business the data is sent to your
 accountant and they (or their certified bookkeeper) enters it into their
 program on their computer and submits that to the tax authorities.

 At that point the responsibility for the data being entered properly and
 the program being a legal one is borne by your accountant and not you.

 IMHO this is preferable because my experience in being an independent
 consultant, the owner of a small consulting firm, and involved with startups
 over various times, is that any money spent paying a professional to keep
 your books and prepare your tax returns is well worth it. YMMV.

 Most accountants will accept data in XLS (Excel spreadsheet format), so
 you can enter the data in an Excel spreadsheet and send them the file.

 I assume that an Excel spreadsheet created and maintained by OpenOffice
 would be acceptable to them.

 Geoff.


 Tax authorities has nothing against OSS software and they already gave
 approval to OSS software twice (Drorit, my software and it's fork Linet,
 both GPL).
 The real truth is that they only ask to see several things:
 1. Invoices can not be deleted and numbered sequentially without repeating.
 2. No simple ability to delete transcations
 3. Output of what they call Open Format files, these are files with all
 transactions in a special format they require.

 That is all, no question about OSS or not.
 There was a debate last time they registered Linet and they agreed to
 register it so they have nothing against OSS.
 GNUCASH can not be registered since it can not output Open Format files.

 Note that I have good experience and knowledge about the subject as I make a
 living out of Accounting software.
 I have written several software packages and also consult business about the
 same.

Both drorit and linet run server side, gnucash runs on my computer and
the tax authority has no way of knowing whether I doctored my version
of gnucash.
Even with drorit and linet, will the tax authority accept it if I
install it on my server (and as a result have full control over all
the demands you listed) or did they only approve the version running
on company X's servers?
Logically it seems only the second would be the case...
Regards,
Eliyahu - אליהו

 --
 Ori Idan


 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Motherboards for new Ubuntu install

2013-10-25 Thread E.S. Rosenberg
What problems did you have with recent motherboards?
I have generally had very little to no problems with recent stuff,
although it obviously depends on what technologies are being used.

On my new laptop the installation was less fun but this was/is mainly
due to UEFI, the way it boots things (it wouldn't boot my bootable
disk-on-key, but simple bootable disk-on-keys worked [mine has
multiple OS'es/distros]).

The Intel H61 series chipset is certified to work with Ubuntu since
11.10 as is the H77 obviously that does not cover the additional
components on the board but it's a start

http://www.ubuntu.com/certification/catalog/make/Intel%20Corporation/?page=5

I suspect that what will give and gave most problems recently is the
UEFI which changes the way we treat how our computer boots:
- You have to have a vfat boot partition of ~250MiB at the beginning
of the disk (mount at /boot/efi and _not_ at /boot, you can have a
separate /boot too though)
- The disk needs to use got and not a dos partiton table etc.
Basically a lot of our skills at booting a system have become obsolete...

Regards,
Eliyahu - אליהו

2012/12/25 Dotan Cohen dotanco...@gmail.com:
 On Tue, Dec 25, 2012 at 11:24 PM, Geoffrey S. Mendelson
 geoffreymendel...@gmail.com wrote:
 I'm looking for a place to buy a computer.

 That part I did understand. What I did NOT understand is how can a retail
 vendor of computers warranty that a particular disto of Linux will run on a
 specific computer unless that Linux comes from the manufacturer of the
 computer.


 I had called them looking for a system run Ubuntu on. I approached
 them with this is what I need the computer to do and they did not
 have the knowledge to sell me a system which does what I need it to
 do. That is fine, but I still need a computer! Therefore I turn to the
 Linux-Il mailing list in the hopes that someone may have bought a
 computer in the past few months and could recommend a vendor. Surely
 there exist on the market at least on motherboard on which Ubuntu will
 run out of the box.


 --
 Dotan Cohen

 http://gibberish.co.il
 http://what-is-what.com

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


RE: Finding if a line contains Hebrew characters in perl

2013-10-25 Thread Meir Guttman

-Original Message-
From: Gabor Szabo [mailto:szab...@gmail.com] 
Sent: יום ו 26 אפריל 2013 09:25
To: linux-il
Cc: Ori Idan; Meir Guttman
Subject: Re: Finding if a line contains Hebrew characters in perl

On Thu, Apr 25, 2013 at 6:05 PM, ik ido...@gmail.com wrote:
 try this

 #!/usr/bin/env perl -w
 #

 use v5.14;
 use utf8;

 my $text = 'שלוabv';

 if ($text =~ /^[\x{5D0}-\x{5ea}]{3}/) {
   say yes;
 } else {
   say no;
 }

I'd probably use   \p{IsHebrew}  or \p{InHebrew} instead of the hexa code.
Check here: http://perldoc.perl.org/perluniprops.html to learn way more than 
you'd probably want to :)

I also CC-ed Meir Guttman who is *the* Perl Unicode expert.
He might have something more correct to suggest.

Gabor


Well, first I am by no means a Unicode Expert, let alone *the* expert. All
I have is some experience.

Anyway, I did use the \p{HEBREW} instead of the \x{} and it returned yes.
Please note, just {HEBREW} and ALL-CAPS! Here it is:

#!/usr/bin/env perl -w
#

use v5.14;
use utf8;

my $text = 'שלוabv';

if ($text =~ /^[\p{HEBREW}]/) {
  say yes;
} else {
  say no;
}

I also used if ($text =~ /^[ש]/) {...}, simply entering the Hebrew letter
Shin directly, and it printed yes too, signifying that 'ש' is the first
letter. (My editor, as well as MS Outlook, show, from left to right, first
'ו', then 'ל', then 'ש' and then abv.)

I also tried to use the official Unicode name for 'ש' - \p{HEBREW LETTER SHIN}
see http://www.unicode.org/charts/PDF/U0590.pdf , and evidently it isn't
defined. I got a compile time error: Can't find Unicode property definition
HEBREW LETTER SHIN at A bit disappointing!

Try it out!

Meir


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il