« first day (2030 days earlier)      last day (2919 days later) » 

user1804599
1:01 PM
checkVE (NameVE _ name) = (view eVSs >>=) $ Map.lookup name >>> \case
                            Just t  -> return $ NameVE t name
                            Nothing -> throwError (ValueNotInScope name)
 
user1804599
eek ugly
 
Ven
get a function that unwraps and throws an error for Nothing
 
user1804599
1:14 PM
nah this is fine
 
user1804599
 
Ven
1:25 PM
..weren't you gonna do snek in Hack for plugins?
 
user1804599
fuck Hack
 
user1804599
Haskell all the way
 
user1804599
write your stinking plugins in Lua or something
 
user1804599
1:45 PM
Woo this expression now results in a type error!
 
user1804599
 
user1804599
Because lower-case lambda parameters must be of types with kind *.
 
-1
Q: how to search for the user using her/his fingerprint VB.NET

J.S.OI have fingerprint reader secugen and I have been able to get my application to control the fingerprint device by scanning fingerprints and I have been able to save them to mysql database! I still have but one challenge: After saving the fingerprints (fp_image) to the db, I now want to search fo...

 
downboats for everybody
 
indeed
make the world a better place
 
1:55 PM
@J.S.O Why are you posting this here?
We dont do VB.NET
 
Ven
thanks for helping us cleaning up this place, @J.S.O :)
 
user1804599
Drive-by linking ✓
Wall of code ✓
Highly ambitious non-trivial problem ✓
VB.NET ✓
MySQL ✓
 
user1804599
That's worth at least one downvote per ✓, which amounts to a total of 5 downvotes.
 
Ven
Posting a question in the lounge is pretty much like handing yourself over to the police after committing a heinous crime.
 
Someone's going to be unable to ask questions for a while...
 
1:57 PM
@Owatch I looked at somebody's chat history, somebody keeps posting his questions in chat
 
Ven
:)
 
Really? Who might that be?
 
I always do research. But I don't have the time,so I thought "yeah ask the peoples, that can be much faster and easier!". Don't understand me wrong. I'm programming a lot and try to get all by myself but sometimes it's better to ask other. — Victor P. 8 mins ago
 
user1804599
@Ven I'm going to do more of a PS-style interop approach
 
"I always do research, except this one time when I can't be arsed"
 
user1804599
1:59 PM
Not mapping 1:1 to PHP/Hack constructs.
 
About £349.95 at some stores — Ed Heal 10 mins ago
 
Ven
okay.
 
user1804599
Not like Scala.
 
user1804599
Much simpler.
 
user1804599
Also not generating Hack anyway since that's stupid if I have my own type checker.
 
Ven
2:02 PM
:P
swappable backends and a future to-jabbascript transpiler compiler
 
user1804599
yay
 
user1804599
victory
 
2:17 PM
Is this an e-mail ? chris@kohlhoff.com think-async.com/Asio/CommercialSupport
 
2:41 PM
right, stalk people and post their emails here is really going to help
 
user image
5
/cc @Morwenn
 
@Zoidberg Looks unreadable
 
user1804599
Not to me.
 
2:58 PM
is any of you guys and girls familiar with calulating normalised power?
 
no.
 
A website calculator beat my root finder almost instantly... damnit
 
Ven
3:32 PM
@Shoe well, rightfold has always been terrible at comments
5
 
user1804599
3:47 PM
I worked on a proposal to make equality tests typesafer: http://www.scala-lang.org/blog/2016/05/06/multiversal-equality.html.
 
user1804599
@Ven
 
user1804599
Eq[T, U] instead of Eq[T] is interesting
 
Ven
so much for heteregeneous equality.
 
user1804599
Classic Odersky
 
Ven
@Zoidberg make it a compiler flag
 
user1804599
3:58 PM
?
 
Ven
/noAnyEq
 
user1804599
I have no idea how to do that.
 
Ven
ask odersky
 
user1804599
4:12 PM
yay reader werks
 
Ven
gg
 
user1804599
So much easier with Alex and Happy than with Parsec.
 
user1804599
Now the parser.
 
Ven
May 2 at 20:29, by Zoidberg
Alex and Happy are so much better than Parsec.
May 1 at 11:32, by Zoidberg
Alex and Happy are so much better than Parsec.
ugh, I hate that pop on a scalar is experimental...
 
user1804599
lol
 
user1804599
4:21 PM
sub pop_scalar {
    pop @{shift()};
}
 
user1804599
poplem solved!
 
Ven
XD
 
user1804599
I'm doing S-expressions this way:
 
Ven
while ($_ = pop @{$runtime->{nodes}}) {
ew :[
 
user1804599
symbol
(l i s t)
[a r r a y]

(f g h) ; f(g)(h) in Scala
[f g h] ; f[g][h] in Scala
 
Ven
4:24 PM
(c a l l)*
 
user1804599
That's how the parser interprets it.
 
user1804599
The reader doesn't care. It just sees a list.
 
user1804599
parser converts S-expressions into ASTs
 
Are you also writing a game rightfold?
 
Ven
no lol
 
4:29 PM
18 hours ago, by Zoidberg
I want to make a video game
So you didn't follow through
 
Ven
> rightfold
> following through
 
user1804599
@Shoe No, a compiler.
 
I want to make a video game.
code C++ for shit and food
 
user1804599
(x) is gonna be interpreted the same was as x. hmm
 
user1804599
4:39 PM
interesting
 
why the heck xcode creates file references rather than copies files itself whenever they are dragged from one project and dropped to another project. it's so fuc!#ing stupid.
 
Ven
terribel
 
nwp
so you don't have duplicate files and get frustrated that your fixes in the wrong file have no effect
 
user1804599
@Ven why?
 
@ProblemSlover Why does Apple suck in general? Because it's been so damned successful for them, obviously.
 
user1804599
4:43 PM
should I prohibit it?
 
@nwp I just made critical changes in the dragged file... and I didn't realize that it's just reference .. so changes are made in another project / damn!
 
Ven
because x is a value, and (x) a call
 
user1804599
(x y z) is interpreted as ((x y) z).
 
Ven
everything unary, haskell-style, and lazy?
 
user1804599
(x y z w) as (((x y) z) w) etc
 
user1804599
4:43 PM
I am not certain about the evaluation strategy yet.
 
user1804599
But curried, yes.
 
@ProblemSlover You are using version control, so getting the old version is trivial, right?
 
user1804599
Easier to use and implement.
 
Ven
curried is one thing. you need a syntax to call a nullary function
 
user1804599
There are no nullary functions.
 
Ven
4:44 PM
then x being (x) is 100% fine
 
user1804599
I think I'll just prohibit (x).
 
user1804599
Like I prohibit ().
 
Ven
just confusing
 
Nullary functions would simply be value bindings in a purely functional language, no?
 
@JerryCoffin I sure I do. but problem still remains with xcode.
 
user1804599
4:44 PM
Yeah.
 
user1804599
No difference.
 
Ven
@Shoe think about laziness
so, no
 
@JerryCoffin and It's so inconvenient
 
Ven
(not RT-observable, but computational overhead etc still exist)
 
to copy files through finder
or there is a less time consuming way..
 
4:46 PM
@ProblemSlover I can't agree. It's not that there's a problem with XCode. The problem is XCode.
7
 
@JerryCoffin I'd give your input 1000 likes if it was possible
 
user1804599
 
user1804599
this is how algebraic data types werk
 
anyway. Xcode just spoiled my mood. gonna sacrifice my time and switch to xamarin(visual studio).
I'm fed up
 
5:01 PM
looking forward to see debates trump vs crooked hilary
 
Ven
(disregard the current add hardcall, I'll implement name resolution later)
 
user1804599
What's wrong about it?
 
Ven
5:18 PM
The shift look a bit ugly
 
@Ven your code looks sexy
 
user1804599
yay yay yay yay yay
 
user1804599
% echo '(fn (x bool, y bool) (not x))' | stack exec snekc
[ValueLambdaVE "x" (NameTE (TS {tsT = BoolT}) "bool") (ValueLambdaVE "y" (NameTE (TS {tsT = BoolT}) "bool") (ValueApplyVE (NameVE (VS {vsT = ApplyT (ApplyT FuncT BoolT) BoolT}) "not") (NameVE (VS {vsT = BoolT}) "x")))]
 
user1804599
@Ven looks fine to me
 
5:49 PM
@Ven Why are working with Perl?
 
user1804599
(fn [t *] (fn (x t) x)), the identity function, has type?
 
user1804599
(forall (t *) (-> t t)). :v
 
user1804599
Extremely fascinating.
 
user1804599
Let's implement this shit.
 
6:06 PM
bah
want to watch DreamHack
more casters waffling on about irrelevant shit instead of playing the fucking game
 
nwp
@Puppy agree :(
 
Ven
@Shoe why are missing a word
@Puppy who's playing (next)?
@Shoe to answer, it's because Perl is awesome :)
 
nwp
they had other games in parallel, why don't they cast those during the downtime?
 
6:22 PM
@Ven I'm sorry
 
user1804599
% stack test && echo '[(fn [t *, u *] (fn (x t, y u) x)) bool bool]' | stack exec snekc
(: [(fn [t *, u *] (fn (x t, y u) x)) bool bool]
   ((-> bool) ((-> bool) bool)))
 
user1804599
:3
 
user1804599
i.e.
 
user1804599
 
@JerryCoffin Ever been to LA?
 
user1804599
6:32 PM
@Ven large part of type checker works; it's time to do some code generation.
 
nwp
it bothers me that the game is so blurry
 
6:48 PM
@Borgleader No Well, okay, maybe I have. But promise I took a shower promptly afterwards, so I'm clean again.
 
@JerryCoffin lol ok, I was actually wondering if there were any places to visit. Barring any unforeseen even I'll be over there for work next week and I'll have one day free. I was thinking maybe the griffith observatory since its ~not too far~ from my hotel. Any other suggestions?
 
Funzies.
 
Step in deer poop, funzies. youre weird mate
 
@Borgleader I don't really have much in the way of suggestions I'm afraid.
 
@JerryCoffin It's all good :) I'm sure I'll find something to do
 
7:00 PM
Oh, I have wanted to take the kids to La Brea tar pits. If memory serves, there's a display/museum about it that would probably be worth seeing.
 
I'll check their website :)
 
nwp
7:16 PM
a comment of mine disappeared. Is there a way to check if it was flagged and deleted?
it doesn't even appear of my actions list
 
@Borgleader You sound like an Australian.
 
user1804599
I wonder if machine learning can be applied to static analysis of programs.
 
user1804599
With a training set of programs known correct and one of programs known incorrect.
 
@StackedCrooked lol
wrong colony
 
Ven
7:36 PM
@Zoidberg lol
 
user1804599
:(
 
7:51 PM
@StackedCrooked oi yer wrong mate ain't yeh
 
user1804599
 
user1804599
Does anyone know what font this is?
 
not sure, but if I'm guessing.. I think it might be the standard mono font in windows used in DOS
 
8:07 PM
these two implementations are equivalent right? first one is branchless code though
I wish the compiler would do this for me. gcc has the options but they don't do anything really, code has conditional branches everywhere in 2nd implementation
sort/map-ordering callbacks have totally random branch behavior, making them branchless far outweighs any unneccessary and/or instructions
 
@doug65536 The branched one can be made shorter with std::tie i think
 
@Khaled.K it's neither the raster font, nor consolas, nor lucida console
 
I wonder if an optimizer could remove all the branches
 
yeah, it could tell that they are all trivial int values and short circuit eval isn't necessary, due to lack of side effects
 
yes
Praise The Optimiser
 
8:18 PM
unfortunately, -fif-conversion and -fif-conversion2 aren't very aggressive
 
@melak47 the way character are spaced sounds like a console font.. it looks similar to Pragmata, and ProFontWindows, but it's neither
 
@Borgleader with std::tie? how?
 
user1804599
Haskell is great.
 
I could take out some repetition, yeah, with an inline function or something
 
user1804599
@Ven you should join Slack too fpchat.com
 
8:24 PM
hey, a BranchlessCompare class could accept a bunch of calls with pairs of values
 
afaik this should behave the same way as the long form branched version you had
 
@Borgleader of course! thanks :)
 
@Khaled.K Oh my this is awesome
 
I suppose I could model a branchless thing with an interface like the tuple thing you showed
 
8:47 PM
@doug65536 The problem is that the first one is utter shite
 
@Puppy and no branch mispredicts because no branches
 
@R.MartinhoFernandes Makes sense, I guess. Good luck trying to weed out all the things!
Also, 132 / 150 for my final Bjarne class project.
Sadface.
 
I updated gist
still shite?
 
9:03 PM
@ThePhD Dude thats good, wtf.
Unless you tell me the average was like 148/150
 
@doug65536 You're making a big assumption about how the compiler will implement the tie implementation. And the branch mispredict might be less expensive than 30 unnecessary binary ops.
 
@Borgleader nice, I like the unpacking
@Puppy I have measured with performance counters. unpredictable branch is around 80 cycles
 
user1804599
halting x = x `seq` True
 
@doug65536 And cache misses for the extra data used in the binary ops?
 
do you know how many xor and or setl setge it can do in 80 cycles?
this, and binary search, are all branch mispredict. everything in between is essentially free integer instructions
if you make it branchless then it never flushes and many loops fit in cpu reorder buffer
starting loads miles ahead of time
some other branch will be the bottleneck, but it will just rip through that whole compare as one uninterruptible basic block
it is a hot function, it's not like I am optimizing hello world
@Puppy they would be registers in any sane code generation
 
9:16 PM
the data in those registers has to come from somewhere, you knoiw
 
I have to access the data regardless
 
well, not if you do a branch and exit early
 
cache lines
access 1 byte == access whole line. it reads whole thing regardless
 
well you'd hope so
but you'd assume that the structure is wholly contained in a cache line
 
it does tell the memory stick the "critical word" to send first, but it sends it all in the burst
constantly mispredicting means it never gets to speculate very far, so you cant hide latencies as well
 
9:20 PM
@doug65536 Under the circumstances (certainty that extra compares are a lot cheaper than extra branches), I'd consider something on this order: coliru.stacked-crooked.com/a/e7c6707882f891e0
 
branches are drastically more expensive
compares cant be wrong and wont flush, ever
the fetch stage does not know which instruction is next, but it has to fetch something so it uses history to do a best guess. much later at retirement it checks... if it was wrong, then everything issued since then is wrong, it marks all the ops as garbage and restarts fetch with an empty pipeline at the correct target
after the pipeline fills all the way up instructions start to retire again
nothing gets done for whole pipeline length between fetch and mispredict detection
random branches go the wrong way 50% of the time
binary search compare function is very random
 
Oops--that should be addition, not oring. coliru.stacked-crooked.com/a/64d5e0e7338a3ded
 
compares create dependency chains, which delay their retirement until their data are available, but the cpu is free to speculate way ahead and get started on things ahead of that compare... the reorder buffer does its job and retirement proceeds right through the sete or whatever, never starting over
@JerryCoffin interesting
that is better :)
 
That's some funny stuff, get on your popcorn:
[Flip the coin to accept answer](http://stackoverflow.com/questions/37092913/if-vs-ifndef-vs-ifdef/37092961?noredirect=1#comment61731357_37092961)
 
9:43 PM
@JerryCoffin I can't contact chris.. :( Fuck
No answer..
 
@JerryCoffin limited to 32(?) comparisons, but only needing one long-lifetime register is better
if you compare more than 32 things, you need to get a grip :)
how gross would it be to take two references and a variadic pack of member pointers? lol
 
Ven
@Zoidberg no thanks
 
I guess the tuple is the sane way to do that
 
user1804599
:P:P:P
 
10:14 PM
Sadly my disclaimer still holds: "No doubt you can go more lowlevel, but I'm not sure when you'd need that". I have no what you're trying to do and whether it makes sense. I was just helping you with the technicals of the code, as you asked. — sehe 1 min ago
 
I have no idea, hurry! ;)
 
I feel so dirty when i do that. I'm happy i had the disclaimer from the start though
@Borgleader check. Fixed
 
10:41 PM
@Borgleader, why initializer list is not allowed except constructor? I know i am late to ask, but i am afraid to open a new thread for same solution. — Vishwadeep 10 hours ago
I was gonna respond, but I hit the comment character limit =/
 
because The International Standard (god save the committee) says so — набиячлэвэлиь 14 secs ago
 
user1804599
Such comments are worthless and you should feel ashamed.
 
That's not actually useful lol
 
It is, it shows one the true way of a C++ Programmer
 
user1804599
> Another year of crop failure #thirdworldproblems
 
11:09 PM
All I can say is that perhaps your questions should have been a bit clearer (as clear as my sample, for example). That would prevent quite a bit of wasted time. — sehe 7 mins ago
I'm no geometry whiz but it seems like the OP is being quite entitled.
I half hope I'm missing some suble point in there.
 
user1804599
😀
 
user1804599
I'm sad.
 
Ven
?
 
11:30 PM
@doug65536 ...to put it mildly.
 
user1804599
11:54 PM
!
 
@Ven you don't simply question mark bomb the question mark bomber
 

« first day (2030 days earlier)      last day (2919 days later) »