Here's another version of my nif parsing code. It still fits in a single
file, so, code:
require 'xml/sax/x2j'
x2jclass 'nifxml'
extract=:4 :0
Name=: x
process fread y
)
NB. nif versioning:
vton=: 256 #. '.' 0&".;._1@, ]
Version=: vton '4.0.0.2' NB. Morrowind
'Items' x2jDefn NB. dispatch x
Actually, I think that that was a different issue - I mis-interpreted a
result I was getting, without adequate testing.
For now, }.attributes x should be replace by attributes x
I will post another version later (or at least a reference to working code
- this will be too much code for an email me
Yes, this is correct. There is no change to the J Engine from J7.
The engine is variously j.dll, libj.so and libj.dylib.
On Thu, Feb 13, 2014 at 12:52 PM, Murray Eisenberg wrote:
> To repeat essentially the same questions I asked a couple days ago after
> j801 release was announced and (yes, a
One additional comment.
I was using the idiom }. attributes x because when using the J6 version of
sax/xml there was an extraneous "attribute" row corresponding to the name
of the element.
Under J8, I am not seeing this row, so I need to remove the }. because that
would cause me to not see the fi
fixlenx was included, but
fixlenx_z_ =: 1 : (':';'((#y) {. x) u y')
There's an ease of testing several connections by placing them in one file, but
you can load the same file in multiple instances, and comment out the listen
line from the "client-only" or listen on different ports.
-
I tried this, or I thought I did, but:
a: new_wsconnection_ 'localhost 3000'
|value error: fixlenx
| 'socket conntype commands auth'=:y defaults fixlenx
a:;'client';'testcommands';'authserver'
Do you intend for the client and the server to be the same instance of J?
If so, why would you wan
Thanks. So far everything else looks great!
On Wed, Feb 12, 2014 at 8:14 PM, bill lam wrote:
> It should be a bug that MemoryLimit in base.cfg is not being
> referenced, this affects all platforms. Please wait until the
> next library update release.
>
> Ср, 12 фев 2014, Don Guinn писал(а):
>
All, but especially Eric, Bill and Joey,
Murray posted the following message to Programming, but I cannot find it in
the archives. I had thought I did not need to reply to this forum because I
thought the postings below mostly described some closure on this issue.
Otoh, please read to the bottom b
Might be easier after you try to teach it to someone else and/or after you
cook up an additional example.
Failing that, I am very fond of phrases like ([smoutput) or ([ [: smoutput
'label';]) to show me the internal workings of a J expression in action.
Quite often I find that I reason best about
Something like that might help, though I'm not sure any of those are the
specific windows calls I need, and it perhaps involves a qt call.
To better highlight the problem, and actually highlight a bigger problem than
trying to connect to our own process, loading the websocket client and server
To repeat essentially the same questions I asked a couple days ago after j801
release was announced and (yes, after emptying the browser cache) downloaded
j801_mac64.dmg and installed from there:
Should the J Engine show as j701/2011-01-10:11:25 build: Feb 6 2011 ?
That's what I see both in the
Yes, thanks for those additional pointers. I can see what is going on a
little better with this example's solution.
Thanks, much
--
(B=)
--
For information about J forums see http://www.jsoftware.com/forums.htm
I'm still not sure what are the purpose of the 6!:3 used.
websocket itself is asynchronus. You need not poll the event
loop becuae tne events will call you instead. Once you started
connection inside testws, you should exit testws wihtout waiting
for result.
If you want the exact sequence then t
Brian,
I put up the new release and it seemed generally OK. I did carry forward
a script that I think I built for a previous jhs release. I put it into
my /usr/local/bin (which is not installed by default in OSX, but I find
it handy). My j64-801 folder lives in /Applications. Here is the start
Are you looking for http://www.jsoftware.com/jwiki/Scripts/WindowsTimer?
Thanks,
--
Raul
On Wed, Feb 12, 2014 at 10:38 PM, Pascal Jasmin wrote:
> The code with no nouns in z. The server and client handlers do nothing
> with messages other than print to console, and so there should be no
> c
The code with no nouns in z. The server and client handlers do nothing with
messages other than print to console, and so there should be no concern about
running it. The code is there to exercise opening and closing sockets.
There is both a client and server loop handler, but as mentioned, not
Here's one other note.
If I was concerned about the "labels" on the items in your xml file, I'd do
it as a second pass.
Perhaps:
require 'xml/sax/x2j'
x2jclass 'freecelllabels'
'Items' x2jDefn
/:= Table : Table=: i.0 0
dict := Table=: Table,Row : Row=: ''
key := Row=: Row,wrote:
It should be a bug that MemoryLimit in base.cfg is not being
referenced, this affects all platforms. Please wait until the
next library update release.
Ср, 12 фев 2014, Don Guinn писал(а):
> Specified the MemoryLimit parameter in config/base to be 2^31 but
>
>9!:20''
>
> 461168601842738790
I don't have a mac to test. What is the content of that jhs
file? Is it different from that of jhs in j701? Will it work
by copying jhs from j701 to j801?
Ср, 12 фев 2014, Brian Schott писал(а):
> Have any other Mac users downloaded and installed jhs801 successfully? I
> have had problems with t
I do not understand the problem you are trying to solve well enough to know
what problems you are anticipating. Sometimes just trying (and failing or
succeeding) is the best way to discover whether an approach will work (and,
if it does not, this can help form the questions you need to answer).
I
Skip,
it seems your jqt should already worked properly.
You can also run the websocket inside qt demo both on android and a desktop
simultaneously. and on the browser in desktop computer, change the ip of
repl server to that of the android so that it runs like a ssh (sort of).
13.02.2014, в
Well, I am not sure I would call it a nice example, but I am glad to hear that
it does work.
I also added a second script that has a 'skinnier' look. Haven't had time to
finish a video on that one yet.
http://www.jsoftware.com/jwiki/http:/www.jsoftware.com/jwiki/BobTherriault/Visualize?action=
I agree with Raul, and uncomfortable to try your script. If your handler is
non-trivial you should define it inside a locale/class and export it to
z-locale.
result of any wd command is always a string, ever since wd was first introduced
some decades ago.
13.02.2014, в 9:08, Pascal Jasmin нап
the z locale is apparently necessary for the websockets handlers (which is how
J communicates with websockets).
The documentation is here: http://www.jsoftware.com/jwiki/Guides/JqtWebsocket,
and there are also demos with j8.
If the handlers have to be in z, I might as well put the tracking list
I am a little uncomfortable, reading ad-hoc code in the 'z' locale. Why not
use some other locale?
Also, I am not clear what you are asking for, with the event handler, but
clearly you can call it yourself if you wish to do so (and you could
maintain your own queue of commands to feed it, if you w
I think x2jElm is a conjunction for syntactic reasons.
And, while it does have a gerund result, that result is typically ignored -
what matters is the updated definitions of x2jElmLoc and x2jElmDef. It's
basically appending to what might logically be thought of as a lookup table
(name, gerund pair
bob, thanks again for sharing. It works really well and is also a nice JHS
example.
On Tue, Feb 11, 2014 at 9:08 PM, robert therriault wrote:
> Thanks Pascal,
>
> Believe it or not I did simplify this quite a bit from where I originally
> was, based on you previous comments. I'll play around som
A minor wierdness with websockets is that connect returns a string socket,
whereas the event handlers have integer sockets.
I was hoping that 6!:2 allowed for event handlers to process messages, but it
doesn't appear to. Does such a command exist? A bit like the old vb windows
3.1 doevents()/
Specified the MemoryLimit parameter in config/base to be 2^31 but
9!:20''
4611686018427387904
I can set it myself using 9!:21 and it works fine.
Windows 8 with 8G of memory
JVERSION
Engine: j701/2011-01-10/11:25
Library: 8.01.020
Qt IDE: 1.0.23/4.8.5
Platform: Win 64
Installer: j8
That helps a lot.
This showed me that x2jElm is a conjunction.
x2jElm
2 : 0
x2jElmLoc=: x2jElmLoc,<,m
x2jElmDef=: x2jElmDef`(v f.)
)
And this showed me that the next result is a new verb's atom representation.
I am still way thinking about how the line ` '/' x2jElm (3 : 0)` which has
no `
In that case, I would just deal with it sequentially, like you did.
Basically, I would ignore the labels entirely.
Also 'dict' is just the label you are using in that xml. It was "database"
that I was reacting to - there are a fairly widely adopted set of practices
associated with databases (and s
Bill,
The first time Tried 1!:0 '/storage/sdcard0/*' statement it generated a
huge list of what looks like 2-D boxed data:
1!:0 '/storage/sdcard0/*'
|RMnsd|2014 2 10 16 40 27|4096 |rwx|
|Ltrhb|2014 2 10 16 40 9 |4096 | ...
...
Unfortunately, the J window display on my Galaxy does not s
Ok, let's recap.
Here's the code you quoted:
x2jDefn_nifxml_
1 : 0
for_i. <;._2 (0 : 0) do.
'nm df'=. ':=' splitstring >{.'NB.' splitstring >i
'mn dy'=. dltb each 2 {. ' : ' splitstring df
nm=. dltb nm
if. 0=#dy do. nm x2jChar (3 : mn)
elseif. 0=#mn do. nm x2jElm (4
I am thinking of this data as a data set, perhaps is used the word database
too cavalierly. My purpose was to see if there was any trends in my
personal Freecell game playing skills. If the data format changes, I guess
I will alter my code, in this case.
You are way ahead of me on thinking about g
It looks like I get the same paths as you, but I don't know what version of
xml is being used.
copath'nifxml'
+++--+-+
|px2j|psax|pexpat|z|
+++--+-+
9!:14''
j602/2008-03-03/16:45
I do NOT get the problem if I use _px2j_ .
But I still do not understand what this part
I can throw together an example or two, but first allow me to make an
observation, and ask a question:
The observation is that the xml itself is a bit messy. Every data item you
have mentioned corresponds to a pair of [consecutive] xml elements. And, as
is usual for xml, the result is somewhat ove
http://www.jsoftware.com/pipermail/programming/2011-January/021609.html
In the thread mentioned above I was trying to extract information
corresponding to the following key tags from a file excerpted from there:
date, duration, gameNumber, moves, and result. Each "dict" group represents
a game of
Hmm...
x2jDefn is defined in the px2j locale which is defined by the statement
require 'sax/xml/x2j'
So what I had meant to paste into my message was:
x2jDefn_px2j_
Meanwhile, nifxml was the locale which I had defined, and it inherits from
px2j, as you can see here:
copath'nifxml'
++--
Raul,
These tutorials seem very valuable, but I am quite lost.
I was fascinated by the following snippet because it looks like you somehow
are defining an explicit definition of some sort using an adverb
x2jDefn_nifxml_, but without the usual parts ` : 0` before the definition,
but ending with a
Have any other Mac users downloaded and installed jhs801 successfully? I
have had problems with the install because when I double-click on the
jhs801 icon either in Finder or on the Dock, the system sort of hangs doing
nothing except maybe the red-J icon in the Dock may bounce. I am using OSX
10.7.
Previously, in
http://jsoftware.com/pipermail/programming/2014-February/034926.html I went
through a basic illustration of sax/xml. There are more examples at
http://www.jsoftware.com/jwiki/Addons/xml/sax
And, if you deploy something based on J in a corporate context, it would be
a good idea to re
Typo,
jpath '~users' should be jpath '~user'
Ср, 12 фев 2014, bill lam писал(а):
> Skip,
>
> Jqt/android try to install on removable sdcard but the location
> of sdcard is vendor specific and changed in Android 4.2 ro 4.3.
> Just a few questions.
>
> Do you also get /storage/sdcard0 and /stora
Skip,
Jqt/android try to install on removable sdcard but the location
of sdcard is vendor specific and changed in Android 4.2 ro 4.3.
Just a few questions.
Do you also get /storage/sdcard0 and /storage/sdcars1 folders?
Is /storage/sdcard1 the same folder as /storage/extSdCard ?
Please try the f
43 matches
Mail list logo