Jump to content

llGetNotecardLineSync()


Cain Maven
 Share

You are about to reply to a thread that has been inactive for 68 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Just now, Wulfie Reanimator said:

llGetNotecardLineSync should finally be grid-wide.

Good. I started updating my secondary script today (since my primary was so successful).

I am totally cheating, since I always load the entire notecard, I will error (for now) if after an initial Sync call, a subsequent Sync call loading the same NC fails.  I will change this for the new script, since it will load "nested" notecards..

Strangely, my initial script - which reported timings going from 300 seconds to 15-40 second, now miscalculates the time as 350523 seconds. (But I didn't change anything.)

Link to comment
Share on other sites

They broke it though, and broke llGetNotecardLine at the process.

llGetNotecardLine and llGetNotecardLineSync now return only up to 1023 bytes (used to be 1024 for async) and I was relying on that behavior.

Time to write a jira uncanny canny feedback.

  • Thanks 1
  • Sad 1
Link to comment
Share on other sites

Just now, Frionil Fang said:

They broke it though, and broke llGetNotecardLine at the process.

llGetNotecardLine and llGetNotecardLineSync now return only up to 1023 bytes (used to be 1024 for async) and I was relying on that behavior.

Time to write a jira uncanny canny feedback.

Yeah, thanks for letting us know! 

I use a "compression" on some of my notecards where the data is approaching 1024 but I tried to cut it off before that..this would bite me if I used my code "as designed"!

 

Link to comment
Share on other sites

3 minutes ago, JoyofRLC Acker said:

Ok, Ill bite 😀

What do people use NC (in scripted objects for)?

In my case its

1.  Settings (rarely > 10 lines)
2.  Help - size varies but never read into memory just a llGiveInventory

So what are these mammoth NC used for?

In my case, I load an entire library of "code" so that I can use that to "do things" - I load it into LSD one time, then I can lookup the data in LSD by Key/Value pairs.

What kind of "things"? Parsing code is the current use.

 

  • Like 1
Link to comment
Share on other sites

My SL computer loads programs that are written as hex dumps into notecards. Because notecard loading was so painfully slow, minimizing the line count was important and maxing out line length was a good idea. Sure, reading with the sync notecard reader is so much faster that using, say, 512 character lines would no longer be a limiting factor in loading speed, but that doesn't change the fact that no script that was relying on 1024 byte lines works anymore until they fix their regression.

Anyway, wrote the bug report: https://feedback.secondlife.com/scripting-bugs/p/server-version-2024-02-217995320426-broke-notecard-reading-limit

  • Like 1
Link to comment
Share on other sites

9 minutes ago, JoyofRLC Acker said:

Ok, Ill bite 😀

What do people use NC (in scripted objects for)?

In my case its

1.  Settings (rarely > 10 lines)
2.  Help - size varies but never read into memory just a llGiveInventory

So what are these mammoth NC used for?

Nanite Systems is a robot roleplay system that makes very heavy use of notecards as a filesystem. They're used to load scripts for its custom script-engine, as well as switch between configurations.

  • Like 1
Link to comment
Share on other sites

4 hours ago, JoyofRLC Acker said:

What do people use NC (in scripted objects for)?

AVsitter uses notecards to store pose information; in the case of things that advertise 1000+ animations, that can take a lot of time to read in and process.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

6 hours ago, JoyofRLC Acker said:

Ok, Ill bite 😀

What do people use NC (in scripted objects for)?

In my case its

1.  Settings (rarely > 10 lines)
2.  Help - size varies but never read into memory just a llGiveInventory

So what are these mammoth NC used for?

Well it's human editable 64kb of "Stuff" .. can inject it all into the Linkset Data of the root prim as well

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Frionil Fang said:

My SL computer ...

8 hours ago, Wulfie Reanimator said:

Nanite Systems … notecards as a filesystem … to load scripts for its custom script-engine …

8 hours ago, Love Zhaoying said:

… library of "code" so that I can use that to "do things"

I personally love seeing LSL being used to build computers.

Haven't been much bothered with that myself (except that time I made a breadboard simulator with physical LED's and resistors that get rezzed, and move them into position on a breadboard prim to build a circuit — didn't take it any further, was mostly just messing with the idea)…  but I enjoy building up logic-level simulations of my own architectures, complete with matching assembler, mixing together interesting bits of various architectures I've used…  I'm not quite such a masochist as to do that in LSL, though…

I guess a script could simulate a smallish FPGA okay … could fit a couple LUTs into an integer … damn you all!!!

Edited by Bleuhazenfurfle
  • Like 2
Link to comment
Share on other sites

On 3/12/2024 at 2:59 PM, Wulfie Reanimator said:

Nanite Systems is a robot roleplay system that makes very heavy use of notecards as a filesystem. They're used to load scripts for its custom script-engine, as well as switch between configurations.

 

On 3/12/2024 at 2:49 PM, Love Zhaoying said:

In my case, I load an entire library of "code" so that I can use that to "do things" - I load it into LSD one time, then I can lookup the data in LSD by Key/Value pairs.

What kind of "things"? Parsing code is the current use.

 

I am very curious about potential examples to see how these things are done. It sounds fascinating.

Link to comment
Share on other sites

21 hours ago, Bleuhazenfurfle said:

I'm not quite such a masochist as to do that in LSL, though…

I guess a script could simulate a smallish FPGA okay

I know someone posted awhile back that they had a 6502(?)/6510(?) emulator in LSL.. I think they wrote that they could run assembly code from game ROMs or something like that. I was a little jealous until I realized, yeah and they did that WITHOUT LinksetData... (I like where I am now better).  Like you said, not that much of a masochist.

  • Like 1
  • Haha 3
Link to comment
Share on other sites

14 hours ago, Jabadahut50 said:

I am very curious about potential examples to see how these things are done. It sounds fascinating.

NS is pretty impressive in its own right, even ignoring the notecards. It mimics an operating system in form and function - scripts are treated as programs, and program output can be "piped" as input to other programs like you'd expect from a CLI terminal. It's about as involved as you might expect.

Even the LSL paradigm is replaced by heavy use of the LSL preprocessor. (No events.) Many open source scripts are offered in the SDK.

/gush

Edited by Wulfie Reanimator
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

11 hours ago, Love Zhaoying said:

I know someone posted awhile back that they had a 6502(?)/6510(?) emulator in LSL.. I think they wrote that they could run assembly code from game ROMs or something like that. I was a little jealous until I realized, yeah and they did that WITHOUT LinksetData... (I like where I am now better).  Like you said, not that much of a masochist.

That may have been me, though I know I'm not the only person to write a 6502 emulator in LSL. It's not cycle accurate and forgoes emulating many of the hardware quirks (illegal opcodes, RMW behavior) and BCD arithmetic mode, the NES did fine without the latter.

It doesn't emulate a real computer either, instead implements its own "hardware" so it won't run any code that isn't written for it specifically; the CPU runs at roughly estimated 400 Hz instead of 1-2 MHz so it's not exactly going to be competitive with an Apple II, C64 or NES, so I figured to just give it appropriate peripherals rather than try to target a real architecture.

It used to have only 8 kB of memory, all I could fit into the main CPU+memory+system bus script, but it now uses linkset data to swap 1 kB memory banks and can see the entire 64 kB address space, keeping 4 banks in script memory. Not that there's any reasonable way to use up such massive quantities, 64 kB? The biggest program I've made for it is just over 3 kB, and that's mostly just graphics.

image.thumb.png.a89f60841a3143925452991dfae51f8c.png

To stay on the topic of notecard reading though... can't see any corruption in the above picture thanks to fortunate positioning, but it's there.

The data storage device reads arbitrary files as hex dumps and crams them into system memory. The files were laid out as 1024 character lines (512 memory bytes per line, in other words) to minimize the amount of lines to read, everything already runs at a very retro pace and no need to make it any slower. Now that even the old notecard reading function broke and returns only 1023 hex digits, the last byte on each line is misread, and with the way the system's video memory is laid out in 4+4+8 bit units at 32x24 character resolution (background color, foreground color, character) this means one character every 8 lines is corrupted.

image.thumb.png.6f407e8a583f615a7bf96910a339f9be.png

Also not noticeable on most of the corrupted lines, but bottom right corner is clearly wrong: it's supposed to be character 0xBD, the storage device detects the missing nibble and kludges it into 0xB0 (it would otherwise end up as 0x0B). Thankfully it was just a picture and not code, you wouldn't want your LDA <16-bit address>,X opcode to turn into BCS <signed 8-bit offset>. Just for fun, below is the program+data in the notecard:

Quote

; LOWRESVIEW: Displays a text graphics (64x48) image
a9428dd1ffa9038dd2ffa9008dd3ff8dd4ff8dd5ffa9068dd6ffa9648d02ffa000b93603f0068d03ffc8d0f578a9a28dd0fffa4c3203504c45415345205741495400 ;1536 bytes of image data follows
64ac649d60fa60fa608d6020602060206020602060206020602060206020602060206a206afa6a206a8c6a206a8c6a8d6a206a206a206a206afa6a8d6abd4aca649d60eac020c020c09cc0da608d608c60fa60fa60206020602060206020602060206a206aa06abc6aea6aca6a9c2a9d6a8c6aa02aca6aea2aac2a9d6aa02aca602060eac020c08cc0fac020c0eab09db020b0fab0acb0da60bc608d602060fa60fa6a8c6aa02aad6aa02aca6aea2aca6aa02a9d62da6aa06aa0628d6aa02a9d60206020c0cac020f0acf0adc020b0cab0eab020b020b020b020b09cb0adc020c020a0ca2acae2da6aa0e2ac6aa02a9d6aa02afa6a8d6aa02afa629d6aa062ca6020602060eac020f09dbfdab0dab020b020b020b020b09cb0dab0fab020b0dac08d20ca2a9d30202ada32ca2adae2ca6a9c2ada2a9d6a9c2ada2a8c2a8d629d6020608cb09db09db020b08db020b0fac0dab08db020bc20bc20bc20b0dab08db0ea309d3020d020d020d020d0203020e020e0206a206a206a206a9c2a9d6a206020b0cab020b020b0eab020b0a1c020c020b081b020b08cb020bc20bc20b081b02030cad020d020708c70fa7020d0203020e02060206020e02060206020602060eab020b0eab020b0cab08cc09dc0dac081c0a1b08db020b081b020bc20b09cb08dd0cad020708cf09df020f0da708dd0203020e020e0206020602060206020
60eab020b0cab020b0bcc0bc10ace0adc0fac09cc0a1b08db020b0dab0fab020b081b09cd0fa70eaf020f020f02070cad0203020e02060206020602060206020b0cab020b081b020c0cac02010cae0ea10bde0dac0bcc09cb0fab020b020b09db020b0da708d70eaf020f020f02070cad0203020e0206020e020602060206020b0cab020f0acb08db09cc08dc0dae0fae0ace1eac0acc0dac0ade0ace0adb0fab0fad0dad02070eaf020f020f020f0ead0203020e02060206020602060206020b0cab0eaf08cf09cf0daf08cf0faf08df0dac0dac0eab0adc0fac0a1c0dac0eab0ea3020d020d020f0caf020f020f0ea3020308ce0fae08d6020602060206020b0cab09cf0caf0faf02010a01020109cf081f020c09cb0fab0fac09dcf8cf09cb08d30ca3020d020d0adf020f020f0ea30faf09df020f09c608d602060206020b0cab020b0acf08df02010ca10811020109cf08df020f0eaf020f0faf020f020f0eab0ea3020302030eaf020f020f0eaf020f08df020f02060ca60206020602060eab020b020f0caf020f08110201081108d109cf0faf0bcf0a11020f0bcf020b0a1b020e0cae02030eaf020f020f0a1f0daf020f020f02060bc602060206020609cb08db020b09cf08df020f081102010ca10bc10fa10fa10ea10daf0a1f08cb09db0bcb0bd608de0eaf020f020f020f020f08cf0faf0a1f02060ca60206020
602060adb020b020b0eaf08df020f0da10bd10201020102010bcf0a1f020b0a1b08c609d6020602060bdf020f020f020f020f020f020f020f02060ca60206020602060bdb0fab020b0a1c09cc0bcf08df020f0daf0daf0daf020f0fab0a1b020b0ea602060206020f0caf020f020f020f020f020f020f020f08c609d60206020c0acc0dac0adc0a0b0bcc020cfeaf09cf0daf0faf0fac0a1b0acb020b020b08c609d6020602060bdf09df020f020f020f020f020f0faf0a160bc602060206020c09dc020cb8dc09cc0a0c08df020f020f020f020fc9cc020b0cab020b020b0ea6020602060bdf09df020f020f020f020f020f020f020f020f0ea602060206020cb8ccba0cba0c020c09cc0a0f08df020f020f020f020c020c0a0b0bcb08db02060ca60bdf09df020f020f020f08df020f020f020f08cf0fa609d602060206020c020cbdacb20cbfac020b09cc0a0f0faf020f020f020c0bdc0a0c0a0c0a0c0a0f0acf09df020f020f020f0bd60da60da60da60da609d60206020602060206020c08dcbbccbeacbacc020c020c09cc0adc0a0f0faf0a0c0a0c0a0c0a0f0acf09df020f020f020f020f0bd609d60206020662066206620664666726669666f648c409cc0facb9cc020cb8ccbbcc020fc9df09cf0daf0daf0daf09df020f020f020f020f020f08cf0bd609d602060206020602060206020602060206020648c64bd  

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, Frionil Fang said:

Now that even the old notecard reading function broke and returns only 1023 hex digits

So far, even with my "packed" NC's I appear to be unaffected because I set my limit to a little less than 1024 when I did the "packing" - just in case.

I used unique flag sequences to identify "Key" and "Value" data, so either can span NC lines for reading data intended for LSD KVP's.

  • Like 1
Link to comment
Share on other sites

Yeah, I could retroactively go and just add line breaks anywhere especially now that the storage device uses -Sync reading, the file is a contiguous block of data and linebreaks don't matter for how the computer itself sees them, but I'd rather them just fix the regression sooner than later.

Link to comment
Share on other sites

20 minutes ago, Frionil Fang said:

but it now uses linkset data to swap 1 kB memory banks and can see the entire 64 kB address space, keeping 4 banks in script memory. Not that there's any reasonable way to use up such massive quantities, 64 kB?

LinksetData was expanded awhile back to 128k.  Just in case you didn't know, but maybe I misinterpreted what you wrote above!

Link to comment
Share on other sites

6 minutes ago, Love Zhaoying said:

LinksetData was expanded awhile back to 128k.  Just in case you didn't know, but maybe I misinterpreted what you wrote above!

Yes, I know, that's when I made the expansion: fitting 60*1 kB memory banks into linkset data (the other 4 stay in script memory), when you have no binary encoding, was more or less an impossible task. It uses base64 to achieve a 3 bytes into 4 base64 characters -ratio without a too horrible hit to performance on swapping. Hex dumps would be more performant, but that gets a measly 1 byte per 2 characters, and is used only for the system bus/DMA, and wouldn't leave enough linkset data space for all the other stuff.

  • Thanks 1
Link to comment
Share on other sites

5 minutes ago, Frionil Fang said:

Yes, I know, that's when I made the expansion: fitting 60*1 kB memory banks into linkset data (the other 4 stay in script memory), when you have no binary encoding, was more or less an impossible task. It uses base64 to achieve a 3 bytes into 4 base64 characters -ratio without a too horrible hit to performance on swapping. Hex dumps would be more performant, but that gets a measly 1 byte per 2 characters, and is used only for the system bus/DMA, and wouldn't leave enough linkset data space for all the other stuff.

Even with 128K, I am not certain my current project has QUITE enough, but it seems ok "so far".  64K was definitely not enough (without refactoring how my schemas would be represented in NC's).

  • Like 1
Link to comment
Share on other sites

15 hours ago, Love Zhaoying said:

I know someone posted awhile back that they had a 6502(?)/6510(?) emulator in LSL.. I think they wrote that they could run assembly code from game ROMs or something like that. I was a little jealous until I realized, yeah and they did that WITHOUT LinksetData... (I like where I am now better).  Like you said, not that much of a masochist.

For real masochism there was always the Iverson APL formal description of IBM 360 in just  a few pages.

  • Like 1
Link to comment
Share on other sites

15 minutes ago, JoyofRLC Acker said:

For real masochism there was always the Iverson APL formal description of IBM 360 in just  a few pages.

I think in 1987, I actually took an IBM 360 Assembly course at a local "community" ("junior") college while on a summer break from the university.  The teacher got mad because I knew too much about programming, so separated me from the class.

Edited by Love Zhaoying
  • Haha 1
Link to comment
Share on other sites

4 hours ago, Love Zhaoying said:

I think in 1987, I actually took an IBM 360 Assembly course at a local "community" ("junior") college while on a summer break from the university.  The teacher got mad because I knew too much about programming, so separated me from the class.

I kinda had that problem in three of my first year Uni classes…

With C++…  I rocked up to the very first lecture 5 minutes before it ended (the room was sandwiched between two others, and only accessible from a stairwell at the back of the building, which took me forever to figure out, being I was a little late and had missed seeing everyone else being guided around the back by the lecturer), then queried the lecturer on why he was teaching such an inefficient version of a construct — turns out the better version was in a lecture a couple weeks later, and after quizzing me a little, he strongly encouraged me to do another subject I was going to skip because its lectures happened to collide with his (it was a known issue, and we were advised to take his as the mandatory subject of the two).  He didn't "get mad", he just said as long as I did the prac classes (and he was also the tutor, so he could check that I knew the material being taught that week), and of course passed the exam (which I did with ease), he didn't "need" (he clearly meant "want") to see me in his lecture classes that semester.

Also to a lesser extent, with first semester Digital Logic; the class was basically building a logic simulator version of the 6502 we been talking about here — which goes to show how simple a processor it is.  We weren't told what we were making (or even that we were "making" anything in particular), we were just taught a bunch of logic stuff, built up some simple modules, and then told to connect the modules together, and finally had to design the instruction decode and control logic to manipulate them instead of driving the control lines manually, and at the end of the semester, we magically had a whole 6502 processor which passed if it ran a piece of test code provided on the day (though the lecturer had swapped a couple opcodes around and stuff to try hide what it was — and sworn those few of us who recognised the architecture to secrecy, once he realised we were racing off ahead of the class.  He also gave us a second marginally bigger processor to implement as an ungraded "challenge", mostly just to keep us busy and quiet during the classes — it worked).

And then again with another class on the CompSci side, where we were rather conveniently writing a 6502 assembler and emulator (in C, this time).  I almost got an exemption from the whole subject, but I didn't immediately recognise two of the terms he quizzed me on — TLD's, and cache consistency — annoying part is it turns out I knew about them, I just didn't know the proper terminology — so ended up sleeping a lot.  And I'd already messed with writing emulators, so I went a little overboard and did a fully interactive debugger, as well as implement a bunch of extra assembler stuff that was barely taught, let alone required — and since I'd already done most of it before my first prac class, just for funsies (they had to teach a bunch of stuff before the students could start working on it), the lecturer let me off the otherwise mandatory classes because I'd just be disrupting the rest of the class with bothersome thumb twiddling anyhow (plus, it allowed me to resolve yet another class collision — since I was doing the CompSci stuff alongside my actual course).  In that case, it was the prac tutor who was rather surprised when I rocked up to the very last class to get my work checked off (which was otherwise a "catch up" class for anyone who'd fallen a little behind), though (the lecturer had already seen it, but he wasn't allowed to just magically pass students prac work, it still had to go through the process which included checking for plagiarism and other kinds of cheating).  The best part though, is because I kept falling asleep in the guys lectures, I placed myself front and centre one time, hoping it'd keep me awake.  It didn't.  He had the good grace to ask me "if I was tired, or if his lecture was just that boring", and smiled when I waved the question off with a, "bit of both".

The only subjects that actually gave me any trouble that semester, were Maths (9am on a Monday morning — plus a couple other mornings) and Analog Electronics (basically, slightly simpler Maths, but with other stuff too).  I had to actually study for those…

Edited by Bleuhazenfurfle
  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 68 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...