« first day (900 days earlier)      last day (4063 days later) » 
00:00 - 20:0020:00 - 00:00

12:21 AM
Anyone here encountered issues with pickle issues on python 2.6
1
Q: Pickle doesn't take my registered custom type reduce function into account on python 2.6

Simon CharetteGiven the following code: import pickle import copy_reg class A(type): pass class B(object): __metaclass__ = A def _reduce_a(a): print('Hey there') return a.__name__ copy_reg.pickle(A, _reduce_a) pickle.dumps(B) The registered _reduce_a function is never called on pyth...

 
12:41 AM
sup guys i need some help!
 
homework!
 
how would i implement this n1 =[]

puatat corners
----------------
n2=[][]
[][]
put at corners
put n1 at mid
----------------
n3=[][] [][]
[][] [][]
[]
[][] [][]
[][] [][]
n1=n2
n2=n3
----------------
nn=
n3 at corners
n2 at mid
 
1:25 AM
Hmm...
 
@Berzerker What's a SMAL Hawk program? Google wants me to change my search to small hawks :P
 
 
1 hour later…
2:51 AM
Yo guys, my removable hard drive is starting to make a whistling sound.
Well, it looks like I just got myself a new paperweight.
 
 
3 hours later…
5:32 AM
 
@Tshepang you changed your profile pic as well? :)
 
:)
 
Must be spring or something...
Looking at that post it also misses out 15k and 20k users... ;)
 
wasn't aware of the 15k user privilege: stackoverflow.com/privileges/protect-questions
 
It's pretty useless ;)
 
5:41 AM
a rare enough occurence?
 
normally the people that answer those questions, it's their first answer - so it normally gets deleted via the first posts queue anyway...
So - only if that seems to be happening is it worth doing that
2k, 3k, 10k and 20k are really the only useful reps...
 
@Tshepang sorry, I meant I wasn't aware there was a 15k privilege
@JonClements I expect to see a whole bunch of tools when I reach 10k
except I really don't wanna see deleted Qs... ugly
 
Don't get your hopes up too high on the 10k :) It's not that great ;)
 
I am not so far from reaching it on Unix & Linux; I keep getting rep from my old questions (and some answers) there.
 
6:02 AM
yeah - I notice I keep getting the odd 10 here and there even when I'm not online - kinda nice
Your new avatar is taking some time to get use to...
 
6:51 AM
Spring cleaning. :) New avatars. Feels like I am in a new place.
 
You're bucking the trend though @InbarRose? :P
 
I suppose, if I ever used that term.
HAHA
yes, this is a duplicate, almost every question about dict has been asked already — jamylak 11 mins ago
 
7:44 AM
!@JonClements
@takashi88 It's generally received well if the person asking the question has shown some effort of tackling the problem theirselves, or asks a specific question which doesn't read as trying to solicit an answer... — Jon Clements 9 mins ago
:)
 
well - I liked the word soliciting - and couldn't stand to let it go ;)
 
we all have our own fetish words ;)
(and morning you lot)
 
7:59 AM
@JonClements Did you ever write that thing you were going to write?
 
Can't remember now. But mobile at the moment so bit difficult to check
Actually this mobile site isn't too bad. Now only if I could find a back tick key...
Morning @bas
 
8:19 AM
oh think it does
W00t
 
reading people ask python questions is a great way to hear about novel packages/libraries :P
(well, novel to me)
 
Anyone here really good with GIT ?
 
@inbar using it or breaking it?
 
8:42 AM
Using.
I found what I needed.
Nevermind. :)
 
8:54 AM
Ahh... had you said breaking I could have helped ;-)
 
I have enough of that without help.
 
either of you worked with SciPy integration?
I'm wondering if it's possible to retrieve the actual sinusoid interpolant function
to 'plot' the shape that was used to calculate area next to the 'actual' data
(in a simpson integration)
 
9:19 AM
moinmoin
 
hey colin
 
do you never sleep Bas?
 
hmmm, occasionaly
i tend to leave this chat open (forgotten) when i go home tho
 
make sense
^^
 
fun task this morning, reading stuff on 3d interpolation and surface plotting (SciPy and MatPlotLib)
it seems like an amazing toy
errr... 'tool'
 
9:33 AM
yeah, it is
 
im just wondering if it would be smarter to first transform my data to a true grid and do a surfacemesh or perform a spline on my data and plot a set of splines
ill try both and see what i like better ;)
also a good excercise
 
definitive
 
confused look what's definitive?
in this context
 
I mean, that I agree you. It's a good excercise.
 
ahhh ok :P
 
10:15 AM
well trying to make a surface out of a set of splines doesn't work
and i should have expected that
they are quite smooth in 1 'dimension' but in another dimension they are not performs homer DOH motion
 
there exists better ways and libraries to create 3D surfaces or rooms instead of plotting by matlib ;)
 
name?
as my data is currently in [ (x, [ (y,z)] ) ]
format
or link :P
 
well, 3D Libraries like Panda3D or the python port of Ogre3D?
 
which would you suggest?
 
but if you only want to plot diagrams ... then matplotlib is a good choice
 
10:25 AM
as i never did anything like this before
no i want to show a 3d representation of measurement space (after smoothing)
 
what to you want to do with the result?
ah okay ^^
 
actually not smoothing
 
well
I would do that in Panda3d
 
i calculate the area under a 'peak' via simpson
and i want to visualize how that would look in 3d
so 3d interpolation and than show
 
my recommandation: panda3d
 
10:26 AM
aight, off to go read on that
 
though it's a game engine, you can do all kind of 3D stuff with that
of course: visualizing analytics
 
first thign that kept popping up was game engine so i was like huh?
:P
 
hehe, yeah
I started several years ago with Panda3D -> aim was to learn programming of 3D games / and so on
but I saw several good samples of visualizing data also in 3D
plotting is a good and simple choice if you want to draw diagrams
but if you want to animate data or create virtual rooms/surfaces/etc., then you better render
(in 3D)
 
plotting only tbh
tho maybe if i get a spur of brilliance (and free time) it would be nice to have a sliding window through measurement space (so that would be rendering)... but first need to get the basics done for this lib
:P
 
I recommend Panda, because it's easy to install, very good documented, with a middle big community in the background and dozen of nice tutorials/sample included in the SDK installation package
 
11:00 AM
paver paver on the wall, show me ... am I'm big or tall* ... damn bloody wednesday, I've should stay in bed
 
11:47 AM
ick
 
about iain banks, messages like that are always hard to 'process' for the people involved
 
jipp
 
I briefly thought that was on-topic and confused him with Ian Bicking.
 
12:06 PM
@MartijnPieters Congratulations on 100k!
 
12:19 PM
somebody experience with sikuli.org?
hey Kevin
 
Good morning.
 
Its one of those projects I keep meaning to have a play with...
 
Sometimes, it is just upsetting that some users have no basic understanding of the language... read the book first.. jeez.
1
Q: List of 10 rectangles, meant to draw every one, only draws one

Jack WrightSo I have a program that's supposed to append 10 instances of a class named Rectangle which creates random properties for the rectangle. If I print multiple objects from the list, they appear as different values, but if I call the draw function I have for multiple, only one appears on the screen....

No understanding of how classes work, simply copying like a monkey from some online source probably, trying to make a game because a friend told him you can make games with python.... its just sad...
Gets me so bitter.
 
Last night I dreamt that I wrote a python module that could travel through time and open/read/write files in the past or future.
The installation process was easy - simply wait until the module is installed by your future self, then copy it over to the system of your past self.
 
Fascinating
 
12:25 PM
It saves everyone the effort of having to implement the TimeTravelingFile class themselves, since they can just borrow it from elsewhere in the time stream.
 
Reminds me of quantum processing.
 
So you've got one better than xkcd's import antigravity and gone for import timetravel ? :-D
 
However, such ontological events don't seem to happen much in real life. If they did, you'd always be getting visits from future selves so they can deliver time machine blueprints to you.
 
I often use the phrase "Let my future self take care of it" when I want to do something but the consequences could be unfortunate.
 
hmm. from future import future.
Same, @InbarRose. Future me and past me are always in feud as a result. "That darn past me, always making me do the work while he slacks off! Argh!"
 
12:27 PM
For instance, as a youth I would have said something like: "Fuck doing housework, go out with your friends and get drunk, let your future self take care of it"
Or "Sure you can take your parents keys and steal the family car, let your future self take care of the consequences...."
 
future scares
 
Or my favorite: "Do the dishes? Screw that, I am going out to a party, let my future self take care of it!"
 
Yep, although for me it's more not doing things I should be doing, rather than doing things I shouldn't be doing.
 
:)
Quantum processing: Where you get all functions in O(1) because the moment you call them you set off a chain reaction through time which returns the value you were looking for immediately. udini.proquest.com/view/… (I have not read the whole thing)
 
I personally like the algorithm for solving NP hard problems in O(1) time. 1) Create an infinite number of universes, each one with a different guess for the solution to the problem. 2). Check to see if your guess is a correct solution. If it isn't, destroy the universe.
By the end of the algorithm, you either have a correct solution to the problem, or you no longer exist, in which case you no longer require the solution to the problem.
 
12:41 PM
Building a device to destroy the universe left as an exercise for the reader.
 
Some gems.
 
I reckon the process to destroy an universe might be considered O(1), but I'm not sure the constant factor should be so easily disregarded in practice.
 
12:56 PM
@InbarRose: Thanks :-)
 
@Martijn good job buddy!
 
only 450K more to catch jon skeet! umm... assuming he stops gaining rep. :)
 
I can just about keep up with his rep gain..
I'll be content with keeping the distance between us reasonably constant!
 
It's okay. Accidents can happen cough. Skeet's only about 25 mins from me :-D
 
@JonClements -- Careful what you say.
He's likely parsing every word you type and has a robot army programed to protect him ...
 
1:02 PM
We don't need to harm him. Just reduce his internet connection uptime by 10%.
 
Pydroid.
Androids made of Pie, and Vengeance. :)
 
I bet they protect his connection to the internet as well (It's probably hard-wired directly to his brain)
 
Sitting directly on the backbone.
T1 connection.
 
So, we're all sticking to the theory that there's only one Jon Skeet?
 
He works at Google, of course he's got multiple redundant T1 connections.
 
1:05 PM
We'll just have to cut off the American undersea internet cables, then. No other way round it.
 
I was at the London Google offices, and there was no sign of a multiplicity of Skeets.
 
then Martijn will be free to dominate StackOverflow Europe edition.
 
You do realize that Skeet is British, right?
 
I was misdirected by the "he works at Google" comment.
 
You'd need to cut the British Isles off.
 
1:06 PM
EMP?
 
Yeah, Google totally has 1 office with like 5 employees.
 
They already are cut-off from Europe.
 
On a more serious note, is anyone here extremely familiar with the ast module?
 
Not specifically with the Python module, but ASTs in general a bit
 
They are part of the European union, not the continent of Europe, they are the British Isles - technically (and tectonically) speaking, they aren't on the same continental plate.
 
1:08 PM
If you could wing the network contractor job for their new London campus that Google is about to build, then perhaps you could insert a Skeet delay into their routers.
 
I always imagined Google as one monolithic building that houses all of their employees and hardware. Perhaps literally monolithic, as in, a perfectly seamless onyx exterior with no entrances or exits.
 
Floating in space and time?
 
@Kevin Funny, that's how I envisioned Apple
 
I've seen several European Google offices.
 
dramatic music - dum dum dum!
 
1:09 PM
The engineering ones are pretty damn cool.
 
Apple is monolithic in the same manner, but in 15 tasteful pastel colors.
 
But there is a great lack of onyx exterior to them.
 
White, White, White.....
 
@JosKraaijeveld Apple is white and brushed metal
I've been to the Google Dublin offices, and I can attest they're awesome.
 
My question is that ast.walk says that it walks the tree in no specified order. That seems pretty useless ...
If I'm trying to parse an expression, how do I know if I have the right side or left side of my BinOp?
 
1:11 PM
So you've seen the Shaven Yak, @pcalcao?
 
a - b is quite different than b - a
 
I can imagine walk being useful if you wanted to implement some kind of treeMap method.
In which case you don't care about the node's position in the tree.
 
@mgilson I don't think it's supposed to be used to actually evaluate anything, since context is meaningful. It would be helpful, for instance, if you want to modify all nodes of a certain type for some reason.
I reckon it has limited usage, might be useful for debugging for instance.
 
I'm trying to implement a parser for mathematical expressions ...
 
@MartijnPieters I have, a pub in the office is pretty awesome :)
 
1:14 PM
The London offices are more or less the same, a little bigger.
With a London doubledecker bus embedded in one of the floors.
 
@mgilson I'm not an expert on python's ast, but I would say that a visitor pattern is usually what you want, it's probably what ast.NodeVisitor provides.
 
Currently If I have an expression like "a = b+c", I split the statement at = and eval the RHS passing in a dict which defines what b and c are. Then I put the result back into another dict under the key a
 
@mgilson - Making your own NodeVisitor springs to mind then
 
@pcalcao -- Yes, that's actually what I'm using. The docs don't say anything about the visiting order though. They just say that it "walks the ast ..."
I assume it would walk in the same order as ast.walk, but I suppose that I don't know that.
 
@mgilson I would probably have assumed the same thing, but the docs seem to indicate otherwise.
 
1:19 PM
@mgilson: the source code is not that hard to find.. :-)
The NodeVisitor code walks the tree recursively, depth-first.
 
@MartijnPieters -- but then I need to check the source on PyPy, Jython, IronPython ...
I never assume they're all the same ...
 
The Jython, PyPy and IronPython codebases I'd expect to reuse the ast.py module.
.walk() uses a deque. It pops the next item from the queue, asks it for it's children, adds those to the queue and yields the node.
 
Do the node classes even enforce a particular order on their children? Ex. the BinOp might store its children as [right, op, left] just because it can.
 
BinOp has left, right and op fields.
I don't see an order there. :-P
ah, comment from the ast.c sourcefile:
    /* Must account for a sequence of expressions.
       How should A op B op C by represented?
       BinOp(BinOp(A, op, B), op, C).
    */
then things like expr1 = ast_for_expr(c, CHILD(n, 0))
expr2 = ast_for_expr(c, CHILD(n, 2));
so they are ordered specifically as expr, op, expr.
 
how to do wireframes, the wrong way
 
1:27 PM
In CPython. PyPy and Jython won't necessarily use ast.c
 
Couldn't you do something like this:
def eval(node):
    if isinstance(node, BinOp):
        return node.op(eval(node.left), eval(node.right))
    #etc
in which case you don't need walk to evaluate your expression.
 
And the Op types are named tuples, basically
Okay, not quite a named tuple
It's a subclass of the AST c type.
so it has a ._fields attribute which is a tuple of fields.
and each field is then an attribute on the instance.
 
Hmm, my parser crashes when I do print 1+1+1+1+...1 when there are 32,768 terms. New rule of thumb: try to keep lines shorter than sixty thousand characters long.
 
So BinOp has ('left', 'op', 'right') as _fields. And then 3 attributes.
and the ast.py walking code looks at _fields.
 
1:40 PM
I presume there's no explicit definition as to the ordering of _fields, then. Or else walk would also have a more defined order.
@ColinO'Coal, I took it seriously until def area
I do wish all languages could agree on a single naming scheme for string length, though. Whenever I'm playing with a new language, I have to guess through len, length, size, count in all permutations of [with parens, without parens], [capitalized, lowercase], [class method, function], etc etc
 
@Kevin we should really create a standard for that! xkcd.com/927
 
hehe I was shocked until ... "...*my april joke* ..." ;)
 
@Kevin: there is a definition of the ordering.
@Kevin: but ast.walk() uses a queue to visit all nodes.
This does mean that for a BinOp, left will be walked before right.
Walk walks in breath-first order.
NodeVisitor in depth-first order.
IronPython certainly has the _fields attribute too, see the BinOp type definition.
and IronPython includes the stdlib .py files, so it's walk and NodeVisitor implementations are the same.
 
2:00 PM
Is it wrong to write snide answers?
 
That's a subjective question. I think "yes", personally.
 
@Kevin Oh well
 
You'll probably just end up with an OP that pouts, "if you don't want to help, don't post" (which btw drives me mad when it's used in defense of a bad question)
 
@Kevin I've answered every item in the question
 
@MattH It's relatively common to see questions that are clearly too ambitious, given the apparent familiarity of the OP with the technologies involved.
 
2:12 PM
I guess it's somewhat justifiable in your case, since you're trying to steer the OP away from what they think is a good idea.
It's similar to the quandary, "If I give the OP what he wants, he will shoot himself in the foot with it later. How much warning should I give, if any?"
 
@pcalcao: I've not come across them that often, or so glaringly mis-matched.. must be lucky :)
 
@MattH The example you just showed is quite... extreme, I'll give you that. I remember seeing a question a good while ago along the lines of "How do I implement a game like Call of Duty with multiplayer and whatnot".
 
That's easy. from callofduty import multiplayer, whatnot
 
Yeah, of course, but that's assuming you're using Python...
 
For all other languages, first implement a python interpreter...
 
2:23 PM
@MattH That is a NRQ closing vote for me.
 
can any of you quickly scan over a question i posted, specifically if it's clear?
 
0
Q: Matplotlib wireframe shows strange wiring

Bas JansenI have 3 lists containing X, Y and Z values, full lists are below: X = [132.54, 132.54, 132.54, 132.54, 132.54, 132.54, 132.54, 132.54, 132.54, 132.54, 132.54, 134.546, 134.546, 134.546, 134.546, 134.546, 134.546, 134.546, 134.546, 134.546, 134.546, 134.546, 136.551, 136.551, 136.551, 136.551, 1...

presumably.
 
ehhh yep
gz on 100k btw ;)
 
Perhaps some kind of example as to what you expected to get as well?
I am a n00b when it comes to plotting, though.
 
ill just snatch the pic from matplotlibs example of wireframe as what im expecting
 
2:28 PM
You sort X and Y, but not Z?
 
I can answer question 3. When you do set(X), it eliminates all duplicate points. So there's only one 132.54 left over when you had ten originally.
 
that i know
 
Also, you created sets, so that eliminates dupes.
 
but I was expecting 13
err
wheres my calc
yes 13
unless i misinterpret meshgrid
 
That's funny. When I do len(set(X)), I get 15.
 
2:29 PM
the ... (censored)
 
You actually only sort X, because you assign sorted(set(Y)) to y, not Y.
 
thats a typo, my bad
 
You got two answers already
so I guess it was clear to some. :-)
 
good, was just worried it would look liky the inside of my head
(chaos)
like*
 
@BasJansen: you can edit your posts for a few minutes... It's easy!
 
2:33 PM
Hurrah... another Solicitation. stackoverflow.com/questions/15789762/…
 
still editing lol
just to make it clearer
 
So, what does it look like now?
 
incoming :p
 
I really need to find myself a good excuse to experiment with plotting in Python.
 
2:49 PM
> *But the information bytes are so small...*

You've defined a new size of byte as well?
 
3:01 PM
I am a lucky daddy.
My kids make me candy.
And keep those pots refilled.
 
Epic.
 
:D
 
awesome
my daughter bakes me sometimes english cookies ... but the box is too fast too empty
 
hi ppl i am reading a simple algorithm to find the starting point of the loop algorithm
reference : - http://allaboutalgorithms.wordpress.com/2011/10/20/find-the-starting-point-of-a-cycle-in-a-linked-list/
but i am having some trouble digesting some of the concepts , can you guys help me

After finding there exits a loop blogger says - if the two pointers met then take one of the pointers to the head of the linked list and run both the pointers with 1 step at a time .. the point where they met is the start of the loop
 
I am going to put this here again: meta.stackoverflow.com/questions/171685/… A question I asked on Meta, those who have not seen it yet, I would like your opinion (preferably put it on the Meta post as well) I am not looking for upvotes or rep, its the Meta account after all. Just Want this idea to get out there, see what people think - I personally believe it is something we can solve.
@Sandy Sorry Sandy - I do not understand your question, maybe link to what you are reading?
 
3:13 PM
 
@Sandy I think your calculations are wrong. Sketch it out on paper, if you advance one pointer one position at a time, and another two positions at a time, they'll both either reach the end of the list, or meet at some point. If they meet, then you have a cycle. In your example, they'll meet at "9".

Now, you move one pointer to the beginning, and move both of them one step at a time, until they meet again, which will happen after 5 "moves", at node "6".
 
Yeah I noticed the link, I read this article. It makes sense, I like it. Try writing a program that does it, where the function is: method(linked_list, expected_loop_start_index):
This way you can check to make sure it works.
 
Hey, how would you implement the mvc paradigm if you were using sqlalchemy core, and not the orm? stackoverflow.com/questions/15779364/…
 
omg ok i will sketch and check
sure @InbarRose
 
When dealing with algorithms and basic data structures, the best debugging tool is still pen and paper :P (imho, your mileage may vary)
 
3:17 PM
do any of you have a recommendation?
 
@pcalcao sure :)
 
3:35 PM
@MartijnPieters Gimme some of that candy!
 
I'll be happy to give you some, just come and drop by!
 
Geez... I'm glad I have the context for that sentence, just saying.
 
@MartijnPieters: Long/Lat Coords?
 
Streetview, taken in March 2 years ago:
That should be enough to help you find it..
Less snow this year, so the fence is actually standing clear of snow now; most of the snow on the roofs is gone too.
Welcome to Norway!
 
4:01 PM
@MattH: BTW, I think snark is a requirement from time to time.
How else would you respond to a question titled "Python maths is wrong!"?
 
@MartijnPieters: Awesome, that's how I feel about it too.
 
0
Q: python maths is wrong

gadgetmo Possible Duplicate: Python rounding error with float numbers Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> 4.2 - 1.8 2.4000000000000004 >>> 1.20 - 1.1...

 
Ah, I remember that one! :D Gave you an upvote for "You have reached a new level in computer science, and you are coming of age."
 
The ancients understood it and deciphered it first, and now, so will you!
The ancients == Leonardo Torres y Quevedo, 1914.
and Konrad Zuse, 1938.
Pretty damn ancient, in CS terms.
 
I guess there are fewer curmudgeonly users around then I thought. I'd expect at least a few downvotes for it being essentially a link-only answer.
 
4:09 PM
@Kevin: It is all in the presentation..
 
Sometimes snark and a bit of irony is the right answer. There is no excuse for rudeness in a place like StackOverflow, but we're mostly developers here... if we had no sense of humor and couldn't appreciate some sarcasm and irony, we would probably be institutionalized by now.
 
I guess that "why don't floats work the way I expect?" gets a pass for the "no link-only answers" rule, since there are many excellent guides on the net, and explaining it yourself would take many many paragraphs.
 
4:25 PM
 
@MattH: Nice detective work!
 
@MartijnPieters: The view across? :)
 
Now go up the street (eastward would do)
and see early spring turn into summer at the next corner..
so, how did you find me?
 
@MartijnPieters: Funny cruising the streetview and watching the seasons change at the intersections
@MartijnPieters: I'll leave the howto off this public record. Needless to say, it wasn't by searching for placenames in Norway starting "Bo" (in the corner of the image you posted)
 
I didn't think those two letters in the corner were going to give you a clue, no.
Presumably you connected those two letters with the rest of the local feature name. :-P
 
4:33 PM
@MartijnPieters: Sadly nothing so intuitive.
I've gotta dash, train to catch!
 
5:07 PM
What is the Java equivalent of re.search(r'(\.\d+)\Z', txt).group(1)? I believe the search string would be "(\.\d+)$", but I cannot find if Java has an equivalent for groups. Any ideas?
 
I'm very happy to say I don't have a clue about Java and regular expressions..
 
@MartijnPieters Lucky you. I wish I could just stick with Python.
 
Err... Java has this thing where everything you thought was great isn't.
By that, I mean, groups isn't a thing.
Unless they added it since I stopped using that language.
To get a "group" in Java, you have to create a regex on the group itself, and use the beginning and end of the matched text for the "group."
 
@jakebird451 still need that?
 
Please, correct me if I'm wrong.
 
5:18 PM
regexes in Java support groups, I know the language has many flaws, but let's not exagerate ;)
 
Haha, fine. :P
 
Give me a sec and I'll paste the code, I don't remember it exactly by heart
 
It does? This is news to me, I spent a week searching for it, two years ago.
 
String a = "blablablabla123";
Pattern compile = Pattern.compile("\\d+");
Matcher matcher = compile.matcher(a);
String group = matcher.group(1);
It's convoluted as hell, but it's there =)
remember you have to escape backslashes
so \d becomes \\d
 
Err. So it isn't a standard group, which is what I was getting at, but a regex representing the group individually.
 
5:24 PM
sorry, my example was stupid
if the pattern was, say... [a-z]+(\\d+)
group(1) would retrieve the part matched by the capturing group
the entire match is group(0)
and so on
That helps?
 
And that was exactly what I was looking for. That's no less convoluted than most of the solutions I found with Java. :P
I seem to remember that distinctly not working, though. It has been a while, so I am probably mistaken.
 
Matcher matcher = Pattern.compile("\\d+").matcher("blablablabla123"); That's not much worse than any other language.
 
true, you can chain the calls to make it less verbose
 
@TylerCrompton Even, String group=Pattern.compile("\\d+").matcher("blablablabla123").group(0); isn't too bad. I agree.
 
@Poik Seeing as getting multiple groups is common, I would usually keep a reference to the matcher. I'd find a middle ground between that and the very verbose example.
 
5:46 PM
so guys, end of workday, cya tomorrow
 
See you tomorrow pythoneers.
 
6:19 PM
dinner time
 
6:47 PM
@pcalcao Ah, yes. Thank you. And I guess I could also collapse it all in one line, but it is nice to see the types written out for the example.
Ah, and I see someone has collapsed it for me in the post above. Sweet.
 
7:04 PM
hi guys
 
@SomeoneSomeoneelse hello
 
7:57 PM
@TylerCrompton hello
 
00:00 - 20:0020:00 - 00:00

« first day (900 days earlier)      last day (4063 days later) »