« first day (1908 days earlier)      last day (3056 days later) » 

2:00 PM
So many different versions of pushing objects into an array on creation, thanks bros!
@rlemon I tried using class, constructor and Chrome told me it doesn't support it yet. Too lazy to get Babel I guess.
 
npm install --save-dev babel-cli
babel script.js --out-file script-compiled.js
 
crl
or develop with Firefox but ^ that is good to know
 
I expected he wanted support for all modern browsers
if it is node, I just use babel-node
no need to compile it
 
crl
"develop"
 
@Jhawins What do you mean by modern UI?
 
crl
2:06 PM
what's the diff between babel-node and babel-cli? (checking myself)
 
user3119231
@crl what about this? jsfiddle.net/d1c25jvm
 
crl
if you need to add/delete like that, it may be easier to use an object rather an array, (use name as a key or another unique id)
 
@FlorianMargaine what does the ' at github.com/ralt/zed/blob/master/git-storage.lisp#L11 mean?
not something I can google, it seems
 
so, anyone use is.js? Is typescript better, or just using a check library?
 
crl
!!google apostrophe lisp
 
but I don't think that's what it meant in that context as well
what role can it serve in a typedef?
 
@AwalGarg 'foo means (quote foo)
 
:/
 
crl
it feels like bad with unbalanced quotes :))
 
Underscore.js, thoughts? Reading I've been doing recently has suggested using it, but since the no-jQuery has tainted my perception of libraries, I feel like I don't want to use any.
 
2:13 PM
it seems deeply silly but ok :/
 
but really, deftype is not as simple as typedef
 
it's not silly
lisp evaluates everything it comes
 
crl
s/everything/the pony/
 
that '( prevents the long (quote typage ... It's like using $ as shorthand for document.getElementById
 
crl
2:16 PM
!!urban programmer
 
@crl programmer One who writes computer programs; a software developer.
 
a programmer also shedules programs
:P
 
@Waxi A lot less useful now than it used to be, since many of the utils it provides are standard in modern browsers
 
A programmer also outsources programs B|
 
@crl Programmer pro·gram·mer (n) An organism capable of converting caffeine into code.
 
2:17 PM
> Forced browsing is an attack where the aim is to enumerate and access resources that are not referenced by the application, but are still accessible.
 
@FlorianMargaine got it
 
gave me headache :/
 
@AwalGarg (quote foo) is just something often done in lisp, so there's a shortcut
ZED> (defparameter foo "bar")
FOO
ZED> foo
"bar"
ZED> 'foo
FOO
ZED>
this is the difference ^
symbols are first-class citizens in lisp
 
crl
this is chinese to me
 
why did it return FOO ?
 
crl
2:20 PM
^ that
 
i expected something else ...
 
did you expect foo?
 
@FlorianMargaine let me guess a use case. We can use it to pass statements to an ASSERT macro, maybe?
 
@FlorianMargaine I expected THE GAME
 
@AwalGarg instead of magic strings, you can use simple symbols
the other advantage compared to strings is that symbols are "namespaced"
 
2:21 PM
@FlorianMargaine yes
 
@KarelG lisp reader uppercases every symbol
 
didn't knew that :P
 
so when you have (defun foo () (bar baz)), lisp will actually read it as (DEFUN FOO () (BAR BAZ))
it's case-insensitive, if you prefer
 
would it not give problems if there is an of more uppercases in the symbol names ?
like fooOO
 
crl
lots of parens and capitals, not what I love
 
2:23 PM
and then other symbol fOOoo
= conflict if both are in same block ?
 
@KarelG they're both the same symbol
that's what "case-insensitivity" means :P
 
ah, so when i define the second one, the first one gets overriden ?
 
what do you mean by "define"? :)
 
(defun foo () (bar baz))
(defun FOo () (bar baz))
 
@rlemon -1 not enough parens
 
crl
2:25 PM
symbols are like in erlang? you can use small case symbols like tht
 
ZED> (defun foo () )
FOO
ZED> (defun foo())
WARNING: redefining ZED::FOO in DEFUN
FOO
but you're getting in other areas here
i.e. shadowing, overriding, etc
it's like asking "if I do function foo() {} in js, and then function foo() {}, what happens?"
 
with defining i meant
 
user3119231
Any hints for performance/quality/size improvement? jsfiddle.net/w3ot4dbd
 
(let
     ((goal  "bar")
      (goAL "keh")
     )
 
@Maurize instantiate the variable
 
2:28 PM
ZED> (let ((foo)
           (foo)))
; in: LET ((FOO) (FOO))
;     (LET ((ZED::FOO) (ZED::FOO))
;       )
;
; caught ERROR:
;   The variable FOO occurs more than once in the LET.
;
; compilation unit finished
;   caught 1 ERROR condition
; Evaluation aborted on #<SB-INT:COMPILED-PROGRAM-ERROR {1005900453}>.
ZED>
 
(+ 2 3) ; the fuck is wrong with lisp
 
that's normal
 
very
 
@pootis What's the problem ?
 
@DenysSéguret too functional
 
2:29 PM
don't forget that it occurs too in other languages like Haskell
 
ZED> (let ((foo)
           (foO)))
; in: LET ((FOO) (FOO))
;     (LET ((ZED::FOO) (ZED::FOO))
;       )
;
; caught ERROR:
;   The variable FOO occurs more than once in the LET.
;
; compilation unit finished
;   caught 1 ERROR condition
; Evaluation aborted on #<SB-INT:COMPILED-PROGRAM-ERROR {1005AC2233}>.
ZED>
exactly the same error
 
he doesn't like prefix
 
@SterlingArcher I could see myself doing that
 
lisp doesn't see any difference between both, they're the same
@pootis lisp is not functional
 
c'mon, nobody likes prefix notation. it is only for academic weirdos
 
2:30 PM
I like prefix notation
 
@AwalGarg it removes the concept of precedence, which is pretty nice if you ask me
 
@AwalGarg Do you prefer it in Reverse ?
 
you don't matter :P
 
I remember in school I had to make an infix -> reverse polish converter
It didn't work
 
@BenjaminGruenbaum @MadaraUchiha so I shouldn't use disposer on the query chain, I should have used it on the connection pool?
 
@FlorianMargaine but it isn't as reasonable to read
 
So confusing
 
crl
it's like speaking like (eat I cookies)
 
@SterlingArcher have you ever used try/with in java?
 
with? No, try/catch yes
 
2:32 PM
@AwalGarg you get used to it
 
But not a with
 
@FlorianMargaine : just checked this in Racket
 
(define test
  (lambda (val)
    (let (
          (ele val)
          (ELe val))
      (+ ele ELe))
    ))
 
user3119231
Working with javascript (feeling myself smart) is making me happier then everything :D
 
2:33 PM
works without problems :)
 
@KarelG then racket is case-sensitive
 
yes
that's why i was surprised by what common-lisp does
 
My problem with lisp is all the damn parens
 
a good ide helps you to find the parens
 
2:34 PM
@SterlingArcher you can use it for connection management and for transactions.
Only use it on queries if you want them to run in a transaction.
 
Arggggg I spent all freaking night trying to make my query work
 
!!s/w/tw/
 
@rlemon Arggggg I spent all freaking night trying to make my query twork (source)
 
close enough
 
2:35 PM
let con = mysql.createPool(db_config);
function query(sql) {
	return con.getConnectionAsync().then(connection => {
		return connection.queryAsync(sql)
			.then(rows => rows)
			.finally(() => connection.release());
	});
}
var check = `SELECT COUNT(username) AS count FROM players WHERE username=${mysql.escape(user)}`;
	return db.query(check).then(data => {
		if (data[0].count) return {
			"msg":"This username has been taken!",
			"flag":true,
			"title":": Taken Username"
		}
}
 
@Meredith my problem with lisp is the tooling.
 
This is how I used it
 
crl
you just need to se opacity:.1 on parens
 
@phenomnomnominal dat leopard is so savage or very hungry
 
@BenjaminGruenbaum no doubt you like JS :S
 
2:36 PM
@SterlingArcher dat indentation
 
Btw has anyone here used elixir?
 
let con = ...;
function query(sql) {
	return con.getConnectionAsync().then(connection => {
		return connection.queryAsync(sql);
	}).then(rows => {

	}).finally(...);
}
 
@BenjaminGruenbaum and the cost of replacing your ( and ) keys all the time.
 
I've started using it in my free time and it's really nice
 
@SterlingArcher stop nesting
 
2:38 PM
O.o Hrm, let me try that
 
crl
promise anti-pattern
 
@Meredith i've used many elixirs in my DAI game yes
 
^^
 
@SterlingArcher the disposer pattern is used to provide a safe way to declare closable resources
 
@MadaraUchiha you didn't mention how to use it.
 
2:40 PM
C:\Users\Jordan.alexander@mace\Desktop\SourceUndeadv2>node server.js
SourceUndead has risen from the grave on port 8080
Unhandled rejection ReferenceError: connection is not defined
    at C:\Users\Jordan.alexander@mace\Desktop\SourceUndeadv2\lib\db.js:25:18
 
I'm from a mobile phone at the moment
 
suggestion for improvement on bluebird doc: show how to use the disposer on its doc page cc @BenjaminGruenbaum
 
@rlemon it says connection isn't defined inside the finally
 
@AwalGarg JS has a tooling problem.
@FlorianMargaine make a PR I'd appreciate it :)
 
@SterlingArcher gist.github.com/rlemon/e8b4605de073276c82f4 how I do it with pg
 
2:43 PM
@rlemon that's like a disposer but without .using.
 
@rlemon Doesn't bluebird have a disposer specifically for this?
 
maybe, I've been doing it this way for a while
 
@BenjaminGruenbaum "done"
 
Anyone have any experience with mysql master<>master replication with existing data and as little downtime as possible?
 
@FlorianMargaine that's hardly a PR :P
 
2:46 PM
@BenjaminGruenbaum because I wouldn't know what to do in a PR :P
 
Do you know how to replace X text with a div? For example: Hello World. Replacing World with a div element.
 
Show an example of using using @FlorianMargaine
 
Im trying to do this since a few hours now
 
@Asperger you can use textNode.splitText to create two nodes, then remove the choice node and replace it with a div containing the same content
 
@rlemon this is what I have so far jsfiddle.net/testopia/4a8nf54n
 
2:47 PM
@BenjaminGruenbaum but.. effort
 
Oh that's clever
I would've just removed the 'world' part and appended a div
 
crl
@Asperger select 'Hello' then insertHTML
 
Im trying to create a simple editor thats why
 
Hi , I have a webapp in which i get some data from the database. The data is either some numbers or zeros. Using javascript I want to display the data in such a way that if it is non zero numbers it should be displayed in bold red and zeros should be normal
 
crl
oh are you using a contenteditable? or not
 
2:49 PM
any help is appreciated
 
@crl yep
 
crl
you know document.execCommand?
 
@user2821894 it's a simple thing ... Just loop through these values and if it's non zero, add class (eg "boldThis") to the element holding that value. Then in CSS: boldThis { font-weight: bold }
 
crl
that with Range does everuthing
 
@FlorianMargaine story of my life.
 
2:52 PM
@FlorianMargaine using could be used to remove many finally in Miaou database operations
(I wrote the db part before the introduction of using in BB)
 
crl
how should I call some 'popovers' that are shown below the target?
 
:D
I love how easy it is to run a node server locally, and git between dev => prod
 
The same can be said for PHP. :/
 
crl
(popover as how bootstrap call a small shit showed near an element)
 
github.com/RUJodan/SourceUndeadv2/blob/master/README.md I added a nice README.md that explains how to setup the server
 
2:56 PM
@SterlingArcher Is this your first time doing backend stuff?
 
What an ugly login screen lol
 
It's not ugly.
 
Gee Waxi, thanks!
 
that green is too bright
 
I really like dull greens.
 
2:57 PM
and the purple visited needs to change
 
Like
 
hard to read
#31dd51
 
#dff0d8
or #bbffb3
 
@crl ya the range rakes care of it.
 
Nothing wrong with the colors individually, but they don't mesh.
 
crl
2:58 PM
#bada55
 
I do need to change that alert color and the link colors
 
@SterlingArcher uhh can only one person be logged in at a time? github.com/RUJodan/SourceUndeadv2/blob/master/server.js
there is one global logged in state
 
I know
it's for testing the routing
 
:'(
 
I mean rlemon wrote: you can use textNode.splitText to create two nodes, then remove the choice node and replace it with a div containing the same content
 
2:59 PM
Session variables D=
 
See the original repo for how i did sessions
 
isnt splitText the same as split?
 
how could this test pass?
 
@emporio What do you mean?
 

« first day (1908 days earlier)      last day (3056 days later) »