| *** tosky has quit IRC | 00:15 | |
| *** holser has joined #zuul | 00:22 | |
| *** holser has quit IRC | 01:21 | |
| *** rlandy has joined #zuul | 03:02 | |
| *** rlandy has quit IRC | 03:19 | |
| *** vishalmanchanda has joined #zuul | 03:59 | |
| *** ikhan has quit IRC | 04:04 | |
| *** ykarel|away has joined #zuul | 05:08 | |
| *** ykarel|away is now known as ykarel | 05:19 | |
| *** evrardjp has quit IRC | 05:33 | |
| *** evrardjp has joined #zuul | 05:33 | |
| *** jfoufas1 has joined #zuul | 05:46 | |
| *** ykarel_ has joined #zuul | 06:00 | |
| *** ykarel has quit IRC | 06:01 | |
| *** ykarel_ is now known as ykarel | 06:12 | |
| *** ykarel_ has joined #zuul | 06:27 | |
| *** ykarel has quit IRC | 06:28 | |
| *** ykarel_ is now known as ykarel | 06:45 | |
| *** ykarel has quit IRC | 07:08 | |
| *** ykarel has joined #zuul | 07:45 | |
| *** hashar has joined #zuul | 07:53 | |
| *** jcapitao has joined #zuul | 07:53 | |
| *** rpittau|afk is now known as rpittau | 08:00 | |
| *** holser has joined #zuul | 08:01 | |
| *** jpena|off is now known as jpena | 08:26 | |
| *** tosky has joined #zuul | 08:45 | |
| *** zbr is now known as zbr|pto | 08:45 | |
| *** phildawson has joined #zuul | 09:26 | |
| *** phildawson has quit IRC | 10:18 | |
| *** sshnaidm|afk is now known as sshnaidm | 10:21 | |
| *** nils has joined #zuul | 10:34 | |
| *** ikhan has joined #zuul | 11:36 | |
| *** jcapitao is now known as jcapitao_lunch | 11:39 | |
| *** rlandy has joined #zuul | 12:29 | |
| *** jpena is now known as jpena|lunch | 12:36 | |
| *** jcapitao_lunch is now known as jcapitao | 12:43 | |
| *** gouthamr has quit IRC | 13:26 | |
| *** guilhermesp has quit IRC | 13:27 | |
| *** aprice has quit IRC | 13:27 | |
| *** iamweswilson has quit IRC | 13:27 | |
| *** mwhahaha has quit IRC | 13:27 | |
| *** samccann has quit IRC | 13:27 | |
| *** gundalow has quit IRC | 13:27 | |
| *** johnsom has quit IRC | 13:27 | |
| *** gmann has quit IRC | 13:27 | |
| *** webknjaz has quit IRC | 13:27 | |
| *** vishalmanchanda has quit IRC | 13:27 | |
| *** stevthedev has quit IRC | 13:27 | |
| *** mnaser has quit IRC | 13:27 | |
| *** parallax has quit IRC | 13:27 | |
| *** dcastellani has quit IRC | 13:27 | |
| *** PrinzElvis has quit IRC | 13:27 | |
| *** samccann has joined #zuul | 13:28 | |
| *** guilhermesp has joined #zuul | 13:28 | |
| *** johnsom has joined #zuul | 13:28 | |
| *** mnaser has joined #zuul | 13:28 | |
| *** jpena|lunch is now known as jpena | 13:29 | |
| *** iamweswilson has joined #zuul | 13:29 | |
| *** webknjaz has joined #zuul | 13:29 | |
| *** sduthil has joined #zuul | 13:29 | |
| *** vishalmanchanda has joined #zuul | 13:30 | |
| *** gouthamr has joined #zuul | 13:30 | |
| *** gmann has joined #zuul | 13:31 | |
| *** parallax has joined #zuul | 13:31 | |
| *** aprice has joined #zuul | 13:32 | |
| *** stevthedev has joined #zuul | 13:34 | |
| *** mwhahaha has joined #zuul | 13:34 | |
| *** gundalow has joined #zuul | 13:34 | |
| *** dcastellani has joined #zuul | 13:45 | |
| *** PrinzElvis has joined #zuul | 13:51 | |
| *** rlandy is now known as rlandy|mtg | 14:18 | |
| *** rlandy|mtg is now known as rlandy | 14:45 | |
| *** hashar has quit IRC | 15:24 | |
| *** sshnaidm has quit IRC | 15:34 | |
| *** hashar has joined #zuul | 15:37 | |
| *** vishalmanchanda has quit IRC | 15:45 | |
| *** jpena is now known as jpena|brb | 15:46 | |
| *** jfoufas1 has quit IRC | 15:54 | |
| *** sshnaidm has joined #zuul | 15:58 | |
| *** jpena|brb is now known as jpena | 16:01 | |
| *** ykarel has quit IRC | 16:29 | |
| openstackgerrit | Helena Spease proposed zuul/zuul master: Errors from patch 3 added. https://review.opendev.org/c/zuul/zuul/+/769404 | 16:31 |
|---|---|---|
| *** holser has quit IRC | 16:52 | |
| *** rpittau is now known as rpittau|afk | 17:05 | |
| *** jpena is now known as jpena|off | 18:00 | |
| *** hashar has quit IRC | 18:01 | |
| *** dcastellani has quit IRC | 18:25 | |
| *** webknjaz has quit IRC | 18:25 | |
| *** iamweswilson has quit IRC | 18:25 | |
| *** webknjaz has joined #zuul | 18:25 | |
| *** iamweswilson has joined #zuul | 18:26 | |
| *** dcastellani has joined #zuul | 18:26 | |
| *** nils has quit IRC | 18:29 | |
| *** jcapitao has quit IRC | 18:33 | |
| *** ianychoi_ has joined #zuul | 20:33 | |
| *** ianychoi has quit IRC | 20:37 | |
| *** smyers_ has joined #zuul | 20:59 | |
| *** smyers has quit IRC | 21:01 | |
| *** smyers_ is now known as smyers | 21:01 | |
| openstackgerrit | Guillaume Chauvel proposed zuul/zuul master: gitlab: Add access token name, Update docs, Fix webhook https://review.opendev.org/c/zuul/zuul/+/771184 | 21:10 |
| *** tjgresha has joined #zuul | 22:10 | |
| tristanC | fungi: it seems like pep634 (pattern matching) has been accepted today | 22:54 |
| tristanC | and here is an example of how it would work: https://www.python.org/dev/peps/pep-0636/#adding-a-ui-matching-objects | 22:56 |
| mordred | tristanC: thanks - that second thing was what I was just about to ask about | 22:58 |
| tristanC | mordred: you're welcome, notice how the example brings into scope the attributes that matched | 22:59 |
| fungi | tristanC: very cool! so probably coming in 3.11? | 23:00 |
| tristanC | such pattern match is the feature i miss the most in python from haskell/ml | 23:00 |
| mordred | fascinating | 23:01 |
| tristanC | fungi: the announce says 3.10 | 23:01 |
| clarkb | fun my firewall doesn't think I should talk to that | 23:02 |
| clarkb | I wonder if fastly got on its bad side | 23:02 |
| tristanC | (the announce is https://mail.python.org/archives/list/python-dev@python.org/message/SQC2FTLFV5A7DV7RCEAR2I2IKJKGK7W3/ ) | 23:02 |
| fungi | oh wow, that's soon... i'm already running 3.10.0a5 on my workstation | 23:02 |
| *** parallax has quit IRC | 23:04 | |
| clarkb | but pypi is fine. I wonder if it could be fastly endpoint specific (and I'll stop bugging this channel with my ad blocking weirdness) | 23:04 |
| *** mwhahaha has quit IRC | 23:04 | |
| *** mwhahaha has joined #zuul | 23:05 | |
| *** parallax has joined #zuul | 23:05 | |
| fungi | interesting to see they went with the proposal which looks like assignment but isn't | 23:05 |
| corvus | that looks groovy | 23:12 |
| corvus | (it doesn't look *like* groovy, it looks groovy. far out. way cool.) | 23:12 |
| corvus | hella tight | 23:13 |
| mordred | yeah - although when tristanC said matching it made me think about matching from rust rather than case statements. I like it though | 23:13 |
| corvus | i was almost literally writing that code last night | 23:15 |
| corvus | if key_event.scancode == KEY_HOME and key_event.keystate == key_event.key_up: | 23:15 |
| clarkb | this is pattern matching like functional languages right? | 23:15 |
| fungi | clarkb: yep, exactly like functional languages (haskell inspired even) | 23:16 |
| clarkb | I'm in favor then :) | 23:16 |
| corvus | -> case KeyEvent(scancode=KEY_HOME, keystate=key_up): | 23:16 |
| corvus | so nice | 23:16 |
| fungi | the only thing that really sticks in my craw is the use of assignment-looking syntax for evaluation, which strikes me as unpythonic, but really that's fairly minor | 23:16 |
| fungi | the available operators are rather limited anyway | 23:17 |
| tristanC | mordred: it is similar to fp match, python uses `case pattern: expr` where rust or haskell would uses `pattern => expr` | 23:17 |
| mordred | yeah - my first read made me think it was creating singleton objects | 23:17 |
| corvus | fungi: does it help if you imagine the case statement is creating an imaginary KeyPress object for comparison with those values assigned to attributes? | 23:17 |
| fungi | it helps if i just have another pint | 23:17 |
| mordred | corvus: no - that's the thing that tripped me up - that's what I thought it was doing | 23:18 |
| mordred | but I've learned now so it's ok | 23:18 |
| clarkb | tristanC: does it do pattern matching of function args too? | 23:18 |
| tristanC | clarkb: what do you mean? | 23:18 |
| clarkb | tristanC: eg head x:xs = x type matching | 23:18 |
| corvus | mordred: i think logically you could think of it as kinda sorta doing that. like, because i look at it that way, the assignment-lookingness of it actually makes it easier for me to understand. | 23:18 |
| clarkb | head [] = nil | 23:18 |
| mordred | clarkb: you should check out https://www.python.org/dev/peps/pep-0636/#adding-a-ui-matching-objects | 23:18 |
| clarkb | mordred: ya I have to figure out why my firewall thinks its a bd idea to load www.python.org | 23:19 |
| mordred | hahahaha | 23:19 |
| clarkb | I suspect fastly did a bad and python.org is hitting the fallout | 23:19 |
| fungi | your firewall is probably written in python and it's afraid you might try to rewrite it | 23:19 |
| corvus | clarkb: i can print it out and send you a copy by us mail | 23:19 |
| fungi | self-preservation at work | 23:19 |
| clarkb | corvus: perfect :) | 23:19 |
| mordred | clarkb: http://paste.openstack.org/show/802449/ | 23:19 |
| tristanC | clarkb: pattern seems to support list, e.g. `case [x, *xs]` | 23:20 |
| clarkb | I've got it subscribed to ad blocker lists as well as tracker lists. I suspect that fastly IPs got dinged for one or the other any I may need to go and make an exception rule for fastly ranges | 23:21 |
| mordred | tristanC: would case [x, *xs] be for if the match statement returned a list? | 23:21 |
| mordred | ah - nevermind | 23:22 |
| mordred | I see the example | 23:22 |
| mordred | neat | 23:22 |
| mordred | yeah - this is nice | 23:22 |
| mordred | like - it makes me want to bump the min to 3.10 :) | 23:23 |
| corvus | mordred, fungi: note also that there is local assignment of the variables that appear in the match statement (ie, key_name is available inside the case statement as a local) | 23:23 |
| mordred | yah - that part is super nice | 23:23 |
| fungi | oh, yep, that does make it a bit more sensible then | 23:23 |
| tristanC | clarkb: the `:` operator in haskell is a type constructor, where list is defined as `data [] a = [] | a : [a]`, that is similar to an object constructor like `Click(position)`, which seems to be supported by the pep634 | 23:26 |
| clarkb | ya I was more curious if I could write python like this roughly: def foo(None): return None then def foo(1): echo "you gave me an int"; return None | 23:27 |
| clarkb | sounds like this is more about matching within functions though the matching there seems rich | 23:28 |
| clarkb | (I always liked the clear way the function definitions for different inputs help convey behavior in functional languages | 23:28 |
| mordred | yeah - this isn't multimethods | 23:28 |
| tristanC | clarkb: oh i see, no that is not part of this pep, perhaps in a future release? :) | 23:29 |
| tristanC | clarkb: though, I think you can always rewrite argument match to case expressions, there is even the LambdaCase extension to make this more ergonomic | 23:30 |
| clarkb | yes you should be able to, I just always liked the simplicity of that expression | 23:32 |
| clarkb | I think it makes for code that is easy to understand beacuse looking at the first line of a function tells you how it is likely to behave | 23:32 |
| fungi | honestly i've found the overloading of function names to be annoying in other languages | 23:33 |
| tristanC | clarkb: the issue is when you need to add a new argument, then all the top-level definitions needs to be changed, where it can be easier to do with the lambda case. | 23:33 |
| fungi | i.e. having multiple definitions for the same function but taking different arguments | 23:33 |
| clarkb | fungi: I agree :) the difference here is you aren't really changing the argument types, you're just matching on their actual contents | 23:34 |
| tristanC | fungi: though in haskell, the arguments need to have the same type, it's not exactly overloading | 23:34 |
| fungi | i tend to prefer if a particular function name can only ever be definied once within its scope | 23:34 |
| clarkb | it is different than say a C++ overload in that way | 23:34 |
| fungi | yeah, fair | 23:34 |
| fungi | i also spent enough of my life hating on c++ for what it did to perfectly good c, but i've moved on and become a productive member of society since then | 23:35 |
| tristanC | there is also erlang function arity which is quite usefuly, where you can define multiple functions with the same name, but with different number of arguments | 23:36 |
| fungi | java does something similar to that too | 23:36 |
| clarkb | fungi: its useful to show that you've handled corner cases and boundaries and express that in a quick way to epople reading the code | 23:37 |
| fungi | always seemed to me that having the same function name defined more than once made it harder to read the code rather than easier | 23:38 |
| fungi | you can never be sure that the definition you found is the right one | 23:38 |
| fungi | without also looking at the types and number of arguments anyway | 23:39 |
| clarkb | thats the difference, they are all the right one in haskell because it does pattern matching on the input to determine which to call | 23:39 |
| clarkb | you can even get more complicated and do boolean expressions on the matches | 23:40 |
| clarkb | (now I wonder if the python pep allows ^ too) | 23:41 |
| tristanC | clarkb: it does yes, that is called a pattern guard | 23:41 |
| clarkb | nice | 23:41 |
| corvus | that's the "case KeyPress(key_name="Q") | Quit():" syntax? | 23:45 |
| tristanC | clarkb: the python pep also supports something that is missing from haskell as far as i know, that is to match multiple patterns in a single case expression using the `|` or combinator | 23:45 |
| tristanC | corvus: that's the or combinator, the guard is implemented with the `if` keyword | 23:46 |
| corvus | tristanC: ah i see that now, thx | 23:46 |
| corvus | https://www.python.org/dev/peps/pep-0636/#adding-conditions-to-patterns | 23:47 |
| *** ikhan has quit IRC | 23:56 | |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!