|
Would anyone have any idea why a SSH key that works fine with a general SFTP tool like PuTTy or WinSCP would give a "packet too short" error on another application? It's a proprietary software tool and it's driving me nuts because the same tool works with another SFTP server/key just fine using the same process.
|
# ? Jul 31, 2019 00:50 |
|
|
# ? May 30, 2024 23:58 |
PierreTheMime posted:Would anyone have any idea why a SSH key that works fine with a general SFTP tool like PuTTy or WinSCP would give a "packet too short" error on another application? It's a proprietary software tool and it's driving me nuts because the same tool works with another SFTP server/key just fine using the same process. What format is the key in? If I remember correctly, PuTTy uses ppk format, but pem file would be the standard for a linux tool. Don't remember what WinSCP uses off hand. Could also be permissions, ssh command on linux will throw an error unless your private key is 0600.
|
|
# ? Jul 31, 2019 01:02 |
|
fletcher posted:What format is the key in? If I remember correctly, PuTTy uses ppk format, but pem file would be the standard for a linux tool. Don't remember what WinSCP uses off hand. Could also be permissions, ssh command on linux will throw an error unless your private key is 0600. It’s a .pem that was converted to .ppk (WinSCP uses PuTTy to convert it). It’s unencrypted with full control on a Windows file system.
|
# ? Jul 31, 2019 01:21 |
|
Pollyanna posted:We’re looking to replace Mongo with DocumentDB. As part of this, we want to do some performance testing against an endpoint backed alternately by Mongo or DocDB. We can do this by continually generating faked data and sending a request to the endpoint over and over. http://tsung.erlang-projects.org will press things to the limits.
|
# ? Jul 31, 2019 13:12 |
|
PierreTheMime posted:It’s a .pem that was converted to .ppk (WinSCP uses PuTTy to convert it). It’s unencrypted with full control on a Windows file system. Maybe see if there's a new line at the end and try adding one if there isn't? Heck, maybe it expects different newlines than PuTTy uses? Munkeymon fucked around with this message at 14:14 on Jul 31, 2019 |
# ? Jul 31, 2019 13:59 |
|
PierreTheMime posted:Would anyone have any idea why a SSH key that works fine with a general SFTP tool like PuTTy or WinSCP would give a "packet too short" error on another application? It's a proprietary software tool and it's driving me nuts because the same tool works with another SFTP server/key just fine using the same process. Maybe the key size is too big for the app or it's using a different SSH key-type like ECDSA
|
# ? Jul 31, 2019 15:12 |
|
The same process takes another .ppk in the exact same format, spacing, etc. just fine. The only difference I can see is that the private key is 10 characters shorter, but is the same number of linse and that same key works if fed to WinSCP so . I've got a ticket open with the vendor about it, and in the meanwhile had to script a super round-about way using PowerShell and OpenSSH batch calls.
|
# ? Jul 31, 2019 16:49 |
|
I'm looking to do some procedural generation, and I need a function that will take an integer in a given range (0-65535 for now, but if the function can deal with arbitrary powers of two, that'd be great) and map it to an integer in the same range. The mapping should have the following properties:
FredMSloniker fucked around with this message at 22:07 on Aug 4, 2019 |
# ? Aug 4, 2019 17:27 |
|
For larger sets you're basically looking for an RNG where the period is equal to the state size, i.e. the RNG will enter each state. This property is called being full cycle. Extremely basic LCGs on the type of state = (state + prime) % period are full cycle if the prime and period are coprime. The other major category of RNGs that can be -- but aren't always -- known to be full cycle are LFSRs. I recommend Xorshift, which has known full cycle versions for 32, 64 and 128 bit state and is known to have a not-awful distribution, if less good than a more complex RNG. E: I should also mention that the way you use a full cycle RNG as a function that maps integers to "random" intergers in the same range is to use the input integer as the state. E2: You can additionally construct full cycle xorshift versions for any arbitrary power of 2 as long as you use bit rotations instead of bit shifts which ensures that the new state is guaranteed unique from the input. The paper found ones with shifts instead on the grounds that they were faster. Xerophyte fucked around with this message at 20:47 on Aug 4, 2019 |
# ? Aug 4, 2019 20:32 |
|
FredMSloniker posted:I'm looking to do some procedural generation, and I need a function that will take an integer in a given range (0-65535 for now, but if the function can deal with arbitrary powers of two, that'd be great) and map it to an integer in the same range. The mapping should have the following properties: https://en.m.wikipedia.org/wiki/Xorshift
|
# ? Aug 4, 2019 22:16 |
|
That looks like just what I wanted. Thanks! Now to find the right shift constants to get a full-cycle result for my desired state size. (I've got a program testing various ones.)
|
# ? Aug 4, 2019 23:57 |
|
You might check out LFSR counters if you didn't end up seeing it already.
|
# ? Aug 5, 2019 00:06 |
|
FredMSloniker posted:I'm looking to do some procedural generation, and I need a function that will take an integer in a given range (0-65535 for now, but if the function can deal with arbitrary powers of two, that'd be great) and map it to an integer in the same range. The mapping should have the following properties: Just out of curiosity, what kind of weird constraints are you under that you can't afford 128kb of table?
|
# ? Aug 5, 2019 00:29 |
|
fritz posted:Just out of curiosity, what kind of weird constraints are you under that you can't afford 128kb of table? Developing for a Commodore 64.
|
# ? Aug 5, 2019 00:40 |
|
Can you save state across function calls?
|
# ? Aug 5, 2019 00:57 |
|
ultrafilter posted:Can you save state across function calls? Yes, but not 64k of state. Does that help somehow?
|
# ? Aug 5, 2019 05:40 |
|
There's a person's personal project on github that was last committed in 2018 and has an attached MIT license. I forked it and modified some of the code, and then ended up rewriting most of the code in a different language. Before I push my changes back to my github repo what do I need to change/do to keep all the licensing stuff kosher? Do I need to rename the project/repo? Do I just change the copyright year/name in the LICENSE.txt file to reflect the current year/name or do I need to keep the original copy as-is and add my own?
|
# ? Aug 5, 2019 11:14 |
|
Boris Galerkin posted:There's a person's personal project on github that was last committed in 2018 and has an attached MIT license. The thing I normally see is the single copyright year/name line for edits listed above the original. IANAL so no idea on the correctness of that. It’s probably fine as the original license remains below your tag.
|
# ? Aug 5, 2019 11:21 |
|
FredMSloniker posted:Yes, but not 64k of state. Does that help somehow? That lets you implement pretty much any standard PRNG, so yeah, there's probably something you can do with it.
|
# ? Aug 5, 2019 14:54 |
|
E: Ended up solving my question about an hour or so after I asked it, removing it!
TheKingofSprings fucked around with this message at 22:48 on Aug 6, 2019 |
# ? Aug 6, 2019 20:20 |
|
So I am in my last year of my CompSci degree and am realizing I don't know poo poo about poo poo. I had an idea for an on-demand, drop-shipping business, kind of like a Teespring... but all I've learned is using some Python, Java, and C on a local machine. I have no idea about web frameworks, "front end", "back end", etc. What do I need to Google to learn enough to start prototyping something like this? I've found a lot of Youtube videos sperging out over what the new hotness.JS is, but I really need some fundamentals.
|
# ? Aug 7, 2019 00:16 |
|
AgentCow007 posted:So I am in my last year of my CompSci degree and am realizing I don't know poo poo about poo poo. I had an idea for an on-demand, drop-shipping business, kind of like a Teespring... but all I've learned is using some Python, Java, and C on a local machine. I have no idea about web frameworks, "front end", "back end", etc. What do I need to Google to learn enough to start prototyping something like this? I've found a lot of Youtube videos sperging out over what the new hotness.JS is, but I really need some fundamentals. I give this advice a lot because it helped me back in the day, so maybe it'll help you: Write a web server in Python or whatever. It'll really help you understand a lot. Don't actually use the web server you write. Throw it away and then use Django or whatever. You'll be more able to evaluate stuff after you've done this. When someone gave me this advice a long time ago it sounded like someone told me to write some insane thing like...I dunno...a whole operating system or something. But, actually a web server is pretty simple and there's lots of tutorials out there. And some more info: Web backends are basically big functions that taking a request from the browser, using that to build a big string of HTML/CSS/JS, and then sending it to the browser as a response. Web frontends are about running that JS in the browser to manipulate the HTML and CSS to build interactive applications. (or, less and less commonly, the JS does very little and every "screen" of the web site is a request<>response with the web backend which does the manipulation of the HTML/CSS to change what you see)
|
# ? Aug 7, 2019 01:07 |
|
Yeah, the best way to broaden your experience is to build a "real" and reasonably complete product or tool of some kind. Odds are excellent that you'll get halfway in, discover major structural issues, and have to scrap it and start over, but since your primary goal is education, that shouldn't be a huge problem.
|
# ? Aug 7, 2019 01:39 |
|
Thermopyle posted:I give this advice a lot because it helped me back in the day, so maybe it'll help you: Write an operating system. Simple ones aren’t that hard; undergraduates can get things running within a single semester. Much like the web server, never use it for anything other than running the half dozen toy programs you decide to write.
|
# ? Aug 7, 2019 02:53 |
|
Yeah, I wasn't clear on what I meant by "whole", but I meant like a full OS with all the trappings...a production-ready thingamajig. AKA, not the equivalent of writing a toy web server. Like, it's quite doable to write a 3d renderer, it's another thing to create Unreal engine.
|
# ? Aug 7, 2019 03:06 |
|
Currently I have a program which outputs XML in the following wonderful format:code:
Here is my quick code to iterate through all records and grab the CLIENT-NAME and service date: code:
Given the structure of this data, is there a good/better way for me to grab this information? My end goal is to pump out information in a CSV Bonus Question: Is there an easy way to clean up the special character codes (_x003C_ and the like) without coding up a number of manual regular expressions?
|
# ? Aug 7, 2019 23:18 |
|
Don't know if its necessarily better than your current approach but the last time I had to do something like that I imported it all into an mssql express instance and used xml path/for xml/toxml to do some heavy lifting.
|
# ? Aug 8, 2019 00:32 |
|
My recommendation would be to find the person who created that XML, and beat them senseless with the nearest fire extinguisher. Have you tried registering the ShortDateFormat namespace in an XPathContext, a la this?
|
# ? Aug 8, 2019 02:18 |
|
Thank you both. Believe me, if I had the power to make some changes, XML formatting would be the least of them. I'll see what I can wrangle up with those suggestions and see if something fits the bill. The use case here is for an end-user to get the raw XML report, run my translator program, and then make use of the resulting CSV. It's far from a great system.
|
# ? Aug 8, 2019 16:06 |
redleader posted:My recommendation would be to find the person who created that XML, and beat them senseless with the nearest fire extinguisher. Wholeheartedly agree on both points. Probably something like this: Perl code:
|
|
# ? Aug 8, 2019 17:19 |
|
Hey goons. Can anyone recommend me some web framework for sorting/managing table data? My use case is fantasy football rankings, mostly for personal use. Hopefully the right place to ask. Thanks!
|
# ? Aug 8, 2019 21:50 |
Gyshall posted:Hey goons. Can anyone recommend me some web framework for sorting/managing table data? My use case is fantasy football rankings, mostly for personal use. Google Sheets? What is it that you are trying to do? How come you need a web framework for it? If you want to get up and running very quickly with a web based CRUD app, Django all the way! PyCharm + Django = Fun
|
|
# ? Aug 8, 2019 23:23 |
|
Toss datatables on a table and boom. https://datatables.net/
|
# ? Aug 8, 2019 23:28 |
|
What exactly are .map files used for, and how can I process them/link them? Twilight Princess has some .map files that supposedly match up to where functions and objects and such are located in memory (which I need for a project I'm working on), and they look like this as plaintext: code:
code:
|
# ? Aug 14, 2019 23:52 |
|
map files are an output of the linker, describing where it put things. I think the columns in the one you're showing are offset, size, location in memory. Is that all you need? So for example code:
ctors - constructors, dtors - destructors, rodata - read-only data
|
# ? Aug 15, 2019 00:15 |
|
They show the global symbols, where they are in memory and how big they are. I've not seen that exact format before but in my experience the format is entirely dependant on the linker used. You'd probably have to search for tools specifically for your linker if they exist. When compiling symbols are put into sections depending on the type of symbol (eg .text is code, .data is global initialised variables, .bss is global variables set to 0 and .rodata are constants). My guess for that file would be: <Adresss in section> <size> <Address in memory> <?> <symbol> <file> The second file is probably relocatable sections so the address in memory isn't known until that section has been loaded (eg dynamic linking). Eg your main function is at address 0x80006454 and is 0x184 bytes long.
|
# ? Aug 15, 2019 00:24 |
|
Oh, okay - so those are in fact the exact locations in memory where those functions are located, and I don't have to munge the files in any way to get that information. I was confused since all the map files seemed to start from 0x00000000, with that _prolog function. In that case, I should be able to write a script to parse those files and list the memory range for each function. Thanks!!!! robostac posted:The second file is probably relocatable sections so the address in memory isn't known until that section has been loaded (eg dynamic linking). Oh, drat, okay. I got some more info from someone working on a similar project, and supposedly they're statically linked. I guess I might have to go looking for that tool after all. EDIT: Or maybe I actually can't, cause their location is only known when the game is actually running...dammit. Pollyanna fucked around with this message at 00:40 on Aug 15, 2019 |
# ? Aug 15, 2019 00:28 |
|
Do you have any more of the mapfiles which specify where each of those sections is placed in the binary? Your .rodata might be specified as being placed at 0x34000000 so offsets of symbols listed in the .rodata section would be relative to that address.
|
# ? Aug 15, 2019 01:11 |
|
Oh yeah, there's like a "master" mapfile called frameworkF. All the sections and the first line under them look like this:code:
|
# ? Aug 15, 2019 01:24 |
|
|
# ? May 30, 2024 23:58 |
|
They're a linker map output by the CodeWarrior toolchain. They're left on the disk for the crash handler, which has a very hacky parser for them. You can load them in, say, Ghidra, with the GameCube loader: https://github.com/Cuyler36/Ghidra-GameCube-Loader frameworkF.map refers to the main.dol binary, the REL objects are dynamically linked at runtime upon room transitions and other things -- it's a technique to save on memory, which was fairly limited on the GC/Wii. They're relocatable, which means that the game will dynamically choose a base address at runtime for them, load them in, patch up all relative pointers, link up imports, etc. What are you looking to do with this? FYI, the Wind Waker and Twilight Princess codebases are pretty impossible to read for a non-Japanese speaker.
|
# ? Aug 15, 2019 03:06 |