[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

/vt/ is now archived.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 87 KB, 960x762, m18U31V7G3KRGT4jjOpvjD1vwdnNzq5pB5XmjnI5gWQ.jpg [View same] [iqdb] [saucenao] [google] [report]
67089208 No.67089208 [Reply] [Original] [archived.moe] [rbt]

What are you working on?
Previous: >>67081854

>> No.67089239

>error handling
Pass it to the logger service and show it to the user in a messagebox.

>> No.67089245

i'm working on a crypto trading bot that uses machine learning (in node.js)

btw anime and monads are trash

>> No.67089249

> ["10", "10", "10"].map(parseInt)
Array(3) [ 10, NaN, 2 ]

>> No.67089254

A language designed around the methodology of writing functional specifications and refining them to imperative programs.

>> No.67089257


>> No.67089278


>> No.67089280

Not with panic

>> No.67089292


>> No.67089293

not even gonna try to figure that one out but here's the correct way to do it

["10", "10", "10"].map(x => parseInt(x))

>> No.67089300


>> No.67089307

friendly reminder map is not traverse

>> No.67089321


>> No.67089322

>no eta-conversion in JavaScript
Quelle surprise.

>> No.67089323


>> No.67089324

(but traverse can be map)

>> No.67089333

it's just a map that takes an applicative function and range.
wow how revolutionary.

>> No.67089340

I don't understand why OOPsies get so upset by traverse and desperately claim it's just map. Actually maybe it's because their favorite languages can sort of implement the latter but not the former.

>> No.67089343

The actual issue is that ParseInt takes two arguments.

>> No.67089345
File: 72 KB, 1241x1010, DdM5PONWAAAEc7W.jpg [View same] [iqdb] [saucenao] [google] [report]

They don't understand. Look at this brainlet >>67089333
>s-surely I can't be wrong again?

>> No.67089351

whats the difference between using CMake and a random C++ IDE (like CLion)?

>> No.67089360

That's incorrect, though.

>> No.67089365

then prove me wrong.
hint: posting a brainlet image with my post number is not.

>> No.67089369


>> No.67089375

How are we ever going to get them up to speed on something like lenses if they're still struggling with traverse, of all things?

>> No.67089388
File: 14 KB, 211x119, test.jpg [View same] [iqdb] [saucenao] [google] [report]

>> No.67089393

Your characterization of it does not match its type.

>> No.67089408

give me an example of traverse that does not match: mapping an applicative to a range and getting the new range.

>> No.67089419


here is your problem

>> No.67089421

Frankly I think you're all gay

>> No.67089423

And just works

>> No.67089449
File: 8 KB, 320x156, Capture.png [View same] [iqdb] [saucenao] [google] [report]


>> No.67089498

Anyone here familiar with GCC internals?
How the FUCK do I force the linker to align sections to a 4096 byte boundary without using a custom linker script or defining it in the source of the program being compiled?

>> No.67089534
File: 50 KB, 287x285, dicks.png [View same] [iqdb] [saucenao] [google] [report]

>update pull request
>CI jobs screwing up at apt-get steps randomly
>hideous gay nigger in your face to mock you

>> No.67089535

traverse Const (3, "foo")

>> No.67089539

It's the same in C, !"0" == false.

>> No.67089546

why would you ever do that

>> No.67089558

js> 0 == "0"

>> No.67089569

>he didn't it

>> No.67089571

using traverse as fold

>> No.67089576

Why does Haskell generate such huge binaries?
"Hello world" becomes a whopping 1.2 MB.

>> No.67089580

or you know just use fold.

>> No.67089581

use the lens library

>> No.67089582

read the spec

>> No.67089588

Statically linking the entire standard library. If there wasn't already libc in the OS, C programs would be huge as well.

>> No.67089596

Managed to get the feature I've been working all this week to work correctly. Did the commit&deploy&run. Still got shitloads of unit and integration tests to write.

>> No.67089612

Ah, static linking by default, I see. Why doesn't ghc use dynamic linking by default like gcc and clang do?

>> No.67089618

Daily reminder to read an follow https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Coding+Standard .

>> No.67089619

These people don't even understand traverse, they'd have no chance with lens

>> No.67089622

Because dynamic linking sucks.

>> No.67089626

Because that would make deplyment too complicated, for some reason most OSes don't include Haskell's standard library in the base system.

>> No.67089627

are unused symbols still in the binary if you link statically?

>> No.67089632

Daily reminder that most programmers use languages that, while shit, aren't so disastrous that they blow up like C does if you look at it wrong

>> No.67089636

I love weakest preconditions!

>> No.67089637
File: 2.17 MB, 1000x1678, sicp_nazrin_small.png [View same] [iqdb] [saucenao] [google] [report]

Have you ever used Godot Engine? Would you say it's worth learning?

>> No.67089640

Yes, the linking works on library basis, not per function. There is an option to compile each function into a separate object file so it would link only required function, I don't remember the name of the option, and it make compiling too slow.

>> No.67089647

Oh no, nononono.
I know what's happening. This happened with a lot of boards before. First, people with transphobia come. They acknowledge the existance of trans people and tell them to fuck off. Then the trans people come and start shitposting their trannyshit all over this board. The transphobian people shortly fuck off, saying "oh this board went to shit", without realizing that they started this shit. Slowly /g/ won't be about technology anymore and the board dies out.

Please. stop. this.
Ignore trannies, don't acknowledge their existance. They are NOT here.
Most of them are larpers. You don't give them a (You), you just let their threads die.
/g/, please.

>> No.67089664

currently working on a GUI interface using Visual Basic to see if i can track an IP adress.

>inb4 comments saying this doesnt make sense
>fuggin sherlock

>> No.67089665

The benefits of the way C is designed will always outweigh the costs, as long as we don't write bad code.

>> No.67089674

Go back to your "safe space", bigot

>> No.67089675
File: 324 KB, 466x510, 1530068994244.png [View same] [iqdb] [saucenao] [google] [report]


>> No.67089680


>be me
>be new to 4chan
>see any post i dont understand
>think im funny
>tag someone with an @
>hit post

>at this point honestly just kys

>> No.67089688

Even parrots and dolphins can understand traverse, what's your excuse?

>> No.67089693

Why in the world would you implement Machine Learning in NodeJS?

>> No.67089696

Is Discord botnet?

>> No.67089703

Webdevs refuse to learn any other language

>> No.67089708

I'm a webdev by trade and I'm learning C right now. We're not all faggots.

>> No.67089710

>proprietary software
What do you think?

>> No.67089711
File: 117 KB, 1058x705, 1386460907430.jpg [View same] [iqdb] [saucenao] [google] [report]

This actually works!

let kek;
export default {
query: (text, params) => pool.query(text, params),

queryFirst: async (text, params) => (([kek = null] = (await pool.query(text,params)).rows), kek),

>mfw webstorm actually warns me that my code is "overly clever"

>> No.67089732

Naturally, it's written in Rust

>> No.67089752

discord != new and shiny game store that will inevitably fail along with the whole company when the investors pull out

>> No.67089753

Literally MtF outside prostitution get jobs as programmers.

/g/ will had more MtF that women.

>> No.67089763

I'm a professional linguist and polyglot but I'm still too hung over to figure out what fucking language you're speaking

>> No.67089767 [DELETED] 

A bunch of people are upset that programming isn't a safe space for bigots. That anon is kinda telling them to deal with it.

>> No.67089793

dont need investors when you can sell so much info from dumbfucks like >>67089696

>> No.67089816

Is techno the GOAT music genre for programming?


>> No.67089828 [DELETED] 

In contex of trans people it might mean Male to Female I suppose.

>> No.67089835

i like minimal/deep house myself.
or the occasional S Y N T H W A V E bullshit.

>> No.67089839

so it basically means faggots?

>> No.67089874


>> No.67089879

ParseInt takes two arguments, the second being a radix.
Map provides three arguments, the element, the index, and the collection.
The index feeds into the radix producing this behavior.

Non-zero numbers are truthy
Non-empty strings are truthy

Bitwise not does a type coercion to number, then another bitwise not inverts the bits again. Doing +"0" or Number("0") is cleaner.

Multiplication does a type coercion to number. Number * 0 = 0

"0" is a const char pointer to a non null location. !"0" is null, which is 0, and false is 0
If you instead did !'\0', that would be a char of value 0, not would make it 1, and it is true since true is 1

"0" is type coerced to 0, 0 == 0 is true

>Doesn't know @num is a meme to backlink without giving them a (You)
>Calls someone else a newfag
Here's a (You) for making me respond

>> No.67089888
File: 64 KB, 732x742, 1531001866647.jpg [View same] [iqdb] [saucenao] [google] [report]

Why would you do computation on a GPU? Isn't that what CPUs are for?

>> No.67089895

CPU - several, complex cores
GPU - orders of magnitude more, simpler cores

>> No.67089908

Would you like to have 2000 cores instead of 4? You can, just not for every kind of tasks.

>> No.67089913

cpus and gpus are good at different kinds of processing
any kind of algorithm that's gonna involve a lot of branching, you're going to want to run on a CPU

>> No.67089915

You misspoke dark ambient.

>> No.67089918

>Non-zero numbers are truthy
>Non-empty strings are truthy

var zero_int = 0;
var zero_str = "0"

zero_int == false
zero_str == true
zero_int == zero_str

true == false?

>> No.67089922 [DELETED] 
File: 265 KB, 450x450, 1531436291783.png [View same] [iqdb] [saucenao] [google] [report]

>Not anime music
Pic related, me when listening to anime music, wearing my programming kneesocks and stimulating my boipussy while programming.

>> No.67089925

TIL GPUs are good for doing many web requests

>> No.67089929

>just not for every kind of tasks.

>> No.67089938

>not wanting 2000 cores, one for each request

>> No.67089949

That's just pointless because web requests spend most of their time idle anyways.

>> No.67090016

wow... no one told me programming was 90% writing makefiles and trying to install libraries

>> No.67090060

In Rust it's just
library = "1.0"

>> No.67090077
File: 563 KB, 819x716, 1530663049712.png [View same] [iqdb] [saucenao] [google] [report]

ahaha.... you think i'm some kind of rust noob? i'm a 1337 c++ programmer...

(just fucking kill me)

>> No.67090087

use a language with a package manager that most likely can also function as its builder
c/++ & make are absolute trash.

>> No.67090092

this is exactly what I'm doing right now

>> No.67090104

are you retarded?
this is like the same in almost every language

0 == false
"asdad" == true

>> No.67090112

0 == false -> false == false -> true
"0" == true -> true == true -> true
0 == "0" -> 0 == 0 -> true
If you can't understand type coercion, then use the triple equals. It's not really that hard. C++'s type coercion is many times more complex.

>> No.67090117
File: 418 KB, 768x768, 1496146372667.jpg [View same] [iqdb] [saucenao] [google] [report]

>What are you working on?
I'm new to programming and I'm currently learning Python, just finished the chapter on dictionaries.

I'm planning on going to Uni next year to do compsci because I'm really enjoying this, but I'm feeling overwhelmed, there's so much shit to learn and I'm late to it at 25.

>> No.67090131

I went to the web dev thread to ask about C++ for back end development and what I can use for front end to be displayed to the user and general concepts for handling it, and I was told to fuck off and learn webGL/JavaScript. Not all are gigantic faggots, but I'm inclined to believe most are.

>> No.67090142

You are forgetting something very important (the website you're on)

>> No.67090175

why the holy fuck would you attempt to use C++ as a backend for a webserver? Are you retarded or have shit tons of time on your hands

>> No.67090255

library availability

>> No.67090296

>get multiple software dev offers
>grilled by multiple senior devs at one
>they offer me the 6 hours later
>take one offer because it dealt with an interest of mine
>drive 10 hours to live there
>turns out its an IT job

>> No.67090303

Thats just not how math works. When X and Y are equal to each other, and Y is equal to Z, you expect X to also be equal to Z.

Also, JS is cancer in general
js> x=[0]

js> x==x

js> x==!x

>> No.67090314

what was the interest?
Also you didn't ask what the job would entail?
that's the first thing you ask when they ask if you have any questions.

>> No.67090333

Imagine if web browsers ran Scheme or ML instead of JavaScript

>> No.67090336


js> Array(5)==",,,,"

js> NaN==NaN

js> typeof null
js> null instanceof Object

js> 0.1+0.2==0.3
js> 0.1+0.2

js> Math.max()>Math.min()
js> Math.max()<Math.min()

>> No.67090346

Reminder that only anime /dpt/ are canon.

>> No.67090348

imagine if web browsers ran Idris instead of shitlangs that can't enforce totality.

>> No.67090349

Then those languages would become riddled with shit features due to the kind of tards who do web dev. Sounds great...

>> No.67090363

Idris didn't exist back in the browser wars

>> No.67090374

Write a web browser in Idris, then we'll talk

>> No.67090381

nothings stopping someone from writing one now. Especially considering Idris can compile to JS.
if only i cared enough to waste my life with webshit, i would.

>> No.67090396

>Especially considering Idris can compile to JS.
Nonono, we want the target language to not be JS

>> No.67090401

well i meant it has easy interop with existing projects. Then again, there's also WASM.

>> No.67090408

But strong types are impractical, amirite?

>> No.67090422

What was the job?

The same thing happened to me with a bait and switch. The offer was for a software developer position but ended up being technical support. I'd take it if it were actually in my city since any job experience is good experience + money. There's like 50 other technical support positions open in my city that wouldn't require me to move though.

>> No.67090434

#include <memory>
#include <iostream>
#include <utility>

using UptrInt = std::unique_ptr<int>;

class Foo{
Foo(UptrInt& i) : foo_value(std::move(i)){ std::cout << "lvalue\n"; }
Foo(UptrInt&& i) : Foo(i){ std::cout << "rvalue\n"; }

int value() const { if(foo_value)return *foo_value; }
UptrInt foo_value;

UptrInt get_int_ptr(int x)
return std::make_unique<int>(x);

int main()
auto x = std::make_unique<int>(7);
Foo f(x);
Foo f1(std::move(x));
Foo f2(get_int_ptr(8));
std::cout << f2.value() << std::endl;

Is this use of ctor delegation legal and correct?

>> No.67090473

If Idris is so great, why are there no operating systems written in Idris? Why are there no games written in Idris? Checkmate, Idrists (like "autists")

>> No.67090477

fmap has nothing to do with collections

>> No.67090487

There are games written in Idris, though.

>> No.67090512

I literally can't find a single example

>> No.67090529

looks correct to me

>> No.67090536

>life without types

>> No.67090552

Check out Edwin Brady's talk at Scala World, he shows hangman and invaders

>> No.67090557


>> No.67090576

I take it all back, Idris is the future.

>> No.67090586

shitposting or not compile time type checked state machines is fucking huge for games. After my main project i hope to write a game in idris.

>> No.67090591
File: 1.38 MB, 2687x2319, 1530801626003.jpg [View same] [iqdb] [saucenao] [google] [report]

>hangman and invaders
Alright granddads, I meant something with more than 15 minutes of gameplay

>> No.67090607

You asked for games, you got games. So ungrateful.

>> No.67090610

deals with manufacturing military hardware. I had another offer from this company where I got a hotel and a rental car for the interview. The next day I phone interviewed with the IT place, I thought it was the same type of software dev I just interviewed for. I asked about programming, just not enough, silly mistake.

the job now is overseeing some middleware bullshit where all I do is debug errors. The other offers were systems integration and a real-time systems developer role. I'm so happy the city im in is growing in the tech space, and I know a few people from big companies in the area.

>> No.67090612

>no i meant a polished game
>no i meant a REAL game
>no i meant a game that's on steam
>no i meant a game by a AAA company that's sold X units

>> No.67090622

>Back in my day, we took what we were given and were grateful for it
Code me up something epic or I'll tell mom you're cheating on her

>> No.67090631

Ones an IDE and ones a build tool? They are entirely different things.

>> No.67090646

I am going to make it.
I am going to make everything right.
I am going to complete my game.
I am going to get six packs.
I am going to invest in long term goals.
/vg, /fit, /g, /biz ftw

>> No.67090648

Survey time:
>Most used langs (3 max but you can post fewer if you want)
>OS (and distro, if applicable)
>Text editor or IDE

>> No.67090656

>/vg, /fit/, /g/, /biz
I fucking hate Redditors

>> No.67090657

Windows 10
Visual studio, VS code

>> No.67090667

C++, Rust

>> No.67090669

shell, C, XSLT

>> No.67090681

>Common Lisp, GNU Guile, Emacs Lisp
>GNU Emacs

>> No.67090706

C, C# and ruby
Win10 and Debian stretch
VS, VSCode and vim

>> No.67090725


Seeing it like this: I'm the real hipster :^)

>> No.67090727

Hi, rms.

>> No.67090738

>I'm the real hipster :^)
that's literally the "look how hipster i am" starterpack m8

>> No.67090750

>Python, C++, Rust
>Linux Mint
> VS Code

>> No.67090753
File: 595 KB, 734x708, 1484676488604.png [View same] [iqdb] [saucenao] [google] [report]

Haskell, Rust, (atm using Agda, learning)
ArchLabs and Win10 (on separate machines)
Emacs and VSC

>> No.67090755


>> No.67090760

k Welp

>> No.67090763

racket, c
windows 7, debian linux

>> No.67090773


>> No.67090776

swastika via gloss?

>> No.67090780

C, C++, Common Lisp

>> No.67090815

racket and some C#
vs code

>> No.67090867

First year CS students can understand traverse. What's your excuse?

>> No.67090878

>question mark
>implying haskeleltards are hard to spot

>> No.67090886

I applied to iOS position and i dont even have a mac. Guy replied to me saying he saw my github, and he asked about my knowledge on A&DS, cryptography, unix skills, design patterns because i need strong foundation in this for job. He also said it would be nice to see my grades (!). I am freshmen with 3 exams to pass yet in september, and Cs from rest of subjects. What the fuck am i supposed to do? Am i that much of a brainlet that entry-level jobs are not for me. I failed quite rigourus prove-driven calculus course - i cant be fucking programmer?

>> No.67090887

That's quite general. Did you just get out of a first year CS class and decide to shitpost on /g/ with some of the random words you heard?

>> No.67090898

traverse a tree my dude

>> No.67090905

Found a traverselet.

>> No.67090941

Is that considered difficult? I thought you were saying something like "there are some CS freshmen who have written compilers", i.e. it's hard but a very small number of young programmers have managed it. I thought tree traversal was covered by ALL freshmen.

>> No.67090960

Hi /dpt/ let's see you exhibit some minor features of your favorite language with fibs. Here's higher-order functions and built-in tests with racket:
#lang racket/base
(define (transpose m)
(apply map list m))

(module+ test
(require rackunit)
(define standard-message
"This is trivial how did you fuck it up?!!?")
(let ((m '((1 2 3) (4 5 6)))
(M '((1 4) (2 5) (3 6))))
(check-equal? (transpose m) M

(define (identity length)
(define (make-row index)
(for/list ((i (in-range length)))
(if (= i index) 1 0)))
(for/list ((i (in-range length)))
(make-row i)))

(module+ test
(check-equal? (identity 3)
'((1 0 0) (0 1 0) (0 0 1))

(define (matrix* left right)
(define (sum list)
(apply + list))
(map (λ(l)
(map (λ(r)
(sum (map * l r)))
(transpose right)))

(module+ test
(let ((left '((1 2) (3 4)))
(right '((2 3) (5 5)))
(expected '((12 13) (26 29))))
(check-equal? (matrix* left right)

(define (matrix^ m e)
(cond ((zero? e) (identity (length m)))
((= 1 e) m)
((even? e)
(matrix^ (matrix* m m) (/ e 2)))
(else (matrix* m
(matrix^ (matrix* m m)
(/ (- e 1) 2))))))

(module+ test
(let ((m '((1 2) (3 4)))
(e 5))
(check-equal? (matrix^ m e)
(for/fold ((acc (identity (length m))))
((i (in-range e)))
(matrix* m acc))

(define (fib* base)
(define (result m)
(caadr m))
(lambda (n)
(cond ((zero? n) 0)
((= 1 n) 1)
(else (result (matrix^ base n))))))

(define fibs (fib* '((1 1) (1 0))))

>> No.67090968

reminder that traverse is literally just an fmap
traverse :: Applicative f => (a -> f b) -> t a -> f (t b)
{-# INLINE traverse #-} -- See Note [Inline default methods]
traverse f = sequenceA . fmap f

>> No.67091004


What's the point of doing this stuff to point out JS is shit? There are many legit reasons why JS is shit but it's not doing non nonsensical operations like comparing function call, smells like a meme.

The 0.1+0.2 one is because of IEEE as well.

>> No.67091017

small problems are usually evident of a much larger one.

>> No.67091037

"literally just an fmap"
Only if you ignore sequenceA (which is equivalent to traverse id) in that snippet, dumbshit.

>> No.67091045

>a fuckton of garbage language extensions are actually a feature
ghc: the bloat

>> No.67091063

What is the minimum I need to learn or do to get a cosy job at FANG or Microsoft? I have a degree but not a CS one.

>> No.67091076


>> No.67091092


Grind leetcode faggot

>> No.67091187


>> No.67091219

>have to move to commiefornia

>> No.67091224

>for some reason most OSes don't include Haskell's standard library
because it's a memelang

>> No.67091256

C++, Rust

>> No.67091270

>Java, Assembler, C
> macOS and z/OS
>eclipse or sublime

i have a real job

>> No.67091280

C++, Python, Haxe
Ubuntu 18.04
Visual Studio Code and Atom

>> No.67091366

If you want strict equality, use the strict equality operator. If you want loose equality, use the loose equality operator. If you understand those two things and you still run into issues, your problem is a lot deeper than the language.

>> No.67091388

loose equality is almost never something you want. The fact that it exists, as the default, is bad design.

>> No.67091412

Intentionally picking cases that either never happen in practice, or are willfully ignorant of how aspects of the language work doesn't make you look like some amazingly woke programmer.

>> No.67091575

Nearly every language has warts but there are situations, albeit limited ones, where you use loose equality. If that is the argument for calling JS bad, it is a pretty weak premise.

>> No.67091653

JS has many such warts and this is just one example. It's death by a thousand cuts, rather like sepples.

>> No.67091686

Yup, algebric data types, applicatives, monads and that stuff does make error handling simpler

>> No.67091718
File: 1.30 MB, 2570x2102, 4L.png [View same] [iqdb] [saucenao] [google] [report]

Progress continues on my macOS / iOS 4chan client. I am not sure if anyone will use it besides me.

>> No.67091744


>> No.67091752

>nearly half the window taken up by navigation
jesus l2design

>> No.67091758


>> No.67091895
File: 28 KB, 480x480, Ich.jpg [View same] [iqdb] [saucenao] [google] [report]

Traceroute Util for golang

>> No.67091948
File: 240 KB, 1800x1200, 1533924846112.jpg [View same] [iqdb] [saucenao] [google] [report]

I'm working out an idea I have for a weekend project. It'll be a feed to email program. I'm not sure how I should handle configuration though. I can either accept a configuration file or simply read CLI arguments. I'm slightly leaning towards the latter because of the simplicity for me and the end user (also me). I want to start off my program as simple as possible, but with room for additional features.
CLI arguments or configuration file?

>> No.67091971

Programming challenge: implement typesafe traverse in Go

>> No.67091984

CLI arguments that are saved to a config file, it's more streamlined than config files, and you wouldn't need to input everything multiple times, you'd only load your config file you could've gotten from anywhere

>> No.67091987

dumb frogposter

>> No.67091998

rust, c#, python
windows 10

>> No.67092015

C#, C
Windows 10
Visual Studio

>> No.67092019

>all these windows babies

>> No.67092033

linux sucks dick for desktop

>> No.67092040

not really. It has plenty of just werks DEs

>> No.67092046

you suck dick for free

>> No.67092055

how did you know, anon?

>> No.67092069
File: 43 KB, 514x536, The Ausmos - An Internet Odyssey.jpg [View same] [iqdb] [saucenao] [google] [report]

>can't into basic lambdas
>blames javascript

>> No.67092102

It's javascript's fault that map passes in three parameters, and extra parameters are implicitly ignored. That's just bad API design.

>> No.67092110

>implement typesafe Foo in nogenerics

>> No.67092119

I'm hoping it will open gophers' eyes

>> No.67092128

read from config file and accept cli args, cli settings overrides file settings if they specify something different. simplest to implement would probably be to have your core program just take cli args and write a little wrapper program/script that reads the config file/cli args and calls the core program. If you make your config file syntax similar to the way cli args are specified and use the same option names, that wrapper is trivial to write

>> No.67092144
File: 2.19 MB, 388x218, 1533778883777.gif [View same] [iqdb] [saucenao] [google] [report]

>defends javascript even against a shitty argument

>> No.67092152

memes aside is it worth learning rust

>> No.67092161

how can I inline bytecode in C?

>> No.67092193

Does PyGame simplify anything or should I jump straight into "real" graphics libraries? If yes, then which one(s)?

>> No.67092205

Yes, it's a good alternative to C and C++ nowadays.

>> No.67092207

learn SDL and OpenGL asap if you plan on regularly working with graphics

>> No.67092212

memes aside is it worth buying a cuckshed

>> No.67092219

Yeah desu

>> No.67092270

Are they complex? SDL or OpenGL first? Is PyGame really that bad?

I'm not really into making games, just yet.

>> No.67092297

>Are they complex
depends how much you wanna do
you don't need to learn every feature all at once
>SDL or OpenGL first
>Is PyGame really that bad
never used it, but python is simply not built for heavy lifting and I doubt a library for baby's first gaem is going to give you all the tools you'll ever need

>> No.67092305

t. unemployed c-nile

>> No.67092312
File: 91 KB, 750x938, 1533925993060.jpg [View same] [iqdb] [saucenao] [google] [report]

Thanks anons.

>> No.67092444

OK, I did check SDL and it has rather poor support in Python, judging by google results. Or is it just my impression?

I'm not a programmer, but learning for CAD and UI/UX stuff. I'm branching out, as I want to move out of the 3rd world country my parents imported me into.

>> No.67092456 [DELETED] 

There are no spoilers on /g/ you fucking mongrel

>> No.67092463

python is not made for games anon. use C++. Python is only good for scripting

>> No.67092471

anon, you'll never make anything of consequence if you plan on only programming in python

>> No.67092486

you can do inline assembly if that's what you mean, syntax depends on compiler I think

>> No.67092499

The emoji skintone selectors being a more common thing in UI development feels like the biggest trap to deal with at every level. As if text processing isn't complicated enough.

>> No.67092571

>and extra parameters are implicitly ignored
That's not how map works, that's how all functions in JS works.
Any function will accept insufficient or extra arguments.
You don't want to fuck up everything on your website just because you're lacking an argument, cause data is dynamic, and you can't really control it.
So you prefer having explicit rest and default arguments for every function you will write. Good luck with that.

Ye, that's definitely better than just read docs and knowing that map passing 3 arguments. Who are reading docs anyway. Shitty language.

>> No.67092576

But I'm not a programmer, I just want to be able to make mock-ups of stuff that programmers should make based on design of mine or others.

I have hard time writing a least common multiple program, not to even think about stuff the fedora wearing programmers make.

>> No.67092597

>, I just want to be able to make mock-ups of stuff that programmers should make based on design of mine or others
you don't need to program to do this
why learn pygame?
what's wrong with explaining with writing or doodles

>> No.67092613

if you're not a programmer then go use some engine like Game Maker Studio

>> No.67092671

JS, Rust, Lua
JetBrains's IDEs

>> No.67092690

my man, although im also using intellij rider

>> No.67092698


Brendan Eich wanted to use Scheme, but his boss wouldn't have it. They wanted a cheap cash in on being like Java instead.

>> No.67092712

>anon asks about pygame
>just learn opengl, c++ and write your own engine
Why don't you just start from writing your own graphical API? I mean, after you write your own OS, after you write file system, ofc.

>> No.67092718
File: 31 KB, 1313x175, 1507147474941.png [View same] [iqdb] [saucenao] [google] [report]

Ever write code your proud of not because of retarded shit like elegance, but because you cant balieve it works? pic related is my latest one. I can go home today knowing I did a good job writing

Func<object, bool> predicateCombined = t => t is T && t != null && (!Filters.Any() || Filters.Select(x => x((T)t)).All(x => x)) && (!SearchColumns.Any() || SearchColumns.Select(x => Regex.IsMatch((x((T)t)?.ToString() ?? string.Empty).ToLower(), (FilterText ?? string.Empty).ToLower())).Any(x => x)) && ColumnCollection.Values.Select(x => Regex.IsMatch((x.CellValue(t)?.ToString() ?? string.Empty).ToLower(), (x.Filter ?? string.Empty).ToLower())).All(x => x);

>> No.67092726

I've heard that rider needs a beast machine to work properly, is it true?

>> No.67092731

Tic tac toe with an implementation of the Minimax algorithm for my C++ class. I’m struggling cus I’m actually a brainlet.

>> No.67092744

>learning C++ and openGL is basically the same as writing your whole OS from scratch
>brainlets actually believe this

also that anon asked if pygame is a good substitute for real graphics libraries, which it isn't

>> No.67092789

But why?

>> No.67092800

>he doesn't know how to do an if else statement

>> No.67092815

To filter rows based on the values in columns.

At least its not the Mongolian Vowel Separator

>> No.67092834

i know c, c++, c#, python (django, flask), some js, java, php
what else should i learn to get a job

>> No.67092842

You don't learn a language in order to get a job, you get a job then get paid to learn a new language, but if you really want to , SQL.

>> No.67092844

>i know
ye don't. Just apply for a job you retard

>> No.67092879
File: 127 KB, 1397x666, big pancake just.png [View same] [iqdb] [saucenao] [google] [report]

You're doomed either way
>use the yellow skintone
>are you a racist?
>use your own skintone
>are you a racist?
>use a different skintone
>are you a racist
return "JUST"

>> No.67092900

Who the fuck are you associating with that this is an issue?

>> No.67092926


>> No.67092952

xou have my condolences.

>> No.67092953
File: 349 KB, 2240x2028, file.png [View same] [iqdb] [saucenao] [google] [report]

leveling up my hacker rank

>> No.67092981
File: 478 KB, 634x533, file.png [View same] [iqdb] [saucenao] [google] [report]

Good job Stefan!

>> No.67092997

Why do people jerk off to lambdas?
Arent they just trading readability for a small decrease in lines?
Also is fucktional programming just a neme?
inb4: t. newfag

>> No.67093033

they're a powerful and simple abstraction

>> No.67093041

>Arent they just trading readability for a small decrease in lines?
How do you figure?
A decrease in lines increases readability once you know how to read in that way.

>> No.67093042

Arent they just trading readability for a small decrease in lines?
no, lambdas are in a lot of situations more readable than full methods. they also allow you to capture variables and do delayed execution of code that would be a lot more contrived using methods.

>> No.67093050

lambdas are easy to read after you learn them

>> No.67093058

Even if you don't use it professionally, it helps you write better c and c++

>> No.67093065

>brainlet doesn't understand hyperbole
I mean, I'm not surprised, what else can one expect from 16yo c++ hackers itt. I hope you've already written your own pygame?

>> No.67093077

why not using sqlite or a database at this point

>> No.67093079

Bomb mechanism with pic10f200.

>> No.67093090

You gain readability and decrease lines, and plus closures can capture variables unlike functions (language specific).
FP isn't a meme, it has it's strengths, weaknesses and use cases.

>> No.67093097

How exactly are they abstracting anytbing away? They're just a shorter syntax to do thensame exact thing.

>> No.67093106

People here are jerking off to anything functional.
Amirite guys? Too smart to find a job btw. Haskell btw. Scheme btw.

>> No.67093115

the exact same thing as what? defining a function out of line?

>> No.67093130

what can rtti actually be used for anyways

>> No.67093139

I am using a sqlite database in the back though, this is in the view where the user can filter the info on screen, im not coupling the database to the view just to filter a table.

its not the exact same, some languages allow you to use methods/functions in the same way as lambdas to let you capture variables in the scope for example, but a lot dont. you need to define the language we are working in to be able to say if its the same or not.

>> No.67093143

std::tuple<int,int> mytuple= std::make_tuple(1, -1);

why are tuples so fucking awful in c++>?

>> No.67093159
File: 310 KB, 1920x1080, 1517905419828.jpg [View same] [iqdb] [saucenao] [google] [report]

in rust, this just
let mytuple = (1, -1);

>> No.67093191

I've only seen them in JS and they were completely unreadable. Maybe it's just programmer's fault and not lambdas but i really don't see how cramming a function in a single line makes anything better.

>> No.67093193

>why is THING so fucking awful in C++
because C++ is awful, stop using it.

>> No.67093239

in C# its just
var mytuple = (a:1, b:-1);

>> No.67093240
File: 179 KB, 1024x1017, 1533300000984.jpg [View same] [iqdb] [saucenao] [google] [report]

Just use structs LOOOOOOOOOOOOL

>> No.67093300

because C++ is an abomination of bolted on features, and the same sort of thing happens with std::visit and all over the standard library

>> No.67093327

Don't give up anon, it's never to late to pick up a new skill. If you're feeling overwhelmed, try taking things one at a time and just search "what is <concept>" to try and learn whatever you don't understand. Also most first year university CS courses assume you know jack shit about programming and start with the basics (usually with Python or Java, but I've seen Racket too). I would suggest brushing up on your math skills instead, since those were the courses that I found harder. Good luck!

>> No.67093335
File: 199 KB, 630x630, file.png [View same] [iqdb] [saucenao] [google] [report]


>> No.67093347
File: 184 KB, 1914x566, lambdas.png [View same] [iqdb] [saucenao] [google] [report]

>lambdas less readable

which of these two do you think is more readable?

>> No.67093373
File: 28 KB, 564x259, 63fad8cca1.png [View same] [iqdb] [saucenao] [google] [report]

Well, even in JS it can really make your code cleaner.
One of nice things that you can do with lambdas is currying. It can come be really useful in some contexts(Redux) and is only readable with lambdas.

>> No.67093377
File: 509 KB, 600x800, Whisper.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.67093402

holy shit why does it have to be so fucking verbose?

>> No.67093403

Both are unreadable to me.
Ok, this does look kinda neat.

>> No.67093407

>No exception handling
Are you serious right now? This is why C has become irrelevant

>> No.67093411

wtf do you use instead then??? the full boilerplate laden function notation?

>> No.67093422

nth for OO can and SHOULD be used to write more orthogonal code

>> No.67093425

Quite the opposite. C is widely used because it is the way it is.

>> No.67093427

>try isnt error handling

>> No.67093430

On Fridays, we code!

>> No.67093432

wow, guess you're just heckin' dumb then lol

>> No.67093434

>writing code intended to fail

>> No.67093435

>look ma, no semicolons!
both will be fun to debug in two months

>> No.67093454

You're right, it's widely used by retards because it has no features

>> No.67093467

>-> not being used to access members in a dinamically-allocated struct
shiggy diggy

>> No.67093480

>im not coupling the database to the view just to filter a table
I dunno how you've got it set up but to me a new request (different filter) means a different query.

>> No.67093483
File: 1.15 MB, 900x506, 1502622873397.webm [View same] [iqdb] [saucenao] [google] [report]


>> No.67093484

>No monadic error handling
Are you serious right now? This is why C++/Java/C#/Python/Whatever will become irrelevant.

>> No.67093489

you forgot .take().crate().request().mut()

>> No.67093494
File: 10 KB, 640x107, 8097666bfc.png [View same] [iqdb] [saucenao] [google] [report]

m8 this shit is unreadable. You shouldn't expand lambdas like this when they are part of arguments. Also you are inconsistent with line breaks in general.

You should do something like this.

>> No.67093496


but I still get the right line number in my error logs?

>> No.67093507

ok, but what if

goes on too long? how do i break that line up?

>> No.67093510
File: 117 KB, 630x480, 1521319334924.jpg [View same] [iqdb] [saucenao] [google] [report]

tuples are not Option<T>, you dummy

>> No.67093512

just follow the one function a line rule you heathens.

>> No.67093515

this but unironically

>> No.67093523

Why are you so insecure about your favorite shitlang anon?

>> No.67093542

you forgot to unwrap()

>> No.67093548

A bad software design decision now can cause problems for decades. Remember that before you decide to quickly hack something together

>> No.67093552

If it's function chain bar.foo().foo().foo() then put then break them into new lines. If there was more functions applied after ok(...), I would break them down, aligning them. Same for arguments.

If you have very long access chain like data.data.data.data.data.data then what the fuck are you doing.

>> No.67093560
File: 15 KB, 696x178, 1516488205054.png [View same] [iqdb] [saucenao] [google] [report]

Im not making a new request every time the filter changes, its supposed to be real time as the user enters a string the table shows the results.

I refactored it a bit, its a little more clear now, but I feel the method lost its magic now.

>> No.67093568

That sounds like guaranteed job security to me. Thank you for pointing it out!

>> No.67093569

I'm not keen with inline lambda expressions, because there's a tendency for developers to go absolutely fucking wild with them until the entire routine becomes an unreadable and comprehendible mess. If you have more than 1 "->" in your chain statement (as you do), it's a fucking mess.

Instead, you can complement lambdas by referencing nicely named functions. That way, I haven't gotta spend 20 minutes trying to figure out what
return sessionMergers.mergeSessionTickFieldsOnly(maxMergeTimeMillis, rootFolder, folder + pattern).thenApply(this::nicelyNamedFunction1);

private Result nicelyNamedFunction1(SessionMergeResult<SessionDataAndMeta> mergeResult) {
return buildHttpResultFromMergeResult(mergeResult, this::nicelyNamedFunction2);

private Result nicelyNamedFunction2(SessionDataAndMeta dataAndMeta) {
return ok(dataAndMeta.data).withHeader("x-in-session-meta", Json.stringify(dataAndMeta.meta));

Clean code is happy maintainable code. Messy code is why you're still employed.

>> No.67093570
File: 1.03 MB, 1200x1198, urhkmezc0vnz.png [View same] [iqdb] [saucenao] [google] [report]

>> No.67093589

Nah, it doesn't protect people from being fired, it just causes misery for the people who replace them and have to take over the code

>> No.67093608

No such thing as zero-cost abstraction.

>> No.67093618

that's even worse than anonymous functions! now I have to go to a different fucking place to see what the code does. if the lambda body is simple, I don't see why you'd ever do this. if you're confused by what the lambda's type signature is, you can expand the arguments... if you're confused by what the lambda's body does, why would it being somewhere else help?

what if I named my variable something really long

>> No.67093631

compile-time only baka

>> No.67093641

>His language doesn't have zero-cost abstractions

>> No.67093648

>now I have to go to a different fucking place to see what the code does
Like any built-in function?

>> No.67093649

>what if I named my variable something really long
Stop being Java programmer.

>> No.67093656

Think you replied to the wrong anon

>> No.67093664

For the same reason why, your entire program isn't executed in a single block of code.
Breaking out chunks of code into separate routines makes them easier to comprehend, maintain and test. Having a huge fuck-off lambda expression linked with a bunch of fuck-off other lambda expression makes debugging a nightmare, scalability an impossibility and goats are slaughtered because developers will take it on faith that it works, just because.

>> No.67093666
File: 24 KB, 511x288, brainlets.jpg [View same] [iqdb] [saucenao] [google] [report]

Everytime i compile this there is "Segmentation Fault". Its one of the challanges on leetcode, pass 2 strings A and B and return true if A==B after replacing only 1 letter in A

#include <string.h>
#include <stdlib.h>
#include <stdio.h>

char BuddyStrings(char *A, char *B) {
for (int i=0;i<strlen(A);i++) {
for (int j=0;j<strlen(A);j++) {
if (i!=j) {
char temp = A[i];
if (strcmp(A,B) == 1) {
return 1;
else {
char temp = A[i];
A[i] = A[j];
A[j] = temp;

return 0;


int main(int argc, char *argv[]) {
char A[20] = "ab";
char B[20] = "ba";
//BuddyStrings("ab", "ba");
BuddyStrings(A, B);


>> No.67093670
File: 13 KB, 256x256, 1513232096718.jpg [View same] [iqdb] [saucenao] [google] [report]

Oh yeah

>> No.67093675

Don't worry it's cool anon, no biggie

>> No.67093682

No such thing, if something takes longer to compile it means its writing more code to the executable, which will lower performance when running it.

>> No.67093694
File: 45 KB, 600x677, shinji.jpg [View same] [iqdb] [saucenao] [google] [report]

Just count the differences.

>> No.67093701

OCaml come back guys

>> No.67093703

Somebody please post a brainlet wojak quoting this post, i don't have one

>> No.67093705
File: 38 KB, 667x558, 1516619698043.jpg [View same] [iqdb] [saucenao] [google] [report]

>if something takes longer to compile it means its writing more code to the executable, which will lower performance when running it

>> No.67093719

right, where the advantage is that the logic in isolation is easier to reason about, and you can call it from multiple places. in this case the logic only makes sense in the context of the call site, so number 1 is out, and number 2 was out anyway (if it wasn't, then it should 100% be an external function)

we had a guy who did this, he'd write tons of stupid functions where the signature matches what the lambda was getting passed in, even if it didn't use all of those args. so there'd just be these dumb functions that don't make sense on their own because why do I need the map key passed in when I'm not going to use it because I guess he thought the :: notation looked sexy or some dumb shit. anyway he's long since fired now and I have his job, so there you go

wow rude

>> No.67093722

literally FP for brainlets

>> No.67093728

Why arenyou freeing thongs that you didn't mallocate?

>> No.67093734
File: 25 KB, 349x149, file.png [View same] [iqdb] [saucenao] [google] [report]

i think it's a bait anon

>> No.67093735
File: 94 KB, 600x450, 1506543493086.jpg [View same] [iqdb] [saucenao] [google] [report]

Because she's a Cnile

>> No.67093744

Exceptions are bad.
If you really want them, make your own with SJLJ.

>> No.67093777

Wasn't bait, but Im too tired and my thoughts didn't translate well to text, what I mean is that longer compile times mean the compiled is doing more shit creating a more complicated executable (not neciceraly a larger file-size executable as the code can be more 'dense'), those complicated things will then take longer to execute than a simple executable.

>> No.67093789

Stop, it already! You're only making it worse!

>> No.67093799

an extremely solid, mt. stupid post anon.

>> No.67093802

Those 'complicated' things get compiled away, they don't exist at runtime, hence "Zero-cost abstractions"

>> No.67093810

What's worse
>writing your mobile app in react native so you only have to deal one code base for android/iOS
>writing your mobile app twice in Swift and Java

>> No.67093813

I've just read about it. Holly fuck, fortunately Rust has pattern matching.

>> No.67093819

>deving for android
>deving for mobile shit at all

>> No.67093822

Would you change >>67093347? If so, how? Because there's always going to be a fight between readability and practicality.

>> No.67093832

That's literally the opposite of what happens.
Learn what optimizing compiler is.

>> No.67093839

It really is abysmal. You can make better ghetto pattern matching if you do it yourself - it's just the standard being terrible.

>> No.67093840

I'd change it how that other anon told me too, so that the line breaks are consistent

thanks other anon!

>> No.67093855

thanks now it works when i deleted free, is there a way to print booleans, or is there only 1/0 instead?

#include <string.h>
#include <stdio.h>

char BuddyStrings(char *A, char *B) {
for (int i=0;i<strlen(A);i++) {
for (int j=0;j<strlen(A);j++) {
if (i!=j) {
char temp = A[i];
if (strcmp(A,B) != 1) {
return 1;

else {
temp = A[i];
A[i] = A[j];
A[j] = temp;

return 0;


int main(int argc, char *argv[]) {
char A[20] = "ab";
char B[20] = "ba";
//BuddyStrings("ab", "ba");
char Result = BuddyStrings(A, B);
printf("%d\n", Result);

>> No.67093862

>>deving for mobile shit at all

Some of us are actually making useful things, neckbeard

>> No.67093865

ah yes another calendar app.
how productive.

>> No.67093885

>"Some of us are actually making useful things, neckbeard"
>Resumes coding his 2D game

>> No.67093891

I've used Ionic for apps until now and it was quite nice. I'd like to try react native though.
I'd never use Swift or Java unless I had too.

Man, you don't need two loops. Just count the differences and check if it's only 2 and the chars are swapped.

>> No.67093892


Shitty and wrong assumptions, really shows off your insecurities.

>> No.67093897

So there's this function isTabular() in a spreadsheet detection program and it does this magic to determine whether or not something is tabular.

private static final float MAGIC_HEURISTIC_NUMBER = 0.65f;

public boolean isTabular(Page page) {

float ratio = (((float) colsDefinedByLines / colsDefinedWithoutLines) + ((float) rowsDefinedByLines / rowsDefinedWithoutLines)) / 2.0f;


What the fuck is this doing? How does the ratio of defined lines and undefined lines being between .65 and its inverse determine whether or not something is tabular?

>> No.67093907
File: 96 KB, 620x620, thumb.jpg [View same] [iqdb] [saucenao] [google] [report]

>Assumed that the other Anon was making a mobile game
Love watching a hypocrite raging... you pathetic spastic

>> No.67093915

Booleans are 1bit binary values and you can only print ascii characters.

>> No.67093931

>Booleans are 1bit binary values

>> No.67093932

implementation dependent

>> No.67093945

What the hell are you talking about I assumed that guy wasn't making anything and I was right since he started projecting.

>> No.67093953

how do i add files to repl.it? i just want to test something with jquery.

>> No.67093955

In C there is no boolean type so everything (not restricted to 1 bit) is true while 0 is false.

>> No.67093958

what is _Bool?

>> No.67093975

I know that they are actually 8 bit but that's irrelevant since 7 of them are always zero.

>> No.67093978

there's stdbool

>> No.67093990

while isinstance(a, int):

Why does it crash?
It doesn't create the a, takes no input, and what's worse doesn't break the loop if I enter a str value, which should break the loop especially that every input() is str by default.

>> No.67094027

input(a) prints a and gets the user input, you probably want a = input()

>> No.67094042

We're supposed to guess what language it is?

>> No.67094047

Ok I realized the mistake in this version.

anyways, I was trying to solve the problem of inputs being always str with try, expect, blocks but it didn't work. What's the proper way to check if user inputs a number or a str or any other value like float or char.

>> No.67094059

See the indenting and colon you idiot. It is pythong

>> No.67094062 [DELETED] 

If languages were cute anime girls, which would be a big-dicked trap?

>> No.67094064

while isinstance(a, int)==True:

This is sort of working code, but sometimes it breaks.

>> No.67094077


>> No.67094083

it isn't what you expect and it's wildly different from the other options

>> No.67094139

Whats the safest language? meaning lots of compiletime checks, people cant do shit you dont want them to do, easy to tell the compiler your intent, and so on? python is probably the most unsafe language I know, anyone can change any private variable, almost no compile time checks so you get tons of run time errors,... C# has a lot of good shit to make it safe but also some weird ass shit like read only fields that can be mutable.

>> No.67094156

some flavour of strongly typed FP

>> No.67094162


>> No.67094164

idris of F*
Elm if front-end webshit.

>> No.67094179

Is 'Thinking Forth' worth the read? Forth is a deadlang.

>> No.67094185

Can you even do anything useful with Idris?

>> No.67094197

yes Idris can interface with C even.

>> No.67094199


>> No.67094201

>python is probably the most unsafe language I know
Wish more people understood this desu (especially data """scientists""").

I'd go with Java as a good candidate. I guess FP langs are technically more safe because there is no concept of mutability, but I'm not sure if that's what you're looking for.

>> No.67094204

Yes, you can make hangman or invaders

>> No.67094209

if (cond) return foor

if (cond)
return foo

if (cond1) return foo
if (cond2 && cond3) return foo
if (cond4 || cond5 || cond6 || cond7) return foo

if (cond1 ||
(cond2 && cond3) ||
(cond4 || cond6 || cond7))
return foo

>> No.67094210

All engines suck so it's a matter of picking whichever one is the least suck to you. I've played with it but never done anything serious with it. Seems capable enough. Gamedev is fucking hard wherever you try to do it.

>> No.67094225

? action
: other action;

>> No.67094235

What do I need to learn to enter a FANG company? I have an inside man who can get me an interview but I'm not ready. I've been a java and android monkey for years and my grasp of essentials has gone to shit

>> No.67094243

>Wish more people understood this desu
We're all consenting adults here anon, you are safe :^)

>> No.67094262

you need to be a SJW. Sorry, anon

>> No.67094278

Have your tried looking at a call site of that function, might shed some light if the name isn't 100% accurate?

>> No.67094289

Who's the N? Nintendo?

>> No.67094297


>> No.67094347

>FP langs are technically more safe because there is no concept of mutability
FP doesn't always mean immutability.

>> No.67094349


>> No.67094361

>Java as a good candidate
Not with the amount of shit in its standard library that should be immutable but for some reason isn't and can get changed inside methods you cant even think off.

>> No.67094386

Dicks and ass?

>> No.67094459

It's not very helpful looking at its use case:

SpreadsheetExtractionAlgorithm se = new SpreadsheetExtractionAlgorithm();
boolean isTabular = se.isTabular(page);
List<? extends Table> tables = se.extract(page);
StringBuilder sb = new StringBuilder();
(new CSVWriter()).write(sb, tables.get(0));

As far as I can tell, that magic number is simply a value picked after trial and error. It just werks at determining at whether the data in an extracted area is tabular. I still wonder why it matters if the ratio is in the bounds of magic number and its inverse though.

>> No.67094460

>Is 'Thinking Forth' worth the read?
>Forth is a deadlang.
Forth is a funlang

>> No.67094617

>FP doesn't always mean immutability.
i mean it's a pretty central pillar of it, but if you want to be pedantic.

>> No.67094637

that's right
only faggots work for bigN

>> No.67094733

New thread: >>67094731

>> No.67094735

how the FRICK am I supposed to navigate the sdl2 docs?
it just seems like a bunch of html files with no real order
it's just a mess

>> No.67094924


>> No.67094973

I fucking give up, there is no way i will write program that will check every opportunity. I am terrible programmer
char* swap (char* A, int i, int j) {
char temp = A[i];
A[i] = A[j];
A[j] = temp;
return A;

bool buddyStrings(char *A, char *B) {
int h=0;
int w[2];
if (strlen(A) == 0 || strlen(B) == 0) {
return false;
for (int i=0;i<strlen(A);i++) {

if (A[i] != B[i]) {
w[h] = i;


if (h>=2) {
if (strcmp(swap(A, w[0],w[1]), B) == 0) {
return true;
return false;
if (strcmp(swap(A, 0,1), B) == 1 && strlen(A) <= 2) {
return false;

return true;


Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.