#voice-chat-text-0

1 messages · Page 123 of 1

vocal basin
#

majestically bad

terse needle
#

I've learnt a bit about like the implementation of Functors and Applicatives in haskell, it's pretty interesting. I feel like I have learnt about this from Rust before but just never understood the Haskell language

vocal basin
#

I still have quite a serious question about Functors in Rust due to lifetimes

terse needle
#

I don't mean not understood the syntax but yk like the words 'Functor' and 'Applicative' I feels like they over-complicate the idea

vocal basin
somber heath
#

@lunar haven

vocal basin
#

Category Theory

terse needle
#

oh yeah ig

steep juniper
#

c makes me angry

#

sticking to python

vocal basin
somber heath
#

Like, I'm sure it's some fucking setting somewhere that's got confused, but I've tried a whole bunch of sensible things and it hasn't shifted it.

#

It's not like I changed anything.

terse needle
vocal basin
somber heath
#

I've given the headphones a thorough resetting. I think it's the phone, but I can't be sure.

#

The bluetooth audio mode setting looks right, and it's what it was before.

tulip estuary
#

Hi @manic badger

manic badger
#

Hello

somber heath
#

The only different thing I did was, in a somewhat unrelated matter, pair the phone to an older dongle, which I've since unpaired.

vocal basin
tulip estuary
#

Выходи

#

Нах

somber heath
#

Not so as to satisfy that purpose.

lucid blade
somber heath
#

It's still a word unsuitable for polite company.

#

I would punch.

lucid blade
#

lol

somber heath
#

re: 20 minutes

lime flare
lucid blade
lime flare
#

hello, fellow animal enthusiasts

#

🍅

#

can't speak yet, and general chat is too chaotic

#

I suppose streaming also takes into account the 50 messages, huh

vocal basin
#

Video role is separate

lime flare
#

: o

celest brook
#

yo

#

can someone help me fix my bios

#

😭

woven quest
#

he

#

YEHA

#

I MEAN

#

usinga bus ehh

#

maybe they arent american

#

potatoies in the oven?

somber heath
#

@lucid blade Was able to listen to a confirmed recording from the bluetooth mic, it sounds ordinary, but not muffled.

lucid blade
#

hmmm

#

weird

somber heath
#

Phone mic sounds much better, though.

#

I'm having some weird audio issues.

woven quest
#

YEAH

#

i mean nice clothes

somber heath
#

That's not a joke.

woven quest
#

yeah the customers are usually overbuying them

somber heath
#

This scene.

#

If you know it.

#

Moriarty is introduced as her boyfriend. Sherlock takes one look at him and says the above.

woven quest
#

did bro just say winx for life?

#

oh wings

#

i taught bro meant the girl stuff

somber heath
#

Moriarty deliberately dressed as he did to play a trick on Sherlock.

lucid blade
#

BBL

silver sluice
#

180cm

#

5'11

#

197cm

vocal basin
#

@somber heath this, to me, sounds like how phones generally treat audio during "calls"

somber heath
vocal basin
#

for example, when I have both a call and a music on, music just goes over-the-edge loud and low quality

#

@midnight agate
a game of "guess which ones compile and which don't"

fn narrow_aa_ab<'a: 'b, 'b>(f: &'a dyn FnOnce() -> Something<'a>) -> &'a dyn FnOnce() -> Something<'b> {
    f
}
fn narrow_aa_ba<'a: 'b, 'b>(f: &'a dyn FnOnce() -> Something<'a>) -> &'b dyn FnOnce() -> Something<'a> {
    f
}
fn narrow_ab_bb<'a: 'b, 'b>(f: &'a dyn FnOnce() -> Something<'b>) -> &'b dyn FnOnce() -> Something<'b> {
    f
}
fn narrow_ba_bb<'a: 'b, 'b>(f: &'b dyn FnOnce() -> Something<'a>) -> &'b dyn FnOnce() -> Something<'b> {
    f
}
fn narrow_aa_bb<'a: 'b, 'b>(f: &'a dyn FnOnce() -> Something<'a>) -> &'b dyn FnOnce() -> Something<'b> {
    narrow_ab_bb(narrow_aa_ab(f))
}

still can't figure out why this works the way it does

#

Something<'a> is covariant over 'a

#

(so it can just be &'a usize, for example)

#

I had it defined as this

struct Something<'a>(&'a usize);
whole bear
#

Yooo👋🏻

vocal basin
#

all (any) errors are expected to happen inside the body, yes

#

yes

#

doesn't depend on Fn/FnOnce

#

first one works, yes

#

yes

#

second is actually simpler to the compiler

#

I think

#

because it doesn't involve the closure's return type covariance

#

yes, 3 by the same logic as 2

#

&'a T -> &'b T with T being a black box

#

1: compiles
2: compiles
3: compiles

#

3, yes, compiles

#

4 doesn't compile

#

there's never &mut

#

not yet sure if the reason for 4 failing is correct

cosmic lark
#

anyone familiar with python3 internals?

vocal basin
somber heath
cosmic lark
#

is there any possible way to convert a code object back to AST in python?

#

3.8 specifically

cosmic lark
vocal basin
#

there's also this

fn narrow_aa_ab<'a: 'b, 'b>(f: &'a dyn FnOnce() -> Something<'a>) -> &'a dyn FnOnce() -> Something<'b> {
    let f: &'a dyn FnOnce() -> Something<'b> = f;
    todo!()
}
fn narrow_aa_bb<'a: 'b, 'b>(f: &'a dyn FnOnce() -> Something<'a>) -> &'b dyn FnOnce() -> Something<'b> {
    let f: &'a dyn FnOnce() -> Something<'b> = f;
    todo!()
}

second fails

vocal basin
#

3.9 maybe

#

I don't remember

#

!d ast.unparse

wise cargoBOT
#

ast.unparse(ast_obj)```
Unparse an [`ast.AST`](https://docs.python.org/3/library/ast.html#ast.AST "ast.AST") object and generate a string with code that would produce an equivalent [`ast.AST`](https://docs.python.org/3/library/ast.html#ast.AST "ast.AST") object if parsed back with [`ast.parse()`](https://docs.python.org/3/library/ast.html#ast.parse "ast.parse").

Warning

The produced code string will not necessarily be equal to the original code that generated the [`ast.AST`](https://docs.python.org/3/library/ast.html#ast.AST "ast.AST") object (without any compiler optimizations, such as constant tuples/frozensets).

Warning

Trying to unparse a highly complex expression would result with [`RecursionError`](https://docs.python.org/3/library/exceptions.html#RecursionError "RecursionError").

New in version 3.9.
cosmic lark
#

yeah ik that but the one im looking for is converting a code obj to AST

vocal basin
#

@lunar haven no objects are copied automatically

#

!e

s = object()  # or any other object

def f(x):
    print(id(x))

print(id(s))
f(s)
wise cargoBOT
#

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

001 | 140202950508880
002 | 140202950508880
vocal basin
#

I think @viscid lagoon has bookmarks or something

#

@midnight agate there is this

#

for saving messages

cosmic lark
#

!e

import ast

def my_func():
    x = 1
    y = 2
    z = x + y
    return z

code_obj = my_func.__code__

ast_obj = ast.parse(code_obj)

print(ast_obj)
wise cargoBOT
#

@cosmic lark :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 11, in <module>
003 |     ast_obj = ast.parse(code_obj)
004 |               ^^^^^^^^^^^^^^^^^^^
005 |   File "/usr/local/lib/python3.11/ast.py", line 50, in parse
006 |     return compile(source, filename, mode, flags,
007 |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 | TypeError: compile() arg 1 must be a string, bytes or AST object
cosmic lark
#

!e

import ast
import dis

def my_func():
    x = 1
    y = 2
    z = x + y
    return z

code_obj = my_func.__code__

code_string = dis.Bytecode(code_obj).dis()

ast_obj = ast.parse(code_string)

print(ast_obj)
wise cargoBOT
#

@cosmic lark :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 14, in <module>
003 |     ast_obj = ast.parse(code_string)
004 |               ^^^^^^^^^^^^^^^^^^^^^^
005 |   File "/usr/local/lib/python3.11/ast.py", line 50, in parse
006 |     return compile(source, filename, mode, flags,
007 |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 |   File "<unknown>", line 1
009 |     4           0 RESUME                   0
010 | IndentationError: unexpected indent
cosmic lark
#

!e

import ast

def my_func():
    x = 1
    y = 2
    z = x + y
    return z

code_obj = my_func.__code__

ast_obj = ast.parse(code_obj.co_code)

print(ast_obj)
#

oof

wise cargoBOT
#

@cosmic lark :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 11, in <module>
003 |     ast_obj = ast.parse(code_obj.co_code)
004 |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 |   File "/usr/local/lib/python3.11/ast.py", line 50, in parse
006 |     return compile(source, filename, mode, flags,
007 |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 | ValueError: source code string cannot contain null bytes
vocal basin
#

!e

def my_func():
    x = 1
    y = 2
    z = x + y
    return z

print(eval(my_func.__code__))
wise cargoBOT
#

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

3
vocal basin
#

surprisingly, it somewhat works

cosmic lark
#

hmm

vocal basin
#

not the parsing part

#

but at least the execution

#

!e

def my_func(_a):
    x = 1
    y = 2
    z = x + y
    return z

print(eval(my_func.__code__))
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 7, in <module>
003 |     print(eval(my_func.__code__))
004 |           ^^^^^^^^^^^^^^^^^^^^^^
005 | TypeError: my_func() missing 1 required positional argument: '_a'
cosmic lark
#

my_func(1).__code__

vocal basin
#

!e

from functools import partial

def my_func(x):
    y = 2
    z = x + y
    return z

print(eval(partial(my_func, 1).__code__))
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 8, in <module>
003 |     print(eval(partial(my_func, 1).__code__))
004 |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | AttributeError: 'functools.partial' object has no attribute '__code__'. Did you mean: '__call__'?
vocal basin
#

eh

cosmic lark
#

eh

#

i think i have to look into the cpython source code

vocal basin
#

!e

from functools import partial

def my_func(x):
    y = 2
    z = x + y
    return z

print(eval((lambda: my_func(1)).__code__))
wise cargoBOT
#

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

3
cosmic lark
#

;-;

vocal basin
#

if the goal is to pack code for execution, then compile+exec/eval
if there's any need to get the text of the program, it's simpler to just store it in non-compiled form

cosmic lark
vocal basin
#

do you have permission for that?

cosmic lark
#

i have the code obj so, i think if i can get it to the AST i can unparse it and get the og source

faint raven
#

@lunar haven i wanna be good as @wind raptor in coding

cosmic lark
#

yep

whole bear
#

yoo

willow light
#

Meanwhile I’m being a software engineer: weekends spent outside and avoiding the computer whenever possible.

whole bear
#

@desert vector

#include <stdio.h>

int main() {
    /* printf({'c','o','d','e','\0'}); */
    printf("code");
}
desert vector
#
#include <stdio.h>

int main() {
    // This does work
    char buf[5] = {'c','o','d','e','\0'};
    puts(buf);
    
    // This does not
    puts({'c','o','d','e','\0'});
    return 0;
}

@whole bear

vocal basin
#

does that work?

puts((char *) {'c','o','d','e','\0'});
desert vector
#

nah, segfaults

whole bear
#

@desert vector got it thanks

vocal basin
#

markdown+git

#

@lunar haven GitHub and other providers have preview for Markdown

#

and even local link support

#

also

#

mdbook

#

epic thing

whole bear
vocal basin
#

that's what Rust book is compiled with

#

it produces a site not a pdf

#

or just have things stored in markdown

vocal basin
desert vector
vocal basin
#

but it can be done in GitHub/GitLab too

#

or just write your own thing

#

"gittion"

#

empty files?
that's a new level of Whitespace PL

desert vector
vocal basin
#

there's also Overleaf if at any point you actually want PDF at some point

#

add pre-processors to convert text to emojis

#

with mdbook

#

@brazen gazelle are you using any IDE?

brazen gazelle
#

nope

#

Linux terminal...

vocal basin
#

without IDE integration, then just git cli commands
they're quite easy to use

#

I don't like auto-add

brazen gazelle
#

is this doc fine?

#

does it include everything I would need?

vocal basin
desert vector
#
class A:
  def __init__(self, val):
    self.val = val

obj = A(5)
obj.val # 5
brazen gazelle
desert vector
#

@turbid sandal

whole bear
#

this is a stupid way to write the above:

class A:
 pass

obj = A()
obj.val = 5
print(obj.val)
vocal basin
whole bear
#

i like the way he explains classes

wind raptor
#

!stream 1053732836693258391

wise cargoBOT
#

✅ @turbid sandal can now stream until <t:1682798602:f>.

stuck furnace
#

Hello 👀

#

Sorry my computer is dying 😄

desert vector
#

it's all good LX :D

whole bear
dapper glacier
#

im having issues with string index errors

wind raptor
dapper glacier
#

im super new to python, is anyone willing to have a 1 on 1 with me to help

whole bear
lucid blade
#

lunix

stuck furnace
lucid blade
#

by tinus lorvalds

stuck furnace
#

Ah it might be that your working directly is set differently each time you run it @formal horizon

#

Whoops wrong ping sorry 😓

stuck furnace
#

Chuck Severance is a great name 😄

#

¯_(ツ)_/¯

#

Just sounds cool

whole bear
#

any playlist to learn data structure using python there should be practical implementation of codes too in the tutorial

#

?

stuck furnace
whole bear
#

Yoo

vocal basin
#

I have no idea why the compilation fails

#

like, at all

#

I just know it fails
and I'm still trying to figure out

#

there are some non-trivial ways in which outputs/inputs of the function are connected

vocal basin
#

I can't be sure it's not a deficiency in rustc

vocal basin
# vocal basin like, at all

though, well, I do have a hint of why some other case fails

fn narrow<'a: 'b, 'b>(f: impl FnOnce() -> Something<'a>) -> impl FnOnce() -> Something<'b> {
    f
}
#

for simple implementations of deque

#

!d collections.deque

wise cargoBOT
#

class collections.deque([iterable[, maxlen]])```
Returns a new deque object initialized left-to-right (using [`append()`](https://docs.python.org/3/library/collections.html#collections.deque.append "collections.deque.append")) with data from *iterable*. If *iterable* is not specified, the new deque is empty.

Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, memory efficient appends and pops from either side of the deque with approximately the same O(1) performance in either direction.

Though [`list`](https://docs.python.org/3/library/stdtypes.html#list "list") objects support similar operations, they are optimized for fast fixed-length operations and incur O(n) memory movement costs for `pop(0)` and `insert(0, v)` operations which change both the size and position of the underlying data representation.
vocal basin
#

something that behaves like this

#

it's more efficient (and more possible) sometimes to use a circular buffer for that

#

rustc and clippy are fighting

#

clippy wants to replace ||f() with f or *f, which causes compilation error

fn narrow<'a: 'b, 'b>(f: Box<dyn 'a + FnOnce() -> Something<'a>>) -> Box<dyn 'b + FnOnce() -> Something<'b>> {
    Box::new(||f())
}
#

* 9.0/5.0 places too much faith into compiler optimisations

#

it should almost certainly be * 1.8

#

or * (9.0/5.0) with parentheses included explicitly

#

(celsius * 9.0) / 5.0 and celsius * (9.0 / 5.0) may give different results

#

so compiler might not optimise 9/5 away as 1.8

vocal basin
vocal basin
#

though

#

in this particular case, given it's a constant, the compiler might replace /5.0 with *0.2

#

which it hopefully does

vocal basin
vocal basin
#
celsius * 9.0 / 5.0
(celsius * 9.0) / 5.0
(celsius * 9.0) * 0.2

celsius * (9.0 / 5.0)
celsius * 1.8
#

first one is what's in the code

#

and it's less accurate

#

Ubuntu is great at segfaulting on calling ls

whole bear
#

@midnight agate Wildebeest

vocal basin
#

lacking Solaris/BSD representation

#

I was planning to install illumos once
I failed

#

it was more than once

#

time to make that "only" qualifier properly accurate

small tide
#

i m going crazy

#

coding is very hard

#

even for simple things

#

somebody can help me?

#

ok i m in a job where it s only repetitive tasks

#

if i can automatise all of this

#

i could just wach movies or going sport

#

instead of being a robot

#

i m poor

#

i need to send money to my family

#

no no very hard situation

#

if i continue to do it

#

i will go crazy

#

too much robot tasks

#

too much time lost

#

ask chatgpt

#

if somebody help me to code i will tell u the secret of love

#

i m going LOCOOOOO

#

bro it s very hard to me

#

even the week end i wor

#

work

#

i worked straight 4 hours

#

to solve this problem

#

i m too dumb

#

the thing is i m stupid litteraly

#

1 minute of your time

#

is better than 4 hours of my time

#

because i m stupid

#

ye ye letter from chat gpt

#

Dear [Name],

I hope this letter finds you well. As I sit down to write this, my heart is filled with love and affection for you. It's been a while since we last saw each other, but I want you to know that you are always on my mind and in my heart.

You have brought so much joy and happiness into my life, and I can't imagine my life without you. You have been my rock, my support, and my confidant. You have stood by me through thick and thin, and I am forever grateful for that.

I want you to know that I love you more than words could ever express. You are the sunshine in my life, the reason I wake up every morning with a smile on my face. You make me feel alive and give me a sense of purpose.

I promise to always be there for you, to love and cherish you, and to support you in all your dreams and aspirations. I want to spend the rest of my life with you, growing old together and sharing every moment of our lives.

Thank you for being the love of my life. I look forward to seeing you soon.

Forever yours,
[Your Name]

#

ok help me now

#

i take a lot of time

#

to write it

#

yes yes bro bro

#

bro

#

BUT BRO

#

Bro....

#

True friend

#

help

#

i think we can help us together

#

ze can u tell to deblock me pls

stuck furnace
#

👋

small tide
#

yes it was very tough tool

honest pier
#

hi @vivid palm~

amber raptor
#
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
    "name": "Python 3",
    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
    "image": "mcr.microsoft.com/devcontainers/python:0-3.11",
    "features": {
        "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
            "version": "latest",
            "helm": "latest",
            "minikube": "none"
        },
        "ghcr.io/devcontainers/features/powershell:1": {
            "version": "latest"
        }
    },
    "mounts": [
        "source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind",
        "source=${env:HOME}${env:USERPROFILE}/.kube,target=/home/vscode/.kube,type=bind"
    ],

    // Features to add to the dev container. More info: https://containers.dev/features.
    // "features": {},

    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    // "forwardPorts": [],

    // Use 'postCreateCommand' to run commands after the container is created.
    "postCreateCommand": "pip3 install --user -r requirements.txt",
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "ms-python.vscode-pylance",
                "ms-vscode.powershell",
                "eamodio.gitlens",
                "ms-kubernetes-tools.vscode-kubernetes-tools"
            ]
        }
    }

    // Configure tool-specific properties.
    // "customizations": {},

    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
    // "remoteUser": "root"
}```
vivid palm
amber raptor
somber heath
#

!voice @rapid ridge

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
#

Wrong room, my bad. Point stands.

amber raptor
somber heath
#

@exotic vigil

#

@pliant torrent👋

exotic vigil
pliant torrent
#

Hi

exotic vigil
#

can you suggest any begginer project Ideas?

#

except a simple calc

somber heath
wise cargoBOT
#
Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

exotic vigil
#

Thank you very much!

#

I don't know any commands here😅

#

how to make a code wait for x sec?

#

(a few seconds)

#

I heard you use something like time.sleep

exotic vigil
#

and also my internet sucks and I cant hear a single thing

somber heath
#

So noted.

exotic vigil
somber heath
#

But yes. You can use time.sleep, but if you're using tkinter, you'll want to be using tkinter.Tk.after method.

#

So as to schedule a callback after the specified amount of time.

somber heath
#

@cerulean sphinx👋

somber heath
#

@whole bear 👋

somber smelt
#

!e

import requests

resoult = requests.get("https://google.com")
print(resoult.text)
wise cargoBOT
#

@somber smelt :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 requests
004 | ModuleNotFoundError: No module named 'requests'
somber smelt
maiden jay
#

.

somber heath
#

@vernal halo 👋

gentle flint
somber heath
#

@ocean tapir 👋

ocean tapir
#

👋 @somber heath

flat sentinel
somber heath
#

@lyric jay 👋

lyric jay
#

Hi?

#

i cant talk

#

idk why but im muted

somber heath
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
#

@worthy breach 👋

worthy breach
somber heath
#

@hazy phoenix 👋

hazy phoenix
#

hes saying humans are a force of bad

#

how are the ways you use chatgpt

#

opal and plome

#

or dev if ur here

#

try gptgo ai

#

its a cool hybrid site

#

how do you do gentlemen

#

its a rather splendid evening

hazy phoenix
#

howdy farzin

#

bye faRzin

#

HOWDY AGAIN

#

what are yall working on at the moment

somber heath
#

@stoic ore hi hi!

#

Chilly

#

But I have noodles and tea

#

Marsala

#

Chai, chai marsala

#

Cinnamon, cloves, cardamom, tea, sugar, milk of choice. I'm a soy boy.

#

Pepper and nutmeg, as a twist

#

We've the spices, yes

#

Honey is a popular sweetener for it

#

I find the flavour overtakes the spiders

#

Spices

#

Australian things.

#

Funny typo I could have corrected

#

Decided to not

#

Night in common area.

#

I'll speak in a bit

#

@whole bear 👋

somber heath
#

@midnight agate

#

Philomena Cunk

somber heath
hazy phoenix
#

how kind to link us

somber heath
#

I felt like at least pretending I could be useful in this conversation.

hazy phoenix
#

functor and applicative?

#

can someone link us some doctumention

#

can we use chatgpt to figure this out

somber heath
#

ChatGPT can be used to generate search terms you can then go on to research from more reliable resources.

#

It is not to be taken at its word, however convincing it sounds.

hazy phoenix
#

it can show us examples

somber heath
#

@vagrant estuary 👋

vagrant estuary
hazy phoenix
#

everyone sells out at a price

#

show us

#
write us examples
for monad so we can pin it
hazy phoenix
#

anyone have any code snippets to share

vocal basin
vocal basin
# hazy phoenix anyone have any code snippets to share

minimal definition in Rust

pub trait Functor {
    type F<'a, A: 'a>: 'a
    where
        Self: 'a;

    fn fmap<'a, A: 'a, B: 'a>(f: impl 'a + FnOnce(A) -> B, fa: Self::F<'a, A>) -> Self::F<'a, B>
    where
        Self: 'a;
}

pub trait Applicative: Functor {
    fn pure<'a, A: 'a>(a: A) -> Self::F<'a, A>
    where
        Self: 'a;

    fn liftA2<'a, A: 'a, B: 'a, C: 'a>(
        f: impl 'a + FnOnce(A, B) -> C,
        fa: Self::F<'a, A>,
        fb: Self::F<'a, B>,
    ) -> Self::F<'a, C>
    where
        Self: 'a;
}

pub trait Monad: Applicative {
    fn bind<'a, A: 'a, B: 'a>(
        fa: Self::F<'a, A>,
        f: impl 'a + FnOnce(A) -> Self::F<'a, B>,
    ) -> Self::F<'a, B>
    where
        Self: 'a;
}
#

you can attempt doing that in Python, but it's not going to go well

noble solstice
#

Hello Guys!

vocal basin
# vocal basin you can attempt doing that in Python, but it's not going to go well

something like this, maybe

class T(Generic[A]):
    def map(self, f: Callable[[A], B]) -> T[B]:
        raise NotImplementedError
    def bind(self, f: Callable[[A], T[B]]) -> T[B]:
        raise NotImplementedError

class AsyncT(T[A], Generic[A]):
    def __init__(self, awaitable: Awaitable[A]) -> None:
        self.awaitable = awaitable
    @classmethod
    def wrap(cls, a: A) -> T[A]:
        async def resolve() -> A:
            return a
        return AsyncT(resolve())
    def map(self, f: Callable[[A], B]) -> T[B]:
        async def resolve() -> B:
            return f(await self.awaitable)
        return AsyncT(resolve())
    def bind(self, f: Callable[[A], T[B]]) -> T[B]:
        async def resolve() -> B:
            match f(await self.awaitable):
                case AsyncT(awaitable=awaitable):
                    return await awaitable
                case PureT(value=value):
                    return value
                case _:
                    raise TypeError("mixed contexts")
        return AsyncT(resolve())

class PureT(T[A], Generic[A]):
    def __init__(self, value: A) -> None:
        self.value = value
    def map(self, f: Callable[[A], B]) -> T[B]:
        return PureT(f(self.value))
    def bind(self, f: Callable[[A], T[B]]) -> T[B]:
        return f(self.value)
noble solstice
vocal basin
vocal basin
#

oh

vocal basin
noble solstice
vocal basin
#

@steep juniper @stoic ore never rely on ChatGPT
it's not a teacher

#

it will just fucking lie to you

#

it always fucking does

#

no, you won't understand

#

quite often

#

the only language where you can say "it's working therefore it's not wrong" is something like Haskell/Rust

#

good luck claiming your C code works if it "works"

#

it's not a teacher. it. just. isn't.

#

a wild suggestion:
just read the documentation

vocal basin
stoic ore
#

useblackbox . io

vocal basin
steep juniper
somber smelt
#
if (!strcmp(str[0], "r")) {}
steep juniper
#

if(!strcmp(name[0], "R") == 0 || !strcmp(name[0], "r") == 0){
^~~~~~~
&

#

Create a function which answers the question "Are you playing banjo?".
If your name starts with the letter "R" or lower case "r", you are playing banjo!

The function takes a name as its only argument, and returns one of the following strings:

name + " plays banjo"
name + " does not play banjo"

Names given are always valid strings.

hazy phoenix
#

WHAT LANGAUGES DO YOU GUYS KNOW

#

bash c c# html javascript css python ruby c++ java

#

what are projects you can show me to make with gptgo.ai

steep juniper
#

char *are_you_playing_banjo(const char *name) {
if(strcmp(&name[0], "R") == 0 || strcmp(&name[0], "r") == 0){
return ("%s plays banjo", name);
}
return ("%s does not play banjo", name);
}

#

solution.c:6:13: warning: expression result unused [-Wunused-value]
return ("%s plays banjo", name);
^~~~~~~~~~~~~~~~

somber smelt
#
#include <stdbool.h>
steep juniper
#

Create a function which answers the question "Are you playing banjo?".
If your name starts with the letter "R" or lower case "r", you are playing banjo!

The function takes a name as its only argument, and returns one of the following strings:

name + " plays banjo"
name + " does not play banjo"

Names given are always valid strings.

hazy phoenix
#

Here's a simplified version of the code:

char are_you_playing_banjo(const char* name) {
if(name[0] == 'r' || name[0] == 'R') {
return "plays banjo";
}
return "does not play banjo";
}

This code takes in a string pointer name, checks if the first character is either 'r' or 'R', and returns a string indicating whether or not the person plays banjo. Note that since the function returns a character, the "plays banjo" and "does not play banjo" strings do not have the %s format specifier.

steep juniper
#

solution.c:6:13: warning: expression result unused [-Wunused-value]
return ("%s plays banjo", name);
^~~~~~~~~~~~~~~~
solution.c:6:12: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
return ("%s plays banjo", name);
^~~~~~~~~~~~~~~~~~~~~~~~
solution.c:8:11: warning: expression result unused [-Wunused-value]
return ("%s does not play banjo", name);
^~~~~~~~~~~~~~~~~~~~~~~~
solution.c:8:10: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
return ("%s does not play banjo", name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.

hazy phoenix
#

why are you doing 5m

#
function are_you_playing_banjo(name) {
if (name[0] === 'r' || name[0] === 'R') {
return 'plays banjo';
}
return 'does not play banjo';
}

javascript

#

what are you

#

going to send

#

share it with the class

cosmic lark
hazy phoenix
#

one day they will give me voice

#

what is a python script everyone should know by now

somber heath
#

@hazy phoenix Say "Let me in!"

hazy phoenix
#

"Let me in!"

somber heath
#

Try now.

#

!voice

wise cargoBOT
#
Voice verification

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

hazy phoenix
#

!voice

#

Try now.

#

i did 50 messages

#

it works

#

finally

#

hi

#

in league?

#

wood 1

somber heath
#

@modern phoenix 👋

#

@finite sorrel 👋

finite sorrel
#

Hi

#

I have to send 50 messages

#

????

#

That's gonna take some time

somber heath
somber smelt
#

Nt

somber heath
#

@median quarry 👋

median quarry
#

hi hi

somber smelt
#
void __cdecl main_main()
{
  __int64 v0; // rbx
  __int64 v1; // rax
  __int64 v2; // rax
  __int64 v3; // rax
  __int64 v4; // [rsp+8h] [rbp-48h]
  _QWORD *v5; // [rsp+8h] [rbp-48h]
  __int64 v6; // [rsp+8h] [rbp-48h]
  __int64 v7; // [rsp+10h] [rbp-40h]
  __int64 v8; // [rsp+18h] [rbp-38h]
  __int64 v9; // [rsp+20h] [rbp-30h]
  __int64 v10; // [rsp+28h] [rbp-28h]
  __int64 v11; // [rsp+30h] [rbp-20h]
  void *retaddr; // [rsp+50h] [rbp+0h] BYREF

  while ( 1 )
  {
    if ( (unsigned __int64)&retaddr <= *(_QWORD *)(*(_QWORD *)NtCurrentTeb()->NtTib.ArbitraryUserPointer + 16LL) )
      goto LABEL_14;
    runtime_newobject((__int64)&unk_4F8E40, v4);
    v5[1] = 4LL;
    *v5 = "GSOD";
    v5[3] = 4LL;
    v5[2] = "GSOD";
    v5[5] = 4LL;
    v5[4] = "GSOD";
    github_com_kardianos_service_New((__int64)&off_527320, (__int64)&unk_5EF510, (__int64)v5);
    v0 = v11;
    if ( !v10 )
      break;
    v1 = *(_QWORD *)(v10 + 8);
LABEL_13:
    runtime_gopanic(v1, v0);
LABEL_14:
    runtime_morestack_noctxt();
  }
  (*(void (__golang **)())(v8 + 32))();
  v2 = v9;
  v0 = 0LL;
  qword_5BD540 = v7;
  if ( dword_5EF590 )
    v2 = runtime_gcWriteBarrierCX();
  else
    qword_5BD548 = v8;
  if ( v2 )
  {
    v3 = *(_QWORD *)(v2 + 8);
LABEL_12:
    runtime_gopanic(v3, 0LL);
    goto LABEL_13;
  }
  v6 = (*(__int64 (__golang **)())(v8 + 56))();
  if ( v6 )
  {
    runtime_gopanic(*(_QWORD *)(v6 + 8), v7);
    goto LABEL_12;
  }
}
cosmic lark
#
unk_4F8E40

double click on this function

somber heath
#

@whole bear 👋

#

@faint magnet 👋

steep juniper
#

hola @whole bear

whole bear
#

hey guys

#

whats the progarmn about ?

somber smelt
steep juniper
#

right now Yibtag is disassembling a virus and analyzing it to find out its purpose

#

hes running all of this on a vm

whole bear
#

thats amzing

steep juniper
#

its fun

#

I don't know assembly so I'm lost but it's still fun to watch

whole bear
#

hmmm

#

yeahh

steep juniper
#

I'm new to coding I know some python and I'm learning C now

whole bear
#

we are on the same plate then

cosmic lark
#

// implementation of new builtin

// compiler (both frontend and SSA backend) knows the signature

// of this function.

func newobject(typ *_type) unsafe.Pointer {

    return mallocgc(typ.size, typ, true)

}
whole bear
#

ik python

#

c is almost done

#

c++ maps is left

steep juniper
#

I just started c recently

somber smelt
pulsar island
#

command: gunicorn -w 4 --threads 2 --bind 0.0.0.0:8010 --chdir Microservices/satellite-1 wsgi

cosmic lark
#

then run

#

yeah in docker.yml

#

WORKDIR /Microservice

#
&off_527320, (__int64)&unk_5EF510, 
somber smelt
#
void __golang main___ptr_NTDLL__bsod(__int64 a1)
{
  _QWORD *v1; // [rsp+8h] [rbp-48h]
  __int64 v2; // [rsp+8h] [rbp-48h]
  __int64 v3; // [rsp+40h] [rbp-10h]
  __int64 v4; // [rsp+40h] [rbp-10h]
  void *retaddr; // [rsp+50h] [rbp+0h] BYREF

  while ( (unsigned __int64)&retaddr <= *(_QWORD *)(*(_QWORD *)NtCurrentTeb()->NtTib.ArbitraryUserPointer + 16LL) )
    runtime_morestack_noctxt();
  v3 = runtime_newobject((__int64)&unk_4E1320);
  v1 = (_QWORD *)runtime_newobject((__int64)" ");
  *v1 = 19LL;
  v1[1] = 1LL;
  v1[2] = 0LL;
  v1[3] = v3;
  golang_org_x_sys_windows___ptr_LazyProc__Call(*(_QWORD *)(a1 + 8), (__int64)v1, 4LL, 4LL);
  v4 = runtime_newobject((__int64)&unk_4E12A0);
  v2 = runtime_newobject((__int64)"0");
  *(_QWORD *)v2 = 3221225477LL;
  *(_OWORD *)(v2 + 8) = 0LL;
  *(_QWORD *)(v2 + 24) = 0LL;
  *(_QWORD *)(v2 + 32) = 6LL;
  *(_QWORD *)(v2 + 40) = v4;
  golang_org_x_sys_windows___ptr_LazyProc__Call(*(_QWORD *)(a1 + 16), v2, 6LL, 6LL);
}
cosmic lark
#

GSOD

lunar lagoon
#

to insert a discord script already provided, I have to do it with a bot, it's impossible to do it on the terminal, if there isn't a bot to host the script, is that it?

somber smelt
whole bear
#

Yooooo

somber smelt
lapis hazel
#

-= LEARN =-Everything in a computer can be constructed from a basic component called a NAND gate. You will be challenged through a series of puzzles, to discover the path from NAND gates to arithmetic, memory and all the way to full CPU architectures. If you complete this game, you will have a deep understanding of how assembly, CPU instruction ...

Price

$19.99

Recommendations

1401

▶ Play video
whole bear
#

Yoo

pulsar island
lone temple
#

hi

#

fine

#

yes please

#

still no audio

#

cant hear you well

#

Can not

#

negative

#

i mean the voice is deep

#

co clear voice of you

#

as if your talking under water

#

now is fine

#

i get testing

#

hahaha

#

ok

#

yes clear

#

now it is fine

#

"testin recording 12."

#

bug?

#

may be

#

but your recording is not meant to be noise

#

try stop streaming and record again?

#

mono is output

#

your recording is input

#

now record

#

your voice

#

okay

#

now it works

#

so the problem is when you record while streaming it overlaps

#

okay

#

yes

#

no

#

to be sure

#

stop the voice metering

#

and try again

#

this will cut the doubt out

#

can you stream and talk without using the voice meter?

#

I think you can

#

yes

#

it is moving means it is getting data as input

#

but the output is distorted

#

48000Hz

#

16bits

#

it means 16 samples/sec

#

not clear

#

yes

#

but not clear at all

#

what is VAIO?

#

i can hear it

#

but it so fast

#

no problem

#

fast x1000

#

:p

#

no problem

#

I may watch it alone

#

it is increasing exponentially

#

:p

#

ok slower now

#

getting faster

#

:p

#

what

#

the video

#

I mean its speed

#

ok

#

the volume is fine

#

higher

#

:p

#

can you send me the link of the video?

#

thank you

#

tyt

#

wb

jolly terrace
#

a multimodal ai assistant

lime vale
#

@wind raptor can i get stream perms ?

jolly terrace
#

i could share my screen too?

#

@wind raptor

cedar briar
#

Could you please give me screen share?

#
ssh ro-BCYCXVe24tADYrXsLYCpncGvp@sgp1.tmate.io
jolly terrace
jolly terrace
lime vale
#

@wind raptor can you reigive me, i left by accident

hexed skiff
#

sup

#

funny how i can't understand a thing

lime vale
#

c[0] == *c

hexed skiff
#

wtf

lime vale
#

char *c = "hello world"

#

h e l l o ... \0

hexed skiff
#

why am i a caveman here?

lime vale
#

jacob sorber

#
#define DEFINE_C_NODE_INTERFACE(type)                                \
    typedef struct C_Node C_##type##_NodeInterface;                    \
    struct C_##type##_NodeInterface; {                                \
        union {C_Node *node, ##type## value} as;                    \
    };                                                                \
                                                                    \
    void C_NodeInterface_insert(C_Node *tree, NodeInterface *node); \
    void C_NodeInterface_is_empty(C_Node *tree);                    \
    const char *C_NodeInterface_print(C_Node *tree);                \
    type C_NodeInterface_get(int n);
dapper glacier
#

hello

#

im new, looking to learn

whole bear
#
like this
dapper glacier
#

tild

whole bear
#

` <-- three of these

dapper glacier
#

squiggly boi is tild

steep juniper
lime vale
#

`

granite plank
#
+ abc
- your mom
steep juniper
#
#include <string.h>

char *are_you_playing_banjo(const char *name) {
  int i = name[0];
    if(strcmp(i, "R") == 0 || strcmp(i, "r") == 0){
    char *yp = ("%s plays banjo", name);
    return yp;
  } 
    char *np = ("%s does not play banjo", name);
    return np;
}

int main(){
    return 0;
}
whole bear
#
 #include <stdlib.h>
#include <string.h>

char *are_you_playing_banjo(const char *name) {
  int i = name[0];
    if(strcmp(i, "R") == 0 || strcmp(i, "r") == 0){
    char *yp = ("%s plays banjo", name);
    return yp;
  } 
    char *np = ("%s does not play banjo", name);
    return np;
}

int main(){
    return 0;
}
granite plank
#

.

lime vale
#

@wind raptor Stream permissions ?

granite plank
#
char *yp = malloc(sizeof *yp);```
#
// sexy example by lux

int *lol()
{
    int *a = malloc(sizeof *a);
    *a=12;  
    return a;
    free(a);
}

lime vale
#
int *lol()
{
    int *a = malloc(sizeof *a);
    *a=12;  
    return a;
}

void x() {
  int *x = lol();
}

int main() {
  x();
}
granite plank
#

basically

#

pointer stays in memory

#

after use

#

the address*

#
IPv6 World view:


                                              . o ( Look, Ma! No hands!)
                                            O
                                           _|  <--  /127 (Extremely anal,     
                                         , / \      possibly dangerous transfernets)
                                        ,
 XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX <-- /128 (Loopbacks)
  ^ ^   ^^^    ^  ^ ^    ^    ^    ^    \
  | |   |||    |  | |    |    |    |     --- /126 (Anal transfernets)
 /8 /16 |||    |  | |    |    |    \ /112 (Less anal Transfernets)
 HERE   |||    |  | |    |    \ /96 (V4 LANs, an abandoned utopia)
  BE    |||    |  | |    \ /80 (Screw EUI-64)
BOGONS! |||    |  | \ /64 (End-user LAN, incl. Co-Lo)
        |||    |  \ /56 (Residential end-user, multi-LAN)
        |||    \ /48 (End-user per-site assignment)
        ||\ /32 (RIR PA assignment)
        |\ /28 (Big RIR PA assignment)
        \ /24 (Much argued 6RD assignment)
#
German (formal)         : Ich liebe Sie  (rarely used)
German                  : Ich liebe dich
                        : Ich hab' dich lieb
                        : Ich hab dich lieb (not so classic and
                                                conservative)
German dialects:
 Bavarian (Bayrisch)    : I moag di gern
    (Bavaria/Bayern)    : I mog di  (right answer: "I di a")
                        : I lieb di
 Berlin dialect         : Ick liebe dir  (Old, very old)
    (Berlinerisch)      : Ick liebe Dich
 Berner-Deutsch         : Ig liebe di
 Bochumer               : Ich lieb Dich!
 Franconian (Fra"nkisch): Du gfa"llsd mer fai
    (Franconia/Franken) : Bisd scho mai gouds freggerla (already in a
                                                         relationship)
                        : Mid dier ma"cherd ich a amol (sexually
                          touched,  ment as a compliment, not litterally)
                          (the above 3 entries really mean "I like you",
                           a Franke would never say "I love you")
 Friesian (Friesisch)   : Ik hou fan dei (sp?)
                        : Ik hald fan dei
 Hessian (Hessisch)     : Isch habb disch libb
 Ostfriesisch           : Ick heb di leev
 Saarla"ndisch          : Isch hann disch lieb
 Saxon (Sa"chsisch)     : Isch liebdsch
 Swabian (Schwa"bisch)  : I mog di fei sauma"ssich (Literally "I like
                                                    you like a pig.")
                        : I mog di ganz arg (More formal, literally
                                             "I like you very much!")
 Swiss German           : Ch'ha di ga"rn
      (Schweizerdeutsch)
 Vorarlberg dialect     : I stand total uf di
      (Vorarlbergerisch)```
#
# TO: All Employees
# From: Management
# Subject: Special High Intensity Training
# 
# In order to ensure the highest levels of quality of work from our
# employees, it will be our policy to keep employees well trained
# through our program of Special High Intensity Training (S.H.I.T).
# 
# We are trying to give employees more S.H.I.T. than any other 
# company.
# 
# If you feel that you do not get your share of S.H.I.T. on the job,
# please see your manager. You will immediately be placed at the top 
# of the S.H.I.T. list, and our managers are especially skilled at seeing
# that you get all the S.H.I.T. you can handle.
#
# Employees who don't take their S.H.I.T. will be placed in the
# Departmental Employee Evaluation Program (D.E.E.P.S.H.I.T.). Those
# who fail to take the D.E.E.P.S.H.I.T. seriously will have to go on
# the Employee Attitude Training (E.A.T.S.H.I.T.). Since our managers
# took S.H.I.T. before they were promoted, they don't have to do
# S.H.I.T. anymore, and are full of S.H.I.T. already.
#
# If you are full of S.H.I.T. you may be interested in the job of 
# training others. We can add your name to our Basic Understanding Lecture 
# List (B.U.L.L.S.H.I.T.).  Those who are full of B.U.L.L.S.H.I.T. will 
# get the S.H.I.T. jobs and can apply for a promotion to Director of 
# Intensity Programs (D.I.P.S.H.I.T.).
#
# If you have any further questions, please direct them to our Head 
# Of Training, Special High Intensity Training (H.O.T.S.H.I.T.).
#
# Signed,
# Boss In General, Special High Intensity Training
# (B.I.G.S.H.I.T.)```
whole bear
#

adopt me

#

pls

#

:0

#

im doing an consult painel

#

with python

#

customtkinter

#

and requesting api's

#

can you help me ?

steep juniper
#

i can try but my skills arent that good in python yet

#

i know tkinter

#

im still learning apis

thin breach
#

blocks, sir.
let's do traink in the house.
and he cainck! the who grinch sith out of the houst.
who as should we d we have
on the fish thein the was tont.
we stwo dos! do some sound fish,
and he called him on a rump.
when they sad.
"in ham if muth is with that this stop.
then he got a wall ir it the rain.
i do not like them, sam-i-am.

steep juniper
#

i was looking at a joke api to learn how to use it so i think i can do that easily now, but i want to learn how to build one

whole bear
#

i want to make the button call a function and this API_ENDPOINT recive the entry1's content

#

entry1 = customtkinter.CTkEntry(master=frame,placeholder_text="digite o cep aqui!",width=300,font=font2).place(x=25,y=105)
label1 = customtkinter.CTkLabel(master=frame,text='*preencha o campo acima com o cep no estilo 00000000', font=font3,text_color='green').place(x=25,y=135)

    button2 = customtkinter.CTkButton(master=frame, text='CONSULTAR CEP',width=300,command=lambda:consulta_cep(entry1.get())).place(x=25,y=200)
steep juniper
#

is this like a premade api for testing program functionality

whole bear
#

wow

granite plank
whole bear
thin breach
#

would you like them
in a house.
i do not like them here?
oh you like them,
some good from he knew, the will shoen a littey care rump.
fox in socks on knox and knox, box in socks not.
bup of fook un come frumby yours do some.
wevery we sind a cain

steep juniper
#

LOL

whole bear
#

but when i click the button and load the function it's returning me an error

#

i dont know why

steep juniper
#

is there a typo

thin breach
#

/tts would you like them
in a house.
i do not like them here?
oh you like them,
some good from he knew, the will shoen a littey care rump.
fox in socks on knox and knox, box in socks not.
bup of fook un come frumby yours do some.
wevery we sind a cain

steep juniper
#

one says bentry and the other doesnt

whole bear
#

self._command()
File "C:\Users\lorezz\Desktop\painel\main.py", line 83, in <lambda>
button2 = customtkinter.CTkButton(master=frame, text='CONSULTAR CEP',width=300,command=lambda:consulta_cep(entry1.get())).place(x=25,y=200)
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

whole bear
#

okay

#

i love you

#

?

#

bcz the tkinter's style is suck

#

so i use the custom

#

this painel shouldnot work in other countrys

#

bcz its a painel that consult personal data of a person

#

yep

#

yep

#

not at all

#

im selling this painel

#

?

#

oh

#

i can convert .py into exe with vscode

#

wwwwww

#

i cant program in C languages

#

:(

granite plank
#

C++

#

ez to learn

whole bear
#

im sorry my english is not good

#

:(

#

i cant understand you some times

#

portugues

#

portugese

#

?

#

lol

#

its a little bit close to spanish

steep juniper
#

python is fun

#

C is stress

granite plank
#

c++ is hard

whole bear
#

yes

#

i do skateboard

granite plank
#

Coding is Hard no
Coding while Hard check

whole bear
#

i cant kickflip

#

i learned 5050 and boardslide

#

i skate in a park called madureira's skatepark

#

you can search

#

i tryed to jump a bottle of coke

#

i can

#

my ollie is very high

#

but

#

i forgot to slide my front foot

#

then i fall

#

and beat my face on the floor

#

very hard

unreal flax
#

!voiceverif

wise cargoBOT
#
Voice verification

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

lunar lagoon
#

Y’a des fr ?

vocal basin
vast light
#
a = """(It) (((2 's) (((2 a) ((3 lovely)"""
#
def CREER_ARBRE_AUX(lexer):
    mot = []
    nexter = 0
    for i in range(len(lexer)):
        if lexer[i+nexter].isalpha():
            mot.append(lexer[i+nexter])
            print(f"VAL ({mot})")
            mot = []
        elif lexer[i] == '(':
            print("OPEN")
        elif lexer[i] == ')':
            print("CLOSE")
        elif lexer[i].isdigit():
            print(f"NUM ({lexer[i]})")


print(CREER_ARBRE_AUX(lexer))
somber heath
#

!e ```py
a = (It) (((2 's) (((2 a) ((3 lovely)
print(a)

wise cargoBOT
#

@somber heath :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     a = (It) (((2 's) (((2 a) ((3 lovely)
003 |                   ^
004 | SyntaxError: unterminated string literal (detected at line 1)
vast light
#

OPEN
VAL (['I'])
VAL (['t'])
CLOSE
OPEN

#

3.10.6

#
def CREER_ARBRE_AUX(lexer):
    mot = []
    nexter = 0
    for i in range(len(lexer)):
        if lexer[i+nexter].isalpha():
            mot.append(lexer[i+nexter])
            print(f"VAL ({mot})")
            mot = []
        elif lexer[i] == '(':
            print("OPEN")
        elif lexer[i] == ')':
            print("CLOSE")
        elif lexer[i].isdigit():
            print(f"NUM ({lexer[i]})")


print(CREER_ARBRE_AUX(lexer))

#

'

#

OPEN
VAL (['I'])
VAL (['t'])
CLOSE
OPEN
OPEN
OPEN
NUM (2)
VAL (['s'])
CLOSE

rugged root
#

I'll be on later, I have to 100% focus on getting my timesheets done

vast light
#

@rugged root

#

can you grant screen sharing

#

for a sec

rugged root
#

!stream 158991471733637120

wise cargoBOT
#

✅ @vast light can now stream until <t:1682947751:f>.

rugged root
vast light
#

thank you

rugged root
#

355 mL of Red Bull in my body

#

LET'S DO THIS

vast light
#

lexer = """(It) (((2 's) (((2 a) ((3 lovely) (2 film))) ((2 with) (((3 lovely) (2 performances)) ((2 by) (((2 Buy) (2 and)) (2 Accorsi))))))) (2 .)))
(((1 No) (2 one)) (((2 goes) ((((2 unindicted) (2 here)) (2 ,)) ((2 which) (((2 is) (2 probably)) ((2 for) ((2 the) (4 best))))))) (2 .)))
((2 And) (((2 if) ((2 you) ((((2 're) (1 not)) (2 nearly)) (((3 moved) ((2 to) (1 tears))) ((2 by) (((2 a) (2 couple)) ((2 of) (2 scenes)))))))) ((2 ,) ((2 you) (((2 've) ((2 got) (((2 ice) (2 water)) ((2 in) ((2 your) (2 veins)))))) (2 .))))))
(((2 A) (((3 warm) (2 ,)) (3 funny))) ((2 ,) (((4 engaging) (2 film)) (2 .))))
(((2 Uses) ((((3 sharp) (((4 humor) (2 and)) (2 insight))) ((2 into) ((2 human) (2 nature)))) ((2 to) ((2 examine) ((2 class) (1 conflict)))))) ((2 ,) (((2 adolescent) (((2 yearning) (2 ,)) (((2 the) (2 roots)) ((2 of) ((2 friendship) ((2 and) ((2 sexual) (2 identity)))))))) (2 .))))
(((2 Half) ((((((2 Submarine) (2 flick)) (2 ,)) ((2 Half) ((2 Ghost) (2 Story)))) (2 ,)) ((2 All) ((2 in) ((2 one) (2 criminally)))))) ((1 neglected) (2 film)))
(((3 Entertains) ((2 by) ((2 providing) ((3 good) ((2 ,) ((3 lively) (2 company))))))) (2 .))
(((4 Dazzles) ((2 with) (((((((2 its) ((2 fully-written) (2 characters))) (2 ,)) ((2 its) ((2 determined) (3 stylishness)))) ((1 -LRB-) (((2 which) ((2 always) ((2 relates) ((2 to) (((2 characters) (2 and)) (2 story)))))) (3 -RRB-)))) (2 and)) ((((2 Johnny) ((2 Dankworth) (2 's))) ((4 best) (2 soundtrack))) ((2 in) (2 years)))))) (2 .))
(((((((3 Visually) (4 imaginative)) (2 ,)) ((3 thematically) (3 instructive))) (2 and)) ((2 thoroughly) (4 delightful))) ((2 ,) ((2 it) (((((2 takes) (3 us)) ((2 on) (((2 a) ((2 roller-coaster) (2 ride))) ((2 from) (2 innocence))))) ((2 to) ((2 experience) ((2 without) (((2 even) ((2 a) (3 hint))) ((2 of) ((2 that) ((1 typical) ((2 kiddie-flick) (2 sentimentality)))))))))) (2 .)))))
(((((2 Nothing) ((2 's) ((2 at) (((2 stake) (2 ,)) (((2 just) ((2 a) ((2 twisty) (2 double-cross)))) ((2 you) ((2 can) (((2 smell) ((2 a) (2 mile))) (2 away))))))))) (2 --)) ((2 still) ((2 ,) (((2 the) ((3 derivative) ((2 Nine) (2 Queens)))) ((2 is) ((2 lots) ((2 of) (4 fun)))))))) (2 .))"""


def CREER_ARBRE_AUX(lexer):
    mot = []
    nexter = 0
    for i in range(len(lexer)):
        if lexer[i+nexter].isalpha():
            mot.append(lexer[i+nexter])
            print(f"VAL ({mot})")
            mot = []
        elif lexer[i] == '(':
            print("OPEN")
        elif lexer[i] == ')':
            print("CLOSE")
        elif lexer[i].isdigit():
            print(f"NUM ({lexer[i]})")


print(CREER_ARBRE_AUX(lexer))
#

!e

wise cargoBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

#

@vast light :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | OPEN
002 | VAL (['I'])
003 | VAL (['t'])
004 | CLOSE
005 | OPEN
006 | OPEN
007 | OPEN
008 | NUM (2)
009 | VAL (['s'])
010 | CLOSE
011 | OPEN
... (truncated - too many lines)

Full output: too long to upload

rugged root
#

I love it when updaters cause race conditions with themselves

#

SO cool how they do that

#

Not inconvenient at all

#

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

#

If you've heard this before, my bad

#

Just force of habit to mention it to folks

somber heath
#

@vast lightI'm sitting down, now.

#

Ears on.

#

I won't talk for the moment.

#

@vast light clickclickclickclickclick

#

@gentle surge👋

#

In broad terms.

vast light
#

So I have a list

#

of string

#

if the string is == '('

#

I need to print OPEN

#

if ths string is == ')'

#

I need to print CLOSE

#

if the string is a number

#

a need to print NUM(n)

#

if the string is a word

#

i need to print VAL(word)

#

that's all

#

is it more accurate now ?

#

all seems to be working

somber heath
#

Okay, well...if you say it's working...

vast light
#

noo

#

there's a problem

#

when there's a " ' "

#

and I'm not returning the hole word

#

002 | VAL (['I'])
003 | VAL (['t'])

#

It's supposed tu be VAL([ It ])

somber heath
#

Hey Hemlock.

#

Is the issue just that you don't want the '?

#

Because you could use str.strip.

vast light
#

'

rugged root
#
from string import ascii_letters, punctuation

letters_and_punc = ascii_letters + punctuation
vast light
#
a = "'"
if lexer[x].isalpha() or a
rugged root
#
if lexer[x].isalpha() or lexer[x] == a:
#

!d string

wise cargoBOT
somber heath
#

!e py import string print(dir(string)) print(string.ascii_lowercase)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ['Formatter', 'Template', '_ChainMap', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_re', '_sentinel_dict', '_string', 'ascii_letters', 'ascii_lowercase', 'ascii_uppercase', 'capwords', 'digits', 'hexdigits', 'octdigits', 'printable', 'punctuation', 'whitespace']
002 | abcdefghijklmnopqrstuvwxyz
somber heath
#

🎵 Hurdy-durdy hurdy-durdy hurdy-durdy man. 🍄

vast light
#
def CREER_ARBRE_AUX(lexer):
    mot = []
    nexter = 0
    for i in range(len(lexer)):
        if lexer[i+nexter].isalpha():
            mot.append(lexer[i+nexter])
            print(f"VAL ({mot})")
            mot = []
#

@rugged root so how could I implement it to this?

#

did not want to cut your intense conversation

somber heath
rugged root
#

!stream 158991471733637120

wise cargoBOT
#

✅ @vast light can now stream until <t:1682951970:f>.

rugged root
#
from string import ascii_letters

chars_and_punctuation = ascii_letters + "',."

for i in range(len(lexer)):
  if lexer[i+nexter] in chars_and_punctuation:
  ...
stuck furnace
#

Is modmail just super slow today or something pithink

#

Ah didn't confirm the message.

whole bear
#

YOOO

#

👋🏻

rugged root
#

How goes it

whole bear
rugged root
#

Not too shabby

terse needle
#
test = "(Hello World)"

i = 0
while i < len(test):

    character = test[i]

    match character:
        case '(':
            print("OpenParen")
            i += 1

        case ')':
            print("CloseParen")
            i += 1

        case _:
            word = ""

            while i < len(test):
                if test[i] in "()":
                    break
                word += test[i]
                i += 1

            print(word)
vocal basin
#
case int():
    ...
#

?

#
case c if c.isdigit():
    ...
#

depends on what you match against

vocal basin
vocal basin
#

!d str.isdigit

wise cargoBOT
#

str.isdigit()```
Return `True` if all characters in the string are digits and there is at least one character, `False` otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. This covers digits which cannot be used to form numbers in base 10, like the Kharosthi numbers. Formally, a digit is a character that has the property value Numeric\_Type=Digit or Numeric\_Type=Decimal.
vocal basin
#

though

#

eh

#

also isdecimal

#

!d str.isdecimal

wise cargoBOT
#

str.isdecimal()```
Return `True` if all characters in the string are decimal characters and there is at least one character, `False` otherwise. Decimal characters are those that can be used to form numbers in base 10, e.g. U+0660, ARABIC-INDIC DIGIT ZERO. Formally a decimal character is a character in the Unicode General Category “Nd”.
vocal basin
#

choose wisely between those two

terse needle
#
test = "(Hello World)"

i = 0
while i < len(test):

    character = test[i]

    if chacacter == ')':
       print("OpenParen")
       i += 1

    elif character == ')':
        print("CloseParen")
        i += 1

    else:
         word = ""

         while i < len(test):
             if test[i] in "()":
                break
             word += test[i]
             i += 1

         print(word)
vast light
#

what's c +

vocal basin
#

!e

print(int("٠"))
wise cargoBOT
#

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

0
vocal basin
fallen marten
#

@midnight agate you still alive, man?

vocal basin
#

!e

print(int("١٢٣٤٥٦٧٨٩٠"))
wise cargoBOT
#

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

1234567890
somber heath
vocal basin
#

!e

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

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

4
vocal basin
#

amazing

vocal basin
#

from non-0123456789 decimals

#

!d str.isnumeric

wise cargoBOT
#

str.isnumeric()```
Return `True` if all characters in the string are numeric characters, and there is at least one character, `False` otherwise. Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property value Numeric\_Type=Digit, Numeric\_Type=Decimal or Numeric\_Type=Numeric.
vocal basin
#

@vast light are you looking for valid decimal digits?

#

or anything numeric at all?

#

like

#

!e

print("⅕".isnumeric())
wise cargoBOT
#

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

True
vocal basin
#

are you sure you want this to happen?

#

!e

# let's make it worse and mix different sets
print(int("١۲߃४৫੬૭୮௯౦"))
wise cargoBOT
#

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

1234567890
vocal basin
#

it's not a dot

#

it's a zero

#

@midnight agate it's not a dot, it's an Arabic zero

stuck furnace
#

Hey Mustafa 👀

vocal basin
#

I never tried parsing s-expressions properly

somber heath
#

GAUXGH!-nome.

stuck furnace
#

You might just be consuming two ) each time instead of one?

vast light
#

Don't think so because it's working for everthing else

limpid umbra
#

coffee fixes brain

stuck furnace
vast light
#

Il will try to debug it

quasi condor
#

@molten pewter get your ass online

limpid umbra
#

@obsidian dew make a language for music to program synths

stuck furnace
#

Coffee makes me insane

limpid umbra
#

coffee = neuronal accelerant

obsidian dew
#

no

stuck furnace
limpid umbra
#

it does , it does !!

stuck furnace
#

brb

limpid umbra
#

need to switch to sublime text , i have fresh install

quasi condor
#

!e

from itertools import pairwise
print(*pairwise('ABCDEFG'))
wise cargoBOT
#

@quasi condor :white_check_mark: Your 3.11 eval job has completed with return code 0.

('A', 'B') ('B', 'C') ('C', 'D') ('D', 'E') ('E', 'F') ('F', 'G')
lavish rover
vocal basin
limpid umbra
#

each question requires - free pizza vouchers

quasi condor
#

!e ```py
def my_pairwise(iterable):
iterator = iter(iterable)
try:
current = next(iterator)
while True:
previous = current
current = next(iterator)
yield previous, current
except StopIteration:
return
print(*my_pairwise("ABCDEFG"))

wise cargoBOT
#

@quasi condor :white_check_mark: Your 3.11 eval job has completed with return code 0.

('A', 'B') ('B', 'C') ('C', 'D') ('D', 'E') ('E', 'F') ('F', 'G')
somber heath
#

!e py text = "ABCDEFG" print(*zip(text, text[1:]))

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

('A', 'B') ('B', 'C') ('C', 'D') ('D', 'E') ('E', 'F') ('F', 'G')
vast light
#

@terse needle

#

it did not work the \n

vocal basin
#

!e

from typing import Iterator, Iterable, Generic, TypeVar

T = TypeVar('T')

class pairwise(Iterator[tuple[T, T]], Generic[T]):
    def __init__(self, it: Iterable[T]):
        self.__it = iter(it)

    def __next__(self) -> tuple[T, T]:
        return next(self.__it), next(self.__it)

print(*pairwise([0,1,2,3]))
print(*pairwise([0,1,2,3,4]))
wise cargoBOT
#

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

001 | (0, 1) (2, 3)
002 | (0, 1) (2, 3)
vocal basin
#

!e

from itertools import pairwise
print(type(pairwise([])))
wise cargoBOT
#

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

<class 'itertools.pairwise'>
vocal basin
#

oh, look, it's a class too, how surprising

#

I don't like use of % in any way

#

it just feels wrong

#

at least to me

#

but

#

% is fine

vocal basin
#

because, like, prev exists in two places for some time

vocal basin
#
struct Pairwise<T> {
    it: T,
}

impl<T> Iterator for Pairwise<T>
where
    T: Iterator,
{
    type Item = (T::Item, T::Item);

    fn next(&mut self) -> Option<Self::Item> {
        Some((self.it.next()?, self.it.next()?))
    }
}
limpid umbra
#

failing can lead you to wonderful ideas sometimes...

vocal basin
#

without type hints

class pairwise:
    def __init__(self, it):
        self.it = iter(it)

    def __next__(self):
        return next(self.it), next(self.it)
limpid umbra
#

@midnight agate yes please , more pieces of code - looking at itertools now - is shiny and new to me

quasi condor
#

!e

class _pairwise:
    def __init__(self, it):
        self.it = iter(it)

    def __next__(self):
        return next(self.it), next(self.it)
print(*_pairwise("ABCDEFG"))
print(*pairwise("ABCDEFG"))
wise cargoBOT
#

@quasi condor :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 7, in <module>
003 |     print(*pairwise("ABCDEFG"))
004 | TypeError: print() argument after * must be an iterable, not pairwise
vocal basin
#

I forgot to inherit the thing

#
class pairwise:
    def __init__(self, it):
        self.it = iter(it)

    def __next__(self):
        return next(self.it), next(self.it)

    def __iter__(self):
        return self
#

fixed

quasi condor
#

!e

class pairwise:
    def __init__(self, it):
        self.it = iter(it)

    def __next__(self):
        return next(self.it), next(self.it)

    def __iter__(self):
        return self
print(*pairwise("ABCDEFG"))
#

!e```py
class pairwise:
def init(self, it):
self.it = iter(it)

def __next__(self):
    return next(self.it), next(self.it)

def __iter__(self):
    return self

print(*pairwise("ABCDEFGH"))

wise cargoBOT
#

@quasi condor :white_check_mark: Your 3.11 eval job has completed with return code 0.

('A', 'B') ('C', 'D') ('E', 'F') ('G', 'H')
vast light
#

thank you for help @rugged root ❤️

stuck furnace
#

The classic implementation of pairwise is something like this: ```py
def pairwise(iterable):
it0, it1 = itertools.tee(iterable)
next(it1, None)
return zip(it0, it1)

vast light
#

and @stuck furnace and @vocal basin

stuck furnace
vocal basin
#

!e

def pairwise(it):
    it = iter(it)
    return zip(it, it)
print(*pairwise("abcd"))
print(*pairwise("abcde"))
wise cargoBOT
#

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

001 | ('a', 'b') ('c', 'd')
002 | ('a', 'b') ('c', 'd')
vocal basin
#

!e

print(int("৪୨"))  # answer to everything
wise cargoBOT
#

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

42
obsidian dew
#

13cm

limpid umbra
#

buffer saturation -- im stealing that line

obsidian dew
#

That's my near sighted limit past 13cm i cant see well

swift valley
#

This is still legible... right?

rugged root
#

Given the language, yeah

#

Rust, right?

swift valley
#

Yep

obsidian dew
#

Ye0

#

Yep

vocal basin
obsidian dew
#

Alisa i swear i saw you on the rust vc

obsidian dew
swift valley
#

old habits die hard

vocal basin
#

contextually it can be inferred it's left-right

#

but l on its own is problematic on some fonts

#

because 1

swift valley
#

Even much worse than that

#

Lambda syntax

rugged root
#
vertexShader : WebGL.Shader Vertex Uniforms { vcolor : Vec3 }
vertexShader =
    [glsl|
        attribute vec3 position;
        attribute vec3 color;
        uniform mat4 perspective;
        varying vec3 vcolor;

        void main () {
            gl_Position = perspective * vec4(position, 1.0);
            vcolor = color;
        }
    |]

Ooo

vocal basin
#

well, c/v is at least hypothetically legible
because it represents coerce/variant
unlike naming everything x,y,z,a,b,c,... without meaning

swift valley
obsidian dew
#

only single letter variables i allow in my code is x and y

#

and sometimes i

rugged root
vocal basin
swift valley
#

Debug.Trace is your friend in Haskell

vocal basin
#

I made myself re-implement Monad Haskell class in Rust as a trait

swift valley
#

Yeah, that's understandable

vocal basin
vocal basin
somber heath
#
def shampoo(func):
    return func

@shampoo
def func():
    pass```It's a de-de-de-decorator.
swift valley
#

tl;dr just pass around a mutable reference to your app's state using a Reader

vocal basin
#

Maybe/Solo/IO vs List, when translated to Rust, are very different

rugged root
#
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
  case msg of
    GotText result ->
      case result of
        Ok fullText ->
          (Success fullText, Cmd.none)

        Err _ ->
          (Failure, Cmd.none)
vocal basin
#

@lavish rover you can make something generic over an abstract Monad
idk if that qualifies for a "mixin" or whatever

#

but, yes, generally you just don't need that

#

yes, interface in a quite broad sense

stuck furnace
#

It's basically a type with two functions: unit and bind: ```py
def unit[T](value: T) -> MyMonad[T]:
...

def bind[A, B](
wrapped: MyMonad[A],
func: Callable[[A], B],
) -> MyMonad[B]:
...

swift valley
#

Monads are functors

stuck furnace
somber heath
limpid umbra
#

howdy

vocal basin
swift valley
#

Well ain't that handy

stuck furnace
#

I only learned about it myself a couple of days ago 😄

vocal basin
stuck furnace
#

It's currently being implemented by Jelle

vocal basin
stuck furnace
#

But it's pretty neat. I like it.

limpid umbra
#

always nice to find tools to speed things up

stuck furnace
swift valley
#

I guess in CPython, yeah

stuck furnace
swift valley
#

But you could implement a runtime that makes use of hints to JIT compile optimized versions of a function specific to a type a la Node/V8

stuck furnace
vocal basin
#

time to ask this to @swift valley and @lavish rover too;
which of these looks more usable as a base for Functor?
(only included the type=>type part, not fmap)

pub trait Wrapper {
    type Wrapped<'a, A: 'a>: 'a
    where
        Self: 'a;
}

pub trait Wrapper<'a>: 'a {
    type Wrapped<A: 'a>: 'a;
}

(lifetimes are required for, e.g., Rust's equivalents of IO monad like Pin<Box<dyn 'a + Future<Output=A>>>)

#

Turing Complete

#

that game

#

-= LEARN =-Everything in a computer can be constructed from a basic component called a NAND gate. You will be challenged through a series of puzzles, to discover the path from NAND gates to arithmetic, memory and all the way to full CPU architectures. If you complete this game, you will have a deep understanding of how assembly, CPU instruction ...

Price

$19.99

Recommendations

1401

▶ Play video
vocal basin
somber smelt
vocal basin
limpid umbra
#

the journey , not the destination ?

somber heath
#

Amnesia: The Dark Descent, Amnesia: Machine for Pigs, SOMA.

vocal basin
#

If you've found this game by chance through Steam, I advise you not to play it.My name is Valefisk, and I'm a YouTuber. I made this game as a joke - it's not designed to be fun, but to be awful to play. And in this it succeeds.This version that has found its way to Steam is slightly different from the one in the original video. This one is beata...

▶ Play video
somber heath
#

Theif, Thief 2

vocal basin
stuck furnace
#

gtg 👋

limpid umbra
#

japanese dont like ghosts

karmic elk
#

hello

limpid umbra
#

so if you have a hologram projector -- japan is the place for you

#

openheimer - played by christopher walken ....

lucid blade
vocal basin
#

@woeful wyvern or just use one thread responsible for the db and communicate to that thread via something else

#

or just two DBs, yes

#

@woeful wyvern there is a per-db lock
there are more granular ones, but the main one exists at least for some time, so you will get throttled sometimes