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.
 
  • Locked thread
comedyblissoption
Mar 15, 2006

Adbot
ADBOT LOVES YOU

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
Now I’ve gone beyond just showing you sloppy code. Here be a grave debauchery and a crime against nature. A crime most languages won’t allow you to commit. We’re changing the String, one of the prophets.


something about overloading operators and that crazy stringbuilder thing from java? idk im just a terrible programmer

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
i only use C strings in unsafee blocks, for the speed benefits. hell, chuck some assembler in there too

oh no blimp issue
Feb 23, 2011

i only program in assembly because that shits faster yo

Stringent
Dec 22, 2004


image text goes here

Awia posted:

i only program in assembly because that shits faster yo

same but javascript

oh no blimp issue
Feb 23, 2011

Stringent posted:

same but javascript

when i said assemby i meant asm.js

Forums Terrorist
Dec 8, 2011

node.js close to the metal etc.

oh no blimp issue
Feb 23, 2011

i just want people to know im going to have to handle this monster of a custom encapsulation for a h264 video stream sometime soon:

code:
typedef struct {
uint8_t signature[4]; /* "PaVE" - used to identify the start of
frame */
uint8_t version; /* Version code */
uint8_t video_codec; /* Codec of the following frame */
uint16_t header_size; /* Size of the parrot_video_encapsulation_t
*/
uint32_t payload_size; /* Amount of data following this PaVE */
uint16_t encoded_stream_width; /* ex: 640 */
uint16_t encoded_stream_height; /* ex: 368 */
uint16_t display_width; /* ex: 640 */
uint16_t display_height; /* ex: 360 */
uint32_t frame_number; /* Frame position inside the current stream
*/
uint32_t timestamp; /* In milliseconds */
uint8_t total_chuncks; /* Number of UDP packets containing the
current decodable payload - currently unused */
uint8_t chunck_index ; /* Position of the packet - first chunk is #0
- currenty unused*/
uint8_t frame_type; /* I-frame, P-frame parrot_video_encapsulation_frametypes_t */
uint8_t control; /* Special commands like end-of-stream or
advertised frames */
uint32_t stream_byte_position_lw; /* Byte position of the current payload in
the encoded stream - lower 32-bit word */
uint32_t stream_byte_position_uw; /* Byte position of the current payload in
the encoded stream - upper 32-bit word */
uint16_t stream_id; /* This ID indentifies packets that should be
recorded together */
uint8_t total_slices; /* number of slices composing the current
frame */
uint8_t slice_index ; /* position of the current slice in the frame
*/
uint8_t header1_size; /* H.264 only : size of SPS inside payload no SPS present if value is zero */
uint8_t header2_size; /* H.264 only : size of PPS inside payload no PPS present if value is zero */
uint8_t reserved2[2]; /* Padding to align on 48 bytes */
uint32_t advertised_size; /* Size of frames announced as advertised
frames */
uint8_t reserved3[12]; /* Padding to align on 64 bytes */
} __attribute__ ((packed)) parrot_video_encapsulation_t;

Bloody
Mar 3, 2013

Awia posted:

i just want people to know im going to have to handle this monster of a custom encapsulation for a h264 video stream sometime soon:

code:
typedef struct {
uint8_t signature[4]; /* "PaVE" - used to identify the start of
frame */
uint8_t version; /* Version code */
uint8_t video_codec; /* Codec of the following frame */
uint16_t header_size; /* Size of the parrot_video_encapsulation_t
*/
uint32_t payload_size; /* Amount of data following this PaVE */
uint16_t encoded_stream_width; /* ex: 640 */
uint16_t encoded_stream_height; /* ex: 368 */
uint16_t display_width; /* ex: 640 */
uint16_t display_height; /* ex: 360 */
uint32_t frame_number; /* Frame position inside the current stream
*/
uint32_t timestamp; /* In milliseconds */
uint8_t total_chuncks; /* Number of UDP packets containing the
current decodable payload - currently unused */
uint8_t chunck_index ; /* Position of the packet - first chunk is #0
- currenty unused*/
uint8_t frame_type; /* I-frame, P-frame parrot_video_encapsulation_frametypes_t */
uint8_t control; /* Special commands like end-of-stream or
advertised frames */
uint32_t stream_byte_position_lw; /* Byte position of the current payload in
the encoded stream - lower 32-bit word */
uint32_t stream_byte_position_uw; /* Byte position of the current payload in
the encoded stream - upper 32-bit word */
uint16_t stream_id; /* This ID indentifies packets that should be
recorded together */
uint8_t total_slices; /* number of slices composing the current
frame */
uint8_t slice_index ; /* position of the current slice in the frame
*/
uint8_t header1_size; /* H.264 only : size of SPS inside payload no SPS present if value is zero */
uint8_t header2_size; /* H.264 only : size of PPS inside payload no PPS present if value is zero */
uint8_t reserved2[2]; /* Padding to align on 48 bytes */
uint32_t advertised_size; /* Size of frames announced as advertised
frames */
uint8_t reserved3[12]; /* Padding to align on 64 bytes */
} __attribute__ ((packed)) parrot_video_encapsulation_t;

i loving hate c-style comments

Workaday Wizard
Oct 23, 2009

by Pragmatica

Awia posted:

i just want people to know im going to have to handle this monster of a custom encapsulation for a h264 video stream sometime soon:

code:
typedef struct {
uint8_t signature[4]; /* "PaVE" - used to identify the start of
frame */
uint8_t version; /* Version code */
uint8_t video_codec; /* Codec of the following frame */
uint16_t header_size; /* Size of the parrot_video_encapsulation_t
*/
uint32_t payload_size; /* Amount of data following this PaVE */
uint16_t encoded_stream_width; /* ex: 640 */
uint16_t encoded_stream_height; /* ex: 368 */
uint16_t display_width; /* ex: 640 */
uint16_t display_height; /* ex: 360 */
uint32_t frame_number; /* Frame position inside the current stream
*/
uint32_t timestamp; /* In milliseconds */
uint8_t total_chuncks; /* Number of UDP packets containing the
current decodable payload - currently unused */
uint8_t chunck_index ; /* Position of the packet - first chunk is #0
- currenty unused*/
uint8_t frame_type; /* I-frame, P-frame parrot_video_encapsulation_frametypes_t */
uint8_t control; /* Special commands like end-of-stream or
advertised frames */
uint32_t stream_byte_position_lw; /* Byte position of the current payload in
the encoded stream - lower 32-bit word */
uint32_t stream_byte_position_uw; /* Byte position of the current payload in
the encoded stream - upper 32-bit word */
uint16_t stream_id; /* This ID indentifies packets that should be
recorded together */
uint8_t total_slices; /* number of slices composing the current
frame */
uint8_t slice_index ; /* position of the current slice in the frame
*/
uint8_t header1_size; /* H.264 only : size of SPS inside payload no SPS present if value is zero */
uint8_t header2_size; /* H.264 only : size of PPS inside payload no PPS present if value is zero */
uint8_t reserved2[2]; /* Padding to align on 48 bytes */
uint32_t advertised_size; /* Size of frames announced as advertised
frames */
uint8_t reserved3[12]; /* Padding to align on 64 bytes */
} __attribute__ ((packed)) parrot_video_encapsulation_t;

draw it in a box diagram, print it, and hang it near your desk??

DimpledChad
May 14, 2002
Rigging elections since '87.

Awia posted:

code:
uint8_t total_chuncks; /* Number of UDP packets containing the current decodable payload - currently unused */
uint8_t chunck_index ; /* Position of the packet - first chunk is #0 - currenty unused*/

im the chunck

Valeyard
Mar 30, 2012


Grimey Drawer

Awia posted:

oh well that sucks, negatively marked exams are dumb

he caved in already after some people sent emails about the negative marking and they arent doing it anymore :toot: he then went on to write a paragraph talking about how it actually wouldnt have made much difference by giving an example in which someone gets 90% of the answers correct, lol

leftist heap
Feb 28, 2013

Fun Shoe
i don't think i've ever heard of negatively marked exams. sounds like a crock of poo poo to me.

oh no blimp issue
Feb 23, 2011

yeah, theyre loving dumb
i see where theyre coming from, trying to stop you guessing on mutiple choice, but really it just stops you answering any qiuestion unless youre abso-loving-lutely sure of the answer

Bloody
Mar 3, 2013

they did it on the sat as like -0.25 per wrong answer +1 per right answer so if you could eliminate one wrong answer it was still worthwhile to guess but lol that assumes your guess is a evenly distributed random variable when it most certainly isnt and your guess is probably the trap wrong answer

Forums Terrorist
Dec 8, 2011

actually the wrong answers are specifically constructed so that they're obvious if you paid money to get sat tutoring. unsurprisingly the sat is actually a means/culture check rather than a serious academic tool which is why no one outside of america uses it

fritz
Jul 26, 2003

Valeyard posted:

he caved in already after some people sent emails about the negative marking and they arent doing it anymore :toot: he then went on to write a paragraph talking about how it actually wouldnt have made much difference by giving an example in which someone gets 90% of the answers correct, lol

lmao if youre not gonna get 90%+ correct

Valeyard
Mar 30, 2012


Grimey Drawer
still, multiple choice is a loving bullshit way to exam a 4th year class

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

my dad had a professor who would give multiple choice tests with over 50 choices per question

chemosh6969
Jul 3, 2004

code:
cat /dev/null > /etc/professionalism

I am in fact a massive asswagon.
Do not let me touch computer.
Game Description Language makes me feel like I'm learning programming all over again. I'm week 3 into this course and it just seems really weird.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

fart simpson posted:

my dad had a professor who would give multiple choice tests with over 50 choices per question

checkboxes or radio buttons?

gonadic io
Feb 16, 2011

>>=

fart simpson posted:

my dad had a professor who would give multiple choice tests with over 50 choices per question

solve for x
A: x = 1
B: x = 2
C: x = 3
...
AX: x = 50
AY: x = 51
AZ: x = 52
BA: x = 53

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

prefect posted:

checkboxes or radio buttons?

radio buttons but he said the latter half were options like "x plus ab through aj, excluding ae" and also it was a history class

The Leck
Feb 27, 2001

i have a dumb little python script that i wrote up to do some qa on data, check that certain files exist, etc. and i want to make it usable by neurotypicals (on windows). is there a reasonable way to give it a basic gui, or is the right answer to redo it in c# with a regular windows interface?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

turn it into a website

Notorious b.s.d.
Jan 25, 2003

by Reene

The Leck posted:

i have a dumb little python script that i wrote up to do some qa on data, check that certain files exist, etc. and i want to make it usable by neurotypicals (on windows). is there a reasonable way to give it a basic gui, or is the right answer to redo it in c# with a regular windows interface?

tkinter is the simplest thing. it comes in the default python for windows and it looks pretty good

if you need something fancier, i think pyqt works on windows but i have never tried it

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

yeah, tkinter is probably what you want

Valeyard
Mar 30, 2012


Grimey Drawer
gently caress using tkinter for anything

maybe just set up a barebones flask instance and run the script as a webapp, the framework give you easy options if you want to authenticate it

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Valeyard posted:

gently caress using tkinter for anything

maybe just set up a barebones flask instance and run the script as a webapp, the framework give you easy options if you want to authenticate it

converting a simple script to a web app and having it show progress, communicate errors, deal with local files is a pain, and I think The Leck is unlikely to lose in the marketplace to a scrappy competitor because of his clunky UI.

and I'm someone who likes web tech more than is probably reasonable

Soricidus
Oct 21, 2010
freedom-hating statist shill

Valeyard posted:

gently caress using tkinter for anything

maybe just set up a barebones flask instance and run the script as a webapp, the framework give you easy options if you want to authenticate it

"gently caress straightforward thing designed to solve exactly this problem, maybe just shoehorn it into unnecessarily complicated thing intended for completely different use cases instead"

jesus WEP
Oct 17, 2004


The Leck posted:

is the right answer to redo it in c# with a regular windows interface?
this is the right answer 100% of the time for a small app

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

St Evan Echoes posted:

this is the right answer 100% of the time for a small app

If rewriting it is too much work, just have the c# thing call your python app

The Leck
Feb 27, 2001

thanks for the input. web stuff is out, since this is happening within my office and lol at getting support for running a server or something, especially one that touches stuff on local file shares. i'll take a look at tkinter and either do that or use this as an opportunity to refresh my c# a little. basically i painted myself into a corner by writing a script to do some work and then being the only one who could comprehend running something not out of an access db.

Innocent Bystander
May 8, 2007
Born in the LOLbarn.
this thread is way to long to have not have a conv about tcl and its relation to C#/java/go/haskell

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

ousterhout threw a cheap shot at me in a presentation once. that's my tcl story.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Subjunctive posted:

and I'm someone who likes web tech more than is probably reasonable

you mean at all?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

The Leck posted:

i have a dumb little python script that i wrote up to do some qa on data, check that certain files exist, etc. and i want to make it usable by neurotypicals (on windows). is there a reasonable way to give it a basic gui, or is the right answer to redo it in c# with a regular windows interface?

is IronPython still a thing? or some other Python-on-.NET thing where you could just pull your script in and wrap a real app around it?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Innocent Bystander posted:

this thread is way to long to have not have a conv about tcl and its relation to C#/java/go/haskell

optimization via whitespace removal

that should tell you everything you need to know about Tcl

also I had to take the real TCL off my resume because of Tcl, drat it. (though that wasn't a big deal since everyone was going to PowerPlant anyway.)

jesus WEP
Oct 17, 2004


MALE SHOEGAZE posted:

If rewriting it is too much work, just have the c# thing call your python app
ive never looked at ironpython or anything before but does it pretty much let you write a c# wrapper around your python files so you can deploy the app without having to install python on the client?

Adbot
ADBOT LOVES YOU

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

St Evan Echoes posted:

ive never looked at ironpython or anything before but does it pretty much let you write a c# wrapper around your python files so you can deploy the app without having to install python on the client?

that was my impression of all the "IronLanguages" stuff - versions of Python, Ruby, etc. that use the CLR and compile to assemblies so they can interop with other CLR code.

  • Locked thread