Re: [Jprogramming] under itemize

2013-10-10 Thread Roger Hui
I find this example unconvincing as the following achieves the same end much more simply and efficiently. f i.2 5 01 0.5 0.33 0.25 0.2 0.17 0.1428570.125 0.11 f 0 0 f 3j4 0.12j_0.16 On Thu, Oct 10, 2013 at 9:48 PM, David Lambert wrote: > I don't fin

[Jprogramming] under itemize

2013-10-10 Thread David Lambert
I don't find examples of "under itemize" in the under essay. I inserted an entry " Extend verb domain". reciprocal_or_zero =: =&0`(0,:~%)} NB. zeros may come from fill reciprocal_or_zero 8 NB. OH NO! |rank error: reciprocal_or_zero | reciprocal_or_zero 8 (;$

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Ganesh Rapolu
Oops. The previous code gives the first column. This is the corrected code, with the same assumptions as before but with more than 3 columns. st =. ,: 1 0 , 0 6 ,: 0 0 st =. st , 2 0 , 0 6 ,: 1 0 st =. st , 0 6 , 0 6 ,: 3 1 st =. st , 4 3 , 0 6 ,: 3 0 st =. st , 4 0 , 0 0 ,: 4 0 tab =. 9 { a. NB.

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Ganesh Rapolu
Assumptions: - no double tabs - no blank lines - no blank columns - no line starts with a tab - no column itself contains a tab - no CR - more than 2 columns - file is whole (rank 1 and not split by LF) st =. 1 0 , 0 6 ,: 0 0 st =. st ,: 0 6 , 0 6 ,: 2 1 st =. st , 3 3 , 0 6 ,: 2 0 st =. st , 3 0

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Ric Sherlock
I've been working with big (multiple GB) text files and recently put together the following that seems to work Ok. freadLFblk is a slightly modified version freadblock (it enables the block size to be specified). freadLFblks then essentially loops through the blocks. There are probably a few wrinkl

Re: [Jprogramming] Socket client

2013-10-10 Thread Dan Bron
Ah, beautiful, this is what I'm looking for. Thank you! -Dan -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich Sent: Thursday, October 10, 2013 5:55 PM To: programm...@jsoftware.com Subject: Re: [Jp

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Ganesh Rapolu
Using a sequential machine to get the second column from the whole file and then doing the comparison might be faster. On Oct 10, 2013 9:23 AM, "Raul Miller" wrote: > When the size of your data exceeds some significant fraction of > available memory, it's probably worth using a loop. > > In other

Re: [Jprogramming] Socket client

2013-10-10 Thread Henry Rich
Mine is at www.jsoftware.com/jwiki/Scripts/Socket System Henry Rich On 10/10/2013 2:48 PM, Dan Bron wrote: Does anyone have a reasonably complete socket client implementation in J? I have a very simple one, but it lacks error handling, data buffering, etc. It would save me a few hours if some

Re: [Jprogramming] deoptim package

2013-10-10 Thread Ric Sherlock
No I don't think so. My vague memory is that because the generation of new solutions is essentially done by generating differences between existing legal solutions, the phenomena you describe should be unlikely. A workaround (that wouldn't involve modifying the addon) would be to build bounds check

Re: [Jprogramming] Socket client

2013-10-10 Thread Dan Bron
Thanks, I'll take a look. -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Kenneth Lettow Sent: Thursday, October 10, 2013 3:51 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Socket client Hey Da

Re: [Jprogramming] Socket client

2013-10-10 Thread Kenneth Lettow
Hey Dan, Have you taken a look at Scott Locklin's j-ZeroMQ stuff? I've toyed with it a bit, but I am not sure if this is what you are looking for. https://github.com/locklin/j-zeromq http://zeromq.org/ Ken On Thu, Oct 10, 2013 at 3:24 PM, Dan Bron wrote: > That's more of a tutorial or toy,

Re: [Jprogramming] Socket client

2013-10-10 Thread Dan Bron
That's more of a tutorial or toy, not a framework or implementation. My current simple socket client is derived from the socket labs. -Dan -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Björn Helgason Sent:

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Joe Bogner
Thanks Pascal. Similar run-time , slightly slower on two runs -- around 115 avg each vs 100 I had to modify it to make it work, so I assume this is the same as what you had intended and you mentioned it wasn't tested +/ (<'ABC') = 2&{@:([: <;._1 TAB -.~ ])"1 mf It needed a cap I think (accordin

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Raul Miller
When the size of your data exceeds some significant fraction of available memory, it's probably worth using a loop. In other words: first develop your code so it works on a smaller data set, then pick some suitably large block size (1GB?) and loop over however many blocks you need. Loops are more

Re: [Jprogramming] Socket client

2013-10-10 Thread Björn Helgason
look at the socket labs On Oct 10, 2013 6:48 PM, "Dan Bron" wrote: > Does anyone have a reasonably complete socket client implementation in J? > I > have a very simple one, but it lacks error handling, data buffering, etc. > It would save me a few hours if someone has a ready-made example or > f

[Jprogramming] Socket client

2013-10-10 Thread Dan Bron
Does anyone have a reasonably complete socket client implementation in J? I have a very simple one, but it lacks error handling, data buffering, etc. It would save me a few hours if someone has a ready-made example or framework. -Dan -

[Jprogramming] deoptim package

2013-10-10 Thread Thomas Costigliola
When using deoptim I am getting solutions outside of the bounds I am providing. >From looking at the code it looks like new populations are generated within the bounds but the evolution step doesn't ensure the boundary conditions. Is that the intended behavior?

Re: [Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Pascal Jasmin
+/ (3 :'(2{"1 (< ;._1 TAB -.~ y))=<''ABC''')"1  mf match '-:' might be faster than =, but overall just a tacit version: +/ (<'ABC') = 2&{@:(<;._1 TAB -.~ ])"1 mf untested - Original Message - From: Joe Bogner To: programm...@jsoftware.com Cc: Sent: Thursday, October 10, 2013 2:02:07

[Jprogramming] memory mapped tab delimited file

2013-10-10 Thread Joe Bogner
I have a 5 gig, 9 million row tab delimited file that I'm working with. I started with a subset of 300k records and used fapplylines. It took about 5 seconds. I shaved 2 seconds off by modifying fapplylines to use memory mapped files I then applied it to my larger file and found that it was takin

Re: [Jprogramming] How to make this conjunction tacit

2013-10-10 Thread Pascal Jasmin
My proposal is roughly identical to Jose's 2nd proposal, with the possible enhancement/difference that: where A1 and A2 are trains of 0 or more adverbs (a a... a), then The conjunction (A1 c A2) would be equivalent to the explicit 2 : 'u A1 c v A2' Though I'm likely oversimplifying, this would o

Re: [Jprogramming] How to make this conjunction tacit

2013-10-10 Thread Raul Miller
http://www.jsoftware.com/pipermail/programming/2013-February/031684.html might interest you. -- Raul On Thu, Oct 10, 2013 at 8:11 AM, Pascal Jasmin wrote: > creating a conjunction tacitly is hacky or impossible. currently the train > (a c) is a syntax error. What I'd suggest instead is that

Re: [Jprogramming] How to make this conjunction tacit

2013-10-10 Thread Pascal Jasmin
in terms of useful examples with built ins, the conjunctions @: ` &. would combine with adverbs like each, leaf, or bound adverbs "n L:n. so writting (1 : '@:v"0 1') as just (@:"0 1) avoids maintaining variations of conjunctions such as  amend                  NB. conjunction version of G} amend

Re: [Jprogramming] How to make this conjunction tacit

2013-10-10 Thread Pascal Jasmin
creating a conjunction tacitly is hacky or impossible.  currently the train (a c) is a syntax error.  What I'd suggest instead is that it be treated as a conjunction.   So the explicit (2 : ']`u@.v') could be written as (]`@.) If 1 conjunction is present in what whould otherwise be an adverb tra