« first day (2023 days earlier)      last day (2927 days later) » 

1:00 PM
sure...but would a convenience overload with a default predicate for bool ranges have been so bad? :(
 
Ell
yeah a default predicate does make sense
 
@melak47 I want lambda expressions :( std::all_of(begin, end, x => x % 2);
 
template<class Itr>
Itr all_are(Itr beg, Itr end) {
  return std::all_of(beg, end, [](auto && elem) -> bool {
    return elem;
  };
}
 
afraid of a little [capture, things](stuff :D)maybe mutable :D { return <stuff you actually want>; } ? :D
 
template<class Itr>
Itr all_are_not(Itr beg, Itr end) {
  return std::none_of(beg, end, [](auto && elem) -> bool {
    return elem;
  };
}
@melak47 Polyfills, baby!
 
1:10 PM
I'd actually be kind of wary of making that the default for all, since lots of things are convertible to bool
but then maybe that's what you want. shrug
also, they don't return iterators :)
 
user1804599
foreign import ecmaScriptProcessorImpl
  :: forall eff.
     (forall a b. a -> Either a b)
  -> (forall a b. b -> Either a b)
  -> String
  -> Either String (Constructor eff)
 
user1804599
This is so great. It's now impossible to pass anything other than Left and Right as the first two arguments.
 
Ven
@melak47 lol if you don't have an id function somewhere. :P
 
@Ven this one is more of a contextual bool function :)
I guess id would work here, though
 
Eh~, I can't find my glasses.
 
user1804599
1:22 PM
struct {
  template<typename T>
  decltype(auto) operator()(T&& x) {
    return x;
  }
} id;
 
ew
now what am I gonna call template<typename T> using id_t = T;? :p
 
I've got something like that in my library.
 
back to alias? :D
 
user1804599
fixed
 
:D
 
Ven
1:24 PM
@Zoidberg just std::forward : ^)
 
user1804599
yeah I forgot that
 
user1804599
it was my intention but in the heat of battle I forgot to put it in
 
also no constexpr, -1
 
Ven
@Zoidberg its ok we 4giv
 
user1804599
foreign import data ARBITRARY :: !
type Arbitrary eff = (arbitrary :: ARBITRARY | eff)
 
user1804599
1:25 PM
:[ I want a universal row
 
user1804599
like a bottom row
 
user1804599
that includes all other rows
 
Ven
You already have a nice bottom
 
what's the reason you need a user-provided default constructor to default initialize a const Something, again?
 
erm, "Why do you need a default constructor to default construct this thing?"?
 
Ell
1:34 PM
@Puppy user-provided
 
because default-construction for a const object for trivially constructible types is fuckin' pointless
like, gratz, you got a UB int, good job
 
looks like gcc has no problem with any of that, though :D
 
bar2 is totally useless in every way.
bar3 is just as useless, it's just that the compiler can't tell so easily.
 
user1804599
@melak47 Because special cases are good and make generic programming easy
 
@Puppy how are they not all equally useless?
 
1:38 PM
they are equally useless.
the compiler just can't tell.
 
so uselessness is entirely useless here
things don't need to have data members to be useful :/
 
in the second case, the compiler doesn't know the side effects of the constructor
 
wot constructor
you mean the one it provides? it doesn't know what that one does?
 
no, the one you did not default.
 
Now it's both defaulted and user-provided.
 
user1804599
1:41 PM
Fuck C++.
 
user1804599
Use Pure11.
 
:D
 
the even better answer to your question is fuck const
 
user1804599
Pure11 has no const.
 
> Write (basically) Haskell get C++11
Now you get two cancers instead of one!
 
user1804599
1:44 PM
yummy krupuk
 
Ven
nabija feeling like firing shots :P
 
@Morwenn now do it with an anonymous struct. :v
 
@melak47 decltype of an instance?
 
dang
struct {
	using self_t = decltype(foo);
	self_t(){}
} foo;
this can't possibly work :S
 
decltype(*this)?
 
1:53 PM
@набиячлэвэлиь error: can only use this in non-static member function :)
struct {
    decltype(auto) get_type() { return *this; }
    using self_t = decltype(std::declval<???>.get_type());
} foo;
 
user1804599
@melak47 it's impossible
 
@melak47 Wide is superior because it uses type() instead of foo()
 
@Zoidberg lol
 
Ven
:P
 
user1804599
can't you do something with pointers to members?
 
1:58 PM
good lord
help me
 
@Zoidberg but you can't get a member pointer without the class name :/
&???::member is the only legal syntax, right? :\
 
Last night a couple of my teammates decided that the password should be encrypted in md5 before sending to the server for a login for example; so that the server can bcrypt the md5 password.
 
wat.
 
@Shoe you lost me there
 
user1804599
@Shoe WTF why would you do that
 
user1804599
2:00 PM
just use TLS
 
> encrypted with md5
 
user1804599
TLS is much safer than MD5, and you need it anyway, because you're passing around session tokens.
 
> encrypted
 
2:01 PM
So, we have a REST API. For a login the client (JS on the browser) makes a request using HTTPS to the server. And it sends the username and the password of the user to login. I've just discovered that yesterday they change it so that they MD5 the password before sending it to the server.
And they said "Don't worry, nothing changes on the server, just remember to md5 the passwords when creating new objects in the tests".
 
@Ven hm, doesn't look like that'll work for anonymous classes
 
Ven
indeed.
 
user1804599
@Shoe It doesn't make anything any more secure.
 
Now the question is...
 
user1804599
Because now you don't use the password to authenticate, but the MD5 hash of it.
 
2:02 PM
I wonder if anonymous classes have an injected class name of ''
 
What's the closest place where I can buy automatic guns in Italy?
 
user1804599
It is in fact less secure because there are fewer MD5 hashes than there are passwords.
 
@Zoidberg Yes
 
nwp
@Shoe USA
 
@Shoe Any gunshop
 
2:03 PM
@nwp I don't think I'm allowed to bring them home then
 
@набиячлэвэлиь Needs certificate and can't be automatic IIRC.
 
There aren't a lot of single-shot firearms going around anymore
 
user1804599
But hey, this is a school project, so the teacher who's gonna review this shit is very likely equally cryptographically unconscious so he's gonna praise it.
 
Oh yeah
 
2:04 PM
@Shoe Can you buy a pistol?
 
The reason they did this is so that the client can save the md5 password locally and use it for making future requests.
 
Any pistol from after like 1950s at all?
@Shoe looooool
 
(NSA I'm kidding, ain't gonna kill anybody)
 
user1804599
@Shoe Terrorists seem to be coming into Europe through Italy now that the Balkan is blocked, so you could ask them.
 
@Shoe Unless you're talking about full-auto, in which case yes, and very much so
 
2:07 PM
@Shoe What the actual fuck
 
I have no idea
I'm on call now
 
Server side sessions much
 
Thanksfully there's another guy here working on the server with me that is talking because I'm speechless
 
How do I fix APT
 
And it's explaining to them how cookies works
 
2:08 PM
Is is just by reinstalling
 
nwp
@Shoe is he the reason you need an automatic gun?
 
No, he is the only one I wouldn't kill
He is explaining how the world works to the client people
 
nwp
ah, makes sense, don't need an automatic gun for only 1 guy
 
You probably do because most people are bad shots
 
@Zoidberg hmm...
 
2:10 PM
So discharging multiple rounds is probably necessary
 
user1804599
@melak47 Try &member.
 
wat
 
same result :D
 
They say sessions are destroyed on the server side because they make a TCP connection and therefore when the browser is closed the TCP connection closes
I'm literally speechless
 
derp.,
 
user1804599
XDDDDDDDDDDDDDDDDDDDDDDDDDDDDDX
 
They think that when you visit a website a persistent TCP connection is estabilished
 
user1804599
HTTPically unconscious
 
I just told them "No." and they said "Well, in PHP yes"
 
um well no.
 
2:12 PM
I didn't reply
 
that's just plain not how HTTP works.
 
What should I do?
 
user1804599
HTTP is a request-reply messaging protocol. Connection retention is just an optimisation.
 
user1804599
Explain that to them.
 
He says that he is not sure about JS, but with PHP it works that way
And he is sure
 
user1804599
2:13 PM
You could close the connection after each HTTP response and everything will behave exactly the same way, just slower.
 
I'm afraid, because every word I'd say would sound extremely aggressive
I need to take a break
Calm down, and talk slowly
 
Jul 6 '13 at 1:04, by milleniumbug
@Pawnguy7 Shortest programmer joke in the world: PHP programmer
 
you know, there just seems to be a universal curse for all languages beginning with P so that they are just shite
Prolog, Python, Perl, PHP
 
@DmitriBudnikov c’est cool non seulement on affronte MdJ mais aussi un monde [DE] qui lui aussi n’a pas été relié à un autre. et donc nous autres qui sommes deux mondes reliés qui perdont face à deux mondes pas reliés ça motive super bien, y’a une ambiance de tonnerre
 
@Puppy why is python shite? :(
 
Ven
2:23 PM
@Puppy Puppy.
 
Puppy is not a language
 
Ven
(yes, yes, not a language)
 
@melak47 Most obvious is dynamic typing, and also their lambdas are just crap
 
Ell
@Puppy do you count anything dynamically typed as shite?
 
2:27 PM
yes.
 
2:37 PM
I think I've just realized that we have hit the point of no return so fast
 
0
Q: Some OpenGL pixels appear larger than others(C++)

Bemis KidsSo I've been attempting to make a very basic OpenGL/C++ game. However, when I render any sprite, some pixels appear to be larger than others. For example: http://imgur.com/Sc435Xf. If you need to see the code for a specific part of the program, let me know because I don't know what might be causi...

that title :D
 
user1804599
@melak47 untyped and imperative
 
Like I used to say "Well, this is suboptimal, but whatever... let's just keep this thing that at least works instead of refactoring".
Now a couple of these things piled up, and I'm surrounded by shitty code.
Written also by me
The complexity has risen so highly so quickly, it took me off guards.
Like we used to have 4 classes just to set up an express application
But we didn't use dependency injection for them, and now we have to have two environments
testing and production
And we would have to change everything
But we have so many documents that already refer to those things
So it would take a shitload of work to refactor
But if we don't we can't test
 
@Puppy Pascal. Not dynamically typed, and no shitty lambdas (but unfortunately, no good lambdas either).
 
yeah I don't really know Pascal so I decided not to put it on the list
I imagine it's exceptionally shitty by modern standards but I also don't believe it sees any modern use, so it seems pretty pointless to judge it by modern standards
 
2:43 PM
@melak47 Made me think of "Objects in mirror are closr than they appear"
idk why
 
user1804599
@Shoe haha RIP
 
Delphi is basically Pascal and Delphi is pretty good for GUIs
 
@Puppy It still has a few fans (E.g., Mason Wheeler, over on P.SE. He's a bit of an ass about it, but that's his problem, not the language's).
 
being good for only a specific thing is still exceptionally shitty.
 
Well it's not only good for it
 
2:44 PM
so DSLs are Domain exceptionally Shitty Languages?
 
@набиячлэвэлиь Good for GUIs, but that's because of a framework, not because of a language
 
I haven't really encountered any DSLs that were justifiable
 
@milleniumbug yes maybe
I used Delphi too long ago
 
they were pretty much all "We wanted to write this in a real language but were too stupid to do so"
 
Matlab
 
2:45 PM
SQL is DSL vOv
 
not a fan of SQL at all.
 
would you rather structure your data queries in some other way?
 
um, LINQ for one example?
the only thing I can say about SQL is that it seems to date from a time when we had no idea how to make general-purpose languages flexible
 
@Puppy And you think LINQ isn't a DSL?
 
so it seems less that SQL is not shit and more that at the time, the competition was too
@JerryCoffin Well, you can write it using that DSL syntax, but you can also and I always do write it with the extension methods.
 
user1804599
2:48 PM
SQL with LET, SELECT at the end, and proper identities for aggregates instead of NULL.
 
but I think that more fundamentally, I admit that LINQ in some ways is a DSL
but mostly because it has to compile to SQL more or less, rather than because it's inherently a DSL.
you could consider e.g. just dropping the SQL bit entirely and just executing CLR bytecode directly
 
user1804599
No.
 
user1804599
Query plans must be created.
 
user1804599
To take advantage of indices.
 
that assumes that you cannot create query plans by inspecting the bytecode.
 
user1804599
2:52 PM
That's really stupid thing to do.
 
user1804599
Doing it from an AST is much easier.
 
user1804599
It's much more high-level.
 
meh
you can do that too if you want to
 
user1804599
You'd convert declarative SQL to imperative bytecode, and then convert that to an imperative query plan.
 
alternatively you could junk SQL and just take C# and convert that to the required structures.
 
user1804599
2:58 PM
You also have type system issues.
 
user1804599
You need the types stored in the database.
 
@Puppy Sure. Now you just need to get MS, Oracle, PostGres, and every other database to agree on exactly how to represent queries internally. As a nice warm-up for that, might I suggest you get an agreement that gives lasting peace in the mid-east?
 
@Zoidberg yeah things typically go badly if the application doesn't know the database schema
 
Ven
@JerryCoffin EDSL at best :P
 
@Puppy We're not talking about the database schema. We're talking about how the database manager decides to represent that schema.
 
user1804599
3:02 PM
main :: forall eff. Eff (arbitrary :: ARBITRARY, err :: EXCEPTION, systemClock :: SYSTEMCLOCK | eff) Unit
main = do
  a <- case ecmaScriptProcessor "return (ev, cb) => { cb(); };" of Right c -> c
  b <- case ecmaScriptProcessor "return (ev, cb) => { console.log(ev); cb(); };" of Right c -> c
  launchAff $ go (parallel [a, b])

go :: forall eff.
      Processor (arbitrary :: ARBITRARY, systemClock :: SYSTEMCLOCK | eff)
   -> Aff (arbitrary :: ARBITRARY, systemClock :: SYSTEMCLOCK | eff) Unit
go process = do
 
user1804599
Going steady.
 
well
for one thing, I'm not actually sure if them having a standardised representation is even necessary
it's not really something I thought about before, but so far, pretty much all indications to me is that everybody knows what database they are using
but secondly, I figure that sending e.g. a C# AST/bytecode is no less abstract than sending an SQL string
it still doesn't dictate to the database how best to execute that code
 
nwp
3:16 PM
can someone explain to me why this compiles?
 
Is it possible to write a recursive method which does not use any auxiliary method and only takes one parameter, sorts the singly linked list?
 
nwp
@user2719152 yes, it is a typical homework problem and you can find it on Stack Overflow
but it is more fun to figure it out for yourself
 
@nwp const is shallow in C++
 
nwp
so it is supposed to compile? If that is true I'd consider it a bug in the standard
 
That is, b isn't const Base* const in const member functions, but only Base* const
 
3:21 PM
@user2719152 template<typename T> void sort(std::forward_list<T>& l) { l.sort(); }
 
nwp
@Puppy doesn't compile because std::forward_list has no random access iterators. Need to use l.sort();
 
ah, never had cause to use a forward_list.
or std::list really for that matter
 
@nwp That's how language works. If you want deep const, use D.
 
blech const
 
nwp
I don't like C++ anymore ... can't even get const correctness to work
 
3:27 PM
@Puppy Byte codes are no less abstract than SQL? What the hell are you smoking?
 
> Neural Networks Are Impressively Good at Compression
No surprise there. Learning and compression and deeply connected.
Also Fuck Capitalized Titles Like This
 
really depends on what the bytecode is.
there's nothing inherently less abstract about it.
 
@nwp b is const. That's why you can't assign another pointee to it in call_foo
 
nwp
ah, so b is const but *b is not
 
nwp
3:29 PM
Base * const b;
:(
still feels like a bug in the language
maybe I'm just confused and it is actually fine
 
@Puppy Maybe not inherently, no--but Microsoft's byte code? It's pretty much at the assembly language level.
By the time you get to a byte-code that has the same level of abstraction as SQL, you've basically just re-invented SQL, but with even uglier syntax.
 
user406009
@JerryCoffin It depends on the specific byte code.
 
@JerryCoffin Arguably, though, it's SQL with an uglier syntax that's never written by any human and can be generated from a range of source languages, which I think is still a big improvement.
LLVM IR's syntax is ugly as shit but that never stopped anybody using it ;p
so completely apart from the potential to design it for this purpose in the first place, or to offer a subset or such workarounds, I think you'd still win.
 
one often overlooked advantage of DSLs is that you can provide errors in terms of the domain, rather than generic ones - this is often very difficult if not impossible when coming out of some GPL abstraction
 
I'm not really seeing that
 
3:40 PM
@LucDanton à ce point ?
 
user1804599
lol, this library calls starting buffering "corking" and flushing "uncorking"
 
user1804599
I'd call it "fapping" and "ejaculating"
 
@DmitriBudnikov la défaite oui, l’ambiance nan ça va (enfin vu comme mon monde est classé d’habitude on va dire que jsuis entraîné)
 
@Zoidberg what
 
I haven't really noticed any better errors
but even if I had done, it's not necessarily comparable, since it seems to me like people invest way more time into those implementations
 
3:42 PM
@LucDanton ça peut être fun quand même si tu joues en guilde
tenir des objectifs par ex, c'est assez cool et ça peut se faire à surprenamment peu
 
@DmitriBudnikov je t’en reparle plus tard je file là
 
bon aprèm'
 
4:16 PM
@Puppy How is that an improvement? Lots of SQL is generated from a range of source languages. What is improved by making it so much uglier that nobody can or will write it directly?
 
4:31 PM
They even use orms to avoid sql.
 
4:43 PM
Flying Witch is an amusing anime.
 
user1804599
@fredoverflow look what I found
 
user1804599
 
recursion is nice
 
user1804599
@StackedCrooked @sehe security through obscurity
 
5:15 PM
@Zoidberg I wrote an IEqualityComparer with side effects :)
 
user1804599
@JohanLarsson :(
 
@StackedCrooked :)
@Zoidberg It is a nested private class so not as bad as you think
 
Ven
@Zoidberg #old
 
user1804599
 
> The spacecraft then automatically switched into a safe mode and, at about 4:10 a.m., fired thrusters to try to stop the rotation. But because the wrong command had been uploaded, the firing caused the spacecraft to accelerate further. (The improper command had been uploaded to the satellite weeks earlier without proper testing; JAXA says that it is investigating what happened.)
Gee, testing before deploying isn't rocket science.
 
Ell
@R.MartinhoFernandes ouch :/
it's such a shame
so much time and money
 
After that it went ballistic and parts started flying off.
Sounds like a normal day on KSP.
A spite house is a building constructed or modified to irritate neighbors or any party with land stakes. Spite houses often create obstructions, blocking out light or access to neighboring buildings, or as flagrant symbols of defiance. Because long-term occupation is at best a secondary consideration, spite houses frequently sport strange and impractical structures. Spite houses are much rarer than spite fences. This is partially attributable to the fact that modern building codes often prevent the construction of houses likely to impinge on neighbors' views or privacy, but mostly because fence...
 
6:34 PM
 
user1804599
I want roof tiles made of white phosphorus with a sodium coating.
 
@Borgleader love that one
 
@StackedCrooked there is a pedophile in that video
 
6:49 PM
ehh..my friends are all getting married, while I'm still here programming and playing video games
 
7:07 PM
@Khaled.K In some sense you could call it freedom
 
user1804599
7:19 PM
Writing lexers is easy with tail recursion: github.com/rightfold/lcx/blob/master/src/Language/LCX/…
 
7:40 PM
Uh
So I'm gonna install a variant of Linux on my derelict machine.
Any suggestions?
 
I have Ubuntu and Mint in a VM
 
Hm.
Let me rephrase.
OpenGl 4.x Development in a Linux machine
Which will give me the least amoutn of tears?
 
Bieduntu works v0v
 
8:06 PM
@DmitriBudnikov WvW activity numbers dump; highlights are +55% kills on EBG and +114% on borderlands
 
If class/objects can help you achieve something, you should use them
theres no paradigm, or?
 
wat
 
user1804599
8:20 PM
@ThePhD Gentoo
 
Trying to use JS for the server side of a web application might have been the biggest mistake of my life.
 
user1804599
RIP
 
The whole "non blocking callbacks are cool" culture is toxic
I hate callbacks. I hope they die.
 
user1804599
@Shoe You should get your stupid amputated.
 
user1804599
@Shoe use purescript-aff
 
8:27 PM
My stupid?
Are you a word?
 
user1804599
No
 
IDGI
 
user1804599
Use Haskell
 
user1804599
threads4life
 
8:33 PM
@sehe You should get your stupid amputated
 
user1804599
What's it called when a rasta is implementing concurrency abstractions? Thread locks.
 
get out
 
user1804599
😭
 
Ell
@Zoidberg lol
 
@Shoe Yes please
 
8:35 PM
I love that statement so much I might start using it whenever a newbie asks for help
Sounds like it would fit in almost all occasions
 
8:49 PM
Your mom:
Security through obesity
7
 
@Zoidberg Honestly though. You seem smarter than those in the JS room and more experienced. Do you feel like "everything must be a non-blocking operation" callback-hell thing makes sense in the context of something like Node?
Like I don't understand why would you non-block on something as inherently synchronous as "get request, do something, respond to request" kind of flow that you have with HTTP based things.
What are the use cases I should think about?
 
user1804599
@Shoe no, as I said many times, async I/O must be an implementation detail of the underlying runtime system, and lightweight threads must be provided on top of that.
 
user1804599
Like Erlang has been doing successfully for decades, Haskell for around a decade, and Go for half a decade.
 
user1804599
@Shoe because in Node you only have one thread, so if you would do that synchronously you could only ever handle a single request at once
 

« first day (2023 days earlier)      last day (2927 days later) »