« first day (2104 days earlier)      last day (2858 days later) » 

9:00 AM
nice
what do you use now?
I always wanted to build a proper toolchain but for the most part I used Keil
 
Atmel Studio, a manufacturer spinoff of VS -> Avrdude -> dirt-cheap USBTinyISP -> whatever AVR microcontroller
 
Terra -- A low-level counterpart to Lua

Stanford University
zdevito@stanford.edu

> terra add1(a: int32) return a+1 end
> add1(5)
I got it right the first try
#smug
@Aaron3468 I see
I'm pretty sure I've used Atmel studio
 
I'd had enough of programming 8-pin MCUs (barely any outputs) in the arduino IDE (poor gui for big projects) while my arduino was stuck being the programmer.
 
I should get myself one of those easier boards
or maybe 10
 
Arduino/dev boards?
 
9:04 AM
yeah, I have STM32F4 right now
and that thing is huge and scary
but at least it has two USB ports with a built-in programmer and debugger
that makes things much easier
 
It's so convenient being able to whip out a board for hobby projects, but it's painful to pay $30+ every time you start a new project to flash a few leds. I prefer the board for prototypes and big, fun projects and MCUs for practical little projects.
 
btw @R.MartinhoFernandes what 3D printer do you have? the M3D?
@Aaron3468 $30? that sounds like a lot
I paid less than $20 for it
which sure is still more than a Teensy or similar
but come on this board has literally everything
which, incidentally, makes it an overkill for most things :P
 
@BartekBanachewicz Sounds useful!
 
@Aaron3468 yeah, it helps. it still has normal JTAG pins if you prefer that
but otherwise you just plug it in and go
 
@BartekBanachewicz I was off a little. Arduino ranges $10-40 depending on the processor/design, which is about equal to other dev boards
 
9:10 AM
it actually has a 32-bit ARM still
so it's actually pretty powerful
but it's small and doesn't ship unnecessary things
>Introducing the M3D Pro
Available for pre-order August 2016
shiiiny
 
Ah, that does look useful. The full USB support and form factor are tempting. Raspberry Pi helps if you start doing wi-fi/internet projects.
@BartekBanachewicz $350 is pretty sweet when you can print at 50 micron resolution O.O
 
@Aaron3468 dunno, you can pay $100 more and get more precise and bigger ones
like He3D DLT 180
my GF said that we should get the smallest and most basic one
but I think I'd like to be a bit more future-proof
 
I can't wait until filament switching and copper filaments are figured out, because then you can print PCBs cheaply without choosing between etching or CNC milling
 
nwp
@BartekBanachewicz inb4 thats why you two are together :P
 
What kinds of things would you be printing to need the extra size?
 
9:18 AM
handles for things
 
Like axes?
 
for the weird stuff
also stuff holders
 
Libya Militia Downs Helicopter, Killing 2 French Troops - lol, but France brought them democracy!
 
You could always take hints from sword design and make a tang held in by dowels to build longer handles. And you can use carpentry techniques to make bigger holders than your printer
 
the He3D is 150 x 150 x 210
that's way bigger than M3D and not that much more expensive
 
Ell
9:20 AM
@Aaron3468 I think etching is preferable
 
oh welp the price has gone up
 
Ell
And relatively easy to DIY without a machine
 
@Ell That is true, though you can get much finer detail PCBs by 'milling' photoresist with a UV laser CNC and then etching
 
I'd still buy the mill first :F
 
9:23 AM
this thing is ~$3k
but it comes with a full PC, lol
 
Yeah, CNCs are fast and can be built quite cheaply
@R.MartinhoFernandes Very handy! That's how I'll be doing my first few b/c I don't have space for machines yet
 
well manual mills are much cheaper
$400 actually new
and the manual ones for this price have tremendous power
you can work in stainless steel with that
 
@R.MartinhoFernandes The new site is cheaper :p
 
9:30 AM
Oh, haven't used them since that.
 
Ell
@Aaron3468 yeah that's nice
 
The project I'm working on atm is a soil moisture sensor for potted plants. I've got the circuit design finished and I figured out how to improve ADC precision, so I'm just waiting for a few parts so I can start a prototype. If it works, I'll order a few PCBs and give a few away ^^
 
oh cool
I found people selling small generators for micro water plants
$15 for 10W@12V
 
for micro water plants?
 
@Aaron3468 water powerplants
I wonder how much power you'd get from raising a 15L bucket to 1m
it has a potential energy of 15J right
if you draw 5W from it it should be enough for.... 3s? :D
that's silly
it realistically needs to be in a river or something
 
9:46 AM
You mean raise it by hand?
 
lol, yes that is true. Otherwise it's worse than a shake flashlight
 
@R.MartinhoFernandes yea
 
Might as well just buy a crank generator.
 
@R.MartinhoFernandes raised water stores energy
just not nearly enough to make it practical for primitive applications
 
Batteries vOv.
 
9:47 AM
continue my unclogging effort - going to chuck another 2 bags of clothes from wardrobe to the garage
 
but if you live near a river, you just need to install a tiny pipe and connect that generator to it.
 
then off for more clothes shopping :x
 
@R.MartinhoFernandes not primitive enough
@Aaron3468 yea
 
@Telkitty it doesn't sound like unclogging ;)
 
mmm I've just realized I have no idea how to smelt copper
 
9:48 AM
Today's a great day to learn!
But it's time for bed yawn. Configuring new IDEs/tools takes a day or two and a lot of energy
 
user1804599
lol
 
user1804599
There's a street in Utrecht named "Amsterdamsestraatweg" which means "Amsterdamish street street".
 
10:10 AM
recursion
 
@Aaron3468 removed some 50-80 pieces of old clothing from wardrobe, adding 10 more. Net, taking 60 removed for example: -60 + 10 = -50. Looking at the result, it's unclogging :D
probably should unclog once per 6 months instead of every 3 years
 
@Telkitty it's like cleaning code, imo, the more often you do it, the shorther the operation is
 
10:35 AM
morning
@BartekBanachewicz Nope, it's considerably more than that if memory serves.
of course you'd basically still need a river due to inefficiencies
 
Mornining Everyone!
 
147 joules
you forgot to account for the strength of the gravity you lifted it up against
I think 15J is what you would need to accelerate a 15kg spherical cow in a vacuum by 1m/s
 
Do you guys think the arduino kit set is good for learning C++?
 
@Puppy true
my bad
it's mgh for Ep
which is gonna be 15*9.81*1 so about what you said
that's still barely 30s at 5W at 100% efficiency
if you wanted half an hour of phone charging you'd need 450liters on two meters
 
29s
 
10:42 AM
so my figurative bathtub
 
not sure how much a bathtub holds in litres
 
actually depends
 
ok, sure, you can have a 450l bathtub then
 
eh in the end it'd be simpler to just utilize natural water flow
make a dam or something
 
you'd get a considerably bigger water flow
and also it would be a lot less effort to keep it up ;p
 
nwp
10:49 AM
@user5600875 No. Tools such as debuggers are worse, slower and harder to use than if you develop for a desktop.
 
@user5600875 if your end goal is to use C++ for microcontrollers then yes
 
ardunio kit is a robot kit
no my goal is making OS
microcontrollers?
 
@user5600875 an OS or just a kernel
 
Both
My own OS and Kernel
 
that's ambitious
starting with an arduino will help, but there's little of advanced C++ there
 
10:54 AM
Yes if you here what i want to do you will call me crazy but i go for the impossible
 
it's not impossible
it's just hard and tedious
 
no no.. i already have learned C++ Very well
 
@Griwes is a regular here and has such a project
 
hmm he joines in this chatroom i supose?
 
he is here time to time
actually this seems to be the last repo
 
10:56 AM
yea just saw
im starting to learn GDT Right now actually
but would you like reccomend Ardunio for person like me? And yes i already have learned good C++ . lovee C++
 
Writing an OS for an arduino is certainly much easier
but those OSes also typically operate in a different fashion
 
no im writing an OS from Scratch .. Computer OS
 
I know
That's what I'm saying
if you want to get your desktop os the fastest way possible, simply using a normal PC could work
 
your face
that's what I'm saying
 
I'm wondering how much stuff I'll be able to throw out of my basement
 
11:04 AM
@R.MartinhoFernandes But the average Java Joe doesn't know the difference between fluent interfaces and LoD-violations.
 
@fredoverflow how is that our problem
 
I never claimed it was our problem.
 
Ven
The problem is with people who believe "design patterns" are a good thing
 
kk im actually developing an OS now
mostly done in C++
i mean not developing but learning
 
11:10 AM
@Ven Design patterns are neither good nor bad; they are just a thing in mainstream languages.
 
Ven
@fredoverflow it's terrible they're a thing
 
may i ask who griwes is in Stackoverflow?
 
Ven
@Griwes is
 
@Ven Well, they tend to get overhyped and overused. Just like any other invention/discovery.
 
@ChemiCalChems man that X/Y problem misformulation
Huge props for Robot for detecting it.
It was too misguided to really be about random engines after all
 
11:17 AM
Griwes, Wrocław, Poland
5.8k 2 17 56
 
inb4 he wants to know IRL. Which is... like exceptionally easy to find
@BartekBanachewicz just as much as you choose, of course. Just get yourself a proper toolchain.
@user5600875 I don't think so
It will do, but not especially well. I'd go for any desktop
 
dont think so what?
 
Follow the reply arrows (hover reveals, click takes you there)
 
i never asked about reply arrows? ok
 
I never asked about chat. Yet you chatted to me :)
Using your tools well is half the job. Chat is also a tool.
 
11:24 AM
@sehe but then again he already knows C++ Very Well
 
Im so confused
Im not a expert in C++ or something
but im familar with it
 
30 mins ago, by user5600875
no no.. i already have learned C++ Very well
your words mate
 
yea.. i didnt mean i am an expert
compared to a begginer im better off
thats what i meant ^^
 
Xeo
Not even experts have learned C++ "very well" :P
 
-_-
 
11:27 AM
it's harder to learn C++ very well than to write an OS
 
@user5600875 You misspelled "beginner"...
 
i tend to mispell things sorry
 
No worries, seems to be a common mistake.
@BartekBanachewicz Right, see Linus T. ;)
 
@fredoverflow Nah, I think they're an inherently bad thing.
whenever you say "design pattern", I say, "missing language feature".
can't really name any design patterns that are not missing language or library features
 
How would language support for factory methods look like?
 
11:31 AM
we have that already
 
@fredoverflow you assume that things would be solved by an equivalent of factory methods
 
it's called std::function<std::unique_ptr<T>(args...)>>
 
that's a wrong approach
you don't get rid of design patterns by literally turning them into language features
@Puppy CRTP is a design pattern
 
Ven
@fredoverflow design patterns are missing abstractions
 
@BartekBanachewicz But that's what almost every blog post seems to suggest.
 
Ven
11:33 AM
which might mean your language sucks at abstractions
like Java does.
 
@fredoverflow stop reading shitty java blogs vOv
go write some haskell or something
 
Of course GoF patterns won't surface in Haskell...
 
@BartekBanachewicz I don't entirely recall what CRTP is really useful for, but I might be inclined to say that it's simply missing higher-order types.
 
Ven
Literally "design patterns" means "We suck too much at abstractions, we need boilerplate for indirection".
 
@fredoverflow because they are not needed there
 
Ven
11:34 AM
@Puppy it's useful for the "self-returning" when you don't want variance
 
java abstractions are ridiculously bad
 
@Ven example
 
that's the prime reason it's criticized
 
Ven
I'm writing.
 
java is long and verbose af because you can't abstract away things you'd like to
 
Ven
11:35 AM
@fredoverflow class Model[T] { def get(id: Int): T = ??? }; class User extends Model[User] {}; // User.get(3) has the correct type
 
and its proponents say that it's a good thing because dumb code is good
 
@BartekBanachewicz Oh, I have a nice one in your favour: Memento is not a language feature in FP, and it doesn't need to be; you simply store immutable values instead of (de)serializing mutable state.
 
this is not a good example of CRTP.
 
Ven
(the "???" is "impl elided")
 
@Puppy Most of the time, I used it for static polymorphism.
 
11:36 AM
this seems like a quite active room
 
Ven
also stop calling this shit "CRTP". Its name is f-bounded polymorphism.
 
wish there was an OsDev Room like freenode :(
 
@Morwenn Also coming to the conclusion that this is not a good example of CRTP, unless you'd care to provide some examples.
 
Ven
It's not because the names in C++ were given by avid drug users that you need to follo wthem.
 
@Ven Not every Design Pattern is about indirection, is it?
 
Ven
11:37 AM
@Puppy this is not an argument
 
@Puppy I don't remember the specific examples unfortunately.
 
@Ven In this case, it's pretty shit. The only reason why CRTP is used here is because you can't add in the get directly to User.
 
@user5600875 not a lot of people are interested in it
 
oh well
i messed up in the kitchen
 
I would consider more like Model[T] extends T, typedef User Model<anonymous type>
 
11:37 AM
@Puppy the idea is that you get parametrized base class vOv
 
Ven
@fredoverflow they're failed abstractions?
 
yea one thing lol.. i find osDev very intresting though
 
CRTP is just a special case of inheritance from a template
 
but i should really go to GDT Now..
 
@BartekBanachewicz Yes, but why would you ever need a parameterized base class in this fashion?
 
11:38 AM
i was shaking the mixture for some pancakes in something i shouldn't have mixed it in, the container opened, spraying pancake mixture over me and half the kitchen
 
@Ven Do you have a handful of examples? Like, how is State or Iterator failed abstraction?
 
@Puppy To inherit parametrized methods and fields?
that's what Ven said.
 
@BartekBanachewicz Well, there you go.
 
Ven
@fredoverflow State design pattern? Iterator design pattern? what are those?
 
"I'm inheriting from this base class because my language is shit and cannot add methods and fields in a convenient and re-usable way except by abusing inheritance"
 
11:39 AM
@Ven Those are 2 of the 23 GoF patterns...?
 
@Puppy excuse me?
how do you propose such a method appears in a class
by pony magic?
actually it's not just a method
 
Extension methods?
 
@Shoe Too late vOv
 
it's a whole base
@fredoverflow ^
 
well, I would suggest that you can write a function that takes a class and then returns a new class with the extra bits added.
then simply call this function.
 
11:40 AM
you mean a type function?
 
Ven
no
 
probably
 
Ven
what
 
Ven
def augment[T](user: T) = user with { val a = 1 }
 
11:40 AM
@Puppy add_base_methods_and_fields<T>::type
 
Ven
@fredoverflow inheriting from an interface isn't a design pattern
 
Anyway, I can't remember how this discussion started, but I think we can all agree that Design Patterns are a necessity to get anything non-trivial done in Java.
 
Ven
@fredoverflow and state is the definition of (internal) indirection
 
@Puppy I am p sure you can do this in terra
 
@BartekBanachewicz The most obvious implementation in C++ which would be kinda awkward is Model<T> extends T, typedef User Model<something>
 
Ven
11:42 AM
If this is a discussion to say "Java sucks and people overuse inheritance" then yeah sure
 
not saying C++ is actually good at doing this, mind you, merely that it's possible
 
The state pattern is a behavioral software design pattern that implements a state machine in an object-oriented way. With the state pattern, a state machine is implemented by implementing each individual state as a derived class of the state pattern interface, and implementing state transitions by invoking methods defined by the pattern's superclass. The state pattern can be interpreted as a strategy pattern which is able to switch the current strategy through invocations of methods defined in the pattern's interface. This pattern is used in computer programming to encapsulate varying behavior...
 
lol
TIL state is a "pattern"
 
Ven
facepalms
@fredoverflow So yeah, here, again a failed abstraction.
They couldn't write a good abstraction for state machines so instead you need to write boilerplate
 
So what would a good abstraction of a state machine look like with proper language support?
 
Ven
11:43 AM
WE FOUND THE DEFINITION OF Dâ„¢Eâ„¢Sâ„¢Iâ„¢Gâ„¢Nâ„¢ â„¢Pâ„¢Aâ„¢Tâ„¢Tâ„¢Eâ„¢Râ„¢Nâ„¢Sâ„¢
 
let's pause for a second to laugh at the fact that java still doesn't have a pair class
 
Sure it does: java.util.Map.Entry<K, V>
;)
 
@fredoverflow Dunno, look how every other language that has an abstraction more advanced than "Object" does that
 
@fredoverflow I would argue that it's something like state1 = function(input) { if (input) return state2; return state1; } state2 = function(input) { if (input) return state1; return state2; } in a simple way.
each state is just a function taking input and returning the next state.
 
@fredoverflow for one each state doesn't necessarily need to carry its own specific state
 
Ven
11:45 AM
How dare you use such an advanced concept as "composition" @Puppy!
 
in which case they can be pure functions
 
Where is the state-dependent code that actually does something, depending on which state you're currently in?
I get the feeling that people like to bash Design Patterns without really knowing them all that well.
 
you mean, carry out side effects?
 
@fredoverflow of course we don't know them that well, because we don't need to
they are like socialism
they are great for solving problems noone else encounters ever
 
it would be simple to carry out side effects when transitioning into that state, or just make each state a pair with a side-effecting function partner, or a bunch of other possibilities.
 
11:47 AM
or a monad
 
@sehe why lol
 
@Puppy What would be the difference between a pair/tuple of functions and... well, an object?
 
it's more flexible
doesn't need to have a class
 
Anyway, it's kinda fun to take the pro DP side in the discussion...
Personally, I can't remember the last time I used a DP.
 
@BartekBanachewicz you can make an anonymous class, can you not?
inb4 lol noob
 
11:49 AM
well what I'm really feeling here is that the actual State need be one implementation for all valid state machines.
 
@ChemiCalChems which shares drawbacks of both approaches
 
in which case it's basically just a class and not a design pattern of any kind.
whether you define the input as pairs, tuples, functions, or objects meeting an interface is irrelevant.
 
@Puppy IOW a proper abstraction
 
@Puppy Right, and that's what Design Patterns is all about. If your language support pairs of functions, sure, use them to implement the State pattern.
 
no.
"Use this pre-provided class to do a thing" is not a design pattern.
 
11:51 AM
the only problem with design patterns is that people assume "OOP" has a well-defined set of rules
 
a design pattern is re-implementing a thing because the existing implementation can't be generalised for your use case.
 
Oh, you want to solve all State problems with a single library class?
 
yes.
 
that's what he said
 
Hm, interesting.
I don't think that would work, but I'd be glad to be proven wrong.
 
11:52 AM
you need to be able to parametrize on whatever that pattern changes
that's all
 
By the way, the Observer pattern is in Java's standard library. So is that an abstraction gone right?
 
yep.
 
@fredoverflow if it's in a library it's not a pattern anymore
 
the Observer pattern is "We failed to implement boost::signals2"... or is that the Listener pattern or something?
 
Observer and Listener are the same thing, as far as I'm concerned.
@BartekBanachewicz I don't think I have ever seen anybody make that point...
 
Ven
11:55 AM
@BartekBanachewicz well put :P
"I feel like this DP should be a reusable class" "You mean like, a proper abstraction?"
 
25 mins ago, by Puppy
can't really name any design patterns that are not missing language or library features
 
@fredoverflow It's what I've been saying for the last 30 minutes ;p
 
Okay, so I should think we should narrow the discussion to design patterns that aren't found in standard libraries, and where additional language features also don't help.
 
@fredoverflow So what we're saying is that the size of that set is zero.
 
You guys claim those can't exist, right?
right
 
11:58 AM
or at least shouldn't
 
Ven
@fredoverflow It's the point we all make
 
but until we get common languages with first class types and dependent types it's unlikely to happen practically
 
Ven
back to writing Factories!
 
well, language limitations or "We couldn't be arsed/couldn't figure out how to do it" certainly can apply.
 
Ven
And btw, Factory is a prime example of Lambdas not being present/convenient in the language.
 
11:59 AM
What about Builder, Adapter and Composite, just to name three?
 
so I'd never argue that the size will always be (or even should be) zero in practice.
but in theory.
 
Ven
@fredoverflow Builder => Lenses
I don't know Adapter nor Composite
.oO( And at this point I'm too afraid to ask. It might be java )
 

« first day (2104 days earlier)      last day (2858 days later) »