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
Notorious b.s.d.
Jan 25, 2003

by Reene

feedmegin posted:

To be honest, as I understand it it's pretty much expected that if you're a programmer, worldwide, to be any good you've got to know English - at least well enough to read it. Pretty much all the technically references, Stack Overflow, etc etc out there is going to be in English. At that point, having language keywords in English as well (and everyone worldwide being able to instantly understand what they're looking at in anyone else's source) is just kind of the way to go. I could see it being different for something like AppleScript that's supposed to be used by 'the common man' but anything above that? English.

english is not the first global language of science, and it will probably not be the last

however

it amuses me very much to think of far-future programmer-archeologists having to gain some facility with 20th century english to interpret and extend programs from the 22nd century

even if some other tongue eclipses english as the language of science and industry, the ties to software, aviation, and a few other narrow fields are likely to be "sticky"

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

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



rjmccall posted:

lol u loving dambass

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?

Notorious b.s.d. posted:

could have been worse

apple was also working on an english-expr version of lisp, replacing s-exprs (parens) with english syntax

for all of swift / objC's syntax shittiness, nothing sucks as bad as dylan

Dylan wasn’t an English-expression version of Lisp

it was a Pascal-expression version of Lisp

it actually looked OK as that sort of thing but it was really nice as an S-expression language

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?
here’s an example of Dylan from Harlequin’s Dylan Programming book that they wrote in 1997

code:
// See what possible transitions exist, then execute the earliest
// transitions that can be completed
// Returns the time of the last transition
define method process-aircraft
    (airport :: <airport>, #key time = $midnight)
 => (time :: <time-of-day>)
  format-out("Detailed aircraft schedule for ");
  say(airport);
  format-out("\n\n");
  let sky = airport.sky-above;
  let containers-visited = make(<object-table>);
  let active-transitions = make(<sorted-sequence>,
  value-function: earliest-arrival);

  // We do not have to use return as the name of the exit procedure
  block (done)
    while (#t)
      // Each time through, start by considering every container
      fill!(containers-visited, #f);
      // For every container, see if any vehicles are ready to transition
      // If any are, add transition instances to the active-transitions
      // sorted sequence
      generate-new-transitions(sky, active-transitions,
                               containers-visited);

      // If there are no more transitions, we have completed our task
      if (empty?(active-transitions)) done(); end;
      // Find the earliest transition that can complete, because there is
      // still room available in the destination container
      let transition-index
        = find-key(active-transitions,
                   method (transition)
                     available?(transition.transition-aircraft,
                                transition.to-container,
                                transition.transition-aircraft.direction);
                   end);

      // If none can complete, there is a problem with the simulation
      // This situation should never occur, but is useful for debugging
      // incorrect container configurations
      if (transition-index == #f)
        error("Pending transitions but none can complete.");
      end if;

      // Otherwise, the earliest transition that can complete has been
      // found: Execute the transition
      let transition = active-transitions[transition-index];
      let vehicle = transition.transition-aircraft;
      let vehicle-direction = vehicle.direction;
      move-out-vehicle(vehicle, transition.from-container,
                       vehicle-direction);
      move-in-vehicle(vehicle, transition.to-container, vehicle-direction);

      // This transition is complete; remove it from consideration
      transition.pending? := #f;
      remove!(active-transitions, transition);
      // Compute the actual time of arrival at the next container, and
      // display the message
      time := (transition.earliest-arrival := max(time, transition.earliest-arrival));
      say(transition);
      format-out("\n");
    end while;
  end block;
  time;
end method process-aircraft;
it’s a bit wordy but in a similar way to Ada or Pascal

except the actual programming model is very close to the Common Lisp Object System, where you apply generic functions that specialize on all of their arguments

pseudorandom name
May 6, 2007

Notorious b.s.d. posted:

even if some other tongue eclipses english as the language of science and industry, the ties to software, aviation, and a few other narrow fields are likely to be "sticky"

and then one day the interrupt handler driving a critical drive spine sensor will have a buffer overflow and people will die

redleader
Aug 18, 2005

Engage according to operational parameters

Notorious b.s.d. posted:

it's not quite as bad as it sounds, but it ain't good

https://opendylan.org/about/examples/hello_world.html

code:
Module: dylan-user

define library hello
  use io, import: { format-out };
end;

define module hello
  use format-out;
end;

Module: hello

format-out("Hello!\n");

looks a bit elixir-ish imo

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

even the name "dylan" sucks

like "dylan," itself, man, woman, or language, is a metonym for suckiness

counterexample: dylan thomas

Notorious b.s.d.
Jan 25, 2003

by Reene

Soricidus posted:

counterexample: dylan thomas

no I’d say he was the perfect example of the name dylan

possibly the origin of the awfulness

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

rjmccall posted:

lol u loving dambass

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

no I’d say he was the perfect example of the name dylan

possibly the origin of the awfulness

he was a raging drunkard who died before he hit 40. how is that not a perfect role model for us all.

Notorious b.s.d.
Jan 25, 2003

by Reene

Soricidus posted:

he was a raging drunkard who died before he hit 40. how is that not a perfect role model for us all.

if i'mma drink myself to death i'm gonna choose a better bar than dylan thomas did

the white horse tavern is a shithole

edit: the tavern should also be named "dylan" i think

Notorious b.s.d. fucked around with this message at 21:39 on Feb 3, 2018

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

carry on then posted:

are there any languages in production use that have or at least support keywords in various languages?
just use a preprocessor, problme solved


muahahaha

Bored Online
May 25, 2009

We don't need Rome telling us what to do.
dave thomas, however

Stubbs
Oct 24, 2005

for a case where HTTP caching doesn't why not have my entire API over websocket instead of REST?

Sapozhnik
Jan 2, 2005

Nap Ghost

Stubbs posted:

for a case where HTTP caching doesn't why not have my entire API over websocket instead of REST?

1 http request : 1 http response

does that apply to your case too? then you might want to use http.

Stubbs
Oct 24, 2005

nah i'm fine giving up responses as such. instead just have returns probably end up on the incoming stream

not a great deal of load so overhead of open socket connections shouldn't be an issue

AWWNAW
Dec 30, 2008

Stubbs posted:

for a case where HTTP caching doesn't why not have my entire API over websocket instead of REST?

this is dumb as gently caress

tef
May 30, 2004

-> some l-system crap ->

Stubbs posted:

for a case where HTTP caching doesn't why not have my entire API over websocket instead of REST?

- rest isn't a protocol

- you can do rest over websockets

- websocket client/server support is still rubbish in places

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

as someone who has experimented with that a few times I've decided its not worth it.

i kept re-implementing HTTP on top of websockets.

Arcsech
Aug 5, 2008

Stubbs posted:

for a case where HTTP caching doesn't why not have my entire API over websocket instead of REST?

use websockets iff you need your server to be able to send data to the client at arbitrary times and you have enough control of the clients and infrastructure to be able to tell anyone who doesn’t have websocket support to gently caress off

if either of those is not the case, just do http instead of shaving yaks over tcp-over-http-over-tcp

Pryor on Fire
May 14, 2013

they don't know all alien abduction experiences can be explained by people thinking saving private ryan was a documentary

I felt so cool when I "streamed" data to webpages in like 2006 using http push, but 12 years later the w3c is such a joke that this still might be the best option.

Sapozhnik
Jan 2, 2005

Nap Ghost
ws is nice but it is really low level and you're going to end up reinventing http over it

Soricidus
Oct 21, 2010
freedom-hating statist shill
I’m holding out until they make a processor that executes wasm natively

Stubbs
Oct 24, 2005

Sapozhnik posted:

you're going to end up reinventing http over it

a legitimate concern

thoughts came while working on a clients project that essentially provided websocket endpoints to their internal message bus and working with it was nice. consistent APIs everywhere, everything is nicely structured streams.

not for every system but it was interesting to work with

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
you ask "why not" but i have yet to see the "why"

Workaday Wizard
Oct 23, 2009

by Pragmatica
if you want smaller headers and connection multiplexing/reuse just use http/2

Aramoro
Jun 1, 2012




Arcsech posted:

use websockets iff you need your server to be able to send data to the client at arbitrary times and you have enough control of the clients and infrastructure to be able to tell anyone who doesn’t have websocket support to gently caress off

if either of those is not the case, just do http instead of shaving yaks over tcp-over-http-over-tcp

We're looking at implementing WebSockets to do push notifications for our JTAPI integration. That feels like a legitimately good use for it really, might push it to the chat feature as well if that goes well. But then we have control over what infrastructure we support.

that said it's all held up until WebSphere gets proper websockets support or all our WebSphere customers die, I'll take whichever.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

those are both good uses of websockets

Notorious b.s.d.
Jan 25, 2003

by Reene
it's never safe to use websockets without a fallback option, because websockets break badly in the presence of a proxy

since you have to put engineering effort into a fallback, it's often not worth the energy to pursue the websockets version in the first place

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 remember when i first saw that there's a key given with the websocket message that is used to xor the body of a message so that proxies dont see responses that may look like http responses and cache them.

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench

https://twitter.com/computerfact/status/968333338267324417

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
the tweet is about php

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Cut content from Accounting+

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

DELETE CASCADE posted:

the tweet is about php

whats the thing

Carthag Tuek
Oct 15, 2005

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



Gazpacho posted:

whats the thing

coherent design

akadajet
Sep 14, 2003


yeah, php sucks.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
all the comments are saying JS though (the thing is left-pad)

Ator
Oct 1, 2005

this dude is livestreaming common lisp game dev :neckbeard:

https://www.twitch.tv/baggers___

which one of you is this, fess up

jony neuemonic
Nov 13, 2009

Ator posted:

this dude is livestreaming common lisp game dev :neckbeard:

https://www.twitch.tv/baggers___

which one of you is this, fess up

this is really cool, thanks for sharing it. :)

Adbot
ADBOT LOVES YOU

suffix
Jul 27, 2013

Wheeee!
on apl style: https://sway.com/b1pRwmzuGjqB30On

at the same time gave me my first plausible model of an apl mindset and made me like the language less
seems like the epitome of "you don't need any comments, the code should be self explanatory" which is weird when your language gives perl programmers vertigo

quote:

Idioms simplify the name space, because idioms do not require
names. Thus, the implementation of an idea, expressed as code, often serves
as the symbol/name for the functionality itself.


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