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

1:00 PM
which means JavaScript of today alone covers the usecases of many languages of the future. all hail JavaScript.
 
I mean, the entire reason we're javascript developers is because it was the only web language for a long time
 
that's the history, but I like current JS.
 
user4229770
hello, how is top menu called ? jamieoliver.com
 
Current JS is a mess
 
You are likely to prefer many future languages over JS @Luggage
 
1:02 PM
ES6 is pretty. The type system could still be improved, though
@DntQuitPls I often hear it called a "NavBar"
 
user4229770
Ok ,ty ;)
 
Too much of ES6 is just poorly designed
Maps in particular are completely useless because of how they were designed
 
useless? sounds strong.
 
You can't destructure them
Which means you're better off using plain old objects if you plan on passing around the map
 
yea. aren't maps only realy useful if you want non-string keys?
 
1:05 PM
Here is my type protection against undefineds: function foo(bar=required()) {} function required() { throw 'this arg is required you idiot' }
 
Yeah that's the only use for them
Which shouldn't be the case
 
tht's kind of fine. I just use objects
Object.create(null)
 
The point of maps is to store state
Then you pass a map around between functions to transform it
 
!!>Object.create(null).hasOwnProperty
 
@JanDvorak "undefined"
 
1:07 PM
But you can't do that because a) maps are mutable and b) you might as well use objects because the API is so much easier to read
 
meh.
 
?
 
I just spent 30 minutes playing with iptables trying to figure out why my rules weren't working
rules being having a bridge between vm and outside, using NAT
they usually work, so I didn't get the issue
until it hit me
I'm using eth0... I'm on wifi right now. ._.
 
Also you can't do something like
 
1:10 PM
:)
 
const [1, ...rest] = [1, 2, 3, 4];
Or maybe you can, but I don't see it in the spec and it doesn't work with babel
 
you can if you don't try to name a variable 1
const [foo, ...rest] = [1, 2, 3, 4];
 
Yeah
The example with 1 would throw an error if the first element isn't 1
it'd be shorthand for adding something like
 
Say there's a language where there's only a number type, which can be any decimal or integer, but I define a wrapper class or a sub-class of this number type, which limits it to a certain size or to an integer... Is it possible to create a compiler for such language to optimize numbers stored in memory according to such definitions created in the code itself, by the developer? :S
 
1:13 PM
if(!foo){ throw ...} to the end of your example
 
the feature you describe is not found in MANY languages
 
@Luggage mine?
 
no
well, maybe that , too
 
@Luggage please use tags :)
 
<ok>
 
1:15 PM
@Luggage I mean name tags @<namehere>
ughh ¬_¬
 
argh, stop pginging me rpeatedly
ding ding ding
 
@Luggage why?
:D
 
@Krush Ada does this
 
@Florian who?
 
1:15 PM
everyone uses Ada too
 
@Florian is?
 
@Krush google it?
@AwalGarg I'm the proud owner of an Ada project on github
 
florian probably does use ADA.
 
@Florian oh you mean a language, I thought it's something relevant to name tagging in this chat.. lol
 
Yeah I'm not surprised at all that you use Ada
 
1:17 PM
I have about 20 lines of code, iirc
 
What do you use it for?
 
which is 21 more than average
 
including newlines
 
@Florian however I'm concerned if this feature is implemented through the use of specialized features like reserved keywords that set the max size of bits a number can be, if so then that's not what I'm looking for
 
@Meredith it's an irc client that connects to a server and stays connected
maybe it even handles PING?
I don't remember
@Krush you define a type with a min/max value
 
1:19 PM
Hello what is the conventional way to add javascript and css file? I mean in head section or at end after all other HTML is rendered?
 
Bottom
 
css at the top, js at the bottom
like an html mullet
 
@FlorianMargaine that dude is so happy he could connect to IRC
 
@Florian is the feature you use to do so only meant for defining a type with min/max values? or does it have other uses and the compiler can detect when it's used for min/max declarations?
 
1:20 PM
@Krush how about you Google it?
 
my son is waking up, bbl
 
you won't want EVERYTHING from that boilerplate, of course.
 
@Florian if you don't understand me that would be logical, but this is a true/false answer, regardless
@Florian I will but not sure what to Google exactly
 
@FlorianMargaine God damn, when did you learn Ada?
Oh, nvm, forgot you were old. :P
 
1:22 PM
@Krush How much do you know about compilers?
 
i can't even spell compliers.
 
@Meredith an amount
 
lol
 
Ada in the 21 century is of no use
 
Dude I had to type that twice
@Krush So you have a book or two on them?
 
1:23 PM
@TilakMadichetti I'm sure it is educational. Maybe not very practical
 
He (or she) has an amount of books on them.
 
@Meredith no I don't learn anything from books, sadly :S
@Meredith never did :|
 
Probably because you don't read them
 
hi i need some knowledge about webhook ?
 
1:24 PM
@Meredith quite so
 
any idea how they work what it is ?
 
I'm just saying
 
First go hook up @paul
 
You might want to read about compiler theory if you're making a compiler
 
@exepaul have you tried typing "webhook" into google and then clicking the first result (likely wikipedia)
 
1:25 PM
@Meredith I might, or I might learn from other sources :)
 
i tried but not getting idea can someone tell me where i can build webhook for my website ??
something
i want to use facebook app but its asking webhook url and i have no idea
 
@Florian seems "is" is not restricted to "min/max", but "range" seems to, unnecessarily, be a pre-defined type. I mean it can have its advantage to pre-define it, but it makes the language less flexible
 
a webhook is just when one app is configured to call some arbitrary URL when an event happens
"when this happens, make a request to http://exepaul.com/myevent"
 
@AwalGarg sahi hai but hasi nhi aayi hahaha
 
1:30 PM
@SomeGuy it's a very interesting and practical language. Much more used in some fields than others though. (Think embedded.)
 
@exepaul wat? what language is that?
 
@SomeGuy according to github, about a year ago
 
@FlorianMargaine Yeah? Thought C / C++ were primarily used for embedded
 
@SomeGuy depends on which kind of embedded
there is "super small embedded" and there is "super robust embedded"
(think factory machines that must work 24/7 or a company loses x millions per minute)
 
Ah. Ada's used for the robust ones?
 
1:35 PM
yes
 
What benefits does it offer over the others?
(In terms of making programs more robust)
 
they don't just use a rasberry pi running node.js?
 
a good typing system
 
If you only have integers, can you emulate floats? :S
 
Good to know!
 
1:36 PM
@Krush emulate in which sense?
 
@Florian say a language like Java gets floats removed, so Number just becomes Integer, can you work-around to create something like a float? I mean computers ultimately store floats as integers... So I'm guessing yes, but just making sure?
 
@SomeGuy Ada was also made in times when memory was scarce, so it's suited for normal embedded systems too
 
@Luggage suddenly they start losing NaN millions per minute
 
hehe
 
@Krush look up "FPU"
 
1:38 PM
computers store floats as floats.
 
@FlorianMargaine That makes sense
 
@Luggage which are bits
 
and bits can represent more than integers
so, yes.. you COULD make floatng point in software, but I can't think of a good reason to
 
@GNi33 Check out Travis' album "Everything at Once"
One of the songs from the album youtu.be/Wyq_Up37Eic
 
@Neil reminder: link of politicians being felons
 
1:53 PM
any custsom code to show 2 modals at the same time ?
 
did google not have given you reliable results?
 
Function expression: { argumentA, argumentB : argumentA + argumentB }(10, 20); // 30
Aesthetic?
 
2:22 PM
motherboard.vice.com/read/truth-through-cold-water hah! @Abhishrek see if this helps you? :P
 
@AwalGarg not amused. Infact I am moderately offended, calling your PD now to tell the truth.
 
@Abhishrek So you think her voice could help your ears better than cold water? :P
 
fuck off
 
2.9 :)
 
it would be insane itself to pour cold water in someone's left ear...
 
2:26 PM
Flag-trolling Abhi in...
 
go ahead.
 
Nah, I don't want to.
 
more like trolling 10kers
 
@AwalGarg Been using i3 for the past few days. It's pretty neat
I hate my MacBook's keyboard, though. The keys are placed too strangely
 
@SomeGuy yeah
 
2:32 PM
@SomeGuy \o/ played around with the config? custom setup screenshots?
 
@AwalGarg Not much yet. I'm trying to figure out how best to xmodmap my shitty keyboard
 
You can customize i3?
 
@littlepootis Is that what you use too?
 
@SomeGuy yep
 
Neat. My favourite feature so far has been the resize option :P
 
2:34 PM
oh btw, this is my lockscreen with i3-lock: i.imgur.com/202z8Lv.png. my sister has stopped hard rebooting the laptop now when I am away and she wants to use windows.
 
awesome-wm made you use the mouse to resize things
@AwalGarg lol
 
"if you don't know what you're doing, you better not do anything" :-D
 
@AwalGarg lol
 
I haven't installed a display manager and I'm not going to :P
startx ftw
 
2:35 PM
@SomeGuy welcome to da club. you are now a certified l33t level 0
 
What other applications are you using, peeps?
 
emaaaaaaaaaaaaaaaaaacs
Ahem
emacs
 
-1 l33t points :(
 
I love the idea of buffers
 
-9000
 
2:37 PM
Haha
 
@littlepootis tmux, fish, rofi, fzf, feh, zathura. this does most of my work
used to have LESSOPEN mapped to shit to have syntax highlighting with less but now I just use vim as a pager
 
@AwalGarg same. vim's better.
 
dtrx <3
 
Can't live without :D
 
specially love how easily it works with ranger. try opening file, type dtrx, done
 
2:40 PM
I have mc installed, but I don't use it at all.
 
rofi seems nice
 
rofi does too much
 
Yeah?
 
I tried it. But.. dmenu does the job well. so
 
rofi is coming with a file browser in the next version. and rofi scripts can communicate with other x11 apps and autocomplete shit in your browser etc. I agree with that sentiment, but rofi is pretty nice. can't give it up now
@littlepootis dmenu doesn't have a window switcher
 
2:43 PM
@AwalGarg yeah
 
if dmenu gets usage based sorting, I'd probably give up rofi, though
 
Sir, pls sher ur config. thx
 
which one
 
been playing around with my setup this week
 
2:51 PM
so, I decided I didn't want to use excel pie charts for some homework because reasons... so...
vs
n the first one you can more clearly see the the difference between countries, but blurgh
the second one is much prettier, but then again, you don't really see the difference between slices
what's to do?
 
the first one would be a lot better of some of the tiny slices were in a single "other" slice
 
but it also illustrates visually that there is a lot of variety
 
yea..
 
other with a number near it doesn't really show much by eye
 
oh
 
2:54 PM
...
wondering if there's some other cool color thing that I can do
I noticed that messing with light/saturation just makes it look biased to certain countries and overall kinda giving too much pressure on the eye
I think I'm going to stick with the second unless someone can tell me a better way..
I mean, the "others" is a reasonable solution
but the point of the homework was also to show diversity and vastity of global things...
 
3:33 PM
@towc pie charts is mainly used for a limited set. Make a top 10 and group the rest as "rest" eg
 
teacher wanted to use pie charts AND show diversity :/
I wouldn't have used a pie chart myself
 
keh
there is a pie chart at excel which allows you to show a subset of a set
but that subset is shown in a bar :|
(try to explore the different pie charts)
 
I'm doing this in JS
screw excel
 
3:55 PM
maybe?
perhaps the double information is redundant
I could be putting the actual numbers instead of the percentage...
but then the structure wouldn't be generalized
(this is supposed to represent where were products that my classmates found in their homes from)
the idea is to show the existence of global trade
 
4:11 PM
oh cool, v8 supports explicit tail calls ^_^
 
Let me know when SpiderMonkey does
Nice though
 
@towc You need more contrast
Old people are not going to be able to read that
 
due to the contrast?
or font too small?
 
Yeah contrast
 
looks fine to me. Definitely not colour-blind friendly though
 
4:22 PM
@Meredith how'd you fix it? Make the rainbow brighter?
 
Add a separator
 
@JanDvorak well... you do have a point... but I can't really think of pie charts with lots of entries that are color-blind friendly...
 
Or alternate between higher and lower lightness
 
@Meredith tried it before, then it becomes sucky for who doesn't have a problem
let me take a pic
 
@towc But are your classmates global as well? Or do they all come from one country?
 
4:25 PM
@KendallFrey it's a european school. I will have to discuss that in the data analysis text and stuff, just worrying about the fun part for now
 
Just saying, your classmates probably aren't a representative sample of global trade
 
 
Hmm
 
(y)
 
@KendallFrey the idea was that technically everyone should be from the same exact place, and show that stuff from all over the world ends up in our homes
 
4:28 PM
That looks great except for italy and spain
 
and USA and vietnam
 
I can probably make a bigger light change
 
Yeah try that
 
but any more than this looks bad for me
I really really don't like this one
 
@MadaraUchiha This guy created a question which was instantaneously upvoted then posted 2 answers which made no sense and which were instantaneously upvoted.
0
Q: if don't have error submit form

masiha68 public function Link() { $id=$this->params['id']; $url=$this->params['url']; $dviId=$this->params['divId']; $url=Yii::$app->urlManager->createAbsoluteUrl($url); $js2="$('#".$id."').on('click', function() { $.ajax({url: '".$url."',type: 'POST',success ...

 
4:30 PM
although you can distinguish between things
 
I like how it looks, but it definitely feels too busy
 
the contrast with bangladesh is awful
 
white font for dark entries?
not too busy
 
I am technically going to be compared with people who fill their powerpoints with low-contrast text filling the whole slide...
but I want to feel satisfied with this :P and also learn, I guess
 
I like the 3rd one the best
 
4:33 PM
@Meredith with very little light variation?
counting from which :P
 
That one
 
what is that?
 
@Neoares how many people from each country have been in bed with your mom
:D
 
seems legit
 
@Meredith I feel like it's growing on me, but seeing it for the first time I kinda hated it... but meh, I'll trust this random person on the internet
 
4:35 PM
Go with your gut
 
you're right, I'll just show this to the teacher
 
not that literally
 
@Zirak a proof of concept for using JSX syntax for teomplating xsl-fo: github.com/luggage66/jsx-xsl-fo/blob/master/src/report.js
not terribly special as far as using JSX is concerned, but I think it could make writing xsl nicer.
 
china's like "bitch please"
 
make china yellow and the rest dark colors
 
4:48 PM
I don't understand the graph
so you are saying they have 155+ electronic items or more in the household or somethig
 
@William from 155 items, 107 are in china
 
where are all the russian electronics?
 
@towc the graph makes it seem 155 items are exclusive to each country
meaning china has a different 107 items then the others
 
@Luggage apparently noona has russian items :/
 
pie charts are rarely a good idea in my experience
 
4:50 PM
that's the joke :)
@William he's tasked with making a pie chart.
 
@Luggage oh... -_-
(I don't get it. Color me n00b)
 
i thought you were saying "no one makes russian electronics", which is what i was saying
i think we misunderstood each other
 
yeah where is russia not to mention I would assume the US being capatalist would have all the options that china at minimum
where is the US seems like an equally valid question
 
we don't make electronics..
 
wtf you need to label the graph better
I assumed it was available electronics
 
4:55 PM
well, I think there are some chip fabs here.. like texas instruments, but that might not be true anymore
 
good ol TI-84 more expensive then my itouch
 
@William the graph will go with other title information. The idea is that only people who are looking for this graph will find it, they won't just stumble upon it. AKA homework
 
@towc I think the graph would be better titled. 155 electronics developed at or something
 
I think that the thing with the US is that they have a self-included market, they don't export much
 
electronics created at
electronics items is a double plural which doesn't make much sense
 
4:58 PM
@William you are right, but I'm really not bothered by it
 
this must not be very important
 
more bothered about the graphics than the text
 
This is still an overkill super complicated FizzBuzz and for what it's worth I would fail someone a coding interview for that. — Benjamin Gruenbaum 10 hours ago
forgot if I posted this here
 
5:09 PM
@William the engine would include food, clothing, "other", machines and similar. Don't want to add a specific case for all of those
 
wtf adding created at isn't specific at all
renaming electronics items to electronics is rather easy
 
is food "created"? Is "other" "created"?
 
fine do what you must
 
you could have some better wording, I just can't think of any :/
towc.eu/school/geo/global-trade-data you can play around with render.allCountriesByCountFromType( anything in data.typeList )
the idea was also to make a general engine that I could use for later stuff
didn't want to add too many options, such as custom text for different types... ever heard of "devs love choice paralysis"?
I fit in that saying :P
 
It would be sure to measure the amount of wasted space in large project due to the cpp file extension being 3 letters :P
As in, go to the most popular CPP projects on GH and look at how many clones they have and see the bytes wasted total.
 
5:21 PM
you are surely joking. maybe you are not
example?
 
@BenjaminGruenbaum hah with your comment I was thinking, ok how bad can it really be?
lol... it was really bad yeesh
 
static void fizzbuzz() {
    for(int i = 1; i <= 100; i ++ ) {
        if(i.toString().contains("3")) System.out.print("Lucky ");
        if(i % 15 == o)  System.out.println("FizzBuzz");
        else if(i % 5 == o)  System.out.println("Fizz");
        else if(i % 3 == o)  System.out.println("Buzz");
        else System.out.println(i);
    }
}
Seriously... how hard is this people -_-
 
Fun fact: 100% of positive integers contain the digit 3
 
5:36 PM
I'm either stupid or you are lying
 
Why not both?
 
likely both
 
Why not Zoidberg?
 
@William it's close enough to 100% that we can say it is 100% at large scales
 
@BenjaminGruenbaum hmm, should do that .contains thing without casting to string
inb4 single line dark mathemagic
 
5:43 PM
@AwalGarg why? You think there's a performance issue to solve in iterating 100 numbers :P
(The easiest math "trick" would just be to % 10 / 10 in a loop).
 
@BenjaminGruenbaum no, just for the sake of doing it that way
Ok I'd admit, I was hoping for magic along the lines of paulhankin.github.io/Fibonacci
 
I'm giving KDE another try
 
static boolean hasThree(int num) {
    while(num > 0) {
        if(num % 3 == 0) return true;
        num /= 10;
    }
    return false;
}
 
> whille
awesome. can't unsee now
@BenjaminGruenbaum hasThree(99) // true
 
5:48 PM
@BenjaminGruenbaum That's probably not what you meant
 
if (num % 10 == 3) ...
 
Should be num % 10 == 3
Yeah
 
that won't work for numbers like 939
I hope they don't (start) ask(ing) this at interviews now :/
 
Why won't it?
If you have integer division it works just fine
 
5:55 PM
!!> function hasThree(num) { while(num > 0) { if (num % 10 === 3) return true; num /= 10; } return false; } hasThree(939);
 
@AwalGarg true
 
huh
wait, nvm
 
That's not the correct hasThree
 
@AwalGarg false
 
yeah...
wtf
I am confused now
 
5:55 PM
js doesn't have integer division, so you'll have to do num = Math.floor(num / 10)
Floating point...
 
ooohh shit. fuck me
 
!!> (939 / 10) % 10
 
@Zirak 3.9000000000000057
 
@AwalGarg A bit later, k?
 
lol
 

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