#voice-chat-text-0

1 messages · Page 124 of 1

rugged root
vocal basin
#

rows?

maiden skiff
#

Too bored

vocal basin
#

it's probably best to have per DB:
exactly one task
exactly one connection

gentle flint
#

lol

vocal basin
woeful wyvern
gentle flint
vocal basin
#

avoid locking

#

use queues/messages instead

vocal basin
vocal basin
vocal basin
#

> 35% Faster Than The Filesystem

rugged root
#

There's caveats there

vocal basin
#

@woeful wyvern is the thing server-side or desktop?

vocal basin
#

on some filesystems

#

with some configs

vocal basin
#

OS has caching and stuff for FS

#

I know

vocal basin
woeful wyvern
vocal basin
#

oh, so, "embedded" in the same sense as sqlite is

vocal basin
vocal basin
vocal basin
vocal basin
woeful salmon
#

i'm gonna go now as there's alot of movies to watch ig see you guys later 🙂

vocal basin
#

@woeful wyvern on low-level it's mostly just matrix things

#

which can be optimised

rugged root
vocal basin
#

"if matrix movie was so good, why don't they release tensor movie?"

#

Rust's interoperability with C might be good, but often it's not worth introducing an extra non-uniformity into the code base

#

if you have to cross the boundary in thousands of different places, then why have that boundary in the first place

rugged root
#

True

vocal basin
#

35%-Faster-Than-The-Filesystem-ism is a religion now

somber heath
#

Seek well light.

rugged root
limpid umbra
#

twilight zone

vocal basin
#

I should've auto-generated it instead

#

to train making .drawio diagrams

pulsar island
#
@receiver(post_save, sender=Event)
def post_save_event(sender, **kwarts):
  <logic statement, in form of IF loop>
  return ?
vocal basin
pulsar island
#

django signals

#

against the data model

vocal basin
limpid umbra
#

are they tricking you into making code for them

vocal basin
#

yes they do

limpid umbra
#

so .. use a laptop with encrypted drive .. and show them in person , then demo

vocal basin
#

rather just host it without sending the code

limpid umbra
#

ya a virtual interview thingy

vocal basin
limpid umbra
#

mmm - would they pull the ... ohh that code is on our property we own it

vocal basin
#

Django Signals thing sounds to me for some reason

#

@lavish rover there's also style, configurability, etc.

#

that shows too

molten pewter
#

Will be on later after the Gym.

rugged root
#

Say hi to gym for me

limpid umbra
#

can you do a virtual whiteboard ? then interviewer presents a problem , then you step a basic flowchart of how to solve it

#

slowly piece it together in front of them

vocal basin
# vocal basin https://themonadreader.files.wordpress.com/2014/04/fizzbuzz.pdf

!e

# I'm not sorry
from typing import Callable

def compose(*functions):
    def composed(x):
        for f in reversed(functions):
            x = f(x)
        return x
    return composed

def fizzbuzz(n: int) -> str:
    def test(d: int, s: str) -> Callable[[Callable[[str], str]], Callable[[str], str]]:
        def tmp(x: Callable[[str], str]) -> Callable[[str], str]:
            if n % d:
                return x
            else:
                return lambda _: s + x("")
        return tmp
    return compose(
        test(3, "Fizz"),
        test(5, "Buzz"),
    )(lambda x: x)(str(n))

print(*map(fizzbuzz, range(1, 101)))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 FizzBuzz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 FizzBuzz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 FizzBuzz 61 62 Fizz 64 Buzz Fizz 67 68 Fizz Buzz 71 Fizz 73 74 FizzBuzz 76 77 Fizz 79 Buzz Fizz 82 83 Fizz Buzz 86 Fizz 88 89 FizzBuzz 91 92 Fizz 94 Buzz Fizz 97 98 Fizz Buzz
limpid umbra
#

generic modules

rugged root
#

lambda why

#

nuuuuuuu

limpid umbra
#

they are exploiting a percieved desperation

vocal basin
#

ig lambda x: x should be identity

limpid umbra
#

Bill the Moustaschio

lavish rover
#

-> Callable[[Callable[[str], str]], Callable[[str], str]] good lord

vocal basin
vocal basin
#

that is an almost literal translation from Haskell, so quite cursed

#
def fizzbuzz(n: int) -> str:
    left, right = "", str(n)
    if not n % 3:
        left += "Fizz"
        right = ""
    if not n % 5:
        left += "Buzz"
        right = ""
    return left + right
print(*map(fizzbuzz, range(1, 101)))
#

this is basically the same but simpler

vocal basin
#

the DSL part
but without DSL

limpid umbra
#

in the usa there are

#

@rugged root do you do Ham Radio stuff ??

rugged root
#

Hem radio

#

And no, I've been curious, but never really got anything to try it

limpid umbra
#

SDR uses a 8 bit ADC but fast

#

canada MAID program

desert wolf
#

😦

vocal basin
limpid umbra
#

life is hard until you meet a man with no feet

#

justine treudo gets a $8000 / month food budget

vocal basin
#

> who told you healthcare in US is expensive?
what the fuck?

limpid umbra
#

reality is seeping into the coding room.......

desert wolf
#

lol

limpid umbra
#

Leon the proffesional ??

vocal basin
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | empty
002 | (0)
003 | (0, 1)
004 | (0, 1, 2)
vocal basin
lavish rover
#

why not '(' + ', '.join(arr) + ')'

#
  • handling empty case
vocal basin
lavish rover
#

stand by your opinions publicly 🙂

vocal basin
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | empty
002 | (0)
003 | (0, 1)
004 | (0, 1, 2)
vocal basin
#

so it's not "linear"

lavish rover
#

well, if arr does not read the array

#

just checks the length no?

#

ig does not work for arbitrary iterables

vocal basin
#

well, yes, "linear" qualifier is somewhat of a mathematical fanaticism
it just does not matter for real applications

so it's a simple useless totally superficial challenge not something real

lavish rover
#
def join(arr):
    res = "(" + ", ".join(map(str, arr)) + ")"
    return "empty" is len(res) == 2 else res
#

lmao

#

it's terrible

vocal basin
lavish rover
#

!e

def join(arr):
    res = "(" + ", ".join(map(str, arr)) + ")"
    return "empty" if len(res) == 2 else res
print(join([""]))
wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.

empty
lavish rover
#

!e

def join(arr):
    res = "(" + ", ".join(map(str, arr)) + ")"
    return "_basically_ empty" if len(res) == 2 else res
print(join([""]))

there, fixed

wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.

_basically_ empty
final osprey
#

Morning

#

Hey, I would like to ask a question, but I don't have perms to talk in the vc
Is there any way I can get temp perms to talk?

rugged root
#

What's the quick gist of your question?

final osprey
vocal basin
final osprey
final osprey
lavish rover
#

Steven Strogatz, an applied mathematician at Cornell, is a prominent figure in the field of nonlinear dynamics and chaos, and a widely beloved popularizer of math.
Episode sponsor: https://brilliant.org/3b1b
Brilliant is a great site/app for being more active in learning math.

Note from Strogatz's high school geometry:
https://twitter.com/steve...

▶ Play video
#

One of my favorite podcasts of all time

vocal basin
#

oh, wait

vocal basin
#

it took too long to find

#

so the first one probably

@app_commands.context_menu()
async def react(interaction: discord.Interaction, message: discord.Message):
    await interaction.response.send_message('Very cool message!', ephemeral=True)

@app_commands.context_menu()
async def ban(interaction: discord.Interaction, user: discord.Member):
    await interaction.response.send_message(f'Should I actually ban {user}...', ephemeral=True)
#

with the message: discord.Message argument

#

"not the worst things you can expect a person to say on twitter;
rather just average twitter communications"

#

when the only thing you have is a hammer, everything looks like a nail

when the only thing you have is a hammer, everything looks like a screw

rugged root
#

@lunar haven You working on code or are you just kind of sitting on it

#

Because if you're not actively doing anything I'd prefer you to not be streaming

#

Like if you're going to go afk, end the stream

vocal basin
#

(from my understanding)
the video role (here) is supposed to be for "there's a something to stream"
that includes when given for prolonged periods

rugged root
#

@lunar haven This

vocal basin
#

@lunar haven find ways to think while actively interacting with the streamed IDE
write tests
write out thoughts
write ideas in any form (pseudo code, etc.)

rugged root
#

!server

wise cargoBOT
#
Server Information

Created: <t:1483877013:R>
Roles: 105
Member status: status_online 60,592 status_offline 316,179

Members: 376,771

Helpers: 150
Moderation Team: 35
Admins: 12
Directors: 3
Contributors: 47
Leads: 14

Channels: 259

Category: 28
Forum: 3
News: 10
Staff: 121
Stage_Voice: 1
Text: 89
Voice: 7

vocal basin
#

there are issues with multiple people streaming at the same time

#

"did you pay the hourly rate to mustafa?"

somber heath
#

!rule 9

wise cargoBOT
#

9. Do not offer or ask for paid work of any kind.

rugged root
#

HA

vocal basin
# wise cargo

"offer didn't include disclosure of payment upfront, so doesn't count"

pulsar island
#
@receiver(pre_delete, sender=Event)
def pre_delete_event(sender, **kwargs):
    if Event.component == TSTAT:
        if Event.rawvalue >= 20:
            return JsonResponse(event.json())
        elif Event.component == BATT:
            if Event.rawvalue >=85
                return JsonResponse(event.json())
rustic dew
#

what is the idea of the current stream?

vocal basin
pulsar island
#

vacuum, one second, dont want to be rude

rugged root
#

Much appreciated

rugged root
vocal basin
rugged root
#

LinkdIn learning

#

Neat

vocal basin
pulsar island
#

OOOh, not in vc

#

event is a data model

#

component is a object of that model

#

event.component can either be BATT or TSTAT with current configuration of k:v

vocal basin
#

that code has something like this:

if x == A:
    ...
    if x == B:
        ...  # never reached? or always reached?
#

as in

rustic dew
#

I have one challenge for this day... flatten a dict.. given a dict {key1: value1, key2: {nestedKey2: value2}} the output should be [(key1, value), (key2.nestedKey, value2)]

Am i ok proposing things like this for the current stream?
Thanks

vocal basin
vocal basin
rustic dew
#

thats nice, but we can skip nested list

pulsar island
#

probably, @vocal basin Im still trying ot get good at logic based decisioning.

#

@vocal basin Oooh! Sorry, distracted. Yes, the logic will always be one or the other currently, otherwise it would be an error exception

#
@receiver(pre_delete, sender=Event)
def pre_delete_event(sender, **kwargs):
    if Event.component == TSTAT:
        if Event.rawvalue >= 20:
            return JsonResponse(event.json())
    if Event.component == BATT:
        if Event.rawvalue >=85
            return JsonResponse(event.json())

Like this?

stuck furnace
#

What's this problem you're working on? thinkmon

pulsar island
#

django signals post_save_event function for post import/ingest of data to detect and conduct a test condition for a qualifier to generate a notification

#

is that worded wordy right? I dont know how to speak developer.

stuck furnace
#

Right

#

Yeah yeah. Although I'm not sure I really understood completely sorry 😄

#

I'm going to read a bit about Django signals.

pulsar island
#

/gif hanson

vocal basin
#

(for match)

pulsar island
#

its ok. im ok with making multiple functionns to get er done. A pig with lipstick still makes bacon

vocal basin
#

first, use r-strings for paths

#
r"path\to\dir"
#

readability

vocal basin
#

this is just a highlighting bug

#

\30 and \. shouldn't be different

stuck furnace
#

I recommend using pathlib from the standard library.

vocal basin
#

definitely

somber heath
#

pharynx @flat sentinel

vocal basin
#
Path("../../30DayQuakes.json")
vocal basin
stuck furnace
#

Yep 👍

flat sentinel
#

volo dolum

stuck furnace
#

Wdym? pithink

vocal basin
#

pathlib does not care

#

it validly recognises this

#

why do you need to chdir anyway?

vocal basin
#

it auto-converts to backslashes on windows

#

call .absolute() on the path if you need to

#

or, better

#

.resolve()

#

proof?

#

works perfectly fine

#

(called from user directory)

#

how are you testing whether it works?

#

what should the path be?

#

@lunar haven why not just "30DayQuakes.json"?

#

the error message showed what the value of inpf was

#

and it could've been inferred that it shouldn't have ../.. there

somber heath
vocal basin
#

it's from a root not from current directory

#

try this

inpf = (Path(__file__) / "../../../30DayQuakes.json").resolve()
#

.wa Wolfram Alpha

viscid lagoonBOT
vocal basin
#

__file__ is the current source file

vocal basin
#

useful if you have bundled resources in packages

flat sentinel
#

Embrace the 𒀉𒀀𒀭𒇇𒅇𒀉. Keep bronzeposting. 𒅋𒋫𒄠𒋢𒌝𒊏𒊏𒋗𒌒𒋾𒂊𒆷𒋾.

lucid blade
vocal basin
#

!d pathlib.Path.open

wise cargoBOT
#

Path.open(mode='r', buffering=- 1, encoding=None, errors=None, newline=None)```
Open the file pointed to by the path, like the built-in [`open()`](https://docs.python.org/3/library/functions.html#open "open") function does:

```py
>>> p = Path('setup.py')
>>> with p.open() as f:
...     f.readline()
...
'#!/usr/bin/env python3\n'
vocal basin
#

Path objects have an open method

#

text read, yes

#

there's also

#

!d pathlib.Path.read_text

wise cargoBOT
#

Path.read_text(encoding=None, errors=None)```
Return the decoded contents of the pointed-to file as a string:

```py
>>> p = Path('my_text_file')
>>> p.write_text('Text file contents')
18
>>> p.read_text()
'Text file contents'
```  The file is opened and then closed. The optional parameters have the same meaning as in [`open()`](https://docs.python.org/3/library/functions.html#open "open").

New in version 3.5.
flat sentinel
vocal basin
#

disturbingly nonlinear

#

!d pathlib

wise cargoBOT
#

New in version 3.4.

Source code: Lib/pathlib.py

This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.

../_images/pathlib-inheritance.png If you’ve never used this module before or just aren’t sure which class is right for your task, Path is most likely what you need. It instantiates a concrete path for the platform the code is running on.

Pure paths are useful in some special cases; for example:

vocal basin
#

purely syntactical, as long as the type of path is UnixPath or WindowsPath

flat sentinel
vocal basin
#

Europe is all the way to Ural

#

"Russia's land is in Europe, Asia, and African mines"

#

Kemalstan?

vocal basin
#

Russia's economy is tiny

flat sentinel
somber heath
#

@haughty umbra @green inlet 👋

amber raptor
#

!e python print(int('Hello'))

wise cargoBOT
#

@amber raptor :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     print(int('Hello'))
004 |           ^^^^^^^^^^^^
005 | ValueError: invalid literal for int() with base 10: 'Hello'
vocal basin
#

projection issues?

#

same as how you see Greenland

#

(on maps)

rugged root
#

True

vocal basin
#

and still (as I heard) Netherlands' economy is comparable to Russian economy without oil and gas

#

US just hides the oil rigs inside the cities

#

!e

print(int("𐒣𑄺𑃸𑃸𑄶"))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

34880
vocal basin
#

(screenshot if someone doesn't see those characters)

lucid blade
fierce wigeon
#

hello world

vocal basin
fierce wigeon
#

listening you guys remember when I were young

vocal basin
#

!e

print(int("𐒣𑄺𑃸𑃸𑄶٠໖𑄶۲𑃸႕"))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

34880060285
lucid blade
vocal basin
lucid blade
fierce wigeon
#

I will be the pilot of one of these things

vocal basin
golden sonnet
#

👋

#

anyone know a good free course for network+?

fierce wigeon
#

what is that are went to stanford

golden sonnet
#

or something around that

fierce wigeon
#

it lied to me today

#

it changed one word of place

#

you said halllucinations or im going insane

vocal basin
#

what is chdir for anyway?

#

just use the path itself

#
inpp = Path(inp_path)
outp = inpp.with_stem(inpp.stem)
vocal basin
#
inpp = Path(inp_path)
out_dir = inpp.with_suffix("")
out_dir.mkdir(exist_ok=True)
outp = out_dir / inpp.name
#

you don't need \\ in paths

#

it's always equivalent to / on Windows

#

because Path is stored as a list of parts

fierce wigeon
#

get it

#

😉

#

I use defacto once

vocal basin
#

there is also Path("a", "b") instead of Path("a/b")

lucid blade
#
vocal basin
#

!e

from pathlib import Path
print(Path("a", "b") == Path("a/b"))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
vocal basin
#

I prefer using / when combining things that are know to be paths
but it should be fine like that too

fierce wigeon
#

helicopters are cars

vocal basin
#

less nesting

lucid blade
fierce wigeon
#

I broke all the mechanics of my car and seeing this video makes me cry

vocal basin
#

second drops everything before the name

fierce wigeon
#

every is possible with pressure, a dream team and money

vocal basin
#
abc/abc/abc/abc/stem.suffix
^^^^^^^^^^^^^^^ ^^^^^^^^^^^
parent          name
rugged root
#

@lucid blade give me back the tin foil

vocal basin
#

military has a habit of promoting conspiracy theories to cover up their own activities

fierce wigeon
#

are from military

vocal basin
#

those are mostly just illusions not actual objects

#

rarely weather effects

#

even more rarely -- something people made

#

you're claiming two separate things

vocal basin
#

aka visual sightings

fierce wigeon
#

a 100000w reflector

vocal basin
#

ball lightnings have something like a couple of potentially reliable recordings
and similar looking phenomena seems to be replicable in experiments
but, like, them as weather/natural thing are still rather hypothetical/unstudied

fierce wigeon
#

if you point a laser beam in a sphere it becames all color

vocal basin
#

there's also some stupid analytical result that, if you point it at an opaque sphere, the brightest shadow point will be in the middle

#

!e

# this being allowed did some irreversible things to my brain
print(int("૧୨৪༥႖૭꧸"))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

1245678
stuck furnace
#

The different wavelengths travel at the same speed, but when the speed changes they refract at different angles, which splits the light up into its components.

somber heath
vocal basin
#

I might have forgotten

stuck furnace
#

Yeah it wont be split into constituent wavelengths if it's just one wavelength.

#

I don't really understand how lasers work 😄

#

It's some quantum mechanical thing, and I never got that far in physics.

stuck furnace
vocal basin
#

I studied quantum mechanics in part because that way I could explain my absence from dancing lessons (schedule overlapped quite luckily)

#

@rugged root
do we still have temporary 1H AFK measures in this chat?

rugged root
#

Unfortunately

vocal basin
#

2 months long temporary

stuck furnace
#

Sorry just dealing with something

#

Ah right ok

lucid blade
vocal basin
#

"just introduce social credit system"?

#

damn, discord took a long time to check that message

vocal basin
vocal basin
#

some systems are fundamentally and reasonably opaque

stuck furnace
#

Sorry are you talking about video permissions or the moderator role?

rugged root
#

Being able to grant the video perms

vocal basin
#

one chance is one chance too much

stuck furnace
#

Yeah I think the criteria for this are just trust and familiarity.

vocal basin
#

just write a book on making a better system addressing all potential concerns

tepid edge
#

Honestly I think there's an alternate solution

lucid blade
#

@lunar haven H5 😉

stuck furnace
#

Mods can grant permissions on a temporary basis. Admins will then grant them for a probationary period. If that goes well, they get permanent permissions.

tepid edge
#

Just give the people with stream permission the ability to create a temp channel

stuck furnace
#

The only goal is to prevent misuse of the permissions.

tepid edge
#

where people can stream or they can grant stream permissions

#

or something

vocal basin
#

@midnight agate giving out video roles is useless without kick permissions

tepid edge
#

probably granting stream permissions

vocal basin
#

you know who has kick permissions?

#

moderators

#

you know what also moderators have?

#

granting Video

stuck furnace
#

@honest kayak Your nickname was setting off a load of moderator pings sorry 😄

#

You should be able to change it to something else.

#

Oh actually sorry, I need to un-starify you I think.

honest kayak
#

Bro It was literally a barcode

vocal basin
vocal basin
stuck furnace
honest kayak
#

Oh ok

vocal basin
#

is Bell Labs still Nokia?

lucid blade
#

he lived in new foundland

#

but moved to a city in canada where nokia had offices

fierce wigeon
#

Bell Labs offering eletrictal services too

lucid blade
#

idk about bell labs

vocal basin
fierce wigeon
#

probably Adobe Photoshop

vocal basin
#

the amount of different diagonals is scary

#

at least some are aligned

peak copper
stuck furnace
#

👀

#

!stream 373160837151719424 30M

wise cargoBOT
#

✅ @lime vale can now stream until <t:1682980606:f>.

stuck furnace
#

Yeah I'm here 😄

#

Currently debugging the bot.

vocal basin
#
print(any(quake["properties"]["felt"] is not None and quake["properties"]["felt"] > 25000 for quake in data["features"]))
print(any(quake["properties"].get("felt", 0) > 25000 for quake in data["features"]))
print(any(felt_by_more_than(quake, 25_000) for quake in data["features"]))
vocal basin
vocal basin
stuck furnace
vocal basin
vocal basin
#

change to .get at least; or use or

#

or both

#

rather

#
collection.get(key) or default
vocal basin
#

which is basically

#
collection[key] == x and x > 0  =>  x
                     otherwise  =>  0
#

add or 0 after get

#

and remove , 0 from get

#

@lunar haven also, add parentheses

#

add parentheses

#

or else it's wrong

#

(collection.get(...) or default) > 25_000

#

this isn't javascript

#

!d dict.get

wise cargoBOT
#

get(key[, default])```
Return the value for *key* if *key* is in the dictionary, else *default*. If *default* is not given, it defaults to `None`, so that this method never raises a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError "KeyError").
#

get(key[, default])```
Return the value for *key* if *key* is in the dictionary, else *default*. If *default* is not given, it defaults to `None`, so that this method never raises a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError "KeyError").
vocal basin
#

without or hacks

# TODO: find a better name
def get_default_not_none(collection, key, default):
    maybe_value = collection.get(key)
    return default if maybe_value is None else default
#

it won't

granite plank
#

@lavish rover can I stream algebra school work

lavish rover
granite plank
#

Oh

#

kek

stuck furnace
#

What happened, I wasn't paying attention? 😄

lavish rover
#

people go bye

stuck furnace
#

Ah ok

#

Yo

#

Bringing us towards the AI apocalypse 3 times faster

#

You can drop the inner () when you pass a generator expression as the sole argument of a function call.

#

Oh wait nvm, I thought it was any((...)), but misread.

vocal basin
#

I'm thinking about a very dumb idea right now
how to implement as much as possible using iterators/generators

def function_to_generator(f):
    yield f(yield)

def list_but_worse(it):
    """\
to the outside, this is an iterator of iterators
"""
    list_ = list(it)  # there should actualy be some hack to avoid using `list`
    while True:
        yield iter(list_)
#

I think if I try making anything sensible out of it, it'll just be something equivalent to "boring" things like an actor model but worse

stuck furnace
#

Working on any coding projects @whole bear? 😄

#

Sounds reasonable

desert vector
#

and that, my friend, is how you make breakthroughs

#

by not knowing what the hell you're doing

stuck furnace
#

Fix my ChatGPT-generated code has become a pretty common question in this server.

vocal basin
stuck furnace
#

👋

#

No worries

#

Mustafa relayed my question 😄

vocal basin
#

no it's not

#

Python doesn't have a concept of pass-by-value vs pass-by-reference

#

!e

print(sorted('abc'))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

['a', 'b', 'c']
vocal basin
#

sorted returns list

stuck furnace
#

Yeah I mis-read your code sorry.

vocal basin
#

it's mutable vs immutable

#

not reference vs value

#

sorted sometimes changes the original value

#

!e

value = iter([1])
print(*value)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

1
vocal basin
#

!e

value = iter([1])
sorted(value)
print(*value)
wise cargoBOT
#

@vocal basin :warning: Your 3.11 eval job has completed with return code 0.

[No output]
stuck furnace
#

So like it can consume an iterator.

#

Iterators can only be looped over once.

#

Sorry that might not have been the best way to put it lemon_sweat

#

Not seen gof sorry 😄

#

Erm, nah just never got around to it.

vocal basin
#

.sort[::-1] consumes extra memory

#

also

#

@lunar haven sorting stability

stuck furnace
#

.sort modifies the list in-place.

vocal basin
stuck furnace
#

I think collections.deque is a linked-list.

vocal basin
#

!e

# ihatemyself.py
def empty():
    return
    yield

def one(item):
    yield item

def repeat(item):
    while True:
        yield item

def repeat_ones(item):
    while True:
        yield one(item)
        
def _join(it0, it1):
    yield from next(it0)
    yield from next(it1)

def join(it0, it1):
    while True:
        yield _join(it0, it1)
    
def listify(it):
    ls = repeat(empty())
    for item in it:
        ls = join(ls, repeat_ones(item))
    while True:
        yield next(ls)

arr = listify([1, 2, 3])
print(*next(arr))
print(*next(arr))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1 2 3
002 | 1 2 3
stuck furnace
vocal basin
#

!e

print(sorted([0, 1], key=(lambda _: 0), reverse=True))
print(sorted([0, 1], key=(lambda _: 0))[::-1])
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | [0, 1]
002 | [1, 0]
vocal basin
stuck furnace
#

Pretty sure it is 😸

vocal basin
#

I doubt it is a linked list

#

I'd expect ring buffers

stuck furnace
#

Ah right

wise cargoBOT
#

Modules/_collectionsmodule.c line 33

/* Data for deque objects is stored in a doubly-linked list of fixed```
vocal basin
#

well, works if works

stuck furnace
#

Cya Fred 👋

vocal basin
stuck furnace
#

The code is pretty readable too, probably because it's written by Raymond Hettinger.

#

I'd say "accessing" and "mutating"

vocal basin
#

sorted isn't guaranteed to be immutable
but it's expected to be immutable on variables which are immutable when iterated over

faint raven
#

Hi guys i'm new here

#

!epython print("i am new here")

wise cargoBOT
#

@lunar haven :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     from future import braces
004 | ModuleNotFoundError: No module named 'future'
vocal basin
#

!e

from __future__ import braces
wise cargoBOT
#

@vocal basin :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     from __future__ import braces
003 |     ^
004 | SyntaxError: not a chance
stuck furnace
#

Heading off for a bit 👋

vocal basin
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

i am new here
vocal basin
#

I'm addicted to doing this now

vocal basin
limpid umbra
#

scrub 42 - replace with 89

vocal basin
#

!e

print(int("৪୨"))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

42
vocal basin
#

just not to recursion-crash

#

!server

wise cargoBOT
#
Server Information

Created: <t:1483877013:R>
Roles: 105
Member status: status_online 44,578 status_offline 332,203

Members: 376,781

Helpers: 150
Moderation Team: 35
Admins: 12
Directors: 3
Contributors: 47
Leads: 14

Channels: 257

Category: 28
Forum: 3
News: 10
Staff: 119
Stage_Voice: 1
Text: 89
Voice: 7

vocal basin
#

brain not wrok

vocal basin
#

before "restructuring"

#

the original point was about incorrectly restructuring the project

#

rewriting parts in Rust, specifically

vocal basin
#

I'm highly against doing administrative duties
for quite a lot of reasons

#

there are two types of servers in Discord

faint raven
#

!e python print("i'm hungry")

wise cargoBOT
#

@faint raven :white_check_mark: Your 3.11 eval job has completed with return code 0.

i'm hungry
vocal basin
#

you have higher liabilities if you make the first one

#

if the server lacks moderation, your access to "community" features will probably get restricted in one way or another

#

what they do state explicitly in (probably) multiple places is that they care about "community" server moderation more than typical server moderation

#

Discord themselves don't host your bots

#

poll API, iirc

#

event based

#

websockets are involved at some point
but I'm not sure where exactly

#

didn't look into it yet

#

Discord's API is based around two core layers, a HTTPS/REST API for general operations, and persistent secure WebSocket based connection for sending and subscribing to real-time events.

#

very good row for taking out of context

vocal basin
#

[making attempts at ]writing two external book-like pieces of documentation on the project I'm doing in Rust

#

one is about the functional programming basis

#

another is about distributed storage part

#

not the implementation of distributed storage "on the low level", but rather usage of some underlying system

#

they are separate because only one of them is Rust-specific

#

there should be a third one focusing on listing all the algorithms/data structures used
because there are some concepts from the distributed storage part which are not required here

vocal basin
#

which are being developed since 2020

#

and finally are getting migrated to a form both more flexible and more robust

#

test?

#

*or I might've misheard*

#

speaking of tests, I don't have any separating abstract algorithms from the distributed storage allows to write tests without involving some more heavy context-specific objects

#

subset testing algorithm, that I wrote, for example, works on abstract binary trees

#

it might look horrifying because of the amount of Rc it has
but it's kind of reasonable

#

(it's Rcd anyway so this doesn't add any real overhead)

#

and using references just doesn't work

#

for now, at least

vocal basin
#

also
dereferencing a pointer to a node might fail

#

"pointer"

#

it might be a URL, for example

#

I will probably duplicate the code in a more general-public-appropriate variant

#

because right now there are references to internal projects in docs and other places

vocal basin
junior ermine
#

future

wise cargoBOT
#

@lunar haven :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     from __future__ import braces
003 |     ^
004 | SyntaxError: not a chance
junior ermine
#

!e from future import braces

wise cargoBOT
#

@junior ermine :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     from __future__ import braces
003 |     ^
004 | SyntaxError: not a chance
junior ermine
#

!e import future

wise cargoBOT
#

@junior ermine :warning: Your 3.11 eval job has completed with return code 0.

[No output]
junior ermine
#

1min

#

do someone can give me permission to stream? i wanna show ,my app to gofek

#

@stuck furnace

stuck furnace
#

Sorry, not unless a mod is present, and I'm heading off.

junior ermine
#

oks

somber heath
#

@earnest grotto 👋

earnest grotto
#

@somber heath Hi, can't talk right now 😢

wise cargoBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

somber heath
#

The crested pigeon (Ocyphaps lophotes) is a bird found widely throughout mainland Australia except for the far northern tropical areas. Only two Australian pigeon species possess an erect crest, the crested pigeon and the spinifex pigeon. The crested pigeon is the larger of the two species. The crested pigeon is sometimes referred to as a topkn...

#

The common bronzewing (Phaps chalcoptera) is a species of medium-sized, heavily built pigeon. Native to Australia and one of the country's most common pigeons, the common bronzewing is able to live in almost any habitat, with the possible exception of very barren areas and dense rainforests. Its advertising call is an extraordinary mournful whoo...

#

The Australian king parrot (Alisterus scapularis) is a species of parrot endemic to eastern Australia ranging from Cooktown in Queensland to Port Campbell in Victoria. Found in humid and heavily forested upland regions of the eastern portion of the continent, including eucalyptus wooded areas in and directly adjacent to subtropical and temperate...

#

The sulphur-crested cockatoo (Cacatua galerita) is a relatively large white cockatoo found in wooded habitats in Australia, New Guinea, and some of the islands of Indonesia. They can be locally very numerous, leading to them sometimes being considered pests. A highly intelligent bird, they are well known in aviculture, although they can be deman...

#

The galah (; Eolophus roseicapilla), also known as the pink and grey cockatoo or rose-breasted cockatoo, is the only species within genus Eolophus of the cockatoo family. Found throughout Australia, it is among the most common of the cockatoos. With its distinctive pink and grey plumage and its bold and loud behaviour, it is a familiar sight in ...

#

The spotted pardalote (Pardalotus punctatus) is one of the smallest of all Australian birds at 8 to 10 centimetres (3.1 to 3.9 in) in length, and one of the most colourful; it is sometimes known as the diamondbird. Although moderately common in all of the reasonably fertile parts of Australia (the east coast, the south-east, and the south-west c...

#

The eastern spinebill (Acanthorhynchus tenuirostris) is a species of honeyeater found in south-eastern Australia in forest and woodland areas, as well as gardens in urban areas of Canberra, Sydney, Melbourne and Adelaide. It is around 15 cm long, and has a distinctive black, white and chestnut plumage, a red eye, and a long downcurved bill.

#

Currawongs are three species of medium-sized passerine birds belonging to the genus Strepera in the family Artamidae native to Australia. These are the grey currawong (Strepera versicolor), pied currawong (S. graculina), and black currawong (S. fuliginosa). The common name comes from the call of the familiar pied currawong of eastern Australia a...

#

Kookaburras (pronounced ) are terrestrial tree kingfishers of the genus Dacelo native to Australia and New Guinea, which grow to between 28 and 47 cm (11 and 19 in) in length and weigh around 300 g (11 oz). The name is a loanword from Wiradjuri guuguubarra, onomatopoeic of its call. The loud, distinctive call of the laughing kookaburra is widely...

whole bear
#

YOOO

somber heath
#

The white-winged chough (Corcorax melanorhamphos) is one of only two surviving members of the Australian mud-nest builders family, Corcoracidae, and is the only member of the genus Corcorax. It is native to southern and eastern Australia and is an example of convergent evolution as it is only distantly related to the European choughs that it clo...

whole bear
#

how goes it?

somber heath
#

@sacred tundra 👋

somber heath
#

The little raven (Corvus mellori) is a species of the family Corvidae that is native to southeastern Australia. An adult individual is about 48–50 cm (19–19.5 in) in length, with completely black plumage, beak, and legs; as with all Australian species of Corvus, the black feathers have a grey base, and the iris of the adult bird is white (typica...

#

@whole bear 👋

fair citrus
#

Hello

#

@turbid sandal @crystal fox I couldn't hear any of you because discord voice chat is blocked where I live

#

I just wanted to ask if any of you have knowledge in sphinx

turbid sandal
#

no @fair citrus

fair citrus
#

okay thank you

somber heath
#

@jolly slate 👋

limpid umbra
#

@somber heath OY! ya got dem fancy birds up there ( oz top of world , righto )

#

do they make a 4k at 240 Hz

somber heath
#

@calm mist 👋

calm mist
#

Hi

#

what about are they talking

somber heath
#

The topic varies.

limpid umbra
#

whats the re-sale value of a lambo

somber heath
#

About $3.50.

calm mist
#

you saying what you want sell crypt coins @turbid sandal

limpid umbra
#

servers devalue - no business person will buy them

#

if your underage , then you daddy will be held liable

#

is this the cartoon channel

#

@somber heath so are wild parrots , common there

#

@somber heath i always look at the 4k vids of birds , especially parrots flying in a flock

#

@somber heath bird jail

#

@somber heath did you ever hear a budgie talk

#

@somber heath most animals need to be wild , cats may be ok

#

@somber heath i feel sorry for big dogs in a house , they need a farm to run around in

#

@rugged root when the cat away ,,,,,, the mice will play

#

is Hemmy getting some coffee , and a banana chocolate chip muffin before work

#

grapefruit has that same effect - 50/50 love hate

#

dont get to deep of confookled hooman rules - its just mind bending

#

14 yr kinda elderly for a cat

#

i hear good things about canabis and cancer

crystal fox
limpid umbra
#

if your cat starts hiding to sleep - its kinda the beginning of the end

rugged root
#

I know

limpid umbra
#

did you train your rats

#

@crystal fox did you train your rats

#

@crystal fox they can press a button then , text to speech setup

#

@crystal fox that is a must do project

#

@crystal fox food reward thingy

#

i got a nice $10 keyboard and mouse

thin galleon
#
Always on start: [5, 63, 1, 0, 0, 1]
Always on start: [11, 134, 36, 0, 112, 6, 0, 0, 118, 16, 0, 0]
Always on start: [7, 54, 144, 1, 232, 3, 0, 0]
FINISH LINE: [17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 252, 0, 23, 51, 34, 35]
UNKNOWN!: [16, 39, 6, 33, 242, 189, 31, 73, 149, 1, 7, 255, 129, 200, 0, 144, 1]
NEW TRACK (dont know which):[17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 254, 0, 41, 0, 22, 22]
UNKNOWN!: [16, 39, 12, 18, 242, 189, 31, 73, 139, 1, 7, 255, 129, 200, 0, 144, 1]
UNKNOWN!: [16, 39, 13, 18, 242, 189, 31, 73, 142, 1, 7, 255, 129, 200, 0, 144, 1]
NEW TRACK (dont know which):[17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 254, 0, 0, 0, 39, 44]
UNKNOWN!: [16, 39, 12, 18, 242, 189, 31, 73, 122, 1, 7, 255, 129, 200, 0, 144, 1]
UNKNOWN!: [16, 39, 13, 18, 242, 189, 31, 73, 143, 1, 7, 255, 129, 200, 0, 144, 1]
NEW TRACK (dont know which):[17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 255, 0, 0, 0, 39, 45]
UNKNOWN!: [16, 39, 12, 57, 242, 189, 31, 73, 162, 1, 7, 255, 129, 200, 0, 144, 1]
SPECIAL TRACK:[6, 83, 249, 117, 0, 0, 0]
SPECIAL TRACK:[6, 79, 249, 117, 0, 0, 0]
SPECIAL TRACK:[6, 83, 219, 39, 0, 0, 0]
SPECIAL TRACK:[6, 79, 219, 39, 0, 0, 0]
UNKNOWN!: [16, 39, 13, 57, 242, 189, 31, 73, 150, 1, 7, 255, 129, 200, 0, 144, 1]
NEW TRACK (dont know which):[17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 0, 0, 0, 0, 56, 56]
UNKNOWN!: [16, 39, 12, 17, 242, 189, 31, 73, 139, 1, 7, 255, 129, 200, 0, 144, 1]
UNKNOWN!: [16, 39, 13, 17, 242, 189, 31, 73, 135, 1, 7, 255, 129, 200, 0, 144, 1]
NEW TRACK (dont know which):[17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 253, 0, 0, 0, 38, 44]
UNKNOWN!: [16, 39, 12, 23, 242, 189, 31, 73, 132, 1, 7, 255, 129, 200, 0, 144, 1]
UNKNOWN!: [16, 39, 13, 23, 242, 189, 31, 73, 136, 1, 7, 255, 129, 200, 0, 144, 1]
NEW TRACK (dont know which):[17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 255, 0, 0, 0, 39, 45]
UNKNOWN!: [16, 39, 12, 34, 242, 189, 31, 73, 147, 1, 7, 255, 129, 200, 0, 144, 1]
UNKNOWN!: [16, 39, 13, 34, 242, 189, 31, 73, 154, 1, 7, 255, 129, 200, 0, 144, 1]
FINISH LINE: [17, 41, 0, 0, 242, 189, 31, 73, 255, 129, 200, 0, 0, 0, 0, 0, 34, 34]
limpid umbra
#

@crystal fox you need lots vit C and D

rugged root
limpid umbra
#

youch

#

may 16 - was wondering if a asteroid was approaching

rugged root
#

Eh

#

Usually

#

But we're a small target

limpid umbra
#

Star Fleet is on the JOB!!!

#

everybody has covid , i feel so left out

#

jonny rotten = punk ?

#

jonny said some stuff then the BBC blacklisted him

rugged root
#

Yeah that tracks

limpid umbra
#

is goonygoogoo a ozzy thing

#

??

#

hmmmm , think of "The Goon show" from england , they secretly get drunk on the show

rugged root
#

Just makes me thing of SomethingAwful

limpid umbra
#

infected goonbag ?

#

as long as its high alcohol content - all is well

#

homebrew beer can be 12 or 18 % its nice

#

its the skin in red wine that is anti-cancer and anti-heart disease

#

gin as a marinade?

#

home brew beer is actually better - and when you go back to bought beer then its shocking

#

Q - mint julip , has gin ???

#

drinkology 1001

rugged root
limpid umbra
#

isnt NUMPY faster at deep arrays

somber heath
#

Numpy has speed advantages over regular Python.

#

Opportunities, at least.

rugged root
#

Word

limpid umbra
#

if you want to code for emotion - then how do you feel about , coffee HAL9000

#

Red Dwarf --- toaster AI

vocal basin
#

there's this video but I don't know how correct it is
https://youtu.be/8Fn_30AD7Pk

Related Videos

▶ Play video
limpid umbra
#

@pulsar island there playing you , they want more money before bailing out

#

@pulsar island its a open market - give each of the staff your business card

vocal basin
#

restarted because this wasn't showing up

#

(just made sure it's a bug on my side)

#

google maps?

limpid umbra
#

dragonfruit reminds mr of this.....

vocal basin
somber heath
#

Such a good series.

limpid umbra
#

i know i know

vocal basin
#

minesweeper.online
ERR_CONNECTION_REFUSED
sad situation

limpid umbra
#

your puppy is called Django ?

vocal basin
#

"full stack" is a buzzword

#

> Flask is good
eh

#

Flask is a good implementation of awful ideas

#

no matter how well you implement request object as a globally imported object, it's just wrong
no matter how well you implement WSGI, it's not ASGI

rugged root
#

Which his why they made this

vocal basin
#

Scala, to support XML literals

rugged root
#

I... guess

#

Still seems forced

vocal basin
#

> jams up the whole process
????

#

I guess this one depends on contextvars or something like it
I should check

from quart import request
rugged root
#

Neat

#

I haven't really looked much into quart

vocal basin
#

Flask probably does that too
(hopefully)

rugged root
#

I've... never heard of tons of these

vocal basin
#

there's way way more

rugged root
#

Just interesting how it's saying Popular ones

#

And Django is the only one that jumps out at me

vocal basin
rugged root
#

Masonite actually does seem kind of interesting

amber raptor
vocal basin
#

I tried to configure managed k8s as cheap as possible in Yandex Cloud price calculator
(just for fun)
$83.99 a month
sounds not cheap for its settings

amber raptor
#

So much wrong

rugged root
#

@turbid sandal What's up?

vocal basin
#

there are cases where "security through obscurity" is worth it economically/otherwise
not everyone is qualified enough

#

like

#

cases where you don't care if it's 50% secure

#

DRMs, for example

rugged root
#

True

vocal basin
# vocal basin DRMs, for example

... I was supposed to make a presentation on it at some point, but the audience was too much involved in !rule 5 stuff, so quite uncomfortable for me

rugged root
#

Fair

vocal basin
#

hashes
public keys
other no-private-key stuff

#

and for password only use specific hashes

terse needle
rugged root
#

!d hashlib

wise cargoBOT
#

Source code: Lib/hashlib.py

This module implements a common interface to many different secure hash and message digest algorithms. Included are the FIPS secure hash algorithms SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA’s MD5 algorithm (defined in internet RFC 1321). The terms “secure hash” and “message digest” are interchangeable. Older algorithms were called message digests. The modern term is secure hash.

Note

If you want the adler32 or crc32 hash functions, they are available in the zlib module.

Warning

Some algorithms have known hash collision weaknesses, refer to the “See also” section at the end.

vocal basin
lucid blade
#

2min i need headphones

vocal basin
#

just use PyNaCl

molten pewter
#

# compute the hash value of text
hash_value = hash(text)
print(hash_value)
vocal basin
#

wrong hash

#

!e

from hashlib import sha256
text = 'Python Programming'
print(sha256(text.encode()).hexdigest())
#

yoloing failed

wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

d15647d90cc9f8e341146110bf5058773171688b237d2f9b5704399a0b17c8bd
vocal basin
#

I only used PyInstaller

#

I kind of don't want to repeat that mistake

#

!e

import nacl.hashing
wise cargoBOT
#

@vocal basin :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     import nacl.hashing
004 | ModuleNotFoundError: No module named 'nacl'
rugged root
#

auto-py-to-exe

#

That's mah jam

vocal basin
raven knoll
#

yo

vocal basin
raven knoll
#

does anyone know how to make a script where i can paste something into it and it will automate my keystrokes and type it in for me

raven knoll
#

I need it to copy and paste essays that are pre made for me and need it to copy it in therre for me cause they have it block so I need it to automate keystrochs fdor me and but it in

#

@vocal basin

vocal basin
#

why do you need to copy and paste essays?

raven knoll
#

Can you do it?

vocal basin
somber heath
#

My race condition is human.

raven knoll
#

Like I made them in a google doc to maske sure there right and have some look over it in the google doc before I submit it

#

Can ytou do it or nah

vocal basin
#

okay
so you were supposed to write it in the text box, and not in the google doc, right?

raven knoll
#

Yes

#

right

vocal basin
#

do you understand why you aren't supposed to use google docs?

raven knoll
#

I write it in google doc becausde it easeir to make agustments there thrn in text box

raven knoll
vocal basin
#

because there's !rule 5 and !rule 8

raven knoll
#

I have it all typed out but I just need to but it in the text box

vocal basin
#

you aren't supposed to get external help on work that you receive grades for

#

type the text yourself, this is the cost you have to bear for external help

raven knoll
#

Bro its not a grade

vocal basin
#

if the site/app blocks pasting text, there are reasons for it

raven knoll
vocal basin
#

why is pasting text blocked?

somber heath
#

Just large amounts?

raven knoll
raven knoll
vocal basin
#

is it a site?

raven knoll
#

Its a game

vocal basin
#

or an app?

raven knoll
#

A game

#

Can you do it or nah bruh

vocal basin
#

I'm not sure it's ToS-allowed

raven knoll
#

What is not tos

lucid blade
#

BBL

stuck furnace
#

Alright calm down everyone 😄

raven knoll
#

I have look at roles and its not I just need it to copy and past from the google doc to the text box

stuck furnace
#

Verdoof

raven knoll
#

?????????????????

stuck furnace
#

@turbid sandal Not really appropriate.

#

Cape Canaveral actually has bald eagles 😄

#

One flew along side the bus when I was there last.

#

It was majestic

#

Yeah that was arguably not a very smart decision by them 😄

#

They were building a steel plate to go under the pad, but decided not to wait till it was completed.

wind raptor
lucid blade
#

lmfao

#

classic

wind raptor
#

Love it

somber heath
#

@frigid tangle 👋

frigid tangle
crystal fox
crystal fox
somber heath
willow light
#

To critics, the dirt bikes and ATVs that buzz around city streets are a dangerous nuisance. Others, including Boston's mayor, call them a much-needed outlet for the city's young people.

Subscribe to WCVB on YouTube now for more: http://bit.ly/1e8lAMZ

Get more Boston news: http://www.wcvb.com
Like us: https://www.facebook.com/wcvb5
Follow us: ...

▶ Play video
sweet lodge
amber raptor
#

YAML Proves Dynamic Typing is awful

stuck furnace
#

gtg 👋

sweet lodge
amber raptor
#

or TOML depending

sweet lodge
#

JSON feels verbose

#

But TOML feels limiting somtimes

amber raptor
sweet lodge
#

Well, IDK
I wouldn't actually have any problem with just shutting up and using JSON

amber raptor
#

people say verbose like it's a bad thing, it's not, it's ultra clear what is going on

sweet lodge
#

Agreed

willow light
#

and that's why Java 8 is a good language

#

Verbose can be a good thing, look at FizzBuzz Enterprise Edition

vocal basin
amber raptor
vocal basin
#

NumberIsMultipleOfAnotherNumberVerifier.java

#

IntegerIntegerStringReturner.java

#

NoFizzNoBuzzStrategy.java
"no fizz no buzz"

willow light
#
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.factories;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.visitors.FizzBuzzOutputGenerationContextVisitor;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.factories.OutputGenerationContextVisitorFactory;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.visitors.OutputGenerationContextVisitor;

vocal basin
#

StringStringReturnerFactory.java

willow light
#
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.factories;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.stringreturners.IntegerIntegerStringReturner;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.factories.IntegerStringReturnerFactory;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.stringreturners.IntegerStringReturner;

/**
 * Factory for IntegerIntegerStringReturner
 */
@Service
public class IntegerIntegerStringReturnerFactory implements
        IntegerStringReturnerFactory {

    private final IntegerIntegerStringReturner _integerIntegerStringReturner;

    /**
     * @param _integerIntegerStringReturner IntegerIntegerStringReturner
     */
    @Autowired
    public IntegerIntegerStringReturnerFactory(final IntegerIntegerStringReturner _integerIntegerStringReturner) {
        super();
        this._integerIntegerStringReturner = _integerIntegerStringReturner;
    }

    /**
     * @return IntegerStringReturner
     */
    @Override
    public IntegerStringReturner createIntegerStringReturner() {
        return this._integerIntegerStringReturner;
    }

}

I see nothing wrong here

vocal basin
#

can't find any factory factories yet

willow light
#

There was a pull request for a factory factory factory

vocal basin
vocal basin
#

should add alternative implementation with DSLs

#

from that one paper

#

are we sure it even can compile?

willow light
#

Next we need to make a front end in Angular.js

Not the new fancy Angular 2 that the kids are using these days, it's too new we can't be sure it works yet.

vocal basin
#

just use bash scripts and webhook endpoints written in php

#

perl

#

?

willow light
#

c-shell

#

and cobol

#

Make sure the whole thing is running on the mainframe on-prem.

vocal basin
#

yes, was about to ask if webhook endpoints could be in cobol

willow light
#

Honestly why is this using Rest? It should be using SOAP. That way we can get the true enterprise feel

#

Maybe as a concession to the modern era we can integrate it with WSO2

somber heath
#

@frank jay 👋

vocal basin
#

http-to-whatever-cobol-understand layer written in Ruby

don't forget to fall off while iterating over lists and handling exceptions instead of using for loops

#

because Ruby has (had) a feature of generating the full traceback even when unnecessary

#

Python doesn't explode when you throw StopIteration/IndexError

rugged root
#

I would hope not

willow light
vocal basin
vocal basin
#

RSS feed of JPEGs encoded in base85

rugged root
#

@lunar haven You can shorten lines 15 and 27

willow light
#

well taking into account 0 == False returns True

#

actually, let's test that

#

!e

assert 0 == False
vocal basin
#

== not is

#

!e

print(False == 0)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
#

@willow light :warning: Your 3.11 eval job has completed with return code 0.

[No output]
vocal basin
#

!e

print(False == 0)
print(True == 1)
print(int(False))
print(int(True))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | True
002 | True
003 | 0
004 | 1
vocal basin
#

!e

match True:
    case int():
        print('int')
    case bool():
        print('bool')
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

int
willow light
#

!e
assert False

wise cargoBOT
#

@willow light :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     assert False
004 | AssertionError
vocal basin
willow light
#

Don't get me started on actual code I've seen in production

#
# validation.py
assert(1==1)
vocal basin
#

!e

print(issubclass(bool, int))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
vocal basin
#

because this

#

this checks for isinstance not type equality

case int():
willow light
#
import requests
import os

url = os.path.join("https://jsonplaceholder.com", "get")
r = requests.get(url).json()
#

actual code in production right now

vocal basin
#

oh, I think I can simplify that code

rugged root
#

@lunar haven So what're you currently working on/what're you stuck on, etc.

vocal basin
# vocal basin oh, I think I can simplify that code

!e

def empty():
    return
    yield
def one(item):
    yield item
def repeat(item):
    while True: yield item  # pep8n't
def repeat_ones(item):
    while True: yield one(item)  # pep8n't
def _join(it0, it1):
    yield from next(it0)
    yield from next(it1)
def join(it0, it1):
    while True: yield _join(it0, it1)  # pep8n't
def listify(it):
    ls = repeat(empty())
    for item in it:
        ls = join(ls, repeat_ones(item))
    yield from ls
arr = listify([1, 2, 3])
print(*next(arr))
print(*next(arr))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1 2 3
002 | 1 2 3
rugged root
#

All good all good

rugged root
#

Just wondering if there was anything I could help with

vocal basin
#

very wrong

def empty():
    return
    yield
#

yes

#

!e

def example():
    yield

print(next(example()))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

None
vocal basin
#

!e

def example():
    msg = yield
    print('message: ', msg)

print(next(example()))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

None
vocal basin
#

eh

#

need to next() once more

#

!e

def example():
    msg = yield
    print('message: ', msg)
    yield msg

g = example()
print(next(g))
print(next(g))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | None
002 | message:  None
003 | None
vocal basin
#

!e

def example():
    yield (yield)

g = example()
print(next(g))
print(next(g))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | None
002 | None
vocal basin
#

!e

def example():
    yield (yield 1)

g = example()
print(next(g))
print(g.send(2))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
rugged root
vocal basin
#

!e

def example():
    yield (yield 1)

g = example()
print(g.send(None))
print(g.send(2))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
vocal basin
#

so

#

g.send(None) is equivalent to next(g)

#

when you dog.send(x), yield evaluates to x

#

!e

def double():
    request = yield
    while True:
        response = 2 * request
        request = yield response

g = double()
g.send(None)
print(g.send(1))
print(g.send(2))
print(g.send("3"))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 2
002 | 4
003 | 33
somber heath
#

@whole bear 👋

rugged root
#

That'll tell you what you need to know about the voice gate

vocal basin
#

initial send(None) is to start it

vocal basin
vocal basin
#

is the game made by you?

#

!rule 5

wise cargoBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

rugged root
#
rugged root
#

no u

#

I want to make use of JS stuff

terse needle
#

no

#

we just like to shill obscure programming languages

vocal basin
#

only yield, next, while True, for

#

and functions, I guess

#

to some extent

#

I wonder if it's enough to implement a queue

vocal basin
rugged root
#

Damn it, I'm getting discouraged again

#

Looking at the Elm repo and there hasn't been a main commit since September

vocal basin
#

what browser?

#

what do you run HTML on?

maiden skiff
#

hi

vocal basin
maiden skiff
#

I studied English today.

maiden skiff
rugged root
vocal basin
#

if it involves databases, it probably should be on the back-end not in HTML

maiden skiff
rugged root
#

Fair.

#

Kind of hard without knowing Korean, though

#

Because I'd assume you'd need some common ground

vocal basin
maiden skiff
#

Now I can use the microphone and I'm still chatting because I'm scared.

vocal basin
rugged root
maiden skiff
vocal basin
#

if you want to ban someone, it's way way easier to do that server-side

rugged root
#

And more reliable

rugged root
vocal basin
#

quite obfuscated, not really code anymore

#

it's not the source file of the site

#

it's a compiled site

#

(just to make sure you understand that)

maiden skiff
#

I'll finish my job and join the channel

swift valley
#

I slept early and woke up early

#

Too early

#

It's about 3

#

am

wise cargoBOT
#

Source code: Lib/pprint.py

The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter. If the formatted structures include objects which are not fundamental Python types, the representation may not be loadable. This may be the case if objects such as files, sockets or classes are included, as well as many other objects which are not representable as Python literals.

The formatted representation keeps objects on a single line if it can, and breaks them onto multiple lines if they don’t fit within the allowed width. Construct PrettyPrinter objects explicitly if you need to adjust the width constraint.

vocal basin
#

I can't brain
what even is MonadFailAny
why did I name it like that

#

(trying to make Future of a Result work in some ways that Result works)

#

syntax error?

#
case _ if x >= 90:
    ...
#

@lunar haven case _ if not case if

#

pattern part is always required

#

and _ is the catch-all pattern

#
case <pattern>[ if <condition>]:
    ...
#

if-elif-else might be better for this case

#

not in this language

#

pattern matching

#

if there's any need to destructure data or check types, I tend to use match

#

if, on the other hand, the task is strictly conditional, then, usually, if-elif-else chains are better for Python

#
if x >= 90:
    ...
elif x >= 80:
    ...
elif x >= 70:
    ...
elif x >= 65:
    ...
else:
    ...
#

ML/Haskell derivatives often have better ways to match values in this form

swift valley
#

C# has relational patterns:

string WaterState(int tempInFahrenheit) =>
    tempInFahrenheit switch
    {
        (> 32) and (< 212) => "liquid",
        < 32 => "solid",
        > 212 => "gas",
        32 => "solid/liquid transition",
        212 => "liquid / gas transition",
    };
#

which I find neat

vocal basin
#

ah, yes x is > 0 and < 10 thing, I forgot

#

I guess, my brain just considered C#'s new switch an ML derivative in that regard because F# exists

#

(C# 8 being "new")

#

that's 2019

#

semantic versioning

#

(which neither projects actually follow)

#

major.minor.patch
major -- breaking changes
minor -- backwards-compatible
patch -- forwards-compatible

swift valley
#

SemVer is a pretty new idea

#

At least relative to most languages

vocal basin
#

time to see how much wrong my untested code is

#

!e

import bisect
grades = [
    (65, 0, "D"),
    (70, 0, "C"),
    (80, 0, "B"),
    (90, 0, "A"),
]
def grade_of(score: int) -> str:
    ix = bisect.bisect_right(grades, (score, 1))
    if ix:
        *_, grade = grades[ix - 1]
        return grade
    else:
        return "F"
print(grade_of(64), grade_of(65), grade_of(66))
print(grade_of(69), grade_of(70), grade_of(71))
print(grade_of(79), grade_of(80), grade_of(81))
print(grade_of(89), grade_of(90), grade_of(91))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | F D D
002 | D C C
003 | C B B
004 | B A A
vocal basin
#

less than 100 wpm, definitely
I also make mistakes often

#

typewriters had limits on typing speed to avoid jamming

#

(same reason why common letters are somewhat far apart)

#

that one is a separate machine

#

phonetics-based machine to record speeches

vocal basin
#

The website of the California Official Court Reporters Association (COCRA) gives the official record for American English as 375 wpm.

#

180~225 is considered normal with it

#

because you later have to spend time decoding parts of the text

#

(stenotypes do not use normal letter sets)