Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
flakeloaf
Feb 26, 2003

Still better than android clock


That.... makes a fair bit of sense, actually. Thanks!

Adbot
ADBOT LOVES YOU

Dren
Jan 5, 2001

Pillbug

flakeloaf posted:

That.... makes a fair bit of sense, actually. Thanks!

Yeah, examples drawn from container types are the best examples. They should use container types as the default inheritance/class design teaching tools, the "Animal/Dog/Cat" and "Vehicle/Boat/Car" ones are absolute piss garbage.

Pollyanna
Mar 5, 2005

Milk's on them.


We have a selection of about 1000 options on our web app that a user can choose and add from a list. I’m thinking it’s too big for a simple select element. What’s a better way to expose a large amount of options to a user? I was thinking of an autosuggest of some sort, but from what I can tell that either requires a specialized API endpoint or a front end framework that we don’t really have.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

An autocomplete isn't some deep dark magic. You just take the users input and filter your array of selections with what the user has inputted.

You have everything you need to complete the task already at hand. You have the data from your selects, and you have javascript.

Does the user have some potential idea of what they want to select where they can even start typing something relevant?

nielsm
Jun 1, 2009



Generate the webpage with a <select> with all 1000 elements in it, then on page load replace the <select> with a custom implementation that lets you type-find, just keeping all the options in memory. No need to have an endpoint to query and so on.

If the number of elements starts passing 5k then don't put them in a <select> for loading, but in some JSON or similar structure. If you start passing 50k elements, an item search API endpoint might start becoming relevant.

... actually, measure you data size (in bytes) before deciding on a solution. Consider how much data you want to front load on the user. Maybe take a hybrid approach if there are some selections that are significantly more popular, so the popular options are loaded ahead of time, and the less popular are discovered via a search endpoint.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Dren posted:

That's called multiple inheritance and it is fine.

It's legal, but reasonable people disagree as to whether multiple inheritance is ever a good idea.

Dren
Jan 5, 2001

Pillbug

ultrafilter posted:

It's legal, but reasonable people disagree as to whether multiple inheritance is ever a good idea.

In C++ where there are no first-class interfaces multiple inheritance has at least 1 legit use case, allowing a class to implement multiple interfaces.

Gothmog1065
May 14, 2009
So, I've been tasked with coming up with a bit of a script, and it's a step outside of my comfort level. I've been mulling this over, and this is less about specific code and more about the thought process behind it.

The problem:

I am going to be given a fairly large file with some simple data (Those in Healthcare and that have dealt with HL7 will recognize this):

code:
ADT^A01 MSH EVN PID PD1 ROL ROL ROL PV1 NTE IN1 IN2 ZIN IN1 IN2 ZIN
ADT^A01 MSH EVN PID PD1 PV1 OBX OBX OBX
ADT^A01 MSH EVN PID PD1 ROL ROL NTE PV1 OBX OBX OBX DG1 DG1 AL1 IN1 IN2 
There will be millions of lines of this in each data file. The gist is the first column is the "type" (A02 will be further down, etc). After that are individual segments. Basically I want to see if by parsing a LOT of these messages, we can get a structure out of it. So with the example above, the data would come out:
ADT^AO1
MSH 1 1 (Required, non repeating - technically this is the max number of segments)
EVN 1 1
PID 1 1
PD1 1 1
ROL 0 0 (Not required, repeating)
NTE 0 1 (Not required, not repeating)
PV1 1 1

And so on. Some notes. Order is important, so it will always be (according to the 3 lines above) - MSH, EVN, PID, PD1, ROL NTE, PV1 ... Then there isn't enough data to determine if OBX and DG1 are first, or NTE (or NTE is in the middle), but eventually there will be. If not, I'll have to mark it somehow.

My convoluted way of thinking:

The server is Linux (CentOS 6) I'll probably be doing this in Python (2.6 is the official install on these particular boxes). I also have access to bash, KSH93, other shell variants, C, C++, probably some others. However he wants it native so some of the other items I have will be out (PowerShell, .Net, etc). While C would run this much faster, I'm more familiar with Python as a general so I will be using it unless there is some huge reason why not to use it.

The basic of this would be to load the file, loop over each line, then loop over each item in the list. It's obvious that if one iteration is the same as the previous, it's a repeat. if it's not, it's another segment. Now here's where things get fuzzy for me. Initially I was going to use a list matrix ( array=["MSH",1,1],["EVN",1,1] ), but then I started to realize there were probably going to be issues later on if I had to insert another segment in the middle. I could keep a simple counter of which 'step' I was on, but that may cause other issues (If it inserts in the wrong place, etc)

A coworker was talking about using objects and setting a class and using the attributes in the object, but I suspect that would be similar, I'd still have to keep an ordered list to call the class later to return the results.

While even typing this out, I realized a few potential issues, the main being making sure we were inserting any new segments in the correct place.

So am I even stumbling down a remotely correct path or should I just turn my rear end back around and start from square one?

JawnV6
Jul 4, 2004

So hot ...

Gothmog1065 posted:

While C would run this much faster, I'm more familiar with Python as a general so I will be using it unless there is some huge reason why not to use it.

I write C as my bread and butter daily driver language and would absolutely use Python for this. It's taking a bunch of text, the nitty-gritty details are a pita in C and native in Python. Get a CSV library to import it.

I don't know what HL7 is but if A01 and A02 are patients, run far away.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

JawnV6 posted:

I don't know what HL7 is but if A01 and A02 are patients, run far away.

IANAL, TINLA, but if the data is free of personally identifying information (PII) then it should be safe to manipulate. So I would verify that there's no PII in there before starting work, but assuming there is not I wouldn't worry about it.

As for your problem, it sounds broadly speaking like it boils down to 1) determine if tags always show up and if they can show up more than once in a row, and b) determine an ordering of tags. Item 1 is a lot easier: for each row, make a dict of tag to number of times it appears; if it's more than once, the tag is repeatable. For requiredness, keep a set of all tags that have shown up in every row thus far, and iterate over them at the end of each row iteration to make sure they all show up in the tag count dict.

Item 2 is harder, and I don't have a good solution for it off the top of my head. I'm inclined to say you should maintain a mapping of tag to the tags you have seen it occur immediately after, and then write some logic to "minimalize" the mapping. Like, if you have this dataset:
code:
A B
A C
A B C
you'd have this map:
code:
A: []
B: [A]
C: [A, B]
And you could look at that map and say "hey, I've seen B come after A, and I've seen C come after B, that means that I'll never see A C B so I can simplify C's entry to C: [B]."

Hopefully applying that kind of logic will allow you to reduce the mapping until every tag maps to only a single other tag; otherwise your dataset is ambiguous.

Gothmog1065
May 14, 2009

JawnV6 posted:

I write C as my bread and butter daily driver language and would absolutely use Python for this. It's taking a bunch of text, the nitty-gritty details are a pita in C and native in Python. Get a CSV library to import it.

I don't know what HL7 is but if A01 and A02 are patients, run far away.

No patient data, A01 and A02 are message types (Admit and transfer). We deal with patient data on a daily basis, and the HIPPA police will come kneecap us if we make the slightest wrong (Oh random clinic, you just dumped 40,000 live patients in our test system now we have to clean it up :suicide:)


TooMuchAbstraction posted:

As for your problem, it sounds broadly speaking like it boils down to 1) determine if tags always show up and if they can show up more than once in a row, and b) determine an ordering of tags. Item 1 is a lot easier: for each row, make a dict of tag to number of times it appears; if it's more than once, the tag is repeatable. For requiredness, keep a set of all tags that have shown up in every row thus far, and iterate over them at the end of each row iteration to make sure they all show up in the tag count dict.
Yep, that one is easy enough.

quote:

Item 2 is harder, and I don't have a good solution for it off the top of my head. I'm inclined to say you should maintain a mapping of tag to the tags you have seen it occur immediately after, and then write some logic to "minimalize" the mapping. Like, if you have this dataset:
code:
A B
A C
A B C
you'd have this map:
code:
A: []
B: [A]
C: [A, B]
And you could look at that map and say "hey, I've seen B come after A, and I've seen C come after B, that means that I'll never see A C B so I can simplify C's entry to C: [B]."

Hopefully applying that kind of logic will allow you to reduce the mapping until every tag maps to only a single other tag; otherwise your dataset is ambiguous.

You like poo poo being overly complicated? Because I do. Let's complicate it!

code:
A B
A B C
A B C B
A B C B D D E B
.
Each instance of a letter, if not in a direct sequence ( D D ) will be a separate 'instance' of the tag. So "B" could be a "NTE" (NOTE, get it :downsrim:) that could follow after various other segments. So I'm probably going to have to tag them as something like MSH1 EVN1 PID1 NTE1 PV11 NTE2 (The first 3 characters being the actual segment, and the last would be a number defining where it goes.

As for your mapping, that is a good idea. I'm going to have to mull over that for a bit. I'm already kind of formulating ideas on how to do it, but don't want to get too far ahead of myself. This code I am going to plan out more than I did my last basic script (Which was write by the seat of your pants).

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
Can you get the "second" instance of a tag without having a first instance? And likewise, can you have the third instance without having both the first and second instance, etc. Like, is MSH EVN PID PV1 NTE a valid sequence (having removed the NTE from your example that was before the PV1)? Because if so, you're hosed.

Gothmog1065
May 14, 2009

TooMuchAbstraction posted:

Can you get the "second" instance of a tag without having a first instance? And likewise, can you have the third instance without having both the first and second instance, etc. Like, is MSH EVN PID PV1 NTE a valid sequence (having removed the NTE from your example that was before the PV1)? Because if so, you're hosed.

Yes, but in the end data, I will be something like the OP, where the NTE will be optional. It will show in my final list, but the data itself will have various examples of it. I may be wrong, but your mapping dictionary may actually work for this:

MSH: []
EVN: [MSH]
PID: [EVN]
NTE: [PID, PV1]
PV1: [NTE]

At the end I could build from that dictionary in a while loop until it is finished. Since dictionaries in Python are in the order that you create them in, this could conceivably work.


Augh just went through that in my brain and you are right. The only way I can see it working is by doing the number tag at the end, but even a cursory glance at doing that way shows there might be other issues.

SurgicalOntologist
Jun 17, 2004

Is there no documentation or anything that would let you know a priori the syntax of each tag? If not, that blows.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
Do note that you need to use OrderedDict if you want to maintain sequence order in a dictionary in Python (at least, in Python 2; I'm unsure about 3). Otherwise iteration order is implementation-dependent and typically unreliable.

Extortionist
Aug 31, 2001

Leave the gun. Take the cannoli.

TooMuchAbstraction posted:

Do note that you need to use OrderedDict if you want to maintain sequence order in a dictionary in Python (at least, in Python 2; I'm unsure about 3). Otherwise iteration order is implementation-dependent and typically unreliable.
Officially as of 3.7 (and I think unofficially in 3.6) dicts are guaranteed to be ordered based on insertion.

Dren
Jan 5, 2001

Pillbug
On CentOS 6 do ‘yum install epel-release’ to get the epel repo. Python 3.4 is in epel. Install it with ‘yum install python34’. You may then run it using the command ‘python3’ instead of ‘python’.

2.6 is a bummer of a python version.

Broken Loose
Dec 25, 2002

PROGRAM
A > - - -
LR > > - -
LL > - - -
Why is the marked value not being assigned to the array?


Broken Loose fucked around with this message at 00:34 on Aug 11, 2018

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
Only thing I can think of is that you paused execution before running that line instead of after. :shrug:

Broken Loose
Dec 25, 2002

PROGRAM
A > - - -
LR > > - -
LL > - - -

TooMuchAbstraction posted:

Only thing I can think of is that you paused execution before running that line instead of after. :shrug:

the line was there specifically to break execution for this instance lol

the answer was "ghosts" and i'm starting to get annoyed of them

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

Broken Loose posted:

the line was there specifically to break execution for this instance lol

the answer was "ghosts" and i'm starting to get annoyed of them

Don't edit out questions when you figure out the solution. Someone else might benefit from reading about your problem later. Also it makes the thread annoying to read when you only get half of the conversation.

ZentraediElite
Oct 22, 2002

Is anyone out there doing integrations with LinkedIn? I'm trying to get some info on their new API and their documentation is either a)confusing or b)over my head. Looking for some clarity.

Asleep Style
Oct 20, 2010

So I have a makefile that builds my unit tests into individual executable files with a single rule. While my current solution works it seems like there should be a way to do it more efficiently. My source code is stored in the src directory, *.h files are stored in the include directory, and *.o files are stored in the obj directory which is a subdirectory of src. Here's what my makefile looks like:
code:
CC=gcc
IDIR=../include
CFLAGS=-I$(IDIR) -Wall -Wextra -Wpedantic -Werror
ODIR=obj

_DEPS = local_library.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))

_OBJ = hello_world.o local_library.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))

_TESTOBJ = test1.o test2.o test3.o test4.o local_library.o
TESTOBJ = $(patsubst %,$(ODIR)/%,$(_TESTOBJ))

LIBS=-lm

$(ODIR)/%.o: %.c $(DEPS)
	$(CC) -c -o $@ $< $(CFLAGS)

hello_world: $(OBJ)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

tests: $(TESTOBJ)
	$(CC) -o test1 obj/test1.o obj/local_library.o $(CFLAGS) $(LIBS)
	$(CC) -o test2 obj/test2.o obj/local_library.o $(CFLAGS) $(LIBS)
	$(CC) -o test3 obj/test3.o obj/local_library.o $(CFLAGS) $(LIBS)
	$(CC) -o test4 obj/test4.o obj/local_library.o $(CFLAGS) $(LIBS)

test-all:
	./test1 > test_log.txt
	./test2 >> test_log.txt
	./test3 >> test_log.txt
	./test4 >> test_log.txt

.PHONY: tests test-all clean

clean:
rm $(ODIR)/*.o hello_world test1 test2 test3 test4
I've tried replacing the tests: rule with:
code:
tests: $(TESTOBJ)
	$(CC) -o $@ $< $(CFLAGS) $(LIBS) 
But then when I run make tests I get an error about an undefined reference to a function in local_library. I'm confused here because I thought this rule:
code:
$(ODIR)/%.o: %.c $(DEPS)
	$(CC) -c -o $@ $< $(CFLAGS)
said that every *.o file in the obj directory depended on both the corresponding *.c file and the local_library. Any suggestions?

edmund745
Jun 5, 2010
I decided I wanted to write a program to control Arduinos over the USB/serial connection.
I did this in Visual Basic and it works, but I decided that eventually I wanted to use a Linux machine instead even though I don't currently have any Linux PC running right now.
And I don't want to bother with running a Windows program on Linux. This program isn't a complicated thing so I'd rather just leave the Microsoft dependency totally.
So I started playing with Python (on Win10) recently.

With the Visual Basic and Python programs (for Windows) that I've found, to receive text automatically you must register a callback function that starts a new thread to handle reading the incoming serial message.
This is the python example I am looking at:
https://github.com/dalegambill/PythonTerminal

Is this need for {callback+new thread} basically the same on Linux? I'm having a bit of trouble finding Linux PC-specific examples.
I only seem to find RPi examples, that appear to be functioning like a real-time OS?... the programs don't seem to require threading: they just have a main program loop, that occasionally checks if there is any bytes in the serial port buffer and then does something if there is----but then I never had a RPi either so I know nothing of that.
I know that the RPi runs Linux, but I don't know if there is any major difference between the version of Linux that a PC would have and what the RPi has.

Like this page for example:
https://www.raspberrypi.org/forums/viewtopic.php?t=106468
These examples for reading the serial port looks more like Arduino code than multi-threading OS code.... It seems radically different? There is no callback or multi-threading at all?
Is Linux programming really that much easier? Or is this just some circumstance of the typical RPi environment?

edmund745
Jun 5, 2010
I can't remember where I found it, but these are the relevant parts of the properly-working Visual Basic.Net program.
Most VB.net pages claiming to say how to automatically monitor the serial port don't really tell you that--they just show how to write a function to check a port for data when the function is called.
code:
Dim WithEvents MySerialPort As New IO.Ports.SerialPort
    
    (stuff left out)

    Private Strt As New Threading.Thread(AddressOf DisplayPortData)

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        (stuff left out) 

        AddHandler MySerialPort.DataReceived, AddressOf DataReceivedHandler
        AddHandler Receiving_TextBox.TextChanged, AddressOf ProcessIncomingData

    End Sub

    Private Sub DataReceivedHandler(sender As Object, e As EventArgs)
        Try
            incomingData = MySerialPort.ReadExisting()
            DisplayPortData()
        Catch x As Exception
            MessageBox.Show("Exception = " & x.Message)
        End Try
    End Sub

    Private Sub DisplayPortData()
        If InvokeRequired Then
            Invoke(New MethodInvoker(AddressOf DisplayPortData))
        Else
            Receiving_TextBox.Text = incomingData '-------------------(the event to process the incoming data was in the Receiving_TextBox.changed event, since that event is in the main thread)
        End If
    End Sub

(lots of other stuff left out)

Khorne
May 1, 2002

edmund745 posted:

serial port, vb, python, linux, windows
Conceptually, there are two main ways to poll something.

Using a non-blocking function is one way. Which means it will return a "nothing waiting" type of value instead of waiting indefinitely for a message. Code will flow like: loop starts, you try to read, read returns right away, act if there is a message, repeat the loop.

Using a blocking function is the other. Which means it waits/polls until a message comes or a timeout is reached. Which is more like: loop starts, call read, read waits until there is a message or for some pre-defined amount of time to return, handle the message or failure state, repeat the loop.

Threading makes sense if you're using, or forced to use, a blocking function that polls for long periods. It allows your program to continue functioning normally while waiting for a message. With a non-blocking function, your program isn't stopping everything to wait for a message. It's just checking and then continuing on. The VB code you're using is likely blocking so it's done in a thread.

The python calls might be blocking, but you can check if there are messages waiting and only call read when there are. This stack overflow post covers it in Python. If you do it this way, you can avoid needing a thread. There is also a cross-platform threading library in python and you can do it in a separate thread there too if you want.

quote:

linux vs windows easier
It looks you're already using a serial library in Python so the interface to a serial port is identical whether you're on windows, linux, or a mac.

At a deeper level than that, they're fairly similar. Both Linux and Windows treat serial ports like reading and writing to a file. If it's serial over USB, then they're still both similar but USB devices are more complicated to work with.

Khorne fucked around with this message at 22:23 on Aug 17, 2018

edmund745
Jun 5, 2010

Khorne posted:

Conceptually, there are two main ways to poll something.

Using a non-blocking function is one way. ...

Using a blocking function is the other. Which means it waits/polls until a message comes or a timeout is reached. ...
I had read in the past that if the program has a GUI, then that program's GUI thread may occasionally get skipped in the OS's task list if it does not have focus on the desktop.
So the reason for putting the serial port check is put in its own thread is because that way it will always get checked at every turn it has.
I never tried checking this advice however. It just seemed odd that so many of the "linux" (RPi) examples don't bother with it.

Volguus
Mar 3, 2009

edmund745 posted:

I had read in the past that if the program has a GUI, then that program's GUI thread may occasionally get skipped in the OS's task list if it does not have focus on the desktop.
So the reason for putting the serial port check is put in its own thread is because that way it will always get checked at every turn it has.
I never tried checking this advice however. It just seemed odd that so many of the "linux" (RPi) examples don't bother with it.

I doubt that the linux kernel has a way of checking if a program has a UI. In windows, the UI is part of the kernel (well, they took it out somewhat, still heavily embedded within the system) so I can see it happening there. Additionally, windows programs can be marked as console or windows (UI) , so that definitely helps . ELF binaries don't have that flag as far as I'm aware.

feedmegin
Jul 30, 2008

Volguus posted:

I doubt that the linux kernel has a way of checking if a program has a UI. In windows, the UI is part of the kernel (well, they took it out somewhat, still heavily embedded within the system) so I can see it happening there. Additionally, windows programs can be marked as console or windows (UI) , so that definitely helps . ELF binaries don't have that flag as far as I'm aware.

They do not, and Linux/Unix at the kernel level doesn't even have a concept of 'the UI' (which sort of UI do you even mean? X11? Wayland? Mir? NeWS if you're feeling oldschool?)
That said Windows console programs still technically also have a UI - that console window is being drawn by something, after all.

That said, having your UI thread be scheduled a little less frequently if it's in the background...really isn't something to worry or care about? It'll still get run often enough.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Yeah, if you're planning your design around a particular thread being run exactly when you want it every time, you're probably going to have a bad time...

nielsm
Jun 1, 2009



Apart from that, Windows does have a "real time" priority level, which does in fact let you pretty much hog a CPU core entirely for yourself, nobody else getting a chance. Depending on the accuracy you need, there's also multimedia timers (which can have down to 1 ms precision, using e.g. a callback function the OS will schedule for you at every timer tick) and several other methods for regular processing.
For a serial port I/O task, a high priority thread using blocking I/O is probably more than plenty. Do keep in mind that the serial port is handled on the hardware level by a buffering UART so you don't generally risk losing data by being a bit late.

LawfulWaffle
Mar 11, 2014

Well, that aligns with the vibes I was getting. Which was, like, "normal" kinda vibes.
Looking for help writing a simple batch file. I'm trying to whip something up that would look at a file name in the same folder as the file and replace a space with a period. I know, it's incredibly stupid to replace a space in the middle of a file name with a period, but that's what I need. The backup process at my work does the reverse, replacing extra periods with spaces, but there's a required naming format for another office we work with that includes the period in the middle.

All the files will be about the same, some variation of"2018AFirstname Lastname.msg" and I need to rename them to be "2018AFirstname.Lastname.msg". I feel like it's only a few lines of code but this is well and truly out of my wheelhouse.

e: Nevermind, I was able to modify one I found online

code:
@echo off
Setlocal enabledelayedexpansion

Set "Pattern= "
Set "Replace=."

For %%a in (*.msg) Do (
    Set "File=%%~a"
    Ren "%%a" "!File:%Pattern%=%Replace%!"
)

Exit

LawfulWaffle fucked around with this message at 16:00 on Aug 21, 2018

flakeloaf
Feb 26, 2003

Still better than android clock

1-4A Rename has one of the worst UIs I've ever seen and it's still the best mass-renaming utility ever written for Windows.

flakeloaf
Feb 26, 2003

Still better than android clock

Oh also, thanks to your help I managed to squeak a 93 in my C++ course, which means I can now sign up for the ten or so other courses that have it as a prerequisite. Wheeeee!

mr_package
Jun 13, 2000
I need to analyze/port some Perl code, are there any tools that are designed for this type of thing? In the sense of just documenting the code flow, marking up the source, I don't know exactly. The code is spread out all over the file, function definitions in other files (custom Perl modules), other Perl scripts that get called, etc. Are there tools that exist that will help me make heads and tails of this, or do I just need to basically step through each line and port it line by line?

Judge Schnoopy
Nov 2, 2005

dont even TRY it, pal
I need to start creating front-end GUIs to my powershell applications. GUI development needs to be super quick though, as I need to spend a majority of my time building more / better powershell tools.

Any recommendations on easy, fast, simple powershell GUI software? I'll likely be approved to buy one so it doesn't have to be cheap, I just need to make the right choice because I won't get to buy another if the first sucks.

The Fool
Oct 16, 2003


Judge Schnoopy posted:

I need to start creating front-end GUIs to my powershell applications. GUI development needs to be super quick though, as I need to spend a majority of my time building more / better powershell tools.

Any recommendations on easy, fast, simple powershell GUI software? I'll likely be approved to buy one so it doesn't have to be cheap, I just need to make the right choice because I won't get to buy another if the first sucks.

I have used this before and it did the trick: https://poshgui.com/

Lots of people recommend using Visual Studio to build GUI's as well, but I haven't tried it myself.

Someone on reddit once posted a module that tried to auto-generate a ui for you, I'll try to find it and edit this space.
If you just need a simple dialog box with a prompt and a couple buttons, this guy might do the trick.

That being said, I feel like if you are making a GUI for a powershell script, someone somewhere is missing the point of powershell.

The Fool fucked around with this message at 20:47 on Aug 21, 2018

General_Failure
Apr 17, 2005
This is a bit of a hard question to articulate. Bear with me. It's about licensing.

Let's say there's some GPL code which has a section in it which pretty much just involves feeding magic numbers to some hardware to wake it up. The magic numbers were pulled from some Chinese mystery licensed code.

Now I come along and need to wake up the hardware using a completely different OS. GPL would make things difficult for me, and I only have interest in the magic dance, not the actual code because it is in C, and I am writing in assembly using a completely different framework.

Where do I stand?

Linear Zoetrope
Nov 28, 2011

A hero must cook
Sounds like something you'd need to ask an IP lawyer.

Adbot
ADBOT LOVES YOU

General_Failure
Apr 17, 2005

Linear Zoetrope posted:

Sounds like something you'd need to ask an IP lawyer.

I was expecting an answer like that. I do have a couple of "outs" though.

#1. I may not need the init sequence at all. U-Boot did the heavy lifting, but I'm not sure how much got unset a the end.

#2. I just found what tries to pass as an official datasheet on the hardware which has information on the init sequence with an annotated flowchart.

The datasheet does have register names for the ones that are marked as unknown in various sources I've seen. One thing does stand out that shows me it probably is official. There are a couple of registers not listed. One of which de obfuscates the inner layer of registers, which for reasons I can only speculate conceal the true nature of some well documented hardware.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply