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

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

The Collector posted:

i want boring corporate money. Java or C#?

i do c# and the language is fine, but finding a good shop that isn't a web forms hellhole is a minefield.

honestly they're similar enough that you can probably just pick one and jump to the other if it doesn't work out.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i'd probably choose Java because unix and I like having access to more open source tooling

but I'm seriously courting a C# shop ATM and might go for it so obviously I dont care that much

brap
Aug 23, 2004

Grimey Drawer
paging shaggar

AWWNAW
Dec 30, 2008

.net is fine. C# is good. you’ve probably heard about windows.

.net shops are mostly terrible.

redleader
Aug 18, 2005

Engage according to operational parameters

The Collector posted:

i want boring corporate money. Java or C#?

yes

redleader
Aug 18, 2005

Engage according to operational parameters
as i understand it, c# is a good lang with a mediocre ecosystem. java is the opposite

jony neuemonic
Nov 13, 2009

c# also has whatever microsoft is currently doing with .net core working against it, but you're not going to encounter that in corporate jobs.

and who knows, it might eventually be good!

raminasi
Jan 25, 2005

a last drink with no ice

jony neuemonic posted:

c# also has whatever microsoft is currently doing with .net core working against it, but you're not going to encounter that in corporate jobs.

and who knows, it might eventually be good!

I'm in a corporate job where we care about .net core

not because we have to, but because our management considers it important to stay on top of the evolution of the tech stack we use

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
paging cis autodrag:

https://bitbucket.org/yizhangcomp/mumps-rs

quote:

Rust bindings and high-level wrappers for the direct linear solver library MUMPS API.
Requires MUMPS library of version 5.1 or later. Currently only serial version(without MPI support) is provided (due to lack to robust Rust MPI bindings).

edit: oops different mumps. i thought this made no sense.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

MALE SHOEGAZE posted:

paging cis autodrag:

https://bitbucket.org/yizhangcomp/mumps-rs


edit: oops different mumps. i thought this made no sense.

lol

JewKiller 3000
Nov 28, 2006

by Lowtax
just once i'd like to see a startup website that says in the footer "Built with <3 using M TECHNOLOGY (R)"

Workaday Wizard
Oct 23, 2009

by Pragmatica

The Collector posted:

i want boring corporate money. Java or C#?

c# if you have the choise. although java has the better tooling (maven :love:)

jony neuemonic
Nov 13, 2009

raminasi posted:

I'm in a corporate job where we care about .net core

not because we have to, but because our management considers it important to stay on top of the evolution of the tech stack we use

cherish them. i'm still waiting to use something newer than .net 4.0 professionally.

skimothy milkerson
Nov 19, 2006

turn your bibles to chapter 420, verse 69

"and the shaggar sayeth unto to lord: maven owns, java enums are good"

Soricidus
Oct 21, 2010
freedom-hating statist shill

Skim Milk posted:

turn your bibles to chapter 420, verse 69

"and the shaggar sayeth unto to lord: maven owns, java enums are good"

as it was in the shaggaring, and is now, and ever shall be, thread without end, amen

made a java enum just yesterday and it was the right tool for the job. a good language.

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

pseudorandom name posted:

ignoring how non-blocking is rear end-backwards compared to async.

having used both, honestly, for network stuff I like non-blocking better than async. especially in languages without async/await where saving/restoring state across asynchronous operations is a total hassle. but in general it feels more natural imo

Sapozhnik posted:

POSIX AIO harvests events using real time signals which is a bit icky.

eh, real time signals are just an event queue in signal drag. plus technically posix aio (which looks scarily similar to windows io! windows just lacks listio) isn't limited to signals: you can also opt to spawn a thread instead :v:

it's a failure of imagination on the part of linux devs though because sigevent is extensible, and indeed realtime-er oses like qnx do extend it with their event signaling mechanisms of choice. otoh the less said about the solaris implementation of posix aio the better

Sapozhnik posted:

The other alternative, if you don't care about latency, is to mmap() the things you want to read/write and then let page faults handle everything else.

that's like, synchronous af

fun fact: in windows there's no difference between (cached) io and memory mapped io because the file cache (not a block cache) basically just memory maps files in kernel space. as an added bonus, io and memory mapped io are coherent with each other. downside: the cache is stupidly complex, by far the hardest part in writing a filesystem driver for windows. upside: once the hard part is done, you can store whatever you want in the cache as long as you can make it look like a file

Sapozhnik posted:

Zero-copy networking isn't really a thing that can be done in a generic way from user space. You'd need to somehow packetize your messages from user space with knowledge of each connection's link MTU, then the kernel needs to weave the resulting scatter/gather list in with the relevant packet headers for all of the Ethernet, IP, TCP etc layers on top of that. And then the NIC needs to DMA all that poo poo out from all of those memory pools and then the kernel would need to release all of the buffers once that's done.

well uh. that's literally how it works, at least in bsd. there's a structure called mbuf that does exactly all that: it's filled with the data from the user, then it gets headers and trailers appended, then it's passed to the nic driver, and to the dma controller (windows has a very similar thing called mdl). it's just that most of the time you'll be using tcp which has to handle the buffers for you to preserve a strict ordering. I wonder sometimes what protocols and network development would look like if sctp had been designed much earlier and gone mainstream

Thermopyle posted:

whats the history of this? did MS come up with this idea on their own and then everyone else say "hey Microsoft did some cool poo poo here!" and then copy the idea from them?

I think they got the async io design from dec, like tons of other kernel design choices. things like posix threads and posix aio are basically the dec apis with a posix prefix stuck in front and the least portable parts omitted

Bloody posted:

i have absolutely no idea how OVERLAPPED works

there are two ways to look at OVERLAPPED: one is that it's literally exactly struct aiocb from posix aio, so if you have used posix aio before, it's that. another way to look at it is that it's composed of two parts: a kernel mode part and a user mode part. the user mode part is composed of the offset/offsethigh and hevent fields: extra parameters to apis like readfile that only make sense in an asynchronous context that gets passed to the underlying system call (compare the parameter list of ReadFile with that of underlying syscall ZwReadFile). the kernel mode part is the start of the structure: the internal and internalhigh fields, which are simply homologous with kernel structure IO_STATUS_BLOCK. this part is passed to the kernel, and I do mean passed to the kernel, by pointer, because the kernel will write to it when the io completes. pseudorandom name mentioned that io operations are packet based, and one of the things that gets saved in the io request packet is the address of the user mode io status block (also whether the request came from a 32 bit or 64 bit process because the size/layout of the structure varies with bit width). as a side effect, this means that every single concurrent io operation needs its own unique OVERLAPPED, with a lifetime at least as long as the io operation - if you reuse the memory for something else before the io has completed, the kernel will happily write over that something else, and good luck diagnosing that. I mentioned that solaris has a less than ideal implementation of aio: its greatest flaw is that it doesn't pass the status and return value to user mode with atomic memory writes, using some user mode hash table poo poo instead. the thing is clearly a bolt on, and posix aio is clearly meant to be implemented in the kernel to be remotely efficient

back to OVERLAPPED. to get the result of the io call, you wait for the call to complete (there are several ways to do this), and then you read the IO_STATUS_BLOCK/OVERLAPPED structure. the first field (status/internal) contains the outcome of the operation (success, failure, etc.) and the second one (information/internalhigh) the return value (for ReadFile, the number of bytes that was read). since the kernel writes the status code atomically, you can check for completion lock-free by reading it atomically (GetOverlappedResult does this internally, plus other things like converting the status code to a win32 error etc.), so that if you wish, you can actually do zero-wait io in realtime code, only ever using atomic memory reads/writes (provided you don't get a memory page miss and that none of the drivers in the stack use a synchronous lock during the submission of the async operation). most of the time, though, you'll specify a regular boring way to get notified of completion, like an event, an iocb, an apc etc.

random windows fact: there is exactly one kind of io that's always synchronous, and it's scsi commands. or at least, they used to be last time I checked, because how else are you going to spend your spare time but reading random c header files from the driver sdk


hacking tool sqlmap has a multithreaded mode and it looks exactly like movie hacking, with the secret value being filled in character by character

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
http://www.michaelburge.us/2017/08/25/writing-a-formally-verified-porn-browser-in-coq.html

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 reading the article on async primitives for swift and I immediately see an issue:

code:
func loadWebResource(_ path: String) async -> Resource
func decodeImage(_ r1: Resource, _ r2: Resource) async -> Image
func dewarpAndCleanupImage(_ i : Image) async -> Image

func processImageData1() async -> Image {
    let dataResource  = await loadWebResource("dataprofile.txt")
    let imageResource = await loadWebResource("imagedata.dat")
    let imageTmp      = await decodeImage(dataResource, imageResource)
    let imageResult   = await dewarpAndCleanupImage(imageTmp)
    return imageResult
}
the two loadWebResource calls are performed serially, making the code slower than necessary. I wonder if all async/await implementations are affected

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

hackbunny posted:

I'm reading the article on async primitives for swift and I immediately see an issue:

code:
func loadWebResource(_ path: String) async -> Resource
func decodeImage(_ r1: Resource, _ r2: Resource) async -> Image
func dewarpAndCleanupImage(_ i : Image) async -> Image

func processImageData1() async -> Image {
    let dataResource  = await loadWebResource("dataprofile.txt")
    let imageResource = await loadWebResource("imagedata.dat")
    let imageTmp      = await decodeImage(dataResource, imageResource)
    let imageResult   = await dewarpAndCleanupImage(imageTmp)
    return imageResult
}
the two loadWebResource calls are performed serially, making the code slower than necessary. I wonder if all async/await implementations are affected

yep, that's a general thing with async/await, it's very easy to accidentally serialize all your operations. generally you're supposed to use futures to run things in parallel, which is why good async/await designs tend to come in a package with a futures library, as opposed to being a pile of half-assed what-ifs cobbled together by an underemployed software architect

rjmccall fucked around with this message at 20:33 on Aug 26, 2017

FamDav
Mar 29, 2008
which article?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
https://gist.github.com/lattner/31ed37682ef1576b16bca1432ea9f782

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



there's also a proposal in the works:
https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619

also,

quote:

a pile of half-assed what-ifs cobbled together by an underemployed software architect

drat lol

redleader
Aug 18, 2005

Engage according to operational parameters

it took me way too long to realise this was a hackbunny effortpost

how do you know so much about every os??

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

redleader posted:

it took me way too long to realise this was a hackbunny effortpost

how do you know so much about every os??

I used to have a lot of spare time that I spent reading kernel source code (mostly freebsd and linux, but also windows and a little opensolaris). until a couple years ago I probably had read more code than I had written. and what I couldn't get the source of, I'd just run through a disassembler

I also used to have a peculiar obsession with porting stuff to windows that lead me to basically learning the posix spec by heart, and also reading the man pages of all sorts of obscure and/or defunct unix variants to compare/contrast implementation approaches

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
it is super cool and i hope you are using your powers for good

TOPS-420
Feb 13, 2012

rjmccall posted:

yep, that's a general thing with async/await, it's very easy to accidentally serialize all your operations. generally you're supposed to use futures to run things in parallel, which is why good async/await designs tend to come in a package with a futures library, as opposed to being a pile of half-assed what-ifs cobbled together by an underemployed software architect

tbf it does at least say "hey a future might be nice" and show how to write one. this looks actual delimited continuations as a feature hidden under something looking kinda like c# async, which is weird but could be cool

graydon hoare, Creator Of Rust, wrote a cool thing about the future of pl design

http://graydon2.dreamwidth.org/253769.html

i like how (me too) he shits on actors in passing at the very end. is this "throw shade at chris lattner" week

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
edit: nope

rjmccall fucked around with this message at 07:39 on Aug 27, 2017

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

rjmccall posted:

it is super cool and i hope you are using your powers for good

I will soon. maybe!!

I've been asked to evaluate porting some Important Ethical open source to windows and I dunno. I feel dumb. like I'm super concentrated on portability issues related to the python stdlib and I just realized I had completely forgotten about, oh, things like filesystem permissions, case sensitivity or lack thereof etc. hopefully I won't rather publicly embarrass myself. wish me luck

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
good luck!

Workaday Wizard
Oct 23, 2009

by Pragmatica
i love computer

Workaday Wizard fucked around with this message at 08:26 on Aug 27, 2017

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
eh, it's not something i should get into here, sorry. actually gonna edit my first post out and would appreciate you doing the same

Workaday Wizard
Oct 23, 2009

by Pragmatica

rjmccall posted:

eh, it's not something i should get into here, sorry. actually gonna edit my first post out and would appreciate you doing the same

sure thing

VikingofRock
Aug 24, 2008




hackbunny posted:

wish me luck

Keeping this part of the post to wish you luck!

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

:glomp:

sarehu
Apr 20, 2007

(call/cc call/cc)

Shaggar
Apr 26, 2006

The Collector posted:

i want boring corporate money. Java or C#?

c# if its web stuff, java or c# for other stuff.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





that graydon hoare post is really interesting and briefly hits on my biggest frustration with our current family of languages: they're designed for compilers/interpreters not people

even languages that are - in theory - designed to be amicable to extensive tooling (go, kotlin, typescript) are really pretty poo poo for actually working with. maybe you get an easy way to rename a function at all call sites or get an error when you omit a required argument and maybe there's a proscribed canonical style but i've never seen (good) support for multiple mutually compatible syntaxes or automatic refactoring more complicated than extracting some code to a new function or any sort of program control flow introspection

personally, i feel this is because the AST of a language is generally an afterthought when compared to the (textual) syntax itself and only exists incidentally as a compilation step. i spend a lot of time wondering what a language designed from the AST up would look like

gonadic io
Feb 16, 2011

>>=

the talent deficit posted:

multiple mutually compatible syntaxes

the only one of these i've ever seen is haskell allowing both indentated blocks or semi-coloned blocks. i've never actually seen anybody use the latter style themselves though, it's mostly just for generated code

JewKiller 3000
Nov 28, 2006

by Lowtax
ocaml has a revised syntax but almost no one uses it

Adbot
ADBOT LOVES YOU

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!

the talent deficit posted:

personally, i feel this is because the AST of a language is generally an afterthought when compared to the (textual) syntax itself and only exists incidentally as a compilation step. i spend a lot of time wondering what a language designed from the AST up would look like

lisps? though i guess that's less a designed ast and more directly exposing the ast to the programmer

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