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

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 1.98 MB, 430x530, 1538580916967.gif [View same] [iqdb] [saucenao] [google] [report]
67993819 No.67993819 [Reply] [Original] [archived.moe] [rbt]

Old thread >>67984212

Wanna chat? Join #dailyprog on rizon
What are you working on?

>> No.67993914
File: 1.15 MB, 1920x1080, led_output.webm [View same] [iqdb] [saucenao] [google] [report]

Reposting snake CHIP-8 game on a led screen controlled by 4x4 keypad, sound played on a tiny buzzer

>> No.67993954

I'm the learning python guy from last thread.

Also curious, I like playing diablo 2 but I find the grind oddly tedious. Like I wish I had an auto button to play the mindless parts without me and take over for the fun bits.

How do I do that? would that be something I can do with python?

>> No.67993961

In assembly, are immediate values stored in a register temporarily?

>> No.67994032

I dunno about diablo, but runescape does pretty extensive botting.

Immediates stay in the instruction itself. The cpu might use a hidden register or something, but none of the accessible registers are modified. IIRC, MIPS has a read-only zero register.

>> No.67994053

It depends.
Small enough immediately are stored directly in the instruction. Larger immediates need to be constructed inside a register with two or three intermediary operations. Or just loaded from a literal pool, usually placed at the end of a function.

>> No.67994252

looks great desu
now make it two player

>> No.67994278

Note the shadow snake, that's player 2

>> No.67994294


>> No.67994357


>> No.67994399

>Wanna chat? Join #dailyprog on rizon



>> No.67994408

>t. discord employee on unpaid internship

>> No.67994421

What the fuck makes you think I'm shilling for discord?
I'm saying FUCK OFF with any and all chat shit including discord, IRC, or whatever the fuck.
Just fucking post in this thread for fucks sake. Or better, fuck off and kill yourselves instead so we don't have to deal with you fucks in our thread.

>> No.67994427

There has never been any sort of official "chatroom" or anything for these threads, no matter if it's gaymur shit like discord or even IRC.
Fuck off and stop posting extra stupid shit in the OP.

>> No.67994428

>contribute to the FOSS project meme

>> No.67994483

I agree with this guy.
any doings on the side kills these threads because ego's in chat.

>> No.67994486

>replying no normalfags
just stop you dweebs.

>> No.67994551

>Just ignore them and let them shit up the thread and OP
How about you fuck off and kill yourself alongside them

>> No.67994574

IRC and discordfags are the worst
>Split up the community, lower activity in thread on /g/
>Thread eventually dies out
>Now there is no new people coming in, since IRC and discord aren't as easy to find as a 4chan thread
>IRC and Discord eventually dies out too because there haven't been any new users in years

This literal aids needs to stop

>> No.67994641
File: 27 KB, 580x490, editor-latency-windows-text-vs-xml[1].png [View same] [iqdb] [saucenao] [google] [report]

text editor poll continues:

>> No.67994656

>all over the place
It's such a shame. I like atom on an interface level but everything else about it sucks.

>> No.67994660

Why the fuck is geany not on this list?
Fuck off and stop posting it. It's shit.

>> No.67994662

try VSCode, its better

>> No.67994670

show me how you actually use geany with some project that's not fizzbuzz and it will be in next poll

>> No.67994698
File: 132 KB, 1198x1005, 1514225248331.png [View same] [iqdb] [saucenao] [google] [report]

>He runs an ENTIRE chrome + v8 instance
>Of which inside of he runs an ENTIRE website
>Just to edit some text
Jesus fucking christ

>Step 1: open your files
>Step 2: navigate to where you want to edit
>Step 3: start editing
Pic related

>> No.67994714


>> No.67994733

>He runs an ENTIRE chrome + v8 instance
>Of which inside of he runs an ENTIRE website
>Just to edit some text

que in ed pasta

>> No.67994734

call me when Geany has extensions for every language, built-in github, a built-in shell, a built in debugger, extensive marcos, binds, emacs-like key combos with optional vim-input styles. And easy ricing and config via hot-loaded json values.

>> No.67994748

>leading underscores on nonstatic identifiers

>> No.67994758

geany is great for quick scripts and shit like that. Anything more in depth geany is useless for though. I love geany though

>> No.67994767
File: 34 KB, 560x560, 1536461729788.jpg [View same] [iqdb] [saucenao] [google] [report]

int main(string[] args) {
import gio.Application : GioApp = Application;
import gtkc.giotypes : GApplicationFlags;
import gtk.Application : Application;
import gtk.ApplicationWindow : ApplicationWindow;

auto app = new Application("org.gitlab.radagast.gtkdnote.textview",
app.addOnActivate(delegate void(GioApp _) {
auto aw = new ApplicationWindow(app);
scope (success)

aw.setTitlebar(() {
import gtk.HeaderBar : HeaderBar;

auto hb = new HeaderBar();
hb.setTitle("Entry Demo");

return hb;

aw.add(() {
import gtk.Box : Box;
import gtkc.gtktypes : GtkOrientation;

auto vbox = new Box(GtkOrientation.VERTICAL, 5);

import gtk.Entry : Entry;

auto entry = new Entry("Enter your name", 80);

vbox.packStart(entry, true, true, 0);

auto hbox = new Box(GtkOrientation.HORIZONTAL, 5);

import gtk.CheckButton : CheckButton;

auto checkEditable = new CheckButton("Editable");

IMPORTANT NOTE: The delegate below takes a ToggleButton
as its parameter. `gtk.CheckButton` inherits from
`gtk.ToggleButton` so passing a CheckButton is allowed.

import gtk.ToggleButton : ToggleButton;

checkEditable.addOnToggled(delegate void(ToggleButton _) {
static bool activate = false;
activate = !activate;

hbox.packStart(checkEditable, true, true, 0);

vbox.packStart(hbox, true, true, 0);
return vbox;
return app.run(args);

>> No.67994771

So I've been looking to get into 3D graphics in C++ with opengl/vulkan but I've been thinking whether I should do that or just learn how to 3D model?

>> No.67994806

>an api with delegates
I love D and all, but this seems incredibly shitty.

>> No.67994810

>que in ed pasta

>extensions for every language
You only need highlight support, and it has it for every relevant language.
>built-in github
Definitely cancer you don't need or want. But there's probably a plugin
>a built-in shell
Definitely cancer you don't need or want. And already has it.
>extensive marcos
Definitely cancer you don't need or want
>emacs-like key combos
Definitely definitely cancer you don't need or want. There's probably a plugin
>vim-input styles
There's a plugin.
>And easy ricing and config
It's definitely easy to config and rice. The dark theme your seeing in the text editor widget is my own theme.
>json values
Definitely cancer you don't need or want

Those a private methods. The reason the underscores are there is because there are already public methods with those names which wrap them.
_set is used in multiple locations which need access to the underlying cell which is why I factored that logic into a private method with such an ugly interface.

>> No.67994816

Forgot to quote >>67994734

>> No.67994818
File: 90 KB, 650x650, vomit.jpg [View same] [iqdb] [saucenao] [google] [report]

>glib trash

>> No.67994831
File: 47 KB, 743x635, 25591838.jpg [View same] [iqdb] [saucenao] [google] [report]

Abusing delegates is my choice to be honest. I think it keeps your function stack clean. You can easily use free functions instead. But Gtk event handling (like that of Java Swing) is heavily dependent on function pointers or delegates.

>> No.67994908

When I log into my Xenix system with my 110 baud teletype, both vi and Emacs are just too damn slow. They print useless messages like, ‘C-h for help’ and ‘“foo” File is read only’. So I use the editor that doesn't waste my VALUABLE time.

Ed, man! !man ed

ED(1) Unix Programmer's Manual ED(1)

ed - text editor

ed [ - ] [ -x ] [ name ]
Ed is the standard text editor.


Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!

“Ed is the standard text editor.”

And ed doesn't waste space on my Timex Sinclair. Just look:

-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed
-rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi
-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

Of course, on the system I administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!

“Ed is the standard text editor.”

Let's look at a typical novice's session with the mighty ed:

golem$ ed

eat flaming death


Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.

>> No.67994913

“Ed is the standard text editor.”

Ed, the greatest WYGIWYG editor of all.


When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a “viitor”. Not a “emacsitor”. Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!


When IBM, in its ever-present omnipotence, needed to base their “edlin” on a Unix standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.

Ed is for those who can remember what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED “VISUAL” EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!

>> No.67994921

Fuck off

>> No.67994923

>bunch of useful features to be productive out of the box
>cancer you don't need or want

>> No.67994929

What useful features?

>> No.67994934
File: 196 KB, 640x434, Selection_357.png [View same] [iqdb] [saucenao] [google] [report]

>phone interview
>haven't talked to a human being in 2 weeks

>> No.67994943

What possible use does contracts have when it's not even zero cost?
Why would the committee add this?

>> No.67994956

Contracts are just asserts with different syntax. The cost is the same either way - you turn them on while you debug and turn them off when you don't.

>> No.67994967

>Contracts are just asserts with different syntax.

>> No.67994974

Prove they aren't.

>> No.67994980

contracts are either executed before entering or after exiting a procedure. they are not part of the definition but of the declaration.

>> No.67994982

In C++20, that's what they are.
If a given predicate is not satisfied, the program raises an error - and whether this predicate is checked depends on a compile time flag. That's what an assert is.

>> No.67994987

See? asserts.
Just with different syntax and restrictions

>> No.67995004

You mean they're a part of function types?
std::is_same_v<int(), int() [[ensures x: x > 0]]> == false?

>> No.67995018

IRC is quite dead. Would agree

>> No.67995030

Don't think so, otherwise it would be ambiguous which to call.
It's probably just the same situation as with noexcept before C++17. Not actually part of the type.

>> No.67995051

i mean that a contract shall not be part of the implementation.

int (*sort)(array *foo)
pre { foo != null }
post { isSorted(foo) == true };

>> No.67995060
File: 106 KB, 540x172, nice_dick.png [View same] [iqdb] [saucenao] [google] [report]

That's not how shadows work

>> No.67995066

You can put an [[assert]] in the implementation though

>> No.67995076

It's an approximation of global illumination.
It just has hard edges instead of soft edges.
The real question here is, what the fuck is Akari doing?

>> No.67995080

sort is a pointer, fuck tard. Contracts takes all their power when the implementation is unknown. UNKNOWN.

>> No.67995086

Wait, is what you posted valid C++20 syntax?
What does it do?

>> No.67995096

i am talking about the concept of programming with contracts in general. i don't know about c++ and i don't want to know.

>> No.67995102

Then stop talking about things you don't know about.

>> No.67995119

C++20 contracts don't use that syntax but roughly have those semantics.

Cppreference describes how they work nicely.

>> No.67995143

But can you use contracts with function pointers? That's what I wanted to know.

>> No.67995153

Doesn't look like it.

>> No.67995155


precondition: A precondition is checked by evaluating its predicate immediately before starting evaluation of the function body
postcondition: A postcondition is checked by evaluating its predicate immediately before returning control to the caller of the function
assertion: a condition that should be satisfied where it appears in a function body.

see, even without knowing c++, i was right. this is why it is important to learn programming techniques and concepts by reading PLT literature instead of how a specific programming language implement them.

>> No.67995175

>i was right
No you weren't. You can't use it with UNKNOWN implementations like you said.

>> No.67995180

Contracts are visible at the declaration site of a function.

>> No.67995185

Yeah and?
You can't use it with function pointers.

>> No.67995189

they are not dynamic but this is a limitation of C++. you can still do

... foo(...) ...;

and let someone else implement f

>> No.67995226
File: 1.85 MB, 600x542, 1538268566859.gif [View same] [iqdb] [saucenao] [google] [report]

I'm getting really good at cooking curry

>> No.67995237
File: 179 KB, 1024x946, 1520726725497.png [View same] [iqdb] [saucenao] [google] [report]

Post curry

>> No.67995279
File: 275 KB, 1400x919, RFO-1400x919-DavidsCurry-03186c71-75ff-4976-bf1f-24ca8c9aa06c-0-1400x919.jpg [View same] [iqdb] [saucenao] [google] [report]

Too bad I ate them all

>> No.67995280
File: 142 KB, 512x512, racketlog.png [View same] [iqdb] [saucenao] [google] [report]

(define (currying proc arg) (lambda args (apply proc arg args)))

((currying (currying + 3) 7) 8)

=> 18

>> No.67995283


>> No.67995295
File: 59 KB, 938x720, 26000865.jpg [View same] [iqdb] [saucenao] [google] [report]

Not the autistic kind

>> No.67995307
File: 84 KB, 721x720, 1467672038292.jpg [View same] [iqdb] [saucenao] [google] [report]

based and redpilled post

>> No.67995311
File: 17 KB, 340x282, church_alonzo.jpg [View same] [iqdb] [saucenao] [google] [report]

yeah, sure. do the same in C.

>> No.67995324

Turing machines > lambda calculus

>> No.67995332


>> No.67995336
File: 52 KB, 678x800, turing.jpg [View same] [iqdb] [saucenao] [google] [report]

no one cared about the Turing machine, his paper remained unnoticed for a long time.

>> No.67995337


>> No.67995339

turing was a fag
lambda calculus on the other hand was divinely inspired

>> No.67995352


>> No.67995380

Fuck off wrong thread.

>> No.67995388

he's asking for a programme

>> No.67995392

Until it got noticed and became huge.
Face it, turing machines are just better and lend themselves well to being implemented as CPUs.
Lambda calculus is USELESS.

>> No.67995400


>> No.67995402

Fuck off still wrong thread.

>> No.67995407

>Lambda calculus fags have to run their useless shit in a turing machine for it to even work

>> No.67995408

>Until it got noticed and became huge.
no. when it got noticed, computers were already a thing for years.

>> No.67995409
File: 58 KB, 514x524, 1536781672997.jpg [View same] [iqdb] [saucenao] [google] [report]

/dpt/ is a friendly helpful thread for friendly helpful programmers

>> No.67995417

No. /dpt/ is for discussing PROGRAMMING.
/dpt/ is NOT for homework, program requests, or ANYTHING ELSE other than PROGRAMMING.
This isn't your safe space. Fuck off.

>> No.67995423


>> No.67995434
File: 929 KB, 873x1079, 1533851981396.png [View same] [iqdb] [saucenao] [google] [report]

/dpt/ is friendly !!! /dpt/ loves newfriends !!!

>> No.67995436

same for every programming languages or mathematics but it's of no importance because of abstraction.

>> No.67995439

>Restricting the thread to what it was meant to be is gatekeeping
Yeah, lets just all discuss irrelevant things which have nothing to do with programming in the programming thread.
How about fuck off and kill yourself instead. I come here to see programming discussion, because after all, IT'S FUCKING CALLED THE DAILY PROGRAMMING THREAD.





>> No.67995444

yeah it's the [daily programming] thread and that guy wants a daily program for his medicine so fuck off. punk.

>> No.67995448

>turingfags have to run their turing programs on von neumann architectures
>imperitards' impure mutable code is simply an abstraction on top of purely logical register operations

>> No.67995450

>He has to rely on abstractions (turing machines) to run his useless lambda calculus
>He can't even implement a universal lambda calculus machine in hardware

>> No.67995457

Singles agree

>> No.67995458

>daily programming thread = daily programming requests thread
No, it's for discussing programming. NOT making requests.
Take that shit to /r/. Now fuck off.

>> No.67995471

>>turingfags have to run their turing programs on von neumann architectures
>hur dur what's a universal turing machine

>> No.67995490

a universal turing machine is a machine that runs the untyped lambda calculus

>> No.67995491

>a built-in shell
VSCode's shell is laggy as hell on my machine though

>> No.67995499

the funny thing is that a cpu's components are actually designed as big expressions that feedback themselves each cycle.

>> No.67995508

Basically just monads

>> No.67995518

No, it's a turing machine that can run any other turing machine with input as it's input. Said turing machine could implement a lambda calculus evaluator.
Lambda calculus fags have to have a turing machine to run their useless shit.


>> No.67995534

You mean Eckert-Mauchly architecture.

>> No.67995538

you're so stupid that it's hilarious

>> No.67995550

>I have no argument

>> No.67995554

He gave you an argument, then you dismissed it with one word.

>> No.67995563

ah i see you're part of that cult
well i'll be sure to dislike your youtube videos on
how feminists aren't practicing REAL scepticism

>> No.67995571

Implement a lambda calculus evaluator in hardware without using turing machines
>hur dur but the hardware is defined in a HDL as expressions feeding back into themselves each cycle
This means absolutely nothing. You have literally no argument.

>> No.67995582

>lambda calculus fags this delusion
I don't even know what the fuck you're talking about

>> No.67995597

Clash allows you to use Haskell as a HDL.

>> No.67995606


>> No.67995608

>I have no argument

>> No.67995615

Of course I have no argument to no argument

>> No.67995617

you can translate your lambda calculus expression into circuitry.

>> No.67995624

>Of course I have no argument
I knew it

>> No.67995629

Do you even know what the argument is about?

>> No.67995635

* to no argument

>> No.67995640
File: 945 KB, 700x2000, 1513552107500.png [View same] [iqdb] [saucenao] [google] [report]


>> No.67995648

do you have any arguments?

>> No.67995673

please analyze what you said since the beginning

> "has to rely on abstractions (turing machines) to run his useless lambda calculus"

but your "turing machine" (it's not) is implemented on a circuitry that can be expressed as a lambda expression

> "Irrelevant"

then, if it's irrelevant, how expressing lambda caclulus as turing's alphabet is?

>> No.67995678

It demonstrates that your circuits are isomorphic to an HM lambda calculus and the morphism is much more trivial than it is for a turing machine because if that were the case there would be popular imperative HDLs.

>> No.67995680

So much programming going on right now there's none in the thread. Proud of you /dpt/.

>> No.67995690

Implement a lambda calculus evaluator in hardware.
Even if someone finds out how to, it is far easier to implement a universal turing machine in hardware.
Lambda calculus fags have to rely on a turing machine to be able to run their arbitrary lambda calculus expressions.

>> No.67995696

I want to make a program with a nice GUI but I also want to use C. Which is the least obnoxious?

>> No.67995763

Learn Qt.

>> No.67995767

What kind of gui? Normal window based gui or do you need something that's more like a 3D editor?
Does it need to be cross platform?
Do you favor programmatic gui or external formats for defining the gui that is then loaded and constructed by the C api?

>> No.67995777
File: 270 KB, 645x645, 01_11_Africa_Hitech.jpg [View same] [iqdb] [saucenao] [google] [report]

After long time I decided to "program" my own website again so I downloaded Atom and wow coding is fun actually. Fuck Notepad++

>> No.67995787

Needs to display images basically. Zoom scroll, some sidebars for library and navigation. It's a manga reader for my personal use. I'd like to try and have it be crossplatform but I'd be the only one using it and I'm on windows. I have never created a GUI before so I have no idea what my preferences are.

>> No.67995820

Qt is C++ only but you could have a binding layer.
GTK+ seems like the only major option left.

>> No.67995826

Gtk if you want to do something serious with C.

>> No.67995845


>> No.67995850

Gtk. But with D.
Trust me, D takes away an immeasurable pain involving C + GUI. I'm in the middle of writing a learning GtkD by examples too

>> No.67995936

Qt bindings are available for every language kown to man.

>> No.67995971
File: 321 KB, 1280x720, 1519431029527.jpg [View same] [iqdb] [saucenao] [google] [report]

>LLVM compiler dev forks ur repo
>Without even talking to you
>Without even starring ur repo
I feel violated

>> No.67995987

Post your profile NOW.

>> No.67996008

you just posted this because you want more people to fork your repo you slut

>> No.67996066

*Disgusting attention whoring anime pedo scum

>> No.67996074

I think it's time for me to rewrite my termsearch so people don't make fun of me

>> No.67996078

Anime website

>> No.67996127
File: 70 KB, 569x664, 1532616660361.png [View same] [iqdb] [saucenao] [google] [report]

>tfw I run an OS just to edit some text

>> No.67996128
File: 57 KB, 474x408, vim.jpg [View same] [iqdb] [saucenao] [google] [report]

wanna move my lazy ass from beta based editors, what plugins should I include as a full web dev, mainly work with php

>> No.67996143

>plugins should I include as a full web dev, mainly work with php

>> No.67996166

those rules don't apply if you post anime.

>> No.67996183

No, they do apply.
Anime IS programming.

>> No.67996315

In x86 assembly, can we use two registers in one operand?

E.g. add (Register Register), (Register)


>> No.67996390
File: 45 KB, 666x1000, programming onesie.jpg [View same] [iqdb] [saucenao] [google] [report]

What about programming onesies as an alternative to programming socks?

>> No.67996541

What an inaccurate assessment of everything

>> No.67996554
File: 56 KB, 576x1024, 1534772486494.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.67996617


>> No.67996627

you wont, warden gonna smack yo ass

>> No.67996822

How to reinstall mysql when you accidentally removed the users table? Whatever piece of shit made this garbage decided that it HAS to log into mysql to remove itself which it cannot do because of the missing users table.
I guess this is why docker exists.

>> No.67996836

It's good.

>> No.67996897

Post the repo so we can laugh at you for hiding all the facts

>> No.67996909

What the fuck would that even do? Closest you can have are fused instructions such as SIMD FMA and things like that

>> No.67996935

leaq (%rax, %rdi), %r8

>> No.67997028

>tfw bored and feeling worthless ever since my last project ended
>tfw haven't been able to find anything new to make

>> No.67997045

>last project ended
Must've been fizzbuzz, because real projects don't end.

>> No.67997112

Fucking this.

>> No.67997118

void no();

>> No.67997156
File: 1.57 MB, 2271x2324, IMG_20180708_155635~01.jpg [View same] [iqdb] [saucenao] [google] [report]

>Must've been fizzbuzz, because real projects don't end.
I agree, it hasn't "ended", poor wording on my side
I was making a framework (hardware + firmware) for a smart user sided IoT device as project for school.
I made the report and developed it well enough to present, and now i can't find any motivation to work on it, even though i started it with a lot of enthusiasm and worked hard on it

>> No.67997157

>structures containing structures of arrays of structures

>> No.67997173

>arrays of structures
struct something arr[20];
Wow! Such ddd! much performance

>> No.67997179

>building Unreal Engine 4 on Linux
>it doesn't crash
C++ haters btfo!

>> No.67997208

I have to emulate a graphics device, write a driver for it on Linux and make some software that interacts with it through the driver for a project and I have no idea where to start.
Any suggestions on bibliography?

>> No.67997253

Is your driver already written? If by graphics device you mean screen, then isn't it basically merely creating something that consumes DVI/VGA/HDMI etc inputs?

>> No.67997265

>driver already written
By this I mean to ask whether there already is a driver for your (actual, not emulated) device.

>> No.67997275
File: 110 KB, 1280x720, 1483073157801.jpg [View same] [iqdb] [saucenao] [google] [report]

Employed Haskell programmer reporting in :)

>> No.67997298

@67997275 kill yourself

>> No.67997307
File: 342 KB, 714x738, 1421164417027.png [View same] [iqdb] [saucenao] [google] [report]


>> No.67997309

daily reminder

>> No.67997314

Just run:
head -c 5000 /dev/urandom > driver.c
a few times.

Eventually it will produce a working graphics driver.

>> No.67997317

this >>67997298

>> No.67997321

The "device" is a program that can manipulate images, do transformations, change colors, etc.
I have to write the device, write a driver and some software that can interact with it.
I guess what I need to look for is web sites and books about writing drivers.
I've read some websites about it, but I was wondering if there was a recommended book about the subject, as my teachers left this assignment open ended and didn't gave us pointers.

>> No.67997362

I'll have the happy meal.

>> No.67997382
File: 322 KB, 526x541, tsukino.png [View same] [iqdb] [saucenao] [google] [report]

there was an electron app for database management
it looked like vs code
does anybody remember how was it called?

>> No.67997442

nvm, found it

>> No.67997606

She's cute

>> No.67997801

too bad rei has manvoice to the extreme

>> No.67997923

hello friends, any suggestions on a project i can spend a few months developing?

>> No.67997975

If it's only pet projects and you do it for learning
>Simple VM with its bytecode compiler
>Raytracer with physically-based rendering support (don't try to make it work real-time)
>PDE solver
These are the three projects that taught me the most about general computing. I am a math major though.

>> No.67997982

And why it would be bad? That how Smalltalk does it too; providing a full featured programming environment with an integrated gui, debugger, editor, interpreter, source control, ... all that put together for an ultimate speed combo to enhance your coding flow tremendously.

>> No.67997985

Guys I'm fucking sick of my wagecuck job and want to set myself on a path of being a freelance webdev who can make a modest living working freelance in Asia whilst fucking qt Asian sloots.
I have 6 months of expenses saved up and the power of autistic focus.
If I quit my wagecuck job and self teach for 10 hours a day, could I build a project portfolio that would see me employable inside of that time?

>> No.67997991

your dick?

>> No.67997997


>> No.67998008


I started working on a white space C transpiler in Haskell. I am going to put it on hold since things have come up in my life, but maybe I could find time for it if I had a collaborator. Want to work on it with me?

Heres what I imagine white space C looks like

include stdio.h

int main = ->

printf "Hello, World! \n"

return 0

int max = int num1 int num2 ->

int result

if num1 > num2
result = num1

result = num2

return result

>> No.67998042

Based and redpilled. Too bad that's only syntax however.

>> No.67998059

Daily reminder that __auto_type, statement expressions and local functions make gnuc acceptable lisp.

>> No.67998081

I feel like an useless code-monkey, whose job could've been done by any brainlet with a little bit of learning. Sure my code gets more clean and abstract as time goes by and I discover new fancy patterns, but in the end it does the same job, it's still just a simple CRUD shit.

>> No.67998111
File: 249 KB, 390x379, sure anon.png [View same] [iqdb] [saucenao] [google] [report]

>list not the primary data structure
>not homoiconic
>no macro
>no lambda expression
>no eval
>no apply
>no garbage collection
>no implicit bignum
>no dynamic typing

>> No.67998121

>dynamic typing
eww, gross anon!

>> No.67998143

>local functions
Dude just make your stack executable lmao

>> No.67998168

dude ghc(most used haskell compiler) makes stack executable for all your programs.

>> No.67998188

No kidding? Where is this documented?

>> No.67998220

does ghc even use a stack? last time i did check, it were using per procedure frame

>> No.67998313

I have a couple hundred thousand images in a dataset and I'm going to make several indexes on them based on their properties: Dimensions (W,H), aspect ratio (as a unit vector), maybe some others like color histogram similarity.
For each image, I want to retrieve either the k-nearest neighbors, or the distinct cluster consisting of all of its neighbors.

What datastructure(s) and algorithms should I be using for this?

>> No.67998329
File: 1.43 MB, 360x238, 1530580387584.gif [View same] [iqdb] [saucenao] [google] [report]

Objects: comonad, deterministic if unique, non-deterministic if shared
Futures: monad, deterministic w/o choice, non-deterministic w/ choice
In both cases, non-determinism corresponds to taking derivatives.
Where's the secret sauce that binds them together, I wonder...

>> No.67998435

My dick has no ears.
I'd fuck him until I die of exhaustion.

>And why it would be bad?
Why would you imply that?

>> No.67998609
File: 94 KB, 621x646, 1465434635478.jpg [View same] [iqdb] [saucenao] [google] [report]

In C, is there a function on the standard library to calculate a percentage?

>> No.67998615


>> No.67998650

Lads, I got shortlisted for a company and I have to take a programming aptitude test. Is there any practice I can do for it beforehand?

>> No.67998661


>> No.67998691

You mean multiplying by a hundred or?

>> No.67998696
File: 1.67 MB, 1696x2467, 1523260859123.png [View same] [iqdb] [saucenao] [google] [report]

>practice wearing programming socks and engineering panties
>watch anime
>learn haskell

>> No.67998719

Writing a chat server. It's loosely modeled after IRC, except the client and server programs are both on the server machine, and you access them through SSH. I've posted my work so far on Pastebin.
https://pastebin.com/pP8bCAR4 (description)
https://pastebin.com/1ZMhS3fn (source for client program)
https://pastebin.com/Y5tmNpgw (source for server program)
https://pastebin.com/K7AT0W6H (header for both files)

>> No.67998740


>> No.67998752

You know. You've just given me an idea. I was going to buy one of those lattice iCEstick FPGA eval boards just to play around with.
I might try to implement CHIP-8 on it.
Maybe I can even do some video output of some sort, the only problem would be memory because those boards only come with flash for storing the data for configuring the FPGA. I hope what memory I can embed in the FPGA will be enough.

>> No.67998757

>I've posted my work so far on Pastebin.
Why don't you just make a git repo?

>> No.67998829

Oh, never mind. The FPGA itself comes with some:
Up to 128 Kbits sysMEM™ Embedded Block RAM
Well that will be a fun project once I get my head wrapped round verilog.

>> No.67998894

Newbie here, how do I do the following in C++:
We are evaluating conditions and then given the condition, we choose the output, but only the sign must remain. Let's say we have a = 15 and if it's below 16 we print $, but if it's over 25 we print !.
I did the following, but don't know how to avoid printing the variable also, because it does 15$, instead of just $.

int a;
a = 15;

cout << "\nLet's print only sign: ";
if (a < 16) cout << "#";
if (a > 25) cout << "?";
else cout << a;

I was thinking, if I could do with logical operatos something like below, but just can't get it into right structure I guess, or is it lack of operators in C++:

if (a < 12) cout << "#" || if (a > 35) cout << "?";
else cout << a;

>> No.67998955
File: 134 KB, 720x960, 1539187051662.jpg [View same] [iqdb] [saucenao] [google] [report]

C brainlet here. How can I emulate gdb in C? I need to read output from a process, and then send input via stdin based on the output.

>> No.67998970

i have a dumdum question about cpp, can i forward declare a struct and/or enum class? if so how? like can i put type definition in a.cpp and want to use it in b.cpp so i put a forward declaration into ab.h and include it to b.cpp?

>> No.67998989


>> No.67999004

Yes. Just skip the curlies and out a semicolon there.

But if you forward declare a struct, you only have access to pointers to that struct. You can't access any of its members, including member functions.

>> No.67999026

I need to read and write from and to the process. I'm trying to circumvent ASLR.

>> No.67999039

>emulate gdb
Anyway, aside from this bizarre choice of example, there is no way to do this with standard C.
With POSIX you get dup2 (or just dup), fork, pipe and an execve function which are the four functions you need for this.
Create two pipes, fork, dup2 on the child side to replace stdin and stdout with the right ends of the pipe (close the other ends) then execve your program. Close the opposite ends on the parent side and then communicate over the pipes.

>> No.67999040

nah lel it's not, it's an artifact from something

go for it dude, post progress here too, always cool to see someone delve outside of the software part of things, in a project that's software at the core

>> No.67999135

OCaml or Haskell?

>> No.67999152

>website i use often doesn't a feature that i like
>thinking about making an extension to add the feature
>go to the source code
>see this

/* Copyright (c) 2006-2018 xx s.r.o.
* You are not allowed to copy or redistribute this file.

>> No.67999155


>> No.67999211

I don't think i get it, does that mean i could initialize a struct in aforementioned b.cpp but not access it's members? Also does that mean i should just put whole definitions into headers?

>> No.67999240


>> No.67999294

does anyone here know prolog?

>> No.67999317


>> No.67999340

wanna make some $?

>> No.67999341

What's the maximum number of passes it would take to sort an array of x length? I thought it would be x - 1, but that doesn't seem to be the case.
For instance, z, x, y to x, z, y counts as one pass, then the next pass would be x, z, y to x, y, z so at most, it would only take 2 passes to sort an array of length 3.

I'm too dumb for this shit.

>> No.67999345

>he didn't got the joke

>> No.67999356


>> No.67999425

friendly reminder that C will be expunged one app a time.


>> No.67999572

Any day now. As soon as someone rewrites Linux in JavaScript.

>> No.67999586

so cz, sk, pl? do they even care about copyright laws?

>> No.67999613

I've heard that keeping a coding journal helps with improving programming skills.
Has anyone tried this with projects/have examples so I have an idea what to write?
I don't really know where to start.

>> No.67999635


>> No.67999663

I need to take images from urls, arrange them in a grid as a single new image, and return the image. What language will give me the best performance on this? I did it in python (using pil and requests) and it's taking about five and a half seconds and I'd like it to be a bit faster

>> No.67999741

thanks btw breh

Never heard of that, but wouldn't hurt to try. It'll at least have something tangible that you could then piece together or extend to put on your portfolio. Or even mistakes to learn from

I think there's a PIL-related binding in C, though I think PIL itself is written in C already

>> No.67999881
File: 1.53 MB, 270x152, finally.gif [View same] [iqdb] [saucenao] [google] [report]

This is what I'm working on right now... trying to get into augmented reality. For now it is just faggy cube in simple opengl, but I plan on using shaders and glm from now on.

>> No.67999896

lambda calculus is literally equivalent so if it's useless it's only as useless as a turing machine

>> No.67999909

Pretty neat

>> No.67999977

That's awesome. How does it work? OpenGL is my shit.

>> No.68000008
File: 83 KB, 565x841, Untitled.png [View same] [iqdb] [saucenao] [google] [report]

why are you allowed to declare variables like this in python?

>> No.68000039

after some testing, turns out the bottleneck is grabbing the images from urls, not the pasting of them into another image. thanks though!
gonna try grabbing them all at once instead of one after the other (so instead of n times waiting we just wait once) but I'm a little concerned about memory... maybe in batches? we'll see

>> No.68000040

because its convenient

>> No.68000044

still pretty damn coool tbhh

>> No.68000062

python is the new perl

>> No.68000074

Is this only valid for specific methods? I tried using this for integer's and it gave me a value error.

>> No.68000103

Ignore this post >>68000000

>> No.68000104

it matches variables from left to values on the right, it's pretty convenient, I include it in my own language

.split() in that instance returns a list of 2 items (or at least it should if it doesn't want to error)

so a, b = 1, 2 <-- a = 1 b = 2 this works
a, b = 1, 2, 3 <-- doesn't work
a, b, c = 1, 2 <-- doesn't work

you can't use .split() on an integer

>> No.68000105

>tfw you can't find the will to start your side project because you spend all day programming at work anyway
Being old sucks.

>> No.68000177

>tfw don't know this feel because I'm so lonely, even at work, that side project is my escape
feels great being young

>> No.68000204

derp, thanks.

>> No.68000321

Because one way to shoot yourself in the foot is not enough.

>> No.68000368
File: 19 KB, 546x211, 2018-10-10_10-10.png [View same] [iqdb] [saucenao] [google] [report]

what does this do?

>> No.68000383


>> No.68000385

probably sum gay shit judging by that language

>> No.68000386

It means that map has 4 arguments:
two types T and R
two values list and f

>> No.68000392

it says this method works for any choice of types T and R

>> No.68000431
File: 36 KB, 300x360, 1510453988324.jpg [View same] [iqdb] [saucenao] [google] [report]

Can someone please explain delegates in C# before I blow my fucking brains out?

>> No.68000442

how is structured binding
auto [key, name] = line.split();
not more convenient?

>> No.68000452

You can store a method inside a variable.
Not the result of calling the method, but the method itself.
The type of a method-as-variable is a delegate.
You can call the method as many times as you like from the variable.
You can also create anonymous methods to assign directly to the variable without having to give it a name.

>> No.68000466

structured binding declarations are gay and bad

>> No.68000473

the concept is convenient, being able to multi-assign in the same line

>> No.68000485

So a delegate is a variable that is assigned a method?
If so, can a delegate be a property of an object? Essentially making a method a property of the object?

>> No.68000488
File: 1.92 MB, 398x400, 1537650807758.gif [View same] [iqdb] [saucenao] [google] [report]

I'm writing a file tagging application.

The way I have designed it at the moment, I have an SQL lite db with various tables, then my dao layer builds out "file" objects that are passed up to a GUI layer where a user can modify the object instance by adding tags changing other details etc. I then want to pass that object back down into the application and save it back into the db.

My difficult is, I want to make the modification of the objects transactional, so you add all your new tags and other modifications hit save and the changes are committed to the db, those changes can be additions and removals at the same time

e.g. you add an image tag and remove a document tag or something and all these tags are stored as tag objects and inserted into a reference table in the db e.g. filetag where each entry is just a composite of the file id and tag id.

Now the problem, how do I update that table efficiently the only way I can think of doing it is literally to run a query get all the file tags for that object and compare them to the newly update list to see what's been added / removed etc. then run insert and delete queries as necessary but this would be total shit for performance i.e. saving shouldn't involve asking the db what you already have. I can think of other ways to do it that involve adding flags to indicate current saved status of tags on objects, but is there a better way that doesn't involve changing the objects?

>> No.68000512

how come C# gives fancy names to that?

>> No.68000517

Sure, but it won't read the properties from the object you assign it to. The variables accessed with the this keyword will be the variables of the object the method was copied from.

>> No.68000535

No idea. The only other language I know of which calls them delegates is D. Everywhere else they're just closures/lambdas/functions.

>> No.68000557
File: 18 KB, 637x588, 1538593989449.png [View same] [iqdb] [saucenao] [google] [report]

>starring your own repo

>> No.68000577

you've heard wrong

>> No.68000605

Give me one reason why I shouldn't if I unironically believe it is quality work?

>> No.68000611


>> No.68000641

I'd like to work in Javascript/React with data analysis. How do I go about learning that?

>> No.68000710

>Javascript/React with data analysis

>> No.68000720

is javscript / react hard?

>> No.68000757

I think he means he wants to work using those techs, and that his focus is data analysis, rather than learning the tech FOR data analysis

The hardest part of react is how you manage state, eg redux is pretty hard, but I think people are finding workarounds to having to use that. Other than that, it's not too hard. JS is not hard, as long as you can think functionally, as most visualization libraries will require that, which is I'm guessing the main reason you want to use something like JS

>> No.68000764

no, but the js ecosystem is cancer

>> No.68000771


>> No.68000782

>js ecosystem is cancer
How many man days would it take to learn?

>> No.68000791

install Elm instead.

>> No.68000805

>How many man days would it take to learn?
Exactly π^2 days

>> No.68000806

Commie Steve at it again

>> No.68000812

dependency upon dependency upon dependency. and then this happens: https://www.davidhaney.io/npm-left-pad-have-we-forgotten-how-to-program/

>> No.68000832

>How many man days would it take to learn?
Depends on your experience with other programming languages. If you've done stuff in C/C++, you're 1/3 of the way there, if you've done basic functional programming, you're another 1/3 of the way there. The last 1/3 is wrapping your head around the JS libraries you use

I'd say it's 1 month max per 1/3

>> No.68001077

t. fag
(define (curry function . args)
(lambda rest (apply function (append args rest))))

>> No.68001090

How many commits/day are you guys at?
12.7 reporting in.

>> No.68001174


>> No.68001233

i don't get it, why doing append when apply does it for you?

>> No.68001240


>> No.68001256

apply doesn't do append, at least not in that fashion.
(apply f x y z) is equivalent to apply f (append (list x y) z)) not (apply (append x y z)

>> No.68001333

>tfw lisp is dead

>> No.68001364
File: 152 KB, 362x480, 1523532994465.gif [View same] [iqdb] [saucenao] [google] [report]

>tfw D is undead

>> No.68001390

then why a lazy append?

>> No.68001411

You could always install Shen.

>> No.68001434

I ain't never heard of D.

>> No.68001462

I'll stick with my parentheses, thanks.

>> No.68001478

i don't think you've seen shen code, anon.

>> No.68001484

doesn't look dead to me

>> No.68001531

it's an urban legend, nothing to worry about.

>> No.68001534

watch this
*unzips D*

>> No.68001579

Why is AWS Cognito so ass backwards? Just give me a URL to redirect the user to, then redirect back to my website with the JWT when he's logged in. Like any normal identity provider does it. What the fuck. I guess this i the price of "free".

>> No.68001593

No jobs in it though.

>> No.68001619
File: 39 KB, 770x521, 1523192951276.jpg [View same] [iqdb] [saucenao] [google] [report]

I've been getting into the Ray Tracing in One Weekend book and I have this code that produces a ppm file.

How do I produce a jpg image instead ? So I can open it everywhere.

>> No.68001623

It's lispy haskell.

>> No.68001649

>2018 and doesn't use ppm solely
some serious memeage going on

>> No.68001650

Why do you so much love hipster languages yet you don't have anything worth showing?

>> No.68001663

By using a library that can interact with jpegs

>> No.68001664

what are currently working on anon?

>> No.68001672
File: 92 KB, 1280x720, 1441684460338.jpg [View same] [iqdb] [saucenao] [google] [report]

>file << ir << " " << ig << " " << ib << "\n";
People actually take this garbage-lang seriously?

>> No.68001702

What's the problem?

>> No.68001708
File: 80 KB, 250x244, 8d4.png [View same] [iqdb] [saucenao] [google] [report]

ir + " " + ig + " " + ib + " "
So much better

>> No.68001710

Are you serious?

>> No.68001711



>> No.68001723

It's called a format string, you retarded frogposter.

>> No.68001755
File: 56 KB, 645x729, d27.png [View same] [iqdb] [saucenao] [google] [report]

>It's called a format string, you retarded frogposter.

>> No.68001777

there is jobs. recently, i had an offer to move to south korea (seoul) to develop an AI in common lisp.

>> No.68002008

S2 never

>> No.68002513

you have to use elsif
an else only counts for the if directly preceding it
also use {}

>> No.68002535

also your second answer doesn't work because it is ill-formed

>> No.68002805

dumb frogposter

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