« first day (1587 days earlier)      last day (3360 days later) » 

4:00 PM
@ThePhD Jerry is at least a little embarrassed.
 
I am also on "no"
 
@BartekBanachewicz manwe.rmf.io:9876 (no optimisations enabled)
 
my assignment contains a robot and I called him robor
yay!
 
@райтфолд So it's caught up with K&R C. When is it going to catch up with ANSI C and actually check the type?
 
Isnt var1 = var2 always a shallow copy in Java
 
4:02 PM
@JerryCoffin Thanks.
 
user1804599
42
Q: Why list doesn't have safe "get" method like dictionary?

CSZ>>> d = {'a':'b'} >>> d['a'] 'b' >>> d['c'] KeyError: 'c' >>> d.get('c', 'fail') 'fail' >>> l = [1] >>> l[10] IndexError: list index out of range

 
user1804599
this is so retarded
 
Thought of this joke yesterday night, in my sleep. I laughed so hard I woke up.
 
@ThePhD Sort of seems like a "whoosh" situation (my only real point was contrasting Barfer King with food).
 
user3010322
@JerryCoffin Oooh.
 
user3010322
4:04 PM
Well, there that goes, over my head!
 
@R.MartinhoFernandes wut
We simply measured shitload of the same operations
 
Burger King burgers are surpassed only by Burger Star
 
like a loop with 100M ops
@Jefffrey now try setting
 
It's a joke.
 
I know
I also am aware that functions a -> b and b -> c compose into a -> c :P
 
4:06 PM
@rubenvb I can see it now--a page that not only takes 15 minutes to load, but has to be reloaded 7 times before it renders correctly.
 
@BartekBanachewicz But there's no composition there, whatsoever.
 
putStrLn $ omgSoNested .^ omgA .^ soA .^ nestedA
putStrLn $ (nestedA . soA . omgA) $ omgSoNested
 
@LightnessRacesinOrbit have you seen there's a Five Guys opening in Notts, LRiO?
 
@R.MartinhoFernandes Also, about setting, there's already a "special case" in Haskell. "Record syntax" uses obj { field = ... } where field can only be a valid "field". So the distinction between normal function (Obj -> a) and field (Obj -> a) already exists.
 
You know, it would really do us all good if record syntax didn't exist
 
4:10 PM
You can a) extend record syntax to allow easy nested updates and generally modify values based on simple (a -> a) functions, b) create a whole new syntax for that.
 
@Jefffrey No, it doesn't. It's just a name.
 
just write out data as a Quasiquotation and use TH
 
@TheForestAndTheTrees whattttttt
yay
 
@R.MartinhoFernandes A field name. Not any name.
 
@Jefffrey it only works in the particular context of setting one field. It doesn't compose.
 
4:10 PM
@Jefffrey Lenses are more powerful.
 
52 secs ago, by Jefffrey
You can a) extend record syntax to allow easy nested updates and generally modify values based on simple (a -> a) functions, b) create a whole new syntax for that.
@R.MartinhoFernandes I know.
 
fuck record syntax
1 min ago, by Bartek Banachewicz
just write out data as a Quasiquotation and use TH
that's how it should be done from the start really
 
What's TH again?
Template Haskell?
 
Xeo
ye
 
TemplateHaskell
it's the core of automatic lens generation for records
 
4:11 PM
watching last ever Mentalist now :sniff:
 
and frankly, it should be the core of any record ever
 
Ell
TetraHydro
 
so people like you wouldn't complain they have to prefix names with underscore
 
I've also realized that my only problem with lenses is how it recommends _field notation.
 
because it could hygienically sweep the names you use and not emit them into the namespace at all
 
4:12 PM
I know you can customize that.
 
@JerryCoffin Seriously, LaTeX renders a 100+-page pdf in about 15 seconds. Surely the algorithms can be adapted for free-flow text.
 
Also can you create custom setters?
 
@Jefffrey that's just the convention Kmett chose
 
Like a setter with condition?
 
@Jefffrey "with condition"?
You can create custom setters of course
but I don't know what you really want
 
4:13 PM
What's the syntax for that?
Let's say something as simple as checking if the setted Int is >= 0 and if it's not throw an error.
 
setX :: Vec2 -> Float -> Vec2
setX (Vec2 _ y') nx = Vec2 nx y'
@Jefffrey pardon me, do what?
 
Ell
LaTeX is horrible
 
you probably want Traversables
or one of those Prismatic thingies I don't really know much about
 
Like setSomething i = if i >= 0 then i else error "can't do"
Just settings the Int of some data.
 
@Jefffrey see the setX above
 
user3010322
4:15 PM
@Ell It is.
 
it's a manual setter I wrote by hand for the Data.Vect.Float.Vec2 type
 
@Jefffrey It's just functions.
 
I see.
Can you export only getters and/or setters?
 
setX :: Vec2 -> Float -> Vec2
setX (Vec2 _ y') nx = Vec2 nx y'

getX :: Vec2 -> Float
getX (Vec2 x' _) = x'

x :: Simple Lens Vec2 Float
x = lens getX setX
@Jefffrey full example ^
you can export any combination of (getX, setX, x)
 
So I can make it so get field obj is valid, but modify field (+1) obj is not?
Or whatever the order for modify is.
 
4:19 PM
@Jefffrey well you can technically put arbitrary logic in a setter, yes
doesn't mean you should, of course
 
@BartekBanachewicz That's not what that question is asking.
 
> STATUS=daemon 'samba' finished starting up and ready to serve connectionssamba_terminate: dns failed to setup interfaces
It didn't even finish logging the newline before it crashed.
Great.
 
@Jefffrey so what do you want to do? If you have a lens, you have both a setter and a getter.
 
It's asking if I can export a specific behavior for a lens and not another. Like allowing setting with the lens but not getting and/or viceversa.
 
@Jefffrey if you export a lens that's the same as exporting a setter and a getter
 
4:21 PM
@R.MartinhoFernandes lol samba
 
because the very idea of lens is that it can be used for both setting and getting
 
@BartekBanachewicz So it's like a big "fuck you" to any form of encapsulation.
 
@Jefffrey No. Bartek is wrong.
7
You can simply export a Getter.
 
Which is a lens that only gets.
Well, I suppose I was wrong indeed
Dunno why it needs a star
 
4:24 PM
Or really just export the function.
 
@R.MartinhoFernandes And it works with same syntax? Like obj .^ field?
 
you can lift a function into a setting lens or a getting lens trivially
@Jefffrey would hardly have any point if it didn't eh?
@Jefffrey pff encapsulation
 
lol
 
Pretty much every guide I'm reading lately says that hiding too much details by libraries is shitty
 
4:25 PM
Yeah, who needs semi opaque types? Not bartek, that's for sure.
 
@Jefffrey Yes.
@BartekBanachewicz You're reading shitty guides, clearly.
 
clearly.
I forgot that lounge is the only truth
 
You should write some C#
And learn about oh oh pee
 
Well, yeah. Pretty much.
 
might be why most of the people here can't finish a fucking snake
2
 
4:27 PM
I can finish fucking a snake
 
snake 2lonk
 
that's mostly library suckage
 
@Jefffrey lol of course
 
no, it's snake suckage
 
No, that's mostly excuses
 
4:28 PM
yeah yeah, I'm blaming the tools
bla bla bla
a real programmer doesn't blame the tools
 
no, a real programmer gets job done despite shitty tools
 
its goes and fights against seg faults in haskell
 
@BartekBanachewicz That is an ad hominem argument.
 
then writes an article how the tools are shitty in what he did
 
There's broken tools and there's "oh no this API is not the perfection I have imagined"
3
 
4:29 PM
@R.MartinhoFernandes I know, okay. I got angry for some reason.
@CatPlusPlus that too.
 
It has a global???? I CANT USE THAT
 
I love cokmett
 
@CatPlusPlus so under what category does an haskell graphic library falls down in, if drawing a 4 or 5 rectangles near each other causes a seg fault every 30 seconds or so?
 
"Don't use Haskell lol"
 
4:30 PM
That's worse than "Don't use that library"
 
yes, that's a ridiculous statement.
 
Language is a sum of its design, ecosystem and tool support
Haskell only gets one of those right
 
And the other two are slowly coming
 
If everybody reasoned like you do, Haskell would never become a "good" language.
 
he's just a lazy fuck is all.
 
4:31 PM
You said it yourself
 
Oh, well, I'm glad you gave up on Haskell. I didn't.
 
He gave up on life in general in case you haven't noticed
 
Xeo
Yay, home.
 
He really didn't.
 
Xeo
Time to trade UI pains for joint pains
 
4:33 PM
He just prefers the comfy comfort zone that he built around himself.
 
You can't write production code without all three of those things
 
@Jefffrey But you really ought make something with it imho.
@CatPlusPlus Tell that to PHP community
 
May 10 '14 at 10:04, by FredOverflow
@rightfold Wow, C++ question to Bjarne #7 is from Edward Kmett. Does that name ring a bell for you? ;)
 
because frankly I don't think that they got the #1 right
 
I knew we had covered this already :)
 
4:33 PM
In the long run it's the least important part vOv
 
@CatPlusPlus Yeah, it's not like everything we built as programmers is built on broken things already.
 
@CatPlusPlus No True Scotsman Good Language?
 
80% is probably running on PHP and MySQL.
I mean come the fuck on.
 
what jeff said.
 
I'm more than willing to discard a ~~perfect language~~ if I can't write what I want with it due to immature libraries and bindings
 
4:34 PM
@CatPlusPlus BREAKING NEWS some people have different views
 
Write libraries you lazy fuck.
 
Well simply write code
 
user3010322
Or I can use a preexisting library and get things done.~
 
if you write enough code it's motivating for library authors
 
4:35 PM
lol
 
like I can write Hate just for the fun of it
 
Are you working at Microsoft, Bartek? ;)
 
but knowing that someone actually wants to use it is a huge morale boost
@FredOverflow heh
 
In other news I'll be pitching C# or Scala as a replacement for Python
 
4:36 PM
@BartekBanachewicz I'm not going to use your library because your API is not the perfection I have imagined.
 
Wonder how well that'll go
 
Xeo
Someone fix this for me, I wanna work on the fun parts ;_;
 
@CatPlusPlus How do you pick one?
 
@Jefffrey OTOH you're unable to write a better one so you're shit out of luck kinda
 
@FredOverflow Popular support
It's unlikely to matter anyway
 
4:37 PM
@BartekBanachewicz Says who? I haven't even tried it yet.
 
I'd prefer C# even though Mono is meh
 
Probably never going to either.
 
@Jefffrey ~
It'd be cool if you used my library but your views on some things are unimplementable/unrealistic so there
I'm going to get it working even if that means sacrificing ~purity~
 
But what about your modelviews
 
because fuck pure code that doesn't work
 
Ell
4:38 PM
choose scalaaa
 
@CatPlusPlus well keeping those for now
@Ell also fuck broken languages that can't even copy haskell right, lol
 
Ell
@BartekBanachewicz lol what
scala isn't trying to copy haskell
 
Writing impure code in haskell is perfectly fine
 
Ell
and I don't get how it's broken
 
people are just dumb and thing it's oh so pure and whatnot that you can't interact with RealWorld
@Ell let's just say it takes different tradeoffs I don't like then
 
Ell
4:39 PM
you can write impure code in scala perfectly fine too
and pure code
 
Well so, why don't you use Scala.
And I'll use Haskell
how about that.
 
Surprise guessing game: Can anybody see what's wrong with this code?
 
Ell
That's fine, I was talking to cat :P
 
/*
void print_nice_frame()
{
    printf("/*************\");
    printf("| hello there |");
    printf("\*************/");
}
*/
 
Ell
I bet it's trigraphs...
 
4:40 PM
Nested comments
 
printf without %s
 
@CatPlusPlus Yes, because the preprocessor does not know what string literals are :(
 
And that's surprising how
 
@BartekBanachewicz Oh wait, I also forgot the \ns :)
@CatPlusPlus I just find it annoying.
 
I find the entire fucking language annoying
 
4:41 PM
Is there a comment system that is substantially better than C's?
 
Also \".
 
@LucDanton oops :)
 
@FredOverflow Literate Haskell?
 
notice the question mark at the end of my message, signifying doubt
 
4:42 PM
Although of course you can claim it’s on purpose.
 
@LucDanton Of course it is, of course it is! :)
Every bug in my code was put there for the purposes of your entertainment.
enter main tent
 
Isnt var1 = var2 always a shallow copy in java?
 
Ell
No :S
 
@DonLarynx No, it's just a primitive value copy or a reference copy.
You copy exactly one word (8 to 64 bits) of information.
 
Ell
is reference rebind
 
4:47 PM
Objects are never implicitly copied in Java.
 
Ell
or copy of a unboxed value
 
For object types, a = b always means copy the reference.
 
btw @Jefffrey I think I'll change DrawFn from userState -> [DrawRequest] to Reader userState [DrawRequest]
 
Var1 isnt an object its a primitive
 
or perhaps RWS userState DrawRequest ()
 
4:47 PM
Var2 also
 
What does "shallow copy" even mean in the case of primitives?
 
Ell
If it's a primitive it will copy
 
But the point is isnt the copying of the reference, always a shallow copy?
 
because using a normal function is so annoying
 
Where do you get all these weird Java notions from, anyway? Did Herbert Schildt write a Java book?
 
4:48 PM
fn a = x a ++ y a ++ z a you have to pass the freaking a every time
 
Ell
@DonLarynx where is the reference?
show me some java code which copies the int and tell me where the reference is
 
There are no references involved in primitive operations.
Please buy a decent Java book and read it.
 
@FredOverflow #if 0?
 
@R.MartinhoFernandes Oh, that's actually a nice solution!
Doesn't nest either though, does it?
 
@R.MartinhoFernandes @Cat would you rather get a Reader a b or a -> b from the framework to fill in? Should I provide both/abitility to choose?
 
4:51 PM
Ok, my question was of type XY.
I apologize.
 
@FredOverflow Would be a disaster if it didn't. Consider any use of #if inside header guards ever.
 
@FredOverflow Yes, he did.
 
My question is: if var1 = var2, where they are objects, isnt this a shallow copy of var2 into var1?
 
Ell
@DonLarynx No
It rebinds the reference var1 to refer to the object referred to by var2
 
So if var2 is changed, so is var1. And vice versa.
 
Ell
4:54 PM
well
it's the same object both var1 and var2 refer to
 
If var2 calls a method that changes var2's object member data, then var1's object is changed since they both refer to the same object. And vice versa.
 
Ell
yes :)
 
For those of you who have used Qt, you (hopefully) know that signals and slots have three connection types; direct (to immediately call a slot), queued (to post a slot as an event), blocking (queued, but block the calling thread until the slot is invoked). In my implementation I was thinking of specifying the behavior when you actual emit/fire the signal rather than when you set up a connection... do you see any obvious faults with that?
 
var2 has no object member data. Is is merely a reference to an object.
 
Var2's object member data ---> means the object's member data var2 is referring to
 

« first day (1587 days earlier)      last day (3360 days later) »