Old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
docs.hylang.org
pastebin.com
pastebin.com
kevv.net
twitter.com
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
R u s t
u
s
t
God is real unless declared Integer
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?
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
Google Regex Capture Groups
thnx ill check it out fren
Holy shit thats cool
w-what?
cringe? cringe.
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
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
no luck again. i don't know how to do it. an example pls.
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
Here is output (it just repeats MOTD after 5 iteration, but is not fetching new messages written by users on channel)
pastebin.com
>Didn't I tell you to fuck off already retarded frogposting Jow Forumsnigger
I am the code. The code is me.
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
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
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
>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
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
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.