Re: [Jprogramming] J on Kindle Paperwhite?

2014-03-19 Thread Yike Lu
You'll probably need to download a terminal. Or sideload one. On Wed, Mar 19, 2014 at 11:37 AM, Devon McCormick wrote: > No - I have not yet figured out how to reach a command line. The jailbreak > consists of shell files I can read and run by clicking on them with the > Kindle plugged into my

Re: [Jprogramming] J on Kindle Paperwhite?

2014-03-19 Thread Yike Lu
I think it's a matter of binary / cpu compatibility as well as OS. Eg, Kindle might be an ARM processor or something else entirely, would need to compile J for that specific target. On Wed, Mar 19, 2014 at 6:49 AM, Devon McCormick wrote: > I don't have a tablet and I like the quality of the dis

Re: [Jprogramming] |interface error: spawn

2014-03-16 Thread Yike Lu
Raul, just curious, where do you work and what do you do? Would give some context. On Mar 13, 2014 10:36 AM, "Raul Miller" wrote: > Interesting. Still fails for me, building with your more direct build of > the shared object. > > It's *probably* a bug at the OS level, but that could easily reflec

Re: [Jprogramming] J in 5 minutes

2014-03-13 Thread Yike Lu
Martin -- this looks great. I didn't manage to sit through the original, yet I managed to sit through each of the 10 minute chunks. On Thu, Mar 13, 2014 at 11:16 PM, Dan Abell wrote: > I think of them as more like accents, whereas APL and J > are dialects of Iverson's platonic ideal language. ;

Re: [Jprogramming] alternate locale calling convention

2014-03-13 Thread Yike Lu
Not to be snide, but this thread and the J extensions thread look like ASCII art. :) On Thu, Mar 13, 2014 at 11:32 AM, Don Guinn wrote: > Of course you could also do >s__o=:t__o@:t__o >s__o > ┌┬──┬┐ > │t__o│@:│t__o│ > └┴──┴┘ >s__o=:(t__o@:t__o)f. >s__o > ┌──┬──┬─

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Yike Lu
Re: Raul's point about harsh self criticism, I don't think any of this so far has been overly harsh. I certainly didn't mean my comment about the music to be much, other than an observation, perhaps a recommendation for the next time. Re: rest of the comments. Remember as far as "code beauty" and

Re: [Jprogramming] J in 5 minutes

2014-03-07 Thread Yike Lu
A few comments: I think that having music is better than no music. But I also feel that the music chosen is uhh... too upbeat. Usually music for coding videos is more ambient. Generally, I think that promotional materials need to answer the question "what's the killer app?" Hell, I don't even know

Re: [Jprogramming] J in 5 minutes

2014-03-07 Thread Yike Lu
Nick, that's not always a typo ;). In many languages, the "h" is silent. On Fri, Mar 7, 2014 at 9:18 AM, Ni Bo wrote: > Impressive. At 0:22 seconds a small typing mistake: "J is a > high-performance.." not "an high". > > Nick > > > On Fri, Mar 7, 2014 at 5:00 PM, Tom Arneson wrote: > > > Very

Re: [Jprogramming] a good bar bet!

2014-03-06 Thread Yike Lu
Sorry Roger, I must have interpreted the question wrong. I thought you wanted a sparse radix sort. On Mar 6, 2014 7:49 PM, "Roger Hui" wrote: > You are not guaranteed sortedness, but nobody promised that it'd be sorted. > > > On Thu, Mar 6, 2014 at 5:42 PM, Yike Lu wr

Re: [Jprogramming] a good bar bet!

2014-03-06 Thread Yike Lu
d write. > > > On Thu, Mar 6, 2014 at 2:54 PM, Yike Lu wrote: > > > Hmm, maybe not. It has to basically be able to insert ordered in constant > > time. Everything I remember seems to be log time for one or the other. > > > > I'm starting to lean towards

Re: [Jprogramming] a good bar bet!

2014-03-06 Thread Yike Lu
fers O(1) time to read and write. Can your dictionary > do the same? (And I think we are talking about _how_ you implement a > dictionary.) > > > > > On Thu, Mar 6, 2014 at 2:34 PM, Yike Lu wrote: > > > Using a dictionary is another way. > > > > > &

Re: [Jprogramming] a good bar bet!

2014-03-06 Thread Yike Lu
Using a dictionary is another way. On Thu, Mar 6, 2014 at 3:30 PM, Roger Hui wrote: > Yes, that's the cost. The trick is to avoid initializing count altogether, > because for this subproblem M is much greater than n. The answer is > algorithmic and not a matter of using this or that C operati

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
Joe, wonderful explanation. This was exactly what I was wondering! I was just so surprised that my dumb indexing was only as fast as the sort itself. Seemed very counterintuitive. I suspected the bounds check, but this seems more plausible. On Wed, Mar 5, 2014 at 9:28 PM, Joe Bogner wrote: > On

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
Roger, just realized you'd have to loop through and do comparisons to find the min and max anyways, so would be essentially same amount of operations as a bounds checked lookup. Silly me. -- For information about J forums see http:

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
I suppose it'd be too expensive in the general case to check max, min versus shape? On Wed, Mar 5, 2014 at 5:27 PM, Peter B. Kessler wrote: > For the minimum in a small universe, use your "broken" sorting code (:-) > > > I4 count[M]; > memset(count,0x00,sizeof(count)); > for(i=0;i >

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
er is pretty good at that. In the indexing, > you have an if statement, in which (in this case) 100% of the time the > branch is not taken. A branch which is 100% (or 0%? I forget) not taken is > particularly slow. > > > > > > On Wed, Mar 5, 2014 at 2:41 PM, Yike Lu wrote:

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
Yeah, it's N log N only if the domain is truly infinite (arbitrary precision). Everything else you can use radix with O(N b) where b is number of bits. On Wed, Mar 5, 2014 at 4:41 PM, Yike Lu wrote: > Roger, why is index lookup so slow in the g2 case (see my message > earlier)? Are

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
Roger, why is index lookup so slow in the g2 case (see my message earlier)? Are you really saying that bounds checking makes it so that the lookup is only as fast as the sort? On Wed, Mar 5, 2014 at 4:35 PM, Roger Hui wrote: > > I4 count[M]; > > memset(count,0x00,sizeof(count)); > > for(i=0;i >

Re: [Jprogramming] a good bar bet!

2014-03-05 Thread Yike Lu
I changed the power of 10 by +/- 1, the timing changed by the same order of magnitude on both "/:~x" and "g{x". The second result we expect, each lookup is constant time, so the total operation is O(n). The sort implies that J defaults to bucket/radix sort under the covers for characters. Thus the

Re: [Jprogramming] Dictionary data type

2014-03-03 Thread Yike Lu
Thanks David! I had no idea J had symbols, that helps greatly and in many other areas, as does your implementation. On Mon, Mar 3, 2014 at 8:12 PM, David Lambert wrote: > Some time ago I conjectured that tacit expressions could be more easily > understood if the reader knew the intended valence.

Re: [Jprogramming] Sorry state of slow parsing of JSON in J

2014-03-03 Thread Yike Lu
A tangential but related question: does J have a dictionary data type? Where can I read about it? Thanks. On Mon, Mar 3, 2014 at 8:55 AM, Tracy Harms wrote: > My naïve intuition is that a tree of symbols would be the most direct route > to increased performance. Would that fit with what you su

Re: [Jprogramming] Intro; Learning J Feedback

2014-02-28 Thread Yike Lu
t was "this is a different time zone". On Fri, Feb 28, 2014 at 8:16 PM, bill lam wrote: > try type in jconsole, > > install'qtide' > > to see if it will work, else please post the detail of your > problem in J General forum for qtide installtion related matter

Re: [Jprogramming] Intro; Learning J Feedback

2014-02-28 Thread Yike Lu
we > can read them (and perhaps supply useful suggestions). > > Thanks, > > -- > Raul > > > On Fri, Feb 28, 2014 at 1:37 PM, Yike Lu wrote: > > > Great, thanks for the quick responses. If my quoting here is off, it's > > because I used digest mode. > >

Re: [Jprogramming] Intro; Learning J Feedback

2014-02-28 Thread Yike Lu
locales, source from the JDB library, OO, and pieces of the standard library. Also, everything seems very very scattered. Again, the dictionary and primitives seems well covered, but the standard library, packages, etc do not. On Fri, Feb 28, 2014 at 11:18 AM, Yike Lu wrote: > Hey everybody

[Jprogramming] Intro; Learning J Feedback

2014-02-28 Thread Yike Lu
Hey everybody, I'm new to the forum. I got involved with vector languages when I had to learn q for a job. I have since moved on from that job and lost q, so I've been looking for a suitable replacement ever since. I tried J here and there, but the things I learned never really stuck. I went to one