#development

1 messages · Page 67 of 1

warm sleet
#

instead of software

#

@rancid nimbus yeah in java, objects are expensive

#

which is ironic

#

since it is OO

#

but instances are to be avoided if you can

#

let me rephrase

#

short lived objects are expensive.

#

What algorithm is used by computers to calculate logarithms?

rancid nimbus
#

I think I read about that in a Nvidia chip… I could be wrong.

warm sleet
#

oh yeah

#

@rancid nimbus which is why I said its easy, but dirty

peak acorn
#

You guys are all smart

#

That integer string len nonsense was just the first thing i thought of right away

#

Because its intuitive unlike log

#

Like the bot censors you?

#

Idk type it elsewhere and screenshot ig

#

how do u make a shell script

#

like the file or whatever

#

nvm

#

oh

warm sleet
#

@peak acorn you put #!/bin/sh at the top, and start writing shell code

#

same goes for python or another language

peak acorn
warm sleet
#

for python convention is: #!/usr/bin/env python3

#

also known as a shebang

#

it tells a POSIX system what interpreter it should use

peak acorn
#

ill BRB i gotta DDU my computer before class

hollow basalt
peak acorn
#

yes I am it is a computer class lol

#

im doin it rn

warm sleet
#

start a fresh terminal

#

see if that fixes it

#

might have some trailing control characters

peak acorn
#

okay 👌 we got the drivers 🚙

#

im guesing the unicode doesnt work cos im in a windows wsl terminal

warm sleet
#

well unicode is one thing

#

emojis is another

peak acorn
warm sleet
#

@peak acorn is that even the entire file?

#
 crystal@watomat  ~  touch test.sh
 crystal@watomat  ~  nano test.sh
 crystal@watomat  ~  chmod +x test.sh
 crystal@watomat  ~  ./test.sh
(standard_in) 1: syntax error
0
x \u25021
\u2500\u2500\u253c\u2500
1 \u25021
peak acorn
#

idk if i need to cover my computer name

#

errrrr

warm sleet
#

@peak acorn for starters

#

there's a typo in that

peak acorn
#

where

warm sleet
#

2 lines below LEN=

#

/u2502

peak acorn
#

well lugsole must have put that there

#

cos i just pasted it in

warm sleet
#
 ✘ crystal@watomat  ~  zsh test.sh
(standard_in) 1: syntax error
0
x │1
──┼─
1 │1
 crystal@watomat  ~  
#

@peak acorn running it with a different interpreter, it seems to do more

#

still a syntax error though, whatever that is

#

yeah

#

#!/bin/bash/ instead of #!/bin/sh

#

ubuntu uses dash for sh

#

limited subset of sh

#

oh

#

derp

#

got bored one day

#

randomly seeds your terminal with wat

#

when you do $ wat

#

@rancid nimbus ultimate troll on ubuntu systems is installing sl-h

#

its a terminal based steam locomotive

#

and if you mistype ls you get steamrolled

peak acorn
#

oh its got solid lines

warm sleet
#

@peak acorn do you not get solid lines??

peak acorn
#

well not in my code

#

cos i used ---- and + and |

#

instead of whatever that is

warm sleet
#

My terminal already does some fancy rendering

#

I use a patched fontset

peak acorn
#

ah

warm sleet
#

but unicode like that

#

should work on any terminal

#

any modern terminal

#

in this case, its just gnome-shell

peak acorn
#

it dont work on my wsl terminal

warm sleet
#

yeah because that is just windows command prompt

peak acorn
#

yea

warm sleet
#

This one is capable of those new features

#

well

#

its not really new

#

its just, microsoft has finally woken up

#

windows still shit because they dont have a single packet manager

#

win..get.. ?

#

@rancid nimbus yeah you do that as a visual prank

warm sleet
#

still my favorite program

peak acorn
#

toilet

warm sleet
#

it renders text as ascii art

#

the reason toilet is so awesome

#

is cus on IRC you could look plug that into your client

#

with the --irc flag, you get proper color encodings

#

🤢 PS

#

it feels like you are writing .NET code

#

when you use PS

#

@rancid nimbus yeah but I think its kinda sad

#

that the most basic system interaction method, is this shit on windows

#

POSIX, and the unix philosophy make so much sense

#

like, programs use the shell to call other programs

#

and on windows the standard toolkit is incredibly limited

rancid nimbus
#

I wonder if MS didn't go POSIX because it would put some ofthem out of a job.

warm sleet
#

simple operations such as dd, can you do that from shell on windows?

warm sleet
#

this is why we have a crappy OS, that everyone uses

#

dd is unix

#

@rancid nimbus and no, it wont

#

because on windows, devices aren't files

wary musk
#

Is there a way to use python for desktop app backend, and C# with windows forms for frontend?

hollow basalt
#

but why

wary musk
#

I just realy like python

#

Ok thanks, but can I use python with windows forms

ivory bear
#

actually you can on cmd ... sorts of
it's called dir

warm sleet
#

@wary musk you can use some type of IPC

#

most common one is binding to 127.0.0.1 on some random port

#

and then running rest over it or something

#

the application, that you run, would spawn a child process, and designate a port it should use

#

that child process could be anything, a C# program or whatever, but it would use the port you pass as a parameter

#

and the parent then just has a client that connects to that port

#

can set up a TCP tunnel for bidirectional traffic

peak acorn
#

That sounds like sucha hassle

warm sleet
#

@peak acorn that's how you do a client-server model

#

its not a hastle

peak acorn
#

Yeah but why bother doing that whole thing

warm sleet
#

I'm giving him concrete working solutions for what he is trying to do

peak acorn
#

when u could probably just use c# to handle whatever u gotta

warm sleet
peak acorn
#

I mean yeah

#

i guess if thats what ur doin

warm sleet
#

let me diagram it out

autumn swan
#

Even within a monolithic program you might use a similar approach between the back and front ends. The UDP/TCP connection is just an implementation detail, not actually hard to set up. Normally it's not like a full blown REST API though, you might use something lighter like protobuf or thrift

warm sleet
#

this is one way you can do it

#

@autumn swan netty is quite nice for java

#

handles a buttonn of various TCP and UDP procotols

autumn swan
#

I'm gonna be honest, I've only seen thrift used for that purpose in Java (not that I'd strongly recommend it)

warm sleet
#

netty is proven, its industry standard for high throughput I/O

#

you can build your own packets with it

#

or implement some other protocol

#

make your own

autumn swan
#

Just going by that image, it does seem like a pretty complete general framework. Nice.

warm sleet
#

Its at the core of many webserver implementations in java

#

its also what the netcode for say, minecraft uses

#

@autumn swan thought you might find it interesting

#

those big minecraft servers, running proxies in front of the game

#

to cluster their server

#

most common one, bungee makes use of a specific subset from Netty

#

one of the benefits you can get on linux

#

allows the java process to interrupt on kernel events

#

whoever said native code is better than bytecode, can resign

autumn swan
#

Well, to be fair, for performance, that's because the kernel is pulling most of the weight in a lot of those cases 🙂
Which is absolutely fine. Use whatever good tools are available.

warm sleet
#

if you have a server that has many socket handles

#

then epoll speeds up multithreading

#

KEKW found this slide on google search

autumn swan
#

A previous company I worked at rolled their own little message passing thing with epoll IIRC. We thought it was unique, turned out it wasn't.

warm sleet
#

I mean, its not wrong, but the font doesn't help with the delivery

shy helm
#

especially on linux--named pipes

warm sleet
#

@shy helm I believe thats what they did in bungee

#

all the proxy -> internal minecraft server traffic is handled by epoll

#

it relays traffic between the two pipes

#

and it allows things like protocol injection :D

#

you can hack your server even more with that

#

like have global messages or do other trickery to clients

peak acorn
#

comic sans lmfao

autumn swan
#

Apple / Linux question
New employer, strongly wants me to use macOS but I have the option to use Linux (and would be the only one doing so). Not against it entirely (used to be my fave OS), but I have a new concern. How's the Docker experience and such on the Apple M1 silicon?
My position is in testing, which might involve orchestrating a stack locally (M1) instead of in the cloud (x86-64). I'd rather be able to draw some similar performance conclusions and such rather than it be quirk of x86 emulation, y'know? And I'd also rather not need to go through extra steps just to get something executing natively on the Mac.
Is there anything genuine to worry about there, or not really?

warm sleet
#

why would you run a linux OS on apple silicon?

autumn swan
#

No sorry, I have a choice between running macOS on M1 silicon, or getting a ThinkPad and running Linux on that basically

warm sleet
#

@autumn swan crosscompiling is a thing

#

and pretty sure you can just build docker images for a target platform

autumn swan
#

I'm aware crosscompiling and such are a thing, but I'd rather not test a platform we don't run on, right? We'd be running in the cloud on x86, not m1

warm sleet
#

yeah, so it makes more sense running that on your development system too

autumn swan
#

The devs all run macOS, but the devs don't test (or rather, run unit tests and depend on a hosted stack for end-to-end testing)

#

Basically I know it's possible I can get it to all run on an M1 mac, I just don't know if it's wise to at the moment

#

And that's the part I'm wondering about

warm sleet
#

I develop on linux for linux

autumn swan
#

Most of their employees are running on Intel macs, I'd be one of the first on M1 macs. I've worked for a lot of companies that targeted Linux servers but developed on Macs, which was mostly fine with Docker. But that was the good ol' Intel days

vast echo
#

you wouldn't really be able to fully test a docker meant for x86 on arm

#

seems like you'll need an x86 cloud docker test environment if you're using an m1 macbook

warm sleet
#

high level code dont really care about whats underneath

autumn swan
#

So it seems the consensus is a bit mixed. Maybe I'll YOLO onto an M1 mac and report my experience a couple months later. Worst case scenario is I learn something and the company needs to move away from Macs I guess?

vast echo
#

You should be testing your code in the same environment as production regardless

#

so having a cloud test docker is a good idea either way

autumn swan
#

Yeah I'm gonna be clear I have a suspicion there's a risk with the M1 macs, but I'm happy to be proven everything will be fine. I'll miss my Linux env greatly though.
As for where I "should" be testing, yeah, I know. Ultimately the ideal will be done. I have a lot of non-ideals to sort out before we get there though.

vital blaze
#

Could you ask for an intel Mac?

autumn swan
#

Nope, the price ain't right for those anymore

peak acorn
#

minecraft, or discrete structures homework?

autumn swan
#

Homework.

peak acorn
#

boo.

#

idek what homework is about

autumn swan
#

Yeah I'm never fun at parties

peak acorn
#

lets see what this shit is

#

"estimate 13 min duration" we'll see about that

#

oh maybe its not os bad

marble hedge
#

Hello. This may be a rookie question...But how do you guys configure the $HOME/.bashrc in Ubuntu? 'Coz everytime I try to 'open'/run this particular software, it always ask me to set the environment variables and stuff each time I re-open a new shell ^^

autumn swan
#

What are you trying to configure in it? Normally you'd open it in an editor, and then log out/in for the changes to take effect

spring pond
#

you may need to source your rc file

marble hedge
marble hedge
marble hedge
autumn swan
#

You would basically put those same lines that you run at the bottom of the .bashrc. You can edit it with pico or vim or whatever you'd like.

#

Alternatively you could put them in a new file, ~/.bash_profile. This is automatically sourced if it exists. I prefer this approach, leaving .bashrc untouched.

rotund leaf
#

Anyone have experiance with Verizon with CS

shy helm
#

Like working at Verizon?

warm sleet
#

@shy helm job opportunity? :D

#

I bet working at their callcenters is engaging and exciting: have you restarted your modem?

quiet gulch
#

Verizon customer service is famously terrible

warm sleet
#

@quiet gulch so is every consumer ISP

#

I have the luck of finally having a corporate ISP

#

their service team actually speaks jargon

quiet gulch
#

Verizon's is bad for everyone though

#

Like, at least Comcast can walk my mom through logging into the router admin panel

#

I don't expect any ISP to be able to communicate meaningfully with me but I did at least live my life knowing my family probably wouldn't call me with a question every 3 days

#

Sorry, clarity of language xD

#

But Verizon, in her and my experience, just puts you on hold for three hours and then has a robot pick up at the end

warm sleet
#

who gave that monkey an ipad

midnight wind
#

optimum isn't much better tbh

warm sleet
#

I got FttH with my own router

#

0-bs setup

quiet gulch
#

I pay for 200 mbps and I get like 400 both ways, it's hilarious

warm sleet
#

I have 250/250 here

midnight wind
#

lucky

quiet gulch
#

Mhm

warm sleet
#

with an extra /29 IP block :D

#

8 + 1 WAN

midnight wind
#

we pay for 300/300 and that's what I get exactly

warm sleet
#

9 public addresses :D

midnight wind
#

I wish

quiet gulch
#

I mean, either way it's not like I'm frequently exhausting that bandwidth

midnight wind
#

yeah

quiet gulch
#

pacman isn't exactly heavyweight :P

midnight wind
#

current usage TX/RX

warm sleet
#

who needs port forwarding, if you can have a public IP :D

quiet gulch
#

👀

midnight wind
#

yep

warm sleet
#

@midnight wind lol this is the best thing though :D

#

Two tenants in other buildings are on these VLANs

#

they pay me for 50mbit/s

midnight wind
#

who needs port forwarding when you have ipv6 as well

warm sleet
#

but most of the time, line is idle xD

quiet gulch
warm sleet
#

@midnight wind I have my 6to4 tunnel disabled

#

I could enable it, but since I've yet to complete my full certification

#

HE only gives me ~50mbit/s

#

after I finish certifications, I should get the full fat pipe

midnight wind
#

yeah I have it on it's own vlan

warm sleet
#

@midnight wind here its a dual stack configurationb

#

NAT'ed v4, public v6

#

with firewall rules

midnight wind
#

urgh one day I need to troubleshoot why it's so slow

#

It's dual stack but on it's own vlan

#

no one is currently on that vlan

#

for some reason ipv6 is SLOW

warm sleet
#

I get same ping on v6 as v4

#

even though my ISP doesnt do dual stack

midnight wind
#

like less than 1mbps

warm sleet
#

probably because my ISP peers with HE directly

midnight wind
#

I think it's my switch, but idk

#

same

warm sleet
#

@midnight wind muhh. get mikrotik

#

I'll buy you a hAP mini :D

midnight wind
#

no, because on the router I get 30 mbps iperf

#

which is usable

warm sleet
#

:D

#

you want one?

midnight wind
#

on my pc I get 1mbps

#

nah I'm fine

#

no need currently

warm sleet
#

¯_(ツ)_/¯

#

^ I find this impressive for a $20 device

umbral saffron
#

Wow

cloud portal
#

Well rather my room's is that, and the actual building's networking server is several different 20 switch switch boxes

warm sleet
#

@cloud portal I'm a big fan of mikrotiks

#

after having ditched consumer routers such as tplink and asus, glad I found mikrotik

#

very capable, and easy to use*

peak acorn
#

goofy little router

warm sleet
#

@peak acorn its the smallest one they have

#

but with 300mbit/s routing on 3 ports, what more do you want ? :D

peak acorn
#

nah i mean its fine

#

its just funny cos its small and maybe a little ugly

#

subjective last part

warm sleet
#

was about to say

#

this is what i call an ugly router

peak acorn
#

*gaming router*

warm sleet
#

I got this one ^

peak acorn
#

exactly like my drawing

warm sleet
#

its a rack mountable router

#

but also has a wifi variant

peak acorn
#

porcupine box

midnight wind
#

this one looks insane

warm sleet
#

10G ftw

midnight wind
#

this is small-medium ISP level

peak acorn
#

sheesh

warm sleet
#

@midnight wind yeah you can use that to run a small town

#

with 2000~ subscribers

peak acorn
#

ah

#

I mean what makes it better

#

beside speed

warm sleet
#

speed.

peak acorn
#

ok lol

#

fair enuf

warm sleet
#

that's a full fledge ethernet router

#

with 12x 10G

#

@peak acorn but the cool thing with mikrotik

#

that smallest one I posted

#

runs the same OS as the big one

midnight wind
#

at that level you do dynamic routing right?

peak acorn
#

hm

warm sleet
#

@midnight wind BGP and MPLS probably

#

idk, I'm not an expert on that .. yet

#

@midnight wind it would certainly make for a nice PPPoE server

peak acorn
#

ppp

midnight wind
#

me neither

#

I know nothing about BGP or MPLS

warm sleet
#

I know the theory and concept of BGP

#

none of the specifics

#

@midnight wind what model is that exactly?

midnight wind
warm sleet
#

cus

#

xD

#

@midnight wind lol. that's not even the beast

midnight wind
warm sleet
#

This is their flagship ^

#

CCR1072

midnight wind
#

more than 10G right?

warm sleet
#

1U rackmount, 1x Gigabit Ethernet, 8xSFP+ cages, LCD, 72 cores x 1GHz CPU, 16GB RAM, up to 120 million packets per second, 80Gbps throughput, RouterOS L6

#

This one has like double the throughput of that CCR2004

#

though, no QSFP or SFP28

midnight wind
#

ah

warm sleet
#

@midnight wind yeah..

#

it makes huuge difference

#

CCR2004 IPsec speed: 3gbit/s

#

CCR1072 can do 10gbit/s

#

The CRS305, with its 4x 10G ports also has redundant power

midnight wind
#

ah

warm sleet
#

@midnight wind lol every picture of where I see this switch deployed, I see them putting fans on it

#

even though it doesnt get that hot

midnight wind
#

yeah

#

although

warm sleet
#

those SFP modules can get hot

midnight wind
#

don't copper sfp+ make it hot

warm sleet
#

@midnight wind those laser modules also get warm

#

but the CRS305 is passively cooled

#

like, waht xD

lone hornet
#

also my reasoning for buying the book was that I liked paper and that "If people still use K&R C to learn C, why not this book?"

midnight wind
#

well what standard of C?

#

that's C99?

#

if it's not even C99, you may be missing out on a lot

lone hornet
#

after looking at the publishing info, I found that it predates K&R C by 4 years

peak acorn
#

Is it majorly different

#

I need to learn c for my class

warm sleet
#

@lone hornet Dennis Ritchie's original handbook on C, has been reprinted and updated throughout the years

#

I believe there are C99 books too

#

is not really introductory

#

but this is the book by the guys who made the language

cloud portal
#

I like my routers big with many antenna

midnight wind
#

I like my routers without antennas

pliant siren
peak acorn
#

im sitting here going through the slowest e-book on c ever

#

This is legit an entire like sub-point in the chapter, im not reading it obviously but this is how much pointless stuff is in this thing

lone hornet
#

I do have a pdf copy of the second edition C programming language. In addition, I do also have another e-book of "modern c" that was made a couple of years ago. I guess if I want to avoid confusion then I'd would have to read through those books I've mentioned rather than reading a book that hasn't been updated in the past years

warm sleet
#

@peak acorn seems like a politically motivated book ;)

urban flint
nocturne galleon
#

loop midi and hairless midi

#

i need to run these two applications on small system

#

my experience is limited to me thinking of right now downloading windows on a raspberry pi and running the two .exe's

#

who can help

midnight wind
#

if it just uses normal windows api calls then it should work via wine

nocturne galleon
#

what is wine

midnight wind
#

actually

nocturne galleon
#

an os?

midnight wind
#

this?

nocturne galleon
#

one sec

midnight wind
nocturne galleon
#

i think this is that

vital blaze
#

I can tell you what wine is not

nocturne galleon
#

its from a long time ago

midnight wind
#

no, is it that from that github

#

because you can build it for linux

nocturne galleon
#

i have no clue i dont think i got it from github

#

i also need to run loopMIDI though

midnight wind
#

is it this

nocturne galleon
#

i think it is one sec im checking if its the same

#

yea i think thats it

midnight wind
#

yeah so that can run on linux nativly

nocturne galleon
vital blaze
#

What is your goal?

midnight wind
#

^

#

xy problem again

nocturne galleon
#

ive got my whole system working rn

#

so midi data goes from piano into pc

#

in pc it goes hairless midi to loop midi

#

sending an output to an arduino

#

i wanna get the 'pc part' (hairless midi and loopmidi) and make it smaller

midnight wind
#

I don't think on linux you would need loop midi

#

windows sound system is weird

nocturne galleon
#

im not sure what you mean

#

its just serial data

vital blaze
midnight wind
#

that looks better

vital blaze
#

So you're using a computer to receive midi from a keyboard and pass it over serial to an arduino?

nocturne galleon
#

usb into computer, usb out into arduino

#

this varal thing looks interesting ill have to read int oit

vital blaze
#

If you want to use a PI you'd use linux and there definitely exists the set of programs to get it to work.

nocturne galleon
#

is there anything else which is more appropriate than a pi?

#

i wanna turn this portable basically

#

i had a method which relied on an optoisolation circuit turning direct midi into serial but it was too complicated

warm sleet
#

why bother with all this lol

#

get a raspberry pi and a midi controller

#

nitty gritty hardware implementation, I've done this with DMX before, and its not fun

#

had to write assembler to get the timing right

rotund plover
#

hello

autumn swan
scenic prism
#

Hey! We are conducting a research study for our project on Design of Interactive Systems. It will take at most 2 minutes to complete. https://docs.google.com/forms/d/e/1FAIpQLSedesYBJyx_v_VCY95sFc05rFKb940ffNaGtO1Vp8Wr_V6Sgw/viewform?usp=sf_link Thanks for your response.

peak acorn
#

idk just pointless details

#

skipped it anyways

autumn swan
#

Well, I mean... depending on the language, it will matter to some extent even for being syntactically valid.
bash for example is a good way to break your brain at first. FOO=1 does what you think, FOO = 1 does not.

peak acorn
#

its C

urban flint
#

The syntax highlighting in editors has saved me so much time with bash variables lol. The good ones wont highlight stuff like variables unless the syntax is right and I always forget at first

pliant siren
#

The most idiotic thing about bash is not permitting spaces after variable assignment 😦

#

FOO=bah is okay
FOO = bah is OMG WTF ARE YOU DOING?!

#

It's not lost on me that I used 'bah' not 'bar' - even my high-level examples have bugs. Feel free to submit a pull request.

hollow basalt
#

Bah

peak acorn
#

huzzah I finally got some stupid api and library set up to do ethereum stuff with java

peak acorn
#

Networking, when you have never seen networking code before, isnt very easy q_q

rancid nimbus
#

Networking code?

#

As in what?

peak acorn
#

java, tcp sockets

#

idk

rancid nimbus
#

Oh, that shouldn't be that bad unless your writing your own tcp library.

peak acorn
#

no

#

just using included library stuff

#

but i got no clue what im doing heehee

#

school has not taught me well

rancid nimbus
#

I had written a TCP parsing algorithm.

peak acorn
#

lol

#

ok big boy programmer

#

im tryna write some little code to log everyone whos on my school servers and then aggregate it on one of the machines thru the network

rancid nimbus
#

I wouldn't do that if I were you. You could get in trouble for some stupid reason and be asked to explain why you were doing what your doing. The people who you would have to explain it to would be hard to convince it was innocent.

peak acorn
#

hmmm

#

🤔

#

good point

rancid nimbus
#

It should be easy to do if it were bash. Just do some list processes then get the usernames then write them to a database or server. I had done that for my personal machines one (I wanted to see if I left a root shell open on any of my machines.

peak acorn
#

well im kinda a moron so thats kinda what im doing lol

#

executing 'w' and then finding the username columns

#

Yea I dont want the uni gestapo showing up so i suppose I wont

rancid nimbus
#

That is an interesting command. I never knew it existed. That doesn't show my root shell though.

peak acorn
#

theres also who but im not rly sure what the difference is besides slightly different info

shy helm
peak acorn
#

well

#

i dont know what that software is

#

All i wanna see is a little chart of the spikes on friday at midnight when everyone is trying to do their homework

shy helm
#

Cain and Abel 😛

#

is the classic ARP spoofing/sniffing/posioning tool

#

all the l33t h4x0rs use it

peak acorn
#

too complicated

#

im not tryna leet hacks just see goofy graphs

#

networking is a whole ass thing tho aint it

#

like u gotta do multithreading and all this jazz to do cool stuff

#

i dont even know how to do that lmfao

shy helm
#

Easiest way in Java is to use executors and synchronized queues to pass messages

#

so you basically just create a bunch of Runnable classes which have shared queues to pass messages between them

#

so like Class A might be responsible for reading data from the network, each time it gets data it uses a queue to send it to some receiver Class B, which is waiting for data on the queue, which dequeues the data and processes it, etc

peak acorn
#

yheah idkkk i might look into networking later just cos its kinda cool to learn

#

probably useful to know about at the very minimum

#

god knows sckool aint teaching me shit

fallow mica
#

the first line

#

👏

rancid nimbus
#

What happens that triggered it?

gleaming quiver
#

Hey guys I had a question
This question may have been answered before , but please bare me as I’m a new member
Can someone send me a course / site where I can learn flutter ??

sage vector
#

I would properly recommend learning Dart first

gleaming quiver
#

Ohk thanks mate

sage vector
autumn swan
#

The Flutter channel on YouTube actually has a lot of good quick videos. They're very nice for learning a bunch of components quickly

umbral saffron
#

see through smart glasses time

#

can someone help find me a good see through screen

peak acorn
#

how the fuck is T(n) = 2T(n/2) + O(n) == O(nlogn)

#

racking my head over that rn

shy helm
#

Do you know how to solve a recurrence relationship?

peak acorn
#

no thats exactly what we're on about rn in class lol

shy helm
#

ah lol

peak acorn
#

so i googled it but no clue why

#

but

#

found that after a while

shy helm
#

yeah

#

that's the simple explanation, there's log n depth when you divide by 2

#

and at each level you do n work

#

so you do n work log n times

#

therefore it's O(nlogn)

peak acorn
#

good stuf

shy helm
#

A "lazy way" to look at runtime complexity is by taking the limit of the division of the two functions

peak acorn
#

im stupid as hell lel

shy helm
peak acorn
#

havent done real math in almost a year 💀

shy helm
#

and you know that if f(n) belongs to o(g(n)) then f(n) belongs to O(g(n))

#

It’s ok no one in the real world does math, just wolframalpha

peak acorn
#

lol

#

its kinda a weird point in my classes because we actually do this stuff later into the semester in class discrete mathematics or w/e. but we are currently talking about the complexities in data structures, before we actually are doing the math for these complexities in discrete math

rancid nimbus
warm sleet
#

llinear complexity

#

that's what big-o notation basically means

#

useful information on how something scales

#

@peak acorn that's a rough estimate, usually done by looking at internal loops in a function

#

if its a straight lookup, like a hashtable, its O(1)

#

a single loop would be O(n)

#

and if you for exampling drawing a 2d image

#

that runtime complexity would in the order of O(n^2)

#

in this case you have two dimensions, so you can flatten this down to O(n) again

#

and then logarithmic, for algorithms, which halve their work each step

#

like mergesort I believe

#

In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, supposing that each elementary operation takes a fixed amount of time to perform. Thus,...

#

This is what you are looking for

#

n in this context, always means the size of your dataset

#

be it, a list

#

n-amount of items in a list

#

Its not about specfically using this, in calculations, but its to give some theoretical grip on the time it takes for your code to run

#

and can be important when designing software, and choosing the right datastructures

#

for example, if you have a list of items, and you want fast access to a specific element in that list

#

You better have an array, because a linked list would be O(n), instead of O(1)

rancid nimbus
#

Yes that too. I the math formula above and the my link posted had an explanation of why it it that way in the CS analysis of algorithms master theorem

peak acorn
#

Someone else linked me that 'master theorem' in a different discord haha

#

shits craaazy

rancid nimbus
#

Also, not every loop counts because to apply a Gaussian filter to a decompressed immage is only O(n) with n being the pixel count not O(n^2). It loops over a few pixles to the left and right each time. That would amount to basically a constant and that is why that gets removed. It's basically how it runs at scale. With the common n stands for the size of the input.

peak acorn
#

uhhhh wat

#

so

#

For this filter function you are saying what, You only modify a few pixels per row is that it?

#

idek that algorithm sooo

rancid nimbus
#

I was saying that n is the input size which is height *width.

peak acorn
#

yes

rancid nimbus
#

If you take an immage that it twice the size it would take twice the size or there about because start up time and compression.

shy helm
#
for i in len(image): <- n height of image
  for i in blah:     <- c calculated, but is bound by some constant

Runtime complexity is technically O(nc), but since c is strictly bound by some constant, O(nc) <= O(n)

rancid nimbus
#

That's a nicer way of putting what I said I guess.

shy helm
#

There's lots of fun analysis like this in runtime complexity

peak acorn
#

I mean yeah it depends on the limits of C

#

which would,i imagine, be well defined

shy helm
#
input := get_user_input()                     // Assume O(1)
letter_count = LinkedList(26)
for let in input:
  letter_count[let] = letter_count[let] + 1
print letter_count
#

here's some fun pseudo code

peak acorn
#

isnt accessing arbitrary values in a linkedlist bad bad

shy helm
#

yes, haha

#

never do it

#

But the point of the pseudo code was to display the oddities of big-O

#

technically it's O(len(linked list)) to do that, but here len(linked list) <= 26

#

So should the code be considered to be O(len(linked list) * len(input)) ?

#

Should this be reduced to O(26 * n)?

#

and further O(n)?

peak acorn
#

uhhhhhh lets see

#

sounds like O(n) to me

shy helm
#

yessir

peak acorn
#

For every letter in input (N times)
find letter (len(linkedlist)) and add 1 (could be another slow linkedlist get but idk about that, otherwise constant)

rancid nimbus
#

It would be O(n)

peak acorn
#

definitely o(n) but u sounding like its a trick

shy helm
#

heh, it's not really a trick

#

it's just understanding part of the definition of Big O

#

for example, these two code segments are the same big O:

for i in range(0, n)
for i in range(0, n)
for i in range(0, n)
for i in range(0, n)
for i in range(0, n)

Even though one is strictly 4 times faster than the other

peak acorn
#

I need to go google the precise definitions of what my teachers means in his words because he uses theta(?) instead of O describing stuff at least rn

#

and omega idek what they all are because later he said they are all equal so

shy helm
peak acorn
#

lmfao. . . errr

shy helm
#

😛

shy helm
#

they're all defined similarly, big O is | f(n) | <= c | g(n) |

peak acorn
#

what is with the | bars | everywhere

#

is that meaning abs value everywhere

#

just looks weird

shy helm
#

yea

#

lots of math theorems have ABSs everywhere

#

if you're studying CS you'll see lots of them in the first two years

#

less math in upper years

peak acorn
#

watching a vidya

#

ok i get it

midnight wind
#

Hello, I need some help with documenting python function, in js I would do something like this

/*
*Print out name
*@param {string} name The name of the person to print
*/
function(name){
  console.log(name)
}

What is the python equivalent, can't really find anything online

#

Does it even exist

deep scarab
#

docstrings

midnight wind
autumn swan
midnight wind
#

thx

warm sleet
#

Is there no official python standard for this?

midnight wind
warm sleet
#

weird

#

I'm so used to typing /**<TAB>

#

that generates a documentation block

midnight wind
#

yeah it's nice

#

this is what I did in the end

#
def drawTriangle(tt, x, y, height, width, color):
    '''Draw a Triangle 
    
        Parameters:
            tt: Turtle object
            x (int): X cordinate
            y (int): Y cordinate
            height (int): Height of the triangle to draw
            width (int): Width of the triangle to draw
            color (str): Color of the fill
    '''
    tt.penup()
    tt.goto(x, y)
    if(color):
        tt.fillcolor(color)
        tt.begin_fill()
    tt.pendown()
    tt.goto(x+width/2, y+height)
    tt.goto(x+width, y)
    tt.goto(x, y)
    if(color):
        tt.end_fill()
warm sleet
#

inside the method body? really

midnight wind
#

yeah

#

it's weird

#

python is weird

#

this is for school

warm sleet
#

I'm having some fun in .NET rn

midnight wind
#

this is what I have to deal with

warm sleet
#

meanwhile

midnight wind
#

it's SO basic

warm sleet
#
public partial class CustomerPricing {
    public static bool operator ==(CustomerPricing a, CustomerPricing b) {
        if (a == null || b == null) return false;
        return a.customerId == b.customerId && a.productionType == b.productionType &&
               a.packagingType == b.packagingType && a.weightClass == b.weightClass;
    }

    public static bool operator !=(CustomerPricing a, CustomerPricing b) {
        return !(a == b);
    }
}
#

operator overloading xD

midnight wind
#

ah

warm sleet
#

so you can do objectA != objectB

#

and not have to check 4 fields

#

java requires you to implement equals()

spring pond
#

tbh if java had operator overloading id probably use it quite a bit more (along with better generics) but ive kinda moved on to c# at this point

warm sleet
#

better generics?

#

Operator overloading has its perks

#

but it also makes for messy code

spring pond
#

java does some weird stuff with generics in terms of compilation that make it more restricted afaik

warm sleet
#

I wish java had an object indexer

#

thats like the only thing i wish for

#

they already improved properties like the way .NET does it, with record

warm sleet
#

this is what java makes me do ^

#

generate all the boilerplate!

midnight wind
#

nice

warm sleet
#

I have a bunch more of those oneliners

midnight wind
#

what exactly should be in the file

warm sleet
#

did they give you a name?

#

@midnight wind is this HE certification?

midnight wind
#

yeah

warm sleet
#

@midnight wind yeah just run a webserver on your v6 address

#

and put that file in the root of your webserver

midnight wind
#

ok

warm sleet
#

they just want to check, if you can run a webserver on v6

#

@midnight wind it gets better

#

next step: create a mailserver.

#

Thats where I gave up

midnight wind
#

lel

#

I just want to put this on my resume

#

I have internships next year

warm sleet
#

PAPERTIGERS

#

leggo

#

@midnight wind lol one thing I love about the 6to4 tunnel with HE

#

you can just have them generate the configuration commands for mikrotik :D

midnight wind
#

does my desktop need to be ipv6 enabled or just my server @warm sleet

warm sleet
#

@midnight wind are you using a tik?

midnight wind
#

nope

warm sleet
#

oh

midnight wind
#

ER-X

warm sleet
#

well, you're supposed to use ND

midnight wind
#

ND?

warm sleet
#

Neighbor discovery protocol

midnight wind
#

oh

warm sleet
#

The Neighbor Discovery Protocol (NDP, ND) is a protocol in the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the link layer of the Internet model, and is responsible for gathering various information required for internet communication, including the configuration of local connections and the domain name s...

#

Its for SLAACv6

midnight wind
#

that's router-advert?

#

that's what I use on my ipv6 vlan

warm sleet
#

local devices, should automatically receive a public IP on your prefix

#

@midnight wind I'm a bit rusty when it comes to the specifics

#

6to4 is disabled rn, so its blank up here

#

it just advertises this

#

@midnight wind or use dhcpv6

#

SLAAC is easier

#

nice public IPs

#

before we scare the developers

peak acorn
#

why was there nested trys there lol

spring pond
#

connecting to the database could throw an exception but if that succeeds then creating a SQL command could also throw an exception

hollow basalt
#

exceptionception

peak acorn
#

im pretty sure im the only one who has the idea to use private git repos to keep my school work in order and i still dont know why

#

Its such an easy solution and whenever you have group projects its perfect for that

#

specifically for my CS classes but I do it for every class

hollow basalt
#

im pretty sure im the only one

#

based on what

#

you're the only one in your group of friends?

peak acorn
#

based on the fact that my teacher mentioned git and nobody knew how to use it

#

Bold of you to assume I have friends

hollow basalt
peak acorn
#

👀 I have been trapped

#

Whenever I have code group projects I always beg and plead for them to use git

hollow basalt
#

I forced my teammates

#

I'm sick of using gdrive or dropbox

peak acorn
#

y'all are on windows, there is a nice easy af gui. just uuuse it

hollow basalt
#

those suck

hollow basalt
#

I taught my friends git commands

peak acorn
#

Some of these people didnt show how to ssh or anything like that I cant expect them to be able to know like what the or 4 main git commands

hollow basalt
#

They won't know until you teach them

#

😉

peak acorn
#

yeah but

#

i am not a teacher

#

shouldnt be my job

shy helm
hollow basalt
shy helm
#

GitHub was the default for me

#

Course staff even had GitHub accounts we could add to our group repos for auto marking

#

👌🏼

hollow basalt
#

Git was fine, but it my early years of uni. most source code can be confined in 1/2 source files.
So we even have someone to "compile" the code

shy helm
#

Ooof multiple people working on the same file 🙅🏼‍♂️

#

My first half of second year I had my first real taste of a group project—we had to make a VIM clone

hollow basalt
#

In my 2nd year, I already taught my teammates about git

#

though they don't appreciate it that much

#

I reckon it's because of merge conflicts

shy helm
#

Oof, I feel like we had a tutorial on git at some point in my lower years

#

Just cause it’s so essential

hollow basalt
#

but when I had my internship, they are used to SVM (i think)
So I also had to help our team

#

they are only migrating to git, so I became the PR approver

shy helm
#

Ohhh I had that too

#

We had a giant SVN repo, we were moving code to git and config to perforce

#

I too taught my team about PR reviews 😂

peak acorn
#

My boomer ass java teacher mentioned using svn one day lol

#

I remember just like it was yesterday using tortoise svn to download gmod addons.

warm sleet
#

if your teacher suggests using SVN. you should tell him that he is living in the past.

#

and that no developer in their right mind, would ever use SVN.

#

And if he questions your opinion. tell him that SVN tracks files, instead of content.

willow jackal
warm sleet
#

git.

#

There's no choice. its all git.

#

Mercurial if you want to be the diva.

nocturne galleon
#

GitHub, GitLab, etc

warm sleet
#

Those are platforms for hosting a git server...

#

you can use git without a server

hollow basalt
vital blaze
#

I just write my code in a google document automatically versions!

#

In my third year of my CS degree I tried to use git for a group project.

#

My teammates had no idea how to use git.

warm sleet
#

@vital blaze I took it upon myself with projects, to teach my coworkers on how to use git.

#

Once they understand that git tracks content, instead of files. Things become much easier.

vital blaze
#

I tried to explain it

warm sleet
#

using SVN because your coworkers cant figure out git, is so stupid

#

@vital blaze my previous employer was using svn, and I for the life of me, couldnt properly do merges and such

#

so I actually used git locally to do merges

#
  1. import SVN to git
  2. Commit a branch with the changes
  3. Merge
  4. Export back to SVN
vital blaze
warm sleet
#

SVN doesnt do merges.

#

SVN doesnt have branches.

#

The diffs it does, are over the entire filetree, it completely ignores any previous merges.

#

idek why its called a version control system

#

Git is smart enough to automatically do 3-way merges on existing files

autumn swan
#

Because it is a version control system, and there are ways to do similar enough things in SVN that one would do in git (not down to the details, but overall approach). I vastly prefer git, but SVN was fine and did the job.

warm sleet
#

@autumn swan if you save a file, without changing content SVN sees this as a change.

#

And for a version control system, that manages source code, its completely inappropriate.

#

TFS suffers from the same kind of idiocy.

#

wait, they renamed it

#

its now called 'Azure DevOps Server'

autumn swan
warm sleet
#

Merge conflicts, when there aren't any conflicts.

#

@autumn swan also, if you create a "branch" (its not a branch) on SVN, its just a copy of the existing filetree.

#

There's no transparency and audit trail to who wrote what line.

autumn swan
#

There is. There absolutely is. Maybe your experience was different for some reason. You wouldn't want to use SVN exactly like git.

warm sleet
#

And next time your coworkerer checks in

#

they first have to download your entire "branch"

#

Linus torvalds actually had a talk at googleplex many years ago

#

explaining the brainrot that SVN causes

#

and why it, and other version control systems aren't as successful as git

#

SVN for opensource makes no sense. Because there's no audit trail

#

git commits are a blockchain

#

you can't mess with older commits, to try and spoof the other users

#

well maybe not true blockchain

#

In cryptography and computer science, a hash tree or Merkle tree is a tree in which every leaf node is labelled with the cryptographic hash of a data block, and every non-leaf node is labelled with the cryptographic hash of the labels of its child nodes. Hash trees allow efficient and secure verification of the contents of large data structures....

autumn swan
#

To be fair, you have to recognise Linus's bias there :)
I feel like you're trying to convince us/me SVN is worse than git. I agree, you don't need to dump on SVN to prove that point. I'm just saying it's not absolutely useless and garbage.

warm sleet
#

@autumn swan sure, linus was biased heavily here. And I acknowledge that

#

and I am probably preaching to the choir here

autumn swan
#

Absolutely

warm sleet
#

But yeah, there's some fundamental architectural differences between git and svn, that may be worthwhile to explain

#

since these are inherent in other source control systems too

#

be it Mercurial, Perforce, CVS and the likes

#

and lets not forget

#

Bitkeeper

#

the spiritual predecessor of git

#

@autumn swan only argument I used to make in favor of SVN, was that it was easier to track large binary files with

#

but that has been superseded by git-lfs

autumn swan
#

Finally got a job after over a year of looking.
2 days later, someone reaches out for a role that is far more interesting and double the pay (but is a language I don't like using for the job).
F

lament cave
#

rip

shy helm
warm sleet
#

have fun "merging"

shy helm
#

I've done it, it's fine--kinda similar to git

#

the workflow is just different from git (which I prefer)

shy helm
# shy helm I've done it, it's fine--kinda similar to git

to clarify, if you try to commit a file that's out of date it will reject, then you svn up to get the external changes and if it can't be merged automatically it will provide you with a whole: "Conflict discovered in file X: postpone (p), diff (df), edit (e), etc"

warm sleet
#

There are no real branches

shy helm
#

P inserts diff tags exactly like git, e inserts tags and opens the file in your default editor to fix immediately

warm sleet
#

there's only one version on the server

#

and you can rollback between them

shy helm
#

ok? What does that have to do with merging changes?

#

I never said SVN had branches

warm sleet
#

when you have two branches that have been merged before

#

and then pull those changes onto your own tree

#

it doesnt have the same merge conflicts again

#

since they had already been merged before.

#

3 way merging on svn is incredibly painful

#

because it doesn't know about the lines that were merged before

#

because it only merges file versions, it is not aware of what lines were part of what merge.

#

this is the whole debate between tracking content vs files

shy helm
#

Again, I've never had these issues, because we used SVN with a different workflow then we use Git

#

avoiding 3-way merge problems

warm sleet
#

no, fundamentally

#

svn is way different than git

#

in that, svn tracks files, and looks only at metadata

shy helm
#

SVN with a different workflow then we use Git

#

??

warm sleet
#

whereas, git tracks the content of the files themselves.

#

That's why I said that I think that svn is inappropriate for sourcecode

#

because with source, you want to track the content

#

if you open a file, and press save

#

svn sees this as a change

#

git does not.

autumn swan
#

Was there some statement regarding using SVN for open source? I don't know anyone doing that. Especially because it's mostly on GitHub, which by definition, is using git.

#

Anyways, yes, again, you need to use SVN and git different from each other. The issues you're saying SVN has, others don't seem to have run into. Maybe your editor was modifying line endings or whitespace for example.

#

Recruiter: "So they're a Java shop... really lacking in JavaScript, so they're looking to hire... they also do Node and some React, but mostly JavaScript"
help

shy helm
#

blank file commited
opened blank and saved (confirmed the modified date changed)
svn status -> no changes
added line
svn status -> file modified

#

Can also SVN blame the file and it shows which revision each line of the file comes from and who commited it ("C")

shy helm
# warm sleet svn is way different than git

no one has disagreed with you that they're fundamentally different version control software (in contrast I think everyone has ackowledged that they have very different work flows), we're just pointing out some of the things you're saying about SVN are incorrect

true path
#

Anyone here pretty good with SQL stuff?

warm sleet
#

@shy helm workflows arent even the interesting thing, Git's internal storage is completely different than that from svn

#

but I see the svn brainrot is real

autumn swan
#

There is absolutely no need to make a personal attack. Again, everyone agrees SVN is different. Being different means different workflows are better suited to each one.

warm sleet
#

by using svn, you subject more people to this ancient curse of a technology, go ahead. I'm not using it xD

#

thankfully git-svn is a thing.

autumn swan
true path
#

So what I'm needing to do is list the ssn, first name, and last name of all patients who have ever had a consultation with a certain doctor, then list them in ascending order from patients last name while avoiding duplications, I have the avoiding duplications part and the ascending part down and even listing the ssn first name and last name of the patients, but I can't figure out how to make it to where its only those patients who have seen that doctor

#

Right now when I run my query its just pulling 1 of each patient and assigning that certain doctor

autumn swan
#

Is this real info or homework?

true path
#

Homework, wouldn't be posting this stuff with real info lol

#

Would 10000% violate all sorts of laws

autumn swan
#

Would hope so but it's been done 🙂
I think you're missing a join of some sort. Have you gone over those at all?

true path
#

I'd love to use join but my professor won't let us

autumn swan
#

Say what now. Uhhh.

true path
#

😄

#

He said that using the join clause doesn't show where we establish our links at

autumn swan
#

I'll be honest that SQL is not my strongest point, but this seems impossible without a join unless a Consultation entry contains all that info without needing a join (which would probably be bad DB design, but it's a course so that's possible)

true path
#

Consultation contains the the physician ID and patientSSN

#

So probably is a bad DB design

autumn swan
#

No, that's fine. But you'd need to join those keys (I assume they're keys) with their respective tables to get the other info and match it up, right?

true path
#

I believe that is where the WHERE comes in on my work so far

autumn swan
#

Oh hang on. I think I get it. But I'll have to defer to someone else because I'd just me making stuff up from here on.

true path
#

Because that I believe is where the data is all being "joined" together from what I'm understanding

#

I mean, anything helps lol

autumn swan
#

I'ma look up some stuff on foreign keys, gimme a sec

true path
#

Worst case I just undo what I add in if it doesn't work

#

Alright ty

autumn swan
#

So what I was looking up is if there's implied joining with foreign keys (which would've blown my mind), but it doesn't look like that's a thing. So I haven't got a clue.

true path
#

I want to say that there is implied joining mostly because of the db design posted by my professor

#

Not 100% sure though obvi

autumn swan
#

I don't understand your prof's point of "using the join clause doesn't show where we establish our links at", unless what they meant was foreign keys are the way to show those links (and indeed it is a good thing/way to do so). But using foreign keys, AFAIK, does not mean that you do not use joins.

true path
#

Here are his exact words from when he said that

autumn swan
#

Hmm. Does your week 5 content show something like the first answer here? https://dba.stackexchange.com/questions/212200/how-do-i-do-a-join-in-ansi-sql-89-syntax
(noting the, uh, DO NOT DO THIS EVER, but hey, coursework, cool)

true path
#

Guess what, it only shows stuff from the DO NOT DO THIS EVER lol

#

Love this professor

#

/s

autumn swan
#

Yeah that's pretty much how programming education goes tbh

true path
#

Had a friend say something about using a subquery in the where clause

#

But not 100% sure how to implement that in there

pliant siren
#

hah, so I just tried to download the Coco training datasets from their website, using Chrome... which chrome blocked and wouldn't let me download claiming it was "malicious". Thanks Google, hindering machine learning 😄

true path
#

Tried a subquery on the Where clause, got the exact same result as before without the subquery

pliant siren
#

as a subselect?

true path
#

Yeah

pliant siren
#

what database platofmr does this have to run on?

true path
#

Hmm?

#

I'm just using Access lol

pliant siren
#

Good luck.

#

😄

true path
#

Thanks... lol

true path
#

Figured it out, didn't need the . in PhysicianID

peak acorn
#

Help. . .

#
  temp = val;
  for(placeValueBase16 = 4096; placeValueBase16 >= 1; placeValueBase16 /= 16)
  {
    switch(temp / placeValueBase16)
    {
      case 0:
        printf("0");
        break;
      case 1:
        printf("1");
        break;
      case 2:
        printf("2");
        break;
      case 3:
        printf("3");
        break;
      case 4:
        printf("4");
        break;
      case 5:
        printf("5");
        break;
      case 6:
        printf("6");
        break;
      case 7:
        printf("7");
        break;
      case 8:
        printf("8");
        break;
      case 9:
        printf("9");
        break;
      case 10:
        printf("A");
        break;
      case 11:
        printf("B");
        break;
      case 12:
        printf("C");
        break;
      case 13:
        printf("D");
        break;
      case 14:
        printf("E");
        break;
      case 15:
        printf("F");
        break;
      default:
        printf(" ");
        break;
    }
    
    temp %= placeValueBase16;
    
  }
  printf("\n");
  return 0;

How do I un-ugly it. Its in C. No extra function calls, variables, or for loops. Profs orders q_q

autumn swan
#

Look up the formatting tokens you can use for printf (like %d and such, but there's one that will be very useful for you)

peak acorn
#

oh u know what. . . There is a hexadecimal specifier

#

im dumb

autumn swan
#

But now you're smarter than you were 5 minutes earlier, and that's what it's all about :)

peak acorn
#

😎

hollow basalt
#

baited

peak acorn
#

I have not really learned how to use C yet

#

kinda just

#

makin it work and submitting hehe

deep scarab
#

use a look up table

peak acorn
#

cant

#

look

#

stupid

#

its stupid

deep scarab
#

😬

peak acorn
rancid nimbus
#

Ok, if number is sub 9 you added the number to '0' else if it is less than 15 subtract 10 from the number and add it to 'A'.

#

Else maybe just print a space.

#

That's my approach. What is it supposed to do?

peak acorn
#

print out number in hex

#

Not that I think about it this assignment barely makes any sense

#

Maybe i shouldnt use prinf("%X")

#

because then I could just do printf("%X", val); and be done with it

#

which seems like not the way he intends

shy helm
hollow basalt
#

Yea it's probably not

shy helm
#

Also the easy way to do int to char is just assignment with a cast

#

int singleint = 0
char intchar = (char) singleint + ‘0’

#

Similarly for the other hex values
char overNineHexChar = (char) singleint + (‘A’ - 10)

#

Chars are just 1 byte ints in c 😉

peak acorn
#

I really hate when its just idk unclear

#

we are already using printf like

autumn swan
#

In your case, I'd just ask the prof if it's alright to use %x. No point in leaving it ambiguous, and I've learned the hard way that doing the unexpected but more correct thing doesn't mean your prof will be happy.

rancid nimbus
#

So what I said earlier?

#

Ok. Maybe.

#

I think I written bytes to hex converter in assembly before and used that if less than 10 char '0' plus number else 'A' +(number -10). It seems like something I would have done.

peak acorn
#

Too late to ask that the prob

pseudo laurel
#

i need help in programming please help anyone???
bash

hollow basalt
#

dash

#

tcsh

#

ksh

#

zsh

empty sentinel
#

@pseudo laurel we are going to need a LOT more to go on than just “help”, “programming”, and “bash”. A.K.A. Expected arguments, but received $null

hollow basalt
#

and I hate it more every time

empty sentinel
#

LOL. I understand completely.

hollow basalt
#

Now I'm at the point where I ignore them completely

#

that's not good, but ehh

#

I agree, that's where a form helps

#

Like
"whats the problem"
"what have you tried"
etc tec

#

so we can get past the normal

#

have you tried restarting

#

That's what I hate

#

it's like you have to put the effort to help them

#

they need to be reminded, they need you. not the other way around

empty sentinel
#

But I think I’m off topic now. 😦 needed to vent at this ungodly hour I guess. Can’t sleep anyway.

hollow basalt
#

it's frustrating but I still need to try to help them

#

re-installing their IDE
That's the pinnacle

empty sentinel
#

LOL.

#

By the way, does anyone know of a WYSIWYG GUI creator/editor for Python?

hollow basalt
#

but why

empty sentinel
#

I might be misunderstanding something, but I’ve found GUI editors for like, WinForms to be waaaay easier to use than trying to hand-code stuff.

hollow basalt
#

Well, it's up to you really

#

also I don't know any for python

#

since I hand-code gui

empty sentinel
#

I have a GUI program written in Powershell and WinForms that has a few tabs and a lot of links and text boxes and such. Hand coding their placement is a bit of a nightmare. Especially if I want to try different layouts and configurations.

hollow basalt
#

WinForms
I normally use vstudio gui editor

empty sentinel
#

It’s pretty nice to be able to click and drag items around using AdminScriotEditor. But it’s a depreciated program.

hollow basalt
#

But it’s a depreciated program.
That's a code for