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
Vanadium
Jan 8, 2005

when I grew up "coder" was a term associated with the highest honors but I don't think I've heard anyone use it in like a decade

Adbot
ADBOT LOVES YOU

CPColin
Sep 9, 2003

Big ol' smile.
I saw a then-current coworker post "CSS proves that coders have class" and wanted to strangle them.

akadajet
Sep 14, 2003

i'm a code cowboy

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Vanadium posted:

when I grew up "coder" was a term associated with the highest honors but I don't think I've heard anyone use it in like a decade

the term coding must have made itself into some elementary education research or something because now all the school curriculums i've seen around programming or computing are referred to as coding and nothing else.

Vanadium
Jan 8, 2005

can we change the thread title to be about Software Engineering Languages so our discourse isn't mistaken for some sort of low-status activity

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Vanadium posted:

when I grew up "coder" was a term associated with the highest honors but I don't think I've heard anyone use it in like a decade

in my world coders are the people who turn medical records into bills somewhere in the basement of the hospital

MrMoo
Sep 14, 2000

hackbunny posted:

I wonder why microsoft never made an async I/O variant of select/poll so you could get writability/readability notifications on a iocp, instead of having to mix async and non-blocking styles. hell it could have been done with special flags to WSASend/WSARecv, to ask for a non-blocking send/receive. immediate completion would mean the operation completed without blocking, asynchronous completion with error WSAEWOULDBLOCK would mean "try again now", so it could be easily used in a loop and you wouldn't pay the cost of two system calls

Because it would lead to direct performance comparisons which would highlight that Windows IO is actually terrible. :lol: at listing WSAPoll though, that API is a complete clown show, it's like 5x slower than select().

Windows is the OS that requires a registry setting to stop the IO subsystem throttling packets above 10,000 per second because is freezes the entire host.

MrMoo fucked around with this message at 04:39 on Jan 17, 2019

echinopsis
Apr 13, 2004

by Fluffdaddy

Captain Foo posted:

🎵 return of the MAX

regulate with nate dogg

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

jit bull transpile posted:

in my world coders are the people who turn medical records into bills somewhere in the basement of the hospital

you can do medical coding remote at home now. i actually know multiple people who have a basement office they descend into to do their coding. it actually ain't a bad way to punch the clock if you live in the sticks and have a side racket

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki
engineer is a meaningless noun appended to titles to imply that the employee is an understand computes person rather than sales and marketing

we got sales engineers, support engineers, customer success engineers, any type of engineer you want. idk how you engineer a sale, support, or success, but we do it, as far as hr records are concerned.

jit bull transpile posted:

in my world coders are the people who turn medical records into bills somewhere in the basement of the hospital

dispense with your epic life; one need not think of that nonsense world while waking, only in dreamsnightmares

Soricidus
Oct 21, 2010
freedom-hating statist shill
my programming job title is "spaghetti artist"

Gul Banana
Nov 28, 2003

havelock posted:

C# is verbose, but you get useful info from it (along with the garbage)
code:
public async Task<int> GetInt() { await Task.Delay(500); throw new InvalidOperationException("oops"); return 5; }
public async Task<int> GetInt2() { var result = await GetInt(); return result; }
public async Task<int> GetInt3() { var result = await GetInt2(); return result; }
try { var x = await GetInt3(); } catch(Exception ex) { Console.WriteLine(ex.StackTrace); }
in the REPL gives you

pre:
at Submission#0.<GetInt>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Submission#1.<GetInt2>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Submission#2.<GetInt3>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Submission#4.<<Initialize>>d__0.MoveNext()
It looks like the auto-generated state machine stuff at least uses the real method name in its name so you can see what has happened.

this works a lot better in .NET Core. check it out:
code:
using System;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        await One();
    }

    static async Task One()
    {
        await Two();
    }

    static async Task Two()
    {
        await Three();
        throw new Exception("whoops!");
        await Four();
    }

    static Task Three() => Task.CompletedTask;

    static Task Four() => Task.CompletedTask;
}
code:
$ dotnet run

Unhandled Exception: System.Exception: whoops!
   at Program.Two() in C:\Users\banana\Documents\code\asyncexception\Program.cs:line 19
   at Program.One() in C:\Users\banana\Documents\code\asyncexception\Program.cs:line 13
   at Program.Main(String[] args) in C:\Users\banana\Documents\code\asyncexception\Program.cs:line 8
   at Program.<Main>(String[] args)

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Soricidus posted:

my programming job title is "spaghetti artist"

put your variables in a box

mekkanare
Sep 12, 2008
We have detected you are using ad blocking software.

Please add us to your whitelist to view this content.
Could somebody recommend some reading on how asynchronicity is achieved by programming languages? I can't imagine a way for a caller to receive a signal from the callee other than using polling or hardware interrupts.

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

mekkanare posted:

Could somebody recommend some reading on how asynchronicity is achieved by programming languages? I can't imagine a way for a caller to receive a signal from the callee other than using polling or hardware interrupts.

like reading about an event loop? signals and callbacks, you can find the python impl on github (Lib/asyncio/unix_events.py) it isn’t overly complicated. the kj concurrency library used for capn proto also has an event loop and promises you could look at

mystes
May 31, 2006

mekkanare posted:

Could somebody recommend some reading on how asynchronicity is achieved by programming languages? I can't imagine a way for a caller to receive a signal from the callee other than using polling or hardware interrupts.
If you mean async/await in a single threaded event loop, it's like a cooperative multitasking os: under the hood the asynchronous functions have to explicitly cause execution of the event loop to resume at await statements by returning or whatever.

mystes fucked around with this message at 15:57 on Jan 17, 2019

luchadornado
Oct 7, 2004

A boombox is not a toy!

mekkanare posted:

Could somebody recommend some reading on how asynchronicity is achieved by programming languages? I can't imagine a way for a caller to receive a signal from the callee other than using polling or hardware interrupts.

https://pragprog.com/book/pb7con/seven-concurrency-models-in-seven-weeks and then look at implementations on top like someone suggested with python's asyncio stuff

Vanadium
Jan 8, 2005

Assuming this is about async/await kinda stuff:

For C# specifically https://blogs.msdn.microsoft.com/ericlippert/2011/10/03/async-articles/ might be interesting.

I found the "long series from earlier this year" linked there pretty enlightening even as a non-C# person.

In practice it's usually like "we actually just return really early, but arrange for some work to happen in the background (using threads or an existing IO loop or...) and later the caller has to go there and ask for the result". Like, very low on magic in the sense of interrupts or OS tricks, but some language-level magic and library/runtime conventions to make it look just like normal control flow.

Vanadium fucked around with this message at 17:02 on Jan 17, 2019

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


Vanadium posted:

In practice it's usually like "we actually just return really early, but arrange for some work to happen in the background (using threads or an existing IO loop or...) and later the caller has to go there and ask for the result". Like, very low on magic in the sense of interrupts or OS tricks, but some language-level magic and library/runtime conventions to make it look just like normal control flow.

Crucially you also get callbacks or at least some form of intelligent locking (await), which lets you know when to continue with the result.

Otherwise it would not be very different from plain mutexes.

mekkanare
Sep 12, 2008
We have detected you are using ad blocking software.

Please add us to your whitelist to view this content.

Sweeper posted:

like reading about an event loop? signals and callbacks, you can find the python impl on github (Lib/asyncio/unix_events.py) it isn’t overly complicated. the kj concurrency library used for capn proto also has an event loop and promises you could look at

I believe this is what I was asking about. I briefly looked at the source code, but can go over it better later. Thank you.

mystes posted:

If you mean async/await in a single threaded event loop, it's like a cooperative multitasking os: under the hood the asynchronous functions have to explicitly cause execution of the event loop to resume at await statements by returning or whatever.

Okay, that makes some more sense.

Helicity posted:

https://pragprog.com/book/pb7con/seven-concurrency-models-in-seven-weeks and then look at implementations on top like someone suggested with python's asyncio stuff

I will definitely look at this when I am not at work, thank you.

Vanadium posted:

Assuming this is about async/await kinda stuff:

For C# specifically https://blogs.msdn.microsoft.com/ericlippert/2011/10/03/async-articles/ might be interesting.

I found the "long series from earlier this year" linked there pretty enlightening even as a non-C# person.

In practice it's usually like "we actually just return really early, but arrange for some work to happen in the background (using threads or an existing IO loop or...) and later the caller has to go there and ask for the result". Like, very low on magic in the sense of interrupts or OS tricks, but some language-level magic and library/runtime conventions to make it look just like normal control flow.

Thanks, I will also look at this when I can.


I realize my question was very vague, so I apologize! Like I stated earlier, I don't have a clue on how async/awaits are implemented other than imagining some software equivalent of an IRQ.

mystes
May 31, 2006

The other thing that's useful to know is that await can be thought of as syntactic sugar for a callback.
(in javascriptish pseudo code)
code:
x = await y();
//code
=
code:
y().then(function (x) {
//code
});
If you keep this in mind and know whether you're using an event loop or threads, you can pretty much reason your way through most of the important details.

gonadic io
Feb 16, 2011

>>=

mystes posted:

The other thing that's useful to know is that await can be thought of as syntactic sugar for a callback.
code:
x = await y();
//code
=
code:
y(function (x) {
//code
});
If you keep this and mind and know whether you're using an event loop or threads, you can pretty much reason your way through most of the important details.

same but monads

(which is why async and future and all that are examples of monads)

mystes
May 31, 2006

gonadic io posted:

same but monads

(which is why async and future and all that are examples of monads)
Yes it's very cool and I think this really proves how awesome monads are but I think that if I just wrote "it's just a monadic bind, duh" that might not go over well.

Aramoro
Jun 1, 2012




Has anyone made a drag and drop Angular/Bootstrap 4 layout? Basically I have some forms all laid out with Bootstrap all working great. What's wanted is a way to restructure the bootstrap layout, resize the container, move them around etc. Just wondering if anyone knows of any good libs for this. I've seen a few libs like GridStack which seem good but they're more for something which is always editable, this is for a form designer, someone makes the layout and everyone else gets it. It's not particularly difficult but it's just for a PoC so I don't want to spend time on it if something already exists.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Aramoro posted:

Has anyone made a drag and drop Angular/Bootstrap 4 layout? Basically I have some forms all laid out with Bootstrap all working great. What's wanted is a way to restructure the bootstrap layout, resize the container, move them around etc. Just wondering if anyone knows of any good libs for this. I've seen a few libs like GridStack which seem good but they're more for something which is always editable, this is for a form designer, someone makes the layout and everyone else gets it. It's not particularly difficult but it's just for a PoC so I don't want to spend time on it if something already exists.

i dont have an answer for you but you'll probably get better responses in the terrible programmer thread
https://forums.somethingawful.com/showthread.php?threadid=3863535

Notorious b.s.d.
Jan 25, 2003

by Reene

DONT THREAD ON ME posted:

i dont have an answer for you but you'll probably get better responses in the terrible programmer thread
https://forums.somethingawful.com/showthread.php?threadid=3863535

:iceburn:

cinci zoo sniper
Mar 15, 2013





tbf it’s any programming thread because this thread just holds academic seminars on maven

redleader
Aug 18, 2005

Engage according to operational parameters
monads

Soricidus
Oct 21, 2010
freedom-hating statist shill

your mom's a monoid in the category of endomorphs

Aramoro
Jun 1, 2012




DONT THREAD ON ME posted:

i dont have an answer for you but you'll probably get better responses in the terrible programmer thread
https://forums.somethingawful.com/showthread.php?threadid=3863535

Wasn't sure where people ask things like that. Doesn't matter now, I threw something together with Dragula and maths.

Cybernetic Vermin
Apr 18, 2005

Aramoro posted:

Has anyone made a drag and drop Angular/Bootstrap 4 layout? Basically I have some forms all laid out with Bootstrap all working great. What's wanted is a way to restructure the bootstrap layout, resize the container, move them around etc. Just wondering if anyone knows of any good libs for this. I've seen a few libs like GridStack which seem good but they're more for something which is always editable, this is for a form designer, someone makes the layout and everyone else gets it. It's not particularly difficult but it's just for a PoC so I don't want to spend time on it if something already exists.

it is really weird that the web hasn't been dominated by some modern-day delphi equivalent yet, a ton of poking about in extremely low-level layout stuff still going on in every little app (and then having to poke it around twice as browsers differ and/or break)

Aramoro
Jun 1, 2012




Cybernetic Vermin posted:

it is really weird that the web hasn't been dominated by some modern-day delphi equivalent yet, a ton of poking about in extremely low-level layout stuff still going on in every little app (and then having to poke it around twice as browsers differ and/or break)

It is wierd, like what I'm doing feel like something loads of other people must have done before. Editing and saving a bootstrap layout.

Zlodo
Nov 25, 2006

Cybernetic Vermin posted:

extremely low-level layout stuff

the dom and css are not low level at all
what they are is super inadequate for what they are used for nowadays, forcing people to build gigantic piles of poo poo on top of them to create a completely different high level framework

the web is a huge case of https://en.wikipedia.org/wiki/Abstraction_inversion

Cybernetic Vermin
Apr 18, 2005

Zlodo posted:

the dom and css are not low level at all
what they are is super inadequate for what they are used for nowadays, forcing people to build gigantic piles of poo poo on top of them to create a completely different high level framework

the web is a huge case of https://en.wikipedia.org/wiki/Abstraction_inversion

true true, the actual interaction tends to be a very low-level-seeming experience, but it is not really accurate to call the design low-level. the core point stands unchanged otherwise though

Maximum Leader
Dec 5, 2014

Cybernetic Vermin posted:

it is really weird that the web hasn't been dominated by some modern-day delphi equivalent yet, a ton of poking about in extremely low-level layout stuff still going on in every little app (and then having to poke it around twice as browsers differ and/or break)

i know nothing about delphi but for drag and drop webdev you kind of have things like wordpress and drupal right?

NihilCredo
Jun 6, 2011

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

Cybernetic Vermin posted:

it is really weird that the web hasn't been dominated by some modern-day delphi equivalent yet, a ton of poking about in extremely low-level layout stuff still going on in every little app (and then having to poke it around twice as browsers differ and/or break)

don't worry, the future past is here

Aramoro
Jun 1, 2012




NihilCredo posted:

don't worry, the future past is here

Thanks! I hate it.

fritz
Jul 26, 2003

Aramoro posted:

I threw something together with Dragula and maths.

and SMASH through the stack with my

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

NihilCredo posted:

don't worry, the future past is here

oh man i love
RangeError: bad Memory initial size

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
that version of calc.exe uses 1.5GB. and constantly swapping.

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