Profile

Cover photo
Łukasz Rekucki (lqc)
Works at Syncron
Attended Uniwersytet Warszawski
15,573 views
AboutPostsPhotosVideos

Stream

Łukasz Rekucki

Shared publicly  - 
 
Please don't hurt the @. While function composition (f @ g) maybe isn't that popular, but it's consistent with the current use of @ in the language. Operator meaning shouldn't depend on context that much unless Python 3 wants to become the true Perl 6.
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
From Python Insider:

"Christian Heimes announces the release of his defusedxml package to address XML-related security issues which were reported to security@python.org over the last several months. Throughout the development of the patches, the security team has coordinated with other open source projects in order to make this announcement at 1500 UTC on Tuesday February 19."

Looks like someone pressed the button a bit too early and RSS is not very forgiving ;) Anyway, this is a much needed addition to the Python eco-system.
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
People complain that WebKit will doom us all, because there are 5yo simple bugs no one fixes and JS frameworks have to work around them. 

This just in: EVERY widely used opensource project I've seen has those kind of bugs. Here is a PITA of the day for me: https://bugzilla.mozilla.org/show_bug.cgi?id=195361 (:s/Composer/User/).
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
Most Java and C++ programmers that come to Python are shocked about the lack of private/protected modifiers on fields and methods. And it's pretty hard to convince them that it's actually a feature, it doesn't hurt maintainability of large codebase and actually makes you think more about the API of your classes.

Today I learned a small trick (it was available since Java 1.2, I just didn't notice it) that makes this "protection" in Java even more worthless:

 Field f = bar.getClass().getDeclaredField("private_value");
 f.setAccessible(true);
 f.get(bar) // you can now read
 f.set(bar, 3) // and write the private attribute

And it's actually a feature that's used a lot: in unit testing frameworks, in serialization, etc. The only difference is that you have to go all the way through Reflection API which is terribly slow.
1
Krzysztof Figaj's profile photoFlorian Apolloner's profile photo
2 comments
 
Because people does not understand that the only person they have to protect by "private" is them :P 
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
Crappy Java Package of the Week

Intro

Recently, I employed myself as a Java developer. Mostly out of curiosity and  to try out something different ('new' would probably be the wrong word here). So the first thought when someone hears Java is most likely Enterprise. There really is not much anything else (Android is a completely different story). And considering that it's so widely used for such a long time, with so many detailed specs you would expect an abundance of good software libraries. Yeah, right...

Part I: RichFaces, SAC and CSSParser

When developing on the web sooner or later you'll need some way to process CSS files. "Simple API for CSS" - sounds great! It's modeled after SAX, not my favorite way to process data, but ok.

So RichFaces uses that for their ECSS - CSS, but you can embed expressions inside properties. Well, we have SCSS and LESS for some time now, but I assume that when they started the version 4 rewrite it wasn't availble yet.

But then comes the SAC implementation: CSSParser. It advertises itself as a CSS2 parser... ok, so let's try parsing:

@font-face{
   /* some stuff */
}

a {
  -webkit-text-shadow: blue;
  text-shadow: blue;
}

Well, that's not CSS2 stricly speaking, but even old browsers don't have trouble parsing it and just ignore the parts they don't understand - that's how CSS is meant to work. It turns out CSSParser does exactly that - it ignored the whole rule (not raised an error, ignored). Not very useful for a processing tool.

But maybe it's a bug. So I check for the latest version: mine is 0.9.5, repo has 0.9.7 (released this year) and the release notes say it now uses a CSS2.1 parser by default. Silly me I just didn't use the right parser, right?

WRONG!

Sadly, the @font-face rule was removed from CSS2.1 spec (it's now a part of CSS3), so the people implementing the parser decided to ignore that rule from now on. How useful (not to mention backwards compatible).

Thus, I'm left with a choice between a parser that ignores properties starting with "-" and a one that ignores @font-face.

I don't really believe anyone would seriously consider any of this a feature. If I  wanted a CSS validator I would use a one. A CSS processing tool should handle as much as possible and, for sanity's sake, never silently ignore anything! My hope now rests in http://code.google.com/p/phloc-css/.
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
WTF?! Seriously?

There's a ton of way this could be integrated into other Google Products, but instead of actually making something better, they shut it down?

#savegooglereader  
 
Google Reader is going down. Download your subscriptions before it's too late.

http://googlereader.blogspot.com/2013/03/powering-down-google-reader.html
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
https://github.com/c2nes/javalang/blob/master/javalang/parser.py

First Impression: awesome!
Second impression: "Wow! The lexer and parser aren't auto-generated." 
Third impression: "... and they have no unit tests... :(("
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
Q: "I have this image with HTML in it. How do scrape the question out of it with regular expressions?"
1
Robert King's profile photo
 
lol i had to fix <div>text</footer> this morning ;-)
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
 
The people who need to hear this aren't listening: Every time you say, 'rockstar/ninja' to a developer, the developer dies a little inside.
1
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
WTF?! ... I mean... I ... eh...
4
Krzysztof Figaj's profile photo
 
nice :)
Add a comment...

Łukasz Rekucki

Shared publicly  - 
 
iPhone 5 now with LTE! Lawsuit coming in 3, 2, 1...
1
Add a comment...
Work
Occupation
Web Developer
Employment
  • Syncron
    Front-end Developer, 2012 - present
  • Smartupz
    Tech Lead, 2010 - 2012
  • TLS
    C/Python Programmer
  • Fundacja Nowoczesna Polska
    Django Developer
Basic Information
Gender
Male
Relationship
Married
Other names
LQC
Education
  • Uniwersytet Warszawski
    Computer Science / Mathematics, 2005 - 2011
  • V LO im. Ks. Józefa Poniatowskiego
  • Szkoła podstawowa nr 289