arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://archive.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1519258436180.png (42.15 KB, 781x464, csharp.png)

 No.981[Reply]

Learning C# at the moment. Can't say I hate it too much,,,
short x = 2;
short y = 2;
// short z = x + y;         -- won't compile
short z = (short) x + y // correct

This makes me laugh though. While x and y are both shorts, the result of their addition at runtime will implicitly be given the type int, and so requires an explicit cast to be assigned to another short. I understand nobody really needs to be working with shorts in C#, and if memory efficiency at that level is something you're worried about, then the bloat from the C# runtime will eat up way more memory that you'll be "saving" by using shorts instead of a 32bit or 64bit number. Still though, this makes me chuckle.

Can't say I dislike the language itself so far honestly; though I prefer a lower level language. While easy to learn and work with, it's no fun at all. The biggest drawback for me being that it's primarily a language used on windows. Who the fuck wants to use, develop for, or (god forbid) develop on windows?

Anyone else have thoughts / opinions / horror stories or just quirky anecdotes relating to C#?
12 posts omitted. Click reply to view.

 No.1092

>>1091
note that he said
> (I doubt that's actually why;

 No.1093

>>1092
>>1091
You don't have to guess, the Common Language Infrastructure standard clearly says at $I.12.1 that it's because the stack can only hold
int32
,
int64
and
native int
sizes:
The CLI model uses an evaluation stack. Instructions that copy values from memory to the evaluation stack are “loads”; instructions that copy values from the stack back to memory are “stores”. The full set of data types in Table I.6: Data Types Directly Supported by the CLI can be represented in memory. However, the CLI supports only a subset of these types in its operations upon values stored on its evaluation stack — int32, int64, and native int. In addition, the CLI supports an internal data type to represent floating-point values on the internal evaluation stack. The size of the internal data type is implementation-dependent. For further information on the treatment of floating-point values on the evaluation stack, see §I.12.1.3 and Partition III. Short numeric values (int8, int16, unsigned int8, and unsigned int16) are widened when loaded and narrowed when stored. This reflects a computer model that assumes, for numeric and object references, memory cells are 1, 2, 4, or 8 bytes wide, but stack locations are either 4 or 8 bytes wide. User-defined value types can appear in memory locations or on the stack and have no size limitation; the only built-in operations on them are those that compute their address and copy them between the stack and memory.
Most importantly:
>However, the CLI supports only a subset of these types in its operations upon values stored on its evaluation stack — int32, int64, and native int.
And:
>Short numeric values (int8, int16, unsigned int8, and unsigned int16) are widened when loaded and narrowed when stored.

https://www.ecma-international.org/publications/standards/Ecma-335.htm

 No.1095

>>1093
>>1092
I wasn't confused on why C# does it; but on why he said it made sense or was logical regardless of C#'s implementation details.

 No.1322

File: 1534958370507.png (205.61 KB, 622x494, gopher_joke.png)

OP here, ironically I now work in .NET; guess it just goes to show sometimes learning for learnings sake pays off anyway.

 No.1325

>>1322

Have you tried GoLang by the way? Did you get your .NET cert anywhere? I saw some courses I could follow online, and I really loved C back in the day, before Java was forced to us by our college.

Nowadays I'm spending a lot of time learning go and I never get to hear any negatives about the language.



File: 1494642140964.gif (700 B, 79x76, wiki.gif)

 No.103[Reply]

This is a c2.com appreciation thread.
Are there any lainons who (like myself) won't stop finding themselves lost in depths of the c2.com wiki - TheFirstWikiOnTheWeb?
Volumes of ancient wisdom (presumably, compiled almost exclusively by SmalltalkWeenies) are open for everyone to read - and to learn from.
Site itself - http://wiki.c2.com/
Archive (you never know) - https://archive.org/details/c2.com-wiki_201501
4 posts omitted. Click reply to view.

 No.799

>>791
>>796
IIRC they changed software after getting spammed to death. You can just download the archive from the second link since it's now read only anyway.

 No.800

>>787
I guess they are, it's just sad that every time wikis are mentioned most people tend to believe they can only be collaborative encyclopedias.

 No.804

>>800
okay, fair

 No.806

>>791
ward cunningham, the author of c2, decided to redesign wiki concept couple of years ago. that was around the time when javascript was an exciting technology, but before everyone realized what a horrible idea it is. he calls the new version smallest federated wiki, you can google it up. there are some useful features there, but i think the result is less intuitive. i've been following his blog with one eye during the redesign, and i wouldn't be able to tell you what the new featureset is supposed to be. backend gives out json, front end renders it, and you can have embedded computation on backend? there's also better forking? i wouldn't say it was a particularly successful redesign, and it also robed c2 specifically of its old timey charm.

 No.1324

File: 1534961353176.jpg (497.45 KB, 2160x1920, c2.jpg)




File: 1533621027843.png (297.37 KB, 600x430, serial_experiments_lain_re….png)

 No.1313[Reply]

Hi Alice, I made my first working website. It is a small imageboard, it actually has only 2 boards(General and nsfw). I'm, of course, open to any suggestion and advice, please help me! :)
It was fun making it
https://www.tinachan.club/
1 post omitted. Click reply to view.

 No.1315

>>1314
I'm extremely sorry about that! I'll try to fix it, thanks for the feedback <3

 No.1318

>>1313
What technology stack you have used in this project?
Can someone elaborate?

 No.1319


Warning: Constants may only evaluate to scalar values in /home/tinachan/public_html/settings.php on line 25

Warning: Constants may only evaluate to scalar values in /home/tinachan/public_html/settings.php on line 26

Warning: Constants may only evaluate to scalar values in /home/tinachan/public_html/inc/defines.php on line 17

Warning: Constants may only evaluate to scalar values in /home/tinachan/public_html/inc/defines.php on line 20

Notice: Use of undefined constant TINYIB_HIDEFIELDS - assumed 'TINYIB_HIDEFIELDS' in /home/tinachan/public_html/imgboard.php on line 90

Warning: in_array() expects parameter 2 to be array, string given in /home/tinachan/public_html/imgboard.php on line 93

Warning: in_array() expects parameter 2 to be array, string given in /home/tinachan/public_html/imgboard.php on line 97

Warning: in_array() expects parameter 2 to be array, string given in /home/tinachan/public_html/imgboard.php on line 100

Warning: in_array() expects parameter 2 to be array, string given in /home/tinachan/public_html/imgboard.php on line 103

Warning: in_array() expects parameter 2 to be array, string given in /home/tinachan/public_html/imgboard.php on line 118

Warning: in_array() expects parameter 2 to be array, string given in /home/tinachan/public_html/imgboard.php on line 168

That file is larger than 2 MB.

 No.1320

>>1319
Fixed!

 No.1321

>>1320
But did you actually fix the code or just disable the warnings?



File: 1533401418198.jpg (47.66 KB, 718x624, DGgtP0rXUAEJsoZ.jpg)

 No.1303[Reply]

I want to learn Java programming at least the basic stuff ( OOP, Polymorphism, control flow ect..)Is it possible to do so in a months time for someone who has done a bit of programming but not too much; if so how would I go about doing it? What types of pdfs do I need, exercise sites ect..

 No.1304

File: 1533412346378.png (377.56 KB, 1450x1080, challenges.png)

>>1303
I'd claim that "learning to program" takes years, but it should be fairly easy to pick up the basics in a month, especially if you already have some experience.

Is there some particular reason or project you want to learn programming for?

>What types of pdfs do I need, exercise sites ect..

Unfortunately I can't recommenced any specific resource - the book I learned Java from is massively out-of-date now.
As for exercises - problems that a directly relevant to you will always be the most interesting. For example: tools to interact with image boards. Failing that, it's pretty easy to find lists of small example problems online.

 No.1306

>>1304
I am not really looking to do much just to refresh myself with the material as I have taken Java 1 my freshman year in college and have spent the last year and a half or so finishing up my gen eds and math/physics stuff making me forget a lot of the material.

 No.1307

>>1306
In that case I would just quickly go through the official Java tutorials from Oracle, or at least the ones that seem relevant to you, and then do some exercises.

 No.1311

You could try HackerRank or CodeWars. Find some java reference book and do the exercises, contests, challenges, etc.



File: 1527513472465.jpg (148.45 KB, 1280x720, aki-book.jpg)

 No.1149[Reply]

I have to debug a lot, most often code that I didn't write. But the problem is, I'm not very good at it. Is it possible to specifically train for it? Or is there some common methodology to it? Maybe some tips and tricks?

Also if you have or know any good stories about debugging, I'd love to hear them!
9 posts and 1 image reply omitted. Click reply to view.

 No.1232

>>1231

Another dimension here is when you just straight up don't have enough information to create a reproducer. Then you're reduced to jiggling this, poking that, trying this other thing, and thinking very hard about exactly what the system would have to do in order to behave in the way the person reporting the bug is describing. Succeeding under those sorts of circumstances feels pretty heroic.

 No.1282

Do you think using techniques from mutation testing to randomly seed a program with bugs and then debugging those would be a valuable exercise or is it a waste of time?

 No.1283

I debug soykafty test cases written in C running on soykafty, broken hardware. I can at least tell you the basics:
- Make sure optimization is turned OFF (-O0)
- Make sure debugging support is turned on (-g3)
- Make sure you have the source code of the program (use the 'directory' command in gdb to add locations to search for the source code)
- use GDB's text user interface ('gdb -tui')
- When all else fails and your world is still not sane, a printf & a recompile can be the most reliable tool in your bag.

 No.1305

>>1282
That seems like a waste of time. The kinds of bugs a mutation testing program will generate probably arn't the kinds of bugs that would provide useful debugging experience. Why not fix real bugs?

 No.1310

>>1305
I don't know any project that could use my help.



File: 1533348417703.png (Spoiler Image, 467.85 KB, 750x1334, IMG_6870.PNG)

 No.1300[Reply]

こんにちは
プログラミングのレベルどれくらい?

 No.1302

いくつかはかなり良いですが、他はあまり良くありません。

私はPythonやbashなどで基本的なスクリプトを実行することができます。

私はそれが正しいと聞こえない場合は、理由を知っているGoogle翻訳を使用した。



File: 1533247668884.png (1.01 MB, 1702x2471, 1530328878498.png)

 No.1294[Reply]

I'm not really into security but i need to crack a wpa2
But i can't find a good wordlist in my native lenguage.
I have some ideas to make my oun but i can't find a tutorial or a book that helps me.
I feel confortable whith C# and java.
Any suggestions?

 No.1295

can't you just get some sample texts, filter punctuation and standardize capitalization, and then basically have your list?

 No.1296

You could try scraping Wiktionary or extract it from a spell-checker program.

 No.1297

>crack a wpa2
don't. unless you have a very good wordlist or you really know how people in your region generate their password it is pointless (bruteforce is pointless unless the target range is pretty small or you have a super computer). most people even use random generated default router passwords, which is a no go. use alternative attack methods that target wps instead (e.g. pixie dust).

 No.1298

>>1297
>you really know how people in your region generate their password
Well, at least i think i know.

 No.1299

>>1298
then learn how2hashcat. your problem is not directly related to wpa2 but actually hash cracking in general. learn stuff like how to write rules for word generation etc.



File: 1497467099226.png (14.21 KB, 246x614, scr.PNG)

 No.241[Reply]

Have you ever coded a malware ? ,
-if yes what language you used ;
-if no why not ?
33 posts and 4 image replies omitted. Click reply to view.

 No.1258

>>1242
Sure..

 No.1271

>>1242
pls, just use tor you could tell us all the details if they were.

 No.1274

>>1271
Don't believe everything someone writes on the internet. If it really was that big, he would mind 100% OPSEC and never would mention details like he already did. Or he is completely dumb.

 No.1275

>>1274
I agree with this.
I bet he is just a LARPing script kiddie.

 No.1277

left around some flash drives which autobooted a vbscript to change all system sounds to a stereotypical clown nose honk, back in college

100% worth it when I finally heard one go off in the wild



File: 1493993896426.png (17.73 KB, 560x560, github.png)

 No.71[Reply]

33 posts and 2 image replies omitted. Click reply to view.

 No.1251

Are there any Arisu projects that need contributors?

 No.1252

Normally I love to deal with low-level C work, but recently I have been writing some rulesets for HTTPS Everywhere. It is funny how many sites don't give a soykaf about cookies or HTTPS, soykaf is insecure and nobody gives a fuck about it lol. Just discovered a .gov site which uses HTTP for login page and only uses a soykafty PHPSESSID for session verification (no additional IP, user-agent checks or whatever).

 No.1253

>>1251
Probably. It would be nice if there were a directory of projects that exist in and around the community. What I know of are these:

https://archive.arisuchan.jp/%CE%BB/res/36.html
https://archive.arisuchan.jp/q/res/1733.html

 No.1272

Hey. Im new in C language and i want improve my skill. Does lainons know some project which can give some simple task?

 No.1273

>>1272
If by new you mean you've never made anything, probably not. Try porting some small utility.



File: 1529427554416.png (160.95 KB, 900x630, memo.png)

 No.1217[Reply]

What would you say are the basics of programming. What would one need to know to be a programmer. I am learning C and looking for some guidence.
30 posts and 12 image replies omitted. Click reply to view.

 No.1260

>>1259
••• SImple Note •••

1. learning programming is NOT related to language ( there are common thing between langs) but every language has it's own feature and you will learn more and more
consider Programming Languages {A, B, C} courses which tries to make you learn about languase and how easly to move around them by learn concepts of languages.

 No.1261

>>1254
All your answer is incorrect
You just need to Believe in God
The rest will come

 No.1263

>>1227
If you want to understand computers, I recommend the book "CODE - The Hidden Language of Software and Hardware" by Charles Petzold. Learning C will not really tell you how Computers work, and I'm quite certain you would agree after reading said book.

 No.1264

>>1261
That is I think a valid solution to >1254's prompt, that is, the final two lines are a valid solution, the rest is cruft.

 No.1270

>>1263
>Learning C will not really tell you how Computers work
computers are many layered machines.
if you only study one layer, i'm quite certain you will overestimate it's importance.



Delete Post [ ]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
[ Catalog ]