[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Search] [Home]
Board
Settings Home
/g/ - Technology


Thread archived.
You cannot reply anymore.



File: 1559477960936.jpg (79 KB, 423x615)
79 KB
79 KB JPG
Old thread: >>71383032

What are you working on, /g/?
>>
File: 1553370249007.png (491 KB, 642x720)
491 KB
491 KB PNG
Trying to learn C#
>>
File: maxresdefault(2).jpg (139 KB, 1280x720)
139 KB
139 KB JPG
>single handendly btfos fp fags in one fell swoop
https://www.youtube.com/watch?v=Q20MiBKdtf0
>>
starting to learn python
Apparently the company I work in wants to shift away from excel VBA
>>
>>71389438
>starts off by confusing functions with procedures
man, suckless fags really are retarded
>>
fuck icu
>>
>>71389415
>>71389434
>>
>>71389470
i see you
>>
imagine being a mentally ill cnile /pol/tard
https://godbolt.org/z/WCegRf
https://godbolt.org/z/UiSs7C
https://godbolt.org/z/GDqWtv
>>
File: penis.jpg (123 KB, 1072x1920)
123 KB
123 KB JPG
Did you know that you can be naughty-naughty and download the MISRA standards off of libgen?
>>
File: 1560258429996.webm (1.93 MB, 1280x720)
1.93 MB
1.93 MB WEBM
use const
>>
File: 1559388983692.jpg (63 KB, 646x741)
63 KB
63 KB JPG
>>71389478
>cnile
>Posts sepples
What?
>>
File: 1557168359873.png (428 KB, 700x823)
428 KB
428 KB PNG
>>71389487
I don't understand the mentality of people like you who come into these threads and post literally the same shit over and over again.
Do you have severe autism? Are you just a bot?
>>
>>71389478
>imagine being this retarded
https://godbolt.org/z/TW6JqQ
>>
File: your mind on sepples.png (914 KB, 1919x1080)
914 KB
914 KB PNG
>>71389487
>>
>>71389516
>anything past 11
>>
What's the best programming books considering general topics, not some specific language or framework?
inb4 SICP, I've skimmed it and I found pretty basic, obvious stuff, not much of value for someone with a few years of experience.
>>
>>71389529
so what's the answer?
>>
>>71389549
https://4chan-science.fandom.com/wiki/Computer_Science_and_Engineering
>>
>>71389550
It's pretty long iirc.
https://youtu.be/OkgvqjJzH_Y?t=1637
>>
>>71389516
>std::size
invalid argument as only c++11 was being covered and size() was not mentioned yet
>>
summing times in c is incredibly tiresome
>>
>>71389487
shit if only the language weren't so complicated the compiler was unable to reason intelligently about your code
>>
>>71389568
Here is a handy header: https://gitlab.freedesktop.org/wayland/weston/blob/master/shared/timespec-util.h
Knock yourself out.
>>
File: 1560340360.jpg (497 KB, 1561x2208)
497 KB
497 KB JPG
>>71389549
it's an intro book, the less obvious stuff is in the last 2chapters, but only if you've never written an interpreter/compiler.
just get a book on a specific subject if you aren't a beginner anymore.
>>
C++
>Just use whatever functions you want on T, if doesn't have it, it just won't compile

Modern meme languages
>Noooooo, you must define an interface then make every class you want to put in the generic inherit from that interface, it's much more elegant!
>>
>>71389604
sepples does much more than that
>>
>>71389604
One of these is dynamic polymorphism and one is not.

That said, I'd be interested to know if any language is able to infer constraints on type variables.
>>
>>71389465
He even race mixed.
>>
>>71389604
What are the "modern meme languages" you're talking about? Because the only one that does that is Java, and I wouldn't call it one.
>>
anyone know here know a bit about RNNs? I need to know whether this paragraph is referring to word embedding. I'm quite convinced it is I just don't want to make write assignment based on a mistake
>Most of the proposed neural machine translation models belong to a family of encoder–decoders (Sutskever et al., 2014; Cho et al., 2014a), with an encoder and a decoder for each language, or involve a language-specific encoder applied to each sentence whose outputs are then compared (Hermann and Blunsom, 2014). An encoder neural network reads and encodes a source sentence into a fixed-length vector. A decoder then outputs a translation from the encoded vector. The whole encoder–decoder system, which consists of the encoder and the decoder for a language pair, is jointly trained to maximize the probability of a correct translation given a source sentence.
>>
>>71389604
That's the main reasons why C++ has 300+ line template expansion traces.
>>
>>71389465
he said nothing wrong. put some bengay on that butthurt, faggot.
>>
>>71389671
make my assignment*
>>
>>71389675
The first line will tell you exactly where the expansion failed though. It's everything you need to know.
>>
>>71389683
What a great language.
>>
>>71389681
you retarded bro?
>>
File: 1547436947934.jpg (20 KB, 500x281)
20 KB
20 KB JPG
>>71389696
no I just can't English properly
>>
>>71389683
>where
But to find out why you need to dig lower.
>>
>>71389706
ni hao maaaa~ hokwai~
>>
>>71389721
at least answer my question meanie
>>
>>71389676
He said very little at all, and much of what he did say was inaccurate.
For example
>Functional programming language advocates implement everything in a functional style
Scheme and other Lisps are perfectly capable of programming in functional style but also excel at procedural and object oriented styles.
>You can use functional language style in Go
Go doesn't even have the trivial higher order functions. Functional programming even as a local style in Go is absurd.
The closest he comes to actual arguments are
>functional programs are unreadable
This is 50% fair and 50% baby duck. Haskell programs often turn into overly terse and baroque one liners, this is an apt criticism. But he clarifies with an annotation that he means "functional programs are difficult to reason about" which is such a phenomenal falsehood I don't know anyone who could believe it.
>functional programs do not map obviously to machine code
which is not relevant to nearly anything which isn't embedded or systems programming
>>
>>71389671
do my assignment*

this should be fine
>>
>>71389434
It's easy af desu.
>>
>>71389760
>Go doesn't even have the trivial higher order functions.
you haven't done your homework

>"functional programs are difficult to reason about" which is such a phenomenal falsehood I don't know anyone who could believe it.
they (haskell and other ml family languages) can be difficult for a human who isn't an expert in esoteric maths concepts to reason about. meanwhile you can look at some well structured procedural code and ask"DOES THIS CODE OBVIOUSLY HAVE NO DEFICIENCIES?" and answer "YEAH"

>Functional programming language advocates implement everything in a functional style
in practice they do. if you don't write functionally, the community excommunicates you.

sad that modern faggots have taken a good thing and turned it into an standoffish cult. why don't suckless use functional languages? because they're comfortable with procedural languages and happy with their resource usage. they are not obligated to use whatever language you'd prefer.
>>
>>71389871
>you haven't done your homework
Cool where do I find map/filter/reduce in the standard library? Can you even write const?
>they (haskell and other ml family languages) can be difficult for a human who isn't an expert in esoteric maths concepts to reason about.
Haskell maybe but other ML derivatives are usually straightforward. Procedural and object oriented languages by their nature make it much harder to see what changes made to parts of a system will affect others, while functional languages contain it much more obvious where this is the case.
>in practice they do. if you don't write functionally, the community excommunicates you.
It's basically just haskellers. Everyone else uses procedural whenever it's useful.
>>
File: go sort function.png (24 KB, 582x231)
24 KB
24 KB PNG
gotards be like "this is fine"
>>
>>71389434
I'm thinking of starting programming. But I don't know if I should learn C++, C#, Python or Java. My goal is to make a lot of money without working that much.
>>
>>71389968
>crying about higher order functions
>>
>>71390018
>My goal is to make a lot of money without working that much.
good luck with that
>>
>>71390036
Imagine making a language so bad you can't even sort things correctly.
>>
>>71389871
>delusional gopher
>hasklel too hard because muh math
>hasklel is muh math
>muh mutation clusterfuck is easier to find bugs
>muh community
and cherry on top
>suckless
who's the faggot here. I really wonder
>>
File: Reid Barton.png (279 KB, 775x1044)
279 KB
279 KB PNG
>>71390069
Haskell IS too hard.
>>
>>71390071
It's only as difficult as you make it.
>>
File: IMG_20190531_083907.jpg (311 KB, 1400x1175)
311 KB
311 KB JPG
>>71390071
stop being a brainlet
>>
>>71389415
I'm making an MVC framework for PHP.
It uses config files for setting directories, defining the default controller to be executed and the default action name when calling a controller.
It's for small to medium projects, not with high traffic.
I have never coded in this language, it's a good way to learn.
>>
Stallman:
>I skimmed documentation of Python after people told me it was fundamentally similar to Lisp. My conclusion is that that is not so. `read', `eval', and `print' are all missing in Python.

Can someone explain to me why functional programming languages like Python are inferior to Lisp?

Is it the lambda bracket prefix thing syntax that makes Lisp different?
>>
File: aaaaaaaa.png (74 KB, 759x356)
74 KB
74 KB PNG
that's it goodbye forever apple shit I won't miss you
>>
>>71390176
Stallman is quite clear. Python lacks read, eval and print.
Python is not a functional programming language.
Homoiconicity is a good thing about Lisp but not the only thing.
>>
>>71390204
>Python lacks read, eval and print.
It doesn't from what I can see these are in the docs.

>Python is not a functional programming language.
Literally every source I can find it calls it a mulit-paradigm language that supports functional style.

>Homoiconicity is a good thing about Lisp but not the only thing.
Care to tell me what's in Lisp, that is missing from other functional languages?
>>
>>71389487
I wish variables in C++ were const by default.
Unfortunately, it's such a big change that I doubt it will ever be implemented.
>>
>>71389549
Most of it is basic, obvious stuff, but it's also stuff most programmers think they know, but actually don't.
>>
>>71389487
Is there a reason the compiler can't figure this out on its own?
>>
File: data_entry.png (206 KB, 1803x918)
206 KB
206 KB PNG
>What are you working on, /g/
Having some fun with some data entry type work. Converting Windows virtual key enums to linux keycode enums. Luckily there are only 104 I care about and <255 max.
>>
>>71390253
In Lisp, read is a function that takes a string and returns a symbolic expression. It's essentially a parser. Eval is a function that evaluates a symbolic expression with recursive eval/apply. Print takes a symbolic expression and turns it back into text.
Python has forms of read/eval merged into one in the form of eval and exec. Unfortunately this negates much of the advantage of the approach used in Lisp. By separating read from eval you can manipulate Lisp programs as ordinary Lisp data structures before evaluating them. Homoiconicity makes this kind of manipulation even easier as it means the basic data structure of a program is also the basic data structure for everything else.

Python is predominantly a procedural language with object-oriented extensions. Python does have first class functions but that's not usually considered enough to be a functional language and functional idioms are difficult to achieve in Python.

Lisp is not a language, but a group of languages. This must be said because some Lisps are more functional than others - or proecdural, or object oriented. Most Lisps are multiparadigm and do all paradigms reasonably well.
>>
>>71390018
>My goal is to make a lot of money without working that much.
C# then.
>>
>>71389871
suckless here
I use Haskell, xmonad, NixOS, etc.
The UNIX philosophy is FP btw, chaining functions together that do one thing and do it well.
>>
>>71390415
Thanks for the explanation. If I wanted to experience the supposed power and elegance of Lisp (as per Stallman's description) how would I know whether the language is adequate (other than REPL)? Does Clojure fit the criteria?
>>
>>71389415
Working on a plugin for Jira.
>>
>>71390462
I love how Eunuchs weenies stretch the meaning of "Unix philosophy" to include literally everything.
In 20 years, Kant will be considered a proponent of the Unix philosophy.
>>
>>71390471
The things that make Lisps different to other languages are common to Lisps, and you'll learn them regardless of which Lisp you use. Clojure, Scheme, Racket, Common Lisp, Emacs Lisp - if one clicks with you then you'll know what the deal with the rest is too.
>>
Ẃhy not make lifetimes part of the type system in C++?
>>
>>71390625
What is your proposed syntax?
>>
>>71390625
>why not make C++ even worse
>>
>>71389434
How'd you learn it?
>>
>>71390529
Kant is a proponent of the Unix philosophy.
"do one thing and do it well" satisfies the categorical imperative.
>>
>>71390253
Lisp isn't functional.
Scheme and racket are, for example. CL ? absolutely not
>>
>>71390718
weird definitions.
>>
>>71390718
Scheme and Racket are so functional, they have a set! function to change global variables!
>>
Fucking everything is partly functional today. If it has lambdas and recursion it's functional to most of programmers.
Also haskell and other ml languages are partly OOP because they have object system.
>>
>>71391000
haskell doesn't have an object system
>>
Scala seems to be the only choice if you want to use functional language and also not be unemployed.
>>
Realistic speaking, how many programming languages is it >possible< to know at a fluent level?
>>
https://www.youtube.com/watch?v=iSmkqocn0oQ
>>
>>71391116
hundreds
most of them are basically the same
you can become fluent in a few weeks
>>
>>71391116
since you say realistically, I'll take fluent to mean senior software engineering level. i'd say 3. it's actually not that unusual. the most senior guys where i've worked were experienced in a mix high level, low level, and scripting (e.g. java, C + perl).
>>
>>71391140
Fuck off Simon, you are faggot.
>>
>>71391140
so did he invent Haskell just to trick brainlets and piss smart people off
>>
>>71391178
yes, it's the same as how Bjarne invented C++ to trick smart people and piss brainlets off
>>
>>71391172
being a senior software engineer isn't about your proficency with a language
>>
>>71391190
i said senior software engineer LEVEL. get a job if you need me to explain this to you.
>>
i need help, i being a dumb as i am bought a python2 course and now its dieing in 2020, i just wanna know if a learn to code in python2 how hard will it be to code in python3,
(I use python for mainly security pentesting purpose)
>>
>>71391288
python3 is basically an entirely different language, you're fucked
>>
>>71391288
What do you get for when you pay for a python course?
>>
>>71391288
it's literally the same language except they changed this

print "hello world"


to this

print("hello world")


i don't know what was going on through their heads when they decided to first not use brackets, and then when everyone had gotten used to their silly convention, they changed it,.
>>
>>71391172
Neat, good to know there are so many people good at different sorts of languages out there. I guess it makes sense not to invest your time in languages that do similar things things to the ones you already know, so at least managing to know some of different levels of abstraction is a fine enough of a goal
>>
>>71391484
all languages do similar things, when you're good at programming you just use whatever language you need to do the job because you can pick them up in a few days unless it's some super gay shit like Haskell
>>
>>71391462
They changed it because the Python 2 way of printing without a newline was fucking stupid, and the new way is just a named parameter
>>
File: 1558948814602.gif (483 KB, 300x250)
483 KB
483 KB GIF
Total programming noob here, starting from ground zero. I'm learning Dart because I want to code apps using Flutter. From what I've read Dart is similar to Javascript in its structure and syntax so it should be eady to learn JS after it.

Is this correct? Is Dart a good language for a beginner to start with or did I fall for a meme?
>>
>>71391577
>I'm learning Dart because I want to code apps using Flutter
this makes me feel old, i have no idea what the fuck those things are
>>
I've been modifying my code so that adding attacks to my shitty little RPG only requires the effects to be defined. Which is a lot more extensible.

Last night I added a move like hyper beam, except instead of having a rest turn, it reduces all your stats by 15%.
>>
>>71391577
Dude you're doing it backwards. Learn JavaScript first. Go for something that is 1. popular (so that you can find good resources) and 2. covers the basic principles (so that you can learn programming). JavaScript is currently the most widely used language so that's a good start and additionally you can make web pages to share your prototypes.
>>
>>71391577
Dart is a stupid language but if you keep trying hard and learning shit you'll be fine

>>71391599
Dart is a new language that Google made a few years ago as a proposal to replace JavaScript, right before JS started adding all that new syntax
Flutter is a UI toolkit (like React) written in Dart and designed for mobile apps
>>
File: data.png (11 KB, 516x153)
11 KB
11 KB PNG
I'm thinking of starting a big data analytics company focused on hate crime detection and prevention. This is a profitable business idea right? Surely lots of people will want this data?
>>
>>71391675
(((You)))
>>
>>71391577
starting with anything will get you started
>>
>>71391633
>1. popular (so that you can find good resources)
The problem with that is always that when something is popular you will also find a fuckton of shitty resources instead of the good ones when googling your problems. It doesn't matter if something is popular, what matters is that there's really fucking good literature that will help you solve the problems that you'll face.
>>
>>71391724
>you will also find a fuckton of shitty resources instead of the good ones when googling your problems
how often has this ever happened
>>
>>71391288
you should be fine. python3 is just a little different. switching may be annoying though.
>>
>>71391724
i mean popular you will never not find an answer to something on SO
>>
>>71391747
a lot because if you're a beginner you don't know which of the resources are actually the good ones. I get some tutorialspoint website for many searches and that site is sometimes really fucking shitty. also SO with accepted answers that are downright awful.
>>
>affinity for professional women
>job starts hiring top tier office ladies in record numbers
Jesus help me.
>>
>>71391879
I wouldn't hire a woman who is deliberately crippling her feet. She must be really fucking dumb.
>>
File: 1509078357914.gif (1.86 MB, 490x503)
1.86 MB
1.86 MB GIF
>What are you working on, /g/
Finished my data entry. I hope I got enough of the key codes matched up from Windows to GNU/Linux

https://pastebin.com/PmqRJpue
>>
>>71391900
This is a bully free zone. The women at my office don't dress as nice, but they manage well and can program effectively. To the point where github comments are now putting me into pervert mode.
>>
>>71390301
There is a reason.

Good luck finding out what that reason is with C++'s insane complexity.
>>
>>71391879
>>71391964
cute
>>
>>71389478
I'm not sure how you managed to work /pol/ into this.
I'm not sure you do either.
>>
>>71389564
>arguing for the sake of arguing instead of discussing optimal solutions
This is why C++ developers don't know any better.
>>
>>71391964
I don't care how nice they dress. I care about them not wearing clothes that are harmful to them.
>>
>>71392093
The implication is that more casual but still fancy clothing (regular shoes) are less likely to be harmful. But I can see how that would be non obvious.

>>71391964
>pervert mode
I want to protect that smile mode*
>>
How I can reload website (ctrl+f5) after done forEach in javascript?
I tried using counter inside forEach and then if statement+location.reload, but that does not work properly, do you have any ideas?
>>
File: 1494704057774.png (971 KB, 829x1621)
971 KB
971 KB PNG
>>71392117
Forgot my image. I think overall things are better.

>>71392123
Probably >>>/g/wdg
>>
>>71392123
Use for loops.
>>
>>71392159
>hiring cute girls to improve quality of life for workers rather than pushing them into miserable programming jobs
those bastards!
>>
>>71392159
>>71392165
Thanks.
I tried for loop still does not work.
>>
>>71392191
>when your feature lands and the ol smiles
I hope you all get to know this joy.
>>
>>71392035
the rules were clear right from the start
>>
>>71390253
>Homoiconicity
>symbolic expression
fuck you.
>>
>>71392212
Post the damn code.
>>
>>71392285
Sorry.
https://pastebin.com/Xw9ngksW
>>
>>71392159
Poor femcel
>>
>>71392159
maybe I should move to china
>>
>>71390192
This would be really bad for Apple if their users actually cared about anything but the brand
>>
>>71392467
My office is in the US they just don't call it the same thing. I'm sure there is some modern business around you too. If not, make a market.

>>71392452
Cute.
>>
>>71390192
sauce?
>>
>>71392467
Are you Han Chinese? The answer to this question is the same as the answer to if you should move to China
>>
>>71392502
nope, red-blooded American male.
>>
>>71392159
>their job is to bring breakfast, chit-chat and and create a fun work environment
So just like in the West?
>>
>>71392608
Yes but you're not allowed to say that anymore.
>>
Does anyone have any resources on cross-platform C/C++?
>>
>>71392693
I am retarded so I will say SDL
>>
>>71392693
International standard specification, latest version.
>>
>>71392693
for what purpose? gui? game? command line? network? embedded?
>>
>>71391462
So print can't be used as a function pointer for functions that take lambdas
>>
File: 1557315218788.jpg (5 KB, 125x128)
5 KB
5 KB JPG
>>71392693
Just make sure you reduce your program down to only needing printf, malloc and free and you will be set. You can implement the rest, assuming more than 100% of your users will use that feature.
>>
>>71392502
i mean you can move to china without being chinese, you'll be a second class citizen but it's not that bad a country
>>
>>71392782
Game engine using Vulkan. It's time I bit the bullet and learned graphics the hard way.
>>
>>71392857
I'm happy to see my crop being reposted.
>>
>>71392909
*tips chocolate syrup*, much obliged, it is captivating piece.
>>
>>71392857
Don't I have to worry about stupid things like WinMain() or some stupid if guards?
>>
>>71389478
-O2
>>
>>71392943
Not if you reduce complexity to a sufficient level. Why don't you instead return an integer value 0 when running your game, then the player can imagine they are having a captivating experience.
>>
File: argh.jpg (23 KB, 454x237)
23 KB
23 KB JPG
which is more /fa/?
>>
>>71392782
Not the same guy but for me it would be for library development and bindings for other languages
>>
File: ice89logo.png (13 KB, 47x28)
13 KB
13 KB PNG
Pls help?????

I'm trying to invent and document an 8-bit virtual system architecture from scratch. It's for fun. I'm going to write an emulator for it when I finish documenting it. I'm designing the architecture to have ports for a cart flashing peripheral and enough internal sram to store an entire cart rom; my hope is to eventually write a rom for the emulator that will provide a wysiwyg game dev environment that can operate directly on an executable rom format.

MY QUESTION IS THIS:

Do i have to worry about the bus architecture?

Do i really have to concern myself with things like bus contention and three-state logic? Is it sufficient to just transparently abstract away the buses using the assignment and reference semantics of the host language?

PLS ADVISE??????

i really don't understand very well how buses work and if i have to learn it i'll learn it but i'd rather not because it seems like it's going to open a whole new can of worms where i'll start having to worry about specific electrical details when it seems like i should be mainly concerning myself with the slightly higher level where one thinks of electrical signals purely as data and abstracts entire subcircuits into binary or hexadecimal tables
>>
>>71393015
Tryna cop top shelf
>>
>>71393015
>posting a screenshot of text

vk::ApplicationInfo appInfo("Dicks, VK_MAKE_VERSION(1, 0, 0), "Cocks",
VK_MAKE_VERSION(1, 0, 0), VK_API_VERSION_1_1);
>>
>>71393015
the top one has a green text which resembles being a hacker. so the top one
>>
>>71393051
>having this much gay
>>
>>71392930
>chocolate syrup
Looks like an additional feature. You _did_ remove two other features for that, right?
>>
>>71393015
both are gay
also use this formatting
( "dicks"
, VK_MAKE_VERSION( ...
, ...
, ...
);
>>
>>71393083
no u
>>
>>71393015
neither
here's how you do it
# in ruby
appInfo = Vk::ApplicationInfo.new(
application_name: 'Dicks',
application_version: '1.0.0',
engine_name: 'Cocks',
engine_version: '1.0.0',
api_version: '1.1'
)
>>
>>71393043
I can offer game console documentation if you want to see how they did things
https://pastebin.com/raw/mWMBqVpz
there's also all the external software based home computer systems people would use. (software on floppy, cassette, etc.)
>>
>>71393100
i do use that formatting
you're still gay
>>
File: 1473987915997.png (439 KB, 400x400)
439 KB
439 KB PNG
>>71393051
This is kino though, whatever that means

vk::ApplicationInfo appInfo("Dicks", VK_MAKE_VERSION(1, 0, 0), "Cocks",
VK_MAKE_VERSION(1, 0, 0), VK_API_VERSION_1_1);
>>
>>71393148
>whatever that means
Go retake your Russian classes. You're required to be fluent before posting here.
>>
>>71393209
???
>>
>>71393140
very cool, thanks. i'm gonna check out the snes one as it seems closest to what i'm trying to do. if i do turn out to need to understand how buses work on an intimate level i'm sure this will prove useful.

that being said, although i am trying to design both a virtual game console and a virtual machine for it, my question is more about virtual machine design than virtual game console design. i just want to know if i actually need to implement buses or if i can just read and write directly to host-allocated addresses and with a wave of the hand be like "the bus did it."
>>
>>71393238
"Kino." "Cinema." Figure it out.
>>
>>71393262
esti cretin prietene
>>
>>71393252
That sounds almost like a question of preference. Since you're designing both ends, I think it's your decision to implement it however you feel is most practical to do so given your own goal.
>>
File: 1560332497082.png (11 KB, 645x773)
11 KB
11 KB PNG
>boss tells me I can't use magic strings
>"But doesn't WPF use magic strings to update bindings?"
>"That doesn't count"
>mfw
>>
>>71393252
>that being said, although i am trying to design both a virtual game console and a virtual machine for it, my question is more about virtual machine design than virtual game console design. i just want to know if i actually need to implement buses or if i can just read and write directly to host-allocated addresses and with a wave of the hand be like "the bus did it."
(Not that guy) Depends on how accurately you want your emulator to work. A more detailed emulator will be more computationally intensive and more complex, but it will reflect changes in architecture much better than a coarser one.
You can at first implement it in a shallow, but functionally equivalent way, then progressively add detail until you're satisfied, even extremes such as emulating individual circuits.
Example: at the beginning, you could represent your bus as a simple native data structure provided by whatever language you choose, then you can model the individual, internal components. Or for example, for something like the ALU, you can initially simply perform arithmetic natively, then model individual parts, such as logic gates and circuits.
If the program is well designed, adding detail won't affect the rest of the program.
Considering you're doing it for purely personal reasons, to learn, I'd go for as much detail as you can reasonably manage.
>>
>>71393330
why do you need magic strings?
>>
>>71389434
i hope you burn in hell
>>
Is there an easy way to use this shit https://github.com/mozilla/TTS by just downloading pretrained model ? I know nothing about python and ML and want to just feed it with text and get wav file back.
>>
>>71389434
The white man's choice
>>
>>71393422
I hope you learn some manners.
>>
What legal drugs will make me perform better? In personal programming at home/exams/interviews.
My sister is a pharmacist she can get me shit.
Is adderall good?
>>
>>71393486
coffee :)
>>
>>71393486
meth
>>
>>71393486
Sugar.
>>
is flutter a meme or not? i like the idea of writing once and compiling for all platforms. is it at least better than electron?
>>
>>71392159
imagine being hired to work as a nanny for an autistic adult daycare lmao.

>"good job on that refactoring billy, here's your tendies"
>>
>>71393773
>getting paid to sit around
Yes please.
>>
File: hmm.jpg (74 KB, 1166x287)
74 KB
74 KB JPG
>>71393739
?
>>
>>71390253
>Literally every source I can find it calls it a mulit-paradigm language that supports functional style.
It is still an imperative language in essence, and some support hardly makes it functional.
>>
>>71393148
vk::ApplicationInfo appInfo(
"Dicks",
VK_MAKE_VERSION(1, 0, 0),
"Cocks",
VK_MAKE_VERSION(1, 0, 0),
VK_API_VERSION_1_1
);
>>
>>71393302
>>71393385
much appreciated, these thoughts are very helpful. in particular i only ever looked at the problem from the angle of "document entire architecture first, begin working on vm later" so i never even considered the approach >>71393385 suggested.
>>
>>71393409
He was just telling me the general coding guidelines
>>
>>71393486
Love
>>
>>71393812
You literally searched and replaced "ff" with "tt" huh buddy
>>
File: kagaminotamused.jpg (25 KB, 407x419)
25 KB
25 KB JPG
>vk::
>>
>global_namespace_pollution_application_info
>>
>>71394395
>ah.yes.this.is.so.much.better
>>
I just woke up from a dream. I was watching God program the weather and His programming language used a sepples type system.
>>
>>71394395
>actually believing that having namespaces that are accessible from the global namespace pollutes the global namespace any less in practice than just having global names
literally the only difference is the question of whether you'd rather pollute the global namespace with _ or with ::
>>
I read somewhere that they made Go very easy so even retarded programmers could use it somewhat correctly and so companies could replace programmers easily.

Do you guys think this is true
>>
>>71394558
no
>>
>>71394558
The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt. – Rob Pike
>>
>>71394589
>The key point here is our programmers are Googlers
I thought it was impolite to use terms like Googler and gook to refer to asians
>>
>>71394550
or you can just import your names into module scope you tremendous retard
>>
If it is not global and it is not public then I am not wasting my time. You cucks can keep your precious delicate abstractions.
>>
>>71393015
neither
(vk:application-info :name "Dicks" :version (vk:make-version 1 0 0) :engine "Cocks" :engine-version (vk:make-verseion 1 0 0) :api-version vk:api-version-1-1)
>>
>>71394632
OR you can just do that WITHOUT having to have namespaces, you even more tremendous retard. You don't even need to formally have """""modules,""""" because C (yes, C, not C++) has already had them since its inception.

int exported_function();
static int function_in_module_scope();


Problem?
>>
>>71394531
If by "God" you mean YHWH, I'm not surprised.
>>
>>71394818
>cnile misunderstanding the purpose of modules and namespaces
Color me surprised.
Besides, in languages with proper scoping, namespaces are often unnecessary.
>>
>>71394589
Not Rob Pike but he has a point. Any language you give anyone, no matter their intelligence or experience, should be easy to understand and easy to adopt.

When you're developing a specification for something new, you have two roles on your hands: designer, and tutor. If your specification design is sophisticated, advanced, and efficient, you're a good designer, but no matter how good your design is and how good a designer you are, if you can't give the same level of consideration to the interface and make it easy to understand and use, you need more practice in the tutoring aspect.

Making interfaces easy to understand and adopt benefits everyone, regardless of their intellect. Those without much experience have the benefit of being able to use it in the first place, where they might not be able to use more challenging interfaces. And, as long as the underlying design is more advanced and featureful than the simplistic interface betrays, those who *do* have experience can *also* take advantage of the easy interface to streamline their own more involved work and get more done faster.

Not that Go satisfies that second constraint of course. It's as restrictive as it is simplistic, which is precisely the problem. An example of a language that's well-designed and also well-taught would be Lua: predictable, easy to understand, easy to adopt, but not restrictive by any means.
>>
>>71394901
But C DOES have proper scoping.
If you have:
static int function_in_module_scope();

Then function_in_module_scope is not exposed to anything outside the module (i.e. the file). Not even at the binary level. There is no possibility for name conflicts unless the same name is used later in the same file.
>>
>>71394558
https://golang.org/doc/faq#creating_a_new_language
>>
>>71395062
>C does have proper scoping
>headers exist
lmao
>>
>>71395113
>using headers
Imagine being this bad at C.
>>
>>71395062
I guess it works if you have lightning fingers
>>
>>71395133
>if you have lightning fingers
pls expln
>>
which lisp dialect is most fun to use and has best tooling?
>>
Anyone here used Flutter before? What's it like?
Want to make a cross-platform app and don't really like the look of react native.
>>
File: ChemX.jpg (6 KB, 261x193)
6 KB
6 KB JPG
>>71393495
>>71393515
>>71393535
>>71394099
>>
>>71395150
fast typing
>>
>>71395173
If you have OCD and can't exist without cleanliness: probably Racket.
Otherwise Common Lisp, also best tooling using either Slime or any of the commercial IDEs from Franz and LispWorks.
>>
>>71395357
yes ok but why is this necessary
>>
>>71395361
CL being SBCL
>>
>>71395350
Why was the professor trying to make little girls?
>>
>>71395367
I suppose it isn't necessary if you are very patient.
>>
>>71395417
yes ok but why is it necessary to either be a fast typist or be patient

you seem to be implying you would have to type more than.... something

why / how is this the case
>>
I'm getting that raise, bois
>>
>>71395425
?
>>
>>71395497
Good goy award
>>
>>71395506
you keep saying you'd have to either type fast or be patient

the implication is that you would have to type a lot

what do you mean by that implication?

why would you have to type a lot? i see no reason you couldn't just use the approach i've suggested and also NOT type a lot.
>>
File: wot_pingas_size.jpg (17 KB, 291x95)
17 KB
17 KB JPG
>>71395497
now let's see how many jealous faggots will give you your (You)
>>
>>71395497
I don’t have a job, bois
>>
>>71390018
JS then C#
>>
i had an interview last week and haven't heard back, even though they said they'd be in touch early this week.
when should i email them?
>>
>>71395596
On Friday.
>>
>>71394589
He himself contributed to the proliferation of shitlangs over actual brilliant languages.
What a disgusting sodomite.
>>
>>71395596
Never, they won't call you
>>
>>71390018
>My goal is to make a lot of money without working that much.
lol
>>
>>71389415
>>71389434
Yellow fags, go back to >>>/b/
>>
>>71395534
I interpreted your suggestion to mean that you would include a module name in every function name but upon rereading it I see that may not have been your intent.
>>
>>71395649
this
or back into cont/a/inment
>>
>>71390018
I’m a beginner learning Java, I heard it’s convenient since the JVM makes it easier to compile on different operating systems. It’s really exciting to see my little calculators work.

>without working hard
no
>>
I'm writing a seminar paper in regards to compiling vs interpreting, while also discussing the evolution of computer languages. Is there any link between compiling/interpreting and how new certain programming languages are?
>>
isn't racket a toy language?
I feel so after using DrRacket
>>
>you make a simple observation that none of the articles online take into account
wtf am I a genius?
>>
>>71395813
John Carmack disagrees with you.
>>
>>71395856
Isn't he the guy who made a space rocket company and couldn't put a single rocket into space?
>>
>>71395869
Your search engine skills are astounding. Did you tell your caretaker?
>>
isn't C a toy language?
I feel so after using Notepad
>>
>>71396087
yes it is!
>>
>>71396087
C is the de facto lingua franca of software development
>>
>>71396158
>de facto lingua franca
sorry, i don't speak tortilla
>>
>>71396174
Imagine being this retarded.
Tortilla is a food you brainlet.
>inb4 "hurrrrr durrrrr that's the joke duuuurrrrrrrrrr"
>>
a language where you can define arbitrary operators
>>
>>71396205
you must be fun at parties
>>
>>71396223
haskell, retard
>>
File: foogey foogey foogey.png (461 KB, 631x1112)
461 KB
461 KB PNG
>>71396241
>t. retard who's never heard of a "de facto lingua franca" and literally just admitted he doesn't even know what a tortilla is
>>
anyone have the js lemons pic?
>>
a language that doesn't suck where you can define arbitrary operators
>>
>>71396205
There is something wrong with you.
>>
>>71396290
I already told you, Haskell
>>
>>71395737
In the late 90s/early 2000s, everyone who made a new language wrote an interpreter, because CPU clockspeeds were increasing all the time, static typing was widely considered pointless, and writing a compiler sounded hard. Of course, the clockspeed races ended, and around 2007, the infinite Haskell circlejerk finally convinced people that writing a compiler is not actually that hard and that static typing doesn't have to suck. Ever since then, new languages don't get taken seriously without some kind of compilation model. Even in JavaScript, JIT compilation is seen as mandatory.

tl,dr: Writing interpreters was kind of a phase and we've collectively grown out of it.
>>
>>71396290
still haskell
>>
>>71396290
kek
>>
>>71396293
Hey, I'm not the one who thought the Spanish language is called Tortilla. Nor am I the one who thought "de facto" and "lingua franca" were Spanish. Or "tortilla" as he put it.
>>
>>71396290
J
>>
>>71396315
The sad thing is you’re probably serious.
>>
>>71396353
Yeah, I'm completely serious. And I stand by my assertion that C is the de facto lingua franca of software development. You got a problem with that?
>>
File: lambdabg.png (32 KB, 1920x1080)
32 KB
32 KB PNG
>>71396223
>having more than one operator

top kek, the only operator you will ever need is λ
>>
>>71396368
The lambda calculus is a bad language.
>>
>>71396299
This was very helpful, thank you!
>>
>>71396368
>>71396382
>lambda calculus
>a language
>>
F# brainlet here trying to understand monads, but every explanation is written with Haskell syntax.

What's the easiest monad to learn?
>>
>>71396398
Cheers, tiny human
>>
>>71396422
It is one. And it's shit. That's why superior langauges have to be made to emulate it without being exactly the same.
>>
>>71396436
Identity
>>
>>71396483
>it's shit
I don't think it was designed to run general purpose programs on modern hardware. It was an investigation in logic and computation theory, and in that area it was quite enlightening, so not shit.
>>
>>71389508
says the anime poster, you are the mentally ill here
>>
>>71396436
you just have to start off going example by example and see where you can replace manual pattern matching with things like map, fold, bind, etc. Option is a good starter.
I think there is some good F# material in "fsharp for fun and profit" (or something like that).
>>
>>71396276
https://archive.rebeccablacktech.com/g/search/filename/js-rocks/
>113 results
>>
>>71396714
>things like map, fold, bind, etc. Option is a good starter.
I'm comfortable with using these (I assume they are all implemented as monads?), but my brainlet kicks in when it comes to creating my own monads.
>>
is js the only choice if I want scripting programming language with nice gui?
>>
File: 1554764514048.gif (33 KB, 220x168)
33 KB
33 KB GIF
why does learning hurt so much. it actually gives me physical pain
>>
>>71396801
you mean syntax? yes, the one thing js is good at is at making your code nice to look at
>>
>>71396772
bind is a monad function. The definition of bind is the fundamental determinant the behavior of the monad.
>>
>>71396801
>wanting a nice gui
and no, smalltalk comes to mind
>>
File: mid_img_0632.jpg (120 KB, 675x900)
120 KB
120 KB JPG
>>71396852
How to learn programming

First, read a textbook about programming in some language, then manuals for several programming languages including Lisp. If this makes natural intuitive sense to you, that indicates your mind is well-adapted towards programming.

If they don't make intuitive sense to you, I suggest you do something other than programming. You might be able to do programming to some degree with a struggle, but if you find it a struggle you won't be very good at it. What's the point of programming if it is a struggle instead of a fascination?

After that, you need to read the source code of real programs (or parts of them) and figure out what they do. Then start writing changes in them, to add features, or fix bugs if you can find out about specific bugs to fix. Ask some good programmers who are familiar with the code of those programs to read and critique your changes.

If you fix a bug in a free program that people are developing, the developers are likely to be glad to get fixes from you and will tell you the way to write them to make them good to install. Look at their TODO list for features you would like to implement. You will find it is a great satisfaction when the developers incorporate your changes.

Do this over and over and you will become good at developing software.

Please use your programming capability only for good, not for evil. Don't develop nonfree software, or service as a software substitute. Design systems not to collect personal information, and to allow anonymous use.

-- Dr. Richard M. Stallman
>>
>>71396852
see a doctor
>>
What kind of problems do smart programmers solve?
>>
>>71396772
first you need a use case
>>
What's the cheapest way to get wall clock time on windows?
>>
File: 153294829583.jpg (95 KB, 1280x720)
95 KB
95 KB JPG
>>71396899
i plan on reading that desu since i do am learning to program, but i was referring to machine language translation in my post. i'm in the third article on the subject only to understand a few concepts well enough to sum up this shit https://arxiv.org/pdf/1409.0473.pdf
why the fuck was my professor thinking when he passed this assignment down to us
>>
>>71396925
real world problems
>>
>>71395208
It's better than React Native, that's for sure.
>>
>>71396925
if you just want to practice you can use codeforces
>>
>>71396772
Bind (and the identity for bind, Some) are the monad part. "creating your own" monad is really kind of difficult, most of the time you just combining monad transformers or specialise existing things like Result. If you're comfortable seeing stuff and replacing it with bind or map when appropriate then that's pretty much the first big step. You could try writing a free monad. F# doesn't have HKTs but the basic idea is like this
type Free_F<'a> =
Pure of 'a
| Wrap of F<Free_F<'a>>

For some F (HKTs would be abstracting over the choice of F) which defines a bunch of commands, e.g.
type F<'a> = GetLine of (string -> 'a)
>>
>>71396938
what was he thinking*
>>
>>71396925
http://www.dgp.toronto.edu/projects/fast-winding-numbers/
Stuff like this.
I wish I was smart.
>>
>>71397044
latex gives me the goosebumps
>>
I think we're getting somewhere, but in this case "test" is of type Monad<Monad<Monad<Monad<Monad<int>>>>> which I doubt is correct. It gives the expected output of (3 * 2) ^ 5 though...

type Monad<'a> = 'a

let Return (x : 'a) : Monad<'a> =
x

let Double (x : 'a) : Monad<'a> =
x * 2

let Power y (x : 'a) : Monad<'a> =
pown x y

let Bind (idx : Monad<'a>) (f : 'a -> Monad<'b>) : Monad<'b> =
f idx

let (>>=) = Bind

[<EntryPoint>]
let main argv =
let test = 3 >>= Double >>= Power 5 >>= Return
printfn "%A" test
0
>>
File: 1514001288758.jpg (809 KB, 1920x1080)
809 KB
809 KB JPG
>>
>>71389415
Why is Haskell so easy?
Its like mathematical python.
>>
>>71397145
/g/ related thread on /w/ when
>>
>>71391998
It's most likely C's fault
>>
>>71389675
Concepts fixes this.
>>
>>71397223
Don't blame sepples on C.
>>
>>71397237
Wrong.
>>
>>71397252
Yes, it does.
>>
>>71397134
OK slow down. The fundamental thing you MUST know about monads is that Monad is a trait/interface, not a type. Haskell's terminology ("class") might be confusing on this point but it's really important.

After some googling, it seems that F# does not support the kind of type parameters on static methods you would need to implement a proper Monad trait, but its stewards are considering adding that: https://github.com/fsharp/fslang-suggestions/issues/243
>>
>>71397258
>could not do foo(bar)
vs
>bar does not satisfy Fooable
big fucking difference
>>
Why is python do easy?
It's like non retarded hasklel
>>
>>71397264
he's calling it monad because it's an example. the monad part is return + bind
>>
>>71397268
>>could not do foo(bar)
You forgot all the thousands of lines of context and nested templates.
Concepts always just gives you a short right-to-the-point error message without spamming stdout.
>>
>>71397305
Literally just don't look at them. The first line gives you the exact expression which failed. Who fucking cares about the rest?
>>
>>71397321
>>71397321
>>71397321
>>
>>71397268
Btw, error messages aren't even the main strength of concepts.
The real strength of concepts in my opinion is it makes it easier write efficient types (concepts allows you to conditionally delete constructors and have them trivial, can't do that with sfinae), and it gives you more powerful type traits.
>>
>>71397331
>constructors
Actually it was destructors I think. I'm not sure if constructors disabled with sfinae make them trivial or not.
>>
>>71397345
I think it's just the copy and move constructors.
What you're describing here can be accomplished with inheritance but it's so fucking ugly that you don't want to. Fortunately it's a corner case.
>>
>>71397371
>What you're describing here can be accomplished with inheritance
Yes I know, that's why I said easier.
>>
>>71397371
https://www.youtube.com/watch?v=J4A2B9eexiw
Somewhere past the middle this video goes into it.
It's a good video in general though so you should watch it all.
>>
>>71397410
>>71397384
We've had this same discussion before.
>>
should I learn design patterns?
>>
>>71397472
yes, if only so that it make it easier for you to understand the intent of code authors.

for example having a class called "singleton" will immediately tells you something about the class rather than having to skim through the entire code to understand.



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.