« first day (2204 days earlier)      last day (2970 days later) » 

11:01
I had a Problem, and I used ADO.NET, and now I have a ProblemRepository and a ProblemSaveService.
@Puppy if you want a ProblemDuplicator you can save some code and just forward it to a regex engine
@nwp Thanks, I'll take a look
11:17
@Puppy I don't remember seeing Repository (well, maybe but never used) or SaveService in all my years of OleDB, MSADC, MSADO+MSDTC, ADO.Net
@orlp hey, his history isn't very far away
it'll be like visiting a bro
I am a new user and asked a very genuine question at stackoverflow.com/questions/40303572/…
why so much hate, why did i get negative points??
A loaded question or complex question fallacy is a question that contains a controversial or unjustified assumption (e.g., a presumption of guilt). Aside from being an informal fallacy depending on usage, such questions may be used as a rhetorical tool: the question attempts to limit direct replies to be those that serve the questioner's agenda. The traditional example is the question "Have you stopped beating your wife?" Whether the respondent answers yes or no, they will admit to having a wife and having beaten her at some time in the past. Thus, these facts are presupposed by the question, and...
Is itnot a good question, its GENUINE!!!!
And you're barging in shouting and whining. What do you expect us to do?
11:22
@Vedant Because you begged for it here...
You just got lounged mate /cc @Xeo
@sehe Im not! I want YOU to improve it
user1804599
@GundolfGundelfinger It's so small it gets inlined everywhere anyway, where it gets optimized there.
if you can
@rightfold Irrelevant
My question was "I thought optimisers reasoned in a strictly single-threaded universe, unless explicitly specified otherwise?"
And @Griwes provided a satisfactory explanation
Actually it's Griwes' comments that makes this answer, tbh.
@GundolfGundelfinger ...all I did was do a google search for site:eel.is/c++draft data race and scrolling past irrelevant defintions, lol.
11:25
@Vedant Get out
user1804599
@GundolfGundelfinger If I wanted to answer your question then I would have replied to the message your question is in.
Thanks for admitting your contribution was offtopic
oh that burn
you got rightfolded
hard
Thanks @sehe for what you ddi there on my question to @IInspectable. i appreciate it!
11:30
void some_foo(Type const& some_arg) {
    Type copy = some_arg;
    do_stuff_on_type(copy);
    // ...
}
Everywhere in the codebase :(
Ven
Ven
umad
what the fuck is that flag
Ven
Ven
mads bc bads
A national symbol?
btw
I've only recently realized that you can open multiple folders in one ST window
this is a gamechanger
what? really?
Impressive
It always opens a new window for me
@milleniumbug drag the folder to the window
heh, they couldn't hide this better
gotta try it
Any feature that involves dragging the mouse is bad.
@sehe I am p sure you could do that programatically in some way
ST exposes itself as a python shell
11:40
I'd sure hope so
Ell
Ell
are there any text editors exposing a statically typed api?
or language I mean
what does that even mean
@Ell Leksah prolly
maybe Yi as well
Ell
Ell
@GundolfGundelfinger I mean where the api is statically typed
:V
most of the statically typed languages don't have shells unfortunately
11:42
@Ell I don't understand what you mean by "text editor exposing a statically typed api"
I know Rust, Haskell and Terra
and Scala I think
Ell
Ell
Well, emacs uses elisp
which is not statically typed
let me find an example
using ASP has made me rethink my stance on whether C# is statically typed :P
@R.MartinhoFernandes This is fucking right.
@R.MartinhoFernandes lololo
but are they containerized
11:44
Jesus fuck, if you map any container's port to a port on the host, docker will tamper with your iptables rules and make that port accessible to everyone from the outside.
WHO THE FUCK
Seriously.
@Ell can you recommend any resources about ruby idioms
Ell
Ell
@BartekBanachewicz not really, I haven't written it in years now
This is overreaching of systemd proportions.
5
Ell
Ell
what I think is idiomatic is probably out of date vOv
I'm kinda enjoying this language
I like the interpolation syntax
11:45
HOW IS THIS
@R.MartinhoFernandes webdevs
I really can't believe someone thought this was a good idea.
Ell
Ell
@BartekBanachewicz please tell me this isn't the first time you've written ruby
Not only it was a good idea, it was a good idea for obvious reasons that you can't understand.
@Ell Well I'm not writing real apps in it
Ell
Ell
11:46
@GundolfGundelfinger for example, from here: https://www.gnu.org/software/emacs/manual/elisp.html#Insertion it has:
> Command: insert-char character &optional count inherit
This command inserts count instances of character into the current buffer before point. The argument count must be an integer, and character must be a character.
instead of documenting "The argument count must be an integer, and the character must be a character", the function should be typed
use typed lisp
alternatively don't use emacs
wow bartek using ruby we're reaching new levels of nonsense
14
Ell
Ell
@GundolfGundelfinger which text editor exposes a typed [lisp] interface?
> the default behavior in Docker is desirable, as you want to expose 80 and 443 to the world.
> Class variables are available across different objects.
And of course all the idiots defend this stupid behaviour.
11:49
so they are static variables
Ell
Ell
@BartekBanachewicz yes
3 mins ago, by Gundolf Gundelfinger
Not only it was a good idea, it was a good idea for obvious reasons that you can't understand.
wait how do I type the class variables
Yes, if you ask to expose port X, you want to expose it, but ffs, not necessarily to the world.
And more importantly, not by default to the world without any way to change that.
(Other than fixing up the iptables rules manually every single time)
@R.MartinhoFernandes That's PHP mentality. Source?
Ell
Ell
@BartekBanachewicz you can add an accessor on the metaclass
or do you mean @@my_class_variable?
@sehe There's a bunch of people complaining all over. One on SO: stackoverflow.com/questions/35574569/…. I can confirm it works abuses as described.
@Ell I mean can I restrict their types?
Also note the idiot comment saying "note that I do not get the part of publishing a port if you do not want anyone to connect to"
Ell
Ell
@BartekBanachewicz oh
I presume not
11:53
if not, I am not sure why is this called a class
Ell
Ell
It is a class in the OOP sense
can I error out of object creation if types passed don't fit me?
(which is retarded and primitive but I hope I can at least do that)
Ell
Ell
@BartekBanachewicz well you can throw an exception in the constructor if that's what you mean?
Can we have some more close votes here stackoverflow.com/q/40303572/85371 I think IInspectable is right after all and the question is ill-purposed and not useful
11:56
As if either you don't want to publish a port or you want to give access to it to every fucking toaster out there.
It's like having `GatewayPorts yes` in the global section of `.ssh/config`
By default. Not configurable.
@sehe No, it isn't. GatewayPorts doesn't mess with iptables like that.
Erm. Yeah. I forgot about that epic extra layer of stupid
class Hello
  def method1
    @hello = "pavan"
  end
end

h = Hello.new
p h.instance_variable_get(:@hello) #nil
p h.method1                        #"pavan" - initialization of @hello
p h.instance_variable_get(:@hello) #"pavan"
wait what the fuck
seriously?
h.instance_variable_get(:@hello) is how you get h.@hello?
If you expose something via GatewayPorts with a firewall defaulting to DROP you still can't connect.
user1804599
11:58
@BartekBanachewicz Instance variables are kind of private.
I understand. You're right.
@rightfold "kind of"
user1804599
Use attr_accessor :hello in the class definition.
user1804599
It generates a getter (and maybe a setter, dunno).
11:59
so I have to type the variable name three times
still better than C++
What's the appropriate response to this?
I'm always surprised rightfold has all these languages at the ready
Other than just getting the emails of all docker devs and emailing them "You're fucking stupid", I mean.
user1804599
@BartekBanachewicz boilerplate generation with metaprogramming: ruby-doc.org/core-2.2.0/Struct.html
nwp
nwp
@R.MartinhoFernandes Find someone who has been angry enough to write a docker script generator that takes a script with sane defaults.
12:00
@R.MartinhoFernandes File a security issue. Really. At the very least the default should not be this. Maybe with an '--add-iptables-exceptions' flag.
@rightfold nice! now we're talking
Amazing, there's an issue filed to make this even more pervasive.
Wonko the Sane strikes again.
Ell
Ell
@rightfold yeah both
attr_accessor x is the same as attr_reader x and attr_writer x
@sehe There's an option to disable all the iptables shenanigans, but then a shit ton of things stops working.
user1804599
attr_reader generates only a getter.
user1804599
12:01
Right.
Ell
Ell
@BartekBanachewicz three times?
Ven
Ven
GDB from emacs: Not convinced.
@Ell oh sorry actually four
Ell
Ell
why?
user1804599
@Ell attr_reader :foo, def initialize(foo), and @foo = foo.
Ell
Ell
oh
@R.MartinhoFernandes It's still better to have that as a default. What shitton of things? Wouldn't it just be a breaking change that users could "opt out of" by setting the required config flag globally? Like sqlmode="" for Mysql to keep the old broken behaviours?
I am going to rate OOP languages by that metric now
Ell
Ell
well you could write mything = Struct.new(:foo)
how many times do I have to repeat the member variable name
Ell
Ell
12:03
then you only write it once :3
user1804599
Fun-fact: Ruby stores the @ in memory, in the key in the hash table of instance variables.
3 mins ago, by Bartek Banachewicz
@rightfold nice! now we're talking
Ell
Ell
you might have to require "struct", can't remember
@sehe True that it's a better default, but it doesn't help me to get a decent setup.
@rightfold can I named-initialize them (like kwargs?)
user1804599
12:04
No, I don't think so.
Ven
Ven
@Ell no you don't
That's what I thought
Ven
Ven
@BartekBanachewicz yes. Ruby has had kwargs since 2.0
user1804599
Do you mean like NSDMIs?
user1804599
I'm confuzzled.
12:05
Foo = Struct.new(:bar)

foo = Foo.new(:bar = "baz")
@rightfold like this
@sehe Containers lose access the Internet because the NAT rules are gone.
So you have to add them by hand.
user1804599
I have no idea.
user1804599
Last time I used Ruby was pre-kwargs.
9
A: Named Parameters in Ruby Structs

clackeThe less you know, the better. No need to know whether the underlying data structure uses symbols or string, or even whether it can be addressed as a Hash. Just use the attribute setters: class KwStruct < Struct.new(:qwer, :asdf, :zxcv) def initialize *args opts = args.last.is_a?(Hash) ? a...

@BartekBanachewicz what's going on there?
Ven
Ven
12:06
actually it's still in PR only: github.com/ruby/ruby/pull/1468
i only remembered the PR
See, I want docker to mess with iptables, just not in a way that pretends it owns the system.
Ell
Ell
@rightfold same
@thecoshman I'd like the bar member to be initialized with baz
nwp
nwp
@R.MartinhoFernandes Put docker in a container and manage the container by hand. Wait...
mostly for backwards compatibility
12:07
2
A: Docker ignores iptable rules when using "-p <port>:<port>"

larsksYour iptables configuration looks a little broken right now, as if you cleared it out at some point without restarting Docker. For example, you have a DOCKER chain available in both the filter and nat tables, but no rules that reference it, so rules placed in that chain will have no affect. In ...

maybe I should just use a hash
@BartekBanachewicz where there are other members?
Isn't that just named variables?
Ven
Ven
class MethodHash < Hash; def method_missing(m, *a, &b); self.send(:[], m, *a); end;end;
Ven
Ven
[or something] :P
12:10
@R.MartinhoFernandes Still NAT seems enitrely different from opening up existing rejects
:S I think I may have created a horrible monstrous thing
            node_config = {
                technology: config[:technology],
                vagrant_cfg: vagrant_cfg,
                required_cookbooks: config[:required_cookbooks]
            }

            configure_node(node_config)
No response since 2015
I think a Hash will do fine
> next goal: youProbablyWantCapitalCabal (dependency of cabal-0.0.0.0)
Filing under "epically bad error messages"
Ven
Ven
12:11
:c
why u cabal
don't
@sehe Exactly. But you can only expose everything, or not have NAT (which is quite a dealbreaker because then you need to link containers manually and such shit)
@Ven What else do you suggest?
Ven
Ven
stack
Hmm. How?
me@mine:~/custom/leksah$ cabal install cabal
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: cabal-0.0.0.0 (user goal)
next goal: youProbablyWantCapitalCabal (dependency of cabal-0.0.0.0)
Dependency tree exhaustively searched.
me@mine:~/custom/leksah$ cabal install Cabal
Resolving dependencies...
Downloading Cabal-1.24.0.0...
Configuring Cabal-1.24.0.0...
Building Cabal-1.24.0.0...
Context 6
Ven
Ven
cabal is dogshit
12:13
@sehe do you want to build Leksah or do you want to write Haskell?
I've reached that conclusion a few times before but (a) everything recommends it/mentions it (b) I assumed I was inexperienced
back when I tried haskell
@sehe there's a bit of a conflict, but for beginners stack is generally recommended
@BartekBanachewicz Both. I was intrigued so I decided to install it. Whoosp -> to the website, get install instruction, be very happy it mentions magic word "sandbox" and start.
I installed the haskell platform
it worked well
12:15
Yeah I had no problem back in my "Hello world" days
used ghci and a text editor
Ven
Ven
cabal is nice so long you don't have to use it
Refer here for explanation of differences between installers @sehe @AlexM.
Ven
Ven
actually cabal is nice so long you only have a single haskell project on your computer
even sandboxes don't fucking work and corrupt other installations of packages
why ping me thoe
12:16
@BartekBanachewicz I'd rather have a concrete pointer on how to use stack to get leksah
@Ven This corroborates my experience, yes
Or vice versa
Ell
Ell
I tried to use stack
> I have have sent several emails about this issue to [email protected] without receiving a reply (the earliest being 3 months ago), so I'm opening the issue here.
Ell
Ell
Wouldn't install, I can't remember why
> I wouldn't classify this as a vulnerability. For some users, it's a feature.
GOSH
FUCK THIS
I'M OUT
You can stop pretending, guys.
@sehe Leksah seems to depend on Cabal. What did you do so far to install it?
12:18
I know it's all a huge prank.
@R.MartinhoFernandes LOL
You can show me where the cameras are.
@R.MartinhoFernandes you spent a lot of time you're not going to get back on this so that's wise :P
It was funny.
But I need to get shit working.
@sehe one thing that could help would be getting a stackage snapshot for Cabal. This is a text file that lists compatible versions of packages to install. If Leksah builds against a stackage snapshot, you should be good to go; if not, it's a more complex problem
12:19
> In your example you're describing an insecure host configuration, but that doesn't necessarily mean there is a vulnerability in Docker.
You can get a snapshot here
Note that using stackage snapshots doesn't require you to use Stack; you merely need to download the file and place it next to the .cabal file
@BartekBanachewicz paste.ubuntu.com/23392529 roughly
lol, I found four issues on this. One has only ping replies, another is closed, and two others are full of replies of Trump-level insanity.
@BartekBanachewicz I have no clue how to start that
@BartekBanachewicz looking
@BartekBanachewicz What .cabal file?
@sehe To install a local package, you're supposed to write cabal install, not cabal install leksah - the latter would try to access the version online
12:21
Which is my intent
@sehe Roughly this one
@sehe oh, so you're not building from local sources
What's the gain in having to get the source code tree locally first? Would it scale if I had to do that for all the dependencies?
I misunderstood that
@BartekBanachewicz Not unless I have to
@sehe you wouldn't need to do that for dependencies
@sehe ok. Let me boot up my system and see how it goes for me
user1804599
12:25
My uncle looks like Ben Crabbé.
@sehe how did you install GHC again?
with apt? (sudo apt-get install -y cabal-install-1.22 ghc-7.10.3 ?)
I'm not sure. It comes with cabal I suppose? Apt then
@sehe like above?
Nah. Just sudo apt-get install cabal-install
Thanks, @Griwes.
12:28
Didn't know @sehe does Haskell.
I still can't believe this idiocy.
@sehe on Ubuntu?
yesh
sorry for all the questions, I'd like to get a setup that's close to what you have
Lol. Found more up-to-date stuff to build Leksah from source. Wants me to do:
> cabal update
cabal install alex happy
cabal install haskell-gi
user1804599
12:28
Install GHC through Stack.
Of course, that completely fails
user1804599
Install things through Stack.
@rightfold we'll get to that
@rightfold I keep asking "how" :)
@R.MartinhoFernandes I couldn't not do that, that sentence is so absurd that I just had to point it out by quoting it separately so maybe someone sees how idiotic it is.
user1804599
12:29
@sehe Install Stack, then run stack setup.
@sehe It wants you to make @AlexM. happy?
user1804599
To subsequently run GHC, run stack exec -- ghc.
user1804599
Or maybe just stack ghc.
wait rightofld
it's easy for @sehe to make me happy
12:29
he wants to install a program, not to get an environemnt
we can start with a nice evening out at a pizza place
:P
user1804599
Install the program through Stack.
user1804599
No more chance of version constraint hell.
@sehe cabal -V please
@BartekBanachewicz I was just removing all traces of the stuff I had installed. It got borked in minutes, so let's start fresh
12:31
@sehe oh shucks, let me trash this box as well then
or actually I'll just pop up a new one
My machine WAS virgin state this morning. Since I nuked it yesterday :)
k I'm running simultaneous install via apt and Stack
user1804599
fuck
user1804599
ginger ale in my eyeball
@BartekBanachewicz I think the latter comes in handy if I am to create a project in that IDE
12:33
well since I'm doing both I can report on how both went
Altough I wouldn't strictly recommend Leksah for haskell development myself
Oh
Vim + plugins?
based on my history of reading haskell things
nobody really recommends leksah for haskell development
Speaking of GHC, my debian sid's dist-upgrade is telling me it'll uninstall GHC if I proceed.
I personally do just fine with a text editor and a shell
12:35
@BartekBanachewicz Currently trying with stack:
> git clone --recursive https://github.com/leksah/leksah.git
cd leksah
stack install alex happy
stack install haskell-gi
stack install gtk2hs-buildtools
stack install
Told me indeed stack setup is in order /cc @rightfold
No, wait. GHC seems to be staying, it's haskell-platform that appears to be going away.
I wonder what kind of a transition is this.
@sehe leksah won't build under lts-7.x I think
why not download and run binaries tho
It'll require lts-6.x resolver
@AlexM. because he also wants an env
unless you hack leksah I don't see any benefit to building from source?
user1804599
12:38
@sehe :P
@BartekBanachewicz env?
development environment
but his problem is that he cannot compile leksah no?
@sehe if you just do stack setup it will get latest lts, which is 7.5
Still can't get over it. I need coffee.
12:40
what you'd need is stack setup --resolver lts-6.x and then install with that resolver
6.23 is almost OK
I guess the rest of the day will be code reviews. I'm too upset to write any more code.
dang it
cpphs 1.20.1 is present in all 6.x sets
gimme a sec, I'll try forcing an older version and see if it blows up
see if you used windows! haskell.org/platform
easy
you double click
and bam
haskell
and getting leksah is double clicking leksah-install.exe
tho the platform seems to also be available on linux
I did not know that
Ell
Ell
12:44
I thought the haskell platform was deprecated
dunno
@R.MartinhoFernandes there's a reply to that issue that's somewhat related to coffee now. ;D
it kinda is
@rightfold You have the weirdest fetishes. :)
So I have some generate data types that all have a similar structure, but different type names and some subtle function name differences... and I need to perform some logic over them all... so I've made a sort of facade system that let's me say what concrete types I want to support and what methods I want to use, providing a 'common' name, and then what the real name is. I then use reflection to invoke the correct method.
I think If I have this correct... all I have to do to support new types is configure them in a mapping structure, "this type has these functions mapped from this common name to this implementation name"
but it seems made that I am doing this...but I also don't see a simpler way :S
nwp
nwp
The inner-platform effect is the tendency of software architects to create a system so customizable as to become a replica, and often a poor replica, of the software development platform they are using. This is generally inefficient and such systems are often considered by William J. Brown et al. to be examples of an anti-pattern. == Examples == Examples are visible in plugin-based software such as some text editors and web browsers which often have people creating plugins that recreate software that would normally run on top of the operating system itself. The Firefox add-on mechanism has been...
12:51
I don't think it's that...
I just want to be able to use the same logic over a few different sets of types...
fairly sure facade is the solution to this...
@sehe so after cloning and running stack setup and then stack build it started to build for me
nwp
nwp
58
Q: Iterating over different types

nwpGiven the following code: struct Window{ void show(); //stuff }w1, w2, w3; struct Widget{ void show(); //stuff }w4, w5, w6; struct Toolbar{ void show(); //stuff }t1, t2, t3; I want to show a bunch of items: for (auto &obj : {w3, w4, w5, t1}) obj.show(); However...

I have to run soon
Oh, this is Java btw :D
@thecoshman good luck then
@thecoshman java isn't exactly well-known for its abstraction support
13:07
@BartekBanachewicz paste.ubuntu.com/23392669
@BartekBanachewicz hmm reading that now
@BartekBanachewicz you have to run, you can't walk??
Enough of this nonsense. rm -rf ~/.stack/ ~/.ghc/ ~/.cabal/ ~/custom/leksah; sudo apt-get purge haskell-stack
13:27
:D
Ven
Ven
@sehe :)
user1804599
13:51
Is there a nice WYSIWYG math notation editor?
> nice
> WYSIWYG
@rightfold closest I've seen was mathematica IIRC Never liked it
user1804599
Ok :p
@rightfold Word has one, though I haven't used it myself
user1804599
14:08
I hate this kind of code
@ratchetfreak LibreOffice has one too IIRC
/cc @rightfold
user1804599
14:31
subtract :: forall a. (Ring a, Ord a) => a -> a -> {result :: a, underflow :: a}
subtract a b
  | a - b >= zero = {result: a - b, underflow: zero}
  | otherwise = {result: a, underflow: b - a}

main = do
  quickCheck \a b -> (a `subtract` b).result >= 0.0
  quickCheck \a b -> (a `subtract` b).underflow >= 0.0
user1804599
This function is great.
user1804599
For cascading stock reservation. :p
user1804599
14:41
@sehe rad
"ass-backwards" is autological.
user1804599
"word" is too.
In other news, Alpine Linux doesn't use systemd, which immediately makes it fucking awesome.
user1804599
Windows doesn't use systemd either, and it sucks balls.
Alpine Linux
for the goat in you
user1804599
14:51
@sehe this website

« first day (2204 days earlier)      last day (2970 days later) »