Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Linda Alvord
Thanks. Pointing to the error messages was helpful. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Ian Clark Sent: Tuesday, July 08, 2014 8:52 AM To: programm...@jsoftware.com Subject: Re: [Jprogramm

Re: [Jprogramming] Modifying single element of List or Table

2014-07-08 Thread Jon Hough
Ok, I see now. It's just using ammend. It was there in nuvoc the whole time. Not sure how I missed that. Thanks. --- Original Message --- From: "'Pascal Jasmin' via Programming" Sent: July 9, 2014 11:52 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Modifying single element of Li

Re: [Jprogramming] Modifying single element of List or Table

2014-07-08 Thread 'Pascal Jasmin' via Programming
   (<'fish') 2} ;: 'cat dog fiosh cow monkey' ┌───┬───┬┬───┬──┐ │cat│dog│fish│cow│monkey│ └───┴───┴┴───┴──┘    5 (4 5 6}) 3 1 4 1 7 9 2 6 5 3 1 4 1 5 5 5 6 5 From: Jon Hough To: "programm...@jsoftware.com" Sent: Tuesday, July 8, 2014 10:

Re: [Jprogramming] Modifying single element of List or Table

2014-07-08 Thread Kip Murray
]arr =. 3 1 4 1 7 9 2 6 5 3 1 4 1 7 9 2 6 5 5 (<4) } arr 3 1 4 1 5 9 2 6 5 On Tuesday, July 8, 2014, Jon Hough wrote: > > I want to modify an element of a list, leaving other elements unchanged. > > e.g. > > > >list =. ;: 'cat dog fiosh cow monkey' > > > list > > > ┌───┬───┬─┬───

[Jprogramming] Modifying single element of List or Table

2014-07-08 Thread Jon Hough
I want to modify an element of a list, leaving other elements unchanged. e.g. list =. ;: 'cat dog fiosh cow monkey' list ┌───┬───┬─┬───┬──┐ │cat│dog│fiosh│cow│monkey│ └───┴───┴─┴───┴──┘ I want to change 'fiosh' to 'fish', e.g. change a spelling mistake. It wou

Re: [Jprogramming] k-NN in Rust / F# / ocaml

2014-07-08 Thread bill lam
You may send Chris am email to request repos write access. I checked libflann 1.7 is available on Raspberry Pi (jessie). Вт, 08 июл 2014, jprogramming написал(а): > The Debian and Ubuntu builds for 1.7.x both dump core for me, so I'm assuming > the 1.7 API is very different (though at a glance,

Re: [Jprogramming] k-NN in Rust / F# / ocaml

2014-07-08 Thread 'Scott Locklin' via Programming
The Debian and Ubuntu builds for 1.7.x both dump core for me, so I'm assuming the 1.7 API is very different (though at a glance, it doesn't look real different; perhaps it is the flannparam struct). I would imagine they'll get around to using 1.8.4, as even that version is over a year and a half

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Dan Bron
Now that's interesting! Now I've got my study material for the evening. :) -Dan PS: I just ran my amend-frequency analysis on my own code: it comes it #45 among all primitives, and #4 among adverbs, though with a separated by long interval from #3 (\). - Original Message --- S

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Erling Hellenäs
One thing I find fascinating with J is that it forces you to put the operations in logical order. At least that's how I feel. If I have three pieces of information to do something with I think a little more, do something with two pieces, then use the result to include another piece. When I firs

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Dan Bron
Dan wrote: > I rarely find a call for } . I'm wondering if you've > [Pepe] have invented or discovered generally beneficial > uses of } unrelated to performance. Pascal responded: > I think } (dyadic amend) is pretty essential. > The obvious use is amending one (or sublist) item >

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Don Guinn
J avoids a pitfall in scalar language amend by replacement. It verifies that the replacement won't crash half-way through leaving the data corrupted. It is transparent to the program whether the amend amends in place or not, other than performance. And sometimes amend makes more sense than other wa

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Erling Hellenäs
In most languages indexed replacement is indexed replacement? In J and in most functional languages it is not? You get a brand new variable? So, why give the user the flawed impression he can still do indexed replacement and do amendments to variables/nouns? And at the same time in tacit code w

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Don Guinn
I think it would be impossible to do an amendment in place in tacit code, but amendment should still work in a tacit expression, just not in place. But if the result were assigned back to the original variable what will happen? Would the tacit expression prevent it from recognizing the operation as

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Jose Mario Quintana
Erling wrote: "It's obviously not possible to do any amendments in tacit code?" Adding after wards: "A principle of functional programming is you never modify a variable?" From my perspective those (rhetorical?) questions are separate. Regarding the first question, consider the verb (v) that p

Re: [Jprogramming] sort times

2014-07-08 Thread Erling Hellenäs
x=: 1e6 $ ' ' y=: a. {~ ? 1e6 $ 256 %/ 100 (6!:2)&> '/:~x' ; '/:~y' 1.01978 %/ 100 (6!:2)&> '/:~x' ; '/:~y' 1.02001 %/ 100 (6!:2)&> '/:~x' ; '/:~y' 1.01747 Arch Linux. AMD Athlon II X4 640 3 GHz. On 2014-07-08 22:11, Danylo Lizanets wrote: x=: 1e6 $ ' ' y=: a. {~ ? 1e6 $ 256 %/ 100 (6!

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Jose Mario Quintana
Dan, ultimately, I find difficult to agree, or disagree, with the statement: " x m} y is used in J much less than you would think, considering the importance of in-place array modification in other languages. " Who is "you"? Which are the "other languages"? In what sense is the phrase "used in J"

Re: [Jprogramming] sort times

2014-07-08 Thread Jan-Pieter Jacobs
Here I get: x=: 1e6 $ ' ' y=: a. {~ ? 1e6 $ 256 %/ 100 (6!:2)&> '/:~x' ; '/:~y' 2.34528 64-bit Windows 8.1, Intel Core i5-3337u J 802 2014-07-08 22:11 GMT+02:00 Danylo Lizanets : > x=: 1e6 $ ' ' > > y=: a. {~ ? 1e6 $ 256 > > %/ 100 (6!:2)&> '/:~x' ; '/:~y' > > 2.07821 > > 64-bit Ubuntu Linux,

Re: [Jprogramming] sort times

2014-07-08 Thread Danylo Lizanets
x=: 1e6 $ ' ' y=: a. {~ ? 1e6 $ 256 %/ 100 (6!:2)&> '/:~x' ; '/:~y' 2.07821 64-bit Ubuntu Linux, Intel Core i5-2450M On Tue, Jul 8, 2014 at 2:30 AM, Nollaig MacKenzie wrote: > Intense PC (64 bit Intel core i7) j701/2011-01-10/11:25 > > 1.43 - 1.45 > > Mac Mini OS X 10.9.3 > > 1.11 - 1.18 >

[Jprogramming] J conference schedule

2014-07-08 Thread Eric Iverson
There have been a few minor adjustments to the schedule and some talk titles have been added or adjusted. -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Websockets?

2014-07-08 Thread Devon McCormick
Thanks, Joe. I see that there is actually a live demo under "qtdemo" at ~addons/ide/qt/demo/websocket.htm. I need to come up to speed with more basic socket stuff for now. On Tue, Jul 8, 2014 at 11:35 AM, Joe Bogner wrote: > Have you seen http://www.jsoftware.com/jwiki/Guides/JqtWebsocket ?

Re: [Jprogramming] k-NN in Rust / F# / ocaml

2014-07-08 Thread bill lam
Only libflann 1.7 can be installed in debian. Perhaps you can also provide a flann.ijs for version 1.7 for testing. Also the offset for 32-bit and 64-bit most probably are different. Пн, 07 июл 2014, jprogramming написал(а): > I've finally got a kd-tree library I'm comfortable with wired up t

Re: [Jprogramming] Websockets?

2014-07-08 Thread Joe Bogner
Have you seen http://www.jsoftware.com/jwiki/Guides/JqtWebsocket ? There is also a lab/demo of a websocket based repl. I have played with it but havent applied it to anything new. On Jul 8, 2014 11:26 AM, "Devon McCormick" wrote: > I'm trying to do something too simple to really need websockets

Re: [Jprogramming] Websockets?

2014-07-08 Thread Devon McCormick
I'm trying to do something too simple to really need websockets but thought I'd ask. I am trying to go through the "sockets" lab but running into an undefined name "toserver". On Tue, Jul 8, 2014 at 10:38 AM, Eric Iverson wrote: > I have looked a bit at websockets.They are going to be an impor

Re: [Jprogramming] Websockets?

2014-07-08 Thread Eric Iverson
I have looked a bit at websockets.They are going to be an important new technology (not so new, but slow to be adopted). They add stateful socket connections to the internet (which mostly uses stateless http connections). I looked at adding them to JHS and decided they added complication without m

Re: [Jprogramming] Websockets?

2014-07-08 Thread Michael Dykman
I have done a fair bit of work with websockets and not-J. A websocket server needs to be aware of extensions to HTTP that are used to establish the socket; Unfortunately, our J web server has no such facility. On Tue, Jul 8, 2014 at 8:41 AM, Devon McCormick wrote: > Hi - > > has anyone done anyt

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Ian Clark
@Linda - the "domain error" is because you've defined h as: h=: 3 :'0 x } y' That should have been h=: 4 :'0 x } y' if you're going to call h dyadically. But I sympathize. Exactly this error catches me out all too often. Particularly when I've been using "13 :" If I was awarding the prize for th

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Linda Alvord
It struck me as "It looks like a duck, it quacks like a duck, but it isn’t a duck." Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller Sent: Tuesday, July 08, 2014 5:52 AM To: programm...@jso

[Jprogramming] Websockets?

2014-07-08 Thread Devon McCormick
Hi - has anyone done anything with J and websockets? Thanks, Devon -- Devon McCormick, CFA -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Linda Alvord
I'm comparing it to the post below it that says it is a verb. It struck me as a peculiar inconsistency.'' Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller Sent: Tuesday, July 08, 2014 5:52

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Erling Hellenäs
4 5(3 (4 5"_)} ] )10+i.10 10 11 12 13 3 3 16 17 18 19 4 5(3 ([)} ] )10+i.10 10 11 12 3 14 15 16 17 18 19 /Erling On 2014-07-08 11:21, Linda Alvord wrote: And then! h=: 3 :'0 x } y' 4 5 h i.11 |domain error: h | 4 5 h i.11 Linda -Original Message- From: programming-

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Raul Miller
I think we have covered these issues with you before. Do you remember why you should get that error? Thanks, -- Raul On 7/8/14, Linda Alvord wrote: > And then! > > h=: 3 :'0 x } y' >4 5 h i.11 > |domain error: h > | 4 5 h i.11 > > Linda > > -Original Message- > From: program

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Linda Alvord
And then! h=: 3 :'0 x } y' 4 5 h i.11 |domain error: h | 4 5 h i.11 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On BehalSSf Of Linda Alvord Sent: Tuesday, July 08, 2014 5:14 AM To: programm...@jso

Re: [Jprogramming] Tacit J and indexed replacement

2014-07-08 Thread Linda Alvord
Ian's post was very early in this thread, but something has puzzled me for a while as I tried to write a tacit version: f=: 13 :'0 x } y' 4 5 f i.11 0 1 2 3 0 0 6 7 8 9 10 g=: 4 :'0 x } y' 4 5 g i.11 0 1 2 3 0 0 6 7 8 9 10 f 4 : '0 x } y' g 4 : '0 x } y' 4!:0 <'f' 3