/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: images.jpg (219x230, 15K)

Other urls found in this thread:

docs.hylang.org/en/master/whyhy.html
pastebin.com/uSURX69w
pastebin.com/neBaVpxn
kevv.net/you-probably-dont-need-recaptcha/
twitter.com/SFWRedditImages

First for Nim is best lang

need project ideas for esp32

defer createNewThread()

God I love lisp and God I love Emacs

>God
that's a weird way to spell rms

Defining your own types with sequent calculus is bretty fun

Attached: 1568277272075.png (795x595, 635K)

R u s t
u
s
t

God is real unless declared Integer

Attached: 6666.png (247x201, 638)

my computer has no serial port; do I write a USB or a NIC driver?

Why not both?

Groups

I'm working on something that involves regex so I need to ask something. I want to match strings that consist of
>open bracket
>one or more non-whitespace characters and no brackets except if they are escaped
>close bracket
so something like
>^\[[^ \t\v\f\n\r]\]+$
but this needs to be rewritten so [ and ] are not accepted except if they are escaped. how to do that?

Attached: 1566400152405.jpg (319x331, 15K)

I have 500~ lines in my text-editor before I have to apply for a new programming license.

Hy is the best thing to happen to programming in the past 50 years.

teach me fren

>frog folder

What the fuck is hy

rent free

r/gatekeeping i see
you don't own the website

Attached: cirno.webm (320x180, 759K)

Google Regex Capture Groups

docs.hylang.org/en/master/whyhy.html

thnx ill check it out fren

Holy shit thats cool

Attached: 1567342475593.png (640x480, 259K)

w-what?

cringe? cringe.

Attached: 1566462403100.jpg (710x400, 36K)

I posted in old thread
Please help out the poor village idiot
I'm trying to create a regex to pull out a card name from the text of random Magic: The Gathering cards. I know that the text will fit one of two patterns:
Partner with card_name\n
Partner with different_card_name (Bunch of text in parentheses)\n
So what I have after struggling for a while is:
(?:Partner with (.+)(?= \())|(?:Partner with (.+)\n)
It successfully captures the card name ((.+) is the capture group I'm concerned with), but depending on the pattern it will either be in $1 or $2. Is there a way to construct it so that there's only one capture group? It would simplify my code.

(checked)
Got an example? Is this Shen or are you doing it on paper?

bluuuuuuuuuuuuuu

Attached: 1564808698401.jpg (1024x576, 66K)

She looks like she needs to sneeze

Trying to return P or NP from a function by the bool type is throwing an exception

user

Attached: 1566716770827.png (850x850, 885K)

no luck again. i don't know how to do it. an example pls.

Attached: 1566030653077.png (923x713, 16K)

See Use regex101.com

kill yourself

kill me

>What are you working on, Jow Forums?

On how to kill ants like yourself.

Didn't I tell you to fuck off already retarded frogposting Jow Forumsnigger
Fuck you dumb tourist for engaging with this retard
>reply chain meta humor
>>>reddit

i need a help with C IRC client. While i get correct output after 6 iterations of while loop that indicates i connected to channel, i cannot send any messages there. I get some error messages due to timeout, or sometimes lack of registration, which is weird because its newly made testing channel. When i message something on Kiwi i also dont see this message in client even tho i should. Here is code
pastebin.com/uSURX69w
Here is output (it just repeats MOTD after 5 iteration, but is not fetching new messages written by users on channel)
pastebin.com/neBaVpxn

>Didn't I tell you to fuck off already retarded frogposting Jow Forumsnigger

Attached: 1566938951506.png (720x757, 338K)

I am the code. The code is me.

Attached: 1D1CED9F-CD01-4BD1-B634-FD21999827E8.jpg (400x400, 19K)

No, you are cute

>using nigger
> calls someone a poltard for frogposting

wat?

Slurs are actaully politically incorrect while pepehate is a meme

>Slurs are actaully politically incorrect
nigger and faggot are the bread and butter of Jow Forums

>you can't just use slurs! that's a bigoted Jow Forums thing!
>calls it >pepe
I told you once before and I'll only do it one more time
Fuck off back to >>>reddit
Don't forget to take your soilent with you

But we're on 4channel, though

>b-bu but muh feefees hurt
fuck off faggot

>soilet
Kys, my soi deink has more protein than you will ever consume in your whole life

What language are you written in?

Im not the guy you were replying to earlier, i was just trying to correct your misunderstanding. This is 4channel, not Jow Forums. Niggerfaggot.

Pepehate must be a fucking old meme then, because it's been around for at least 5 years now on boards other than /v/, /b/ and Jow Forums.

I'm here for programming socks not racial slurs

.


.


Why do people think I'm from reddit?

>#define area(x) _Generic((x), long double: areal, \
default: area, \
float: areaf)(x)
lmao what the fuck is wrong with Cniles?

Probably the worst named C11 feature.

> 09/12/19
I swear I could've made the same post a year ago, it's like looking at the mirror.

I see nothing wrong

program pizza
implicit none

type pizza_t
character (len=20) :: title
integer :: price
end type

type(pizza_t), dimension(6) :: menu
logical, dimension(6) :: selections
integer :: i, n, total_price

selections = .false.

menu(1) = pizza_t('Opera', 440)
menu(2) = pizza_t('Special opera', 470)
menu(3) = pizza_t('Quattro stagioni', 590)
menu(4) = pizza_t('Mexicana', 520)
menu(5) = pizza_t('Tropicana', 490)
menu(6) = pizza_t('Fantasia', 620)

print *, 'Menu:'

do i = 1, size(menu)
print '(i2, '': '', a, '', '', f4.2, '' '')', i, trim(menu(i)%title), menu(i)%price/100.0
end do

print *, 'Select items. To check out, select 0: '
n = 1
total_price = 0
do while (n > 0)
read (*, '(i2)') n

if ( (n >= 1) .and. (n

top 10 worst syntax of all time

the syntax is not that bad at all desu.
better print statement than python3 gives you.

the syntax is very obviously abominable

>comparing it to python

I see the problem, you think whitespace belongs in syntax definitions

Help please...

try and fix it and see how far you get, and how meaningful your changes are, and - most importantly - what specifically you're changing. It's not *syntax* for the language to call a type 'integer' instead of 'int' for example.

>sees no mention at all of whitespace
>aha, I can see that you think something about whitespace

can i get a version of the op not for ants please?
also the original please?
tyvm

type pizza_t
character (len=20) :: title
integer :: price
end type


I see no ( or { or [; so I assume whitespace definition is involved

isn't it obviously 'type blah .. end type' ?
see the 'type' after the 'end'?
see the stuff after 'end' in the rest of the sample?

first, in declarations i would put the type on the right and the name on the left
second all of those weird .s have got to go
and thirdly this print * ,,, is weird

At a minimum, the datatypes inside require newlines if you skip ;

new try

Attached: 1504294125954.jpg (473x496, 105K)

at least i can read this one
who’s the qt?

The language is Fortran 95/200x

tyvm

Then reply to my problem pwetty please

cute, i didnt know yandex could do that

Attached: 3103B04D-2230-4C5D-B27E-AAAD2FF697AA.jpg (1242x2148, 1.06M)

meanwhile, complete retards are still using Google.
baka desu senpai

woah

Google can also do that

>shilling google
Fuck off moot

How would you split a big rect into a list of small rects of flexible dimensions but preferred size ratios?

for a concrete example, imagine a list of simple binary switches, they probaly look best at 3:1 w:h and I have a zone on the screen to put them in

It feels like there should be a clever way to solve this, but it probably has a stupid name after math phd that won't show up on google without an exact match

reddit = lambda { |str|
str.grapheme_clusters.map.with_index { |c,i| i.even? ? c.upcase : c.downcase }.join
}

>division is PhD level math

>posts on 4channel after using a google service (recaptcha)

why the fuck do i have to aid google's evil AI projects to post

Attached: 1562893424360.jpg (201x187, 21K)

>technology board
>is against the advancement of technology

name a service as good as recaptcha to stop spam

Where does Moot work mmmmhhmmm?

>>>FLEXIBLE DIMENSIONS
Whats x over undefined? Its not a simple divisions unless I set the dimensions

kevv.net/you-probably-dont-need-recaptcha/

please anyone i need a help

buy a pass
it's just a temporary solution for the sitewide spam sweatie :)

credit card payments

this is /prog/, not Jow Forums
FUCK technology

Attached: 1568110113056.jpg (640x480, 138K)

Sorry i meant
>division and an if statement is PhD level math

don’t cry, magooka :c

You've changed your answer 3 times are you sure you understood the prompt?

Sorry, allow me to clarify
>division is PhD level math

Why is Gradle such a piece of shit?
It spreads shit out across different files in some dumb language and hides all definitions of functions and variables. There's too much magic involved with it and nothing seems to make sense.