[ / / / / / / / / / / / / / ] [ dir / animu / arepa / ashleyj / hikki / sonyeon / tacos / vg / vichan ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): ca3971ecadb8c7d⋯.jpg (104.26 KB, 750x936, 125:156, 0f5185109382e946857ea7e738….jpg) (h) (u)

[–]

 No.970057>>970062 >>970064 >>970219 >>970458 [Watch Thread][Show All Posts]

I've been learning D but I can't seem to come up with anything low level I want to write anymore that hasn't already been written a thousand times or that would be better suited for a higher level language.

 No.970062>>970074

>>970057 (OP)

Implement a Bloom filter for D.


 No.970064>>970073

>>970057 (OP)

What'd we tell you when you originally posted? The novelty is wearing off, isn't it?


 No.970073

File (hide): 1eff7ab94f42da4⋯.jpg (114.67 KB, 476x480, 119:120, tumblr_pf03uosgmX1vt0y4i_5….jpg) (h) (u)

>>970064

No, the language is still amazing, I just don't really have a reason to start a project in a lower level language. I can't come up with something I wouldn't just write in Python or Ruby and anything specific enough to my system I'd just write in Assembly.


 No.970074>>970075

>>970062

>Hasn't already been done a thousand times


 No.970075>>970079 >>970091

>>970074

It has not been done in D.


 No.970079>>970086

>>970075

Alot of stuff hasn't been done in D, I'm not going to descend into 'Rewrite It In Rust' levels of reinventing the wheel.


 No.970084

Write a BASIC interpreter.


 No.970086

>>970079

Well that's 2 bad because D will never be used for anything actually useful.


 No.970091>>970093

>>970075

A bloom filter is like a couple lines of code. What is there to implement?


 No.970093>>970136

>>970091

If by a couple you mean a few hundred.


 No.970136>>970144

File (hide): 8bf7e821140dbee⋯.jpg (169.92 KB, 662x796, 331:398, footprints2.jpg) (h) (u)

>>970093

How fucking stu.. actually, are you a Java programmer? That would explain it.

In the real world outside of Java and Jewschool, bloom filters are such an insanely fucking trivial concept that they aren't even given their own functions.


 No.970144>>970149

>>970136

Nice bait larper.


 No.970149>>970152

>>970144

I'd love to see your "few hundred" line bloom filter. Go on, show me.


 No.970152>>970158

>>970149

You probably think a vector should also be 2 lines of code. Guess what faggot, not how the real world works.


 No.970158>>970162

>>970152

No, I'm amused now. Show me your few hundred line bloom filter. I want to see how you turn a couple instructions into a giant Kode with Klossy essay.


 No.970162>>970206 >>971888


 No.970195

>he wants the D


 No.970206>>970214

>>970162

wew, this is the Kode with Klossy I expected.

>bloomlib.c

This is my favorite, it looks like homework from someone learning C at Jewschool. C datastructure for speed that uses doubles, calculates a mystery error value that shouldn't be exposed and isn't used internally, requires the array to be malloced, stores the count of bits separately from the count of bytes rather than round to a byte for who knows what reason, assertions attempting to catch bad values allow integer overflow, protection from a stack overflow in bf_get_index is only present in callers rather than the function itself, and supports loading and saving the filter to a file for no reason.

>bloom.c

Now that's just suspicious as it has many of the same design mistakes and structure as the one above and chose the same hash and was written in the same year. Bet you've found a class project.

>pajeetscript

didn't read.

>not counting murmur that everyone has to write

Why the fuck would you have to write, or use, murmur hash? A hash for this purpose is often as simple as modulus with a prime, and that's the normal state bloom filters are found in real code rather than massive overgeneralized data structures for homework. What hashes you use are a decision to be made by the user of the filter anyway, not the author of the filter. And murmur is obsolete (these were from 2012, though).


 No.970214>>970447

>>970206

>Why the fuck would you have to write, or use, murmur hash

Opinion discarded. Nice try larper.


 No.970216

Web browser.


 No.970219>>970234

>>970057 (OP)

sounds like you just don't enjoy programming. you have a good career sucking cocks ahead of you faggot.


 No.970234>>970458

File (hide): b4dc508cc3fe049⋯.png (357.4 KB, 472x910, 236:455, eric.png) (h) (u)

>>970219

Since when did not wanting to risk my hands feeling like they're getting stabbed over the billionth implementation of fizzbuzz mean I don't enjoy programming?


 No.970447

>>970214

>literally thinking murmur hash is a requirement of bloom filters

dohoho enjoy your LISP.


 No.970458>>970490

>>970057 (OP)

>>970234

>I've been learning D but I can't seem to come up with anything I want to write

If you can't think of something you want to write, then programming isn't for you. Fuck off.


 No.970490>>970510

>>970458

Stfu nigger I've been doing this since I was 10.


 No.970510>>970514

>>970490

you've been pretending to program while not making anything for 2 years already, very impressive. By the time you're in high school you might be able to write fizzbuzz.


 No.970514

>>970510

Yeah ok bud you can stop projecting now


 No.971888

>>970162

>1

77 lines of source

>2

also 77 lines

>3

89 lines of javascript

All under 100 lines. Stop counting blank lines, comments, and printing code.

Also, you can easily strip the crud from #2 and bring it down to 37 lines: https://pastebin.com/Mzqs2Szk. Having done so, you can see how easy a bloom filter is. Besides the init functions, which could be done way easier as well, both setting and checking are only a couple lines.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
28 replies | 4 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / animu / arepa / ashleyj / hikki / sonyeon / tacos / vg / vichan ][ watchlist ]