Profile

Cover photo
Lex Spoon
Works at Semmle
Attended Clemson University
608 followers|93,199 views
AboutPostsPhotosYouTubeReviews

Stream

Lex Spoon

Shared publicly  - 
 
+1. As can be seen in the comments, it's hard to think of a language nowadays that doesn't have multi-line string literals.
2
Ray Cromwell's profile photoJan Mercl's profile photo
2 comments
 
Java programmers are above average paid for a reason. #notajavacoder
Add a comment...

Lex Spoon

Shared publicly  - 
 
Standard build rules for C are unreliable
The standard way of integrating C into a build system is to use automatic dependencies generated from the compiler . Gcc and Clang can emit a list of the header files they read if you run them with the -M option. Visual Studio can do it as well, using the /...
The standard way of integrating C into a build system is to use automatic dependencies generated from the compiler. Gcc and Clang can emit a list of the header files they read if you run them with the -M option. Visual Studio...
1
Add a comment...

Lex Spoon

Shared publicly  - 
 
I used to say this, and I even started converting machines over. Nowadays I'm not so sure.

As Brad says, the sysadmin costs are not just heavy, but error-prone. There's a new risk factor that you will lose data by botching a command somewhere.

Moreover, some of the best ways to improve the sysadmin costs involve making the system no longer be explicitly RAIDed. In particular, you get most of the advantage if you have a RAID inside the drive package, rather than having five separate drive packages that are all independently plugged in. To the extent higher reliability drives become important, I would think the place to start is by buying higher quality drives that have internal redundancy of various kinds.

An additional complication is that you only benefit from the error recovery if you have procedures in place to notice the failure and do something about it. Both the noticing, and the doing something about it, are something a lot of people are not going to bother with in a lot of contexts.

The main issue, though, is that in most cases, drive failure isn't even the biggest source of risk for data loss. It's much more likely that you will issue a stray delete command than that your SSD will fail at the wrong time! To defend against this more likely case, you end up wanting some sort of distributed backup system, such as Gmail for your email, or GitHub for your source code. Once you do that, though, you already have such a good data protection system that you no longer gain much benefit by RAIDing your local storage.

On the flip side, RAID remains excellent for performance. If you want to make your Witcher 3 levels load faster, then RAID could help you.

1
Add a comment...

Lex Spoon

Shared publicly  - 
 
Two little things I wish Java would add
When geeking out about language design, it's tempting to focus on the things that require learning something new to even understand how it works. SAM types require understanding target typing, and type members require understanding path-dependent types. Fun...
When geeking out about language design, it's tempting to focus on the things that require learning something new to even understand how it works. SAM types require understanding target typing, and type members require underst...
3
Mitch Blevins's profile photo
 
Yup, both of those. Plus string interpolation.
Add a comment...

Lex Spoon

Shared publicly  - 
 
It's a familiar effect. In every conference I've gone to--program analysis, optimization, development tool--every single paper advertises that the documented technique was successful. People steeped in academia could be forgiven if they observe this and think that the rest of the world is just uneducated that all these goodies would not be picked up. Then again, people steeped in academia know full well the kind of shenanigans that go on, so they might be even more cynical than I imagine, and just play the game anyway.

As a familiar example from my world, people working toward a static analysis paper almost always modify the analysis algorithm for a particular code base being studied, and then report the final results on the improved algorithm. You can almost always make an algorithm look really good under conditions like that.

It must be really cheery to live in that world. Every day you come into the office, and in every direction, all that you survey and all that you read about is working great. 11/10--exceeds expectations!
This year's Economic Report of the President has a chapter on improving outcomes for disadvantaged children. It surveys the literature and finds that, in short, everything works. There is not a sin...
3
Aaron Novstrup's profile photoLex Spoon's profile photo
2 comments
 
Ah, well, I have a more easy-going view of it all nowadays. Everyone who is seriously involved in technology growth just doesn't do anything like the academic peer-review process. There's no obvious value to it and lots and lots of obvious problems with it, so they just don't do it.

Meanwhile, schools are just wonderful institutions. How could I not like them? And if professors want to further their own development, and go to conferences to compare notes? Again, that's great. All that said, I no longer like the glamorized version of academic research that I grew up with, any more than I like the glamorized view of real-world journalism that doesn't even seem like an approximation of the real world. It seems better to try and understand what real people are up to than to persist with these pretty myths.
Add a comment...

Lex Spoon

Shared publicly  - 
 
It's curious that being fixed-width (meaning 16-bit) was a defining characteristic of Unicode during its formative decade or so. Nowadays Unicode is not fixed-width in any sense; the 16-bit version has surrogate characters, the 8-bit version has taken over as an interchange format, and the 8-bit format even has a strong showing as an in-memory format. As well, the combining marks are an even deeper violation of the fixed-width principle. It seems like we have exactly the horror that the earlier designers said they were going to fix for everyone.

It's just mind-bending to write correct Unicode-processing code if you worry about surrogates, local-specific comparison, and combining marks. I yearn for a simplified Unicode that can't do everything but that does have standard character codes for most of the world's languages. Computer software processes text all over the place, and it's unfortunate if you have to choose between 7-bit ASCII and a format that feels like a word processor's internals.
Early Years of Unicode. The Unicode® Standard "…begin at 0 and add the next character". Antecedents and The First Year - 1988. The concept of a 16-bit universal code was not new. Even the original 1984 principles of the ISO multi-byte character encoding are directed to that end: ...
1
Brian Slesinsky's profile photoDominic Mitchell's profile photoLex Spoon's profile photo
3 comments
 
I agree UTF8 is awesome. I find combining marks pretty miserable. So I don't simplistically mean that Unicode should have stuck to the fixed-width idea. I just thought it an interesting historical quirk that fixed-width was such a defining characteristic of Unicode compared to its competitors, only to be immediately abandoned by the team that codified Unicode 1.0.
Add a comment...
Have him in circles
608 people
Sunco Tanning Beds's profile photo
Chris Dryden's profile photo
SP Coast Division's profile photo
Clint Yang's profile photo
Margaret Leber's profile photo
rekeeg C's profile photo
Michael Slinn's profile photo
Seth Tisue's profile photo
Dallas Johnson's profile photo

Lex Spoon

Shared publicly  - 
 
Fun to see it announced.
Programming in Scala, Third Edition, updated to Scala 2.12 (ahead of Scala even) is now in stock and ready to ship! http://www.artima.com/forums/flat.jsp?forum=270&thread=381435 … 12:05 PM - 4 May 2016. 33 Retweets42 Likes. Reply to @bvenners ...
2
Add a comment...

Lex Spoon

Shared publicly  - 
 
Supporting C in a build system
In a previous post, I showed that the standard build rules for C code are unreliable . Let me describe two ways to do better. In the interest of brevity, I will describe the build rules using a toy build engine called Blcache (short for "build cache"). I in...
In a previous post, I showed that the standard build rules for C code are unreliable. Let me describe two ways to do better. In the interest of brevity, I will describe the build rules using a toy build engine called Blcache ...
1
Brian Slesinsky's profile photoLex Spoon's profile photo
2 comments
 
Ah, so it does. Fixed.
Add a comment...

Lex Spoon

Shared publicly  - 
 
Aside from the immediate problem of long paths being discussed here, it's not good for a module system to mix multiple versions of the same module. Instead of trying to do fancy deduplication to reduce the number of versions of each module that exist, I would be tempted to go cold turkey and say that in the next version of NPM, you get one and only one version of each module.
1
Philippe Lhoste's profile photoLex Spoon's profile photo
2 comments
 
Yes, the conflicts have to be solved somewhere. I believe a major factor in which systems this is easy to do in, and which ones it's crazy hard and never really adequately solved anyway, is whether or not your system includes some kind of "distribution" in it. Distributions serve the important role of helping developers understand which compatibility problems are important to solve; if you look at any given compatibility problem (so could I make this thing work with Lodash 4?), it's usually not too hard.
Add a comment...

Lex Spoon

Shared publicly  - 
 
This will be nice for Semmle if it works as advertized. Aside from the general benefits of compatibility (we can design for Linux and then port), Bash in particular is just a reasonable scripting language. Cmd.exe is not.
2
Brian Slesinsky's profile photoLex Spoon's profile photo
2 comments
 
The main trouble with Powershell is it's Windows specific, so at least for us, it's never been a tempting implementation language for anything. The code samples I've seen online do look nice, though. I'm sure if you write native Windows apps all day, you would find Powershell very tempting and use it all the time.

Also, if by "script" you mean reading in text files, putting them in dictionaries, and running simple computations across them, then Bash is terrible and Python is awesome. Probably Ruby and Lua as well; I just haven't used them much.

There's a certain kind of scripting, though, where you run commands, set optional command-line options, set up configuration files using string replacement, and other CLI kind of things. For those, Bash seems really nice, at least in my experience.
Add a comment...

Lex Spoon

Shared publicly  - 
 
"More or less ACID compliant". That tickles me more than it should. In fairness, the authors are probably just more honest than most.
Features. Small, ~100KB .jar file with no dependencies. Top level API similar to working with any Map on to of core index. Thread safe and write locking over multiple JVMs using extended Lucene locks. Optionally transactional. More or less ACID -compliant.
1
Add a comment...

Lex Spoon

Shared publicly  - 
 
The given input on this question is clearly an abuse of the intended use of Unicode, but there's no clear, standards-supported way to either rule out the bad input or to display it in a sensible way. In fact, the authors of the software in question have made their software worse by dutifully following the standard and doing what it says. Now there are Stackoverflow questions about how to bypass this "help" and force text to act like it's supposed to.

I don't have a full answer, unless it's just "don't allow combining marks, and just live with the limitations". When you interact with computer software, you just have to live with its limitations.
 ·  Translate
1
Add a comment...
People
Have him in circles
608 people
Sunco Tanning Beds's profile photo
Chris Dryden's profile photo
SP Coast Division's profile photo
Clint Yang's profile photo
Margaret Leber's profile photo
rekeeg C's profile photo
Michael Slinn's profile photo
Seth Tisue's profile photo
Dallas Johnson's profile photo
Collections Lex is following
Education
  • Clemson University
  • Georgia Institute of Technology
Story
Tagline
Software engineer at Square
Work
Occupation
software engineer
Employment
  • Semmle
    2012 - present
  • LogicBlox
    2012
  • Google
  • IBM
  • EPFL
Basic Information
Gender
Male
We've always had good experience with Estes, both for repair and for sales. Thanks to Raymond, Patrick, and Jonathan for excellent repairs and installation, and thanks to Chris on sales for telling me what I need to know but skipping any hard-sell tactics.
Public - a year ago
reviewed a year ago
They have excellent pizza and a good selection of beer. Definitely try the "monster slice". It is cooked to order and is accurately named.
Food: ExcellentDecor: GoodService: Excellent
Public - 3 years ago
reviewed 3 years ago
2 reviews
Map
Map
Map