#esoteric-python

1 messages · Page 60 of 1

dense spire
#

we get them in dev-log too

#

wish we could fix that

#

super annoying

vague gust
#

I can disable MRs again if you like, i enabled them just so you could see when someone opens an MR

stray needleBOT
frosty wyvern
#

Oh god it's doxxing me

#

aaaaaaaaaaaaa

#

jk

fallen heath
#

There is two links, so there are two embeds

frosty wyvern
#

Anyways, any input on the challenge draft up there lads?

dense spire
#

yes. but it'd be nice if it could <> those links

#

because the embeds are useless

fallen heath
#

Gitlab has no way to know discord is accessing it twice for one message

dense spire
#

the challenge looks great

frosty wyvern
#

Oooh I didn't realize at first it was a git bot

#

I thought it was our own

dense spire
#

naw, it's a webhook

#

but wait @vague gust is that webhook something gitlab just provides?

#

or did we hack it together?

#

I remember you did write a hook for.. what was that.. travis?

#

with like flask and shit

#

if we controlled it we could wrap the urls in chevrons

vague gust
#

it's the default slack notifications

stray needleBOT
dense spire
#

right

vague gust
#

we don't control that one

dense spire
#

we probably could

#

but it sounds like a lot of work for that :D

fallen heath
#

You controll the bot though?

dense spire
#

it's not really a bot

#

it looks like one

stray needleBOT
frosty wyvern
#

god damnit

dense spire
#

but it's just a webhook, which basically you just send web requests to

#

a URL that feeds messages straight into the chat here as if from a bot

frosty wyvern
#

why not hack together a little proxy between the two

dense spire
#

yeah, you could,

#

totally

fallen heath
#

So you could find replace the links to the non embed version

dense spire
#

yep

#

wouldn't be a problem

#

but we'd need to send the webhook somewhere else

#

fuck with it

#

and then send it on

frosty wyvern
#

Yeah, exactly

#

eh sounds like a lot of work

dense spire
#

we could probably build an API endpoint for that on our site

frosty wyvern
#

for something that no one's gonna really notice

#

:P

#

I'm just whiny

dense spire
#

hey, I don't love it either

#

it's just a bit hacky to solve it like that

#

would be great if gitlab had a discord webhook that just did it

frosty wyvern
dense spire
#

nice nice nice

#

good work, shawn

frosty wyvern
#

curtsies thank you, dad

stray needleBOT
vague gust
#

oh shit

#

I just saw a literal in there

#

let me just fix that

#

do not merge

frosty wyvern
#

wait what you already friggin wrote a solution to the new challenge!?

vague gust
#

:)

#

well

#

it doesn't take in a number

#

it's also another incredibly moronic solution like my last entry

frosty wyvern
#

oh my god

pure dew
#

nice

frosty wyvern
#

its the generator

pure dew
#

its horrid

vague gust
#

lmfao

frosty wyvern
#

Joseph, I can say with confidence that looking at your solution made self-immolation sound appealing

fallen heath
#

generator literal

vague gust
#

lmao

#

hey now

#

generators are not literals

#

there are a couple literals in there though

fallen heath
#

I guess comprehensions aren't literals

vague gust
#

hold on

#

it seems to be a mix

#

okay i pushed the fixes

#
>>> dis.dis("(x for x in string.printable)")
  1           0 LOAD_CONST               0 (<code object <genexpr> at 0x7fadcbdae6f0, file "<dis>", line 1>)
              2 LOAD_CONST               1 ('<genexpr>')
              4 MAKE_FUNCTION            0
              6 LOAD_NAME                0 (string)
              8 LOAD_ATTR                1 (printable)
             10 GET_ITER
             12 CALL_FUNCTION            1
             14 RETURN_VALUE
#

see, there are 2 constants loaded

#

but i'm not sure

fallen heath
#

"".join([random.choose(string.printable) for i in range(0,10)]) or something

vague gust
#

"" is a literal

#

and 0 and 10 are literals

fallen heath
#

0 is a literal

vague gust
#

:^)

fallen heath
#

damn

vague gust
#

it's harder than one things

#

generators seem like a relatively practical way for list indexing

novel vine
#

lmao joseph

#

that solution is p e r f e c t

vague gust
#

thank you clay :^)

pure dew
#

i mean

#

does the official python grammar list comprehensions and genexprs as literals?

fallen heath
#

str.join on a range of the input number

#

I'll write a solution tomorrow, it's too late rn

pure dew
#

p sure thats specifically mentioned

vague gust
#

shawn review when

novel vine
#

If shawn writes a serious review @vague gust should rap it

vague gust
#

good idea

fallen heath
#

The review should be generated by your code

vague gust
#

@frosty wyvern so what do you think

frosty wyvern
#

what

#

about what

#

did you change something

novel vine
#

he just wants you to review his code

vague gust
#

yeah

#

i want a review

#

and potentially a merge

#

i'll also rap your review if it's serious

frosty wyvern
#

Joseph do you wanna record a collab mixtape

vague gust
#

hahayes

#

joseph and the generators

novel vine
#
#define cCC 9
#define cCCC 4
#define cCcCc 3
#define CcCcC 7
#define cCCc 5
#define CcccC 6
#define c 1
#define cc 2
#define ccc 8
#define cccc 0
#define C(CCc, Cc, cC) CCc ## Cc ## cC
#define CC(CCc, Cc, cC) C(CCc,Cc,cC)
#define CcC(CCc, Cc, cC) CC(CCc,Cc,cC)
#define CccC(cC, cCc) cC ## cCc
#define cCccC(cC, cCc) CccC(cC, cCc)
#define ccCccC(cC, cCc) cCccC(cC, cCc)

const int main[] = {
    CcC(CC(c,cc,c),CC(cCCC,c,ccc),CC(cCCc,ccc,cCccC(cCcCc,cCCC))),CcC(cCccC(cCC,cCcCc),cCccC(c,cc),cCccC(c,cCcCc)),CcC(CC(cc,cccc,ccc),CC(cc,CcCcC,cCcCc),CC(cCCC,cccc,ccc)),CcC(CC(cc,CcccC,CcCcC),CC(cCC,cCCC,CcccC),CC(cCcCc,cCcCc,cccc)),CcC(CC(c,CcCcC,cCC),CC(cCCc,c,cccc),CC(cCC,c,cCccC(cc,cCCc))),CcC(CC(ccc,cCCC,ccc),CC(cCC,c,CcCcC),ccCccC(cccc,ccc)),CcC(CC(c,ccc,c),CC(cCC,cccc,cCCC),CC(cCcCc,c,cCccC(cCCC,cCCC))),CcC(CC(c,ccc,CcccC),CC(CcCcC,cCC,ccc),ccCccC(ccCccC(cccc,cCC),cCccC(c,c))),CcC(CC(cCCc,CcccC,cccc),CC(cc,cc,cCC),CC(cCCC,cCC,cccc))
};
#

Joseph what do you think of my solution

frosty wyvern
#

What in the blue hell is this a solution to

fallen heath
#

9 is a literal

dense spire
#

ahh, so that's why they call it C code

pure dew
#

surely that counts as a literal

dense spire
#

literally terrible

#

not even the right language

#

I rate this solution terning2

frosty wyvern
#
"""
This isn't ideal.
This doesn't fully complete the challenge.
This doesn't take input.
This doesn't generate random phrases.
This doesn't generate more than 2 words.
This is perfect.
This is peak performance.

lmao joseph

dense spire
#

joseph your solution is the best solution that has been submitted so far.

#

that's all I can say

novel vine
#

oh shit it isn't the right language hold on lemme import Python.h real quick and make it a PyObject *

dense spire
#

sounds good homie but then you gotta rename all the variables!!

pure dew
#

lmao

stray needleBOT
novel vine
#

Glorious

frosty wyvern
#

sighs

#

I didnt even run it

#

let's see.

vague gust
#

that is lovely Clay

#

and thank you lemon, your solution is also the best that has been submitted so far :)

dense spire
#

nnnnnnnnnooooooooooo!

frosty wyvern
#

It would be nice if someone submitted a solution to the actual problem :D

#

you know, the random text part

#

at least.

dense spire
#

I might write one

#

it sounds fun

#

it won't be golfed, though

#

but I do like obfuscation

vague gust
#

i mean technically

frosty wyvern
#

There's no golfing requirements so

vague gust
#

you didn't know what mine was going to say

#

so was it random? :^)

frosty wyvern
#

..............

#

get out of my swamp joseph

vague gust
#

fine okay i failed the challenge

frosty wyvern
#

nono

#

I mean it's an impressively awful piece of work

vague gust
#

:^)

frosty wyvern
#

I just want to be amused by random phrases.

vague gust
#

that's the look i was going for

tight hemlock
#

Try pytting 93 parenthesis into python. it will wait for the rest

#

(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((

#

Now cancel that, and try 94 parentheses

unique shoal
#

whoa

tight hemlock
#

Yeah, just heard about this from tony morris (the functional programming guy)

#

Dude's a legend

sick hound
#

what's "semi valid english"

#

also are we allowed to use numbers or not?

#

like is the first rule just for words in possible output?

#

am very confused?

#

@frosty wyvern

#

?

wind maple
#

Wait how are you supposed to get any output without string literals or fancy swancy workarounds

sick hound
#

yeah

#

or is it really just like if you defined "english words here or something idk"

wind maple
#
import random, keyword
def words(n):[print(random.choice(keyword.kwlist)) for _ in range(n)]```
#

Here's my solution

#

Here's my other solution

import inspect
import random

members = inspect.getmembers(inspect) + inspect.getmembers(random)

words = set()


def add_words(in_string):
    for word in in_string.split():
        if word.isalpha():
            words.add(word)


for member in members:
    docstring = inspect.getdoc(member)

    add_words(docstring)
add_words(inspect.__doc__)
add_words(random.__doc__)


def print_words(n):
    for word in random.sample(words, n):
        print(word)
#

though it also breaks the first rule

#

you could just remove the members part

sick hound
#

how does that break the first rule?

wind maple
#

I have user defined strings

sick hound
#

oh
yeah that's weird

dense spire
#

can we see some sample output, @wind maple?

wind maple
#

Top one:

or
or
import
while
elif
for
nonlocal
or
if
pass
in
from
continue
break
None
except
is
from
try
lambda
lambda
class
not
and
from
try

bottom one:

uniform
arguments
lognormal
notes
a
as
from
attributes
types
for
determine
iterable
information
generators
method```
#

actually 🤔

#

now that I think about it inspect has a getdoc method doesn't it

#

now it doesn't break the rules :)

sick hound
#

what's is semi - english @dense spire

dense spire
#

something sort of legible as a sentence would be great

#

the more intelligable, the better

sick hound
#

huh

dense spire
#

uniform arguments lognormal notes a as from attributes types for determine iterable information generators method doesn't flow super well but it probably qualifies.

sick hound
#

does private dmraid 9 15822 979 stat stat fd net stat netfilter fdinfo dev_snmp6 netfilter stat dev_snmp6 fdinfo fd fd net dev_snmp6 stat fd

dense spire
#

mmmm no. numbers and underscores are definitely in the "not english" category

#

rather than semi-english

sick hound
#

huh

#

time to filkter those

dense spire
#

ideally the sentence would have some sort of structure

#

but that's hard.

#

could try to fake it, though.

sick hound
#

just do docstrings

#

lol

#

and like split by line

#

or something

#

or maybe train an ai on it

#

though that might be hard

dense spire
#

without imports? yeah kinda hard :D

#

although this isn't a serious competition, just a fun challenge, so if you wanna try feel free

sick hound
#

given what people were doing above changing the __loader__ perfects you could argue they are builtin

wind maple
#

Oh it's supposed to make complete sentences?

brazen geyser
#

what about docstrings

#

can we extract words from those or do those count as string literals too?

sick hound
#

I think those don't count

brazen geyser
#

🙌 hallelujah

#

oh you already talked about dosctrings lol

dense spire
#

ava already solved it like that, yes :D

#

which is fine, of course.

brazen geyser
#

hmmmm

wind maple
#

just slap a markov chain on it

#

import more modules

sick hound
#

yeah

brazen geyser
#

lmao, how about OCRing words off the screen hehehe

#

also we cant load files but we can still traverse directories right? so file names should be fair game

sick hound
#

it says no user input
so that's sorta it?

#

yeah

#

that's why I tried

brazen geyser
#

ah hmm

#

but does that really count as user input 😛

sick hound
#

maybe?

wind maple
#

hmmm

#

Ok I have a good idea

sick hound
#

does running a command which returns a file count as opening a file

wind maple
#

does doing class.__name__ count as fancy shmancy workarounds

brazen geyser
#

oh man

brazen geyser
#

https://paste.pydis.com/monogurafo.py

The dog attacks a chair.
A house greets the pancake.
A dog licks the pancake.
The dog greets a house.
The house attacks the house.
The dog greets a pancake.

🤷

tepid glacier
#

Are we allowed to read from files that exist on a specific system?

brazen geyser
#

dont think so

#

NO FILE/USER INPUT EXCEPT LOADING STANDARD LIBRARY MODULES

tepid glacier
#

aw

#

That makes sense

dense spire
#

sorry, this is all I had time for today

#
import contextlib as ___________
import io as ____________
import random as _________

__________ = _________.sample.__doc__.splitlines()[-3].strip().split()[0].lower()

_ = ____________.StringIO()
with ___________.redirect_stdout(_):
    __import__(__________)

_ = _.getvalue()
__ = _[3]
___ = _[17]
____ = _.splitlines()[2][-1]
_____ = _.splitlines()[2:]
______ = _.splitlines()[14].split()[3][-1]
_______ = __.join(_________.choice(_____).split()[:2])
________ = __.join(_________.choice(_____).split()[2:4]).strip(____ + ______)
_________ = __.join(_________.choice(_____).split()[1:5]).strip(____ + ______)

print(_______ + __ + ________ + ___ + __ + _________ + ____)
tepid glacier
#

hahahaha

brazen geyser
#

wow

dense spire
#

Although that aren't special, never is often better.
Special cases better than, is better than ugly.

#

example return

brazen geyser
#

better than ugly, indeed

tepid glacier
#

Very clever

#
Errors should be one, the face of ambiguity.
dense spire
#

always remember, Errors should better than, is better than implicit.

brazen geyser
#

ahahaha

dense spire
#

hahaha

tepid glacier
#
Explicit is one honking, counts.
#

This is beautiful

#
If the implementation beats purity, the implementation is hard.
dense spire
#

hahahaha

dense spire
#

quick, someone write an esoteric programming language where all the code has to be written in zalgo!

#

BECAUSE APPARENTLY PYTHON DOESN'T LIKE IT WHEN I DO THAT

#

zalgolang

#

oh it won't even do that

#

the downside of course is that only staff would be allowed to put zalgolang code on this server. the rest would be caught by the filters.

tropic gulch
#

I'd swear I got filtered too in the past...

#

yes, still.

dense spire
#

yeah only mods and up I think

tropic gulch
#

so the "small staff circle"

dense spire
#

I guess you can call them executive staff

#

tbh we could probably whitelist helpers, too

#

I'm not sure why they aren't.

tropic gulch
#

¯_(ツ)_/¯

#

it's not like that would actually have any practical use...

#

except for when somebody tries to parse HTML with regex maybe

cunning wave
#

Did somebody say develop languages for weird purposes

#

@brisk zenith did you hear lemons idea

brisk zenith
#

lmao yes

frosty wyvern
#

lmao lemon, I love your solution :P

#

Guys please please submit some merge requests to the branch, it's a bit hard for me to keep track of all the submissions in chat <3

dense spire
#

I will do that at some poiny :)))

frosty wyvern
#

Your solution is winning so far ;p

frosty wyvern
#

hey @yall, I see no merge requests for challenge 02 >:( chop chop, make em happen

stray needleBOT
frosty wyvern
#

sample output of my solution in #bot-commands

stray needleBOT
stray needleBOT
fallen heath
#

managed to find a way to do it without literals 😃

stray needleBOT
novel vine
#

Is there a way to get the memory addresses of what python GCs

pure dew
#

i mean you could manually count references and predict when it is collected, but i dont think you can hook into the gc

#

lua lets you tho

#

@frosty wyvern this doesnt have to be code golf right?

fallen heath
#

no

pure dew
#

hoo boy

#

i have an absolutely foul idea

fallen heath
#

i did mine without any literals

#

Also because I misread the challange

novel vine
#

Same anonymous

pure dew
#

@novel vine do tell

#

i dont wanna do it if someone already is

novel vine
#

I’m gonna use addresses of GCd objects to pick words from Exceptions

pure dew
#

uh lol nice

novel vine
#

Less foul and more just

#

Weird

#

I guess

pure dew
#

hey so do fstrings that are entirely format specifiers count as string literals?

fallen heath
#

yes

pure dew
#

oof

fallen heath
#

but it does sound creative

#

you don't really have to follow the rules 100%

#

it's not a competition

pure dew
#

maybe ill submit 2

#

a horrendously foul meme answer and a serious attempt

frosty wyvern
#

Yeah, as I try to make clear, rules are meant to challenge you. If you have a very creative idea that requires bending the rules by all means, go ahead

#

I absolutely want to see the horrendous pieces of code people can come up with, rules or not

#

My vision is that one day the esopython repo will be in a museum

#

lmao Grote

pure dew
#

a museum of barbaric war weapons most likely

frosty wyvern
#
zero = int()
# ...
space = string.whitespace[zero]
#

you beautiful soul

stray needleBOT
frosty wyvern
#

Sorry for spam

pure dew
#

you can't submit a MR from a personal git instance, can you?

frosty wyvern
#

What do you mean

#

also look @dense spire pushing directly to master like some kind of barbarian

#

though I must say his solution is one of my favourites.

pure dew
#

I wanna clone the repo on my personal instance and submit a MR to the official gitlab website

#

i dont wanna setup my keys and whatnot again

#

or at least from github

frosty wyvern
#

errrrrr I'm not sure how it works exactly

#

:D

#

Joseph will help you

vague gust
#

@pure dew you can setup mirroring but that sounds pretty impossible

#

I don't think there is inter-op between the copies of GitLab

pure dew
#

turns out its called federated merge requests

#

not yet implemented, i think

frosty wyvern
#

joe-zeff, think we could develop as we were saying yesterday some kind of proxy middleman for the Git webhooks so we can format them as we want before they get announced in the channel?

vague gust
#

If you make an account on gitlab.com then you can set up Mirroring settings and have your push on private gitlab be pushed through to gitlab.com and then open the PR

#

I could give it a go this weekend Shawn, not enough time this week

pure dew
#

oh i could do mirroring

vague gust
#

Shouldn't take too much work though

pure dew
#

🤔

#

i have a gitlab account, just havent used it for anything

frosty wyvern
#

I could take a stab at it if you want but itd take me a few days to learn like.. how the current api works and stuff

vague gust
#

to be honest, the slack format also means nothing to me

#

but all i really need is a regex and the fields where embed content is

fallen heath
#

yeah i interpreted the challenge as no literals at all

frosty wyvern
#

hahaha! I like your solution :P

pure dew
#

if i can get MY FUKIN GITLAB to recognize the gitlab.com integration, I COULD ACTUALLY GET TO WORK on the challenge

pure dew
#

lmao @brisk zenith you'll like my solution

arctic bridge
#

You have locally hosted GitLab instance dapper?

pure dew
#

yes

arctic bridge
#

Cool

#

Why do you have a local instance?

pure dew
#
  1. Why not
  2. I wanted to stop relying on Github after the acquisition
arctic bridge
#

And just curious, not judging 😉

#

I have Cisco switches at home so can't really judge

pure dew
#

i just felt like it i guess

#

i wanted my code to be stored somewhere i have control over it, i suppose

fallen heath
#

like your local git copy?

pure dew
#

yea

#

err no

#

the remote repo

arctic bridge
#

You could just create a SSH server and set it as the remote

#

Doesn't need to be running a full gitlab instance

#

Though having personal control over issues and such would be nice

pure dew
#

hey the mirror worked

stray needleBOT
arctic bridge
#

How that get in here

pure dew
#

its been in here

arctic bridge
#

Huh

pure dew
#

Reading ugly code: >:(
Writing ugly code: >:)

arctic bridge
#

Haha

#

That's the gist of this channel

#

Except both are smilies

stray needleBOT
arctic bridge
#

Sign in, nice

sick hound
#

what is this channel for btw

pure dew
#

@sick hound very ugly code

sick hound
#

oh can i give it a shot

#

actually nah cant be arsed

pure dew
#

@sick hound checkout the pinned repo

sick hound
#

wtf

#

that's hard

#

i have no clue how you'd do that

#

actually nah

#

max syllables in a row 2

#

etc

pure dew
#

@sick hound look at the solutions and merge requests lol

sick hound
#
import random
"""
Submission by Grote
"""

import random
import string
import threading
import multiprocessing
import re

zero = int()
two = len(re.__name__)
one = int(str(len(multiprocessing.__name__))[zero])
space = string.whitespace[zero]
words = [a.strip(string.punctuation) for a in dir(random) + dir(string) + dir(threading) + dir(multiprocessing) + dir(re)]

def random_phrase(length):
    while(length > zero):
        length -= one
        print(random.choice(words), end=space)

random_phrase(17)
#

i call cheating

pure dew
#

how

#

thats probably the "most-correct" answer up there

#

(but im especially proud of mine)

dense spire
#

@fallen heath your solution imports random twice?

fallen heath
#

I do? Mustve missed that

rapid bridge
#

Extra random

dense spire
#

yeah it's twice as random I guess

rapid bridge
#

indeed

fallen heath
#

Exactly

pure dew
#

oh is that how it works?

dense spire
#

it's a pretty good solution but re Thread MainThread re Random SG_MAGICCONST choices dangling choices warn BoundedSemaphore setstate doesn't make for a thrilling read.

pure dew
#

@dense spire read mine then

#

its poetic

fallen heath
#

It's abstract art

dense spire
#

you made two?

#

haha, I see you used the zen as well

#

that's fun, this is imokay

#

hahaha

#

jesus christ the other one

pure dew
#

@dense spire dapper-2 is a meme, i didnt get everything done with it that i wanted, but it was 10pm

dense spire
#

nice work, dude

pure dew
#

juanita will like the functional aspect of the first one

dense spire
#

yeah they're both great solves.

#

print(word(H(), e(), l(), l(), o(), COMMA(), SPACE(), W(), o(), r(), l(), d(), EXCLAMATION_MARK()))

#

love this line

#

I'd merge it but apparently I don't have access :D

#

nice work @vague gust

#

I guess @frosty wyvern will have to do it

#

oh yeah no it's just gitlab that's fucked again never mind

#

I probably do have access

stray needleBOT
pure dew
#

debugging that first one sucked because of how python handles lambdas/generators and expressions @dense spire

noble hare
#

Nested lambda tracebacks could definitely be better.

pure dew
#

generators and comprehensions too

#

using generators in lambdas is a hell all its own

vague gust
#

@dense spire bro I give you permissions for everything you are my homie

#

You are the emergency contact in my passport

dense spire
#

good.

cunning wave
#

Lol

teal rune
#

are tuples lists?

cunning wave
#

No

#

Lists content is changeable tuple is not

#

Also this is not a question for this channel

teal rune
#

no it's related to my contrib to the first challenge

#

I used a tuple exactly like it was a list

brisk zenith
#

line 22 on that file

#

str.split() returns a list

teal rune
#

ok

brisk zenith
#

so you shouldn't use it

teal rune
#

yeah, I didn't check that

brisk zenith
#

:D

teal rune
#

I can fix this but yeah it won't be compact

#

I do feel stupid now, I was thinking by myself why is noone using split? I forgot that it returned a list...

brisk zenith
#

haha ^-^

pine edge
#

how to do the forbidden magyks in python

>>> from ctypes import c_void_p,c_ssize_t,pythonapi
>>> a = (0,)
>>> pythonapi.PyTuple_SetItem(c_void_p(id(a)),c_ssize_t(0),c_void_p(id(a)))
>>> a
((...),)
>>> a[0] is a
True
pure dew
#

not magic, just obtuse code :)

pine edge
#

it's actually not so obtuse

#

this is, as far as i know, the least complicated way to create a tuple that contains itself

#

because, y'know, you can't edit tuples that exist and you can't assign a tuple to itself unless it exists

#

so you gotta ask the c api to do it

brisk zenith
#

why is PyTuple_SetItem even a thing though

pine edge
#

python is written in c, and the only way to build a tuple out of items in c is to copy them into a tuple structure, which nessicitated a function to actually edit a tuple

#

ctypes lets you access c functions in shared libraries, and for convenience exposes a wrapper around the python-c api

#

i'm pretty sure when you do pytuple_setitem and replace a value it probably never gets deallocated

#

so if i hadn't used 0 i would have leaked memory

#

also in python2 doing this segfaults python if you try to access the value of a

#

because python2 has no Ellipsis constant

#

so it actually just tries to print the never ending recursive structure of a

stray needleBOT
frosty wyvern
#

ouuuh, new submissions :) can't wait to look at them and vomit

teal rune
#

not a submission, I realized I made a mistake in my previous one

#

irrelevant, but my concience wouldn't allow it

novel vine
#

Holy shit @pure dew I love it

stray needleBOT
pure dew
#

if i can this to shuffle the whole list I'll push another merge

pine edge
#

i decided to write one for the reverse polish notation

#

i got it working but while i was trying to shorten it more i screwed something up

#

and uhhhh

#
>>> f("15 7 1 1 + - / 3 * 2 1 1 + + -")
Fatal Python error: Cannot recover from stack overflow.

Current thread 0x00007fc833d2f600 (most recent call first):
  File "rpn.py", line 5 in f
  File "rpn.py", line 7 in f
  File "rpn.py", line 7 in f
  File "rpn.py", line 7 in f

i got python to coredump instead of throwing an exception

fallen heath
#

Stack overflow

#

What did you do

pine edge
#

i literally took working code and decided to rename something to something else, somehow introducing a subtle bug

fallen heath
#

Is it looping

pine edge
#

no loops, just recursion.. but recursion is supposed to cap out and throw a recursionerror

pine edge
#

figured out the bug, it did some serious data mashing but dunno why it core dumped

pine edge
#
#begin challenge code
def f(s):
        p=s.rfind(" ");p=p if p!=-1 else 0;c=s[:p];w=s[p:]
        try:return (c,int(w))
        except:o=f(c);g=f(o[0]);return (g[0],eval(f"{g[1]}{w}{o[1]}"))
o=lambda s:f(s)[1]
#end challenge code

# begin tests
assert(o("1")==1)
assert(o("2 2 +")==4)
assert(o("2 3 + 1 -")==4)
assert(o("15 7 1 1 + - / 3 * 2 1 1 + + -")==5)
assert(o("420 1337 + 1 -")==1756)
# end tests
#

tada

#

and now i'm going to look through everyone else's code and see how badly this compares

pure dew
#

no string literals

#

" " and your f-string

brisk zenith
#

this is for challenge one though..

pine edge
#

yeah, challenge one is just no lists

pure dew
#

oh oof

#

rip me

pine edge
#

i think this might be the shortest one actually

#

unleesssss

#

are we actually supposed to use the division character instead of /

frosty wyvern
#

eh.

#

So thing is, I accidentally copied an example from wikipedia that had those symbols

#

without noticing

#

and then people started incorporating them into their solutions lmao

#

but you don't have to.

pine edge
#

neat

frosty wyvern
#

wow though

#

Brilliant solution.

pine edge
#

should i write commentary

frosty wyvern
#

Yes please!

#

That would be neat.

pure dew
#

nice solve

frosty wyvern
#

When you're done could you submit it as a Merge Request on our repository? ^_^

vestal solstice
#

why the () after return?

pine edge
#

what, that i'm returning a tuple?

vestal solstice
#

I don’t know how it works, do you need them?

pine edge
#

yeah. the function is recursive and needs information from it's child functions

#

so each function returns more than one thing

vestal solstice
#

yeah

pine edge
#

at the last layer it's stripped away by that lambda

vestal solstice
#

but the () are not necessary

#

it’s still a tuple

frosty wyvern
#

explicit is better than implicit

#

I guess this is golf

#

but yknow

#

i guess you're talking to save bytes

vestal solstice
#

sure

pine edge
#

huh

#

i didn't know those were optional

#

ok cool i'll get rid of those

#

thanks bud

vestal solstice
#

p=s.rfind(" ");p=p if p!=-1 else 0;

#

could you prepend a space?

#

that way it will return 0 if there is no space

pine edge
#

it'll do it multiple times because recursion, but it shouldn't break anything because it's got lazy parsing

#

and won't actually explore further if it doesn't need more operands

vestal solstice
#

worst case you can (" "+s).rfind(" ")

pine edge
#

that would break indexing later, because you'd get a shifted result if there is a space besides the one you prepended

#

changes the string length

vestal solstice
#

ah

#

right, I got confused

pine edge
#

buuut the trick with prepending a space every iteration does take it down from 194 to 173 characters while still passing all tests

vestal solstice
#

sweet

pine edge
#

it's actually way harder to write commentary for than to come up with this in the first place

#

like, how do i write a sentence that describes how it works in a way that's reasonably short and isn't incredibly confusing

frosty wyvern
#

loool, you don't have to go in depth

#

just an overview/summary is fine if you can't come up with something

pure dew
#

hey @frosty wyvern I've got a solution that's in the 5-6 hundred line range

frosty wyvern
#

: )

#

Feel free to add it :P

#

Though for future reference please post subsequent solutions to the same problem in the same file pretty please c:

pure dew
#

well, its not pure python

#

I'll combine the two pure python solutions into one file

frosty wyvern
#

alright cool :)

pine edge
frosty wyvern
#

Besides the fact that recurse isn't a word, it makes sense :D (I'm being pedantic, people will understand)

stray needleBOT
frosty wyvern
#

awww ye

pine edge
#

i just checked and everyone who completed challenge two uses the same source of words i was thinking of using

#

i either have to use them more creatively or find something even more radical

frosty wyvern
#

If you can make yours create more valid english sentences than just random patchwork of words thatd be cool too ;p

pure dew
#

^^^^^

pine edge
#

i've done something similar

#

but with a much larger source set. i'll see how well it works.

pure dew
#

@frosty wyvern my main solution line is 700 chars rn

frosty wyvern
#

: D

pine edge
#

protip: if you're gonna use __doc__ for source, you can get a hell of a lot more if you dump the __doc__ of the module functions, too.

pure dew
#

LMAO i got it

#

some of these make a little sense

#

Than complicated unless idea not pass.
Sparse is explicitly than great is --
Face and refuse it's pass ambiguity!
Although idea to practicality than easy --
One great to better is honking.
Never is readability flat let's python..

frosty wyvern
#

One great to better is honking indeed my old friend

#

Let's python.

pure dew
#

948 char line

frosty wyvern
#

what in the blue bill clinton fudge is a charline

pure dew
#

my main line is 948 characters long

frosty wyvern
#

oh my god

pure dew
#

multiline lambdas

#

❤ I'll MR in a sec

stray needleBOT
pure dew
#

@frosty wyvern take a look, if you can stomach it

dense spire
#

@pine edge mine did not use docs for source, though it might appear to at first glance.

pine edge
#

it was an exaggeration. i just ran grep -R __doc in the solutions directory to see how many times it was used. i saw some that painstakingly assembled words from non-strings. did you do that or did you have an entirely novel source of words?

dense spire
#

I used import this as my source :)

#

but obfuscated the import

#

fetching the word "this" from the random.sample docstring.

#

the sentences are a bit samey but they are in fairly legible english and often end up with fun alternative meanings.

#

kinda yodaey

pure dew
#

@dense spire ah, i just directly imported it

stray needleBOT
novel vine
#

That’s genius lemon. Kinda what I wanted to do, except I wanted to use error messages.

pine edge
#

how do you get access to the text of error messages

pine edge
frosty wyvern
#

New York Times Best Seller

pine edge
#

i implemented a first order markov chain

#

so it will only print out words adjacent to words that it has seen being used adjacent

#

meaning it is slightly more coherent than random words

#

higher order markov chains only use combinations of 2 or more words it's seen before

#

also they tend to use word combinations they've seen more frequently more often, but i just said fuck it and all word combinations are equally probable

#

it takes a seed

#

but due to certain random memory conditions the seed is only valid during the same run

stray needleBOT
pure dew
#

rip us

frosty wyvern
#

brilliant, it didn't even occur to me to implement a markov chain! well thought out!

#

@those of you who are interested in these challenges: What would you like the next challenge to be like? Harder? Easier? Longer? Shorter? More restrictions? More open-ness?

arctic bridge
#

So, let's talk about Jython

pure dew
#

lets not actually

arctic bridge
#

How do you determine the OS?

>>> platform.system()
'Java'
#

Overruled

pure dew
#

wait what

arctic bridge
#

Anyway

pure dew
#

how do you determine the os?

#

lol

arctic bridge
#

Well

#

I discovered this hacky method, that's somewhat elegant in that it works regardless of interpreter:

>>> import os.path
>>> import ntpath
>>> import posixpath
>>> os.path == ntpath
True
>>> os.path == posixpath
False
pure dew
#

aside from ```py
os = "nt-ish"
try:
import win32
except ModuleNotFoundError:
os = "unix-y"

arctic bridge
#

Alternatively:

>>> os.sep == '\\'
True
#
>>> import java.lang
>>> java.lang.System.getProperty("os.name")
u'Windows 10'
pure dew
#

uh lmao

arctic bridge
#

The last one is nice because it tells you what the exact os and version is

#

The other methods are "is this windows"

#

try-except is a good one too

#

Jk

pure dew
#

the last one isn't exactly portable

arctic bridge
#

Doesn't work

#

This is for Jython remember?

#

Otherwise you just use platform.system()

pure dew
#

only jython?

arctic bridge
#

Platform.system returns Linux, Windows, or Java

pure dew
#

oh nvm i see

arctic bridge
#
>>> import win32
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named win32
#

Except I'm on Windows

pure dew
#

i was memeing

arctic bridge
#

Since it's java you don't have the winapi

pure dew
#

idk what the module is called

#

oh

arctic bridge
#

oh, right

#

you use ctypes

#

or something

pure dew
#

i dont even use ctypes

#

i just write a c extension lol

arctic bridge
#

silly me believing some man on the internet

#

Yeah there isn't JNI in Jython IIRC

#

Java Native Interface

pure dew
#

oof

arctic bridge
#

Quick patch and I can now check the Jython support box lmao

pure dew
#

for what?

#

do Jython/PyPy/IronPython use pip?

arctic bridge
#

Yes they all do

#

One of my projects

#

Except jokes on me

#

AttributeError: 'module' object has no attribute 'windll'

#

So there goes that method

#

Well, it works for interfaces at least

#

The likelyhood of anyone actually using Jython or IronPython with my package is very low

pure dew
#

Jython only supports 2.7 <= oof

arctic bridge
#

However, it's good because it weeds out some edge cases and assumptions that could be triggered on normal CPython in certain instances

#

My package supports 2.6+

#

Actually, I think I added 2.5, but don't have a way to test

pure dew
#

wow

#

i like f-strings and such way too much for that

arctic bridge
#

It varies by project

#

Discord RP and bot are both 3.6+ only

#

But this is a package that's intended to work in as many places as possible

#

And distros like RHEL which don't even have 3 installed by default yet and getting anything newer than 3.4 is difficult

pure dew
#

oh nice

arctic bridge
#

Oh lawd

#

Running IronPython inside WSL

#
Supercomputer-14:get-mac$ /mnt/c/Program\ Files/IronPython\ 2.7/ipy.exe
IronPython 2.7.8 (2.7.8.0) on .NET 4.0.30319.42000 (64-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> Traceback (most recent call last):
IOError: [Errno 6] The handle is invalid.

>>> Traceback (most recent call last):
IOError: [Errno 6] The handle is invalid.

>>> Traceback (most recent call last):
IOError: [Errno 6] The handle is invalid.

>>> Traceback (most recent call last):
pure dew
#

wait

#

it doesnt even launch?

arctic bridge
#

It does

#

Just every time it tries to display the prompt

#

It throws an IOError

pure dew
#

oh

#

because it tries to read input and fails

arctic bridge
#

Or something

#
Supercomputer-14:get-mac$ /mnt/c/jython2.7.0/bin/jython.exe
console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp65001.
#

RIP

#

Oh, ubuntu has jython tho in apt

pure dew
#

unsupported charset

#

lmao

arctic bridge
#

cp65001 is what powershell uses by default or something IIRC

#

Or Windows

pure dew
#

windows doesn't use that by default

#

you have to chcp 65001 to see unicode characters

calm rampart
#

i'd call that a bug in jython

#

or maybe in java, but probably jython could work around it

arctic bridge
#

Heh

#

Um

#

So, you did notice I was calling it from inside WSL right?

#

*Windows Subsystem for Linux

#

With the apt packaged version, I get these lovely warnings:

Supercomputer-14:get-mac$ jython
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by jnr.posix.JavaLibCHelper$ReflectiveAccess (file:/usr/share/java/jnr-posix.jar) to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of jnr.posix.JavaLibCHelper$ReflectiveAccess
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jython 2.7.1 (, Oct 22 2017, 13:43:00)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java10.0.2
Type "help", "copyright", "credits" or "license" for more information.
>>>
#

Either way, it doesn't matter, I was just testing a few things

calm rampart
#

"cp65001" suggests that it's somehow breaking out of the WSL 'sandbox' to get the stdout encoding

arctic bridge
#

Yeah

#

It's not really a sandbox though

calm rampart
#

oh duh

arctic bridge
#

Maybe...sandy grass?

calm rampart
#

you're not calling a WSL version of jython

arctic bridge
#

yeah

#

jython.exe

#

xD

calm rampart
#

so it doesn't care you're calling from inside WSL

arctic bridge
#

In Windows PowerShell it's just fine:

PS get-mac>C:\jython2.7.0\bin\jython.exe
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_181
Type "help", "copyright", "credits" or "license" for more information.
>>>
calm rampart
#

yeah my guess is that WSL sets the console code page to utf-8 so linux programs can output utf8

arctic bridge
#

Likely

calm rampart
#

lol

#

if you try to output non-UTF8 bytes, it gets EIO

#
$ /mnt/c/Windows/System32/chcp.com 1252
Active code page: 1252
$ env LC_CTYPE=en_US.CP1252 printf '\u20ac\n'
€
$ printf '\u20ac\n'
€```
#

it's not possible to generate locales for CP437 by default

#

other things aren't handled correctly (if you try to create a filename with a non-UTF-8 name, it replaces the characters with \ufffd)

arctic bridge
#

Huh

calm rampart
#

it's a very niche thing to want, and I assume anyone who really wanted it would also want it to support codepages that windows is even worse at supporting than UTF-8 (e.g. EUC-JP)

arctic bridge
#

I know codepages are a thing

calm rampart
#

just kind of interesting that no effort has been made to support the scenario

arctic bridge
#

But not much more than that

calm rampart
#

(I did try remounting /mnt/c with an iocharset option, which would be the solution on actual Linux - it ignored the option)

arctic bridge
#

lol

calm rampart
#

the question isn't so much about codepages in the windows sense as it is about supporting non-utf8 locales for linux processes

#

the primary real consequence for most users is likely to be that it's very easy to get an I/O error by catting a binary file, instead of having it dump the whole file to the terminal

#

like if i cat /dev/urandom i get half a line before it errors out; actual binary files last a bit longer

arctic bridge
#

Ah

teal rune
#

interesting, never tried that on the wsl

frosty wyvern
#

Suggestions for next challenge? :)

#

If there's none then the next challenge will be big and intricate.

#

No? okay then.

#

So I doubt many people will enter the next challenge but we'll see :P

#

It'll be posted soonish

stray needleBOT
frosty wyvern
arctic bridge
#

Write a program that will run on Windows 95

frosty wyvern
#

.>

arctic bridge
#

I'm not good with these brain-bending things ok? coolsob

frosty wyvern
#

Anyone got any ideas/plans for their esolang entry? :D

#

Mine revolves around nondeterministic flow

smoky briar
#

Ping pong

frosty wyvern
#

wat

smoky briar
#

Functions are identified by numbers and separated in two groups even and odd, the output of a function defines which function it will be sent to in the opposite group, based in how much the output deviates from the input of the function, if it goes below or above the function limit, it just flips and goes the other direction, basically, a value is a ball and it keeps bouncing between functions and changing its direction/value

frosty wyvern
#

LOL

#

I love it.

arctic bridge
#
s1(/dev/urandom), s2(/dev/null)
s1 => s2
s1 <-> s2
reap(s1)
alive(s2) == False
frosty wyvern
#

wat

#

thats not an esolang shut up

arctic bridge
#

Why not

#

It's a language created for memery and not to solve any problem

#

Doesn't' that make it an esolang?

frosty wyvern
#

it's not python tho

#

u goon

arctic bridge
#

Um

#

Yours isn't either?

#

None of these are?

frosty wyvern
#

wat

#

the implementation

#

i m p l e m e n t a t i o n

arctic bridge
#

Yes

#

Exactly

#

I don't have one

#

But let's pretend it is ok?

frosty wyvern
#

eat a pickle

arctic bridge
#

I just did a few minutes ago thank you very much

frosty wyvern
#

mmm

#

i want pickle

#

tanks

sick hound
#

did someone ever try the .gertrude esolang ? Quite fun to use

cunning wave
#

This is not for non python languages but for really fucked up or weird python

#

Or python VM languages

sick hound
#

does Python 2 count as an esolang ? : )

#

to me, that fits the definition of "weird Python"

cunning wave
#

No

sick hound
#

I'm just trolling dw

sick hound
#

hi

#

how can i make print(f"{'*'*10}\n"*10) this smaller

pure dew
#

Does lambda calculus count as an esolang?

frosty wyvern
#

sure.

vestal solstice
#

@sick hound that’s the ppcg record

#

for python 3

sick hound
#

@vestal solstice ppcg?

vestal solstice
#

your f-string solution is same length

sick hound
#

ah ok

vestal solstice
#

in python 2 you can make it shorter

sick hound
#

ty for information.

pure dew
#

not even a choice there mate

#

if your code has newlines, it's bad

pine edge
#

uhhh i have one somewhere i can submit

#

it's written in c but i can rewrite it in python

#

the gimmick is that there's no branching

#

if you do a comparison and it returns true nothing happens

#

if you do a comparison and it returns false, the thread is terminated

#

but, there is multithreading

#

and also communication between threads

#

i honestly don't know if it's turing complete

pure dew
#

lmfao wat

sick hound
#

what did I just read

frosty wyvern
#

looool

#

do it

#

please

pine edge
#

the next challenge should be checking for primality in the esoteric languages made here

brisk zenith
#

oh that would be nifty.

frosty wyvern
#

oh boy

#

My esolang is sort of working

#

Still gotta add some stuff but

#

Basically, it operates on integers and you can specify nondeterministic code paths that are randomly chosen

#

it doesnt support nesting of any kind for now

#

I'm way too tired to actually try to work that in tonight but

#

here's a demo run:

#
lex.lex("3 -> ? + 1 | - 1 | pow 2 ? -> print ;")
interp = Interpreter(lex.tokens)

for i in range(10):
    interp.run()
>>> 9
>>> 9
>>> 2
>>> 9
>>> 2
>>> 9
>>> 2
>>> 4
>>> 4
>>> 2
#

basically the arrow pipes the output of the previous function or literal to the next, blocks surrounded by ?s are nondeterministic, the interpreter chooses one of the operations at random (operation being separated by Pipes)

#

I didnt try to see if it works if I put like more than one operation in a choice

#

HMM

#

nope :D

#

oh wait i think i know why tho

#

:D it works

#

ooh i can even make the code look neat cause all whitespace is considered the same

3 ->
? + 2
| - 5
| * 3 -> + 1
? -> print ;
#

That one outputs either 5, -2 or 10

pure dew
#

lol

#

would that be considered turing complete?

fallen heath
#

nah

frosty wyvern
#

not yet

#

also its nd so

#

xD

#

next i wanna add support for floats

#

and err

#

strings, ideally.

#

I was too lazy to write a regex to check if a number is a float

#
  elif t[0].isdecimal():
                try:
                    val = float(t)
#

: )

brisk zenith
#

aw heck your esolang has -> arrows too.

frosty wyvern
#

: D

#

i love -> arrows cause they look cute with my font

brisk zenith
#

do show

frosty wyvern
brisk zenith
#

oh :D

frosty wyvern
#

whatchu working on

brisk zenith
#

queue-based memory sorta thing

#

i've mostly just got ideas atm

frosty wyvern
#

:D awesomeee

#

do showww

brisk zenith
#

how to show ideas

frosty wyvern
#

:D

brisk zenith
#

hmm

#

lemme try and get some examples, maybe

frosty wyvern
#

errrrrrrrrrrrrrrrrrrrrrrrrr

#

so it would seem even my bugs are non deterministic.

brisk zenith
#

lmao

pine edge
#

add superposition

frosty wyvern
#

aww this gon be a pain in the butt to debug

pine edge
#

execute all possible pathes, then statistically decide what output to give at the end

#

that way you'll always encounter every bug

frosty wyvern
#

That was actually my original idea

#

I was gonna name it some pun on schrodinger

#

like schrodongerlang

pine edge
#

dang

pure dew
#

schrodonger or schrodinger?

vestal solstice
#

suredonger i'd guess

brisk zenith
#

showdonger

vague gust
#

I haven't posted about it here yet but I am making a language for this challenge

#

shawn told me it didn't have to be esoteric so I am trying to make a very basic functional language

#
[DefinitionNode(name='x', arguments=['a', 'd'], body=[VariableDeclarationNode(name='c', expression=[VariableReferenceNode(value='a'), OperatorNode(value=<Operator.ADD: 0>), VariableReferenceNode(value='d')]), CallNode(name='print', arg_exprs=[VariableReferenceNode(value='c')])])]
#

so far I have a basic AST complete, it recurses so you can have weird things like a(b(c(d(e))))

#

no . properties yet, probably never will be

#

I plan to have some python inter-op so builtins can be called from the language, but I don't know if I'll have sef being called from python

#

I may also add conditions at a later date, but for now they are not present

#

I'll work on the logic and then maybe stick it up on GitHub tommorow for some people to take a look at

frosty wyvern
#

:D weeeee

sick hound
#

Oh nice

#

I may participate if its not only about esoteric languages

#

Don't have that kind of creativity

vague gust
#

neither lol

#

I wanted to try build something which kinda executed, I've only worked with AST when I was transpiring

#

*transpiling

brisk zenith
#

time to make an AST

vague gust
#

Okay lads

#

Sef is now open-sourced

#

no requirements apart from python builtins

#

820 lines of legit python

#

https://i.seph.club/kos03.png
execution of:

def main()
    print("Hello welcome to my program!")
    name = get_name()
    welcome(name)
end

def get_name()
    input("Please enter your name: ")
end

def welcome(name)
    print("Welcome to my program", name)
end
wind maple
#

is this ruby

pine edge
#

it's lua-y

vague gust
#

If a function is not defined I just default to builtins because i don't want to bother implementing

#

it is not ruby, but the higlighting works for ruby :^)

wind maple
#

memeed

brisk zenith
#

in fact i just got a better idea for an esolang. it's not really an esolang, but.. it sorta is?

#

lemme get some ideas.

novel vine
#

Are we still on the esolang idea?

fallen heath
#

headache stuff

pure dew
#

lets let this one last a while, ok? ive been busy and unable to start

wind maple
#

whats up everyone welcome back to my python let's play series today we are taking a look at my new cool eso lang called "brain heck" it's pretyt cool tbh it uses these symbols I dont quite understand how it works but heres an example anyways if we could hit 200 likes that'd be awesome, thanks for watching don't foget to subscribe and hit that notification bell to keep up to date

novel vine
#

Delet this nefew

pure dew
#

@vague gust ur string regex is bork fyi

vague gust
#

regex is bork???

#

actually someone told me that I could use something else for it yesterday

#

i forget what

brisk zenith
#

ply

vague gust
#

nO

pure dew
#

it'll match "sesesirewn'

tropic gulch
#

yES

pure dew
#

use Lark with the lalr parser option tbh

tropic gulch
#

but ply uses regexes too

pure dew
#

just Write A Better Regex

vague gust
#

@pure dew it's matching that on purpose!

#

it's a feature! not a bug!

#

writing a long string? forget what type of quote you started with? nevermind! just use either!

novel vine
#

I present to you guys Dict lang

#

...after I merge

vague gust
#

what is dict lang

pure dew
#

@vague gust it also doesnt handle escapes

#

escaped quotes, that is

vague gust
#

i don't really want to make the strings anymore advanced than they already are though

pure dew
#

lol

novel vine
#

You will see @vague gust

stray needleBOT
vague gust
#

approve clays merge lmfao

novel vine
#

pog

vague gust
#

wow clay

#

this is... disgusting

#

nice

novel vine
#

yeeet

#

Its the best idea honestly

#

At least I have a doc string

vague gust
#

tbh if you could serialize and deserialize this

#

it might be useful

novel vine
#

Maybe we could like

#

store data in this structure

#

to make it easily accessible, but where would be used

#

the web? maybe?

vague gust
#

remote procedure call betweeen two python programs?

novel vine
#

msybe it could be represented as an object

#

In like javascript ready form

vague gust
#

hmmm yeah

#

json encoded

novel vine
#

It also only supports one level of nesting right now

#

So if you wanna do anything more than define a function with one statement wait for version 4

vague gust
#

classes => functions => code

#

ezpz

pure dew
#

@novel vine u need ast

vague gust
#

and eventually modules => classes => functions => code

#

so you could even put your entire project in one data structure

novel vine
#

I might flesh it out more who knows

#

Kinda busy though

pure dew
#

bruh i dont understand what you're doing with the type field

#

json already handles types

novel vine
#

Yes but

#

This isn’t json

#

And I’m still experiment with stuff because strings get lost in the eval

#

So was trying to find a way to make “print(hello world)” -> print(“hello world” by using a type() thing

#

But I eventually just hard coded in the char code

pure dew
#

change of idea, im doing an unlambda "interpreter"

novel vine
#

Oooo

pure dew
#

maybe not tho

#

thats a lot of theory to learn

pure dew
arctic bridge
#

How'd you generate that?

pure dew
#

Lark has a pydot to png transformer

#

i just have a function in my grammar tester replr that generators the image and opens it with photoqt

#

@arctic bridge ^

arctic bridge
#

Oh cool

#

ty

pure dew
#

Got my bracket applicator working correctly (or so it seems)

py-lci> λx.x l
(λx.(x l))

py-lci> λx.x a b c d e f
(λx.((((((x a) b) c) d) e) f))
#

those match what lci outputs

shut yew
pure dew
#

oof

frosty wyvern
#

oshet i need to fix my interpreter i havent touched it in a few days

pure dew
#

Function expansion is going well

py-lci> λabcdef.(a b) (c d) (e f)
(λf.(λe.(λd.(λc.(λb.(λa.(((a b) (c d)) (e f))))))))
pure dew
#

(ik that's backwards, I noticed after i posted it. it's fixed now)

grave rover
#

@frosty wyvern challenge
Implement Malbolge in python
I did it and it was surprisingly fun (haha no)

frosty wyvern
#

Awesome :) Anyone that's created something or is working on something, feel free to submit Merge Requests to the repo even if yours is still a work in progress, I can't wait to look at all the projects

stray needleBOT
frosty wyvern
#

oof

#

okay

#

Randalang v0.0000000001alphabet is out :)

#
"lemon" -> set 12 ;
    lemon ->
        ?
            + 5 -> - 2 |
            * 2 -> - 1 |
            + 1
        ?
            -> print ;
pure dew
#

@frosty wyvern very nice

fallen heath
#

Trey Hunner disagrees with lambda abuse

frosty wyvern
#

I went through the article and very few points seemed pertinent to me

#

He's pointing out obvious stuff, or showing examples where the code is confusing but not because of the lambda function, because of the problem in general

fallen heath
#

he has a point for the stuff where people use lambda's to recreate builtins, but otherwise I didn't think any of them were confusing

frosty wyvern
#

Oh yeah

#

for sure

#

there are good points