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
Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

qntm posted:

cygwin's uninstallation instructions involve manually editing the registry, it is literally malware

Win10 linux support is no less malicious, imo. It's gonna be broken rear end poo poo for years.

Adbot
ADBOT LOVES YOU

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
i don't know why the announcements are all "bash on windows!" since that's been around for decades. the actual new thing is elf binaries compiled for linux running natively on windows

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Plorkyeran posted:

i don't know why the announcements are all "bash on windows!" since that's been around for decades. the actual new thing is elf binaries compiled for linux running natively on windows

elf binaries? I'll believe it when I see it. most likely they are pe binaries, because the windows kernel can only natively load pe, and can only create a process from a loaded pe. I mean it's not impossible and it would simplify the toolchain a lot (nobody wants to maintain a COFF linker in tyool 2016 when ELF is native almost everywhere), but recompiling makes more sense. elf is a little hairy to get working in windows, and a lot of stuff in windows assumes pe executables natively loaded by the kernel

I'm super curious to see how microsoft realized my life-long dream but I'm also afraid that ship has sailed and I probably won't be able to muster the will to look too deep into it when it's released

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
I'm a little anxious because I'll finally get to see unix over windows as done by an actual team with the required skills, budget and possibly insider knowledge. I want to see how they solved the worst issues (probably in suboptimal ways because the kernel guys would never let usermode unix people put their dirty paws in their internals)

on the other hand, I'm super out of shape, I've never done any windows development in years, nor any reverse engineering in even longer (but considering how microsoft works lately, they'll probably release all the source code), and looking into this feels too much like work to do it in my spare time. I'll probably have to finally let it go and find another hobby/dream

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
this feeling is the felling you're getting old, isn't it

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
10x wrote some design docs that called for passing callbacks everywhere but basically reimplemented promises

when i asked him about it he told me that promises obfuscate what's going on and can fail in odd ways so instead pass callbacks everywhere always

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

for some reasons not worth getting into I decided to add a quick "print sql query results as nicely formatted plain text" feature to one of our semi-internal tools

and i figured this was a case where it'd be faster to type it up myself than to look up and import a pretty printer of some sort

like ten minutes later, I looked at the function I wrote and I was a little disturbed. this is what happens to your regular coding when you've been toying with f# on the side for months:

code:
                                  
Dim printTable = 
    Iterator Function(dt As DataTable)
        
        Dim columns = dt.Columns.Cast(Of DataColumn)
        Dim rows = dt.Rows.Cast(Of DataRow)
        
        Dim printItem = 
            Function(element) If(IsDBNull(element), 
                                    "NULL", 
                                    element.ToString().Replace(vbNewLine, "¦"))

        Dim columnWidths = 
            columns.ToDictionary(keySelector:=Function(col) col.Ordinal,
                                 valueSelector:=Function(col) Math.Max(col.ColumnName.Length, 
                                                                       rows.Max(Function(row) printItem(row.Item(col)).Length)))
                                    
        Dim fixLength = 
            Function(s as String, i as Integer) s.PadRight(columnWidths(i)).Substring(0, columnWidths(i))
                                                                            
        Yield vbNewLine

        Yield columns.
                Select(Function(col) fixLength(col.ColumnName, col.Ordinal)).
                StringJoin("|")

        Yield New String("-", columnWidths.Values.Sum())
                                                        
        For Each row In rows
            Yield row.ItemArray.
                      Select(Function(elem, index) fixLength(printItem(elem), index)).
                      StringJoin("|")
        Next
    End Function
bonus: spot the line that became redundant midway through and i didn't notice until now

HoboMan
Nov 4, 2010

is that what visual basic looks like? gross

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



HoboMan posted:

is that what visual basic looks like? gross

that's vb.net I think, vb6 is far far worse

Soricidus
Oct 21, 2010
freedom-hating statist shill

qntm posted:

cygwin's uninstallation instructions involve manually editing the registry, it is literally malware

that's not the definition of malware

in any case, you only have to manually edit the registry if you have manually, from the command line, installed a specific, rather obscure package that is explicitly advertised as doing low-level fuckery. i have never known anyone who has done this

the actual method of uninstalling cygwin, in practice, for 99% of users, is: click on c:\cygwin64 and press delete.

Soricidus
Oct 21, 2010
freedom-hating statist shill
but why are we talking about linux in the terrible programmers thread? let's talk about terrible programming instead.

for example, right now i'm parsing html with regular expressions

Brain Candy
May 18, 2006

Soricidus posted:

for example, right now i'm parsing html with regular expressions

i͏̱͉̣̝ͅ ͉̜̟͈dǫn̹̙̯̘'̡̥̜̖͍͈̯̜t̯̫ ҉s̨̼e̙̘̼͖͙e̸͓͓̩̖̳̠̫ ҉͓̻͍̮͖͉ͅw͇̥̠h̡͖̥̘̖a̧t̵ ̘̩͖̮͓̞ͅth̬̳̫͎̮ͅe͕̖͔ ̫̬͙̹͙̺̼b̛̟̲̟͎̭i҉̖g ̭͖͙̦̝̙̗d̝͔e̺͘a̩l̛̮̙͖̮ ͎i̥͎̥̤s̴͕

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
ok, I've seen a few more details and they're actually running linux executables in windows. no idea why they went down this route (no, I have a pretty good idea why, but I don't know if the tradeoff will be worth it, unless they make the unix syscalls available from windows processes too)

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?

how is it cool?

it's just the Windows NT POSIX layer resurrected with some new APIs layered atop it

it's like when OS/2 added Win32s API support so they could run Windows apps too, nobody is developing for the base OS because it's poo poo garbage so they added a compatibility layer for a different poo poo garbage OS.

but unlike when OS/2 added Win32s API support, nobody is developing software either the base or compatibility layer. great job!

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?

hackbunny posted:

welp I have no reason left to live

there's an entire world outside the cesspool that is Windows and the septic field that is Linux

your mad skills would be most welcome in it

brap
Aug 23, 2004

Grimey Drawer

Soricidus posted:

but why are we talking about linux in the terrible programmers thread? let's talk about terrible programming instead.

for example, right now i'm parsing html with regular expressions

no you're not

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

piratepilates posted:

that's vb.net I think, vb6 is far far worse

vb6's Date object's default format is the string representation of the date and time. when you add some interval to it, it implicitly converts the value to the units the inverval is in, adds it, and converts it back. consequently there are all sorts of little off-by-n errors and we instead use an api that offloads date calculations to the server where things can be done in UTC and then sent back to the client.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

hackbunny posted:

ok, I've seen a few more details and they're actually running linux executables in windows. no idea why they went down this route (no, I have a pretty good idea why, but I don't know if the tradeoff will be worth it, unless they make the unix syscalls available from windows processes too)

kernel extensions?

Progressive JPEG
Feb 19, 2003

Shaggar posted:

no its not. its dumb as hell and utterly worthless

:qq:

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

uncurable mlady posted:

kernel extensions?

two in fact, and they ship with windows 10, meaning they aren't limited by the user mode kernel API and they may not be limited by the (public) kernel API either. they may be terribly serious about it this time

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

hackbunny posted:

two in fact, and they ship with windows 10, meaning they aren't limited by the user mode kernel API and they may not be limited by the (public) kernel API either. they may be terribly serious about it this time

wow

30 TO 50 FERAL HOG
Mar 2, 2005



one operating system, twice the security vulnerabilities

FamDav
Mar 29, 2008

Blinkz0rz posted:

10x wrote some design docs that called for passing callbacks everywhere but basically reimplemented promises

when i asked him about it he told me that promises obfuscate what's going on and can fail in odd ways so instead pass callbacks everywhere always

hm

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
my first programming gig had me maintaining an ASP (not .NET) site that used VB6 COM objects for database access.

often had to reboot the server when updating the COM objects when the database changed.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Soricidus posted:

for example, right now i'm parsing html with regular expressions

mods, ban this chucklefuck

Corla Plankun
May 8, 2007

improve the lives of everyone
rustlords, how do i make this work? i dont think i have ever seen a language that didnt promote integers in my entire life

code:
let color_num: i32 = self.red<<16+self.blue<<8+self.green;
its from the tutorial, red/blue/green are u8s

i tried putting casts everywhere (let color_num: u32 = (self.red as u32)<<16+(self.blue as u32)<<8+(self.green as u32); ) but i guess rust isnt smart enough to know that a u8 shifted 16 bits cant overflow 32 bits because it made a fuss about this still. (is shift left just totally worthless in this lang?)

i got it working with this but i am pretty sure this is the stupidest, shittiest line of code ive ever written in my life and i'm sure there has to be a better way
code:
let color_num: u32 = (self.red as u32).rotate_left(16)+(self.blue as u32).rotate_left(8)+(self.green as u32);
maybe i should have just dumped the second try in an unsafe block and moved on?

Valeyard
Mar 30, 2012


Grimey Drawer

Soricidus posted:

but why are we talking about linux in the terrible programmers thread? let's talk about terrible programming instead.

for example, right now i'm parsing html with regular expressions

:hellyeah:

suffix
Jul 27, 2013

Wheeee!

Corla Plankun posted:

rustlords, how do i make this work? i dont think i have ever seen a language that didnt promote integers in my entire life

code:
let color_num: i32 = self.red<<16+self.blue<<8+self.green;
its from the tutorial, red/blue/green are u8s

i tried putting casts everywhere (let color_num: u32 = (self.red as u32)<<16+(self.blue as u32)<<8+(self.green as u32); ) but i guess rust isnt smart enough to know that a u8 shifted 16 bits cant overflow 32 bits because it made a fuss about this still. (is shift left just totally worthless in this lang?)

i got it working with this but i am pretty sure this is the stupidest, shittiest line of code ive ever written in my life and i'm sure there has to be a better way
code:
let color_num: u32 = (self.red as u32).rotate_left(16)+(self.blue as u32).rotate_left(8)+(self.green as u32);
maybe i should have just dumped the second try in an unsafe block and moved on?

if you get a runtime 'shift operation overflowed' panic, it did actually overflow
either add more parentheses or use an operator with lower precedence

Rust code:
let color_num: u32 = ((self.red as u32) << 16) + ((self.blue as u32) << 8) + (self.green as u32);
or
Rust code:
let color_num: u32 = (self.red as u32) << 16 | (self.blue as u32) << 8 | (self.green as u32);
both work for me.

fwiw it looks like the tutorial is hinting towards something like "0x{:02X}{:02X}{:02X}" so you don't have to bit shift

Valeyard
Mar 30, 2012


Grimey Drawer
https://careers-redhat.icims.com/jobs/51097/senior-software-engineer---mobile/job

This looks good

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

this is the least egregious thing he's done but he's a ruby guy through and through and tries to replicate ruby paradigms everywhere else even if there's a better option

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Corla Plankun posted:

rustlords, how do i make this work? i dont think i have ever seen a language that didnt promote integers in my entire life

code:
let color_num: i32 = self.red<<16+self.blue<<8+self.green;

im not familiar with rust but shouldnt it be u32?

HoboMan
Nov 4, 2010

HoboMan posted:

is that what visual basic looks like? gross

JOKES ON ME MY NEXT TASK IS TO DEBUG THIS THING DONE WITH VBSCRIPT

HoboMan
Nov 4, 2010

ok but like the i keep getting LoadForm function is not found because
code:
<body onload="LoadForm()"> 
but later on the very same page
Visual Basic .NET code:
sub LoadForm()
pls help

e: lol turns out ie ignores vbscipt by default now

HoboMan fucked around with this message at 16:07 on Mar 31, 2016

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

HoboMan posted:

JOKES ON ME MY NEXT TASK IS TO DEBUG THIS THING DONE WITH VBSCRIPT

oh god

Real talk: the only reason I could wrap my head around old sites written in classic ASP/vbscript was because I had several years experience developing PHP sites. They're like different sides of the same poo poo coin.

HoboMan
Nov 4, 2010

i can't understand this project at all. visual studio crashes if i try to compile and run it but it's currently being used in production????
also if it's being used in production maybe me fixing the function call not happening will break everything even worse

gently caress
gently caress gently caress fuckfuckkkkkkkkkkkkkkkkkkk

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

HoboMan posted:

i can't understand this project at all. visual studio crashes if i try to compile and run it but it's currently being used in production????
also if it's being used in production maybe me fixing the function call not happening will break everything even worse

gently caress
gently caress gently caress fuckfuckkkkkkkkkkkkkkkkkkk

what errors are you seeing from the compile, or does visual studio seriously like 100% just lock up and crash? does that happen even if you build without running it?

keep in mind that if your vb code is like a COM or ActiveX object thats intended to be run embedded inside of another control or website or something it probably wont run from source on its own. youll also need to include the hosting object in your project and make that the startup object instead of your little piece.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



HoboMan posted:

i can't understand this project at all. visual studio crashes if i try to compile and run it but it's currently being used in production????
also if it's being used in production maybe me fixing the function call not happening will break everything even worse

gently caress
gently caress gently caress fuckfuckkkkkkkkkkkkkkkkkkk

nah you're screwed

HoboMan
Nov 4, 2010

i got it to work by just compiling it and then running it after. but if i run it i just get a list of the project files in my browser.
i just want some debuggin tools man

e: ps yes vs did just lockup and crash

HoboMan fucked around with this message at 16:28 on Mar 31, 2016

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

HoboMan posted:

i got it to work by just compiling it and then running it. but if i run it i just get a list of the project files in my browser.
i just want some debuggin tools man

So, debugging classic asp/vbscript is not for the faint of heart, but it is definitely doable. If this is one of those web site non-projects, it's annoying.

But yeah, what I remember doing is choosing "start without debugging" so that you got the site running there on your dev machine. Then, "Attach to process..." and make sure you enable Script debugging. Find the iis process that is running the site. Might help to load a few pages with some vbscript, then it'll show up in the process list with Script.

Once you're attached, you have to load some pages and you can go to the Solution Explorer and it will list all the loaded files and scripts under debugging. You have to set your breakpoints there, NOT in the source files themselves. Then just reload your pages and you should hit those breakpoints and remember to use Watchs to get values of variables and whatnot if that helps.

Adbot
ADBOT LOVES YOU

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
I just quit and get another job when I get a merge conflict

  • Locked thread