« first day (2240 days earlier)      last day (2711 days later) » 

12:16 AM
@bitten ~ *soda* ~
 
1:13 AM
@Zirak since when did ecmascripts cert expire?
 
I am using Semantic UI
I am new to all of this
Is there a way to make a list clickable? As in each element is clicakble
i.e i have a for loop populating a table with activities - i would like the user to be able to click on any element
Ok
 
1:31 AM
@SterlingArcher What am I, ecmascript domain certificates historian?
 
 
1 hour later…
2:58 AM
Perhapbs
imgur.com/gallery/fHzCwJJ @Shmiddty might be able to glean some sphere movement ideas from this dynasphere
 
go home @SterlingArcher, you're drunk
I just learned that there are 2 battlebots gba games
 
3:18 AM
I am home, and I am drunk :D
 
it's boring
 
3:59 AM
hi
 
4:35 AM
what is GC ? stackoverflow.com/a/21735614/5936814. they talk about it in the comments
 
m59
Garbage Collection
 
thanks, does each browser have a different GC ?
 
thanks, I will read more about them while travelling to office
 
5:12 AM
0
Q: How to combine two collection based on id(transectionid) using node.js?

its mei have transection and purchase collections,which is contaning transection and purchase details now i want to convert it into single collection. based on transectionid we need to combine the documents Below is my transection collection data's { "transectionid": "1", "transectionamount...

help needed
 
5:41 AM
a = {} and a = new Object(); are they both same ? Does a ={} also internally call the constructor function of the object ?
 
5:52 AM
They're the same, yes.
 
Aren't Functions and Arrays also objects ?
 
yes
they're object types.
Not really "objects".
But arrays are just objects, yeah.
 
"they're object types" , what does that mean ?
 
Types in javascript can be broadly classified into primitive types (numbers, strings, regexp, symbols, booleans) and object types (functions, arrays, maps, sets, objects).
They differ in how they're passed around and in a lot of ways..
When you pass an "object type" value to a function, or assign to a variable, they are passed/assigned by "reference" and not by "value".
 
Understood that clears many of my doubts. Thanks
 
6:10 AM
am I the only one who thinks python is nasty
 
bad nasty or nasty in a seductive way ?\
 
pretty bad
 
7:19 AM
Anyone up?
 
@HiteshDhamshaniya Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
sorry wrong window
Sure. Thanks
 
I'm doing Advent of Code and my code isn't working and it should and I don't know why
aka fuck
 
user6438653
7:52 AM
@Mosho nope.
 
@TristanWiley same
 
user6438653
@FlyingGambit Everything is an object.
 
user6438653
@TristanWiley I'm down.
 
user6438653
There you are @littlepootis.
 
8:24 AM
can anybody help me on this question
0
Q: how to create overlay shape in jquery

Sandroim going to create a menu which have a shape that overlay the menu item when hover. i don't know why when i do hover it do menu overlay several times: this is my query code: $(document).ready(function(){ $("aside ul li div.overlay").mouseenter(function(){ $(this).animate({ le...

 
 
1 hour later…
9:41 AM
hi
anybody can help me with a three.js thing please
I am stuck, I also created a post on SO
0
Q: Three.js pointerlock player collision with obstacles not working properly

neoDevI'm trying to implement the player collision with obstacles to this basic pointerlock example The player should stop when hitting an obstacle, keeping the jump on the cubes feature as in the original example I am taking some time to figure it out, I followed some examples around the web: http...

 
@neoDev your question is a bit much, but it doesn't look like you are telling the raycaster where to cast from, and where to look
 
I am stuck because I cannot understand how to use properly raycaster
 
usually you do that with setFromCamera or when creating the raycaster
 
I tried it
but without much luck
 
new THREE.Raycaster( from, to ) is the most basic use
 
9:51 AM
at the moment I am able to create small cube in the point where the intersection happens
it works on all the obstacles faces
 
from and to are both vector3s, which represent a point in 3d space
in your code, raycaster.set(controls.getObject().position, rays[i]);, i don't even think raycaster as a set function
 
at the moment on one face of the obstacles the player stop works well
 
ah yeah it does
 
on the other faces the player is moved somewhere else
 
it also wants to to be normalised
so try
 
9:53 AM
1 message moved to Trash can
@neoDev Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
ok
sorry
 
raycaster.set(controls.getObject().position, rays[i].normalize());
ahh you're using set bcos you are using pointer lock controls
i get it now
 
tried, it seems to detect collisions in the same way. What does normalise does?
i readed that when doing game player collisions, the player should be moved to the closest point from the collision
so what I tried was: controls.getObject().position.z = intersections[0].point.z+5;
but as I told you it work only on one obstacle face "properly"
 
normalising a vector turns it's coords into something that is relative to it's magnitude
 
so it is better keep this normalize (I imagine)
 
9:58 AM
so with of a vector like (5,2.5), normalising it would turn it into (1,0.5) as it's magnitude is 5 (cc @towc :3)
i don't see why your code isn't working though ^^
 
I guess I am redirecting the camera (player) not properly
2 mins ago, by neoDev
so what I tried was: controls.getObject().position.z = intersections[0].point.z+5;
where:
controls.getObject().position
is the camera (player)
 
yeah, so you look through and check the raycaster from that position to every item in the ray array
are you sure that's what you want to do?
 
what I want to do is stop the player when hitting obstacles.
at the moment I added little cubes in the point of collision just for testing
but now maybe I should focus how to redirect the player
 
bcos you're just shooting rays along each direction of the 3 axis
 
as collisions sees to work
 
10:03 AM
rather than doing any hit detection
 
in the example (originally) the player was also able to jump on cubes
and stay on them
now I broken it
but I want to keep this feature
I know I messed a bit up the things, but I am doing my best
 
well i imagine that's because the raycaster is detecting an object when you check on this ray new THREE.Vector3(0, 0, -1)
yeah i understand :p
 
should I comment out that line?
 
no i think it's okay, it's just you are checking against your ray array
but it's not relative to the player
 
what do you think I have to use instead of
controls.getObject().position.z = intersections[0].point.z+5;
 
10:08 AM
to be honest, i wouldn't use your ray array and instead check against every vertices in the geometries of each player
 
how?
 
@neoDev yeah that makes a bit more sense, but what you could also do is just add the vectors together by Vector3.addVectors(controls.getObject().position, ray[0]) or something
i can't remember if that's the way to do it
@neoDev something like
i have some code for this somewhere, i've done it before..
yeah i have it
 
thank you
I had an idea at the moment:
 
i have the original example too if you want it
where that code is based from
 
when I detect the collision I am able to get also the obstacle faceIndex
I can detect which faceIndex it is and then redirect the player in different ways
controls.getObject().position.x
controls.getObject().position.z
etc
 
10:19 AM
yeah i think so
 
yes it could be useful!
 
lol
it took me so long to realise what you wanted / what your code was doing
 
:)
 
-___-
 
also I nticed that jumping actually it keeps going up and up....
maybe because I am not using the ray
new THREE.Vector3( 0, - 1, 0 ), 0, 10
I have it commented out
it was the only ray in the original example
(when I was still able to jump on cubes) :D
regarding the faceIndex detection it seems to work!
 
10:29 AM
@neoDev say '<([a-z]+) [^/]?>
 
This works on left/right/front/back faces!:
if(intersections[0].faceIndex == 8 || intersections[0].faceIndex == 9){ // front
	controls.getObject().position.z = intersections[0].point.z+5;
}
else if(intersections[0].faceIndex == 10 || intersections[0].faceIndex == 11){ // back
	controls.getObject().position.z = intersections[0].point.z-5;
}
else if(intersections[0].faceIndex == 2 || intersections[0].faceIndex == 3){ // left
	controls.getObject().position.x = intersections[0].point.x-5;
}
else if(intersections[0].faceIndex == 0 || intersections[0].faceIndex == 1){ // right
 
10:45 AM
jump fixed by add:
raycaster.ray.origin.y -= 10;
like it was in the original example
*almost fixed.. on some cubes I noticed it stays like "another-cube-distance" up
 
anyone know the easiest way to get those initial full screen background images that then switch to being a static height? Is it just a matter of giving it a div with a fixed height after the page loads?
 
11:51 AM
@bitten never worked with raycasters :/ Normalizing usually has very specific meanings based on context. It's most likely that raycasting has their own meaning for normalizing
bash question: I have many files named using normal file names, but want to make a copy of them in the same directory with them named uniquely from 1.m4a, 2.m4a, 3.m4a and so on. How can I do that from the command line?
 
12:15 PM
or actually, say I have files called "ape.m4a", "bee.m4a", "cheese.m4a" and so on, how can I reduce them to "a.m4a", "b.m4a", "c.m4a", guaranteed that they all begin with different letters?
b-.m4a  ð.m4a   g-.m4a  k-.m4a  ʃ- .m4a  n-.m4a  r-.m4a  t-.m4a  z-.m4a  θ-.m4a
d-.m4a  f-.m4a  h-.m4a  l-.m4a  m-.m4a   p-.m4a  s-.m4a  v-.m4a  ʒ-.m4a
I guess I can mv with a regex?
rename with perlexpr seems to be able to do what I need to
just need to figure out how
 
12:33 PM
rename "s/(.).+\.m4a/$1\.m4a/" *
d-.m4a not renamed: .m4a already exists
f-.m4a not renamed: .m4a already exists
g-.m4a not renamed: .m4a already exists
...
but but but..
oh, single quotes is all I needed
but some of the special characters weren't handled properly -_-
d.m4a  g.m4a  k.m4a  ?.m4a  ?.m4a  n.m4a  r.m4a  t.m4a  z.m4a
f.m4a  h.m4a  l.m4a  ?.m4a  m.m4a  p.m4a  s.m4a  v.m4a
and I lost some? wtf
oh, some became hidden .m4a s
looks like I may have to do it manually :/
or set up a nodejs script for this
also, something as simple as this should work: mv *-.m4a *.m4a
except for the one with the space
but I get this: mv: target ‘θ-.m4a’ is not a directory
 
12:52 PM
@rlemon My name is rlemon. I'm no "senior developer expert of engineering", I'm just a brogrammer. I think that variables should be weakly typed, and errors be thrown at runtime. I think jquery was bad. And javascript, well, I think that's just a little bit better.
 
> Receipt for Your Payment to Oculus VR LLC
woop woop
 
@Zirak right in the feel
 
1:20 PM
@towc it's just normalising a vector in this context ^^
 
1:45 PM
Hello all.
 
@iain Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
posted on December 03, 2016 by Axel Rauschmayer

I got my new MacBook Pro this week. These are my first impressions of the machine. I’ve moved from a MacBook Air 13" to a MacBook Pro 13". My dream notebook would have been a 13" version of the 12" MacBook. It’s a shame that Apple didn’t introduce such a machine, but I understand the decision to keep things simple. Accordingly, I changed the planning for my setup: from i

 
Tying to understand this; working on a project which uses js php and AJAX, I am very new to js. Is there any way to make innerHTML update onscreen without refreshing the browser, I see my text in the desired textbox with the browser dev tool, but it is not displayed on the screen ... Curiously the code worked once, and once only, which is rather baffling.
Any pointers appreciated ...
 
user6820627
@iain "Hello, World" Can you give me a JSFiddle?
 
user6820627
@iain I want to solve that. Looks interesting.
 
user6820627
1:52 PM
but without code i can't:(
 
Hello @LearnHowToBeTransparent let me take a look at JSFiddle ... See if I can post something there for you.
 
hello guys
 
Hello
 
are you using jquery to make ajax request?
 
@LearnHowToBeTransparent It will take me a long time to simulate the same in JSFiddle; I can perhaps better explain with psudocode?
 
user6820627
1:58 PM
@iain if jsfiddle is too hard, you can join in plunker collab session
 
user6820627
but pseudocode is OK
 
user6820627
do it - now - first
 
No I am adding to someone elses code and am new to the complexities of javascript, so the nuances are tricky for now.
 
user6820627
@iain can you copy all into the plnkr session?
 
2:01 PM
@rajeemcariazo Depends. If the codebase I'm working on already has it, sure. Otherwise I use fetch
 
Ahh, i think I have just found the cause !!!
 
user6820627
@iain wow! +1 for not asking question on Stack Overflow!
 
@LearnHowToBeTransparent Thank you so much for your time, I have spotted the cause, clever coding on the part of the dev who wrote the code but impossible to fathom for a noob and no comments or doc.
@LearnHowToBeTransparent For some reason as yet unbeknown to me; If I ask a question in a chat room, the answer just leaps out at me from I don't know where.
 
i have a quick question, why does the font size of my websie change when i resize? it doesn't use media query to change font size
 
The author has used an alias for a basic js function and that has confused me here.
 
user6820627
2:06 PM
@iain that's not clever dev, that's bad practice
 
There is worse in this code believe me.
 
@LearnHowToBeTransparent Why is it?
const $ = document.querySelector.bind(document);
 
I am tearing my hair out here, there are @ all over the php, it is a nightmare to debug.
 
JUSTICE.
 
2:10 PM
@LearnHowToBeTransparent Thank you for your time anyhow, rather embarrassed that I didn't spot this one before asking. Nice to know that you guys are here if I get stuck. I must say that I am more than a little bit intrigued by JS, the way it is functional and object orientated all at the same time.
 
@iain Yes, but you'd probably want to update the .textContent.
 
@LearnHowToBeTransparent The coding here is about as transparent a lead sheet ... :)
 
@ian JS is awesome (but also flawed). But.. lots of languages can let you use OOP and functional patterns..
 
Although, there are better ways to deal with this problem.
 
@littlepootis I love how people care about such silly projects when the project in concern is mine :D
 
2:13 PM
It ain't special.
 
@AwalGarg it's silly, but useful.
I come across these little bash scripts all the time. Very useful.
 
bashlets
 
@Luggage It is an inbuilt script in a modeling software that I'm considering acquiring. Seems great in the right place.
 
@littlepootis they are useful because bash, and the linux shell in general is broken (it works, but it is broken)
 
Ohh, well, I can't speak for ther implementation of JS there.
 
2:14 PM
@AwalGarg Why so?
 
we're waiting for yours :)
 
we need a registry for them
 
Do you know what JS engine it uses?
 
@Zirak What's your favourite colour? Mines a three way tie.. Red, White, and Blue.
 
No I don't, does that imply which version of js?
 
2:16 PM
It's pretty hard to find an implementation that fully supports a version.
 
@rlemon I use passport, but jst the basics and I haven't needed to adjsut it for over a year, so I doubt I'm much help ther.
 
I think I got that licked. now I need to figure out the BrowserRouter and redirects
 
yea. The redirects are wierd.. you put in a react element.
I'm not sure I like react-router 4.
 
@iain Lots of small things are just badly designed, or are not excelling at time's test. For example, in what sane language do you expect to set a variable to split a string into an array? And arrays being just strings which are all smaller strings actually separated by a global variable?
 
I kinda do for simple sites.
 
2:17 PM
@littlepootis This only requires simple functionality, for testing the logic of a model before building it.
@AwalGarg The only sane language to my mind, is c ;)
 
Routers are one of those things that are easy to write a simple one, hard to write a sophisticated one and every one out there has some flaws or something you'd do differently. There is great temptation to make a new one and add to the confusion.
 
and bash is a wonderful accompaniment to c ...
 
@iain what modelling software are you talking about?
 
enterprise architect
 
bash is as flawed, but also as powerful and ubiquitous as JS.
 
2:19 PM
The only sane C alternative that I've tried is dlang.org
2
 
@iain /me gazes with angst and pity
 
The D looked good to me.
 
Of course you liked D
 
What do you think of Rust, @littlepootis ?
 
trying it out at the moment to try and get my head around this code, it is a companies erp, written in php js.
@AwalGarg Must be the masochist in me. I am only a beginner, but I find that the bottom up logic suits me pretty well.
 
2:21 PM
enterprise architect is the name of the software? That collides with 50% of Microsoft product names.
 
D isn't exactly an alternative to C. More to C++. Also the fact that it still has unsafe stuff.
 
@Luggage I haven't spent enough time with that
@AwalGarg yes, a saner C++ :)
 
@Luggage Yes it is, sparx system is the company I think, let me find a link.
 
user6820627
@littlepootis wow just like js
 
I'm trying Clojure right now.
It's nice.. Lisp + JS.
 
@LearnHowToBeTransparent not at all like JS. Do you mean the c-like syntax?
 
user6820627
@Luggage nope. i mean a lot of dots
 
ohh, that type of modeling software. I was thinking like 3d models for some reason.
 
Also, that ^
 
2:24 PM
I am weary of whatever that is. The modeling thing
 
REBOL looks nice
 
user6820627
@FilipDupanović -1 for pascal-like syntax
 
Does anyone know how to make a table clickable in js/jqUERY?
 
They're clickable by default.
 
var
  sum = 0
  count = 0
I can't stress how much I hate this ^
 
2:27 PM
@Luggage I'm pretty taken by uml, and this seems like a good drawing board for sketching out an idea before starting; impressed by how transparent the GUI/UI is.
 
user6820627
@Luggage yeah JS?
 
No.
 
user6820627
@Luggage but i can run it in js console.
 
@iain yea, if that workd for you, go for it. I have just never really been able to take advantage of the more full featured modeling tools I have used in the past
I now just use more free-form diagramming tools (like gliffy).
But.. I see how they could work for some.
@LearnHowToBeTransparent only because of ASI and JS dumb-ness.
without the comma, it makes a global variable.
That was a "nim" example.
 
By modeling the crazy functions in this code I was able to make a mod more easily, seems to work for me, and it makes pretty drawings at the same time; I'm sure my examiners will go for that.
 
2:30 PM
your 'examiners'?
 
Yes, I'm on work experiance right now and will have to write up everything that I'm doing at the moment.
 
ah.
 
Yes yes, there the ones !
The will be syntactically checking the grammar of my nomenclature ... :/
 
@rlemon I am sitting by my laptop bored, now, so..
Do what you will with that info.
 
lol
what you wearin?
 
2:35 PM
I'm fully clothed, as I am in a starbucks, and they require that.
 
what time you got?
wait, we're same time
 
9:36 am.
 
honestly. right now I'm just sipping my coffee thinking about what I wanna do today
haven't even though about programming
 
I'm sipping my coffee lying to myself about what I'll do today.
 
user6820627
@BenFortune sometimes i can't understand myself just because i use an alias (and forgot what it does)
 
2:39 PM
I need to clean my basement and garage. been putting both off for a couple weeks.
well. putting them off === taking one thing out and saying I worked on it
@LearnHowToBeTransparent that doesn't make it bad
that makes it bad for you
151
Q: If my team has low skill, should I lower the skill of my code?

Florian MargaineFor example, there is a common snippet in JS to get a default value: function f(x) { x = x || 'default_value'; } This kind of snippet is not easily understood by all the members of my team, their JS level being low. Should I not use this trick then? It makes the code less readable by peer...

related
 
@rlemon so.. this is a big disadvantage or using react-router (4). It puts SO much in your component tree, that makes it hard to read. Here is the tree from robogist-react snag.gy/lK8CUJ.jpg vs from my work app that uses another router: snag.gy/BnrpvS.jpg
Sure, maybe I shouldn't care about that..
 
2:55 PM
@Luggage is snag.gy your project?
 
No
That's just what I use for sharing screenshots.
 
I was just wondering (because of React); it's super nifty
 
ohh, never noticed it uses react
 
Oi people. What do you call that strap that you wear to bed to cover your eyes from lights from the surroundings?
 
2:59 PM
@rlemon >.> makes you wonder in which year did they commission development
 
sleep mask
 
silk scarf
 
@Luggage Exactly, thanks.
I gotta learn all this terminology some day
 
Was impressed that JSFiddle has vim functionality ... until I pressed <c-w> and the window closed ... dooh!
 
Anyways, I was wondering if there are such things to help block noise too? Cotton buds feel odd and don't exactly help much :|
 
3:02 PM
you actually want to get a sleep mask? this one is on a special atm sleepwithremee.com (no noise cancellation)
 
user6820627
@rlemon i hate flash
 
you're too young to appreciate flash
 
@AwalGarg I use foam buds, they work well. Very noisy here in the summer.
 
it had its time, and still is a decent tool. just not for the web
 
I thought I had found the cause but was mistaken, darn.
 
3:06 PM
I used this to cancel out noise pollution from construction work mynoise.net/NoiseMachines/binauralBrainwaveGenerator.php, at the expense of introducing legs to everything in my apt
 
> "introducing legs to everything in my apt"
I want whatever you are smoking.
 
Legs are good.
Legs on the back of a chair?
 
well, local regs say you can produce up to 60 dB in a room from 0600-2300, I cranked it up to 80 dB for good measure and cleaned a mounted cupboard of it's items at the other end of my home
 
Ah yes, those legs. 50Hz and below will do that pretty efficiently.
 
@FilipDupanović o.O
 
3:17 PM
@FilipDupanović ata boy.
 
well some dickhead was drilling non-stop for 2 months, I decided to respond with force
 
@iain interesting, thanks
 
Hum how best to explain this, the variable is there but it just not shown, when a function is running and there is no ajax call at that time, will innerHTML elements not get written? If I alert it from the console the value is in the textfield in th input ...
@AwalGarg A very nicely lit photograph I thought; One could easily over expose ones self in such a situation.
Ahh, its not putting the value in the right place, let me scroll back up, I think someone has already kindly mentioned the solution above and I have missed it.
 
@iain I was talking about foam buds. And I wouldn't onebox such an image in here - some of us work at places and live in environments where such things aren't considered okay to look at in public.
 
Ok, sorry about that.
3m buds are good, but they don't stop bass, good fore some frequencies.
 
3:31 PM
is it... safe to wear foam buds regularly, for so long? I'm thinking about the surrounding structures and microbiomes
 
@AwalGarg These peoples foam buds are more comfortable and block more nois than the 3m, I imagine this unit is well worth a look if it is a regular problem: earplugstore.com/personal-isolation-system.html
@FilipDupanović These ones are not washable, the 3m are. You need to change them regularly if you cant wash them.
@AwalGarg Sorry that wasn't the same brand, I mistook the site: these ones are great, I use them all the time: quies.com/product/foam-earplugs
Solution found, really to simple for words; sorry to have bothered you here with it. Needed '.value' not '.innerHTML'.
 
3:48 PM
@iain I'd still put some acetic acid drops en.wikipedia.org/wiki/Otitis_externa#Prevention, should put you in the ~4.5-5.5 pH range
I think there aren't any meds for infections of the inner ear, so buds always scare me
 
4:18 PM
> A police spokesman said they originally considered using HTML5 but opted for Flash because it was more likely to be commonly supported.
3
 
4:29 PM
@FilipDupanović sounds like an escort site
 
@Shmiddty right, so they spent 3 years building a flash application
 
5:04 PM
@FilipDupanović How's your day been?
 
profitable, by Ferengi laws :D! you?
 
5:37 PM
anyone knows what the fastest solution to doing an immutable merge is?
don't need classes, methods
just update an object with the path that changed the immutably way
 
!!> a = {foo: 'bar'}, b = {foo: 'baz'}; [Object.assign({}, a, b), a]
 
@FilipDupanović {"foo":"bar"}
@FilipDupanović [{"foo":"baz"},{"foo":"bar"}]
 
deep
it's a lot more involved than that
 
deep merge? fastest solution is to know the exact shape
 
naturall
y
I would use the Function constructor to create mergers for objects and cache them
in fact I wrote something that does just that a year ago
but I cba to make sure it still works and passes test
s
you know what, I'll clone and try it
 
5:48 PM
yeah, or you'll have to stitch something from the functional libs, because it seems impossible to strike what the requirements for a deep merge are
 
@KendallFrey more haskell if you have some time:
factors :: (Integral a) => a -> [a]
factors x = [ y | y <- [2..(floor ( sqrt x ) ) ], mod x y == 0 ]
that gives me type errors
but why...?
it says something about not being able to deduce RealFrac
although I've clearly stated that x is an Integral, and therefore y has to be an Integral, as it can only be drawn from a list of Integrals
this time I'm lazily trying to get a list of all factors to be candidate prime factors
 
man this code was great
 
maybe you need to cast sqrt x?
 
starz pls
 
@FilipDupanović that's already done by floor, ideally
sqrt always returns a Num, and floor gets a Num and returns an Integral
either an Integral or just an Int, which is in the Integral typeclass anyway
I tested the 2..(floor(sqrt(x)) part in the Prelude, nothing surprising came up
oh wait you're possibly right
Prelude> :t floor
floor :: (Integral b, RealFrac a) => a -> b
sqrt :: Floating a => a -> a
 
5:57 PM
I should learn me a Haskell one day
 
so I need to make x a floating...
but sqrt 4 correctly returns without any issue
 
I did some Elm
it's nice
 
sqrt (4 :: Int)
^ this does return an error
ffs
ok, cheers @FilipDupanović :)
 
np, thanks for preaching Haskell here
 

« first day (2240 days earlier)      last day (2711 days later) »