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
xtal
Jan 9, 2011

by Fluffdaddy

God of Mischief posted:

Forking the language is a fine solution if the issue is important enough or internal to his company. It is not a fine solution for a minor issue that he wants fixed because it affects other major tools (git/github).

Then those tools will use his fork, or it isn't as big an issue as he thinks it is.

Adbot
ADBOT LOVES YOU

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
code:
// podría arreglar, pero me da flojera!
~1500 line file using global variables everywhere with helpful names like temp and w 
    and heavy reuse of variables for different purposes without further comment

Strong Sauce
Jul 2, 2003

You know I am not really your father.





tef posted:

matz on diversity "let em eat rails girls"

https://twitter.com/yukihiro_matz/status/380394450746216448

"@rubyconf is not a tool to solve our social problem. If the program has no explicit discrimination, let it be. We have RailsGirls instead."

I do not think matz is saying what you are implying he is saying.

It seems he is addressing the "fairness" in how the talks were chosen. That he did not want rubyconf to alter the way they were "blind" picking their speakers. And I think he was trying to say that if too few women were picked via rubyconf, at least railsgirls would address that shortage.

Now whether or not you think the blind picking was fair, as in was there encouragement of people who weren't white and male is a fair argument to pick on. But I don't think matz was trying to argue women should just be relegated to railsgirls to give talks.

See this tweet in followup: https://twitter.com/yukihiro_matz/status/380481952941211648

matz has a pretty good grasp of English, but I don't think 1) that he has a very nuanced command of English and 2) because of that does not choose his words to make sure they can't be misconstrued.

Novo
May 13, 2003

Stercorem pro cerebro habes
Soiled Meat

fritz posted:

The first time I can remember hearing about ruby was in this context: http://geekfeminism.wikia.com/wiki/CouchDB_talk

Ruby had been around for 16 years when this happened, so I think this says more about you and virtually nothing about Ruby.

Toady
Jan 12, 2009

Ruby was little known before 2004.

Amberskin
Dec 22, 2013

We come in peace! Legit!

Sinestro posted:

code:
// podría arreglar, pero me da flojera!
~1500 line file using global variables everywhere with helpful names like temp and w 
    and heavy reuse of variables for different purposes without further comment

Well I would also have "flojera" if I faced the same scenario. The comment was probably added by some poor mantainer who just puked seeing the code.

If this is not the case, the guy deserves to be thrown out the closest window. :getin:

One of the first pieces of crapcode I had to maintain something like 25 years ago was a 90.000 LOC monster, spiced with variables named like "ABCPIC1", "ABCSWITCH5" and similar. Then I had to enjoy trying to understand things like

code:
IF ABCSWITCH1 & ABCSWITCH5 & ¬ABCSWITCH8 THEN DO;
    ABCPIC5 = 3;
    ABCPIC6 = 2;
    ABCSWITCH3 = '0'B
END;
'ABC' stands for the loving name initials of the guy who did the programming. That guy is now the company CTO. So in his case the Dilbert's principle worked wonderfully.

Smugdog Millionaire
Sep 14, 2002

8) Blame Icefrog

Strong Sauce posted:

I do not think matz is saying what you are implying he is saying.

It seems he is addressing the "fairness" in how the talks were chosen. That he did not want rubyconf to alter the way they were "blind" picking their speakers. And I think he was trying to say that if too few women were picked via rubyconf, at least railsgirls would address that shortage.

Now whether or not you think the blind picking was fair, as in was there encouragement of people who weren't white and male is a fair argument to pick on. But I don't think matz was trying to argue women should just be relegated to railsgirls to give talks.

See this tweet in followup: https://twitter.com/yukihiro_matz/status/380481952941211648

matz has a pretty good grasp of English, but I don't think 1) that he has a very nuanced command of English and 2) because of that does not choose his words to make sure they can't be misconstrued.

Why would I read any of this when I can feel outraged & superior instead??

..btt
Mar 26, 2008

Smugdog Millionaire posted:

Why would I read any of this when I can feel outraged & superior instead??

Truly, you have embraced the Ruby philosophy.

fritz
Jul 26, 2003

Novo posted:

Ruby had been around for 16 years when this happened, so I think this says more about you and virtually nothing about Ruby.

I was in Old Industry until a few years ago so I wasn't necessarily hip on all the fashionable things going on out in webland. The ruby programmers I've met since then haven't exactly changed my opinion a whole lot.

tef
May 30, 2004

-> some l-system crap ->

Smugdog Millionaire posted:

Why would I read any of this when I can feel outraged & superior instead??

Although we can interpret the first bit in a number of air quotes, the followup is less damning, but is as easily interpreted one way or the other. it was provided as an example of matz not being so nice.

tef
May 30, 2004

-> some l-system crap ->

..btt posted:

Truly, you have embraced the Ruby philosophy.

Is this, we should be judged as if we are matz but act as if we are dhh?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Judge not, that ye be not dhh

Star War Sex Parrot
Oct 2, 2003

Coworker is taking a data structures class at DeVry and was tasked with taking a deck of cards and cutting it at an arbitrary point. This is like day one of class, so the only structure they're working with is an array of size 52. I'm guessing they just want to see that they can index/loop over arrays correctly, not go out of bounds, etc.

Their instructor gave them a sample implementation that looked fairly terrifying to me: they had a separate function that could be used to rotate each card forward one spot in the array (with the front card moving to the back) so we're already looking at a Θ(n) operation. Then they looped that operation based on the cut point, so I think we're looking at O(n2) — just to cut a drat deck of cards!

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
Maybe it's being used as a precursor to teaching them bubble sort. They will probably revisit the algorithm later to explain why it is bad. Although, I doubt it, since it's a data structures course, and not an algorithms course.

Star War Sex Parrot
Oct 2, 2003

Based on the stuff I've seen him working on for his other classes: I think you're giving DeVry curriculum too much credit.

Also I feel like any data structures course worth its salt needs to spend time discussing algorithm complexity.

NinjaDebugger
Apr 22, 2008


Star War Sex Parrot posted:

Coworker is taking a data structures class at DeVry and was tasked with taking a deck of cards and cutting it at an arbitrary point. This is like day one of class, so the only structure they're working with is an array of size 52. I'm guessing they just want to see that they can index/loop over arrays correctly, not go out of bounds, etc.

Their instructor gave them a sample implementation that looked fairly terrifying to me: they had a separate function that could be used to rotate each card forward one spot in the array (with the front card moving to the back) so we're already looking at a Θ(n) operation. Then they looped that operation based on the cut point, so I think we're looking at O(n2) — just to cut a drat deck of cards!

This sounds very much like how I learned calc in high school. "Mathematicians are lazy, we always have a shortcut. We're gonna do this once the hard way, though, so you know why we have the shortcuts."

It seems like a pretty good jumping off point for introducing structures that do it more effectively.

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
It might not even be other data structures. The trick to doing that problem in constant space is to realise you can make a rotation from three reflections.

NinjaDebugger
Apr 22, 2008


coffeetable posted:

It might not even be other data structures.

It's a data structures class, not algorithms.

Germstore
Oct 17, 2012

A Serious Candidate For a Serious Time
Maybe it's to contrast between an array and a linked list. It would be a reasonable way to do it with a linked list.

shrughes
Oct 11, 2008

(call/cc call/cc)

NinjaDebugger posted:

It's a data structures class, not algorithms.

It's not like data structures is a separate subject from algorithms.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

That reminds me of the fun I had with Behdad Esfahbod of Gnome when they changed VTE to send random amounts of keypresses on the mouse scroll wheel, based on trying to guess what the program using it would do with uparrow.

https://bugzilla.gnome.org/show_bug.cgi?id=518405

Now, imagine what a random number of uparrow/downarrow keys do to incredibly uncommon things to be running in a terminal window, such as bash.

6 years then wrongly closed as a duplicate of an unrelated bug. I still maintain the out-of-tree patch that squashes the broken behavior because every loving terminal emulator aside from stock xterm uses libvte.

Edit: I feel like I may have linked this one here before, so I'll share an old horror story involving code.

Years ago I worked at a company that bought a biometrics company based on their "unique algorithm." Prior to purchase I was asked to validate that their code in fact worked - it did, although my builds didn't work as well as theirs did for some reason. Since I was new, my worries were glossed over by the incoming "head of biometrics" (A third party, not part of the company being bought) who had a weasel-explanation for it involving magic buildservers that would get brought over.

Fast forward a year, we've been fighting to get this stuff to work (but the binary DLLs do work) and I finally get my export-controlled copy of the NIST biometric matching algorithms... and boy do they look familiar. The code I got from the now-purchased company was exactly the same - except with all the copyright stripped off and replaced. With that revelation came another - the "magic build server" that never showed up was, shockingly, imaginary. The working binary-libraries were actually a competitor's code with the licensing cracked. And the kicker, as everything went into liquidation? The head of biometrics wasn't actually a third party, he had setup the the deception in the first place. He even got out with the good monitors before the building was locked down.

Good times.

Harik fucked around with this message at 01:25 on May 9, 2014

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The answer is that terminals are non-standard and all terrible. We're emulating a piece of hardware made over 40 years ago that doesn't have a mouse, let alone one with a scrollwheel.

It's non-standard what PgUp / PgDown will do, and same with Up / Down. I think vte is doing as good a job as it can, here.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Suspicious Dish posted:

The answer is that terminals are non-standard and all terrible. We're emulating a piece of hardware made over 40 years ago that doesn't have a mouse, let alone one with a scrollwheel.

It's non-standard what PgUp / PgDown will do, and same with Up / Down. I think vte is doing as good a job as it can, here.

Yeah, that's the argument, but it's not very good - look through the use cases and there's none in which multiple arrow-keys are better than a single pageup/pagedown key, and in many they're significantly wrong. If a program implements scrolling at all, both will work, and the only "advantage" is that the terminal dictates how far it scrolls. In programs that don't do scrolling, but do have commandlines (I.E. shells) arrow keys are absolutely the wrong thing to use, and pageup/pagedown are correctly ignored. On a text-based list (email/usenet/whatever) scrolling and navigation are different concepts, and using the scrollwheel to move the selection is completely foreign to every other user-interface.

I think the only time it has the appropriate behavior is in a pager like less. That's not a strong argument.

You're right in that terminals are awful - I deal with them constantly. I just went with what felt like the least-worst solution, and Behdad went with one that had the benefit of being pedantically correct in the single use-case that could achieve partial-page based scroll.

I'm also a fan of "Buy new hardware". Middle-mouse-paste is already an abomination, way to make it 100x more awful guys.

Harik fucked around with this message at 01:34 on May 9, 2014

JawnV6
Jul 4, 2004

So hot ...
Middle mouse paste is something every window manager should aspire to enable.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

JawnV6 posted:

Middle mouse paste is something every window manager should aspire to enable.

Window managers have nothing to do with it.

JawnV6
Jul 4, 2004

So hot ...
Ok.

Zombywuf
Mar 29, 2008

My terminal just scrolls its contents on buttons 4 and 5. No matter what is running in them.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Zombywuf posted:

My terminal just scrolls its contents on buttons 4 and 5. No matter what is running in them.

Try screen. The code in question is active when "alternate screen" mode is enabled.

Zombywuf
Mar 29, 2008

Harik posted:

Try screen. The code in question is active when "alternate screen" mode is enabled.

Well I haven't got around to installing the latest version of screen that actually supports rxvt-unicode-256color, but when I gently caress with $TERM to make screen work it still scrolls the scrollback, which has interesting results in screen.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Zombywuf posted:

Well I haven't got around to installing the latest version of screen that actually supports rxvt-unicode-256color, but when I gently caress with $TERM to make screen work it still scrolls the scrollback, which has interesting results in screen.

Yeah it hasn't kicked into alternate mode until it needs to. I think jumping into screen history and scrolling around there a bit will do it, or run something like vim inside screen?

I used to know exactly where in my workflow everything went wrong but I've long since forotten. I got bit by it 6 years ago, made a patch, then grumble and build-from-source every time my distro updates VTE ever since.

Oh, rxvt? Looks like they rolled their own, it doesn't depend on gnome vte. I may switch but all terminals are awful and better the devil you know...

Zombywuf
Mar 29, 2008

Harik posted:

Oh, rxvt? Looks like they rolled their own, it doesn't depend on gnome vte. I may switch but all terminals are awful and better the devil you know...

rxvt has support for searching the scrollback :-) Go on, you know you want to.

I'm pretty sure it pre-dates Gnome Terminal by a long way.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
I'm always sort of amused by the fact that OS X has better terminal emulators than Linux.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Plorkyeran posted:

I'm always sort of amused by the fact that OS X has better terminal emulators than Linux.

Speaking of coding horrors: if you restart your computer with Terminal.app open, it'll open back up after the reboot with the windows in the same place, same size, with the contents of the terminal window as you left it...

Except the contents are an illusion and you're dumped in a fresh terminal. Doesn't restore your pwd, history, anything.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
Coding horror: using Terminal.app

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
It does preserve the directory you were in, but the other stuff kinda sucks.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Plorkyeran posted:

I'm always sort of amused by the fact that OS X has better terminal emulators than Linux.

Because everyone came from years of good terminal emulators on unix to the godawful early Terminal.app, so they wrote their own. Lots of them! A few good ones stuck around.

I mostly kid, but I did spend nearly a year on OSX and just couldn't get used to it, ended up going back to Linux.

Anyway, I tried rxvt-unicode but it can't handle (╯°□°)╯︵ ┻━┻ properly, and as an IRC native that just wouldn't do.

Also the font-support is weird, if I specified multiple fonts it put them in huge boxes:
code:
l e a d i n g     t o    l i n e s   l i k e   t h i s .
And although terminal emulation is a horror (have you ever looked at the source?) there's probably a better thread for it so I'll take my bitching there. :)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Terminal emulators are always going to suck, no matter which ones they are. The VT103 state machine is a terrible mess, and apps abuse the hell out of it in weird ways. The majority of apps only work because some terminal emulator has X weird feature.

There's no standard for proper Unicode support in terminals. The "grid of characters cells" approach to terminal layout is just incompatible with Unicode, actually.

pseudorandom name
May 6, 2007

The grid of character cells isn't the problem, its the pervasive (wrong) assumption that 1 byte = 1 code point = 1 glyph.

Coffee Mugshot
Jun 26, 2010

by Lowtax
http://cpprocks.com/what-if-c-looked-more-like-python-or-coffeescript/

As a person who likes to write C/C++, Python, and Coffeescript, I am deeply offended.

Adbot
ADBOT LOVES YOU

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I'm pretty offended when people say "minimal syntax" but mean "an ambiguous and ad hoc grammar that doesn't use curly braces or semicolons to appease my OCD".

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