[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Pascal Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 329
Thread images: 34

program dpt;
begin


What RAD projects are you working on today, /g/?

Previous thread: >>61490077

end;
>>
Is it possible to code an "app" that will screenshot a selected 4chan post and, if desired, save it to my computer? I'd a web designer so I guess my forte is the more creative side of technology and I'm not sure what's possible and what's not. I guess my ideas sometimes exceed reality in a sense? Haha
>>
>>61496556
>app
>I'd a web designer
"no"
>>
haskell!
>>
>>61496524
stop fucking with the classic /dpt/ thread format you fag

> Pascal
lel brainlet
>>
>>61496635
I prefer C
>>
Why are people so afraid of statically typed languages?
>>
File: 1472274974829.jpg (3MB, 10000x10000px) Image search: [Google]
1472274974829.jpg
3MB, 10000x10000px
>>61496635
good post!
>>
>>61496662
C++!
>>
File: 1476520471349.png (372KB, 1280x720px) Image search: [Google]
1476520471349.png
372KB, 1280x720px
>>61496735
stop posting
>>
>>61496758
Scheme?
>>
Rust!
>>
>>61496786
bad post!, dumb nigger.
>>
File: 1482952102573.jpg (101KB, 735x705px) Image search: [Google]
1482952102573.jpg
101KB, 735x705px
>>61496779
get out
>>
Lua!
>>
>>61496808
this
>>
File: 1471896975306.jpg (56KB, 595x708px) Image search: [Google]
1471896975306.jpg
56KB, 595x708px
>>61496808
bit childish desu senpai
>>
>>61496801
...C?
>>
>>61496808
>>61496823
>end
>endixing from 1
dumb lua poster.
>>
>>61496556
Not a webdev by far, but you could select it by ID, download JSON, parse it, find the text of the post and generate the image yourself.
>>
Islam!
>>
File: 1488494056684.jpg (33KB, 534x566px) Image search: [Google]
1488494056684.jpg
33KB, 534x566px
>>61496831
maybe in the 1980s
>>
File: 1453496145426.gif (1MB, 303x307px) Image search: [Google]
1453496145426.gif
1MB, 303x307px
>>61496829
That's why I use it with LÖVE to make vidya.
>>
>>61496834
>not ending your blocks with 'end'
>the first element is element number 0
dumb C brainlet
>>
>>61496834
>arguing about such petty things.

The single most sad thing about Lua is that everything is global by default.

Otherwise it's a pretty neat scripting language, I like it a lot. 15k lines of clean C, 10k if you exclude the standard library, interpreter and bytecode compiler. Neat and lightweight, perfect of embedding.
>>
>>61496863
t. pleb
>>
Which programming language would Aggy use if she were a cute anime programming girl?
>>
>>61496836
Anybody know an easier solution?
>>
>>61496662
This image made me laugh
>>
>>61496878
none because programming is sexist and she looks like a giant SJW because of the friends she hangs out with
>>
>>61496855
>not using c++ and sfml
>>
>>61496923
>not using c++ and sdl
>>
>>61496923
>not using C11, GLFW3, glad to load OpenGL ES 2.0 and libsoundio.
>>
>>61496895
>take screenshot of post
>pop up appears asking if you want to save it
>????
>profit
>>
>>61496902
100 million pixels anon
just for you
>>
>>61496556
>>61496836
https://github.com/niklasvh/html2canvas
might get you started.
>>
>>61496653
You're just mad because your favourite language's name doesn't start with a "P" so you can hijack /dpt/ shoehorning its name onto it.
>>
>>61496937
>not using Allegro
>>
>>61496956
>not using assembly and programming your gpu directly
>>
Any Nim fags here? How do I dereference an object?
let input = stdin.readLine

let keys = input.splitWhitespace.deduplicate

var counts = new seq[(string, int)]
for key in keys:
counts.concat((key, input.count(key))) # type mismatch, got ref seq[(string,int)]
>>
This is a traditional foreach loop:

for (String name : names) {
System.out.printf("Hello, %s!\n", name);
}


This is its object-oriented alternative:

new And(
names,
n -> {
System.out.printf("Hello, %s!\n", n);
}
).value();
>>
>>61496948
Or D. Or T.
>>61496946
3k of JS. Maybe I should learn JS, it doesn't seem so bad, even has an ISO standard.
>>61496956
Allegro is bloated.
>>
>>61497056
>foreach loop:
No, it's just a shitty placebo
Here is a real one:

foreach (index, item; range) {}
>>
>>61497076
>D Programming Thread
>Daily Programming in TCL
>>
>>61496869
>everything is global by default.
what the fuck why would they do this
>>
>>61497115
>Delphi and Pascal Thread.
>>
I'm trying to get a genetic algorithm to design analog circuits (amplifiers)
My first version would have the output converge to the sinusoidal input and I don't know why (I was trying to achieve 'x' gain)
I tested my GA with other functions so I don't think it's the cost function
On version 2 right now, but close to giving up :/
>nice blog post
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>61496842
Mature women are all the hype these days.
>>
>>61496948
only kiddie languages start with a "P"
>>
>>61497135
Probably to make it easier for beginners.
Even semicolons are optional.
You can write bug-ridden garbage and it'll still run, you'll have no idea that every variable is global until your logic falls apart and you don't know why.
>>
>>61497152
>fortran
anyone actually use this

>>61497155
this kills the programmer
>>
>>61497135
It was initially designed for people without any prior coding experience. So it was simpler to explain and worked fine for small scripts (and you should never make anything big in dynamic language anyway).

This can be solved by typing local before each variable and using a static analyzer to tell you where you forgot to do that. Makes seeing where variables are declared easier, as a side effect.
>>
>>61497173
>anyone actually use this
not kids like you, that's for sure
>>
File: KYS.png (379KB, 582x480px) Image search: [Google]
KYS.png
379KB, 582x480px
>>61497154
>Prolog is for kiddies
>Pure Data is for kiddies
KYS
>>
>>61497190
2 tru
>>
>>61497191
>php
>python
>perl
>>
>>61496923
I actually moved to LÖVE from C++ and SFML.
>>
>>61497191
i recognise that vid
>>
File: disgust.jpg (9KB, 238x241px) Image search: [Google]
disgust.jpg
9KB, 238x241px
>>61497262
>>
File: powerbook.jpg (13KB, 461x346px) Image search: [Google]
powerbook.jpg
13KB, 461x346px
>>61497234

P-P-P-POWER SHELL
>>
>>61497280
Which poster were you? What was your suggestion? Mine was the C11 one.
>>
>>61497290

>not using P

https://github.com/p-org/P
>>
File: 1500527167256.png (407KB, 807x960px) Image search: [Google]
1500527167256.png
407KB, 807x960px
ocaml!!
>>
OpenGL question. I want to try to render all sprites from MULTIPLE textures with a single draw call (assuming I don't have more textures than there are texture units available). I thought about storing the texture index in the instance array and the doing a binary search in the fragment shader to invoke the correct sampler. Is this the way to go or will the GLSL police knock at my door?
>>
>>61497349
cringe kys
>>
File: forgiven.jpg (100KB, 960x540px) Image search: [Google]
forgiven.jpg
100KB, 960x540px
>>61497280
I've been much more productive with LÖVE, even if my games now only run at 3000 FPS instead of 10000 FPS.
>>
>>61497384
post a screenshot of one of your games
>>
>>61497349
I found that image on Know Your Meme earlier today and saved it. It's like the time I came across a video of a pig eating a cookie on Youtube and, in the next thread I saw on 4chan, someone had posted a screenshot of the video. This simulation in which I live is not very convincing tbqh.
>>
>>61497234
>Perl
>kiddie language
>>
File: help.png (202KB, 1440x900px) Image search: [Google]
help.png
202KB, 1440x900px
how do I use a smart pointer?
>>
>>61497398
>not using atomic smart pointers

what are you even doing
>>
Reply to this post with three programming languages that are worthwhile and shouldn't be purged from this dimension.
>>
>>61497398
ez
https://doc.rust-lang.org/book/second-edition/ch15-00-smart-pointers.html
>>
>>61497398
You need to call the smart pointer constructor with the pointer as an argument.
>>
>>61497413
{}
>>
>>61497413
rust, go, python
>>
>>61497354
>all sprites from MULTIPLE textures with a single draw call (assuming I don't have more textures than there are texture units available). I thought about storing the texture index in the instance array and the doing a binary search in the fragment shader to invoke the correct sampler. Is this the way to go or will the GLSL police knock at my door?

Generally, if statements destroy parallelism. Switch is a jump table though, so it could work.
>>
>>61497431
No, languages that SHOULDN'T be purged from this dimension.
>>
>>61497398
Also when free the surface you need to call the get method rather than feed the smart pointer. The smart pointer is a wrapper around a pointer, not the pointer itself
>>
>>61497413
>>61497152
>>
>>61497446
exactly
>>
>>61497405
>>61497417
>>61497420
I'm retarded, pls help.
>>
>>61497413
C11, Lua5.3, Python3.7
>>
>>61497358
i dont want to kiss you
>>
>>61497413
C

Don't know why you'd need anything else.
>>
File: 1499195879680.png (106KB, 480x529px) Image search: [Google]
1499195879680.png
106KB, 480x529px
>>61497459
>Lua5.3, Python3.7
>>
>>61497443
K I must be dumb because I didn't think about switching, thanks
>>
>>61497457
stop using rust k thx
rust needs less dumbass programmers shitting up the ecosystem
>>
>>61497462
To make graphical applications.
To make applications that don't require performance quickly.
>>
>>61497470
pleb detected
>>
>>61497475
He's using C++...
>>
>>61497480
on that topic which languages offer GUI libraries that arent shit?
>>
>>61497443
Do you think it would be more efficient to do one draw call per texture?
>>
>>61497470
t. certified fizzbuzz programmer
>>
>>61497480
>What is SDL
>>
>>61497483
>t. brainlet
>>
>>61497462
Cant tell if you're meming or just retarded
>>
>>61497470
Why is the top of his head all long and floppy?
>>
>>61497505
>t. certified pythonista
>>
>>61497507
t. joblet
>>
>>61497459
Brainlet
>>
>>61497494
Tcl my man
>>
>>61497523
>t. joblet
I know
>>
File: help.png (205KB, 1440x900px) Image search: [Google]
help.png
205KB, 1440x900px
I'm too dumb for this shit.

I guess I'll should use C#

any good 2D library for it?
>>
>>61497518
t. code ninja rock star
>>
>>61497503
Do you mean draw all sprites that use one texture, then all the sprites that use other texture and so on? Definitely. And simpler on the shader side

Do you mean one call per sprite? Definitely not.
>>
>>61497506
SDL is unusable without C++. Even the tutorials cater exclusively to C++.
>>
>>61497459
> LOO-uh
> Bython
kek
>>>/wdg/
>>
>>61497480
>>61497509
But for real, there's a library for just about everything written in C.

>>61497543
I mean, if you don't know how to program, then sure.
>>
>>61497413
That's easy.

1. Perl
2. Scala
3. Java
>>
>>61497542
Yeah I meant the former. I am doing that right now but was wondering how one would render scenes with thousand of different textures or models. I guess there is no such thing in the wild anyways. Thanks for the help
>>
'C Programming: A Modern Approach' or 'C Primer Plus'?
>>
>>61497574
Modern C
>>
>>61497574
First book
>>
>>61497574
Neo-C
>>
>>61497574
I just keep an online reference bookmarked.
Books are too prone to clutter.
>>
>>61497398
struct SdlSurfaceDeleter {
void operator()(SDL_Surface *s) {
SDL_FreeSurface(s);
}
};

using SdlSurface = std::unique_ptr<SDL_Surface, SdlSurfaceDeleter>;

...

SdlSurface screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE);

Something like that.
>>
>>61497592
http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf
This?
>>
>>61497574
Modern Approach
>>61497506
A bloated, slow, clunky piece of shit library that can't do vertices, instancing, shaders and basically everything.
>>
>>61497674
>>61497664
>>61497596
>>61497592
>>61497574
There's notrhing modern about C
>>
>>61497395
why, whatever do you mean anon?
>>
>>61492064 (You)#
>>61492157#
All I need is a portable (at least for Linux and Windows) way to access the display, graphics (OpenGL), audio, controllers, read and write files/access a database, send data through network, threads and IPC. I'd write my own engine and stuff.

>>61492500#
I don't need a prototype, there are tens of Open Source projects just like this.
I want it to be fast and reliable. I don't care if it takes months, I'll probably never finish it anyways or just end up with concrete ideas on how to do certain parts of the problem and use it to help one of those Open Source projects. I just want to learn to program, not release yet another shitty game.
>>
>>61497691
Learn to read, moron. It's modern *approach*, not modern language.
>>
>>61497395
can I have some oats brother? I'm quite famished
>>
>>61497664
That or A Modern Approach
>>
>>61497709
>modern """approach"""
>>
File: game.jpg (52KB, 641x360px) Image search: [Google]
game.jpg
52KB, 641x360px
>>61497392
This one will have to do, since it's from a game that's not on the internet. Was supposed to be a part of a minigame collaboration project.

The only game I've ever made in Game Maker.
>>
>>61497718
What did he mean by this?
>>
>>61497738
>>>/pol/
>>
>>61497773
lol what
>>
>>61497773
?
>>
File: javawon.png (93KB, 410x209px) Image search: [Google]
javawon.png
93KB, 410x209px
What does /g/ think about Java one?
>>
>>61497539
Lmao retard
>>
>>61497784
>>61497790
It's coincidence detector to conway "Jewish presense", as if they weren't oppressed enough.

/pol/tards should die
>>
>>61497792
I've read you can learn from the best there
>>
>>61497821
>Jews
>Oppressed
Dude wat
>>
>>61497821
no retard
that's triple parentheses you're thinking of
for example
(((Sussman)))
>>
>>61497840
I'm guessing he is one
>>
>>61497840
It was a fucking bait. I don't know why do you /g/tards take it so easily, it's as if you've never been trained on /pol/. Seriously, visit that place and remain calm.
>>
>>61497847
Now you're oppressing the mentally challenged, nice job proving my point.
>>
>>61497821
greetings, reddit
>>
>>61497838
I wonder who that is in the pic. I bet she's a super coder.
>>
>>61497864
lol
for the mentally challenged, existence is oppression
>>
>>61497847
Triple quotes and parentheses were used interchangeably on /pol/, at least when I was there during the election
>>
>>61497861
But I hate /pol/ and never go there
>>
>>61497889
you're retarded AND a pollack, amazing. go back there
>>
>>61497889
it's not originally a /pol/ meme, it comes from TheRightStuff forums
just cause you saw some people doing it wrong doesn't change the fact that the correct way to do it is with 3 parentheses
>>
>>61497899
/g/ is filled with kids who are still stuck in the language war phase. It's sad actually.
>>
>>61496524
does anyone have a problem with RAD studio where the label text (which would change on button click) changes on every mouseenter/mouseleave of the button, after it is clicked?
>>
>>61497889
putting a bunch of quotes around something is nothing new

remember frob?
>>
>>61496524

Hey, does anyone know why I can't use Collections.Generic with FreePascal 3.1.1? (FPC says not found)
>>
>>61497904
And third world countries were used to refer to countries that were allied neither to USSR nor to US, and not to shitholes as the word is used today. Meaning changes.
>>
>>61497948
i'm pretty sure the meme didn't change because you saw one or two autists doing it wrong
every time I've seen it it's been with parentheses
>>
>>61497978
>stop memeing wrong
>>
Are Americans the language shitposters? It's after midnight in Europe, and the language wars have begun. A few hours ago there was a discussion going on.
>>
>>61497997
no, i don't give a fuck what you do
I'm just saying I doubt that guy repeatedly quoted "modern" as a way of implying jewery
>>
>>61498011
he was quoting it because C is dying you fucking idiot. go back to your containment board instead of trying to make everything about /pol/
>>
>>61498008
'murican here
late night /dpt/ is best /dpt/
right now it's 5:30 here. this is the shittiest it's been in the last 24 hours outside of a short interruption with the hijab poster
>>
>>61498008
I'm talking about the C script kiddies, who don't even know their language. One thought that "int main(int argc, char **argv)" is the only valid main prototype, and I showed that retard a C11 standard draft.
>>
>>61498024
I agree with you retard. read my post again
I DON'T think he was implying jewery
>>
>>61497738
Anyway, what did (you), in particular, mean, by emphasizing "approach"? Or was that just a sporadic, meaningless shitpost?
>>
Umm, all anti-diversity non-liberal shitlords go back.
>>>/POL/
>>
>>61498045
don't care
>>
>>61498063
seems to just be a shitpost
it's a shame it derailed everything
>>
>>61498079
?

what the fuck then
>>
File: maze.gif (2MB, 250x250px) Image search: [Google]
maze.gif
2MB, 250x250px
>>
>Entire thread derailed by triple quotation marks meaninglessly placed around the word 'approach'
>>
>>61498111
interesting, but can it make a harder maze
>>
How to procedural generation of dungeons?
>>
>>61498111
Look into minimum spanning tree methods to generate harder maizes.
>>
>>61498125
https://github.com/MariusMacijauskas/maze/blob/master/maze.c

Change config. I would recommend changing scale to 1 or it will take ages. Use ImageMagick and shell to convert to gif.
>>
>>61498155
fucking aMAZEing
>>
Stop trying to deny the oppression of Jews. Dont ever let me catch you using multiple parentheses or quotes you little coward white boys.
>>
>>61498145
depends on what you want, people can, and have, written entire books on the topic
>>
>>61498168
fuck off faggot
stop derailing the thread
>>
>>61498166
lol
>>
>>61498111
thought that was snake for a second
>>
>>61498155
this doesn't generate the gif though

i ran the program and it created 500 images
>>
>>61498201
I'm currently making a snake AI that will generate perfect snake playthroughs. That one will be in Python though, I couldn't handle the memory management in C.
>>
>>61496524
Omg a pascal thread.

I was waiting for this for ages...
>>
>>61496524

using proprietary rad studio when every other language is free
>>
>>61498207
can you not read?
>Use ImageMagick and shell to convert to gif
>>
>>61498207
use imagemagic/ ffmpeg to combine them into a gif/webm
>>
>>61498207
convert -delay 10 maze*.ppm maze.gif
>>
Doing Haskell. I wanted to find some comfier approach to making Zipper than containing Zippers for each data structure in a separate module. Then I found type families. However, it doesn't make much sense to define generic Zipper like they do in the example for Map in Haskell wiki. Is it okay to just ignore the generic part and use type families for really overloaded functions? Would it make you upset if you encountered it in your codebase?
>>
>>61498227
>>61498228
>>61498231
:) thanks
>>
>>61496524
Am I just missing something? Why does D have such shitty debugging support? Seems like any useful debuggers are tied to shitty IDEs like MSVS. Makes the language useless to me which is a shame because D looks useful on the surface. I wish there was a decent way of debugging in this language.
>>
There should be a version of C where there are no pointers (only arrays) and everything is by reference always all the time.
For example:
int sum(int x, int y) {
return x + y;
}
int main() {
int z = sum(1, 2);
}

1 and 2 would be passed by reference here. If you want to not modify them, you need to use const ints instead of ints.
As the above implies, it would also stop being illegal to take the address of a temporary. (Except you wouldn't actually be able to take its address, only get a reference to it.) Also, things would be returned by reference. And this would not cause invalid memory accesses.
It would not cause invalid memory accesses because temporaries and return values would be handled differently. When you call a function or create a temporary, space for the return value of that operation would be allocated where that value needs to go. Within the function (or literal constructor) any write to the variable or expression that needs to get returned would be a direct write to that space that was allocated in the calling environment.
>>
>>61498232
One alternative is GHC Generics, or even writing your own sub-type system that can auto generate zippers for a subset of types based on if it's a product, a sum, a composition or a primitive
>>
>>61498232
>>61498253
And as mentioned in a few zipper articles, all zippers are comonads, so that's one kind of interface you can use
Obviously individual zippers have individual operations - but this is nothing new, we have individual operations for Maybe, Either, IO, etc. (including pattern matching if you think about it)
>>
>>61498219
they have made it free...
>>
>>61498246
>1 and 2 would be passed by reference here
No, 1 and 2 are scalar values

I might be wrong though, I'm not a C tard
>>
>>61498246
This is the worst possible thing.
>>
>>61498289
No, you're right.
If we were talking about C. But we're not.
We're talking about what I think C SHOULD be.
>>
File: IMG_4582.jpg (82KB, 600x800px) Image search: [Google]
IMG_4582.jpg
82KB, 600x800px
>>61496524
>What RAD projects are you working on today, /g/?

i would have worked on one if i had a license for that IDE
>>
>>61498155
>https://github.com/MariusMacijauskas/maze/blob/master/maze.c

>be employer
>goto your github to see your projects
>see swastika project
>we'll be in touch
>don't call us we'll call you
>>
>>61497574
a modern approach 2nd edition, then head first C

Then you can "update yourself" for C11 with c in a nutshell or modern C
>>
>>61498310
reverse engineer the license?

what are you, some pleb?
>>
>>61498312
It's Eastern Europe here. I would get hired instantly.
>>
>>61498333
sure thing
>>
>>61498246
>If you want to not modify them, you need to use const ints instead of ints.
my fucking sides
>>
>>61498327
yes, i'm not a bored ruskie(even though i live relatively close) to reverse-engineer it even though it probably would be fun
>>
>>61498253
>>61498268
I actually don't want to generate them, I just want to overload functions. So I can write
tree :: Tree a
treeZipper :: Zipper Tree a
treeZipper = unzip $ tree
list :: [a]
listZipper :: Zipper [] a
listZipper = unzip $ list
But yeah, I might try messing around to generate zippers. I shall look into comonads and some articles, cheers.
>>
>>61498348
>decompiling
>going through assembly code
>demangling symbol names
>trying to figure out what's going on, in machine-generated asm
>finally, if lucky, cracking the stupid ide
>can't share project publicly because illegal
>fun

I don't understand you people.
>>
>>61498243
gdb, gdbtui, cgdb etc all support it
>>
>>61498341
Fine, I'll delete it.
>>
>>61498368
so you just want
unzip :: f a -> Zipper f a
?

you could use a typeclass
>>
File: IMG_7214.gif (2MB, 270x188px) Image search: [Google]
IMG_7214.gif
2MB, 270x188px
>>61498419
Any code I complied with dmd would choke when run with gdb. If I got stuff working with gdb I'd be happy and call it a day. Unsure about the other debuggers at the moment.
>>
>>61498394
can't read what i've said?I live in eastern europe, police & authorities give little to no fucks if you reverse-engineer something like this.(even the police used to DL movies from torrent trackers, they're less likely to fuck you up for a "no-name" IDE)

I wouldn't share it on a tracker or something since i already use google and why would i do it?I want it for my personal use not to brag about it that i'm a hax0r or something
>>
>>61498499
Use ldc or gdc, not dmd. dmd has horrible codegen, ridiculous memory usage, and is only meant as a reference
>>
>>61498432
good boy
>>
>>61498508
Sorry, didn't read your previous posts.
>>
>>61498532
*goy
>>
>>61498432
you still haven't deleted it
>>
>>61498477
Using just a mere typeclass makes it difficult, since Zipper f a will look differently for (almost) every f. So I suppose I'd need to make class Zipper z t a, which is starting to get ridiculous.
For a list:
data Zipper [] a = ListZipper [a] [a]

For a tree:
data Tree a = Node [Tree a] a | Empty
data Zipper Tree a = Node [Zipper [] (Tree a)] (Tree a)

And that's exactly what type families do.
>>
>>61498550
Not now, but when I'll send out my CV. I plan to do that in a month. I should have something decent by then.
>>
which one is better/prefered?

is there any difference in speed?

def connect_database():
file = re.sub('\.\w+$','.db',__file__)
conn = sqlite3.connect(file)
return conn


def connect_database():
return sqlite3.connect(re.sub('\.\w+$','.db',__file__))
>>
>wake up
>go to work
>suddenly realize that my boss, my team lead, and all of my teammates are jews
wew
they surely are everywhere, aren't they

company's doing pretty great and I feel like a special snowflake
>>
Why are you using a bloated IDE when you could use a lean text editor that doesn't come with a web browser engine bundled?
>>
>>61498556
Oh, you want a single data type
Have you considered this?
This also uses type families, but uses them with classes

class HasZipper f where
type Zipper f :: * -> *
unzip :: f a -> Zipper f a


e.g.

class HasZipper [] where
type Zipper [] = ListZipper
unzip = unzipList
>>
>>61498586
kek
>>
>>61498598
this way you can say

unzip :: forall f. HasZipper f => f a -> Zipper f a
>>
https://learnxinyminutes.com/docs/c++/
// In addition to pointers like the ones in C,
// C++ has _references_.
// These are pointer types that cannot be reassigned once set
// and cannot be null.
// They also have the same syntax as the variable itself:
// No * is needed for dereferencing and
// & (address of) is not used for assignment.

using namespace std;

string foo = "I am foo";
string bar = "I am bar";


string& fooRef = foo; // This creates a reference to foo.
fooRef += ". Hi!"; // Modifies foo through the reference
cout << fooRef; // Prints "I am foo. Hi!"

// Doesn't reassign "fooRef". This is the same as "foo = bar", and
// foo == "I am bar"
// after this line.
cout << &fooRef << endl; //Prints the address of foo
fooRef = bar;
cout << &fooRef << endl; //Still prints the address of foo
cout << fooRef; // Prints "I am bar"

>prints the address of foo
>but the contents of bar
pls explain daily c++ thread
>>
>>61498612
>// These are pointer types that cannot be reassigned once set
>fooRef = bar
How does this compile?
>>
>>61498612
You assigned the value of the string bar to the value of the string foo, so both strings have the same content now.
>>
wtf

>https://pastebin.com/n5tRCZzF

>reddit bot goes through a user history
>checks if he posted in hate subreddits
>bans him
>>
>>61498638
Ignore, I'm retard and it's late.
>>
>>61496524
In a love/hate relation with D
>>
Font download page for /gd/
>>
>>61498598
>>61498608
Actually I think I'm doing it simpler.
class Zipper t where
data Zip t :: * -> *
zip :: Zip t a -> t a
unzip :: t a -> Zip t a
--...


Futhermore, I'm thinking about
class Zipper t => Zipper1D t where
next :: Zip t a -> Maybe (Zip t a)
prev :: Zip t a -> Maybe (Zip t a)

class Zipper1D t => Zipper2D t where
up :: Zip t a -> Maybe (Zip t a)
down :: Zip t a -> Maybe (Zip t a)


But I need to check if the second class and further make any sense for general zippers. At least they do for trees and lists.
>>
I'm addicted to internet. When I want to be productive with a project, I go to a rented place without internet, having downloaded the reference websites and books. I feel worse but I get shit done faster. Any better way to deal with this?
>>
https://internals.rust-lang.org/t/towards-a-second-edition-of-the-compiler/5582
Thoughts?
>>
>>61498691
go a long time without using it
>>
>>61498538
its fine famalam i feel sorry you can't torrent without using a VPN
>>
>>61498691
hahahahahahahaha
how the fuck are you addicted to the internet
hahahaha nigga just walk away from the screen
like nigga close your eyes haha
>>
>>61498728
it's a more common issue than you realize
>>
>>61498691
just go to the library and bring coffee in a canister
turn your wifi off
>>
>>61498585
Please keep your smelly poo-poo language out of /dpt/. And benchmark it yourself.
>>
>>61498687
You could go even further using type level Nats and have

Zipper t => ZipperD n t
Proxy n -> Zip t a -> Maybe (Zip t a)

ZipperD Z []
-- using Z instead of S Z

for something that can move on an infinite number of directions
ZipperD Z f
ZipperD n f => ZipperD (S n) f


there's an example here
https://github.com/kwf/ComonadSheet/blob/master/Presentation/presentation.md
this has arbitrary dimensional spreadsheets
>>
>>61498760
though this might be overkill
>>
>>61498759
t. brainlet
>>
>>61498781
>Python chump calling others brainlets
O-kay...
>>
File: brainlets_on_suicide_watch.png (761KB, 1186x860px) Image search: [Google]
brainlets_on_suicide_watch.png
761KB, 1186x860px
>>61498781
>uses python
>has the right to call others brainlets
Pick one (1), friend.
>>
>>61498829
>>61498838
>can't understand pseudo-code
>thinks it can understand code in harder languages


kek
>>
>>61498594
Because tyour "lean" text editor lacks features that makes getting the job done more work than it should b.
>>
File: smug_loli.gif (540KB, 540x304px) Image search: [Google]
smug_loli.gif
540KB, 540x304px
>>61498781
>uses Python
>asks an obviously beginner question
Who's the brainlet again?
>>
>>61498853
>can't understand pseudo-code
Good strawman, brainlet.
>>
>>61498776
>>61498760
Yeah, it looks like overkill, but I like it. I'm gonna check out the presentation, it looks interesting.

>markdown looks messy because it uses features that GitHub can't handle
>check if there is a pdf in files
>'oh, there it is'
>click it
>chrome runs out of memory although windows reports 4GB available
>>
>>61498873
>chrome runs out of memory
did you open a txt file with more than 10 words or something?
>>
>>61498869
>python is not pseudo-code

Lol, brainlets i swear
>>
>>61498886
>doesn't know what strawman means
Good try, brainlet.
>>
>>61498881
I dared to open 607kB pdf.
>>
>>61498886
I don't know how you've managed to convince yourself that the similarity of Python to pseudocode means that anyone who doesn't use Python is stupid.
>>
def main():
password=input('Please input password for MyRSSBot: ')
verify_password=input('Please verify the password above: ')
if password != verify_password:
print("Passwords do not match, please try again.")
>>
>>61498556
Y'all are talking about zip and unzip right?

Just something that turns ((1 2 3 4) (a b c d)) into ((1 a) (2 b) (3 c) (4 d))?

If you are holy fuck Haskell is complicated because that's so easy to implement in lisp with map.
>>
>>61498958
No. We're not.
>>
>>61498528
That's kind of ironic in a way. At any rate, I will see what I can do about setting up one of the other two compilers. I am slightly retarded so I'll probably end up burning more time than necessary to get one of them setup.
>>
>>61498958
We're talking about data structures that allow efficient local changes and traversal over a structure. It's a problem that comes with immutable data structures.
>>
>>61498310

Actually, the Starter Edition of Delphi is free, just go ahead and download it:

https://www.embarcadero.com/products/delphi/starter
>>
>>61498642
>>>/r/eddit
>>
>>61498642
if you're surprised reddit is gay I don't know what to tell you
>>
>>61499077

>Can only target 32-bit Windows
>>
>>61499016
found this
http://okmij.org/ftp/continuations/zipper.html
>>
Okay, /dpt/, you can only pick one:

1. All programs written in C are retroactively changed to equivalent Rust programs.
2. All programs written in COBOL are retroactively changed to equivalent Rust programs.

Which one gets the axe?
>>
>>61499247
Rust dies forever and a proper dependently typed language with a non-turing complete type system is used instead.
>>
>>61499218
Looks pretty cool. I had found "Zipper from any Traversable" earlier, but didn't see much use for it since it appears that it can only modify individual elements and can't change the overall structure. The rest looks worth giving a read, but I think I'll go to sleep for now. I should stop doing Haskell until 4AM every night.
>>
>>61499247
>can
But I don't have to. Now kill yourself.
>>
>>61499247
equivalent in function, right? Straight port of C -> rust makes for shit programs
>>
>>61499247
All programs written in Rust are changed to Haskell programs.
All programs written in COBOL are changed to Scheme programs.
>>
Lua's website seems to only have an HTML reference manual for 5.3
does anyone know of a PDF for the Lua5.3 reference manual
>>
>>61496556
I'd probably implement it as multiple applications. A webserver that my JS program can communicate with. A JS program that looks at the posts and frames them and then a screenshot utility. Could just use a screenshot utility someone else made but they rarely have API for that.

Or maybe someone has a pure in browser solution.
>>
>>61499308
Can't you transform it with an html > pdf converter? Maybe you're on mobile though
>>
>>61499282
Was just looking at a different paper that covered what I meant when I said using generics
http://www.cs.ox.ac.uk/ralf.hinze/publications/GH-Applications.pdf

Zipper is a subsection
>>
File: trashkell_on_suicide_watch.png (448KB, 580x1500px) Image search: [Google]
trashkell_on_suicide_watch.png
448KB, 580x1500px
>>
>>61499358
>html > pdf converter
any good ones?
all the ones I know of are shit
>>
>>61499282
>>61499361
basically it's symbolic differentiation but on types

differentiate (const _) = Void
differentiate (id x) = Unit
differentiate (a + b) = differentiate a + differentiate b
differentiate (a * b) = differentiate a * b + differentiate b * a
differentiate (a . b) = ...
>>
>>61499383
obviously Void = 0, Unit = 1

hell you could probably use a regular symbolic differentiation library with template haskell!
>>
Who else /proud to use JS on the backend/
>>
>>61499208
Which is more than enough for most applications.
>>
>>61499367
cute
>>
>>61499413
>who else /gay/
>>
File: mememandan.jpg (39KB, 710x515px) Image search: [Google]
mememandan.jpg
39KB, 710x515px
>>61497539
MONOGAME
>Literally handles content pipeline, rendering, updates, drawing, and input pretty much from the get go
>>
>>61499469
Brainlet.
>>
>>61499289

Yes, they are equivalent in function. For the sake of argument, we'll say the Rust programs are idiomatic Rust.

>>61499295

I'll agree with the second, not the first. Haskell is not a very good language, but COBOL needs to die.
>>
>>61499529
>Haskell is not a very good language
t. a brainlet too dumb to learn it
>>
>>61499536
Ruby is correct, though. It has exceptions, side effects, and non-termination.
>>
>>61499566

>exceptions, side effects, and non-termination
These are all good things though. Well, not so much exceptions, but side effects and non-termination are necessary features of a useful programming language.
>>
>>61499566
name 5 languages that don't
>>
>>61499608
By side effects he means order of evaluation, not monads such as IO which are pure
>>
File: 1463699802486.jpg (95KB, 893x600px) Image search: [Google]
1463699802486.jpg
95KB, 893x600px
>>61499431
>Which is more than enough for most applications.

Anon i'm not "most", i'm special just like my application so please have some respect
>>
>>61499651
>tfw ur bomb doesnt run 32b windows
>>
>>61499446
I don't know why but I chuckled
>>
File: amazeing.gif (3KB, 250x250px) Image search: [Google]
amazeing.gif
3KB, 250x250px
Can somebody please help me?
There was a thread about mazes and someone posted the code to generate one. I managed through a lot of intense effort to get the code to run. The problem is the output is not a .gif or other readable file. It is a ".ppm" file. It has the following format:

P3 250 250 255
0 0 0
0 0 0
...
0 0 0
0 255 0
0 255 0
0 255 0
0 255 0
...



And it created hundreds of these files. I need to know how to transform the files into a .png or .gif. Maybe a python script can do it however the correct process is not very clear.
>>
>>61499723
see


>>61498227
>>61498228
>>61498231
>>
why is the head first series looked down upon by everyone
>>
>>61498231
>convert -delay 10 maze*.ppm maze.gif
pc:build user $ convert -delay 10 maze*.ppm maze.gif
convert: command not found

what do?
>>
>>61499770
+install imagemagik u dum fug
>>
>>61499770
>runs a command that is not installed on the computer
>acts surprised

dumb much?
>>
>>61499768
because it's incredibly dumbed down and written for retards
also one of them has a literal porn star on the cover
>>
>>61499811
pc:build user $ ffmpeg convert -delay 10 maze*.ppm maze.gif
...
Unrecognized option 'delay'.
Error splitting the argument list: Option not found
...
pc:build user $ ffmpeg convert maze*.ppm maze.gif
...
Unrecognized option 'delay'.
Error splitting the argument list: Option not found
...


It still doesn't work.
>>
File: 91bobQSPQrL.jpg (798KB, 2214x2560px) Image search: [Google]
91bobQSPQrL.jpg
798KB, 2214x2560px
>>61499820
For real? Is it this one?
>>
>>61499834
**
[NULL @ 0x7f9794000000] Unable to find a suitable output format for 'convert'
convert: Invalid argument
>>
File: framestutter.webm (2MB, 400x604px) Image search: [Google]
framestutter.webm
2MB, 400x604px
>>61496524
Been optimizing my minecraft clone's block placing routines. Before optimization:
Interpreted:

Lag "FPS": 15.858599
Total Lag: 8071331290
Lag Frames: 128

Compiled:

Lag "FPS": 33.425475
Total Lag: 1854872718
Lag Frames: 62


Where I'm at now:
Lag "FPS": 21.422607
Worst Lag: 112882627
Total Lag: 5041403244
Lag Frames: 108


Compiled:
Lag "FPS": 56.944863
Worst Lag: 17560847
Total Lag: 17560847
Lag Frames: 1

So the frame stutter seen in this webm is gone if you compile the game.

What I expect to be the biggest optimization is yet to come though. I replaced a call to qsort with an algorithm optimized to the exact details of the problem which is also going to let me replace a 120K glBufferMap with at worst 3 24B glBufferSubs.

The algorithm I just wrote: https://pastebin.com/e8x5jMj4
>>
>>61499884
Post source
>>
>>61498228
What is the correct instruction for ffmpeg?

I tried
ffmpeg -i maze*.ppm -r maze.gif

However it attempted to overwrite maze00001.ppm .
>>
>>61499884
Why?
>>
>>61499884
>what is size_t
>>
>been interested in programming as a kid
>always wanted to grow up to be software developer
>study CS at university, ace all classes
>about to graduate
>realize that pajeets will take over the industry within a decade
>no future for americans in programming

did i just get a useless piece of paper?
what the fuck can i do now? is it even worth going into a junior dev role when the title "Software Developer" won't even exist for americans in a few years?
>>
>>61499920
if you actually went to a uni for CS youd know this was not even close to the truth

pajeets cant code, and if they can code they need to jump through massive loops to even work for american companies. once you start job hunting you realize this. 80% of the companies i see specifically list that they wont hire foreign nationals because it costs them so much.

software developers will never go out, but pajeets will likely take over webdev and server shit, but that was all garbage anyway
>>
>>61499920
>no future for americans at all
> is it even worth existing when the title "american" won't even exist for americans in a few years?
ftfy
>>
>>61499910
Where would I use size_t in that code anon? I mean I could change a few int variables in that code to GLuint if I want to be autistic about type...
>>
>>61499920
pajeets can't replace the topmost programmers tho, those guys who mess around with optimized, mission critical code, low level stuff and stuff like that

you're fine if you actually engage yourself in being the best of the best
>>
<style>
body{
filter:invert(180%);
filter:brightness(9999999999999999999999999%);
}
</style>
<html>
<center>
<title>predator vision</title>
<meta charset="utf-8" />

<body bgcolor="#000000">
<center>
<h1 id="info">Please allow this page to access your camera.</h1>
<br>
<div id="cameraNotSupported" class="notSupported">
<h1>Your browser does not support the Camera API.</h1>

</div>
<br>
<div id="webGLNotSupported" class="notSupported">
<h1>Your browser does not support WebGL.</h1>

</div>

<canvas id="heatmap" width="1500" height="1500"></canvas>
</center>

<script src="https://idevelop.ro/predator-vision/script/webgl-heatmap.js"></script>
<script src="https://idevelop.ro/predator-vision/script/camera.js"></script>
<script src="https://idevelop.ro/predator-vision/script/movement.js"></script>
<script src="https://idevelop.ro/predator-vision/script/app.js"></script>
>>
>>61499952
Where is the source anon?
>>
>>61499965
what the fuck
>>
>>61499967
>>61499892
It's not complete yet.
>>
>>61499920
>it's another episode of "dey terker jerbs"
>>
>>61499979
beat me to it
>>
>>61499939
I'm finishing up my degree from a good uni known for CS, but I haven't worked with any pajeets in my internships.

If they really don't know how to code, why do so many companies hire indian contractors by the hundreds? Wouldn't somebody up the chain realize it's a waste of money?

>likely take over webdev and server shit
Isn't that about 90% of all available programming jobs right now?

I'm interested in kernel and compiler development, but it seems that a PhD is required to get anywhere in those fields
>>
>>61499980
And it will probably never be.
>>
>>61496556
I guess my ideas sometimes exceed reality in a sense?

watch out boys we got an ideas guy here
>>
>>61499900
from the man page:

>For creating a video from many images:

 ffmpeg -f image2 -framerate 12 -i foo-%03d.jpeg -s WxH foo.avi


>The syntax "foo-%03d.jpeg" specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a
>normal integer are suitable.

>When importing an image sequence, -i also supports expanding shell-like wildcard patterns (globbing) internally, by selecting the image2-specific "-pattern_type glob" option.

>For example, for creating a video from filenames matching the glob pattern "foo-*.jpeg":

  ffmpeg -f image2 -pattern_type glob -framerate 12 -i 'foo-*.jpeg' -s WxH foo.avi 
>>
>>61500002
why didn't the center part of my post greentext?
>>
>>61499920
I wouldn't stress it too much. Most work pajeets find is kiddie script shit and webdev. But any company worth it's salt wouldn't pay Rajiv to shit out spaghetti code for them. If you're that concerned about job security then make sure you're worth keeping.
>>
>>61499981
>I'll compare him to a cartoon, that'll show him
I'm glad we have as wise a sage as you, Anon.
>>
File: maze.gif (182KB, 250x250px) Image search: [Google]
maze.gif
182KB, 250x250px
>>61499723
>>61499770
>>61499834
>>61499865
>>61499900
Okay guys I managed to figure out the correct instruction. For anyone else trying it, it is:

pc:build user $  ffmpeg -i maze%05d.ppm maze.gif


Thanks for all your help.
>>
>>61499981
>hah, your argument was parodied, therefore it's dumb, invalid, and I don't need to address its argument or sentiment
>>
>>61499981
It's a valid concern though. Go look at any freelance site you'll see thousands of bootcamp pajeets undercutting american devs.
>>
New thread
>>61500040
>>61500040
>>61500040
>>61500040
>>61500040
Thread posts: 329
Thread images: 34


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.