|
JawnV6 posted:now im wondering if this type system has enough gearing to check int Adder(int, int) is actually an adder without deigning to actually run the stupid function with an argument or two i mean, i'm definitely hamming it up a bit because yospos but my point wasn't static typing = no unit tests ever, it was that you have to write and maintain fewer of them when you can encode the basic poo poo in the type system. and that's with a pretty dumb java/c#-style system, i'm sure the ml and f# wizards in the thread can cram at least half their business rules into type definitions. like, look at this stuff. it's bananas.
|
# ? Aug 13, 2016 18:39 |
|
|
# ? May 10, 2024 06:06 |
|
lol that's not bananas that's standard ml/f# technique. i was expecting at least a gadt or something weird haha but yeah that's a good example of how to make the type system do your work for you
|
# ? Aug 13, 2016 18:46 |
|
hobbesmaster posted:q: in c++11 can you use a range based for loop to modify a vector<bool> in place? man, it's obviously a std::_Vb_reference<std::_Wrap_alloc<std::allocator<unsigned int>>>. what's so weird about that
|
# ? Aug 13, 2016 18:55 |
|
Luigi Thirty posted:holy poop this is way better than the x86 nightmare this is not a high bar to clear the PDPs and then the m68k archiectures are the canonical examples of cisc architectures. x86 isn't a canonical example of cisc or risc, it is a canonical example of a directionless mess dragged along by inertia. cisc instructions are very slow compared to risc instructions, but they do a lot more. the big selling point of risc poo poo was "well, we have compilers now so we don't need to make ISAs nice to program by hand, we need to make them nice for compilers to target and for chip designers to implement". except that doesn't really hold up that well in practice because risc instructions take up way too much precious instruction cache space so the architectures people think of as "risc" these days have a whole bunch of redundant instructions that act as shorthand for common tasks like function prologs/epilogs etc really these days the only thing that risc means any more is "you can only access memory using explicit loads and stores". Sapozhnik fucked around with this message at 19:43 on Aug 13, 2016 |
# ? Aug 13, 2016 19:38 |
|
I spent all afternoon writing a 68k program that takes console input and displays an 8-digit number on the LEDs in easy68k I will never reproduce
|
# ? Aug 13, 2016 21:06 |
|
JewKiller 3000 posted:lol that's not bananas that's standard ml/f# technique. christ, i clearly need to start using some f#.
|
# ? Aug 14, 2016 01:09 |
|
Luigi Thirty posted:I spent all afternoon writing a 68k program that takes console input and displays an 8-digit number on the LEDs in easy68k you say that like it's a bad thing
|
# ? Aug 14, 2016 01:44 |
|
Notorious b.s.d. posted:you say that like it's a bad thing why am I autistic for old technology instead of up to date technology
|
# ? Aug 14, 2016 01:47 |
|
Luigi Thirty posted:why am I autistic for old technology instead of up to date technology who cares writing DOS raycasters and m68k assembly will teach you the same poo poo anyway
|
# ? Aug 14, 2016 01:50 |
|
reproduction is overrated 1980s cisc is sorely under-appreciated you're doing god's work
|
# ? Aug 14, 2016 01:50 |
|
it's not a raycaster it's a full 3D engine lol
|
# ? Aug 14, 2016 02:33 |
|
MALE SHOEGAZE posted:if you have to call this.SomeGlobal, its not a global. it's a member of this. 'this' is an implicit argument, but an argument nonetheless. maybe I'm not following, but you seem to be complaining about instance state and not global state. i mean, still annoying. i think you underestimate just how bad javascript's scoping rules are code:
|
# ? Aug 14, 2016 04:31 |
|
Plorkyeran posted:i think you underestimate just how bad javascript's scoping rules are lol just lol if you don't "use strict" in tyool 2016 code:
if you have code that relies on this referring to the global namespace inside a function body you should either fire everyone involved in writing it or quit further reading i'd recommend: http://www.2ality.com/2014/05/this.html abraham linksys fucked around with this message at 04:40 on Aug 14, 2016 |
# ? Aug 14, 2016 04:38 |
|
i wanted to do some more 68k assembly so i wrote a little program that will read a floppy image and enumerate the root directory. auto-looping branch instructions are great took me a little while to figure out how to read a 32-bit little endian number (all FAT12 data is little endian) into a 32-bit big endian register lol
|
# ? Aug 14, 2016 06:11 |
Luigi Thirty posted:I spent all afternoon writing a 68k program that takes console input and displays an 8-digit number on the LEDs in easy68k You can always gently caress your computer and cum in it
|
|
# ? Aug 14, 2016 07:34 |
|
abraham linksys posted:lol just lol if you don't "use strict" in tyool 2012
|
# ? Aug 14, 2016 09:27 |
|
i'd say that in tyool 2016, lol just lol if you're not using const and let
|
# ? Aug 14, 2016 09:27 |
|
Luigi Thirty posted:took me a little while to figure out how to read a 32-bit little endian number (all FAT12 data is little endian) into a 32-bit big endian register lol code:
|
# ? Aug 14, 2016 11:17 |
|
jony neuemonic posted:christ, i clearly need to start using some f#. keep in mind that very little of the code in that post involves f#'s exclusive features. the syntax is much shorter and sum types are safer than enums, but you could do 95% of that oo-based validation in c# or java (Scott has other tutorial where he does explore the more unique parts of f#) here's a simpler implementation where the translation to mainstream languages might be more obvious (just add a shitton of useless braces and type declarations everywhere ) code:
|
# ? Aug 14, 2016 12:43 |
|
JewKiller 3000 posted:this is simply a consequence of the fact that sql allows constants of many types to be specified in string literals. see postgres manual section 4.1.2. if those were real columns it would not work, see below: sometimes it feels like sql is dynamically typed but statically typed for persistent data, it's the best of both worlds
|
# ? Aug 14, 2016 12:54 |
|
Wheany posted:i'd say that in tyool 2016, lol just lol if you're not using const and let lol just lol if you're writing javascript at all in any yool
|
# ? Aug 14, 2016 14:33 |
|
Sweevo posted:
I did that yeah
|
# ? Aug 14, 2016 15:27 |
|
Soricidus posted:lol just lol if you're writing javascript at all in any yool well let me just write this greasemonkey script in haskell or erlang or rust
|
# ? Aug 14, 2016 15:29 |
|
Wheany posted:well let me just write this greasemonkey script in haskell or erlang or rust okay
|
# ? Aug 14, 2016 15:35 |
|
nnoo, i'd still prefer not.
|
# ? Aug 14, 2016 15:49 |
|
Wheany posted:nnoo, i'd still prefer not. yeah unfortunately you still have to debug in js
|
# ? Aug 14, 2016 15:57 |
|
no no no no no i expanded my directory enumerator to look for a file named "program.bin" (the number displayer with ORG $1000 changed to ORG $800000), load it into 0x800000 and execute it. i've invented dos.
|
# ? Aug 14, 2016 20:53 |
|
Luigi Thirty posted:no no no no no write a bootloader and a lovely console in text mode and you've got yourself an os
|
# ? Aug 14, 2016 21:18 |
|
Awia posted:write a bootloader and a lovely console in text mode and you've got yourself an os that seems like a fun project can you tell i wish i would have gotten into the cool operating systems classes in college instead of the dumb ones i took
|
# ? Aug 14, 2016 21:50 |
|
Luigi Thirty posted:that seems like a fun project i started trying to write an os once, i got stuck on tooling tbh my uni os classes consisted of installing dos in a vm, they were mega poo poo
|
# ? Aug 14, 2016 21:53 |
|
you'll also have to implement a file system too ofc
|
# ? Aug 14, 2016 21:54 |
|
thinking about implementing low level stuff like that gives me a massive programmer erection, but i just can never be bothered when i get round to it
|
# ? Aug 14, 2016 21:55 |
|
me too except for filesystems, which just give me the chills. the idea of me writing a thing that tries to guarantee everyone's data will be on their disk later, in correct form, just sounds like an exercise in hypertension
|
# ? Aug 15, 2016 00:49 |
|
Lutha Mahtin posted:me too except for filesystems, which just give me the chills. the idea of me writing a thing that tries to guarantee everyone's data will be on their disk later, in correct form, just sounds like an exercise in hypertension i can read precisely 1 cluster from a program on a fat12 disk because i don't know how to read the FAT yet lol i did write a "console" insofar as it runs my homemade strcmp on a string you input and compares it to a table of strings, throwing an error if nothing matches Luigi Thirty fucked around with this message at 01:05 on Aug 15, 2016 |
# ? Aug 15, 2016 01:02 |
|
i work on a distributed filesystem and it's pretty ok. somehow all the threading bugs haven't resulted in data loss yet!
|
# ? Aug 15, 2016 01:04 |
|
Bloody posted:this is really the thing that makes me most mad every time i look at a thing in python or javascript. p-langs (especially python) are totally fine to read (assuming a non-trash code base) because there's an a priori assertion that the code you're reading is valid, so all these magic function calls are correct, but writing them? literally kill me i love writing in python
|
# ? Aug 15, 2016 02:11 |
|
Series DD Funding posted:i work on a distributed filesystem and it's pretty ok. somehow all the threading bugs haven't resulted in data loss yet! which one
|
# ? Aug 15, 2016 02:24 |
|
echinopsis posted:i love writing in python how do I add an item to a list? is it add or append? how many items are in it? is it count or length? multiplied by everything in the language it's completely unusable to me
|
# ? Aug 15, 2016 02:36 |
|
Bloody posted:how do I add an item to a list? is it add or append? how many items are in it? is it count or length? wow you must have the memory of a goldfish how could you possibly use any programming language where you have to remember what methods a list has
|
# ? Aug 15, 2016 02:45 |
|
|
# ? May 10, 2024 06:06 |
|
who needs memory when ctrl-space works
|
# ? Aug 15, 2016 02:47 |