« first day (1214 days earlier)      last day (3733 days later) » 

8:00 PM
@DeadMG I understand your point but let me explain... I was working on a project on file named "controller.js" and someone commited "Controller.js" from windows...
you have no idea how it blew up git... on windows
 
both file exists but you can't access both
 
user1804599
That would not have happened with case-sensitivity.
 
this fucking language and ecosystem are so annoying
why am I not a python developer
 
@LoïcFaure-Lacroix That is why Windows doing case-insensitivity is bad, fyi
 
8:01 PM
@rightfold same is true if all were case insensitive, but yeah it sucks
 
or a C# developer
they actually get things done
 
user1804599
Become a Haskell developer.
 
that's an option
 
Because you're a masochist or something
 
but I suck so much at Haskell
 
8:02 PM
Just stop writing C++
It's easy
 
@CatPlusPlus I kinda did if you hadn't noticed
 
user1804599
@BartekBanachewicz learn Haskell with rightfold.
 
okay
let's write something together.
 
Then lean back and laugh at people who still do
And write C# or whatever
 
Also btw, one fun fact. HSFS+ comes in two variant! Case Sensitive and Case Insensitive. If you do like me and reformat your drive to a case sensitive hsfs+. You won't be able to install photoshop
 
8:03 PM
Whasstheproblem
 
@CatPlusPlus well I liked minicraft project
I could try and port it to Haskell I guess
 
@LoïcFaure-Lacroix OSX sucks, we know
 
Not OSX but ADOBE
 
That too
 
@Loïc same for NTFS IIRC
 
8:04 PM
inb4 in the code of Photoshop there are place with
#include <utils.h> and #include<UtIls.H>
 
so, WRT Haskell
loop gameRef = do
    game <- readIORef gameRef

    let player' = moveRight (player game)
                  where moveRight = (position.x) `over` (+1)
        game' = game { player = player' }

    print $ player game'

    writeIORef gameRef game'
this code sucks, right? ^
 
What are the IORefs for
 
storing state
 
Also it doesn't loop
 
looks like you just wrote C++ but tried to convince yourself it was Haskell
10
 
8:05 PM
:v
 
Again why the fuck IORefs
 
main = do
    gameRef <- newIORef $ newGame
    forever $ do
        loop gameRef
        threadDelay $ 1000*1000
 
You don't gain anything by using IORefs here
 
@DeadMG yeah I get that too
 
"storing state"? Yes, it's terrible Haskell code.
 
8:06 PM
Just forever a StateT
 
Gosh even the puppy can tell.
lol
 
but some guy on SO said that StateT a IO () is suck
 
@R.MartinhoFernandes +1
 
@R.MartinhoFernandes That's the best part
 
so I wanted to try IORefs
 
user1804599
8:06 PM
@BartekBanachewicz It is not.
 
user1804599
@BartekBanachewicz Learning new things is always good.
 
@BartekBanachewicz Believe him! Save face!
 
@R.MartinhoFernandes fuck I said that it's bad upfront
 
IORefs is not an alternative to StateT.
 
@BartekBanachewicz So, the puppy picked up on your subtle hint. That's quite cunning of the li'll dawg
 
8:08 PM
okey so lemme rewrite that to StateT. I can do that already.
 
woof woof cocksuckers
 
IORefs are an alternative to STRefs when you are already within IO so you don't need to add ST.
 
user3010322
@R.MartinhoFernandes Or the deepest of oceans.
 
Note. It's not about /can/. It's about /do/.
I'm learning that everyday
 
user1804599
State is cool with lenses.
 
8:10 PM
Yes
 
STRefs are mostly a matter of optimisation or implementing certain datastructures.
As an optimisation tool, they're also quite finicky.
Sometimes rewriting code with ST makes it slower.
 
Ambiguous module name `Control.Monad.Trans':
uh oh
 
type t {
    x := int64;
    y := int64;
}
f(t arg) {
    return arg.x == 1 & arg.y == 2;
}
Main() {
    return f({1, 2});
}
I r winrar
 
I have found myself wasting time making code run slower with ST before. Not proud of it.
 
uh why is that import ambiguous :/
 
8:14 PM
Why are you importing that
Also maybe you fucked up packages again :v
 
Trans for liftIO, Trans.State.Lazy for StateT, Control.Monad for forever
@CatPlusPlus nah that was on other OS and it was related to different bindings
it was found in multiple packages: monads-tf-0.1.0.1 mtl-2.1.2
 
liftIO is in Control.Monad.IO.Class
 
@LoïcFaure-Lacroix One minor correction: Yes, you can access both. See FILE_FLAG_POSIX_SEMANTICS.
 
@CatPlusPlus isn't that different liftIO?
 
I don't know what monads-tf is, but you fucked up packages again, so congrats?
 
8:16 PM
ugh
how in the actual fuck
 
@BartekBanachewicz No, Trans reexports that
 
Xeo
just remove it with cabal?
 
cabal can remove things?
 
Xeo
well I'd guess so, since it can also install things :p
 
@Xeo There's no uninstall in its list of commands
 
user1804599
8:19 PM
Remove it from the list of dependencies in blabla.cabal.
 
user1804599
You don’t have to uninstall it.
 
apparently monads-tf is used by Control.Lens
 
ghc-pkg can unregister packages
 
user1804599
If you just invoke GHC directly you’re doomed anyway.
 
ghc-pkg: unregistering monads-tf would break the following packages: lens-3.10.1 MonadCatchIO-transformers-0.3.1.0 (use
--force to override)
ugh
 
8:20 PM
lens 4 doesn't have that MonadCatchIO-transformers dependency
 
hm
so I have old lens ?
 
Xeo
4 just came out
but I also have old lens and only transformers, not monads-tf
 
user1804599
@Xeo omg awesome
 
ugh also cabal keeps telling me there's a new version of cabal-install
 
You need to download the source and install it manually
Send thanks to Windows image locking
 
8:23 PM
@CatPlusPlus what?
can't I fucking unlock it or something?
 
cabal.exe can't update itself
 
And I don't think they implemented rename-then-delete
It's a p common problem
Windows is great
 
Xeo
I don't have a problem with updating cabal
 
I haven't tried in a while, maybe they did vOv
 
8:25 PM
@CatPlusPlus how hard can that possibly be
well anyway
 
It's not hard, you just have to special-case it
 
I've installed Lens 4
and removed monads-tf
 
Xeo
ah, fuck. nevermind what I just said. it can't update directory-..., and I guess the cause is that I'm on Japanese locale again... sigh
 
:lol:
Non-English locales are always terrible
 
Xeo
welp, gonna live with lens-3.10 a bit longer it seems
@CatPlusPlus yeah, but I need it
 
8:29 PM
Anything requiring non-English locales is even worse
(Also yeah I remember)
 
@BartekBanachewicz TODAY, FEBRUARY 11TH, 2014 IS
THE DAY WE FIGHT BACK
AGAINST MASS SURVEILLANCE
The Day We Fight Back
 
Cool story
 
Who?
What?
 
Why ping Bartek specifically?
 
8:30 PM
Also you're late, 11th is almost over
So good job buddy
 
jdjjdj
 
@TimTimmy your developer?
 
user1804599
I don’t care about mass surveillance, so I won’t fight back.
 
Whaaaaat?
 
8:30 PM
@TimTimmy that's p cool, but just send that to my skype next time
anyway
 
Getting angry on the internet will solve everything!
 
loop = do
    game <- get
    let game' = (player.position.x) `over` (+1) $ game
    liftIO $ print $ _player game'
    put game'

main = do
    forever $ do
        runStateT loop newGame
        threadDelay $ 1000*1000
here's the improved version
 
What's the best way to check if a container has no duplicates?
 
how do you print an array using pointer notation? i have a 2d array but it only prints the 1st column ideone.com/qkGX65
 
In standard C++?
 
8:31 PM
@CatPlusPlus Of course :)
 
user1804599
@Mr.1.0 ugh pointers.
 
@EtiennedeMartel Use a set
 
@Mr.1.0 don't use pointers.
 
@CatPlusPlus It's for unit testing.
 
user1804599
@BartekBanachewicz loop function does too much.
 
Xeo
8:31 PM
@BartekBanachewicz player.position.x %= (+1)
 
user1804599
Also I’d call it step, not loop.
 
@EtiennedeMartel Best in what way? Fastest? Simplest?
 
@EtiennedeMartel Setify and compare sizes vOv
 
user1804599
@Xeo I like succ. :)
 
user1804599
:14642514 get out.
 
8:32 PM
@JerryCoffin A colleague of mine wants to make sure that his container has no duplicates.
 
@rightfold Sure ;)
 
@rightfold you read my mind
 
@TimTimmy Calm down. Damn.
 
Xeo
@EtiennedeMartel yeah, setify it
 
I AM CALM!!!!
 
8:32 PM
Alright.
 
Ja, ich bin sehr sehr anstrengend?
 
Thanks, ladies.
 
user1804599
 
Danke
 
No prob nerd
 
8:32 PM
@rightfold hm that sounds reasonable
 
@CatPlusPlus and you're no nerd with your monocle?
 
Xeo
@rightfold actually
 
I'm supernerd king of nerds
 
@Xeo is that fancy op for over?
 
Xeo
player.position.x += 1
 
8:33 PM
@CatPlusPlus ah ok, I thought you were going to deny it.
 
user1804599
@BartekBanachewicz no.
 
@EtiennedeMartel Insert items into unordered_set. If any insert fails, the item wasn't unique.
 
Xeo
@BartekBanachewicz over in a state monad
 
user1804599
It automatically does the state update too.
 
user1804599
8:33 PM
step = player.position.x += 1
 
how cool is that
 
Xeo
normal over is %~
 
I <3 you Haskell very much you're the best.
 
posted on February 11, 2014 by Eric Battalio

You don't need to call Ghostbusters. Spend some time (re)reading some great posts from the Visual C++ team blog past. There really are some hidden gems in there! C++ Debugger Tips by Sergey Grankin (8/2006) describes the "special expression and...(read more)

 
user1804599
@Xeo what do you mean?
 
Xeo
8:35 PM
@BartekBanachewicz That's why I always mention lenses with State
 
@Xeo sort + adjacent_find ?
 
user1804599
Well, step = player.position.x %= succ has always worked for me. Never used +=.
 
Xeo
@rightfold nvm
 
@Borgleader Silly
 
Xeo
@rightfold well, it amounts to the same
 
8:36 PM
You're assuming elements have an ordering for no reason
 
wait how do I hold state with forever
 
Xeo
@Borgleader sort+unique would simply get rid of dupes
 
user1804599
@BartekBanachewicz you use the state monad.
 
hmmmm sec
 
user1804599
Note that forever just does >>= internally.
 
8:37 PM
runStateT (forever whatever) state
Should work
 
user1804599
It doesn’t discard the return value and then somehow magically does runState again.
 
@CatPlusPlus set does too, so I don't see why my solution is worse because of it
 
@Borgleader No, it doesn't. unordered_set only needs hashing and equality
 
You said use a set, not unordered_set =/
 
Both are sets, I didn't say anything about specific types, gah
Do you also look for "any" key on keyboards
 
user1804599
8:41 PM
Who looks for keys on keyboards?
 
@rightfold maybe when I use azerty
 
user1804599
Those do not deserve the term “keyboard.”
 
hahahaha
 
@rightfold Well I tried it as an exercise. I found the keys quite quickly.
 
main = do
    runStateT loop newGame where
       loop = forever $ do
           update
           draw
           liftIO $ threadDelay $ 1000*1000
 
user1804599
8:44 PM
Y u allow draw to modify state.
 
yeah I see it too
 
user1804599
get >>= liftIO draw
 
sec
@rightfold don't spoil :)
 
@rightfold not often. Though my work keyboard annoyingly mixes up the "/' and |/\ keys next to a idiotically small Enter key. So I've learned to check my fingering there (because it's just annoying to hit enter by mistake)
 
user1804599
@sehe get new keyboard newb.
 
8:45 PM
@rightfold but :time:
 
Keep him refrigerated.
 
user1804599
@sehe yeah hitting enter all the time for a few years will certainly take less time than ordering a keyboard online and having it delivered to your workplace by the weird friendly people from DHL.
 
user1804599
Also frustration.
 
@rightfold how/why would I order a keyboard online. I don't intend to order a dozen until I find the right one
@rightfold that. truth
 
user1804599
@sehe The same one as the one you use at home.
 
user1804599
8:48 PM
I just like only one kind of keyboard and I stick with that. :>
 
@rightfold hm I can't do that simply for some reason
 
I'm a coward when it comes to puchases. I want to touch it first
 
update = player.position.x %= (+1)
draw game = liftIO $ print $ _player game

main = do
    runStateT loop newGame where
       loop = forever $ do
           update
           get >>= draw
           liftIO $ threadDelay $ 1000*1000
 
user1804599
@BartekBanachewicz How about a reader for draw.
 
@rightfold which one (you told before I think)
 
user1804599
8:49 PM
@sehe Apple keyboard without numpad.
 
user1804599
Numpad gets in the way while using mouse.
 
Xeo
wat
 
user1804599
Not that I ever use a mouse when not playing Minecraft.
 
@Xeo Apple users vOv
 
@rightfold tell me why didn't liftIO work first
 
Ell
8:50 PM
@R.MartinhoFernandes what is the p&p game you play?
 
user1804599
@BartekBanachewicz dunno.
 
user1804599
SSCCE pl0x.
 
Couldn't match expected type `IO (StateT a1 m1 a0)'
            with actual type `Game -> IO ()'
In the first argument of `liftIO', namely `draw'
In the second argument of `(>>=)', namely `(liftIO draw)'
In a stmt of a 'do' block: get >>= (liftIO draw)
I thought about liftIO (get >>= draw) but that turns IO too early
 
user1804599
Also IIRC getting lenses work with readers so that may be nice.
 
Xeo
get >>= liftIO . draw, or liftIO $ get >>= draw
 
user1804599
8:52 PM
@BartekBanachewicz get >>= liftIO . draw
 
@Xeo the latter won't work
@rightfold okay
I am trying to understand why now
 
Xeo
it should be the same as the former, no?
 
too much functional
lets talk about something fun
 
@Xeo it lifts get
 
Xeo
we are
 
8:53 PM
@TonyTheLion this is extremely fun
 
user1804599
@BartekBanachewicz wait a second.
 
@BartekBanachewicz $ has higher priority than >>=?
 
user1804599
 
user1804599
@AndyProwl $ has lowest precedence of all operators.
 
user1804599
And space has highest.
 
8:55 PM
@rightfold That's what I thought. But Bartek said it would lift get
 
well get becomes a combined action with draw
if you lift that it can't... get
 
Good to see how Haskell makes stuff as complex as a game loop with two calls and a sleep so easy.
 
user1804599
@Xeo the latter runs get in the I/O monad and not in the state monad.
 
user1804599
That is type erreur because get wants state monad.
 
8:56 PM
@rightfold this exactly // @Andy
 
Xeo
@rightfold yea, right
 
@BartekBanachewicz I see
 
room topic changed to LoungeᑆC⧺ᐴ: French fries, now with more C++ than ever. [no-�] [no-⍰] [no-c⨤⨥] [no-thank-you]
 
@MartinJames we're all just suck apparently :D
 
user1804599
@sehe C#?????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
8:58 PM
It's not a #
 
user1804599
I like >>> better than ..
 
user1804599
I think I am going to use it more often.
 
It's just two very slim +
 
Oh god. I think it's not very world-browsery-friendly
 
Xeo
overlapping ++
 
8:58 PM
double-plus
 
user1804599
get >>= runReaderT draw >>> liftIO :D
 
Xeo
arrows whee
 
room topic changed to LoungeᑆC⧺ᐴ: French fries, now with more C++ than ever. [no-thing]
 
user1804599
@Xeo I never got arrows.
 
user1804599
I cannot think of anything you would instantiate Arrow for besides functions.
 
user1804599
8:59 PM
And I find that Kleisli wrapper thing fugly.
 

« first day (1214 days earlier)      last day (3733 days later) »